diff --git a/current/dist/leaflet/GpPluginLeaflet-map.css b/current/dist/leaflet/GpPluginLeaflet-map.css index 176b7de71..f0de31a41 100644 --- a/current/dist/leaflet/GpPluginLeaflet-map.css +++ b/current/dist/leaflet/GpPluginLeaflet-map.css @@ -9,8 +9,8 @@ * @copyright copyright (c) IGN * @license CeCILL-B * @author IGN - * @version 2.3.3 - * @date 21/07/2023 + * @version 2.3.4 + * @date 30/08/2023 * */ diff --git a/current/dist/leaflet/GpPluginLeaflet-map.js b/current/dist/leaflet/GpPluginLeaflet-map.js index b701e24e5..269dcbd5b 100644 --- a/current/dist/leaflet/GpPluginLeaflet-map.js +++ b/current/dist/leaflet/GpPluginLeaflet-map.js @@ -9,8 +9,8 @@ * @copyright copyright (c) IGN * @license CeCILL-B * @author IGN - * @version 2.3.3 - * @date 21/07/2023 + * @version 2.3.4 + * @date 30/08/2023 * */ @@ -203,7 +203,7 @@ eval("/* WEBPACK VAR INJECTION */(function(process, global) {/*!\n * @overview e /*! exports provided: _from, _id, _inBundle, _integrity, _location, _phantomChildren, _requested, _requiredBy, _resolved, _shasum, _spec, _where, author, bugs, bundleDependencies, date, dependencies, deprecated, description, devDependencies, homepage, keywords, license, main, module, name, nyc, optionalDependencies, peerDependencies, repository, scripts, version, default */ /***/ (function(module) { -eval("module.exports = JSON.parse(\"{\\\"_from\\\":\\\"geoportal-access-lib@3.3.2\\\",\\\"_id\\\":\\\"geoportal-access-lib@3.3.2\\\",\\\"_inBundle\\\":false,\\\"_integrity\\\":\\\"sha512-YDQNRworHuZGLECBknikFW2u5abYqDw1zvXxdKIcRGheHdPENt6J3mxd/SYBALp6vHPwGKw53mD/idRP0Lh+XA==\\\",\\\"_location\\\":\\\"/geoportal-access-lib\\\",\\\"_phantomChildren\\\":{},\\\"_requested\\\":{\\\"type\\\":\\\"version\\\",\\\"registry\\\":true,\\\"raw\\\":\\\"geoportal-access-lib@3.3.2\\\",\\\"name\\\":\\\"geoportal-access-lib\\\",\\\"escapedName\\\":\\\"geoportal-access-lib\\\",\\\"rawSpec\\\":\\\"3.3.2\\\",\\\"saveSpec\\\":null,\\\"fetchSpec\\\":\\\"3.3.2\\\"},\\\"_requiredBy\\\":[\\\"/\\\"],\\\"_resolved\\\":\\\"https://registry.npmjs.org/geoportal-access-lib/-/geoportal-access-lib-3.3.2.tgz\\\",\\\"_shasum\\\":\\\"1b78a3eea7edf97f78af7aaec49f259d9753501a\\\",\\\"_spec\\\":\\\"geoportal-access-lib@3.3.2\\\",\\\"_where\\\":\\\"/home/runner/work/geoportal-extensions/geoportal-extensions\\\",\\\"author\\\":{\\\"name\\\":\\\"IGNF\\\"},\\\"bugs\\\":{\\\"url\\\":\\\"https://github.com/IGNF/geoportal-access-lib/issues\\\"},\\\"bundleDependencies\\\":false,\\\"date\\\":\\\"20/07/2023\\\",\\\"dependencies\\\":{\\\"es6-promise\\\":\\\"^4.2.4\\\",\\\"node-fetch\\\":\\\"^2.6.1\\\",\\\"xmldom\\\":\\\"^0.1.27\\\"},\\\"deprecated\\\":false,\\\"description\\\":\\\"French Geoportal resources access library\\\",\\\"devDependencies\\\":{\\\"@babel/core\\\":\\\"^7.12.10\\\",\\\"@babel/plugin-transform-template-literals\\\":\\\"^7.12.1\\\",\\\"@babel/preset-env\\\":\\\"^7.12.11\\\",\\\"babel-loader\\\":\\\"^8.2.2\\\",\\\"chai\\\":\\\"^4.1.2\\\",\\\"clean-webpack-plugin\\\":\\\"^3.0.0\\\",\\\"copy-webpack-plugin\\\":\\\"^5.1.2\\\",\\\"eslint\\\":\\\"^7.18.0\\\",\\\"eslint-config-standard\\\":\\\"^16.0.2\\\",\\\"eslint-loader\\\":\\\"^4.0.2\\\",\\\"eslint-plugin-import\\\":\\\"^2.22.1\\\",\\\"eslint-plugin-node\\\":\\\"^11.1.0\\\",\\\"eslint-plugin-promise\\\":\\\"^4.2.1\\\",\\\"eslint-plugin-standard\\\":\\\"^5.0.0\\\",\\\"glob\\\":\\\"^7.1.2\\\",\\\"handlebars-layouts\\\":\\\"^3.1.4\\\",\\\"handlebars-webpack-plugin\\\":\\\"^1.4.1\\\",\\\"html-webpack-plugin\\\":\\\"^4.5.1\\\",\\\"istanbul-instrumenter-loader\\\":\\\"^3.0.1\\\",\\\"jsdoc-webpack-plugin\\\":\\\"^0.3.0\\\",\\\"loglevel\\\":\\\"^1.6.1\\\",\\\"mocha\\\":\\\"^7.2.0\\\",\\\"mocha-loader\\\":\\\"^5.1.5\\\",\\\"mocha-webpack\\\":\\\"^2.0.0-beta.0\\\",\\\"mochawesome\\\":\\\"^6.2.1\\\",\\\"nyc\\\":\\\"^15.1.0\\\",\\\"path\\\":\\\"^0.12.7\\\",\\\"replace-bundle-webpack-plugin\\\":\\\"^1.0.0\\\",\\\"sinon\\\":\\\"^9.2.4\\\",\\\"sinon-es6\\\":\\\"0.0.3\\\",\\\"speed-measure-webpack-plugin\\\":\\\"^1.4.2\\\",\\\"string-template\\\":\\\"^1.0.0\\\",\\\"terser-webpack-plugin\\\":\\\"^2.3.8\\\",\\\"webpack\\\":\\\"^4.46.0\\\",\\\"webpack-cli\\\":\\\"^3.3.12\\\",\\\"webpack-dev-server\\\":\\\"^3.11.2\\\",\\\"webpack-node-externals\\\":\\\"^2.5.2\\\",\\\"webpack-shell-plugin\\\":\\\"^0.5.0\\\"},\\\"homepage\\\":\\\"https://github.com/IGNF/geoportal-access-lib#readme\\\",\\\"keywords\\\":[\\\"geoportail\\\",\\\"webservice\\\",\\\"javascript\\\",\\\"es6\\\"],\\\"license\\\":\\\"CECILL-B\\\",\\\"main\\\":\\\"dist/GpServices-src.js\\\",\\\"module\\\":\\\"src/Gp.js\\\",\\\"name\\\":\\\"geoportal-access-lib\\\",\\\"nyc\\\":{\\\"include\\\":[\\\"src/**/*.js\\\"],\\\"instrument\\\":false,\\\"sourceMap\\\":false},\\\"optionalDependencies\\\":{},\\\"peerDependencies\\\":{},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"git+https://github.com/IGNF/geoportal-access-lib.git\\\"},\\\"scripts\\\":{\\\"build\\\":\\\"webpack --mode=none\\\",\\\"build:dev\\\":\\\"webpack --mode=development\\\",\\\"build:prod\\\":\\\"webpack --mode=production\\\",\\\"clean\\\":\\\"echo \\\\\\\"Warning: no yet implemented!\\\\\\\" && exit 0\\\",\\\"cover\\\":\\\"nyc --reporter=lcov --reporter=text npm run test\\\",\\\"doc\\\":\\\"npm run doc:serve\\\",\\\"doc:serve\\\":\\\"webpack-dev-server --content-base jsdoc --port 9001 --open\\\",\\\"eslint\\\":\\\"eslint src/\\\",\\\"sample\\\":\\\"npm run sample:serve\\\",\\\"sample:serve\\\":\\\"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"sample:serve:dev\\\":\\\"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"sample:serve:prod\\\":\\\"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"setup\\\":\\\"npm install\\\",\\\"test\\\":\\\"mocha-webpack --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob \\\\\\\"test_*.js\\\\\\\" test/spec/\\\",\\\"test:end-to-end:serve\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js\\\",\\\"test:end-to-end:serve:docker\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js\\\",\\\"test:serve\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js\\\",\\\"test:serve:docker\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js\\\"},\\\"version\\\":\\\"3.3.2\\\"}\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiIuL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9wYWNrYWdlLmpzb24uanMiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/package.json\n"); +eval("module.exports = JSON.parse(\"{\\\"_from\\\":\\\"geoportal-access-lib@3.3.4\\\",\\\"_id\\\":\\\"geoportal-access-lib@3.3.4\\\",\\\"_inBundle\\\":false,\\\"_integrity\\\":\\\"sha512-0D0YT93mRjhm7tvKC7tM0V/10CoftWqZ836AR/O79BEUwSk/CicmE85IK5NLh/sFclQX8hvaYexpn3ZetVbJWg==\\\",\\\"_location\\\":\\\"/geoportal-access-lib\\\",\\\"_phantomChildren\\\":{},\\\"_requested\\\":{\\\"type\\\":\\\"version\\\",\\\"registry\\\":true,\\\"raw\\\":\\\"geoportal-access-lib@3.3.4\\\",\\\"name\\\":\\\"geoportal-access-lib\\\",\\\"escapedName\\\":\\\"geoportal-access-lib\\\",\\\"rawSpec\\\":\\\"3.3.4\\\",\\\"saveSpec\\\":null,\\\"fetchSpec\\\":\\\"3.3.4\\\"},\\\"_requiredBy\\\":[\\\"/\\\"],\\\"_resolved\\\":\\\"https://registry.npmjs.org/geoportal-access-lib/-/geoportal-access-lib-3.3.4.tgz\\\",\\\"_shasum\\\":\\\"5a82701a7c12c54a40c4d0b5f2aa145acb22a434\\\",\\\"_spec\\\":\\\"geoportal-access-lib@3.3.4\\\",\\\"_where\\\":\\\"/home/runner/work/geoportal-extensions/geoportal-extensions\\\",\\\"author\\\":{\\\"name\\\":\\\"IGNF\\\"},\\\"bugs\\\":{\\\"url\\\":\\\"https://github.com/IGNF/geoportal-access-lib/issues\\\"},\\\"bundleDependencies\\\":false,\\\"date\\\":\\\"29/08/2023\\\",\\\"dependencies\\\":{\\\"es6-promise\\\":\\\"^4.2.4\\\",\\\"node-fetch\\\":\\\"^2.6.1\\\",\\\"xmldom\\\":\\\"^0.1.27\\\"},\\\"deprecated\\\":false,\\\"description\\\":\\\"French Geoportal resources access library\\\",\\\"devDependencies\\\":{\\\"@babel/core\\\":\\\"^7.12.10\\\",\\\"@babel/plugin-transform-template-literals\\\":\\\"^7.12.1\\\",\\\"@babel/preset-env\\\":\\\"^7.12.11\\\",\\\"babel-loader\\\":\\\"^8.2.2\\\",\\\"chai\\\":\\\"^4.1.2\\\",\\\"clean-webpack-plugin\\\":\\\"^3.0.0\\\",\\\"copy-webpack-plugin\\\":\\\"^5.1.2\\\",\\\"eslint\\\":\\\"^7.18.0\\\",\\\"eslint-config-standard\\\":\\\"^16.0.2\\\",\\\"eslint-loader\\\":\\\"^4.0.2\\\",\\\"eslint-plugin-import\\\":\\\"^2.22.1\\\",\\\"eslint-plugin-node\\\":\\\"^11.1.0\\\",\\\"eslint-plugin-promise\\\":\\\"^4.2.1\\\",\\\"eslint-plugin-standard\\\":\\\"^5.0.0\\\",\\\"glob\\\":\\\"^7.1.2\\\",\\\"handlebars-layouts\\\":\\\"^3.1.4\\\",\\\"handlebars-webpack-plugin\\\":\\\"^1.4.1\\\",\\\"html-webpack-plugin\\\":\\\"^4.5.1\\\",\\\"istanbul-instrumenter-loader\\\":\\\"^3.0.1\\\",\\\"jsdoc-webpack-plugin\\\":\\\"^0.3.0\\\",\\\"loglevel\\\":\\\"^1.6.1\\\",\\\"mocha\\\":\\\"^7.2.0\\\",\\\"mocha-loader\\\":\\\"^5.1.5\\\",\\\"mocha-webpack\\\":\\\"^2.0.0-beta.0\\\",\\\"mochawesome\\\":\\\"^6.2.1\\\",\\\"nyc\\\":\\\"^15.1.0\\\",\\\"path\\\":\\\"^0.12.7\\\",\\\"replace-bundle-webpack-plugin\\\":\\\"^1.0.0\\\",\\\"sinon\\\":\\\"^9.2.4\\\",\\\"sinon-es6\\\":\\\"0.0.3\\\",\\\"speed-measure-webpack-plugin\\\":\\\"^1.4.2\\\",\\\"string-template\\\":\\\"^1.0.0\\\",\\\"terser-webpack-plugin\\\":\\\"^2.3.8\\\",\\\"webpack\\\":\\\"^4.46.0\\\",\\\"webpack-cli\\\":\\\"^3.3.12\\\",\\\"webpack-dev-server\\\":\\\"^3.11.2\\\",\\\"webpack-node-externals\\\":\\\"^2.5.2\\\",\\\"webpack-shell-plugin\\\":\\\"^0.5.0\\\"},\\\"homepage\\\":\\\"https://github.com/IGNF/geoportal-access-lib#readme\\\",\\\"keywords\\\":[\\\"geoportail\\\",\\\"webservice\\\",\\\"javascript\\\",\\\"es6\\\"],\\\"license\\\":\\\"CECILL-B\\\",\\\"main\\\":\\\"dist/GpServices-src.js\\\",\\\"module\\\":\\\"src/Gp.js\\\",\\\"name\\\":\\\"geoportal-access-lib\\\",\\\"nyc\\\":{\\\"include\\\":[\\\"src/**/*.js\\\"],\\\"instrument\\\":false,\\\"sourceMap\\\":false},\\\"optionalDependencies\\\":{},\\\"peerDependencies\\\":{},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"git+https://github.com/IGNF/geoportal-access-lib.git\\\"},\\\"scripts\\\":{\\\"build\\\":\\\"webpack --mode=none\\\",\\\"build:dev\\\":\\\"webpack --mode=development\\\",\\\"build:prod\\\":\\\"webpack --mode=production\\\",\\\"clean\\\":\\\"echo \\\\\\\"Warning: no yet implemented!\\\\\\\" && exit 0\\\",\\\"cover\\\":\\\"nyc --reporter=lcov --reporter=text npm run test\\\",\\\"doc\\\":\\\"npm run doc:serve\\\",\\\"doc:serve\\\":\\\"webpack-dev-server --content-base jsdoc --port 9001 --open\\\",\\\"eslint\\\":\\\"eslint src/\\\",\\\"sample\\\":\\\"npm run sample:serve\\\",\\\"sample:serve\\\":\\\"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"sample:serve:dev\\\":\\\"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"sample:serve:prod\\\":\\\"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"setup\\\":\\\"npm install\\\",\\\"test\\\":\\\"mocha-webpack --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob \\\\\\\"test_*.js\\\\\\\" test/spec/\\\",\\\"test:end-to-end:serve\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js\\\",\\\"test:end-to-end:serve:docker\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js\\\",\\\"test:serve\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js\\\",\\\"test:serve:docker\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js\\\"},\\\"version\\\":\\\"3.3.4\\\"}\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiIuL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9wYWNrYWdlLmpzb24uanMiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/package.json\n"); /***/ }), @@ -491,7 +491,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _ConfigInterface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConfigInterface */ \"./node_modules/geoportal-access-lib/src/Services/Config/ConfigInterface.js\");\n\n\n\n\n\n\n/**\n * @classdesc\n *\n * Recupération de la configuration de clés Géoportail sous forme de JSON\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Config\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n * @param {Sting} options.apiKey - clé(s) dont on veut obtenir la configuration. Si plusieurs clés, séparer chacune par une virgule\n * @param {Boolean} [options.sync=false] - force le mode synchrone\n * @param {String} options.customConfigFile - chemin vers un fichier de configuration personnalisé. Surcharge le paramètre apiKey.\n *\n * @example\n * var options = {\n * apiKey : \"cartes,ortho\",\n * sync : false,\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * };\n *\n */\nfunction Config (options) {\n if (!(this instanceof Config)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Config\"));\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"Config\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Config\");\n this.logger.trace(\"[Constructeur Config (options)]\");\n\n // #####################\n // analyse des options\n // #####################\n\n // gestion du callback onSuccess\n var bOnSuccess = !!(options.onSuccess !== null && typeof options.onSuccess === \"function\");\n if (!bOnSuccess) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"onSuccess()\"));\n }\n if (!options.apiKey && !options.customConfigFile) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"apiKey\", \"customConfigFile\"));\n }\n this.options = {};\n this.options.onSuccess = options.onSuccess;\n this.options.onFailure = options.onFailure;\n\n // mode sync\n this.options.sync = options.sync || false;\n\n // gestion d'un tableau d'url des fichiers de configuration\n this.options.listConfigUrls = (options.customConfigFile) ? [options.customConfigFile] : _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Config.url(options.apiKey.split(\",\"));\n}\n\n/**\n * @lends module:Config#\n */\nConfig.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/**\n * Constructeur (alias)\n */\nConfig.prototype.constructor = Config;\n\n/**\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.buildRequest = function (error, success) {\n // liste des urls des fichiers de configuration en JSON\n this.listConfigUrls = this.options.listConfigUrls;\n\n if (!this.listConfigUrls) {\n error.call(this, new Error(\"url by default not found !\"));\n return;\n }\n\n // INFO :\n // il n'y a pas de construction de requête,\n // on passe directement à l'appel des requêtes\n success.call(this, this.listConfigUrls);\n};\n\n/**\n * Récupération des configuration\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.callService = function (error, success) {\n if (this.options.sync) {\n __callServiceSync.call(this, error, success);\n } else {\n __callService.call(this, error, success);\n }\n};\n\n/**\n * Requêtes en mode asynchrone\n *\n * @param {*} error\n * @param {*} success\n * @private\n */\nvar __callService = function (error, success) {\n // liste des resultats au format JSON\n this.listConfigResults = [];\n\n // test on env. nodejs or browser\n let Fetch = null;\n if (typeof window === \"undefined\") {\n var nodefetch = __webpack_require__(/*! node-fetch */ \"node-fetch\");\n Fetch = nodefetch;\n } else {\n Fetch = window.fetch;\n }\n\n // the factory of fetch !\n var fetchFactory = (url) => {\n return Fetch(url, { credentials : \"same-origin\" })\n .then((response) => {\n if (response.ok) {\n return response.json()\n .then((json) => {\n // TODO :\n // tester le contenu !\n return json;\n })\n .catch((error) => {\n throw new Error(\"Exception Json : \" + error);\n });\n } else {\n throw new Error(\"Exception HTTP : \" + response.status + \" (status code) !\");\n }\n })\n .catch((error) => {\n return new Promise((resolve, reject) => {\n // eslint-disable-line no-unused-vars\n reject(error);\n });\n });\n };\n\n // construction des promises fetch\n var promises = [];\n for (let index = 0; index < this.listConfigUrls.length; index++) {\n const url = this.listConfigUrls[index];\n promises.push(fetchFactory(url));\n }\n\n Promise.all(promises)\n .then((results) => {\n if (!results) {\n throw new Error(\"results config empty !?\");\n }\n results.forEach((result) => {\n // TODO :\n // verification des resultats\n this.listConfigResults.push(result);\n });\n })\n .then(() => {\n success.call(this, this.listConfigResults);\n })\n .catch((e) => {\n // TODO :\n // construction d'un message\n error.call(this, e);\n });\n};\n\n/**\n * Requêtes en mode synchrone\n *\n * @param {*} error\n * @param {*} success\n * @private\n */\nvar __callServiceSync = function (error, success) {\n // liste des resultats au format JSON\n this.listConfigResults = [];\n\n // FIXME :\n // boucle synchrone !\n for (var i = 0; i < this.listConfigUrls.length; i++) {\n const url = this.listConfigUrls[i];\n // TODO :\n // prévoir le CORS, headers, ...\n const request = new XMLHttpRequest();\n request.open(\"GET\", url, false);\n request.send(null);\n if (request.status === 200) {\n // TODO :\n // tester la reponse !\n var response = JSON.parse(request.responseText);\n this.listConfigResults.push(response);\n }\n }\n // callback\n if (this.listConfigResults.length !== 0) {\n success.call(this, this.listConfigResults);\n } else {\n error.call(this, new Error(\"...\"));\n }\n};\n\n/**\n * Analyse et mise en forme de la réponse en fusionnant les configurations\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.analyzeResponse = function (error, success) {\n // fonction de merge des objects JSON\n var mergeConfig = function (objects) {\n // objet fusion des couches\n var allLayersConfig = {};\n // objet fusion des clés\n var allKeysConfig = {};\n // objet fusion des TMS\n var allTMSConfig = {};\n\n // on fusionne les résultat\n for (var i = 0; i < objects.length; i++) {\n if (!objects[i].generalOptions || !objects[i].layers) {\n return;\n }\n allKeysConfig = {\n ...allKeysConfig,\n ...objects[i].generalOptions.apiKeys\n };\n allLayersConfig = {\n ...allLayersConfig,\n ...objects[i].layers\n };\n allTMSConfig = {\n ...allTMSConfig,\n ...objects[i].tileMatrixSets\n };\n }\n\n var mergedConfig = {\n generalOptions : {\n apiKeys : allKeysConfig\n },\n layers : allLayersConfig,\n tileMatrixSets : allTMSConfig\n };\n return mergedConfig;\n };\n\n // fusion des configurations JSON\n var ConfigJSON = mergeConfig(this.listConfigResults);\n if (!ConfigJSON) {\n error.call(this, new Error(\"configuration structure not conforme !\"));\n return;\n }\n\n // creation des interfaces\n var IConfig = new _ConfigInterface__WEBPACK_IMPORTED_MODULE_4__[\"default\"]();\n // ajout des interfaces avec la configuration JSON\n Object.assign(IConfig, ConfigJSON);\n\n // définition de la variable globale Gp.Config\n var scope = typeof window !== \"undefined\" ? window : {};\n if (!scope.Gp) {\n scope.Gp = {};\n }\n\n // enregistrement\n if (scope.Gp.Config) {\n Object.assign(scope.Gp.Config, IConfig);\n // dans le doute..., ceinture et bretelles !\n for (var property in IConfig) {\n scope.Gp.Config[property] = IConfig[property];\n }\n } else {\n scope.Gp.Config = IConfig;\n }\n\n // INFO :\n // il n'y a pas d'analyse des résultats,\n // on passe directement à l'appel de la callback utilisateur\n success.call(this, scope.Gp.Config);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Config);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQ29uZmlnL0NvbmZpZy5qcz9lZjhmIl0sIm5hb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AgIC50aGVuKChqc29uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVE9ETyA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGVzdGVyIGxlIGNvbnRlbnUgIVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBqc29uO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIC5jYXRjaCgoZXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJFeGNlcHRpb24gSnNvbiA6IFwiICsgZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRXhjZXB0aW9uIEhUVFAgOiBcIiArIHJlc3BvbnNlLnN0YXR1cyArIFwiIChzdGF0dXMgY29kZSkgIVwiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhdGNoKChlcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGVzbGludC1kaXNhYmxlLWxpbmUgbm8tdW51c2VkLXZhcnNcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgIH07XG5cbiAgICAvLyBjb25zdHJ1Y3Rpb24gZGVzIHByb21pc2VzIGZldGNoXG4gICAgdmFyIHByb21pc2VzID0gW107XG4gICAgZm9yIChsZXQgaW5kZXggPSAwOyBpbmRleCA8IHRoaXMubGlzdENvbmZpZ1VybHMubGVuZ3RoOyBpbmRleCsrKSB7XG4gICAgICAgIGNvbnN0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xLZXlzQ29uZmlnLFxuICAgICAgICAgICAgICAgIC4uLm9iamVjdHNbaV0uZ2VuZXJhbE9wdGlvbnMuYXBpS2V5c1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGFsbExheWVyc0NvbmZpZyA9IHtcbiAgICAgICAgICAgICAgICAuLi5hbGxMYXllcnNDb25maWcsXG4gICAgICAgICAgICAgICAgLi4ub2JqZWN0c1tpXS5sYXllcnNcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBhbGxUTVNDb25maWcgPSB7XG4gICAgICAgICAgICAgICAgLi4uYWxsVE1TQ29uZmlnLFxuICAgICAgICAgICAgICAgIC4uLm9iamVjdHNbaV0udGlsZU1hdHJpeFNldHNcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgbWVyZ2VkQ29uZmlnID0ge1xuICAgICAgICAgICAgZ2VuZXJhbE9wdGlvbnMgOiB7XG4gICAgICAgICAgICAgICAgYXBpS2V5cyA6IGFsbEtleXNDb25maWdcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBsYXllcnMgOiBhbGxMYXllcnNDb25maWcsXG4gICAgICAgICAgICB0aWxlTWF0cml4U2V0cyA6IGFsbFRNU0NvbmZpZ1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gbWVyZ2VkQ29uZmlnO1xuICAgIH07XG5cbiAgICAvLyBmdXNpb24gZGVzIGNvbmZpZ3VyYXRpb25zIEpTT05cbiAgICB2YXIgQ29uZmlnSlNPTiA9IG1lcmdlQ29uZmlnKHRoaXMubGlzdENvbmZpZ1Jlc3VsdHMpO1xuICAgIGlmICghQ29uZmlnSlNPTikge1xuICAgICAgICBlcnJvci5jYWxsKHRoaXMsIG5ldyBFcnJvcihcImNvbmZpZ3VyYXRpb24gc3RydWN0dXJlIG5vdCBjb25mb3JtZSAhXCIpKTtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIC8vIGNyZWF0aW9uIGRlcyBpbnRlcmZ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ZGVmYXVsdCBDb25maWc7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Config/Config.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _ConfigInterface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConfigInterface */ \"./node_modules/geoportal-access-lib/src/Services/Config/ConfigInterface.js\");\n\n\n\n\n\n\n/**\n * @classdesc\n *\n * Recupération de la configuration de clés Géoportail sous forme de JSON\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Config\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n * @param {Sting} options.apiKey - clé(s) dont on veut obtenir la configuration. Si plusieurs clés, séparer chacune par une virgule\n * @param {Boolean} [options.sync=false] - force le mode synchrone\n * @param {String} options.customConfigFile - chemin vers un fichier de configuration personnalisé. Surcharge le paramètre apiKey.\n *\n * @example\n * var options = {\n * apiKey : \"cartes,ortho\",\n * sync : false,\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * };\n *\n */\nfunction Config (options) {\n if (!(this instanceof Config)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Config\"));\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"Config\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Config\");\n this.logger.trace(\"[Constructeur Config (options)]\");\n\n // #####################\n // analyse des options\n // #####################\n\n // gestion du callback onSuccess\n var bOnSuccess = !!(options.onSuccess !== null && typeof options.onSuccess === \"function\");\n if (!bOnSuccess) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"onSuccess()\"));\n }\n if (!options.apiKey && !options.customConfigFile) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"apiKey\", \"customConfigFile\"));\n }\n this.options = {};\n this.options.onSuccess = options.onSuccess;\n this.options.onFailure = options.onFailure;\n\n // mode sync\n this.options.sync = options.sync || false;\n\n // gestion d'un tableau d'url des fichiers de configuration\n this.options.listConfigUrls = (options.customConfigFile)\n ? [options.customConfigFile]\n : !Array.isArray(options.apiKey)\n ? _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Config.url(options.apiKey.split(\",\"))\n : _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Config.url(options.apiKey);\n}\n\n/**\n * @lends module:Config#\n */\nConfig.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/**\n * Constructeur (alias)\n */\nConfig.prototype.constructor = Config;\n\n/**\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.buildRequest = function (error, success) {\n // liste des urls des fichiers de configuration en JSON\n this.listConfigUrls = this.options.listConfigUrls;\n\n if (!this.listConfigUrls) {\n error.call(this, new Error(\"url by default not found !\"));\n return;\n }\n\n // INFO :\n // il n'y a pas de construction de requête,\n // on passe directement à l'appel des requêtes\n success.call(this, this.listConfigUrls);\n};\n\n/**\n * Récupération des configuration\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.callService = function (error, success) {\n if (this.options.sync) {\n __callServiceSync.call(this, error, success);\n } else {\n __callService.call(this, error, success);\n }\n};\n\n/**\n * Requêtes en mode asynchrone\n *\n * @param {*} error\n * @param {*} success\n * @private\n */\nvar __callService = function (error, success) {\n // liste des resultats au format JSON\n this.listConfigResults = [];\n\n // test on env. nodejs or browser\n let Fetch = null;\n if (typeof window === \"undefined\") {\n var nodefetch = __webpack_require__(/*! node-fetch */ \"node-fetch\");\n Fetch = nodefetch;\n } else {\n Fetch = window.fetch;\n }\n\n // the factory of fetch !\n var fetchFactory = (url) => {\n return Fetch(url, { credentials : \"same-origin\" })\n .then((response) => {\n if (response.ok) {\n return response.json()\n .then((json) => {\n // TODO :\n // tester le contenu !\n return json;\n })\n .catch((error) => {\n throw new Error(\"Exception Json : \" + error);\n });\n } else {\n throw new Error(\"Exception HTTP : \" + response.status + \" (status code) !\");\n }\n })\n .catch((error) => {\n return new Promise((resolve, reject) => {\n // eslint-disable-line no-unused-vars\n reject(error);\n });\n });\n };\n\n // construction des promises fetch\n var promises = [];\n for (let index = 0; index < this.listConfigUrls.length; index++) {\n const url = this.listConfigUrls[index];\n promises.push(fetchFactory(url));\n }\n\n Promise.all(promises)\n .then((results) => {\n if (!results) {\n throw new Error(\"results config empty !?\");\n }\n results.forEach((result) => {\n // TODO :\n // verification des resultats\n this.listConfigResults.push(result);\n });\n })\n .then(() => {\n success.call(this, this.listConfigResults);\n })\n .catch((e) => {\n // TODO :\n // construction d'un message\n error.call(this, e);\n });\n};\n\n/**\n * Requêtes en mode synchrone\n *\n * @param {*} error\n * @param {*} success\n * @private\n */\nvar __callServiceSync = function (error, success) {\n // liste des resultats au format JSON\n this.listConfigResults = [];\n\n // FIXME :\n // boucle synchrone !\n for (var i = 0; i < this.listConfigUrls.length; i++) {\n const url = this.listConfigUrls[i];\n // TODO :\n // prévoir le CORS, headers, ...\n const request = new XMLHttpRequest();\n request.open(\"GET\", url, false);\n request.send(null);\n if (request.status === 200) {\n // TODO :\n // tester la reponse !\n var response = JSON.parse(request.responseText);\n this.listConfigResults.push(response);\n }\n }\n // callback\n if (this.listConfigResults.length !== 0) {\n success.call(this, this.listConfigResults);\n } else {\n error.call(this, new Error(\"...\"));\n }\n};\n\n/**\n * Analyse et mise en forme de la réponse en fusionnant les configurations\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.analyzeResponse = function (error, success) {\n // fonction de merge des objects JSON\n var mergeConfig = function (objects) {\n // objet fusion des couches\n var allLayersConfig = {};\n // objet fusion des clés\n var allKeysConfig = {};\n // objet fusion des TMS\n var allTMSConfig = {};\n\n // on fusionne les résultat\n for (var i = 0; i < objects.length; i++) {\n if (!objects[i].generalOptions || !objects[i].layers) {\n return;\n }\n allKeysConfig = {\n ...allKeysConfig,\n ...objects[i].generalOptions.apiKeys\n };\n allLayersConfig = {\n ...allLayersConfig,\n ...objects[i].layers\n };\n allTMSConfig = {\n ...allTMSConfig,\n ...objects[i].tileMatrixSets\n };\n }\n\n var mergedConfig = {\n generalOptions : {\n apiKeys : allKeysConfig\n },\n layers : allLayersConfig,\n tileMatrixSets : allTMSConfig\n };\n return mergedConfig;\n };\n\n // fusion des configurations JSON\n var ConfigJSON = mergeConfig(this.listConfigResults);\n if (!ConfigJSON) {\n error.call(this, new Error(\"configuration structure not conforme !\"));\n return;\n }\n\n // creation des interfaces\n var IConfig = new _ConfigInterface__WEBPACK_IMPORTED_MODULE_4__[\"default\"]();\n // ajout des interfaces avec la configuration JSON\n Object.assign(IConfig, ConfigJSON);\n\n // définition de la variable globale Gp.Config\n var scope = typeof window !== \"undefined\" ? window : {};\n if (!scope.Gp) {\n scope.Gp = {};\n }\n\n // enregistrement\n if (scope.Gp.Config) {\n Object.assign(scope.Gp.Config, IConfig);\n // dans le doute..., ceinture et bretelles !\n for (var property in IConfig) {\n scope.Gp.Config[property] = IConfig[property];\n }\n } else {\n scope.Gp.Config = IConfig;\n }\n\n // INFO :\n // il n'y a pas d'analyse des résultats,\n // on passe directement à l'appel de la callback utilisateur\n success.call(this, scope.Gp.Config);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Config);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQ29uZmlnL0NvbmZpZy5qcz9lZjhmIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFpRDtBQUNIO0FBQ0Q7QUFDUTtBQUNMOztBQUVoRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxhQUFhO0FBQ2I7QUFDQSxXQUFXLE9BQU87QUFDbEIsV0FBVyxNQUFNO0FBQ2pCLFdBQVcsUUFBUTtBQUNuQixXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDBDQUEwQztBQUMxQyx1Q0FBdUM7QUFDdkM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDRCQUE0QixnRUFBQztBQUM3Qjs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxrQkFBa0IsOERBQU07QUFDeEI7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLHdCQUF3QixnRUFBQztBQUN6QjtBQUNBO0FBQ0Esd0JBQXdCLGdFQUFDO0FBQ3pCO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0F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5vZGVqcyBvciBicm93c2VyXG4gICAgbGV0IEZldGNoID0gbnVsbDtcbiAgICBpZiAodHlwZW9mIHdpbmRvdyA9PT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICB2YXIgbm9kZWZldGNoID0gcmVxdWlyZShcIm5vZGUtZmV0Y2hcIik7XG4gICAgICAgIEZldGNoID0gbm9kZWZldGNoO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIEZldGNoID0gd2luZG93LmZldGNoO1xuICAgIH1cblxuICAgIC8vIHRoZSBmYWN0b3J5IG9mIGZldGNoICFcbiAgICB2YXIgZmV0Y2hGYWN0b3J5ID0gKHVybCkgPT4ge1xuICAgICAgICByZXR1cm4gRmV0Y2godXJsLCB7IGNyZWRlbnRpYWxzIDogXCJzYW1lLW9yaWdpblwiIH0pXG4gICAgICAgICAgICAudGhlbigocmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uub2spIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmpzb24oKVxuICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4oKGpzb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPIDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB0ZXN0ZXIgbGUgY29udGVudSAhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGpzb247XG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgLmNhdGNoKChlcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkV4Y2VwdGlvbiBKc29uIDogXCIgKyBlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJFeGNlcHRpb24gSFRUUCA6IFwiICsgcmVzcG9uc2Uuc3RhdHVzICsgXCIgKHN0YXR1cyBjb2RlKSAhXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2F0Y2goKGVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby11bnVzZWQtdmFyc1xuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgfTtcblxuICAgIC8vIGNvbnN0cnVjdGlvbiBkZXMgcHJvbWlzZXMgZmV0Y2hcbiAgICB2YXIgcHJvbWlzZXMgPSBbXTtcbiAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgdGhpcy5saXN0Q29uZmlnVXJscy5sZW5ndGg7IGluZGV4KyspIHtcbiAgICAgICAgY29uc3QgdXJsID0gdGhpcy5saXN0Q29uZmlnVXJsc1tpbmRleF07XG4gICAgICAgIHByb21pc2VzLnB1c2goZmV0Y2hGYWN0b3J5KHVybCkpO1xuICAgIH1cblxuICAgIFByb21pc2UuYWxsKHByb21pc2VzKVxuICAgICAgICAudGhlbigocmVzdWx0cykgPT4ge1xuICAgICAgICAgICAgaWYgKCFyZXN1bHRzKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwicmVzdWx0cyBjb25maWcgZW1wdHkgIT9cIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXN1bHRzLmZvckVhY2goKHJlc3VsdCkgPT4ge1xuICAgICAgICAgICAgICAgIC8vIFRPRE8gOlxuICAgICAgICAgICAgICAgIC8vIHZlcmlmaWNhdGlvbiBkZXMgcmVzdWx0YXRzXG4gICAgICAgICAgICAgICAgdGhpc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y8gb2JqZXQgZnVzaW9uIGRlcyBjb3VjaGVzXG4gICAgICAgIHZhciBhbGxMYXllcnNDb25maWcgPSB7fTtcbiAgICAgICAgLy8gb2JqZXQgZnVzaW9uIGRlcyBjbMOpc1xuICAgICAgICB2YXIgYWxsS2V5c0NvbmZpZyA9IHt9O1xuICAgICAgICAvLyBvYmpldCBmdXNpb24gZGVzIFRNU1xuICAgICAgICB2YXIgYWxsVE1TQ29uZmlnID0ge307XG5cbiAgICAgICAgLy8gb24gZnVzaW9ubmUgbGVzIHLDqXN1bHRhdFxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IG9iamVjdHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGlmICghb2JqZWN0c1tpXS5nZW5lcmFsT3B0aW9ucyB8fCAhb2JqZWN0c1tpXS5sYXllcnMpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBhbGxLZXlzQ29uZmlnID0ge1xuICAgICAgICAgICAgICAgIC4uLmFsbEtleXNDb25maWcsXG4gICAgICAgICAgICAgICAgLi4ub2JqZWN0c1tpXS5nZW5lcmFsT3B0aW9ucy5hcGlLZXlzXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgYWxsTGF5ZXJzQ29uZmlnID0ge1xuICAgICAgICAgICAgICAgIC4uLmFsbExheWVyc0NvbmZpZyxcbiAgICAgICAgICAgICAgICAuLi5vYmplY3RzW2ldLmxheWVyc1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGFsbFRNU0NvbmZpZyA9IHtcbiAgICAgICAgICAgICAgICAuLi5hbGxUTVNDb25maWcsXG4gICAgICAgICAgICAgICAgLi4ub2JqZWN0c1tpXS50aWxlTWF0cml4U2V0c1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBtZXJnZWRDb25maWcgPSB7XG4gICAgICAgICAgICBnZW5lcmFsT3B0aW9ucyA6IHtcbiAgICA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vcGUuR3AuQ29uZmlnLCBJQ29uZmlnKTtcbiAgICAgICAgLy8gZGFucyBsZSBkb3V0ZS4uLiwgY2VpbnR1cmUgZXQgYnJldGVsbGVzICFcbiAgICAgICAgZm9yICh2YXIgcHJvcGVydHkgaW4gSUNvbmZpZykge1xuICAgICAgICAgICAgc2NvcGUuR3AuQ29uZmlnW3Byb3BlcnR5XSA9IElDb25maWdbcHJvcGVydHldO1xuICAgICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgICAgc2NvcGUuR3AuQ29uZmlnID0gSUNvbmZpZztcbiAgICB9XG5cbiAgICAvLyBJTkZPIDpcbiAgICAvLyBpbCBuJ3kgYSBwYXMgZCdhbmFseXNlIGRlcyByw6lzdWx0YXRzLFxuICAgIC8vIG9uIHBhc3NlIGRpcmVjdGVtZW50IMOgIGwnYXBwZWwgZGUgbGEgY2FsbGJhY2sgdXRpbGlzYXRldXJcbiAgICBzdWNjZXNzLmNhbGwodGhpcywgc2NvcGUuR3AuQ29uZmlnKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IENvbmZpZztcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Config/Config.js\n"); /***/ }), @@ -503,7 +503,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Response object for {@link module:Services~getConfig Gp.Services.getConfig ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Object} generalOptions - General properties for default map configuration resources.\n * @property {Object} generalOptions.apiKeys - Object that associates apiKey (s) with an array of resources IDs availables with that key.\n * @property {String} generalOptions.title - Underlying web service Title.\n * @property {String} generalOptions.defaultGMLGFIStyle - XSL URL used by default to translate an XML GetFeatureInfo response into an HTML array.\n * @property {String} generalOptions.theme - default theme (FIXME : for what ?)\n * @property {Array.} generalOptions.wgs84Resolutions - geographical resolutions Array for each [zoom level of the Geoportal platform]{@link http://api.ign.fr/tech-docs-js/webmaster/layers.html#Geoportal_resolutions} from 0 to 21. Expressed in degrees/pixel.\n * @property {Object} layers - Associative array mapping resources availables IDs (keys) with their properties (values given as {@link Gp.Services.Config.Layer}).\n * @property {Object} tileMatrixSets - Associative Array mapping TileMatrixSets IDs (keys) availables with their properties (values given as {@link Gp.Services.Config.TileMatrixSet}).\n *\n * @namespace\n * @alias Gp.Services.GetConfigInterface\n */\nfunction ConfigInterface () {\n if (!(this instanceof ConfigInterface)) {\n throw new TypeError(\"ConfigInterface constructor cannot be called as a function.\");\n }\n\n this.generalOptions = {\n apiKeys : {},\n title : null,\n defaultGMLGFIStyle : null,\n theme : null,\n wgs84Resolutions : []\n };\n\n this.layers = {};\n\n this.tileMatrixSets = {};\n}\n\nConfigInterface.prototype = {\n\n /*\n * Constructor (alias)\n */\n constructor : ConfigInterface,\n\n /**\n * Check if config is loaded for a given key\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Boolean} isKeyConfLoaded - true if config of the key is already loaded, false otherwise\n */\n isKeyConfLoaded : function (apiKey) {\n if (!apiKey) {\n return;\n }\n if (this.generalOptions.apiKeys[apiKey]) {\n return true;\n }\n return false;\n },\n\n /**\n * Returns an array of Geoportal layers identifiers, corresponding to an API contract key.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Array} apiKeys - Array of geoportal layers identifiers\n */\n getLayersId : function (apiKey) {\n return this.generalOptions.apiKeys[apiKey];\n },\n\n /**\n * Returns the id of a Geoportal layer with its name and its service.\n *\n * @param {String} layerName - name of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS\")\n * @param {String} service - name of the service (ex. \"WMS\" ou \"WMTS\")\n * @returns {String} Id of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS\")\n */\n getLayerId : function (layerName, service) {\n if (!layerName || !service) {\n return;\n }\n var layerId = null;\n\n // layer\n // key : [layerName]$[contexte]:OGC:[service]\n // ex : \"ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS\"\n\n // service\n // key : [layerName]$[contexte];[service]\n // ex : PositionOfInterest$OGC:OPENLS;ReverseGeocode\n\n if (this.layers) {\n var layers = this.layers;\n for (var key in layers) {\n if (layers.hasOwnProperty(key)) {\n var parts = key.split(\"$\");\n if (layerName === parts[0]) {\n if (parts[1]) {\n var servicePartsLayer = parts[1].split(\":\");\n var servicePartsService = parts[1].split(\";\");\n\n if (servicePartsService[1] === service.toUpperCase()) {\n layerId = key;\n break;\n }\n if (servicePartsLayer[2] === service.toUpperCase()) {\n layerId = key;\n break;\n }\n }\n }\n }\n }\n }\n if (!layerId) {\n return;\n }\n return layerId;\n },\n\n /**\n * Returns an associative array of Geoportal layers configurations, corresponding to an API contract key.\n * If no key is specified, all layers from configuration are returned.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Object} layers - Object which properties are layers identifiers.\n */\n getLayersConf : function (apiKey) {\n var layers = {};\n var layersIdArray = this.getLayersId(apiKey);\n if (layersIdArray) {\n for (var i = 0; i < layersIdArray.length; i++) {\n var lyrId = layersIdArray[i];\n layers[lyrId] = this.layers[lyrId];\n }\n }\n return layers;\n },\n\n /**\n * Returns a geoportal layer configuration, given its identifier\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @return {Object} layer - Layer configuration\n */\n getLayerConf : function (layerId) {\n if (!this.layers) {\n return;\n }\n return this.layers[layerId];\n },\n\n /**\n * Get all parameters needed to display a WMS or WMTS layer given its name, its service and its key\n *\n * @param {String} layerName - name of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS\")\n * @param {String} service - name of the service (ex. \"WMS\" ou \"WMTS\")\n * @param {String} [apiKey] - Contract API key\n * @returns {Object} params - params of the service (WMS or WMTS) for the given layer\n * @returns {String} params.url - Url of the service to reach to display the layer\n * @returns {String} params.version - Version of the service\n * @returns {String} params.styles - Default style of the layer\n * @returns {String} params.format - Default format of the layer\n * @returns {String} params.projection - Default projection of the layer\n * @returns {Number} params.minScale - Min scale denominator of the layer\n * @returns {Number} params.maxScale - Max scale denominator of the layer\n * @returns {Gp.BBox} params.extent - Extent of the layer, in the projection of the layer\n * @returns {Array} params.legends - Array of legends associated to the layer\n * @returns {Array} params.title - Name of the layer, readable by a human\n * @returns {Array} params.description - Description of the layer\n * @returns {String} params.[TMSLink] - Id of the Tile Matrix Set (TMS), in the case of WMTS layer\n * @returns {Gp.Point} params.[matrixOrigin] - Originof the tile matrix (top left corner), in the case of WMTS layer\n * @returns {Array} params.[nativeResolutions] - Array with the resolution of each level of the tile matrix set, in the case of WMTS layer\n * @returns {Array} params.[matrixIds] - Array with the ID of each level of the tile matrix set, in the case of WMTS layer\n */\n getLayerParams : function (layerName, service) {\n var params = {};\n\n if ((service === \"WMS\" || Object.keys(this.tileMatrixSets).length !== 0) && Object.keys(this.layers).length !== 0) {\n // get the layerId of the layer\n var layerId = this.getLayerId(layerName, service);\n\n if (layerId) {\n // get the layer Conf Object\n var layerConf = this.getLayerConf(layerId);\n\n var keys = this.getLayerKey(layerId);\n if (keys.length === 0) {\n return;\n }\n\n // get services params\n for (var i = 0; i < keys.length; i++) {\n // only one serverUrl is saved in Gp.Config : with multiKeys, we have to retrieve the key used in the serverUrl property\n if (layerConf.serviceParams.serverUrl[keys[i]]) {\n params.url = layerConf.serviceParams.serverUrl[keys[i]];\n }\n }\n\n const wmsTypeRegex = /\\/v\\//;\n // WMS vector style always empty (not in getCap)\n if (wmsTypeRegex.test(params.url)) {\n params.styles = \"\";\n } else {\n // WMS raster style is defined in getCap\n params.styles = layerConf.styles[0].name;\n }\n\n params.version = layerConf.serviceParams.version;\n params.format = layerConf.formats[0].name;\n params.projection = layerConf.defaultProjection;\n\n // get layer info and constraints\n params.minScale = layerConf.globalConstraint.minScaleDenominator;\n params.maxScale = layerConf.globalConstraint.maxScaleDenominator;\n params.extent = layerConf.globalConstraint.bbox;\n params.legends = layerConf.legends;\n params.title = layerConf.title;\n params.description = layerConf.description;\n\n if (service === \"WMS\") {\n params.metadata = layerConf.metadata;\n }\n\n // Informations non disponibles avec les getCap\n // params.metadata = layerConf.getMetadata();\n // params.originators = layerConf.getOriginators();\n // params.quicklookUrl = layerConf.getQuicklookUrl();\n\n // WMTS : get the tileMatrixSetLimits\n if (layerConf.wmtsOptions) {\n params.tileMatrixSetLimits = layerConf.wmtsOptions.tileMatrixSetLimits;\n var TMSLink = layerConf.wmtsOptions.tileMatrixSetLink;\n if (TMSLink) {\n params.TMSLink = TMSLink;\n var tmsConf = this.getTMSConf(TMSLink);\n // Get matrix origin : Gp.Point = Object{x:Float, y:Float}\n // params.matrixOrigin = tmsConf.getTopLeftCorner();\n params.matrixIds = Object.keys(tmsConf.tileMatrices);\n params.tileMatrices = tmsConf.tileMatrices;\n // by default, pseudo mercator resolutions\n params.nativeResolutions = tmsConf.nativeResolutions || this.getTMSConf(\"PM\").nativeResolutions;\n }\n }\n }\n }\n return params;\n },\n\n /**\n * Get the contract key(s) associated to a given layer.\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @return {Array} layerKey - array of key(s) associated to the given layer\n */\n getLayerKey : function (layerId) {\n var layerKey = [];\n if (this.generalOptions && this.generalOptions.apiKeys && Object.keys(this.generalOptions.apiKeys).length !== 0) {\n var resourcesByKey = this.generalOptions.apiKeys;\n for (var key in resourcesByKey) {\n var resourcesArray = resourcesByKey[key];\n resourcesArray.forEach(function (arrayLayerId) {\n if (arrayLayerId === layerId) {\n layerKey.push(key);\n }\n });\n }\n }\n return layerKey;\n },\n\n /**\n * Returns an associative array of Tile Matrix Sets configurations.\n *\n * @return {Object} tileMatrixSets - Object which properties are TMS identifiers\n *\n */\n getTileMatrixSets : function () {\n return this.tileMatrixSets;\n },\n\n /**\n * Returns a Tile Matrix Sets configuration, given its identifier.\n *\n * @param {String} tmsID - Tile Matrix Set identifier (e.g. : \"PM\")\n * @return {Object} tileMatrixSet - Tile Matrix Set configuration\n */\n getTMSConf : function (tmsID) {\n if (!this.tileMatrixSets) {\n return;\n }\n return this.tileMatrixSets[tmsID];\n },\n\n /**\n * Get global constraints for a given Layer : extent, minScale, maxScale, projection\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @returns {Object} params - layer constraints\n * @returns {String} params.projection - default layer projection\n * @returns {Number} params.minScale - layer min scale denominator\n * @returns {Number} params.maxScale - layer max scale denominator\n * @returns {Gp.BBox} params.extent - layer extent expressed in the layer projection\n */\n getGlobalConstraints : function (layerId) {\n var params = {};\n\n if (layerId) {\n // get layer configuration object\n var layerConf = this.getLayerConf(layerId);\n params.projection = layerConf.defaultProjection;\n params.minScale = layerConf.globalConstraint.minScaleDenominator;\n params.maxScale = layerConf.globalConstraint.maxScaleDenominator;\n params.extent = layerConf.globalConstraint.bbox;\n }\n\n return params;\n }\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ConfigInterface);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQ29uZmlnL0NvbmZpZ0ludGVyZmFjZS5qcz83NDM1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0E7QUFDQSx3QkFBd0IseURBQXlEO0FBQ2pGO0FBQ0EsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixjQUFjLE9BQU87QUFDckIsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixjQUFjLG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bGF5ZXJcbiAgICAgICAgLy8ga2V5IDogW2xheWVyTmFtZV0kW2NvbnRleHRlXTpPR0M6W3NlcnZpY2VdXG4gICAgICAgIC8vIGV4IDogXCJPUlRIT0lNQUdFUlkuT1JUSE9QSE9UT1MkR0VPUE9SVEFJTDpPR0M6V01UU1wiXG5cbiAgICAgICAgLy8gc2VydmljZVxuICAgICAgICAvLyBrZXkgOiBbbGF5ZXJOYW1lXSRbY29udGV4dGVdO1tzZXJ2aWNlXVxuICAgICAgICAvLyBleCA6IFBvc2l0aW9uT2ZJbnRlcmVzdCRPR0M6T1BFTkxTO1JldmVyc2VHZW9jb2RlXG5cbiAgICAgICAgaWYgKHRoaXMubGF5ZXJzKSB7XG4gICAgICAgICAgICB2YXIgbGF5ZXJzID0gdGhpcy5sYXllcnM7XG4gICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gbGF5ZXJzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxheWVycy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJ0cyA9IGtleS5zcGxpdChcIiRcIik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChsYXllck5hbWUgPT09IHBhcnRzWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFydHNbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgc2VydmljZVBhcnRzTGF5ZXIgPSBwYXJ0c1sxXS5zcGxpdChcIjpcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNlcnZpY2VQYXJ0c1NlcnZpY2UgPSBwYXJ0c1sxXS5zcGxpdChcIjtcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VydmljZVBhcnRzU2VydmljZVsxXSA9PT0gc2VydmljZS50b1VwcGVyQ2FzZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVySWQgPSBrZXk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VydmljZVBhcnRzTGF5ZXJbMl0gPT09IHNlcnZpY2UudG9VcHBlckNhc2UoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXllcklkID0ga2V5O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFsYXllcklkKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGxheWVySWQ7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgYW4gYXNzb2NpYXRpdmUgYXJyYXkgb2YgR2VvcG9ydGFsIGxheWVycyBjb25maWd1cmF0aW9ucywgY29ycmVzcG9uZGluZyB0byBhbiBBUEkgY29udHJhY3Qga2V5LlxuICAgICAqIElmIG5vIGtleSBpcyBzcGVjaWZpZWQsIGFsbCBsYXllcnMgZnJvbSBjb25maWd1cmF0aW9uIGFyZSByZXR1cm5lZC5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBhcGlLZXkgLSBBY2Nlc3Mga2V5IHRvIEdlb3BvcnRhbCBwbGF0Zm9ybVxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IGxheWVycyAtIE9iamVjdCB3aGljaCBwcm9wZXJ0aWVzIGFyZSBsYXllcnMgaWRlbnRpZmllcnMuXG4gICAgICovXG4gICAgZ2V0TGF5ZXJzQ29uZiA6IGZ1bmN0aW9uIChhcGlLZXkpIHtcbiAgICAgICAgdmFyIGxheW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JpeElkc10gICAgICAgICAtIEFycmF5IHdpdGggdGhlIElEIG9mIGVhY2ggbGV2ZWwgb2YgdGhlIHRpbGUgbWF0cml4IHNldCwgaW4gdGhlIGNhc2Ugb2YgV01UUyBsYXllclxuICAgICAqL1xuICAgIGdldExheWVyUGFyYW1zIDogZnVuY3Rpb24gKGxheWVyTmFtZSwgc2VydmljZSkge1xuICAgICAgICB2YXIgcGFyYW1zID0ge307XG5cbiAgICAgICAgaWYgKChzZXJ2aWNlID09PSBcIldNU1wiIHx8IE9iamVjdC5rZXlzKHRoaXMudGlsZU1hdHJpeFNldHMpLmxlbmd0aCAhPT0gMCkgJiYgT2JqZWN0LmtleXModGhpcy5sYXllcnMpLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgLy8gZ2V0IHRoZSBsYXllcklkIG9mIHRoZSBsYXllclxuICAgICAgICAgICAgdmFyIGxheWVySWQgPSB0aGlzLmdldExheWVySWQobGF5ZXJOYW1lLCBzZXJ2aWNlKTtcblxuICAgICAgICAgICAgaWYgKGxheWVySWQpIHtcbiAgICAgICAgICAgICAgICAvLyBnZXQgdGhlIGxheWVyIENvbmYgT2JqZWN0XG4gICAgICAgICAgICAgICAgdmFyIGxheWVyQ29uZiA9IHRoaXMuZ2V0TGF5ZXJDb25mKGxheWVySWQpO1xuXG4gICAgICAgICAgICAgICAgdmFyIGtleXMgPSB0aGlzLmdldExheWVyS2V5KGxheWVySWQpO1xuICAgICAgICAgICAgICAgIGlmIChrZXlzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZ2V0IHNlcnZpY2VzIHBhcmFtc1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwga2V5cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbmx5IG9uZSBzZXJ2ZXJVcmwgaXMgc2F2ZWQgaW4gR3AuQ29uZmlnIDogd2l0aCBtdWx0aUtleXMsIHdlIGhhdmUgdG8gcmV0cmlldmUgdGhlIGtleSB1c2VkIGluIHRoZSBzZXJ2ZXJVcmwgcHJvcGVydHlcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnNlcnZlclVybFtrZXlzW2ldXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnVybCA9IGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnNlcnZlclVybFtrZXlzW2ldXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IHdtc1R5cGVSZWdleCA9IC9cXC92XFwvLztcbiAgICAgICAgICAgICAgICAvLyBXTVMgdmVjdG9yIHN0eWxlIGFsd2F5cyBlbXB0eSAobm90IGluIGdldENhcClcbiAgICAgICAgICAgICAgICBpZiAod21zVHlwZVJlZ2V4LnRlc3QocGFyYW1zLnVybCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnN0eWxlcyA9IFwiXCI7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gV01TIHJhc3RlciBzdHlsZSBpcyBkZWZpbmVkIGluIGdldENhcFxuICAgICAgICAgICAgICAgICAgICBwYXJhbXMuc3R5bGVzID0gbGF5ZXJDb25mLnN0eWxlc1swXS5uYW1lO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHBhcmFtcy52ZXJzaW9uID0gbGF5ZXJDb25mLnNlcnZpY2VQYXJhbXMudmVyc2lvbjtcbiAgICAgICAgICAgICAgICBwYXJhbXMuZm9ybWF0ID0gbGF5ZXJDb25mLmZvcm1hdHNbMF0ubmFtZTtcbiAgICAgICAgICAgICAgICBwYXJhbXMucHJvamVjdGlvbiA9IGxheWVyQ29uZi5kZWZhdWx0UHJvamVjdGlvbjtcblxuICAgICAgICAgICAgICAgIC8vIGdldCBsYXllciBpbmZvIGFuZCBjb25zdHJhaW50c1xuICAgICAgICAgICAgICAgIHBhcmFtcy5taW5TY2FsZSA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50Lm1pblNjYWxlRGVub21pbmF0b3I7XG4gICAgICAgICAgICAgICAgcGFyYW1zLm1heFNjYWxlID0gbGF5ZXJDb25mLmdsb2JhbENvbnN0cmFpbnQubWF4U2NhbGVEZW5vbWluYXRvcjtcbiAgICAgICAgICAgICAgICBwYXJhbXMuZXh0ZW50ID0gbGF5ZXJDb25mLmdsb2JhbENvbnN0cmFpbnQuYmJveDtcbiAgICAgICAgICAgICAgICBwYXJhbXMubGVnZW5kcyA9IGxheWVyQ29uZi5sZWdlbmRzO1xuICAgICAgICAgICAgICAgIHBhcmFtcy50aXRsZSA9IGxheWVyQ29uZi50aXRsZTtcbiAgICAgICAgICAgICAgICBwYXJhbXMuZGVzY3JpcHRpb24gPSBsYXllckNvbmYuZGVzY3JpcHRpb247XG5cbiAgICAgICAgICAgICAgICBpZiAoc2VydmljZSA9PT0gXCJXTVNcIikge1xuICAgICAgICAgICAgICAgICAgICBwYXJhbXMubWV0YWRhdGEgPSBsYXllckNvbmYubWV0YWRhdGE7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gSW5mb3JtYXRpb25zICBub24gZGlzcG9uaWJsZXMgYXZlYyBsZXMgZ2V0Q2FwXG4gICAgICAgICAgICAgICAgLy8gcGFyYW1zLm1ldGFkYXRhID0gbGF5ZXJDb25mLmdldE1ldGFkYXRhKCk7XG4gICAgICAgICAgICAgICAgLy8gcGFyYW1zLm9yaWdpbmF0b3JzID0gbGF5ZXJDb25mLmdldE9yaWdpbmF0b3JzKCk7XG4gICAgICAgICAgICAgICAgLy8gcGFyYW1zLnF1aWNrbG9va1VybCA9IGxheWVyQ29uZi5nZXRRdWlja2xvb2tVcmwoKTtcblxuICAgICAgICAgICAgICAgIC8vIFdNVFMgOiBnZXQgdGhlIHRpbGVNYXRyaXhTZXRMaW1pdHNcbiAgICAgICAgICAgICAgICBpZiAobGF5ZXJDb25mLndtdHNPcHRpb25zKSB7XG4gICAgICAgICAgICAgICAgICAgIHBhcmFtcy50aWxlTWF0cml4U2V0TGltaXRzID0gbGF5ZXJDb25mLndtdHNPcHRpb25zLnRpbGVNYXRyaXhTZXRMaW1pdHM7XG4gICAgICAgICAgICAgICAgICAgIHZhciBUTVNMaW5rID0gbGF5ZXJDb25mLndtdHNPcHRpb25zLnRpbGVNYXRyaXhTZXRMaW5rO1xuICAgICAgICAgICAgICAgICAgICBpZiAoVE1TTGluaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLlRNU0xpbmsgPSBUTVNMaW5rO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRtc0NvbmYgPSB0aGlzLmdldFRNU0NvbmYoVE1TTGluayk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBHZXQgbWF0cml4IG9yaWdpbiA6IEdwLlBvaW50ID0gT2JqZWN0e3g6RmxvYXQsIHk6RmxvYXR9XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBwYXJhbXMubWF0cml4T3JpZ2luID0gdG1zQ29uZi5nZXRUb3BMZWZ0Q29ybmVyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMubWF0cml4SWRzID0gT2JqZWN0LmtleXModG1zQ29uZi50aWxlTWF0cmljZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnRpbGVNYXRyaWNlcyA9IHRtc0NvbmYudGlsZU1hdHJpY2VzO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYnkgZGVmYXVsdCwgcHNldWRvIG1lcmNhdG9yIHJlc29sdXRpb25zXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMubmF0aXZlUmVzb2x1dGlvbnMgPSB0bXNDb25mLm5hdGl2ZVJlc29sdXRpb25zIHx8IHRoaXMuZ2V0VE1TQ29uZihcIlBNXCIpLm5hdGl2ZVJlc29sdXRpb25zO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBwYXJhbXM7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIEdldCB0aGUgY29udHJhY3Qga2V5KHMpIGFzc29jaWF0ZWQgdG8gYSBnaXZlbiBsYXllci5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBsYXllcklkIC0gR2VvcG9ydGFsIGxheWVyIGlkZW50aWZpZXIgKGUuZy4gXCJHRU9HUkFQSElDQUxHUklEU1lTVEVNUy5NQVBTJEdFT1BPUlRBSUw6T0dDOldNVFNcIilcbiAgICAgKiBAcmV0dXJuIHtBcnJheX0gbGF5ZXJLZXkgLSBhcnJheSBvZiBrZXkocykgYXNzb2NpYXRlZCB0byB0aGUgZ2l2ZW4gbGF5ZXJcbiAgICAgKi9cbiAgICBnZXRMYXllcktleSA6IGZ1bmN0aW9uIChsYXllcklkKSB7XG4gICAgICAgIHZhciBsYXllcktleSA9IFtdO1xuICAgICAgICBpZiAodGhpcy5nZW5lcmFsT3B0aW9ucyAmJiB0aGlzLmdlbmVyYWxPcHRpb25zLmFwaUtleXMgJiYgT2JqZWN0LmtleXModGhpcy5nZW5lcmFsT3B0aW9ucy5hcGlLZXlzKS5sZW5ndGggIT09IDApIHtcbiAgICAgICAgICAgIHZhciByZXNvdXJjZXNCeUtleSA9IHRoaXMuZ2VuZXJhbE9wdGlvbnMuYXBpS2V5cztcbiAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiByZXNvdXJjZXNCeUtleSkge1xuICAgICAgICAgICAgICAgIHZhciByZXNvdXJjZXNBcnJheSA9IHJlc291cmNlc0J5S2V5W2tleV07XG4gICAgICAgICAgICAgICAgcmVzb3VyY2VzQXJyYXkuZm9yRWFjaChmdW5jdGlvbiAoYXJyYXlMYXllcklkKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhcnJheUxheWVySWQgPT09IGxheWVySWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyS2V5LnB1c2goa2V5KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBsYXllcktleTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogUmV0dXJucyBhbiBhc3NvY2lhdGl2ZSBhcnJheSBvZiBUaWxlIE1hdHJpeCBTZXRzIGNvbmZpZ3VyYXRpb25zLlxuICAgICAqXG4gICAgICogQHJldHVybiB7T2JqZWN0fSB0aWxlTWF0cml4U2V0cyAtIE9iamVjdCB3aGljaCBwcm9wZXJ0aWVzIGFyZSBUTVMgaWRlbnRpZmllcnNcbiAgICAgKlxuICAgICAqL1xuICAgIGdldFRpbGVNYXRyaXhTZXRzIDogZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy50aWxlTWF0cml4U2V0cztcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogUmV0dXJucyBhIFRpbGUgTWF0cml4IFNldHMgY29uZmlndXJhdGlvbiwgZ2l2ZW4gaXRzIGlkZW50aWZpZXIuXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1N0cmluZ30gdG1zSUQgLSBUaWxlIE1hdHJpeCBTZXQgaWRlbnRpZmllciAoZS5nLiA6IFwiUE1cIilcbiAgICAgKiBAcmV0dXJuIHtPYmplY3R9IHRpbGVNYXRyaXhTZXQgLSBUaWxlIE1hdHJpeCBTZXQgY29uZmlndXJhdGlvblxuICAgICAqL1xuICAgIGdldFRNU0NvbmYgOiBmdW5jdGlvbiAodG1zSUQpIHtcbiAgICAgICAgaWYgKCF0aGlzLnRpbGVNYXRyaXhTZXRzKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbi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zLmdldExheWVyQ29uZihsYXllcklkKTtcbiAgICAgICAgICAgIHBhcmFtcy5wcm9qZWN0aW9uID0gbGF5ZXJDb25mLmRlZmF1bHRQcm9qZWN0aW9uO1xuICAgICAgICAgICAgcGFyYW1zLm1pblNjYWxlID0gbGF5ZXJDb25mLmdsb2JhbENvbnN0cmFpbnQubWluU2NhbGVEZW5vbWluYXRvcjtcbiAgICAgICAgICAgIHBhcmFtcy5tYXhTY2FsZSA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50Lm1heFNjYWxlRGVub21pbmF0b3I7XG4gICAgICAgICAgICBwYXJhbXMuZXh0ZW50ID0gbGF5ZXJDb25mLmdsb2JhbENvbnN0cmFpbnQuYmJveDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBwYXJhbXM7XG4gICAgfVxuXG59O1xuXG5leHBvcnQgZGVmYXVsdCBDb25maWdJbnRlcmZhY2U7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Config/ConfigInterface.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Response object for {@link module:Services~getConfig Gp.Services.getConfig ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Object} generalOptions - General properties for default map configuration resources.\n * @property {Object} generalOptions.apiKeys - Object that associates apiKey (s) with an array of resources IDs availables with that key.\n * @property {String} generalOptions.title - Underlying web service Title.\n * @property {String} generalOptions.defaultGMLGFIStyle - XSL URL used by default to translate an XML GetFeatureInfo response into an HTML array.\n * @property {String} generalOptions.theme - default theme (FIXME : for what ?)\n * @property {Array.} generalOptions.wgs84Resolutions - geographical resolutions Array for each [zoom level of the Geoportal platform]{@link http://api.ign.fr/tech-docs-js/webmaster/layers.html#Geoportal_resolutions} from 0 to 21. Expressed in degrees/pixel.\n * @property {Object} layers - Associative array mapping resources availables IDs (keys) with their properties (values given as {@link Gp.Services.Config.Layer}).\n * @property {Object} tileMatrixSets - Associative Array mapping TileMatrixSets IDs (keys) availables with their properties (values given as {@link Gp.Services.Config.TileMatrixSet}).\n *\n * @namespace\n * @alias Gp.Services.GetConfigInterface\n */\nfunction ConfigInterface () {\n if (!(this instanceof ConfigInterface)) {\n throw new TypeError(\"ConfigInterface constructor cannot be called as a function.\");\n }\n\n this.generalOptions = {\n apiKeys : {},\n title : null,\n defaultGMLGFIStyle : null,\n theme : null,\n wgs84Resolutions : []\n };\n\n this.layers = {};\n\n this.tileMatrixSets = {};\n}\n\nConfigInterface.prototype = {\n\n /*\n * Constructor (alias)\n */\n constructor : ConfigInterface,\n\n /**\n * Check if config is loaded for a given key\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Boolean} isKeyConfLoaded - true if config of the key is already loaded, false otherwise\n */\n isKeyConfLoaded : function (apiKey) {\n if (!apiKey) {\n return;\n }\n if (this.generalOptions.apiKeys[apiKey]) {\n return true;\n }\n return false;\n },\n\n /**\n * Returns an array of Geoportal layers identifiers, corresponding to an API contract key.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Array} apiKeys - Array of geoportal layers identifiers\n */\n getLayersId : function (apiKey) {\n return this.generalOptions.apiKeys[apiKey];\n },\n\n /**\n * Returns the id of a Geoportal layer with its name and its service.\n *\n * @param {String} layerName - name of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS\")\n * @param {String} service - name of the service (ex. \"WMS\" ou \"WMTS\")\n * @returns {String} Id of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS\")\n */\n getLayerId : function (layerName, service) {\n if (!layerName || !service) {\n return;\n }\n var layerId = null;\n\n // layer\n // key : [layerName]$[contexte]:OGC:[service]\n // ex : \"ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS\"\n\n // service\n // key : [layerName]$[contexte];[service]\n // ex : PositionOfInterest$OGC:OPENLS;ReverseGeocode\n\n if (this.layers) {\n var layers = this.layers;\n for (var key in layers) {\n if (layers.hasOwnProperty(key)) {\n var parts = key.split(\"$\");\n if (layerName === parts[0]) {\n if (parts[1]) {\n var servicePartsLayer = parts[1].split(\":\");\n var servicePartsService = parts[1].split(\";\");\n\n if (servicePartsService[1] === service.toUpperCase()) {\n layerId = key;\n break;\n }\n if (servicePartsLayer[2] === service.toUpperCase()) {\n layerId = key;\n break;\n }\n }\n }\n }\n }\n }\n if (!layerId) {\n return;\n }\n return layerId;\n },\n\n /**\n * Returns an associative array of Geoportal layers configurations, corresponding to an API contract key.\n * If no key is specified, all layers from configuration are returned.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Object} layers - Object which properties are layers identifiers.\n */\n getLayersConf : function (apiKey) {\n var layers = {};\n var layersIdArray = this.getLayersId(apiKey);\n if (layersIdArray) {\n for (var i = 0; i < layersIdArray.length; i++) {\n var lyrId = layersIdArray[i];\n layers[lyrId] = this.layers[lyrId];\n }\n }\n return layers;\n },\n\n /**\n * Returns a geoportal layer configuration, given its identifier\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @return {Object} layer - Layer configuration\n */\n getLayerConf : function (layerId) {\n if (!this.layers) {\n return;\n }\n return this.layers[layerId];\n },\n\n /**\n * Get all parameters needed to display a WMS or WMTS layer given its name, its service and its key\n *\n * @param {String} layerName - name of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS\")\n * @param {String} service - name of the service (ex. \"WMS\" ou \"WMTS\")\n * @param {String} [apiKey] - Contract API key\n * @returns {Object} params - params of the service (WMS or WMTS) for the given layer\n * @returns {String} params.url - Url of the service to reach to display the layer\n * @returns {String} params.version - Version of the service\n * @returns {String} params.styles - Default style of the layer\n * @returns {String} params.format - Default format of the layer\n * @returns {String} params.projection - Default projection of the layer\n * @returns {Number} params.minScale - Min scale denominator of the layer\n * @returns {Number} params.maxScale - Max scale denominator of the layer\n * @returns {Gp.BBox} params.extent - Extent of the layer, in the projection of the layer\n * @returns {Array} params.legends - Array of legends associated to the layer\n * @returns {Array} params.title - Name of the layer, readable by a human\n * @returns {Array} params.description - Description of the layer\n * @returns {String} params.[TMSLink] - Id of the Tile Matrix Set (TMS), in the case of WMTS layer\n * @returns {Gp.Point} params.[matrixOrigin] - Originof the tile matrix (top left corner), in the case of WMTS layer\n * @returns {Array} params.[nativeResolutions] - Array with the resolution of each level of the tile matrix set, in the case of WMTS layer\n * @returns {Array} params.[matrixIds] - Array with the ID of each level of the tile matrix set, in the case of WMTS layer\n */\n getLayerParams : function (layerName, service) {\n var params = {};\n\n if ((service === \"WMS\" || Object.keys(this.tileMatrixSets).length !== 0) && Object.keys(this.layers).length !== 0) {\n // get the layerId of the layer\n var layerId = this.getLayerId(layerName, service);\n\n if (layerId) {\n // get the layer Conf Object\n var layerConf = this.getLayerConf(layerId);\n\n var keys = this.getLayerKey(layerId);\n if (keys.length === 0) {\n return;\n }\n\n // get services params\n for (var i = 0; i < keys.length; i++) {\n // only one serverUrl is saved in Gp.Config : with multiKeys, we have to retrieve the key used in the serverUrl property\n if (layerConf.serviceParams.serverUrl[keys[i]]) {\n params.url = layerConf.serviceParams.serverUrl[keys[i]];\n }\n }\n\n const wmsTypeRegex = /\\/v\\//;\n // WMS vector style always empty (not in getCap)\n if (wmsTypeRegex.test(params.url)) {\n params.styles = \" \";\n } else {\n // WMS raster style is defined in getCap\n params.styles = layerConf.styles[0].name;\n }\n\n params.version = layerConf.serviceParams.version;\n params.format = layerConf.formats[0].name;\n params.projection = layerConf.defaultProjection;\n\n // get layer info and constraints\n params.minScale = layerConf.globalConstraint.minScaleDenominator;\n params.maxScale = layerConf.globalConstraint.maxScaleDenominator;\n params.extent = layerConf.globalConstraint.bbox;\n params.legends = layerConf.legends;\n params.title = layerConf.title;\n params.description = layerConf.description;\n\n if (service === \"WMS\") {\n params.metadata = layerConf.metadata;\n }\n\n // Informations non disponibles avec les getCap\n // params.metadata = layerConf.getMetadata();\n // params.originators = layerConf.getOriginators();\n // params.quicklookUrl = layerConf.getQuicklookUrl();\n\n // WMTS : get the tileMatrixSetLimits\n if (layerConf.wmtsOptions) {\n params.tileMatrixSetLimits = layerConf.wmtsOptions.tileMatrixSetLimits;\n var TMSLink = layerConf.wmtsOptions.tileMatrixSetLink;\n if (TMSLink) {\n params.TMSLink = TMSLink;\n var tmsConf = this.getTMSConf(TMSLink);\n // Get matrix origin : Gp.Point = Object{x:Float, y:Float}\n // params.matrixOrigin = tmsConf.getTopLeftCorner();\n params.matrixIds = Object.keys(tmsConf.tileMatrices);\n params.tileMatrices = tmsConf.tileMatrices;\n // by default, pseudo mercator resolutions\n params.nativeResolutions = tmsConf.nativeResolutions || this.getTMSConf(\"PM\").nativeResolutions;\n }\n }\n }\n }\n return params;\n },\n\n /**\n * Get the contract key(s) associated to a given layer.\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @return {Array} layerKey - array of key(s) associated to the given layer\n */\n getLayerKey : function (layerId) {\n var layerKey = [];\n if (this.generalOptions && this.generalOptions.apiKeys && Object.keys(this.generalOptions.apiKeys).length !== 0) {\n var resourcesByKey = this.generalOptions.apiKeys;\n for (var key in resourcesByKey) {\n var resourcesArray = resourcesByKey[key];\n resourcesArray.forEach(function (arrayLayerId) {\n if (arrayLayerId === layerId) {\n layerKey.push(key);\n }\n });\n }\n }\n return layerKey;\n },\n\n /**\n * Returns an associative array of Tile Matrix Sets configurations.\n *\n * @return {Object} tileMatrixSets - Object which properties are TMS identifiers\n *\n */\n getTileMatrixSets : function () {\n return this.tileMatrixSets;\n },\n\n /**\n * Returns a Tile Matrix Sets configuration, given its identifier.\n *\n * @param {String} tmsID - Tile Matrix Set identifier (e.g. : \"PM\")\n * @return {Object} tileMatrixSet - Tile Matrix Set configuration\n */\n getTMSConf : function (tmsID) {\n if (!this.tileMatrixSets) {\n return;\n }\n return this.tileMatrixSets[tmsID];\n },\n\n /**\n * Get global constraints for a given Layer : extent, minScale, maxScale, projection\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @returns {Object} params - layer constraints\n * @returns {String} params.projection - default layer projection\n * @returns {Number} params.minScale - layer min scale denominator\n * @returns {Number} params.maxScale - layer max scale denominator\n * @returns {Gp.BBox} params.extent - layer extent expressed in the layer projection\n */\n getGlobalConstraints : function (layerId) {\n var params = {};\n\n if (layerId) {\n // get layer configuration object\n var layerConf = this.getLayerConf(layerId);\n params.projection = layerConf.defaultProjection;\n params.minScale = layerConf.globalConstraint.minScaleDenominator;\n params.maxScale = layerConf.globalConstraint.maxScaleDenominator;\n params.extent = layerConf.globalConstraint.bbox;\n }\n\n return params;\n }\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ConfigInterface);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQ29uZmlnL0NvbmZpZ0ludGVyZmFjZS5qcz83NDM1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0E7QUFDQSx3QkFBd0IseURBQXlEO0FBQ2pGO0FBQ0EsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixjQUFjLE9BQU87QUFDckIsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixjQUFjLGNBQWMsa0hBQWtILGlGQUFpRjtBQUMvTixjQUFjLE9BQU8sNEdBQTRHLCtCQUErQjtBQUNoSyxjQUFjLE9BQU8seUhBQXlILHVDQUF1QztBQUNyTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0Esb0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AgLy8gc2VydmljZVxuICAgICAgICAvLyBrZXkgOiBbbGF5ZXJOYW1lXSRbY29udGV4dGVdO1tzZXJ2aWNlXVxuICAgICAgICAvLyBleCA6IFBvc2l0aW9uT2ZJbnRlcmVzdCRPR0M6T1BFTkxTO1JldmVyc2VHZW9jb2RlXG5cbiAgICAgICAgaWYgKHRoaXMubGF5ZXJzKSB7XG4gICAgICAgICAgICB2YXIgbGF5ZXJzID0gdGhpcy5sYXllcnM7XG4gICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gbGF5ZXJzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxheWVycy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJ0cyA9IGtleS5zcGxpdChcIiRcIik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChsYXllck5hbWUgPT09IHBhcnRzWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFydHNbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgc2VydmljZVBhcnRzTGF5ZXIgPSBwYXJ0c1sxXS5zcGxpdChcIjpcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNlcnZpY2VQYXJ0c1NlcnZpY2UgPSBwYXJ0c1sxXS5zcGxpdChcIjtcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VydmljZVBhcnRzU2VydmljZVsxXSA9PT0gc2VydmljZS50b1VwcGVyQ2FzZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVySWQgPSBrZXk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VydmljZVBhcnRzTGF5ZXJbMl0gPT09IHNlcnZpY2UudG9VcHBlckNhc2UoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXllcklkID0ga2V5O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFsYXllcklkKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGxheWVySWQ7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgYW4gYXNzb2NpYXRpdmUgYXJyYXkgb2YgR2VvcG9ydGFsIGxheWVycyBjb25maWd1cmF0aW9ucywgY29ycmVzcG9uZGluZyB0byBhbiBBUEkgY29udHJhY3Qga2V5LlxuICAgICAqIElmIG5vIGtleSBpcyBzcGVjaWZpZWQsIGFsbCBsYXllcnMgZnJvbSBjb25maWd1cmF0aW9uIGFyZSByZXR1cm5lZC5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBhcGlLZXkgLSBBY2Nlc3Mga2V5IHRvIEdlb3BvcnRhbCBwbGF0Zm9ybVxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IGxheWVycyAtIE9iamVjdCB3aGljaCBwcm9wZXJ0aWVzIGFyZSBsYXllcnMgaWRlbnRpZmllcnMuXG4gICAgICovXG4gICAgZ2V0TGF5ZXJzQ29uZiA6IGZ1bmN0aW9uIChhcGlLZXkpIHtcbiAgICAgICAgdmFyIGxheWVycyA9IHt9O1xuICAgICAgICB2YXIgbGF5ZXJzSWRBcnJheSA9IHRoaXMuZ2V0TGF5ZXJzSWQoYXBpS2V5KTtcbiAgICAgICAgaWYgKGxheWVyc0lkQXJyYXkpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGF5ZXJzSWR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WVyTmFtZSwgc2VydmljZSkge1xuICAgICAgICB2YXIgcGFyYW1zID0ge307XG5cbiAgICAgICAgaWYgKChzZXJ2aWNlID09PSBcIldNU1wiIHx8IE9iamVjdC5rZXlzKHRoaXMudGlsZU1hdHJpeFNldHMpLmxlbmd0aCAhPT0gMCkgJiYgT2JqZWN0LmtleXModGhpcy5sYXllcnMpLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgLy8gZ2V0IHRoZSBsYXllcklkIG9mIHRoZSBsYXllclxuICAgICAgICAgICAgdmFyIGxheWVySWQgPSB0aGlzLmdldExheWVySWQobGF5ZXJOYW1lLCBzZXJ2aWNlKTtcblxuICAgICAgICAgICAgaWYgKGxheWVySWQpIHtcbiAgICAgICAgICAgICAgICAvLyBnZXQgdGhlIGxheWVyIENvbmYgT2JqZWN0XG4gICAgICAgICAgICAgICAgdmFyIGxheWVyQ29uZiA9IHRoaXMuZ2V0TGF5ZXJDb25mKGxheWVySWQpO1xuXG4gICAgICAgICAgICAgICAgdmFyIGtleXMgPSB0aGlzLmdldExheWVyS2V5KGxheWVySWQpO1xuICAgICAgICAgICAgICAgIGlmIChrZXlzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZ2V0IHNlcnZpY2VzIHBhcmFtc1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwga2V5cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbmx5IG9uZSBzZXJ2ZXJVcmwgaXMgc2F2ZWQgaW4gR3AuQ29uZmlnIDogd2l0aCBtdWx0aUtleXMsIHdlIGhhdmUgdG8gcmV0cmlldmUgdGhlIGtleSB1c2VkIGluIHRoZSBzZXJ2ZXJVcmwgcHJvcGVydHlcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnNlcnZlclVybFtrZXlzW2ldXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnVybCA9IGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnNlcnZlclVybFtrZXlzW2ldXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IHdtc1R5cGVSZWdleCA9IC9cXC92XFwvLztcbiAgICAgICAgICAgICAgICAvLyBXTVMgdmVjdG9yIHN0eWxlIGFsd2F5cyBlbXB0eSAobm90IGluIGdldENhcClcbiAgICAgICAgICAgICAgICBpZiAod21zVHlwZVJlZ2V4LnRlc3QocGFyYW1zLnVybCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnN0eWxlcyA9IFwiIFwiO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFdNUyByYXN0ZXIgc3R5bGUgaXMgZGVmaW5lZCBpbiBnZXRDYXBcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnN0eWxlcyA9IGxheWVyQ29uZi5zdHlsZXNbMF0ubmFtZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBwYXJhbXMudmVyc2lvbiA9IGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnZlcnNpb247XG4gICAgICAgICAgICAgICAgcGFyYW1zLmZvcm1hdCA9IGxheWVyQ29uZi5mb3JtYXRzWzBdLm5hbWU7XG4gICAgICAgICAgICAgICAgcGFyYW1zLnByb2plY3Rpb24gPSBsYXllckNvbmYuZGVmYXVsdFByb2plY3Rpb247XG5cbiAgICAgICAgICAgICAgICAvLyBnZXQgbGF5ZXIgaW5mbyBhbmQgY29uc3RyYWludHNcbiAgICAgICAgICAgICAgICBwYXJhbXMubWluU2NhbGUgPSBsYXllckNvbmYuZ2xvYmFsQ29uc3RyYWludC5taW5TY2FsZURlbm9taW5hdG9yO1xuICAgICAgICAgICAgICAgIHBhcmFtcy5tYXhTY2FsZSA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50Lm1heFNjYWxlRGVub21pbmF0b3I7XG4gICAgICAgICAgICAgICAgcGFyYW1zLmV4dGVudCA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50LmJib3g7XG4gICAgICAgICAgICAgICAgcGFyYW1zLmxlZ2VuZHMgPSBsYXllckNvbmYubGVnZW5kcztcbiAgICAgICAgICAgICAgICBwYXJhbXMudGl0bGUgPSBsYXllckNvbmYudGl0bGU7XG4gICAgICAgICAgICAgICAgcGFyYW1zLmRlc2NyaXB0aW9uID0gbGF5ZXJDb25mLmRlc2NyaXB0aW9uO1xuXG4gICAgICAgICAgICAgICAgaWYgKHNlcnZpY2UgPT09IFwiV01TXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLm1ldGFkYXRhID0gbGF5ZXJDb25mLm1ldGFkYXRhO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEluZm9ybWF0aW9ucyAgbm9uIGRpc3BvbmlibGVzIGF2ZWMgbGVzIGdldENhcFxuICAgICAgICAgICAgICAgIC8vIHBhcmFtcy5tZXRhZGF0YSA9IGxheWVyQ29uZi5nZXRNZXRhZGF0YSgpO1xuICAgICAgICAgICAgICAgIC8vIHBhcmFtcy5vcmlnaW5hdG9ycyA9IGxheWVyQ29uZi5nZXRPcmlnaW5hdG9ycygpO1xuICAgICAgICAgICAgICAgIC8vIHBhcmFtcy5xdWlja2xvb2tVcmwgPSBsYXllckNvbmYuZ2V0UXVpY2tsb29rVXJsKCk7XG5cbiAgICAgICAgICAgICAgICAvLyBXTVRTIDogZ2V0IHRoZSB0aWxlTWF0cml4U2V0TGltaXRzXG4gICAgICAgICAgICAgICAgaWYgKGxheWVyQ29uZi53bXRzT3B0aW9ucykge1xuICAgICAgICAgICAgICAgICAgICBwYXJhbXMudGlsZU1hdHJpeFNldExpbWl0cyA9IGxheWVyQ29uZi53bXRzT3B0aW9ucy50aWxlTWF0cml4U2V0TGltaXRzO1xuICAgICAgICAgICAgICAgICAgICB2YXIgVE1TTGluayA9IGxheWVyQ29uZi53bXRzT3B0aW9ucy50aWxlTWF0cml4U2V0TGluaztcbiAgICAgICAgICAgICAgICAgICAgaWYgKFRNU0xpbmspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5UTVNMaW5rID0gVE1TTGluaztcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0bXNDb25mID0gdGhpcy5nZXRUTVNDb25mKFRNU0xpbmspO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gR2V0IG1hdHJpeCBvcmlnaW4gOiBHcC5Qb2ludCA9IE9iamVjdHt4OkZsb2F0LCB5OkZsb2F0fVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcGFyYW1zLm1hdHJpeE9yaWdpbiA9IHRtc0NvbmYuZ2V0VG9wTGVmdENvcm5lcigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLm1hdHJpeElkcyA9IE9iamVjdC5rZXlzKHRtc0NvbmYudGlsZU1hdHJpY2VzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy50aWxlTWF0cmljZXMgPSB0bXNDb25mLnRpbGVNYXRyaWNlcztcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGJ5IGRlZmF1bHQsIHBzZXVkbyBtZXJjYXRvciByZXNvbHV0aW9uc1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLm5hdGl2ZVJlc29sdXRpb25zID0gdG1zQ29uZi5uYXRpdmVSZXNvbHV0aW9ucyB8fCB0aGlzLmdldFRNU0NvbmYoXCJQTVwiKS5uYXRpdmVSZXNvbHV0aW9ucztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcGFyYW1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Y2FsZSA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50Lm1pblNjYWxlRGVub21pbmF0b3I7XG4gICAgICAgICAgICBwYXJhbXMubWF4U2NhbGUgPSBsYXllckNvbmYuZ2xvYmFsQ29uc3RyYWludC5tYXhTY2FsZURlbm9taW5hdG9yO1xuICAgICAgICAgICAgcGFyYW1zLmV4dGVudCA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50LmJib3g7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcGFyYW1zO1xuICAgIH1cblxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29uZmlnSW50ZXJmYWNlO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Config/ConfigInterface.js\n"); /***/ }), @@ -926,7 +926,7 @@ eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn th /*! exports provided: name, description, version, date, leafletExtName, leafletExtVersion, olExtName, olExtVersion, itownsExtName, itownsExtVersion, main, types, module, directories, scripts, repository, author, keywords, license, bugs, homepage, dependencies, devDependencies, default */ /***/ (function(module) { -eval("module.exports = JSON.parse(\"{\\\"name\\\":\\\"geoportal-extensions\\\",\\\"description\\\":\\\"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries\\\",\\\"version\\\":\\\"2.8.3\\\",\\\"date\\\":\\\"21/07/2023\\\",\\\"leafletExtName\\\":\\\"French Geoportal Extension for Leaflet\\\",\\\"leafletExtVersion\\\":\\\"2.3.3\\\",\\\"olExtName\\\":\\\"French Geoportal Extension for OpenLayers\\\",\\\"olExtVersion\\\":\\\"3.3.2\\\",\\\"itownsExtName\\\":\\\"French Geoportal Extension for Itowns\\\",\\\"itownsExtVersion\\\":\\\"2.4.1\\\",\\\"main\\\":\\\"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js\\\",\\\"types\\\":\\\"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts\\\",\\\"module\\\":\\\"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js\\\",\\\"directories\\\":{},\\\"scripts\\\":{\\\"setup\\\":\\\"npm install\\\",\\\"clean\\\":\\\"echo \\\\\\\"Warning: target not yet implemented!\\\\\\\" && exit 0\\\",\\\"eslint\\\":\\\"eslint src/\\\",\\\"test\\\":\\\"npm run test:serve\\\",\\\"test:serve\\\":\\\"cd test && webpack-dev-server --hot --config webpack.test.serve.js\\\",\\\"sample\\\":\\\"npm run sample:serve\\\",\\\"sample:serve\\\":\\\"npm run sample:ol:serve\\\",\\\"sample:itowns:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path '/dist/itowns/' --port 9001 --open\\\",\\\"sample:leaflet:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path '/dist/leaflet/' --port 9001 --open\\\",\\\"sample:ol:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path '/dist/openlayers/' --port 9001 --open\\\",\\\"generate-types:ol\\\":\\\"npx tsc -p build/types/tsconfig-openlayers.json\\\",\\\"generate-types:leaflet\\\":\\\"npx tsc -p build/types/tsconfig-leaflet.json\\\",\\\"generate-types:itowns\\\":\\\"npx tsc -p build/types/tsconfig-itowns.json\\\",\\\"generate-jsdoc:ol\\\":\\\"jsdoc -c build/jsdoc/jsdoc-openlayers.json\\\",\\\"generate-jsdoc:leaflet\\\":\\\"jsdoc -c build/jsdoc/jsdoc-leaflet.json\\\",\\\"generate-jsdoc:itowns\\\":\\\"jsdoc -c build/jsdoc/jsdoc-itowns.json\\\",\\\"doc\\\":\\\"npm run doc:serve\\\",\\\"doc:serve\\\":\\\"npm run doc:ol:serve\\\",\\\"doc:itowns:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open\\\",\\\"doc:leaflet:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open\\\",\\\"doc:ol:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open\\\",\\\"build:dev\\\":\\\"npm-run-all --print-label --print-name build:*:dev\\\",\\\"build:prod\\\":\\\"npm-run-all --print-label --print-name build:*:prod\\\",\\\"build:src\\\":\\\"npm-run-all --print-label --print-name build:*:src\\\",\\\"build\\\":\\\"npm-run-all --print-label --print-name build:*:*\\\",\\\"build:itowns\\\":\\\"npm-run-all --print-label --print-name build:itowns:*\\\",\\\"build:itowns:dev\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=development\\\",\\\"build:itowns:prod\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=production\\\",\\\"build:itowns:src\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=none\\\",\\\"build:ol\\\":\\\"npm-run-all --print-label --print-name build:ol:*\\\",\\\"build:ol:dev\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=development\\\",\\\"build:ol:prod\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=production\\\",\\\"build:ol:src\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=none\\\",\\\"build:leaflet\\\":\\\"npm-run-all --print-label --print-name build:leaflet:*\\\",\\\"build:leaflet:dev\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=development\\\",\\\"build:leaflet:prod\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=production\\\",\\\"build:leaflet:src\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=none\\\"},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"https://github.com/IGNF/geoportal-extensions.git\\\"},\\\"author\\\":\\\"IGNF\\\",\\\"keywords\\\":[\\\"geoportail\\\",\\\"javascript\\\",\\\"OpenLayers\\\",\\\"Leaflet\\\",\\\"Itowns\\\",\\\"3D\\\"],\\\"license\\\":\\\"CECILL-B\\\",\\\"bugs\\\":{\\\"url\\\":\\\"https://github.com/IGNF/geoportal-extensions/issues\\\"},\\\"homepage\\\":\\\"https://github.com/IGNF/geoportal-extensions#readme\\\",\\\"dependencies\\\":{\\\"@mapbox/mapbox-gl-style-spec\\\":\\\"13.20.1\\\",\\\"eventbusjs\\\":\\\"0.2.0\\\",\\\"geoportal-access-lib\\\":\\\"3.3.2\\\",\\\"itowns\\\":\\\"2.38.2\\\",\\\"leaflet\\\":\\\"1.7.1\\\",\\\"leaflet-draw\\\":\\\"1.0.4\\\",\\\"loglevel\\\":\\\"^1.6.7\\\",\\\"markdown-toc\\\":\\\"^1.2.0\\\",\\\"ol\\\":\\\"6.9.0\\\",\\\"ol-mapbox-style\\\":\\\"6.7.0\\\",\\\"proj4\\\":\\\"2.7.5\\\",\\\"proj4leaflet\\\":\\\"1.0.2\\\",\\\"sortablejs\\\":\\\"1.14.0\\\",\\\"three\\\":\\\"0.137.5\\\",\\\"typescript\\\":\\\"^4.5.5\\\",\\\"whatwg-fetch\\\":\\\"3.0.0\\\"},\\\"devDependencies\\\":{\\\"@babel/core\\\":\\\"^7.4.4\\\",\\\"@babel/plugin-transform-template-literals\\\":\\\"^7.7.4\\\",\\\"@babel/preset-env\\\":\\\"^7.4.4\\\",\\\"babel-loader\\\":\\\"^8.0.5\\\",\\\"chai\\\":\\\"^4.2.0\\\",\\\"chalk\\\":\\\"^4.0.0\\\",\\\"clean-webpack-plugin\\\":\\\"^3.0.0\\\",\\\"copy-webpack-plugin\\\":\\\"^5.0.3\\\",\\\"core-js\\\":\\\"^3.6.4\\\",\\\"css-loader\\\":\\\"^3.4.2\\\",\\\"eslint\\\":\\\"^6.8.0\\\",\\\"eslint-config-standard\\\":\\\"^14.1.1\\\",\\\"eslint-loader\\\":\\\"^4.0.0\\\",\\\"eslint-plugin-import\\\":\\\"^2.17.2\\\",\\\"eslint-plugin-node\\\":\\\"^11.1.0\\\",\\\"eslint-plugin-promise\\\":\\\"^4.1.1\\\",\\\"eslint-plugin-standard\\\":\\\"^4.0.0\\\",\\\"exports-loader\\\":\\\"^0.7.0\\\",\\\"expose-loader\\\":\\\"^0.7.5\\\",\\\"fs-extra\\\":\\\"^9.0.0\\\",\\\"handlebars\\\":\\\"^4.7.5\\\",\\\"handlebars-layouts\\\":\\\"^3.1.4\\\",\\\"html-webpack-plugin\\\":\\\"^4.0.4\\\",\\\"jsdoc-webpack-plugin\\\":\\\"^0.3.0\\\",\\\"mini-css-extract-plugin\\\":\\\"^0.9.0\\\",\\\"mocha\\\":\\\"^7.1.1\\\",\\\"mocha-loader\\\":\\\"^5.0.0\\\",\\\"npm-run-all\\\":\\\"^4.1.5\\\",\\\"optimize-css-assets-webpack-plugin\\\":\\\"^5.0.1\\\",\\\"path\\\":\\\"^0.12.7\\\",\\\"replace-bundle-webpack-plugin\\\":\\\"^1.0.0\\\",\\\"requirejs\\\":\\\"^2.3.6\\\",\\\"responsive-loader\\\":\\\"^1.2.0\\\",\\\"speed-measure-webpack-plugin\\\":\\\"^1.3.0\\\",\\\"string-template\\\":\\\"^1.0.0\\\",\\\"style-loader\\\":\\\"^1.1.3\\\",\\\"terser-webpack-plugin\\\":\\\"^2.0.0\\\",\\\"url-loader\\\":\\\"^4.0.0\\\",\\\"webpack\\\":\\\"^4.30.0\\\",\\\"webpack-cli\\\":\\\"^3.3.1\\\",\\\"webpack-dev-server\\\":\\\"^3.3.1\\\",\\\"webpack-node-externals\\\":\\\"^1.7.2\\\"}}\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiIuL3BhY2thZ2UuanNvbi5qcyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./package.json\n"); +eval("module.exports = JSON.parse(\"{\\\"name\\\":\\\"geoportal-extensions\\\",\\\"description\\\":\\\"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries\\\",\\\"version\\\":\\\"2.8.6\\\",\\\"date\\\":\\\"30/08/2023\\\",\\\"leafletExtName\\\":\\\"French Geoportal Extension for Leaflet\\\",\\\"leafletExtVersion\\\":\\\"2.3.4\\\",\\\"olExtName\\\":\\\"French Geoportal Extension for OpenLayers\\\",\\\"olExtVersion\\\":\\\"3.3.4\\\",\\\"itownsExtName\\\":\\\"French Geoportal Extension for Itowns\\\",\\\"itownsExtVersion\\\":\\\"2.4.3\\\",\\\"main\\\":\\\"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js\\\",\\\"types\\\":\\\"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts\\\",\\\"module\\\":\\\"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js\\\",\\\"directories\\\":{},\\\"scripts\\\":{\\\"setup\\\":\\\"npm install\\\",\\\"clean\\\":\\\"echo \\\\\\\"Warning: target not yet implemented!\\\\\\\" && exit 0\\\",\\\"eslint\\\":\\\"eslint src/\\\",\\\"test\\\":\\\"npm run test:serve\\\",\\\"test:serve\\\":\\\"cd test && webpack-dev-server --hot --config webpack.test.serve.js\\\",\\\"sample\\\":\\\"npm run sample:serve\\\",\\\"sample:serve\\\":\\\"npm run sample:ol:serve\\\",\\\"sample:itowns:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path '/dist/itowns/' --port 9001 --open\\\",\\\"sample:leaflet:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path '/dist/leaflet/' --port 9001 --open\\\",\\\"sample:ol:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path '/dist/openlayers/' --port 9001 --open\\\",\\\"generate-types:ol\\\":\\\"npx tsc -p build/types/tsconfig-openlayers.json\\\",\\\"generate-types:leaflet\\\":\\\"npx tsc -p build/types/tsconfig-leaflet.json\\\",\\\"generate-types:itowns\\\":\\\"npx tsc -p build/types/tsconfig-itowns.json\\\",\\\"generate-jsdoc:ol\\\":\\\"jsdoc -c build/jsdoc/jsdoc-openlayers.json\\\",\\\"generate-jsdoc:leaflet\\\":\\\"jsdoc -c build/jsdoc/jsdoc-leaflet.json\\\",\\\"generate-jsdoc:itowns\\\":\\\"jsdoc -c build/jsdoc/jsdoc-itowns.json\\\",\\\"doc\\\":\\\"npm run doc:serve\\\",\\\"doc:serve\\\":\\\"npm run doc:ol:serve\\\",\\\"doc:itowns:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open\\\",\\\"doc:leaflet:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open\\\",\\\"doc:ol:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open\\\",\\\"build:dev\\\":\\\"npm-run-all --print-label --print-name build:*:dev\\\",\\\"build:prod\\\":\\\"npm-run-all --print-label --print-name build:*:prod\\\",\\\"build:src\\\":\\\"npm-run-all --print-label --print-name build:*:src\\\",\\\"build\\\":\\\"npm-run-all --print-label --print-name build:*:*\\\",\\\"build:itowns\\\":\\\"npm-run-all --print-label --print-name build:itowns:*\\\",\\\"build:itowns:dev\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=development\\\",\\\"build:itowns:prod\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=production\\\",\\\"build:itowns:src\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=none\\\",\\\"build:ol\\\":\\\"npm-run-all --print-label --print-name build:ol:*\\\",\\\"build:ol:dev\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=development\\\",\\\"build:ol:prod\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=production\\\",\\\"build:ol:src\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=none\\\",\\\"build:leaflet\\\":\\\"npm-run-all --print-label --print-name build:leaflet:*\\\",\\\"build:leaflet:dev\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=development\\\",\\\"build:leaflet:prod\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=production\\\",\\\"build:leaflet:src\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=none\\\"},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"https://github.com/IGNF/geoportal-extensions.git\\\"},\\\"author\\\":\\\"IGNF\\\",\\\"keywords\\\":[\\\"geoportail\\\",\\\"javascript\\\",\\\"OpenLayers\\\",\\\"Leaflet\\\",\\\"Itowns\\\",\\\"3D\\\"],\\\"license\\\":\\\"CECILL-B\\\",\\\"bugs\\\":{\\\"url\\\":\\\"https://github.com/IGNF/geoportal-extensions/issues\\\"},\\\"homepage\\\":\\\"https://github.com/IGNF/geoportal-extensions#readme\\\",\\\"dependencies\\\":{\\\"@mapbox/mapbox-gl-style-spec\\\":\\\"13.20.1\\\",\\\"eventbusjs\\\":\\\"0.2.0\\\",\\\"geoportal-access-lib\\\":\\\"3.3.4\\\",\\\"itowns\\\":\\\"2.38.2\\\",\\\"leaflet\\\":\\\"1.7.1\\\",\\\"leaflet-draw\\\":\\\"1.0.4\\\",\\\"loglevel\\\":\\\"^1.6.7\\\",\\\"markdown-toc\\\":\\\"^1.2.0\\\",\\\"ol\\\":\\\"6.9.0\\\",\\\"ol-mapbox-style\\\":\\\"6.7.0\\\",\\\"proj4\\\":\\\"2.7.5\\\",\\\"proj4leaflet\\\":\\\"1.0.2\\\",\\\"sortablejs\\\":\\\"1.14.0\\\",\\\"three\\\":\\\"0.137.5\\\",\\\"typescript\\\":\\\"^4.5.5\\\",\\\"whatwg-fetch\\\":\\\"3.0.0\\\"},\\\"devDependencies\\\":{\\\"@babel/core\\\":\\\"^7.4.4\\\",\\\"@babel/plugin-transform-template-literals\\\":\\\"^7.7.4\\\",\\\"@babel/preset-env\\\":\\\"^7.4.4\\\",\\\"babel-loader\\\":\\\"^8.0.5\\\",\\\"chai\\\":\\\"^4.2.0\\\",\\\"chalk\\\":\\\"^4.0.0\\\",\\\"clean-webpack-plugin\\\":\\\"^3.0.0\\\",\\\"copy-webpack-plugin\\\":\\\"^5.0.3\\\",\\\"core-js\\\":\\\"^3.6.4\\\",\\\"css-loader\\\":\\\"^3.4.2\\\",\\\"eslint\\\":\\\"^6.8.0\\\",\\\"eslint-config-standard\\\":\\\"^14.1.1\\\",\\\"eslint-loader\\\":\\\"^4.0.0\\\",\\\"eslint-plugin-import\\\":\\\"^2.17.2\\\",\\\"eslint-plugin-node\\\":\\\"^11.1.0\\\",\\\"eslint-plugin-promise\\\":\\\"^4.1.1\\\",\\\"eslint-plugin-standard\\\":\\\"^4.0.0\\\",\\\"exports-loader\\\":\\\"^0.7.0\\\",\\\"expose-loader\\\":\\\"^0.7.5\\\",\\\"fs-extra\\\":\\\"^9.0.0\\\",\\\"handlebars\\\":\\\"^4.7.5\\\",\\\"handlebars-layouts\\\":\\\"^3.1.4\\\",\\\"html-webpack-plugin\\\":\\\"^4.0.4\\\",\\\"jsdoc-webpack-plugin\\\":\\\"^0.3.0\\\",\\\"mini-css-extract-plugin\\\":\\\"^0.9.0\\\",\\\"mocha\\\":\\\"^7.1.1\\\",\\\"mocha-loader\\\":\\\"^5.0.0\\\",\\\"npm-run-all\\\":\\\"^4.1.5\\\",\\\"optimize-css-assets-webpack-plugin\\\":\\\"^5.0.1\\\",\\\"path\\\":\\\"^0.12.7\\\",\\\"replace-bundle-webpack-plugin\\\":\\\"^1.0.0\\\",\\\"requirejs\\\":\\\"^2.3.6\\\",\\\"responsive-loader\\\":\\\"^1.2.0\\\",\\\"speed-measure-webpack-plugin\\\":\\\"^1.3.0\\\",\\\"string-template\\\":\\\"^1.0.0\\\",\\\"style-loader\\\":\\\"^1.1.3\\\",\\\"terser-webpack-plugin\\\":\\\"^2.0.0\\\",\\\"url-loader\\\":\\\"^4.0.0\\\",\\\"webpack\\\":\\\"^4.30.0\\\",\\\"webpack-cli\\\":\\\"^3.3.1\\\",\\\"webpack-dev-server\\\":\\\"^3.3.1\\\",\\\"webpack-node-externals\\\":\\\"^1.7.2\\\"}}\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiIuL3BhY2thZ2UuanNvbi5qcyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./package.json\n"); /***/ }), @@ -1184,7 +1184,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar MousePositionDOM = {\n /**\n * Add uuid to the tag ID\n * @param {String} id - id selector\n * @returns {String} uid - id selector with an unique id\n */\n _addUID: function _addUID(id) {\n var uid = this._uid ? id + \"-\" + this._uid : id;\n return uid;\n },\n /**\n * Main container (DOM)\n *\n * @returns {DOMElement} DOM element\n */\n _createMainContainerElement: function _createMainContainerElement() {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPmousePosition\");\n container.className = \"GPwidget\";\n return container;\n },\n // ################################################################### //\n // ################### Methods of main container ##################### //\n // ################################################################### //\n\n /**\n * Hidden checkbox for minimizing/maximizing\n *\n * @returns {DOMElement} DOM element\n */\n _createShowMousePositionElement: function _createShowMousePositionElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPshowMousePosition\");\n input.type = \"checkbox\";\n return input;\n },\n /**\n * Show mouse position control\n * @param {Boolean} isDesktop - specifies if the support is desktop or tactile\n *\n * @returns {DOMElement} DOM element\n */\n _createShowMousePositionPictoElement: function _createShowMousePositionPictoElement(isDesktop) {\n // contexte d'execution\n var self = this;\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowMousePositionPicto\");\n label.className = \"GPshowAdvancedToolPicto\";\n label.htmlFor = this._addUID(\"GPshowMousePosition\");\n label.title = \"Afficher les coordonnées du curseur\";\n\n // FIXME detection disponible dans le JS !\n // Detection : test for desktop or tactile\n // var isDesktop = true;\n // var userAgent = window.navigator.userAgent.toLowerCase();\n // if (userAgent.indexOf(\"iphone\") !== -1 ||\n // userAgent.indexOf(\"ipod\") !== -1 ||\n // userAgent.indexOf(\"ipad\") !== -1 ||\n // userAgent.indexOf(\"android\") !== -1 ||\n // userAgent.indexOf(\"mobile\") !== -1 ||\n // userAgent.indexOf(\"blackberry\") !== -1 ||\n // userAgent.indexOf(\"tablet\") !== -1 ||\n // userAgent.indexOf(\"phone\") !== -1 ||\n // userAgent.indexOf(\"touch\") !== -1 ) {\n // isDesktop = false;\n // }\n // if (userAgent.indexOf(\"msie\") !== -1 ||\n // userAgent.indexOf(\"trident\") !== -1) {\n // isDesktop = true;\n // }\n\n // Show map center localisation if panel opened and tactile support\n label.addEventListener(\"click\", function (e) {\n var mapCenterClass = \"\";\n if (!document.getElementById(self._addUID(\"GPshowMousePosition\")).checked && !isDesktop) {\n mapCenterClass = \"GPmapCenterVisible\";\n }\n document.getElementById(\"GPmapCenter\").className = mapCenterClass;\n self.onShowMousePositionClick(e);\n });\n var spanOpen = document.createElement(\"span\");\n spanOpen.id = this._addUID(\"GPshowMousePositionOpen\");\n spanOpen.className = \"GPshowAdvancedToolOpen\";\n label.appendChild(spanOpen);\n return label;\n },\n /**\n * mouse position panel\n *\n * @returns {DOMElement} DOM element\n */\n _createMousePositionPanelElement: function _createMousePositionPanelElement() {\n var panel = document.createElement(\"div\");\n panel.id = this._addUID(\"GPmousePositionPanel\");\n panel.className = \"GPpanel\";\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n // div.appendChild(this._createMousePositionPanelHeaderElement());\n // div.appendChild(this._createMousePositionPanelBasicElement());\n // div.appendChild(this._createShowMousePositionSettingsElement());\n // div.appendChild(this._createMousePositionSettingsElement());\n\n return panel;\n },\n /**\n * Map center localisation (tactile use)\n *\n * @returns {DOMElement} container\n */\n _createMapCenter: function _createMapCenter() {\n var div = document.createElement(\"div\");\n div.id = \"GPmapCenter\";\n div.className = \"\";\n return div;\n },\n // ################################################################### //\n // ####################### Panel container ########################### //\n // ################################################################### //\n\n /**\n * @returns {DOMElement} container\n */\n _createMousePositionPanelHeaderElement: function _createMousePositionPanelHeaderElement() {\n var container = document.createElement(\"div\");\n container.className = \"GPpanelHeader\";\n var divTitle = document.createElement(\"div\");\n divTitle.className = \"GPpanelTitle\";\n divTitle.innerHTML = \"Coordonnées\";\n container.appendChild(divTitle);\n var divClose = document.createElement(\"div\");\n divClose.id = \"GPmousePositionPanelClose\";\n divClose.className = \"GPpanelClose\";\n divClose.title = \"Fermer le panneau\";\n\n // Link panel close / visibility checkbox\n var self = this;\n if (divClose.addEventListener) {\n divClose.addEventListener(\"click\", function () {\n document.getElementById(self._addUID(\"GPshowMousePositionPicto\")).click();\n }, false);\n } else if (divClose.attachEvent) {\n divClose.attachEvent(\"onclick\", function () {\n document.getElementById(self._addUID(\"GPshowMousePositionPicto\")).click();\n });\n }\n container.appendChild(divClose);\n return container;\n },\n /**\n * coordinate panel\n * @param {Boolean} [displayAltitude] - specifies if the altitude panel must be displayed\n * @param {Boolean} [displayCoordinates] - specifies if the coordinates panel must be displayed\n * @param {Boolean} [editCoordinates] - specifies if the coordinates edition is allowed\n * @param {Boolean} [currentProjectionUnits] - specifies if the current projection units\n *\n * FIXME\n * call this._createMousePositionPanelBasicCoordinateElement\n * call this._createMousePositionPanelBasicAltitudeElement\n *\n * @returns {DOMElement} DOM element\n */\n _createMousePositionPanelBasicElement: function _createMousePositionPanelBasicElement(displayAltitude, displayCoordinates, editCoordinates, currentProjectionUnits) {\n // default Values\n displayAltitude = typeof displayAltitude === \"undefined\" ? true : displayAltitude;\n displayCoordinates = typeof displayCoordinates === \"undefined\" ? true : displayCoordinates;\n editCoordinates = typeof editCoordinates === \"undefined\" ? false : editCoordinates;\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPmousePositionBasicPanel\");\n\n // FIXME on devrait decomposer la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n container.appendChild(this._createMousePositionPanelBasicCoordinateElement(displayCoordinates, editCoordinates, currentProjectionUnits));\n container.appendChild(this._createMousePositionPanelEditToolsElement(editCoordinates));\n container.appendChild(this._createMousePositionPanelBasicAltitudeElement(displayAltitude));\n return container;\n },\n /**\n * create coordinate elements\n *\n * @param {String} coordType - (\"Lon\" ou \"Lat\")\n * @param {Boolean} [editCoordinates=false] - specifies if the coordinates edition is allowed\n *\n * @returns {Array} list of DOM elements\n */\n _createCoordinateElement: function _createCoordinateElement(coordType, editCoordinates) {\n var context = this;\n if ([\"Lon\", \"Lat\"].indexOf(coordType) === -1) {\n return [];\n }\n var list = [];\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPmousePosition\" + coordType);\n input.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n input.readOnly = true;\n if (editCoordinates) {\n input.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(true);\n });\n input.addEventListener(\"change\", function (e) {\n this.classList.remove(\"error\");\n var valid = context.validateExtentCoordinate(coordType, this.value, e);\n valid ? this.classList.remove(\"error\") : this.classList.add(\"error\");\n });\n }\n list.push(input);\n var span = document.createElement(\"span\");\n span.className = \"GPmousePositionUnits\";\n list.push(span);\n return list;\n },\n /**\n *\n * @param {String} coordType - (\"Lon\" ou \"Lat\")\n * @param {Boolean} [editCoordinates=false] - specifies if the coordinates edition is allowed\n *\n * @returns {Array} list of DOM elements\n */\n _createDMSCoordinateElement: function _createDMSCoordinateElement(coordType, editCoordinates) {\n if ([\"Lon\", \"Lat\"].indexOf(coordType) === -1) {\n return [];\n }\n var context = this;\n var list = [];\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPmousePosition\" + coordType + \"Degrees\");\n input.className = \"GPSexagesimal\";\n input.setAttribute(\"name\", \"degrees\");\n input.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n input.readOnly = true;\n input.dataset.min = 0;\n input.dataset.max = coordType === \"Lon\" ? 180 : 90;\n if (editCoordinates) {\n input.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(true);\n });\n input.addEventListener(\"change\", function () {\n this.classList.remove(\"error\");\n var valid = context._checkDMSDegrees(coordType, this);\n valid ? this.classList.remove(\"error\") : this.classList.add(\"error\");\n });\n }\n list.push(input);\n var span = document.createElement(\"span\");\n span.className = \"GPmousePositionSexagesimalLabel\";\n span.innerHTML = \"°\";\n list.push(span);\n var input1 = document.createElement(\"input\");\n input1.id = this._addUID(\"GPmousePosition\" + coordType + \"Minutes\");\n input1.className = \"GPSexagesimal\";\n input1.setAttribute(\"name\", \"minutes\");\n input1.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n input1.readOnly = true;\n input1.dataset.min = 0;\n input1.dataset.max = 59;\n if (editCoordinates) {\n input1.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(true);\n });\n input1.addEventListener(\"change\", function () {\n this.classList.remove(\"error\");\n var valid = context._checkDMSElement(this);\n valid ? this.classList.remove(\"error\") : this.classList.add(\"error\");\n });\n }\n list.push(input1);\n var span1 = document.createElement(\"span\");\n span1.className = \"GPmousePositionSexagesimalLabel\";\n span1.innerHTML = \"'\";\n list.push(span1);\n var input2 = document.createElement(\"input\");\n input2.id = this._addUID(\"GPmousePosition\" + coordType + \"Seconds\");\n input2.className = \"GPSexagesimalsec\";\n input2.setAttribute(\"name\", \"seconds\");\n input2.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n input2.readOnly = true;\n input2.dataset.min = 0;\n input2.dataset.max = 59;\n if (editCoordinates) {\n input2.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(true);\n });\n input2.addEventListener(\"change\", function () {\n this.classList.remove(\"error\");\n var valid = context._checkDMSElement(this, true);\n valid ? this.classList.remove(\"error\") : this.classList.add(\"error\");\n });\n }\n list.push(input2);\n var span2 = document.createElement(\"span\");\n span2.className = \"GPmousePositionSexagesimalLabel\";\n span2.innerHTML = \"''\";\n list.push(span2);\n var select = document.createElement(\"select\");\n select.id = this._addUID(\"GPmousePosition\" + coordType + \"Direction\");\n select.className = \"GPmousePositionDirection\";\n select.setAttribute(\"name\", \"direction\");\n select.disabled = true;\n var option = document.createElement(\"option\");\n option.value = coordType === \"Lon\" ? \"E\" : \"N\";\n option.innerHTML = coordType === \"Lon\" ? \"E\" : \"N\";\n select.appendChild(option);\n var option1 = document.createElement(\"option\");\n option1.value = coordType === \"Lon\" ? \"O\" : \"S\";\n option1.innerHTML = coordType === \"Lon\" ? \"O\" : \"S\";\n select.appendChild(option1);\n list.push(select);\n return list;\n },\n /**\n * @param {Boolean} [display=false] - specifies if the coordinates panel must be displayed\n * @param {Boolean} [editCoordinates] - specifies if the coordinates edition is allowed\n * @param {Boolean} [currentProjectionUnits] - specifies if the current projection units\n *\n * @returns {DOMElement} container\n */\n _createMousePositionPanelBasicCoordinateElement: function _createMousePositionPanelBasicCoordinateElement(display, editCoordinates, currentProjectionUnits) {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPmousePositionCoordinate\");\n div.style.display = display ? \"block\" : \"none\";\n\n // latitude\n var divLat = document.createElement(\"div\");\n var spanLat = document.createElement(\"span\");\n spanLat.className = \"GPmousePositionLabel\";\n spanLat.id = this._addUID(\"GPmousePositionLatLabel\");\n spanLat.innerHTML = \"Latitude : \";\n divLat.appendChild(spanLat);\n var span = document.createElement(\"span\");\n span.id = this._addUID(\"GPmousePositionLatCoordinate\");\n var arrayCoords;\n if (currentProjectionUnits === \"DMS\") {\n arrayCoords = this._createDMSCoordinateElement(\"Lat\", editCoordinates);\n } else {\n arrayCoords = this._createCoordinateElement(\"Lat\", editCoordinates);\n }\n for (var i = 0; i < arrayCoords.length; i++) {\n span.appendChild(arrayCoords[i]);\n }\n divLat.appendChild(span);\n div.appendChild(divLat);\n\n // longitude\n var divLon = document.createElement(\"div\");\n var spanLon = document.createElement(\"span\");\n spanLon.className = \"GPmousePositionLabel\";\n spanLon.id = this._addUID(\"GPmousePositionLonLabel\");\n spanLon.innerHTML = \"Longitude : \";\n divLon.appendChild(spanLon);\n var span1 = document.createElement(\"span\");\n span1.id = this._addUID(\"GPmousePositionLonCoordinate\");\n var arrayCoords1;\n if (currentProjectionUnits === \"DMS\") {\n arrayCoords1 = this._createDMSCoordinateElement(\"Lon\", editCoordinates);\n } else {\n arrayCoords1 = this._createCoordinateElement(\"Lon\", editCoordinates);\n }\n for (var j = 0; j < arrayCoords1.length; j++) {\n span1.appendChild(arrayCoords1[j]);\n }\n divLon.appendChild(span1);\n div.appendChild(divLon);\n return div;\n },\n /**\n * @param {Boolean} [display=false] - specifies if the altitude panel must be displayed\n *\n * @returns {DOMElement} container\n */\n _createMousePositionPanelBasicAltitudeElement: function _createMousePositionPanelBasicAltitudeElement(display) {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPmousePositionAltitude\");\n div.style.display = display ? \"block\" : \"none\";\n var spanLabel = document.createElement(\"span\");\n spanLabel.className = \"GPmousePositionLabel\";\n spanLabel.innerHTML = \"Altitude : \";\n div.appendChild(spanLabel);\n var spanAlt = document.createElement(\"span\");\n spanAlt.className = \"GPmousePositionCoords\";\n spanAlt.id = this._addUID(\"GPmousePositionAlt\");\n spanAlt.innerHTML = \"...\";\n div.appendChild(spanAlt);\n var spanUnits = document.createElement(\"span\");\n spanUnits.className = \"GPmousePositionAltitudeUnits\";\n spanUnits.innerHTML = \"m\";\n div.appendChild(spanUnits);\n return div;\n },\n /**\n * @param {Boolean} [editCoordinates=false] - specifies if the coordinates edition is allowed\n *\n * @returns {DOMElement} container\n */\n _createMousePositionPanelEditToolsElement: function _createMousePositionPanelEditToolsElement(editCoordinates) {\n var context = this;\n var div = document.createElement(\"div\");\n div.className = \"GPmousePositionPanelEditTools\";\n div.id = this._addUID(\"GPmousePositionPanelEditTools\");\n if (!editCoordinates) {\n div.style.display = \"none\";\n }\n var span1 = document.createElement(\"span\");\n span1.className = \"GPmousePositionEditTool\";\n span1.id = this._addUID(\"GPmousePositionLocate\");\n span1.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n if (editCoordinates) {\n span1.addEventListener(\"click\", function () {\n context.onMousePositionEditModeLocateClick();\n });\n }\n div.appendChild(span1);\n var span2 = document.createElement(\"span\");\n span2.className = \"GPmousePositionEditTool\";\n span2.id = this._addUID(\"GPmousePositionCloseEdit\");\n span2.title = \"Quitter la saisie des coordonnées\";\n span2.style.display = \"none\";\n if (editCoordinates) {\n span2.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(false);\n });\n }\n div.appendChild(span2);\n return div;\n },\n // ################################################################### //\n // #################### Settings container ########################### //\n // ################################################################### //\n\n /**\n * @param {Boolean} [display=false] - specifies if the settings panel must be displayed\n *\n * @returns {DOMElement[]} array containing input and label elements\n */\n _createShowMousePositionSettingsElement: function _createShowMousePositionSettingsElement(display) {\n var list = [];\n var context = this;\n var input = document.createElement(\"input\");\n input.type = \"checkbox\";\n input.id = this._addUID(\"GPshowMousePositionSettings\");\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowMousePositionSettingsPicto\");\n label.htmlFor = this._addUID(\"GPshowMousePositionSettings\");\n label.title = \"Réglages\";\n label.className = \"GPshowMoreOptionsImage GPshowMoreOptions GPshowMousePositionSettingsPicto\"; // FIXME classname and id ?\n label.style.display = display ? \"block\" : \"none\";\n if (label.addEventListener) {\n label.addEventListener(\"click\", function (e) {\n if (typeof context.onShowMousePositionSettingsClick === \"function\") {\n context.onShowMousePositionSettingsClick(e);\n }\n }, false);\n } else if (label.attachEvent) {\n label.attachEvent(\"onclick\", function (e) {\n if (typeof context.onShowMousePositionSettingsClick === \"function\") {\n context.onShowMousePositionSettingsClick(e);\n }\n });\n }\n list.push(input);\n list.push(label);\n return list;\n },\n /**\n * settings panel\n * @param {Boolean} [display=true] - specifies if the settings panel must be displayed\n *\n * FIXME\n * don't call this._createMousePositionSettingsSystemsElement\n * don't call this._createMousePositionSettingsUnitsElement\n *\n * @returns {DOMElement} DOM element\n */\n _createMousePositionSettingsElement: function _createMousePositionSettingsElement(display) {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPmousePositionSettings\");\n container.style.display = display === undefined || display ? \"block\" : \"none\";\n var span = document.createElement(\"span\");\n span.className = \"GPmousePositionSettingsLabel\";\n span.innerHTML = \"Système de référence\";\n container.appendChild(span);\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n // FIXME tableau statique !\n // var systems = [\n // {\n // code : \"GEOGRAPHIC\",\n // label : \"Géographique\"\n // },\n // {\n // code : \"MERCATOR\",\n // label : \"Mercator\"\n // },\n // {\n // code : \"LAMB93\",\n // label : \"Lambert 93\"\n // },\n // {\n // code : \"LAMB2E\",\n // label : \"Lambert II étendu\"\n // }\n // ];\n //\n // var selectSystem = this._createMousePositionSettingsSystemsElement(systems);\n //\n // container.appendChild(selectSystem);\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n // FIXME tableau statique !\n // var units = [\n // {\n // code : \"DEC\",\n // label : \"degrés décimaux\",\n // },\n // {\n // code : \"DMS\",\n // label : \"degrés sexagésimaux\",\n // },\n // {\n // code : \"RAD\",\n // label : \"radians\",\n // },\n // {\n // code : \"GON\",\n // label : \"grades\"\n // }\n // ];\n //\n // var selectUnits = this._createMousePositionSettingsUnitsElement(units);\n //\n // container.appendChild(selectUnits);\n\n return container;\n },\n /**\n * @param {Object[]} systems - list of systems\n *\n * @returns {DOMElement} DOM element select\n */\n _createMousePositionSettingsSystemsElement: function _createMousePositionSettingsSystemsElement(systems) {\n // contexte d'execution\n var context = this;\n var selectSystem = document.createElement(\"select\");\n selectSystem.id = this._addUID(\"GPmousePositionProjectionSystem\");\n selectSystem.className = \"GPinputSelect GPmousePositionSettingsSelect\";\n selectSystem.addEventListener(\"change\", function (e) {\n context.onMousePositionProjectionSystemChange(e);\n });\n selectSystem.addEventListener(\"mouseover\", function (e) {\n // FIXME mettre une condition si target === option\n if (e.target.nodeName !== \"OPTION\") {\n context.onMousePositionProjectionSystemMouseOver(e);\n }\n });\n for (var i = 0; i < systems.length; i++) {\n var obj = systems[i];\n var option = document.createElement(\"option\");\n option.value = obj.code;\n option.text = obj.label || i;\n // option.label = obj.label;\n selectSystem.appendChild(option);\n }\n return selectSystem;\n },\n /**\n * @param {Object[]} units - list of units\n *\n * @returns {DOMElement} DOM element select\n */\n _createMousePositionSettingsUnitsElement: function _createMousePositionSettingsUnitsElement(units) {\n // contexte d'execution\n var context = this;\n var selectUnits = document.createElement(\"select\");\n selectUnits.id = this._addUID(\"GPmousePositionProjectionUnits\");\n selectUnits.className = \"GPinputSelect GPmousePositionSettingsSelect\";\n selectUnits.addEventListener(\"change\", function (e) {\n context.onMousePositionProjectionUnitsChange(e);\n });\n for (var j = 0; j < units.length; j++) {\n var obj = units[j];\n var option = document.createElement(\"option\");\n option.value = obj.code ? obj.code : j;\n option.text = obj.label || j;\n // option.label = obj.label;\n selectUnits.appendChild(option);\n }\n return selectUnits;\n },\n /**\n * @param {String} [currentProjectionType=\"Metric\"] - \"Geographical\" or \"Metric\"\n */\n _resetLabelElements: function _resetLabelElements(currentProjectionType) {\n // Changement des labels dans le formulaire de saisie\n var spanLat = document.getElementById(this._addUID(\"GPmousePositionLatLabel\"));\n spanLat.innerHTML = currentProjectionType === \"Geographical\" ? \"Latitude :\" : \"X :\";\n var spanLon = document.getElementById(this._addUID(\"GPmousePositionLonLabel\"));\n spanLon.innerHTML = currentProjectionType === \"Geographical\" ? \"Longitude :\" : \"Y :\";\n },\n /**\n * @param {String} currentProjectionUnits - projection units\n */\n _resetUnitElements: function _resetUnitElements(currentProjectionUnits) {\n var value = \"\";\n if (currentProjectionUnits === \"M\" || currentProjectionUnits === \"KM\") {\n value = currentProjectionUnits.toLowerCase();\n }\n var elts = document.getElementsByClassName(\"GPmousePositionUnits\");\n for (var e = 0; e < elts.length; e++) {\n elts[e].innerHTML = value;\n }\n },\n /**\n * @param {Boolean} editCoordinates - edit coordinates option\n * @param {String} currentProjectionType - current projection type\n * @param {String} currentProjectionUnits - current projection unit\n */\n _resetCoordinateElements: function _resetCoordinateElements(editCoordinates, currentProjectionType, currentProjectionUnits) {\n // Suppression de tous les enfants de GPmousePositionLatCoordinate\n var latElt = document.getElementById(this._addUID(\"GPmousePositionLatCoordinate\"));\n while (latElt.firstChild) {\n latElt.removeChild(latElt.firstChild);\n }\n var arrayCoords;\n if (currentProjectionUnits === \"DMS\") {\n arrayCoords = this._createDMSCoordinateElement(\"Lat\", editCoordinates);\n } else {\n arrayCoords = this._createCoordinateElement(\"Lat\", editCoordinates);\n }\n for (var i = 0; i < arrayCoords.length; i++) {\n latElt.appendChild(arrayCoords[i]);\n }\n\n // Suppression de tous les enfants de GPmousePositionLonCoordinate\n var lonElt = document.getElementById(this._addUID(\"GPmousePositionLonCoordinate\"));\n while (lonElt.firstChild) {\n lonElt.removeChild(lonElt.firstChild);\n }\n var arrayCoords1;\n if (currentProjectionUnits === \"DMS\") {\n arrayCoords1 = this._createDMSCoordinateElement(\"Lon\", editCoordinates);\n } else {\n arrayCoords1 = this._createCoordinateElement(\"Lon\", editCoordinates);\n }\n for (var j = 0; j < arrayCoords1.length; j++) {\n lonElt.appendChild(arrayCoords1[j]);\n }\n\n // FIXME on simule un deplacement ?\n // this.onMapMove();\n },\n\n /**\n * Set/unset editing mode\n *\n * @param {Boolean} editing - active edit coordinates mode\n */\n _setEditMode: function _setEditMode(editing) {\n var locateElt = document.getElementById(this._addUID(\"GPmousePositionLocate\"));\n locateElt.title = editing ? \"Aller à la position ...\" : \"Cliquer pour saisir des coordonnées\";\n var closeEditElt = document.getElementById(this._addUID(\"GPmousePositionCloseEdit\"));\n closeEditElt.style.display = editing ? \"inline-block\" : \"none\";\n var selector = \"div[id^=\" + this._addUID(\"GPmousePositionCoordinate\") + \"]\";\n var inputs = document.querySelectorAll(selector + \" input\");\n for (var i = 0; i < inputs.length; i++) {\n inputs[i].readOnly = !editing;\n if (editing) {\n inputs[i].value = \"\";\n inputs[i].classList.remove(\"error\");\n }\n }\n var selects = document.querySelectorAll(selector + \" select\");\n for (var j = 0; j < selects.length; j++) {\n selects[j].disabled = !editing;\n }\n },\n /**\n *\n * @param {DOMElement} input - input element\n * @param {Boolean} isFloat - check for float value\n *\n * @returns {Boolean} true if input value is within bounds\n */\n _checkDMSElement: function _checkDMSElement(input, isFloat) {\n var b = isFloat !== undefined;\n var value = input.value;\n if (b) {\n value = value.replace(\",\", \".\");\n }\n if (isNaN(value)) {\n return false;\n }\n var v = parseFloat(value);\n if (!b && (v | 0) !== v) {\n // is it an integer\n return false;\n }\n var min = Number(input.dataset.min);\n var max = Number(input.dataset.max);\n return v >= min && v <= max;\n },\n /**\n * @param {String} coordType - \"Lon\" or \"Lat\"\n * @param {DOMElement} input - input element\n *\n * @returns {Boolean} true if input value is within bounds\n */\n _checkDMSDegrees: function _checkDMSDegrees(coordType, input) {\n if (isNaN(input.value)) {\n return false;\n }\n var v = parseFloat(input.value);\n if ((v | 0) !== v) {\n // is it an integer\n return false;\n }\n var min = Number(input.dataset.min);\n var max = Number(input.dataset.max);\n if (v < min || v > max) {\n return false;\n }\n var inputMinutes = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Minutes\"));\n var inputSeconds = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Seconds\"));\n if (v >= max) {\n inputMinutes.dataset.max = 0;\n inputSeconds.dataset.max = 0;\n } else {\n inputMinutes.dataset.max = 59;\n inputSeconds.dataset.max = 59.9999;\n }\n return true;\n },\n // ################################################################### //\n // ####################### handlers Event ############################ //\n // ################################################################### //\n\n /**\n * Function displaying coordinates from cursor position (desktop)\n * or map center (tactile)\n * @param {Object} coordinate - coordinates\n */\n GPdisplayCoords: function GPdisplayCoords(coordinate) {\n // Compute coords in case of cursor position (desktop)\n if (coordinate) {\n var labelLon = document.getElementById(this._addUID(\"GPmousePositionLonLabel\"));\n var labelLat = document.getElementById(this._addUID(\"GPmousePositionLatLabel\"));\n if (coordinate.x || coordinate.y) {\n labelLat.innerHTML = \"X : \";\n labelLon.innerHTML = \"Y : \";\n } else if (coordinate.e || coordinate.n) {\n labelLat.innerHTML = \"E : \";\n labelLon.innerHTML = \"N : \";\n } else {\n labelLat.innerHTML = \"Latitude : \";\n labelLon.innerHTML = \"Longitude : \";\n }\n if (_typeof(coordinate.lat) === \"object\" && _typeof(coordinate.lng) === \"object\") {\n var parts = {\n lng: \"Lon\",\n lat: \"Lat\"\n };\n var units = [\"Degrees\", \"Minutes\", \"Seconds\"];\n for (var p in parts) {\n for (var u = 0; u < units.length; ++u) {\n var selector = \"GPmousePosition\" + parts[p] + units[u];\n var elt = document.getElementById(this._addUID(selector));\n var key = units[u].charAt(0).toLowerCase();\n elt.value = coordinate[p][key];\n }\n }\n // directions\n document.getElementById(this._addUID(\"GPmousePositionLonDirection\")).value = coordinate.lng.direction;\n document.getElementById(this._addUID(\"GPmousePositionLatDirection\")).value = coordinate.lat.direction;\n } else {\n var elLat = document.getElementById(this._addUID(\"GPmousePositionLat\"));\n var elLon = document.getElementById(this._addUID(\"GPmousePositionLon\"));\n elLat.value = coordinate.x || coordinate.lat || coordinate.e || \"0\";\n elLon.value = coordinate.y || coordinate.lng || coordinate.lon || coordinate.n || \"0\";\n\n // les unites\n var unit = coordinate.unit === undefined ? \"\" : coordinate.unit;\n var elements = document.getElementsByClassName(\"GPmousePositionUnits\");\n for (var n = 0; n < elements.length; ++n) {\n elements[n].innerHTML = unit;\n }\n }\n }\n },\n /**\n * Function displaying altitude from cursor position (desktop)\n * or map center (tactile)\n * @param {Object} coordinate - coordinates\n * @param {Number} altitudeTimeoutDelay - when the mouse stop moving, delay before the altitude request is launched\n * @param {Number} noDataValue - the no data value\n * @param {Number} noDataValueTolerance - the no data value tolerance\n */\n GPdisplayElevation: function GPdisplayElevation(coordinate, altitudeTimeoutDelay, noDataValue, noDataValueTolerance) {\n // contexte d'execution\n var self = this;\n\n // Latency for altitude request\n var altitudeTimeout;\n if (!altitudeTimeoutDelay) {\n altitudeTimeoutDelay = 500;\n }\n clearTimeout(altitudeTimeout);\n document.getElementById(this._addUID(\"GPmousePositionAlt\")).innerHTML = \"...\";\n if (noDataValue == null) {\n noDataValue = -99999;\n }\n if (noDataValueTolerance == null) {\n noDataValueTolerance = 99980;\n }\n var maxThreshold = noDataValue + noDataValueTolerance;\n var minThreshold = noDataValue - noDataValueTolerance;\n\n // Compute coords in case of cursor position (desktop)\n if (coordinate) {\n // If no altitude panel, don't call altitude request\n if (document.getElementById(this._addUID(\"GPmousePositionAltitude\"))) {\n altitudeTimeout = setTimeout(function () {\n self.onRequestAltitude(coordinate, function (z) {\n if (minThreshold < z && z < maxThreshold) {\n self.GPresetElevation();\n } else {\n document.getElementById(self._addUID(\"GPmousePositionAlt\")).innerHTML = z;\n }\n });\n }, altitudeTimeoutDelay);\n }\n }\n },\n /**\n * Function reseting altitude value\n */\n GPresetElevation: function GPresetElevation() {\n if (document.getElementById(this._addUID(\"GPmousePositionAltitude\"))) {\n document.getElementById(this._addUID(\"GPmousePositionAlt\")).innerHTML = \"---\";\n }\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (MousePositionDOM);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ29udHJvbHMvTW91c2VQb3NpdGlvbkRPTS5qcz8xNjljIl0sIm5hbWVzIjpbIk1vdXNlUG9zaXRpb25ET00iLCJfYWRkVUlEIiwiaWQiLCJ1aWQiLCJfdWlkIiwiX2NyZWF0ZU1haW5Db250YWluZXJFbGVtZW50IiwiY29udGFpbmVyIiwiZG9jdW1lbnQiLCJjcmVhdGVFbGVtZW50IiwiY2xhc3NOYW1lIiwiX2NyZWF0ZVNob3dNb3VzZVBvc2l0aW9uRWxlbWVudCIsImlucHV0IiwidHlwZSIsIl9jcmVhdGVTaG93TW91c2VQb3NpdGlvblBpY3RvRWxlbWVudCIsImlzRGVza3RvcCIsInNlbGYiLCJsYWJlbCIsImh0bWxGb3IiLCJ0aXRsZSIsImFkZEV2ZW50TGlzdGVuZXIiLCJlIiwibWFwQ2VudGVyQ2xhc3MiLCJnZXRFbGVtZW50QnlJZCIsImNoZWNrZWQiLCJvblNob3dNb3VzZVBvc2l0aW9uQ2xpY2siLCJzcGFuT3BlbiIsImFwcGVuZENoaWxkIiwiX2NyZWF0ZU1vdXNlUG9zaXRpb25QYW5lbEVsZW1lbnQiLCJwYW5lbCIsIl9jcmVhdGVNYXBDZW50ZXIiLCJkaXYiLCJfY3JlYXRlTW91c2VQb3NpdGlvblBhbmVsSGVhZGVyRWxlbWVudCIsImRpdlRpdGxlIiwiaW5uZXJIVE1MIiwiZGl2Q2xvc2UiLCJjbGljayIsImF0dGFjaEV2ZW50IiwiX2NyZWF0ZU1vdXNlUG9zaXRpb25QYW5lbEJhc2ljRWxlbWVudCIsImRpc3BsYXlBbHRpdHVkZSIsImRpc3BsYXlDb29yZGluYXRlcyIsImVkaXRDb29yZGluYXRlcyIsImN1cnJlbnRQcm9qZWN0aW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PcHRpb25zIEdQc2hvd01vdXNlUG9zaXRpb25TZXR0aW5nc1BpY3RvXCI7IC8vIEZJWE1FIGNsYXNzbmFtZSBhbmQgaWQgP1xuICAgICAgICBsYWJlbC5zdHlsZS5kaXNwbGF5ID0gZGlzcGxheSA/IFwiYmxvY2tcIiA6IFwibm9uZVwiO1xuICAgICAgICBpZiAobGFiZWwuYWRkRXZlbnRMaXN0ZW5lcikge1xuICAgICAgICAgICAgbGFiZWwuYWRkRXZlbnRMaXN0ZW5lcihcImNsaWNrXCIsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBjb250ZXh0Lm9uU2hvd01vdXNlUG9zaXRpb25TZXR0aW5nc0NsaWNrID09PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5vblNob3dNb3VzZVBvc2l0aW9uU2V0dGluZ3NDbGljayhlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCBmYWxzZSk7XG4gICAgICAgIH0gZWxzZSBpZiAobGFiZWwuYXR0YWNoRXZlbnQpIHtcbiAgICAgICAgICAgIGxhYmVsLmF0dGFjaEV2ZW50KFwib25jbGlja1wiLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgY29udGV4dC5vblNob3dNb3VzZVBvc2l0aW9uU2V0dGluZ3NDbGljayA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQub25TaG93TW91c2VQb3NpdGlvblNldHRpbmdzQ2xpY2soZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICBsaXN0LnB1c2goaW5wdXQpO1xuICAgICAgICBsaXN0LnB1c2gobGFiZWwpO1xuXG4gICAgICAgIHJldHVybiBsaXN0O1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBzZXR0aW5ncyB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24gZGVjb21wb3NlIGxhIGZvbmN0aW9uIHBvdXIgbGVzIGJlc29pbnMgZHUgY29udHJvbGUsXG4gICAgICAgIC8vIG9uIGFqb3V0ZXJhIGNlcyBjaGlsZHMgw6AgbGEgbWFpbi4uLlxuICAgICAgICAvLyBGSVhNRSB0YWJsZWF1IHN0YXRpcXVlICFcbiAgICAgICAgLy8gdmFyIHN5c3RlbXMgPSBbXG4gICAgICAgIC8vICAgICB7XG4gICAgICAgIC8vICAgICAgICAgY29kZSA6IFwiR0VPR1JBUEhJQ1wiLFxuICAgICAgICAvLyAgICAgICAgIGxhYmVsIDogXCJHw6lvZ3JhcGhpcXVlXCJcbiAgICAgICAgLy8gICAgIH0sXG4gICAgICAgIC8vICAgICB7XG4gICAgICAgIC8vICAgICAgICAgY29kZSA6IFwiTUVSQ0FUT1JcIixcbiAgICAgICAgLy8gICAgICAgICBsYWJlbCA6IFwiTWVyY2F0b3JcIlxuICAgICAgICAvLyAgICAgfSxcbiAgICAgICAgLy8gICAgIHtcbiAgICAgICAgLy8gICAgICAgICBjb2RlIDogXCJMQU1COTNcIixcbiAgICAgICAgLy8gICAgICAgICBsYWJlbCA6IFwiTGFtYmVydCA5M1wiXG4gICAgICAgIC8vICAgICB9LFxuICAgICAgICAvLyAgICAge1xuICAgICAgICAvLyAgICAgICAgIGNvZGUgOiBcIkxBTUIyRVwiLFxuICAgICAgICAvLyAgICAgICAgIGxhYmVsIDogXCJMYW1iZXJ0IElJIMOpdGVuZHVcIlxuICAgICAgICAvLyAgICAgfVxuICAgICAgICAvLyBdO1xuICAgICAgICAvL1xuICAgICAgICAvLyB2YXIgc2VsZWN0U3lzdGVtID0gdGhpcy5fY3JlYXRlTW91c2VQb3NpdGlvblNldHRpbmdzU3lzdGVtc0VsZW1lbnQoc3lzdGVtcyk7XG4gICAgICAgIC8vXG4gICAgICAgIC8vIGNvbnRhaW5lci5hcHBlbmRDaGlsZChzZWxlY3RTeXN0ZW0pO1xuXG4gICAgICAgIC8vIEZJWE1FIG9uIGRlY29tcG9zZSBsYSBmb25jdGlvbiBwb3VyIGxlcyBiZXNvaW5zIGR1IGNvbnRyb2xlLFxuICAgICAgICAvLyBvbiBham91dGVyYSBjZXMgY2hpbGRzIMOgIGxhIG1haW4uLi5cbiAgICAgICAgLy8gRklYTUUgdGFibGVhdSBzdGF0aXF1ZSAhXG4gICAgICAgIC8vIHZhciB1bml0cyA9IFtcbiAgICAgICAgLy8gICAgIHtcbiAgICAgICAgLy8gICAgICAgICBjb2RlIDogXCJERUNcIixcbiAgICAgICAgLy8gICAgICAgICBsYWJlbCA6IFwiZGVncsOpcyBkw6ljaW1hdXhcIixcbiAgICAgICAgLy8gICAgIH0sXG4gICAgICAgIC8vICAgICB7XG4gICAgICAgIC8vICAgICAgICAgY29kZSA6IFwiRE1TXCIsXG4gICAgICAgIC8vICAgICAgICAgbGFiZWwgOiBcImRlZ3LDqXMgc2V4YWfDqXNpbWF1eFwiLFxuICAgICAgICAvLyAgICAgfSxcbiAgICAgICAgLy8gICAgIHtcbiAgICAgICAgLy8gICAgICAgICBjb2RlIDogXCJSQURcIixcbiAgICAgICAgLy8gICAgICAgICBsYWJlbCA6IFwicmFkaWFuc1wiLFxuICAgICAgICAvLyAgICAgfSxcbiAgICAgICAgLy8gICAgIHtcbiAgICAgICAgLy8gICAgICAgICBjb2RlIDogXCJHT05cIixcbiAgICAgICAgLy8gICAgICAgICBsYWJlbCA6IFwiZ3JhZGVzXCJcbiAgICAgICAgLy8gICAgIH1cbiAgICAgICAgLy8gXTtcbiAgICAgICAgLy9cbiAgICAgICAgLy8gdmFyIHNlbGVjdFVuaXRzID0gdGhpcy5fY3JlYXRlTW91c2VQb3NpdGlvblNldHRpbmdzVW5pdHNFbGVtZW50KHVuaXRzKTtcbiAgICAgICAgLy9cbiAgICAgICAgLy8gY29udGFpbmVyLmFwcGVuZENoaWxkKHNlbGVjdFVuaXRzKTtcblxuICAgICAgICByZXR1cm4gY29udGFpbmVyO1xuICAgIH0sXG5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ICAgICAgICAgICAgIGNvbnRleHQub25Nb3VzZVBvc2l0aW9uUHJvamVjdGlvblN5c3RlbU1vdXNlT3ZlcihlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBzeXN0ZW1zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgb2JqID0gc3lzdGVtc1tpXTtcbiAgICAgICAgICAgIHZhciBvcHRpb24gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwib3B0aW9uXCIpO1xuICAgICAgICAgICAgb3B0aW9uLnZhbHVlID0gb2JqLmNvZGU7XG4gICAgICAgICAgICBvcHRpb24udGV4dCA9IG9iai5sYWJlbCB8fCBpO1xuICAgICAgICAgICAgLy8gb3B0aW9uLmxhYmVsID0gb2JqLmxhYmVsO1xuICAgICAgICAgICAgc2VsZWN0U3lzdGVtLmFwcGVuZENoaWxkKG9wdGlvbik7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gc2VsZWN0U3lzdGVtO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBAcGFyYW0ge09iamVjdFtdfSB1bml0cyAtIGxpc3Qgb2YgdW5pdHNcbiAgICAgKlxuICAgICAqIEByZXR1cm5zIHtET01FbGVtZW50fSBET00gZWxlbWVudCBzZWxlY3RcbiAgICAgKi9cbiAgICBfY3JlYXRlTW91c2VQb3NpdGlvblNldHRpbmdzVW5pdHNFbGVtZW50IDogZnVuY3Rpb24gKHVuaXRzKSB7XG4gICAgICAgIC8vIGNvbnRleHRlIGQnZXhlY3V0aW9uXG4gICAgICAgIHZhciBjb250ZXh0ID0gdGhpcztcblxuICAgICAgICB2YXIgc2VsZWN0VW5pdHMgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwic2VsZWN0XCIpO1xuICAgICAgICBzZWxlY3RVbml0cy5pZCA9IHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvblByb2plY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Sk7XG4gICAgICAgIGlmICgodiB8IDApICE9PSB2KSB7IC8vIGlzIGl0IGFuIGludGVnZXJcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBtaW4gPSBOdW1iZXIoaW5wdXQuZGF0YXNldC5taW4pO1xuICAgICAgICB2YXIgbWF4ID0gTnVtYmVyKGlucHV0LmRhdGFzZXQubWF4KTtcbiAgICAgICAgaWYgKHYgPCBtaW4gfHwgdiA+IG1heCkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGlucHV0TWludXRlcyA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvblwiICsgY29vcmRUeXBlICsgXCJNaW51dGVzXCIpKTtcbiAgICAgICAgdmFyIGlucHV0U2Vjb25kcyA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvblwiICsgY29vcmRUeXBlICsgXCJTZWNvbmRzXCIpKTtcblxuICAgICAgICBpZiAodiA+PSBtYXgpIHtcbiAgICAgICAgICAgIGlucHV0TWludXRlcy5kYXRhc2V0Lm1heCA9IDA7XG4gICAgICAgICAgICBpbnB1dFNlY29uZHMuZGF0YXNldC5tYXggPSAwO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaW5wdXRNaW51dGVzLmRhdGFzZXQubWF4ID0gNTk7XG4gICAgICAgICAgICBpbnB1dFNlY29uZHMuZGF0YXNldC5tYXggPSA1OS45OTk5O1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfSxcblxuICAgIC8vICMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMgLy9cbiAgICAvLyAjIyMj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ZS5lIHx8IGNvb3JkaW5hdGUubikge1xuICAgICAgICAgICAgICAgIGxhYmVsTGF0LmlubmVySFRNTCA9IFwiRSA6IFwiO1xuICAgICAgICAgICAgICAgIGxhYmVsTG9uLmlubmVySFRNTCA9IFwiTiA6IFwiO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsYWJlbExhdC5pbm5lckhUTUwgPSBcIkxhdGl0dWRlIDogXCI7XG4gICAgICAgICAgICAgICAgbGFiZWxMb24uaW5uZXJIVE1MID0gXCJMb25naXR1ZGUgOiBcIjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBjb29yZGluYXRlLmxhdCA9PT0gXCJvYmplY3RcIiAmJiB0eXBlb2YgY29vcmRpbmF0ZS5sbmcgPT09IFwib2JqZWN0XCIpIHtcbiAgICAgICAgICAgICAgICB2YXIgcGFydHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGxuZyA6IFwiTG9uXCIsXG4gICAgICAgICAgICAgICAgICAgIGxhdCA6IFwiTGF0XCJcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHZhciB1bml0cyA9IFtcIkRlZ3JlZXNcIiwgXCJNaW51dGVzXCIsIFwiU2Vjb25kc1wiXTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBwIGluIHBhcnRzKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIHUgPSAwOyB1IDwgdW5pdHMubGVuZ3RoOyArK3UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzZWxlY3RvciA9IFwiR1Btb3VzZVBvc2l0aW9uXCIgKyBwYXJ0c1twXSArIHVuaXRzW3VdO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVsdCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChzZWxlY3RvcikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGtleSA9IHV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GUgcGFuZWwsIGRvbid0IGNhbGwgYWx0aXR1ZGUgcmVxdWVzdFxuICAgICAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkFsdGl0dWRlXCIpKSkge1xuICAgICAgICAgICAgICAgIGFsdGl0dWRlVGltZW91dCA9IHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLm9uUmVxdWVzdEFsdGl0dWRlKGNvb3JkaW5hdGUsIGZ1bmN0aW9uICh6KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobWluVGhyZXNob2xkIDwgeiAmJiB6IDwgbWF4VGhyZXNob2xkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5HUHJlc2V0RWxldmF0aW9uKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNlbGYuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkFsdFwiKSkuaW5uZXJIVE1MID0gejtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSwgYWx0aXR1ZGVUaW1lb3V0RGVsYXkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIEZ1bmN0aW9uIHJlc2V0aW5nIGFsdGl0dWRlIHZhbHVlXG4gICAgICovXG4gICAgR1ByZXNldEVsZXZhdGlvbiA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkFsdGl0dWRlXCIpKSkge1xuICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQodGhpcy5fYWRkVUlEKFwiR1Btb3VzZVBvc2l0aW9uQWx0XCIpKS5pbm5lckhUTUwgPSBcIi0tLVwiO1xuICAgICAgICB9XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgTW91c2VQb3NpdGlvbkRPTTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/Controls/MousePositionDOM.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar MousePositionDOM = {\n /**\n * Add uuid to the tag ID\n * @param {String} id - id selector\n * @returns {String} uid - id selector with an unique id\n */\n _addUID: function _addUID(id) {\n var uid = this._uid ? id + \"-\" + this._uid : id;\n return uid;\n },\n /**\n * Main container (DOM)\n *\n * @returns {DOMElement} DOM element\n */\n _createMainContainerElement: function _createMainContainerElement() {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPmousePosition\");\n container.className = \"GPwidget\";\n return container;\n },\n // ################################################################### //\n // ################### Methods of main container ##################### //\n // ################################################################### //\n\n /**\n * Hidden checkbox for minimizing/maximizing\n *\n * @returns {DOMElement} DOM element\n */\n _createShowMousePositionElement: function _createShowMousePositionElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPshowMousePosition\");\n input.type = \"checkbox\";\n return input;\n },\n /**\n * Show mouse position control\n * @param {Boolean} isDesktop - specifies if the support is desktop or tactile\n *\n * @returns {DOMElement} DOM element\n */\n _createShowMousePositionPictoElement: function _createShowMousePositionPictoElement(isDesktop) {\n // contexte d'execution\n var self = this;\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowMousePositionPicto\");\n label.className = \"GPshowAdvancedToolPicto\";\n label.htmlFor = this._addUID(\"GPshowMousePosition\");\n label.title = \"Afficher les coordonnées du curseur\";\n\n // FIXME detection disponible dans le JS !\n // Detection : test for desktop or tactile\n // var isDesktop = true;\n // var userAgent = window.navigator.userAgent.toLowerCase();\n // if (userAgent.indexOf(\"iphone\") !== -1 ||\n // userAgent.indexOf(\"ipod\") !== -1 ||\n // userAgent.indexOf(\"ipad\") !== -1 ||\n // userAgent.indexOf(\"android\") !== -1 ||\n // userAgent.indexOf(\"mobile\") !== -1 ||\n // userAgent.indexOf(\"blackberry\") !== -1 ||\n // userAgent.indexOf(\"tablet\") !== -1 ||\n // userAgent.indexOf(\"phone\") !== -1 ||\n // userAgent.indexOf(\"touch\") !== -1 ) {\n // isDesktop = false;\n // }\n // if (userAgent.indexOf(\"msie\") !== -1 ||\n // userAgent.indexOf(\"trident\") !== -1) {\n // isDesktop = true;\n // }\n\n // Show map center localisation if panel opened and tactile support\n label.addEventListener(\"click\", function (e) {\n var mapCenterClass = \"\";\n if (!document.getElementById(self._addUID(\"GPshowMousePosition\")).checked && !isDesktop) {\n mapCenterClass = \"GPmapCenterVisible\";\n }\n document.getElementById(\"GPmapCenter\").className = mapCenterClass;\n self.onShowMousePositionClick(e);\n });\n var spanOpen = document.createElement(\"span\");\n spanOpen.id = this._addUID(\"GPshowMousePositionOpen\");\n spanOpen.className = \"GPshowAdvancedToolOpen\";\n label.appendChild(spanOpen);\n return label;\n },\n /**\n * mouse position panel\n *\n * @returns {DOMElement} DOM element\n */\n _createMousePositionPanelElement: function _createMousePositionPanelElement() {\n var panel = document.createElement(\"div\");\n panel.id = this._addUID(\"GPmousePositionPanel\");\n panel.className = \"GPpanel\";\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n // div.appendChild(this._createMousePositionPanelHeaderElement());\n // div.appendChild(this._createMousePositionPanelBasicElement());\n // div.appendChild(this._createShowMousePositionSettingsElement());\n // div.appendChild(this._createMousePositionSettingsElement());\n\n return panel;\n },\n /**\n * Map center localisation (tactile use)\n *\n * @returns {DOMElement} container\n */\n _createMapCenter: function _createMapCenter() {\n var div = document.createElement(\"div\");\n div.id = \"GPmapCenter\";\n div.className = \"\";\n return div;\n },\n // ################################################################### //\n // ####################### Panel container ########################### //\n // ################################################################### //\n\n /**\n * @returns {DOMElement} container\n */\n _createMousePositionPanelHeaderElement: function _createMousePositionPanelHeaderElement() {\n var container = document.createElement(\"div\");\n container.className = \"GPpanelHeader\";\n var divTitle = document.createElement(\"div\");\n divTitle.className = \"GPpanelTitle\";\n divTitle.innerHTML = \"Coordonnées\";\n container.appendChild(divTitle);\n var divClose = document.createElement(\"div\");\n divClose.id = \"GPmousePositionPanelClose\";\n divClose.className = \"GPpanelClose\";\n divClose.title = \"Fermer le panneau\";\n\n // Link panel close / visibility checkbox\n var self = this;\n if (divClose.addEventListener) {\n divClose.addEventListener(\"click\", function () {\n document.getElementById(self._addUID(\"GPshowMousePositionPicto\")).click();\n }, false);\n } else if (divClose.attachEvent) {\n divClose.attachEvent(\"onclick\", function () {\n document.getElementById(self._addUID(\"GPshowMousePositionPicto\")).click();\n });\n }\n container.appendChild(divClose);\n return container;\n },\n /**\n * coordinate panel\n * @param {Boolean} [displayAltitude] - specifies if the altitude panel must be displayed\n * @param {Boolean} [displayCoordinates] - specifies if the coordinates panel must be displayed\n * @param {Boolean} [editCoordinates] - specifies if the coordinates edition is allowed\n * @param {Boolean} [currentProjectionUnits] - specifies if the current projection units\n *\n * FIXME\n * call this._createMousePositionPanelBasicCoordinateElement\n * call this._createMousePositionPanelBasicAltitudeElement\n *\n * @returns {DOMElement} DOM element\n */\n _createMousePositionPanelBasicElement: function _createMousePositionPanelBasicElement(displayAltitude, displayCoordinates, editCoordinates, currentProjectionUnits) {\n // default Values\n displayAltitude = typeof displayAltitude === \"undefined\" ? true : displayAltitude;\n displayCoordinates = typeof displayCoordinates === \"undefined\" ? true : displayCoordinates;\n editCoordinates = typeof editCoordinates === \"undefined\" ? false : editCoordinates;\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPmousePositionBasicPanel\");\n\n // FIXME on devrait decomposer la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n container.appendChild(this._createMousePositionPanelBasicCoordinateElement(displayCoordinates, editCoordinates, currentProjectionUnits));\n container.appendChild(this._createMousePositionPanelEditToolsElement(editCoordinates));\n container.appendChild(this._createMousePositionPanelBasicAltitudeElement(displayAltitude));\n return container;\n },\n /**\n * create coordinate elements\n *\n * @param {String} coordType - (\"Lon\" ou \"Lat\")\n * @param {Boolean} [editCoordinates=false] - specifies if the coordinates edition is allowed\n *\n * @returns {Array} list of DOM elements\n */\n _createCoordinateElement: function _createCoordinateElement(coordType, editCoordinates) {\n var context = this;\n if ([\"Lon\", \"Lat\"].indexOf(coordType) === -1) {\n return [];\n }\n var list = [];\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPmousePosition\" + coordType);\n input.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n input.readOnly = true;\n if (editCoordinates) {\n input.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(true);\n });\n input.addEventListener(\"change\", function (e) {\n this.classList.remove(\"error\");\n var valid = context.validateExtentCoordinate(coordType, this.value, e);\n valid ? this.classList.remove(\"error\") : this.classList.add(\"error\");\n });\n }\n list.push(input);\n var span = document.createElement(\"span\");\n span.className = \"GPmousePositionUnits\";\n list.push(span);\n return list;\n },\n /**\n *\n * @param {String} coordType - (\"Lon\" ou \"Lat\")\n * @param {Boolean} [editCoordinates=false] - specifies if the coordinates edition is allowed\n *\n * @returns {Array} list of DOM elements\n */\n _createDMSCoordinateElement: function _createDMSCoordinateElement(coordType, editCoordinates) {\n if ([\"Lon\", \"Lat\"].indexOf(coordType) === -1) {\n return [];\n }\n var context = this;\n var list = [];\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPmousePosition\" + coordType + \"Degrees\");\n input.className = \"GPSexagesimal\";\n input.setAttribute(\"name\", \"degrees\");\n input.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n input.readOnly = true;\n input.dataset.min = 0;\n input.dataset.max = coordType === \"Lon\" ? 180 : 90;\n if (editCoordinates) {\n input.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(true);\n });\n input.addEventListener(\"change\", function () {\n this.classList.remove(\"error\");\n var valid = context._checkDMSDegrees(coordType, this);\n valid ? this.classList.remove(\"error\") : this.classList.add(\"error\");\n });\n }\n list.push(input);\n var span = document.createElement(\"span\");\n span.className = \"GPmousePositionSexagesimalLabel\";\n span.innerHTML = \"°\";\n list.push(span);\n var input1 = document.createElement(\"input\");\n input1.id = this._addUID(\"GPmousePosition\" + coordType + \"Minutes\");\n input1.className = \"GPSexagesimal\";\n input1.setAttribute(\"name\", \"minutes\");\n input1.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n input1.readOnly = true;\n input1.dataset.min = 0;\n input1.dataset.max = 59;\n if (editCoordinates) {\n input1.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(true);\n });\n input1.addEventListener(\"change\", function () {\n this.classList.remove(\"error\");\n var valid = context._checkDMSElement(this);\n valid ? this.classList.remove(\"error\") : this.classList.add(\"error\");\n });\n }\n list.push(input1);\n var span1 = document.createElement(\"span\");\n span1.className = \"GPmousePositionSexagesimalLabel\";\n span1.innerHTML = \"'\";\n list.push(span1);\n var input2 = document.createElement(\"input\");\n input2.id = this._addUID(\"GPmousePosition\" + coordType + \"Seconds\");\n input2.className = \"GPSexagesimalsec\";\n input2.setAttribute(\"name\", \"seconds\");\n input2.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n input2.readOnly = true;\n input2.dataset.min = 0;\n input2.dataset.max = 59;\n if (editCoordinates) {\n input2.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(true);\n });\n input2.addEventListener(\"change\", function () {\n this.classList.remove(\"error\");\n var valid = context._checkDMSElement(this, true);\n valid ? this.classList.remove(\"error\") : this.classList.add(\"error\");\n });\n }\n list.push(input2);\n var span2 = document.createElement(\"span\");\n span2.className = \"GPmousePositionSexagesimalLabel\";\n span2.innerHTML = \"''\";\n list.push(span2);\n var select = document.createElement(\"select\");\n select.id = this._addUID(\"GPmousePosition\" + coordType + \"Direction\");\n select.className = \"GPmousePositionDirection\";\n select.setAttribute(\"name\", \"direction\");\n select.disabled = true;\n var option = document.createElement(\"option\");\n option.value = coordType === \"Lon\" ? \"E\" : \"N\";\n option.innerHTML = coordType === \"Lon\" ? \"E\" : \"N\";\n select.appendChild(option);\n var option1 = document.createElement(\"option\");\n option1.value = coordType === \"Lon\" ? \"O\" : \"S\";\n option1.innerHTML = coordType === \"Lon\" ? \"O\" : \"S\";\n select.appendChild(option1);\n list.push(select);\n return list;\n },\n /**\n * @param {Boolean} [display=false] - specifies if the coordinates panel must be displayed\n * @param {Boolean} [editCoordinates] - specifies if the coordinates edition is allowed\n * @param {Boolean} [currentProjectionUnits] - specifies if the current projection units\n *\n * @returns {DOMElement} container\n */\n _createMousePositionPanelBasicCoordinateElement: function _createMousePositionPanelBasicCoordinateElement(display, editCoordinates, currentProjectionUnits) {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPmousePositionCoordinate\");\n div.style.display = display ? \"block\" : \"none\";\n\n // latitude\n var divLat = document.createElement(\"div\");\n var spanLat = document.createElement(\"span\");\n spanLat.className = \"GPmousePositionLabel\";\n spanLat.id = this._addUID(\"GPmousePositionLatLabel\");\n spanLat.innerHTML = \"Latitude : \";\n divLat.appendChild(spanLat);\n var span = document.createElement(\"span\");\n span.id = this._addUID(\"GPmousePositionLatCoordinate\");\n var arrayCoords;\n if (currentProjectionUnits === \"DMS\") {\n arrayCoords = this._createDMSCoordinateElement(\"Lat\", editCoordinates);\n } else {\n arrayCoords = this._createCoordinateElement(\"Lat\", editCoordinates);\n }\n for (var i = 0; i < arrayCoords.length; i++) {\n span.appendChild(arrayCoords[i]);\n }\n divLat.appendChild(span);\n div.appendChild(divLat);\n\n // longitude\n var divLon = document.createElement(\"div\");\n var spanLon = document.createElement(\"span\");\n spanLon.className = \"GPmousePositionLabel\";\n spanLon.id = this._addUID(\"GPmousePositionLonLabel\");\n spanLon.innerHTML = \"Longitude : \";\n divLon.appendChild(spanLon);\n var span1 = document.createElement(\"span\");\n span1.id = this._addUID(\"GPmousePositionLonCoordinate\");\n var arrayCoords1;\n if (currentProjectionUnits === \"DMS\") {\n arrayCoords1 = this._createDMSCoordinateElement(\"Lon\", editCoordinates);\n } else {\n arrayCoords1 = this._createCoordinateElement(\"Lon\", editCoordinates);\n }\n for (var j = 0; j < arrayCoords1.length; j++) {\n span1.appendChild(arrayCoords1[j]);\n }\n divLon.appendChild(span1);\n div.appendChild(divLon);\n return div;\n },\n /**\n * @param {Boolean} [display=false] - specifies if the altitude panel must be displayed\n *\n * @returns {DOMElement} container\n */\n _createMousePositionPanelBasicAltitudeElement: function _createMousePositionPanelBasicAltitudeElement(display) {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPmousePositionAltitude\");\n div.style.display = display ? \"block\" : \"none\";\n var spanLabel = document.createElement(\"span\");\n spanLabel.className = \"GPmousePositionLabel\";\n spanLabel.innerHTML = \"Altitude : \";\n div.appendChild(spanLabel);\n var spanAlt = document.createElement(\"span\");\n spanAlt.className = \"GPmousePositionCoords\";\n spanAlt.id = this._addUID(\"GPmousePositionAlt\");\n spanAlt.innerHTML = \"...\";\n div.appendChild(spanAlt);\n var spanUnits = document.createElement(\"span\");\n spanUnits.className = \"GPmousePositionAltitudeUnits\";\n spanUnits.innerHTML = \"m\";\n div.appendChild(spanUnits);\n return div;\n },\n /**\n * @param {Boolean} [editCoordinates=false] - specifies if the coordinates edition is allowed\n *\n * @returns {DOMElement} container\n */\n _createMousePositionPanelEditToolsElement: function _createMousePositionPanelEditToolsElement(editCoordinates) {\n var context = this;\n var div = document.createElement(\"div\");\n div.className = \"GPmousePositionPanelEditTools\";\n div.id = this._addUID(\"GPmousePositionPanelEditTools\");\n if (!editCoordinates) {\n div.style.display = \"none\";\n }\n var span1 = document.createElement(\"span\");\n span1.className = \"GPmousePositionEditTool\";\n span1.id = this._addUID(\"GPmousePositionLocate\");\n span1.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n if (editCoordinates) {\n span1.addEventListener(\"click\", function () {\n context.onMousePositionEditModeLocateClick();\n });\n }\n div.appendChild(span1);\n var span2 = document.createElement(\"span\");\n span2.className = \"GPmousePositionEditTool\";\n span2.id = this._addUID(\"GPmousePositionCloseEdit\");\n span2.title = \"Quitter la saisie des coordonnées\";\n span2.style.display = \"none\";\n if (editCoordinates) {\n span2.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(false);\n });\n }\n div.appendChild(span2);\n return div;\n },\n // ################################################################### //\n // #################### Settings container ########################### //\n // ################################################################### //\n\n /**\n * @param {Boolean} [display=false] - specifies if the settings panel must be displayed\n *\n * @returns {DOMElement[]} array containing input and label elements\n */\n _createShowMousePositionSettingsElement: function _createShowMousePositionSettingsElement(display) {\n var list = [];\n var context = this;\n var input = document.createElement(\"input\");\n input.type = \"checkbox\";\n input.id = this._addUID(\"GPshowMousePositionSettings\");\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowMousePositionSettingsPicto\");\n label.htmlFor = this._addUID(\"GPshowMousePositionSettings\");\n label.title = \"Réglages\";\n label.className = \"GPshowMoreOptionsImage GPshowMoreOptions GPshowMousePositionSettingsPicto\"; // FIXME classname and id ?\n label.style.display = display ? \"block\" : \"none\";\n if (label.addEventListener) {\n label.addEventListener(\"click\", function (e) {\n if (typeof context.onShowMousePositionSettingsClick === \"function\") {\n context.onShowMousePositionSettingsClick(e);\n }\n }, false);\n } else if (label.attachEvent) {\n label.attachEvent(\"onclick\", function (e) {\n if (typeof context.onShowMousePositionSettingsClick === \"function\") {\n context.onShowMousePositionSettingsClick(e);\n }\n });\n }\n list.push(input);\n list.push(label);\n return list;\n },\n /**\n * settings panel\n * @param {Boolean} [display=true] - specifies if the settings panel must be displayed\n *\n * FIXME\n * don't call this._createMousePositionSettingsSystemsElement\n * don't call this._createMousePositionSettingsUnitsElement\n *\n * @returns {DOMElement} DOM element\n */\n _createMousePositionSettingsElement: function _createMousePositionSettingsElement(display) {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPmousePositionSettings\");\n container.style.display = display === undefined || display ? \"block\" : \"none\";\n var span = document.createElement(\"span\");\n span.className = \"GPmousePositionSettingsLabel\";\n span.innerHTML = \"Système de référence\";\n container.appendChild(span);\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n // FIXME tableau statique !\n // var systems = [\n // {\n // code : \"GEOGRAPHIC\",\n // label : \"Géographique\"\n // },\n // {\n // code : \"MERCATOR\",\n // label : \"Mercator\"\n // },\n // {\n // code : \"LAMB93\",\n // label : \"Lambert 93\"\n // },\n // {\n // code : \"LAMB2E\",\n // label : \"Lambert II étendu\"\n // }\n // ];\n //\n // var selectSystem = this._createMousePositionSettingsSystemsElement(systems);\n //\n // container.appendChild(selectSystem);\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n // FIXME tableau statique !\n // var units = [\n // {\n // code : \"DEC\",\n // label : \"degrés décimaux\",\n // },\n // {\n // code : \"DMS\",\n // label : \"degrés sexagésimaux\",\n // },\n // {\n // code : \"RAD\",\n // label : \"radians\",\n // },\n // {\n // code : \"GON\",\n // label : \"grades\"\n // }\n // ];\n //\n // var selectUnits = this._createMousePositionSettingsUnitsElement(units);\n //\n // container.appendChild(selectUnits);\n\n return container;\n },\n /**\n * @param {Object[]} systems - list of systems\n *\n * @returns {DOMElement} DOM element select\n */\n _createMousePositionSettingsSystemsElement: function _createMousePositionSettingsSystemsElement(systems) {\n // contexte d'execution\n var context = this;\n var selectSystem = document.createElement(\"select\");\n selectSystem.id = this._addUID(\"GPmousePositionProjectionSystem\");\n selectSystem.className = \"GPinputSelect GPmousePositionSettingsSelect\";\n selectSystem.addEventListener(\"change\", function (e) {\n context.onMousePositionProjectionSystemChange(e);\n });\n selectSystem.addEventListener(\"mouseover\", function (e) {\n // FIXME mettre une condition si target === option\n if (e.target.nodeName !== \"OPTION\") {\n context.onMousePositionProjectionSystemMouseOver(e);\n }\n });\n for (var i = 0; i < systems.length; i++) {\n var obj = systems[i];\n var option = document.createElement(\"option\");\n option.value = obj.code;\n option.text = obj.label || i;\n // option.label = obj.label;\n selectSystem.appendChild(option);\n }\n return selectSystem;\n },\n /**\n * @param {Object[]} units - list of units\n *\n * @returns {DOMElement} DOM element select\n */\n _createMousePositionSettingsUnitsElement: function _createMousePositionSettingsUnitsElement(units) {\n // contexte d'execution\n var context = this;\n var selectUnits = document.createElement(\"select\");\n selectUnits.id = this._addUID(\"GPmousePositionProjectionUnits\");\n selectUnits.className = \"GPinputSelect GPmousePositionSettingsSelect\";\n selectUnits.addEventListener(\"change\", function (e) {\n context.onMousePositionProjectionUnitsChange(e);\n });\n for (var j = 0; j < units.length; j++) {\n var obj = units[j];\n var option = document.createElement(\"option\");\n option.value = obj.code ? obj.code : j;\n option.text = obj.label || j;\n // option.label = obj.label;\n selectUnits.appendChild(option);\n }\n return selectUnits;\n },\n /**\n * @param {String} [currentProjectionType=\"Metric\"] - \"Geographical\" or \"Metric\"\n */\n _resetLabelElements: function _resetLabelElements(currentProjectionType) {\n // Changement des labels dans le formulaire de saisie\n var spanLat = document.getElementById(this._addUID(\"GPmousePositionLatLabel\"));\n spanLat.innerHTML = currentProjectionType === \"Geographical\" ? \"Latitude :\" : \"X :\";\n var spanLon = document.getElementById(this._addUID(\"GPmousePositionLonLabel\"));\n spanLon.innerHTML = currentProjectionType === \"Geographical\" ? \"Longitude :\" : \"Y :\";\n },\n /**\n * @param {String} currentProjectionUnits - projection units\n */\n _resetUnitElements: function _resetUnitElements(currentProjectionUnits) {\n var value = \"\";\n if (currentProjectionUnits === \"M\" || currentProjectionUnits === \"KM\") {\n value = currentProjectionUnits.toLowerCase();\n }\n var elts = document.getElementsByClassName(\"GPmousePositionUnits\");\n for (var e = 0; e < elts.length; e++) {\n elts[e].innerHTML = value;\n }\n },\n /**\n * @param {Boolean} editCoordinates - edit coordinates option\n * @param {String} currentProjectionType - current projection type\n * @param {String} currentProjectionUnits - current projection unit\n */\n _resetCoordinateElements: function _resetCoordinateElements(editCoordinates, currentProjectionType, currentProjectionUnits) {\n // Suppression de tous les enfants de GPmousePositionLatCoordinate\n var latElt = document.getElementById(this._addUID(\"GPmousePositionLatCoordinate\"));\n while (latElt.firstChild) {\n latElt.removeChild(latElt.firstChild);\n }\n var arrayCoords;\n if (currentProjectionUnits === \"DMS\") {\n arrayCoords = this._createDMSCoordinateElement(\"Lat\", editCoordinates);\n } else {\n arrayCoords = this._createCoordinateElement(\"Lat\", editCoordinates);\n }\n for (var i = 0; i < arrayCoords.length; i++) {\n latElt.appendChild(arrayCoords[i]);\n }\n\n // Suppression de tous les enfants de GPmousePositionLonCoordinate\n var lonElt = document.getElementById(this._addUID(\"GPmousePositionLonCoordinate\"));\n while (lonElt.firstChild) {\n lonElt.removeChild(lonElt.firstChild);\n }\n var arrayCoords1;\n if (currentProjectionUnits === \"DMS\") {\n arrayCoords1 = this._createDMSCoordinateElement(\"Lon\", editCoordinates);\n } else {\n arrayCoords1 = this._createCoordinateElement(\"Lon\", editCoordinates);\n }\n for (var j = 0; j < arrayCoords1.length; j++) {\n lonElt.appendChild(arrayCoords1[j]);\n }\n\n // FIXME on simule un deplacement ?\n // this.onMapMove();\n },\n\n /**\n * Set/unset editing mode\n *\n * @param {Boolean} editing - active edit coordinates mode\n */\n _setEditMode: function _setEditMode(editing) {\n var locateElt = document.getElementById(this._addUID(\"GPmousePositionLocate\"));\n locateElt.title = editing ? \"Aller à la position ...\" : \"Cliquer pour saisir des coordonnées\";\n var closeEditElt = document.getElementById(this._addUID(\"GPmousePositionCloseEdit\"));\n closeEditElt.style.display = editing ? \"inline-block\" : \"none\";\n var selector = \"div[id^=\" + this._addUID(\"GPmousePositionCoordinate\") + \"]\";\n var inputs = document.querySelectorAll(selector + \" input\");\n for (var i = 0; i < inputs.length; i++) {\n inputs[i].readOnly = !editing;\n if (editing) {\n inputs[i].value = \"\";\n inputs[i].classList.remove(\"error\");\n }\n }\n var selects = document.querySelectorAll(selector + \" select\");\n for (var j = 0; j < selects.length; j++) {\n selects[j].disabled = !editing;\n }\n },\n /**\n *\n * @param {DOMElement} input - input element\n * @param {Boolean} isFloat - check for float value\n *\n * @returns {Boolean} true if input value is within bounds\n */\n _checkDMSElement: function _checkDMSElement(input, isFloat) {\n var b = isFloat !== undefined;\n var value = input.value;\n if (b) {\n value = value.replace(\",\", \".\");\n }\n if (isNaN(value)) {\n return false;\n }\n var v = parseFloat(value);\n if (!b && (v | 0) !== v) {\n // is it an integer\n return false;\n }\n var min = Number(input.dataset.min);\n var max = Number(input.dataset.max);\n return v >= min && v <= max;\n },\n /**\n * @param {String} coordType - \"Lon\" or \"Lat\"\n * @param {DOMElement} input - input element\n *\n * @returns {Boolean} true if input value is within bounds\n */\n _checkDMSDegrees: function _checkDMSDegrees(coordType, input) {\n if (isNaN(input.value)) {\n return false;\n }\n var v = parseFloat(input.value);\n if ((v | 0) !== v) {\n // is it an integer\n return false;\n }\n var min = Number(input.dataset.min);\n var max = Number(input.dataset.max);\n if (v < min || v > max) {\n return false;\n }\n var inputMinutes = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Minutes\"));\n var inputSeconds = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Seconds\"));\n if (v >= max) {\n inputMinutes.dataset.max = 0;\n inputSeconds.dataset.max = 0;\n } else {\n inputMinutes.dataset.max = 59;\n inputSeconds.dataset.max = 59.9999;\n }\n return true;\n },\n // ################################################################### //\n // ####################### handlers Event ############################ //\n // ################################################################### //\n\n /**\n * Function displaying coordinates from cursor position (desktop)\n * or map center (tactile)\n * @param {Object} coordinate - coordinates\n */\n GPdisplayCoords: function GPdisplayCoords(coordinate) {\n // Compute coords in case of cursor position (desktop)\n if (coordinate) {\n var labelLon = document.getElementById(this._addUID(\"GPmousePositionLonLabel\"));\n var labelLat = document.getElementById(this._addUID(\"GPmousePositionLatLabel\"));\n if (coordinate.x || coordinate.y) {\n labelLat.innerHTML = \"X : \";\n labelLon.innerHTML = \"Y : \";\n } else if (coordinate.e || coordinate.n) {\n labelLat.innerHTML = \"E : \";\n labelLon.innerHTML = \"N : \";\n } else {\n labelLat.innerHTML = \"Latitude : \";\n labelLon.innerHTML = \"Longitude : \";\n }\n if (_typeof(coordinate.lat) === \"object\" && _typeof(coordinate.lng) === \"object\") {\n var parts = {\n lng: \"Lon\",\n lat: \"Lat\"\n };\n var units = [\"Degrees\", \"Minutes\", \"Seconds\"];\n for (var p in parts) {\n for (var u = 0; u < units.length; ++u) {\n var selector = \"GPmousePosition\" + parts[p] + units[u];\n var elt = document.getElementById(this._addUID(selector));\n var key = units[u].charAt(0).toLowerCase();\n elt.value = coordinate[p][key];\n }\n }\n // directions\n document.getElementById(this._addUID(\"GPmousePositionLonDirection\")).value = coordinate.lng.direction;\n document.getElementById(this._addUID(\"GPmousePositionLatDirection\")).value = coordinate.lat.direction;\n } else {\n var elLat = document.getElementById(this._addUID(\"GPmousePositionLat\"));\n var elLon = document.getElementById(this._addUID(\"GPmousePositionLon\"));\n elLat.value = coordinate.x || coordinate.lat || coordinate.e || \"0\";\n elLon.value = coordinate.y || coordinate.lng || coordinate.lon || coordinate.n || \"0\";\n\n // les unites\n var unit = coordinate.unit === undefined ? \"\" : coordinate.unit;\n var elements = document.getElementsByClassName(\"GPmousePositionUnits\");\n for (var n = 0; n < elements.length; ++n) {\n elements[n].innerHTML = unit;\n }\n }\n }\n },\n /**\n * Function displaying altitude from cursor position (desktop)\n * or map center (tactile)\n * @param {Object} coordinate - coordinates\n * @param {Number} altitudeTimeoutDelay - when the mouse stop moving, delay before the altitude request is launched\n * @param {Number} noDataValue - the no data value\n * @param {Number} noDataValueTolerance - the no data value tolerance\n */\n GPdisplayElevation: function GPdisplayElevation(coordinate, altitudeTimeoutDelay, noDataValue, noDataValueTolerance) {\n // contexte d'execution\n var self = this;\n\n // Latency for altitude request\n var altitudeTimeout;\n if (!altitudeTimeoutDelay) {\n altitudeTimeoutDelay = 500;\n }\n clearTimeout(altitudeTimeout);\n document.getElementById(this._addUID(\"GPmousePositionAlt\")).innerHTML = \"...\";\n if (noDataValue == null) {\n noDataValue = -99999;\n }\n if (noDataValueTolerance == null) {\n noDataValueTolerance = 99980;\n }\n var maxThreshold = noDataValue + noDataValueTolerance;\n var minThreshold = noDataValue - noDataValueTolerance;\n\n // Compute coords in case of cursor position (desktop)\n if (coordinate) {\n // If no altitude panel, don't call altitude request\n if (document.getElementById(this._addUID(\"GPmousePositionAltitude\"))) {\n altitudeTimeout = setTimeout(function () {\n self.onRequestAltitude(coordinate, function (z) {\n if (minThreshold < z && z < maxThreshold) {\n self.GPresetElevation();\n } else {\n document.getElementById(self._addUID(\"GPmousePositionAlt\")).innerHTML = z;\n }\n });\n }, altitudeTimeoutDelay);\n }\n }\n },\n /**\n * Function reseting altitude value\n */\n GPresetElevation: function GPresetElevation() {\n if (document.getElementById(this._addUID(\"GPmousePositionAltitude\"))) {\n document.getElementById(this._addUID(\"GPmousePositionAlt\")).innerHTML = \"---\";\n }\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (MousePositionDOM);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ29udHJvbHMvTW91c2VQb3NpdGlvbkRPTS5qcz8xNjljIl0sIm5hbWVzIjpbIk1vdXNlUG9zaXRpb25ET00iLCJfYWRkVUlEIiwiaWQiLCJ1aWQiLCJfdWlkIiwiX2NyZWF0ZU1haW5Db250YWluZXJFbGVtZW50IiwiY29udGFpbmVyIiwiZG9jdW1lbnQiLCJjcmVhdGVFbGVtZW50IiwiY2xhc3NOYW1lIiwiX2NyZWF0ZVNob3dNb3Vz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nc0NsaWNrID09PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5vblNob3dNb3VzZVBvc2l0aW9uU2V0dGluZ3NDbGljayhlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCBmYWxzZSk7XG4gICAgICAgIH0gZWxzZSBpZiAobGFiZWwuYXR0YWNoRXZlbnQpIHtcbiAgICAgICAgICAgIGxhYmVsLmF0dGFjaEV2ZW50KFwib25jbGlja1wiLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgY29udGV4dC5vblNob3dNb3VzZVBvc2l0aW9uU2V0dGluZ3NDbGljayA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQub25TaG93TW91c2VQb3NpdGlvblNldHRpbmdzQ2xpY2soZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICBsaXN0LnB1c2goaW5wdXQpO1xuICAgICAgICBsaXN0LnB1c2gobGFiZWwpO1xuXG4gICAgICAgIHJldHVybiBsaXN0O1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBzZXR0aW5ncyBwYW5lbFxuICAgICAqIEBwYXJhbSB7Qm9vbGVhbn0gW2Rpc3BsYXk9dHJ1ZV0gLSBzcGVjaWZpZXMgaWYgdGhlIHNldHRpbmdzIHBhbmVsIG11c3QgYmUgZGlzcGxheWVkXG4gICAgICpcbiAgICAgKiBGSVhNRVxuICAgICAqIGRvbid0IGNhbGwgdGhpcy5fY3JlYXRlTW91c2VQb3NpdGlvblNldHRpbmdzU3lzdGVtc0VsZW1lbnRcbiAgICAgKiBkb24ndCBjYWxsIHRoaXMuX2NyZWF0ZU1vdXNlUG9zaXRpb25TZXR0aW5nc1VuaXRzRWxlbWVudFxuICAgICAqXG4gICAgICogQHJldHVybnMge0RPTUVsZW1lbnR9IERPTSBl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gIC8vICAgICB7XG4gICAgICAgIC8vICAgICAgICAgY29kZSA6IFwiTUVSQ0FUT1JcIixcbiAgICAgICAgLy8gICAgICAgICBsYWJlbCA6IFwiTWVyY2F0b3JcIlxuICAgICAgICAvLyAgICAgfSxcbiAgICAgICAgLy8gICAgIHtcbiAgICAgICAgLy8gICAgICAgICBjb2RlIDogXCJMQU1COTNcIixcbiAgICAgICAgLy8gICAgICAgICBsYWJlbCA6IFwiTGFtYmVydCA5M1wiXG4gICAgICAgIC8vICAgICB9LFxuICAgICAgICAvLyAgICAge1xuICAgICAgICAvLyAgICAgICAgIGNvZGUgOiBcIkxBTUIyRVwiLFxuICAgICAgICAvLyAgICAgICAgIGxhYmVsIDogXCJMYW1iZXJ0IElJIMOpdGVuZHVcIlxuICAgICAgICAvLyAgICAgfVxuICAgICAgICAvLyBdO1xuICAgICAgICAvL1xuICAgICAgICAvLyB2YXIgc2VsZWN0U3lzdGVtID0gdGhpcy5fY3JlYXRlTW91c2VQb3NpdGlvblNldHRpbmdzU3lzdGVtc0VsZW1lbnQoc3lzdGVtcyk7XG4gICAgICAgIC8vXG4gICAgICAgIC8vIGNvbnRhaW5lci5hcHBlbmRDaGlsZChzZWxlY3RTeXN0ZW0pO1xuXG4gICAgICAgIC8vIEZJWE1FIG9uIGRlY29tcG9zZSBsYSBmb25jdGlvbiBwb3VyIGxlcyBiZXNvaW5zIGR1IGNvbnRyb2xlLFxuICAgICAgICAvLyBvbiBham91dGVyYSBjZXMgY2hpbGRzIMOgIGxhIG1haW4uLi5cbiAgICAgICAgLy8gRklYTUUgdGFibGVhdSBzdGF0aXF1ZSAhXG4gICAgICAgIC8vIHZhciB1bml0cyA9IFtcbiAgICAgICAgLy8gICAgIHtcbiAgICAgICAgLy8gICAgICAgICBjb2RlIDogXCJERUNcIixcbiAgICAgICAgLy8gICAgICAgICBsYWJlbCA6IFwiZGVncsOpcyBkw6ljaW1hdXhcIixcbiAgICAgICAgLy8gICAgIH0sXG4gICAgICAgIC8vICAgICB7XG4gICAgICAgIC8vICAgICAgICAgY29kZSA6IFwiRE1TXCIsXG4gICAgICAgIC8vICAgICAgICAgbGFiZWwgOiBcImRlZ3LDqXMgc2V4YWfDqXNpbWF1eFwiLFxuICAgICAgICAvLyAgICAgfSxcbiAgICAgICAgLy8gICAgIHtcbiAgICAgICAgLy8gICAgICAgICBjb2RlIDogXCJSQURcIixcbiAgICAgICAgLy8gICAgICAgICBsYWJlbCA6IFwicmFkaWFuc1wiLFxuICAgICAgICAvLyAgICAgfSxcbiAgICAgICAgLy8gICAgIHtcbiAgICAgICAgLy8gICAgICAgICBjb2RlIDogXCJHT05cIixcbiAgICAgICAgLy8gICAgICAgICBsYWJlbCA6IFwiZ3JhZGVzXCJcbiAgICAgICAgLy8gICAgIH1cbiAgICAgICAgLy8gXTtcbiAgICAgICAgLy9cbiAgICAgICAgLy8gdmFyIHNlbGVjdFVuaXRzID0gdGhpcy5fY3JlYXRlTW91c2VQb3NpdGlvblNldHRpbmdzVW5pdHNFbGVtZW50KHVuaXRzKTtcbiAgICAgICAgLy9cbiAgICAgICAgLy8gY29udGFpbmVyLmFwcGVuZENoaWxkKHNlbGVjdFVuaXRzKTtcblxuICAgICAgICByZXR1cm4gY29udGFpbmVyO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBAcGFyYW0ge09iamVjdFtdfSBzeXN0ZW1zIC0gbGlzdCBvZiBzeXN0ZW1zXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7RE9NRWxlbWVudH0gRE9NIGVsZW1lbnQgc2VsZWN0XG4gICAgICovXG4gICAgX2NyZWF0ZU1vdXNlUG9zaXRpb25TZXR0aW5nc1N5c3RlbXNFbGVtZW50IDogZnVuY3Rpb24gKHN5c3RlbXMpIHtcbiAgICAgICAgLy8gY29udGV4dGUgZCdleGVjdXRpb25cbiAgICAgICAgdmFyIGNvbnRleHQgPSB0aGlzO1xuXG4gICAgICAgIHZhciBzZWxlY3RTeXN0ZW0gPSBkb2N1bWV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C0gY29vcmRpbmF0ZXNcbiAgICAgKi9cbiAgICBHUGRpc3BsYXlDb29yZHMgOiBmdW5jdGlvbiAoY29vcmRpbmF0ZSkge1xuICAgICAgICAvLyBDb21wdXRlIGNvb3JkcyBpbiBjYXNlIG9mIGN1cnNvciBwb3NpdGlvbiAoZGVza3RvcClcbiAgICAgICAgaWYgKGNvb3JkaW5hdGUpIHtcbiAgICAgICAgICAgIHZhciBsYWJlbExvbiA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkxvbkxhYmVsXCIpKTtcbiAgICAgICAgICAgIHZhciBsYWJlbExhdCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkxhdExhYmVsXCIpKTtcblxuICAgICAgICAgICAgaWYgKGNvb3JkaW5hdGUueCB8fCBjb29yZGluYXRlLnkpIHtcbiAgICAgICAgICAgICAgICBsYWJlbExhdC5pbm5lckhUTUwgPSBcIlggOiBcIjtcbiAgICAgICAgICAgICAgICBsYWJlbExvbi5pbm5lckhUTUwgPSBcIlkgOiBcIjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY29vcmRpbmF0ZS5lIHx8IGNvb3JkaW5hdGUubikge1xuICAgICAgICAgICAgICAgIGxhYmVsTGF0LmlubmVySFRNTCA9IFwiRSA6IFwiO1xuICAgICAgICAgICAgICAgIGxhYmVsTG9uLmlubmVySFRNTCA9IFwiTiA6IFwiO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsYWJlbExhdC5pbm5lckhUTUwgPSBcIkxhdGl0dWRlIDogXCI7XG4gICAgICAgICAgICAgICAgbGFiZWxMb24uaW5uZXJIVE1MID0gXCJMb25naXR1ZGUgOiBcIjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBjb29yZGluYXRlLmxhdCA9PT0gXCJvYmplY3RcIiAmJiB0eXBlb2YgY29vcmRpbmF0ZS5sbmcgPT09IFwib2JqZWN0XCIpIHtcbiAgICAgICAgICAgICAgICB2YXIgcGFydHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGxuZyA6IFwiTG9uXCIsXG4gICAgICAgICAgICAgICAgICAgIGxhdCA6IFwiTGF0XCJcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHZhciB1bml0cyA9IFtcIkRlZ3JlZXNcIiwgXCJNaW51dGVzXCIsIFwiU2Vjb25kc1wiXTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBwIGluIHBhcnRzKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIHUgPSAwOyB1IDwgdW5pdHMubGVuZ3RoOyArK3UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzZWxlY3RvciA9IFwiR1Btb3VzZVBvc2l0aW9uXCIgKyBwYXJ0c1twXSArIHVuaXRzW3VdO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVsdCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChzZWxlY3RvcikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGtleSA9IHVuaXRzW3VdLmNoYXJBdCgwKS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWx0LnZhbHVlID0gY29vcmRpbmF0ZVtwXVtrZXldO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIGRpcmVjdGlvbnNcbiAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCh0aGlzLl9hZGRVSUQoXCJHUG1vdXNlUG9zaXRpb25Mb25EaXJlY3Rpb25cIikpLnZhbHVlID0gY29vcmRpbmF0ZS5sbmcuZGlyZWN0aW9uO1xuICAgICAgICAgICAgICAgIGRvY3VtZW50L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IDwgbWF4VGhyZXNob2xkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5HUHJlc2V0RWxldmF0aW9uKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNlbGYuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkFsdFwiKSkuaW5uZXJIVE1MID0gejtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSwgYWx0aXR1ZGVUaW1lb3V0RGVsYXkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIEZ1bmN0aW9uIHJlc2V0aW5nIGFsdGl0dWRlIHZhbHVlXG4gICAgICovXG4gICAgR1ByZXNldEVsZXZhdGlvbiA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkFsdGl0dWRlXCIpKSkge1xuICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQodGhpcy5fYWRkVUlEKFwiR1Btb3VzZVBvc2l0aW9uQWx0XCIpKS5pbm5lckhUTUwgPSBcIi0tLVwiO1xuICAgICAgICB9XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgTW91c2VQb3NpdGlvbkRPTTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/Controls/MousePositionDOM.js\n"); /***/ }), @@ -1256,7 +1256,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n/**\n* @module Utils\n* @alias Gp.olUtils\n* @description\n* ...\n*\n* @example\n* detectSupport();\n* assign();\n* mergeParams();\n*/\nvar Utils = {\n /**\n * this method is called by the constructor.\n * this information is useful to switch to touch mode.\n * Detection : test for desktop or tactile\n *\n * @function detectSupport\n * @returns {Boolean} isDesktop - true for desktop userAgent, false for mobile\n */\n detectSupport: function detectSupport() {\n var isDesktop = true;\n var userAgent = window.navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\"iphone\") !== -1 || userAgent.indexOf(\"ipod\") !== -1 || userAgent.indexOf(\"ipad\") !== -1 || userAgent.indexOf(\"android\") !== -1 || userAgent.indexOf(\"mobile\") !== -1 || userAgent.indexOf(\"blackberry\") !== -1 || userAgent.indexOf(\"tablet\") !== -1 || userAgent.indexOf(\"phone\") !== -1 || userAgent.indexOf(\"touch\") !== -1) {\n isDesktop = false;\n }\n if (userAgent.indexOf(\"msie\") !== -1 || userAgent.indexOf(\"trident\") !== -1) {\n isDesktop = true;\n }\n return isDesktop;\n },\n /**\n * Copies all source object members to dest\n *\n * @function assign\n * @param {Object} dest - destination object where properties and method will be copied\n * @param {Object} source - source object from which properties and method will be copied\n * @returns {Object} dest\n */\n assign: function assign(dest, source) {\n dest = dest || {};\n for (var prop in source) {\n if (source.hasOwnProperty(prop)) {\n dest[prop] = source[prop];\n }\n }\n return dest;\n },\n /**\n * Merge two objects parameters (deeper than assign)\n *\n * @function mergeParams\n * @param {Object} dest - destination object where properties and method will be merge\n * @param {Object} source - source object from which properties and method will be merge\n * @param {Boolean} replace - replace destination value by source if exists or not (true by default)\n */\n mergeParams: function mergeParams(dest, source, replace) {\n if (!dest || !source) {\n return;\n }\n if (typeof replace === \"undefined\") {\n replace = true;\n }\n for (var param in source) {\n if (source.hasOwnProperty(param)) {\n if (_typeof(source[param]) === \"object\") {\n if (dest.hasOwnProperty(param)) {\n this.mergeParams(dest[param], source[param], replace);\n } else {\n dest[param] = source[param];\n }\n } else {\n if (dest.hasOwnProperty(param)) {\n if (replace) {\n dest[param] = source[param];\n }\n } else {\n dest[param] = source[param];\n }\n }\n }\n }\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Utils);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vVXRpbHMuanM/MTM1ZSJdLCJuYW1lcyI6WyJVdGlscyIsImRldGVjdFN1cHBvcnQiLCJpc0Rlc2t0b3AiLCJ1c2VyQWdlbnQiLCJ3aW5kb3ciLCJuYXZpZ2F0b3IiLCJ0b0xvd2VyQ2FzZSIsImluZGV4T2YiLCJhc3NpZ24iLCJkZXN0Iiwic291cmNlIiwicHJvcCIsImhhc093blByb3BlcnR5IiwibWVyZ2VQYXJhbXMiLCJyZXBsYWNlIiwicGFyYW0iLCJfdHlwZW9mIl0sIm1hcHBpbmdzIjoiOztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFJQSxLQUFLLEdBQUc7RUFFUjtBQUNKO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0VBQ0lDLGFBQWEsRUFBRyxTQUFBQSxjQUFBLEVBQVk7SUFDeEIsSUFBSUMsU0FBUyxHQUFHLElBQUk7SUFDcEIsSUFBSUMsU0FBUyxHQUFHQyxNQUFNLENBQUNDLFNBQVMsQ0FBQ0YsU0FBUyxDQUFDRyxXQUFXLENBQUMsQ0FBQztJQUV4RCxJQUFJSCxTQUFTLENBQUNJLE9BQU8sQ0FBQyxRQUFRLENBQUMsS0F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lIC0gcmVwbGFjZSBkZXN0aW5hdGlvbiB2YWx1ZSBieSBzb3VyY2UgaWYgZXhpc3RzIG9yIG5vdCAodHJ1ZSBieSBkZWZhdWx0KVxuICAgICAqL1xuICAgIG1lcmdlUGFyYW1zIDogZnVuY3Rpb24gKGRlc3QsIHNvdXJjZSwgcmVwbGFjZSkge1xuICAgICAgICBpZiAoIWRlc3QgfHwgIXNvdXJjZSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlb2YgcmVwbGFjZSA9PT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICAgICAgcmVwbGFjZSA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgZm9yICh2YXIgcGFyYW0gaW4gc291cmNlKSB7XG4gICAgICAgICAgICBpZiAoc291cmNlLmhhc093blByb3BlcnR5KHBhcmFtKSkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc291cmNlW3BhcmFtXSA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGVzdC5oYXNPd25Qcm9wZXJ0eShwYXJhbSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWVyZ2VQYXJhbXMoZGVzdFtwYXJhbV0sIHNvdXJjZVtwYXJhbV0sIHJlcGxhY2UpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVzdFtwYXJhbV0gPSBzb3VyY2VbcGFyYW1dO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRlc3QuaGFzT3duUHJvcGVydHkocGFyYW0pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVwbGFjZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3RbcGFyYW1dID0gc291cmNlW3BhcmFtXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc3RbcGFyYW1dID0gc291cmNlW3BhcmFtXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IFV0aWxzO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/Utils.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/**\n* @module Utils\n* @alias Gp.olUtils\n* @description\n* ...\n*\n* @example\n* detectSupport();\n* assign();\n* mergeParams();\n*/\nvar Utils = {\n /**\n * this method is called by the constructor.\n * this information is useful to switch to touch mode.\n * Detection : test for desktop or tactile\n *\n * @function detectSupport\n * @returns {Boolean} isDesktop - true for desktop userAgent, false for mobile\n */\n detectSupport: function detectSupport() {\n var isDesktop = true;\n var userAgent = window.navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\"iphone\") !== -1 || userAgent.indexOf(\"ipod\") !== -1 || userAgent.indexOf(\"ipad\") !== -1 || userAgent.indexOf(\"android\") !== -1 || userAgent.indexOf(\"mobile\") !== -1 || userAgent.indexOf(\"blackberry\") !== -1 || userAgent.indexOf(\"tablet\") !== -1 || userAgent.indexOf(\"phone\") !== -1 || userAgent.indexOf(\"touch\") !== -1) {\n isDesktop = false;\n }\n if (userAgent.indexOf(\"msie\") !== -1 || userAgent.indexOf(\"trident\") !== -1) {\n isDesktop = true;\n }\n return isDesktop;\n },\n /**\n * Copies all source object members to dest\n *\n * @function assign\n * @param {Object} dest - destination object where properties and method will be copied\n * @param {Object} source - source object from which properties and method will be copied\n * @returns {Object} dest\n */\n assign: function assign(dest, source) {\n dest = dest || {};\n for (var prop in source) {\n if (source.hasOwnProperty(prop)) {\n dest[prop] = source[prop];\n }\n }\n return dest;\n },\n /**\n * Merge two objects parameters (deeper than assign)\n *\n * @function mergeParams\n * @param {Object} dest - destination object where properties and method will be merge\n * @param {Object} source - source object from which properties and method will be merge\n * @param {Boolean} replace - replace destination value by source if exists or not (true by default)\n */\n mergeParams: function mergeParams(dest, source, replace) {\n if (!dest || !source) {\n return;\n }\n if (typeof replace === \"undefined\") {\n replace = true;\n }\n for (var param in source) {\n if (source.hasOwnProperty(param)) {\n if (_typeof(source[param]) === \"object\") {\n if (dest.hasOwnProperty(param)) {\n this.mergeParams(dest[param], source[param], replace);\n } else {\n dest[param] = source[param];\n }\n } else {\n if (dest.hasOwnProperty(param)) {\n if (replace) {\n dest[param] = source[param];\n }\n } else {\n dest[param] = source[param];\n }\n }\n }\n }\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Utils);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vVXRpbHMuanM/MTM1ZSJdLCJuYW1lcyI6WyJVdGlscyIsImRldGVjdFN1cHBvcnQiLCJpc0Rlc2t0b3AiLCJ1c2VyQWdlbnQiLCJ3aW5kb3ciLCJuYXZpZ2F0b3IiLCJ0b0xvd2VyQ2FzZSIsImluZGV4T2YiLCJhc3NpZ24iLCJkZXN0Iiwic291cmNlIiwicHJvcCIsImhhc093blByb3BlcnR5IiwibWVyZ2VQYXJhbXMiLCJyZXBsYWNlIiwicGFyYW0iLCJfdHlwZW9mIl0sIm1hcHBpbmdzIjoiOztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Q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hY2UpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVzdFtwYXJhbV0gPSBzb3VyY2VbcGFyYW1dO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRlc3QuaGFzT3duUHJvcGVydHkocGFyYW0pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVwbGFjZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3RbcGFyYW1dID0gc291cmNlW3BhcmFtXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc3RbcGFyYW1dID0gc291cmNlW3BhcmFtXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IFV0aWxzO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/Utils.js\n"); /***/ }), @@ -1571,7 +1571,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var geop /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LocationSelector */ \"./src/Leaflet/Controls/LocationSelector.js\");\n/* harmony import */ var _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Common/Controls/IsoDOM */ \"./src/Common/Controls/IsoDOM.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getLogger(\"Isocurve\");\n\n/**\n * @classdesc\n *\n * Leaflet Control Class to compute and display Isochrone or isodistances curves.\n *\n * Use {@link module:Controls.Isocurve L.geoportalControl.Isocurve()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.Control native class.\n *\n * @namespace\n * @alias L.geoportalControl.Isocurve\n */\nvar Isocurve = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Control.extend( /** @lends L.geoportalControl.Isocurve.prototype */{\n includes: _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n /**\n * Options du service\n *\n * @private\n */\n options: {\n position: \"topleft\",\n collapsed: true,\n // plier !\n methods: [\"time\", \"distance\"],\n graphs: [\"Voiture\", \"Pieton\"],\n exclusions: {\n toll: false,\n tunnel: false,\n bridge: false\n },\n directions: [\"departure\", \"arrival\"],\n disableReverse: false,\n isocurveOptions: {},\n autocompleteOptions: {}\n },\n /**\n * @constructor Isocurve\n *\n * @private\n * @param {Object} options - Isocurve control options\n * @param {String} [options.apiKey] - API key for services call (isocurve and autocomplete services). The \"calcul\" key is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.\n * @param {Object} [options.exclusions = {\"toll\" : false, \"tunnel\" : false, \"bridge\" : false}] - list of exclusions with status (true = checked), by default : [\"toll\":false, \"tunnel\":false, \"bridge\":false].\n * @param {Array} [options.graphs = [\"Voiture\", \"Pieton\"]] - list of graph resources to be used for isocurve calculation, by default : [\"Voiture\", \"Pieton\"]. The first element is selected.\n * @param {Array} [options.methods = [\"time\", \"distance\"]] - list of methods, by default : [\"time\", \"distance\"]. The first element is selected by default.\n * @param {Array} [options.directions = [\"departure\", \"arrival\"]] - list of directions to be displayed, by default : [\"departure\", \"arrival\"]. The first element is selected by default.\n * Directions enable to specify if input location point will be used as a departure point (\"departure\") or as an arrival point (\"arrival\")\n * @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding\n * @param {Object} [options.isocurveOptions = {}] - isocurve service options.\n * @param {Object} [options.autocompleteOptions = {}] - autocomplete service options.\n * @example\n * var iso = L.geoportalControl.Isocurve({\n * collapsed : false\n * methods : [\"time\", \"distance\"],\n * exclusions : {\n * toll : true,\n * bridge : false,\n * tunnel : true\n * },\n * graphs : [\"Pieton\", \"Voiture\"],\n * isocurveOptions : {},\n * autocompleteOptions : {}\n * });\n */\n initialize: function initialize(options) {\n // on transmet les options au controle\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.setOptions(this, options);\n\n /** uuid */\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].generate();\n\n /** detection du support : desktop ou tactile */\n this._isDesktop = this._detectSupport();\n\n /** detection si le panneau est reduit */\n // on desactive l'impl. reduction de la fenetre\n // this._reducePanel = false;\n\n /** container principaux */\n this._waitingContainer = null;\n this._showContainer = null;\n this._pictoContainer = null;\n this._formContainer = null;\n this._submitContainer = null;\n\n /** Mode de transport selectionné : 'Voiture' ou 'Pieton' */\n this._currentTransport = null;\n\n /** Sens du parcours selectionné : 'Départ' ou 'Arrivée' */\n this._currentDirection = null;\n\n /** Type d'isochrone et valeur selectionné : 'isochrone' ou 'distance' */\n this._currentComputation = null;\n this._currentTimeHour = 0;\n this._currentTimeMinute = 0;\n this._currentDistance = 0;\n\n /** Exclusions selectionnées : Tunnel, Toll et Bridge */\n this._currentExclusions = [];\n\n // initialisation\n this._initTransport();\n this._initComputation();\n this._initDirection();\n this._initExclusions();\n\n /** le point */\n this._currentPoint = null;\n\n /** la geometrie de l'isochrone */\n this._geojsonIso = null;\n\n /** si un calcul est en cours ou non */\n this._waiting = false;\n /** timer pour cacher la patience après un certain temps */\n this._timer = null;\n\n /**\n * reponse du service\n * Ex. {\n * totalTime, totalDistance, bbox, routeGeometry,\n * routeInstructions : [{duration, distance, code, instruction, bbox, geometry}]\n * }\n */\n this._currentIsoResults = null;\n\n /**\n * liste des ressources avec droits par service\n * Ex. {\n * \"IsoChrone\" : {\n * key : \"ger4g456re45er456t4er5ge5\",\n * resources : [\"Pieton\", \"Voiture\"]\n * }\n * }\n */\n this._resources = {};\n },\n /**\n * this method is called by this.addTo(map) when the control is added on the map\n * and fills variable 'this._container = this.onAdd(map)',\n * and create or disable events on map.\n * @param {L.Map} map - object map\n * @returns {DOMElement} container\n * @private\n */\n onAdd: function onAdd(map) {\n // initialisation du DOM du composant\n var container = this._container = this._initLayout(map);\n\n // deactivate of events that may interfere with the map\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container);\n return container;\n },\n /**\n * TODO this method is called when the control is removed from the map\n * and removes events on map.\n *\n * @private\n */\n onRemove: function onRemove( /* map */) {},\n // ################################################################### //\n // ####################### init application ########################## //\n // ################################################################### //\n\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initTransport: function _initTransport() {\n // Mode de transport selectionné\n this._currentTransport = \"Voiture\"; // par defaut\n\n // par defaut\n var transport = this.options.graphs;\n if (!transport || transport.length === 0) {\n this.options.graphs = [\"Voiture\", \"Pieton\"];\n }\n\n // option\n if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.isArray(transport) && transport.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (transport[0] === \"Voiture\" || transport[0] === \"Pieton\") {\n this._currentTransport = transport[0];\n }\n }\n\n // option sur le service\n var serviceOptions = this.options.isocurveOptions;\n if (serviceOptions.graph) {\n this._currentTransport = serviceOptions.graph;\n }\n },\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initDirection: function _initDirection() {\n this._currentDirection = \"departure\"; // par defaut\n\n // par defaut\n var directions = this.options.directions;\n if (!directions || directions.length === 0) {\n this.options.directions = [\"departure\", \"arrival\"];\n }\n\n // option\n if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.isArray(directions) && directions.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (directions[0] === \"departure\" || directions[0] === \"arrival\") {\n this._currentDirection = directions[0];\n }\n }\n\n // si l'utilisateur a spécifié une méthode dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (!serviceOptions.reverse) {\n this._currentDirection = \"departure\";\n }\n if (serviceOptions.reverse === true) {\n this._currentDirection = \"arrival\";\n this.options.directions = [\"arrival\", \"departure\"];\n }\n },\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initComputation: function _initComputation() {\n // Mode de calcul selectionné\n this._currentComputation = \"time\"; // par defaut\n\n // par defaut\n var methods = this.options.methods;\n if (!methods || methods.length === 0) {\n this.options.methods = [\"time\", \"distance\"];\n }\n\n // option\n if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.isArray(methods) && methods.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (methods[0] === \"time\" || methods[0] === \"distance\") {\n this._currentComputation = methods[0];\n }\n }\n\n // si l'utilisateur a spécifié une méthode dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (serviceOptions.method) {\n this._currentComputation = serviceOptions.method;\n }\n if (serviceOptions.time) {\n this._currentComputation = \"time\";\n }\n if (serviceOptions.distance) {\n this._currentComputation = \"distance\";\n }\n },\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initExclusions: function _initExclusions() {\n // Exclusions selectionnées : Tunnel, Toll et Bridge\n this._currentExclusions = []; // par defaut\n\n // par defaut\n var exclusion = this.options.exclusions;\n if (!exclusion || _typeof(exclusion) === \"object\" && Object.keys(exclusion).length === 0) {\n this.options.exclusions = {\n toll: false,\n tunnel: false,\n bridge: false\n };\n }\n\n // option\n if (exclusion && _typeof(exclusion) === \"object\" && Object.keys(exclusion).length) {\n for (var k in exclusion) {\n if (exclusion.hasOwnProperty(k)) {\n if (exclusion.k) {\n this._currentExclusions.push(k);\n }\n }\n }\n }\n\n // si l'utilisateur a spécifié des exclusions dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (Array.isArray(serviceOptions.exclusions)) {\n this._currentExclusions = serviceOptions.exclusions;\n }\n },\n // ################################################################### //\n // ############################## other init ######################### //\n // ################################################################### //\n\n /**\n * this method is called by the constructor.\n * this information is useful to switch to touch mode.\n * Detection : test for desktop or tactile\n * @returns {Boolean} desktop or tactile\n * @private\n */\n _detectSupport: function _detectSupport() {\n // TODO\n // Choix de gérer la détection dans le code du composant au lieu du DOM car :\n // Utilisation de l'implémentation Leaflet\n // http://leafletjs.com/reference.html#browser\n\n var isDesktop = true;\n var userAgent = window.navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\"iphone\") !== -1 || userAgent.indexOf(\"ipod\") !== -1 || userAgent.indexOf(\"ipad\") !== -1 || userAgent.indexOf(\"android\") !== -1 || userAgent.indexOf(\"mobile\") !== -1 || userAgent.indexOf(\"blackberry\") !== -1 || userAgent.indexOf(\"tablet\") !== -1 || userAgent.indexOf(\"phone\") !== -1 || userAgent.indexOf(\"touch\") !== -1) {\n isDesktop = false;\n }\n if (userAgent.indexOf(\"msie\") !== -1 || userAgent.indexOf(\"trident\") !== -1) {\n isDesktop = true;\n }\n return isDesktop;\n },\n // ################################################################### //\n // ########################### init dom ############################## //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd(map)\n * and initialize the container HTMLElement\n * @param {L.Map} map - object map\n * @returns {DOMElement} container\n * @private\n */\n _initLayout: function _initLayout(map) {\n // create main container\n var container = this._createMainContainerElement();\n var inputShow = this._showContainer = this._createShowIsoElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.options.collapsed) {\n inputShow.checked = true;\n }\n var picto = this._pictoContainer = this._createShowIsoPictoElement();\n container.appendChild(picto);\n\n // panneau\n var panel = this._createIsoPanelElement();\n\n // header\n var header = this._createIsoPanelHeaderElement();\n panel.appendChild(header);\n\n // form\n var form = this._formContainer = this._createIsoPanelFormElement();\n\n // form: menu des points\n var point = this._createIsoPanelFormPointElement(map);\n form.appendChild(point);\n\n // form: menu du choix de la méthode de calcul (time ou distance)\n var isoChronChecked = false;\n var isoDistChecked = false;\n var typeChoice = this._createIsoPanelFormTypeChoiceElement();\n for (var i = 0; i < this.options.methods.length; i++) {\n if (this.options.methods[i] === \"time\") {\n isoChronChecked = i === 0;\n typeChoice.appendChild(this._createIsoPanelFormTypeChoiceChronElement(isoChronChecked));\n }\n if (this.options.methods[i] === \"distance\") {\n isoDistChecked = i === 0;\n typeChoice.appendChild(this._createIsoPanelFormTypeChoiceDistElement(isoDistChecked));\n }\n }\n form.appendChild(typeChoice);\n\n // form: menu du choix des valeurs\n form.appendChild(this._createIsoPanelFormValueIsochronElement(isoChronChecked));\n form.appendChild(this._createIsoPanelFormValueIsodistanceElement(isoDistChecked));\n\n // form: menu du choix du transport et du sens du parcours\n var modeChoice = this._createIsoPanelFormModeChoiceElement();\n modeChoice.appendChild(this._createIsoPanelFormModeChoiceTransportElement(this.options.graphs));\n modeChoice.appendChild(this._createIsoPanelFormModeChoiceDirectionElement(this.options.directions));\n form.appendChild(modeChoice);\n\n // form: menu des exclusions\n if (this.options.exclusions && _typeof(this.options.exclusions) === \"object\" && Object.keys(this.options.exclusions).length !== 0) {\n form.appendChild(this._createShowIsoExclusionsElement());\n form.appendChild(this._createShowIsoExclusionsPictoElement());\n var exclusion = this._createIsoPanelFormExclusionsElement();\n exclusion.appendChild(this._createIsoPanelFormExclusionOptionsElement(this.options.exclusions));\n form.appendChild(exclusion);\n }\n var divReset = this._createIsoFormResetElement();\n form.appendChild(divReset);\n\n // form: bouton du calcul\n var submit = this._submitContainer = this._createIsoSubmitFormElement();\n form.appendChild(submit);\n panel.appendChild(form);\n\n // waiting\n var waiting = this._waitingContainer = this._createIsoWaitingElement();\n panel.appendChild(waiting);\n container.appendChild(panel);\n return container;\n },\n // ################################################################### //\n // ############################## DOM ################################ //\n // ################################################################### //\n\n /**\n * Create a Point\n * OVERWRITTEN\n * @param {L.Map} map - object map\n * @returns {Object} DOM element\n * @private\n */\n _createIsoPanelFormPointElement: function _createIsoPanelFormPointElement(map) {\n // point de depart\n this._currentPoint = new _LocationSelector__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: 0,\n unique: this._uid,\n label: \"Départ\",\n color: \"red\",\n display: true\n },\n displayInfo: true,\n disableReverse: this.options.disableReverse,\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n this._currentPoint.setMap(map);\n return this._currentPoint.getContainer();\n },\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on 'GPshowIsochronPicto' picto\n * (cf. this._createShowIsoPictoElement),\n * and clear inputs and previous isochrone drawings\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onShowIsoPanelClick: function onShowIsoPanelClick(e) {\n logger.log(\"onShowIsoPanelClick\", e);\n // on desactive l'impl. reduction de la fenetre\n // if (this._geojsonIso && !this._reducePanel) {\n // this._clear();\n // }\n // this._reducePanel = false;\n },\n\n /**\n * this method is called by event 'click' on '' arrow button\n * (cf. this.),\n * and clear inputs and previous isochrone drawings\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoResetClick: function onIsoResetClick(e) {\n logger.log(\"onIsoResetClick\", e);\n this._clear();\n },\n // // on desactive l'impl. reduction de la fenetre\n // /**\n // * this method is called by event 'click' on 'GPisochronPanelReduce' picto\n // * (cf. this.),\n // * and reduce the panel\n // *\n // * @private\n // */\n // onReduceIsoPanelClick : function () {\n // logger.log(\"onReduceIsoPanelClick\");\n // this._reducePanel = true;\n // },\n\n /**\n * this method is called by event 'change' on 'GPisochronChoiceAltDist' or 'GPisochronChoiceAltChron'\n * input (cf. this._createIsoPanelFormTypeChoiceElement),\n * and updates current computation mode\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoTypeChoiceChange: function onIsoTypeChoiceChange(e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n if (value === \"isodistance\") {\n this._currentComputation = \"distance\";\n }\n if (value === \"isochron\") {\n this._currentComputation = \"time\";\n }\n },\n /**\n * this method is called by event 'click' on 'GPisochronTransportPedestrian' or 'GPisochronTransportCar'\n * input (cf. this._createIsoPanelFormModeChoiceTransportElement),\n * and updates current transport mode\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoModeTransportChange: function onIsoModeTransportChange(e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n this._currentTransport = value;\n },\n /**\n * this method is called by event 'change' on 'GPisochronDirectionSelect' select\n * (cf. this._createIsoPanelFormModeChoiceDirectionElement),\n * and updates current direction mode\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoModeDirectionChange: function onIsoModeDirectionChange(e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n this._currentDirection = value;\n },\n /**\n * this method is called by event 'change' on ''\n * input (cf. this.),\n * and updates current time value\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoValueChronTimeHourChange: function onIsoValueChronTimeHourChange(e) {\n var value = e.target.value;\n\n // pointer to...\n this._timeHourContainer = e.target;\n if (!value) {\n return;\n }\n this._currentTimeHour = value;\n },\n /**\n * this method is called by event 'change' on ''\n * input (cf. this.),\n * and updates current time value\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoValueChronTimeMinuteChange: function onIsoValueChronTimeMinuteChange(e) {\n var value = e.target.value;\n\n // pointer to...\n this._timeMinuteContainer = e.target;\n if (!value) {\n return;\n }\n this._currentTimeMinute = value;\n },\n /**\n * this method is called by event 'change' on ''\n * input (cf. this.),\n * and updates current distance value\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoValueDistChange: function onIsoValueDistChange(e) {\n var value = e.target.value;\n\n // pointer to...\n this._distanceContainer = e.target;\n if (!value) {\n return;\n }\n this._currentDistance = value;\n },\n /**\n * this method is called by event 'change' on 'GPIsoExclusionsToll'\n * or 'GPIsoeExclusionsTunnel' or 'GPIsoExclusionsBridge' tag input\n * (cf. this._createIsoPanelFormExclusionOptionsElement).\n * this value is saved as a parameter for the service isocurve.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoExclusionsChange: function onIsoExclusionsChange(e) {\n var value = e.target.value;\n var checked = e.target.checked;\n if (!value) {\n return;\n }\n var bFound = false;\n var iFound = null;\n for (var i = 0; i < this._currentExclusions.length; i++) {\n if (deepEqual(this._currentExclusions[i], value.toLowerCase())) {\n iFound = i;\n bFound = true;\n }\n }\n // on l'ajoute si la valeur n'existe pas et est selectionnée\n if (!bFound && !checked) {\n this._currentExclusions.push(value.toLowerCase());\n }\n // on la retire si la valeur existe et est deselectionnée\n if (bFound && checked) {\n this._currentExclusions.splice(iFound, 1);\n }\n },\n /**\n * this method is called by event 'submit' on 'GPisochronForm' tag form\n * (cf. this._createIsoPanelFormElement),\n * and call isocurve service to display results\n *\n * @private\n */\n onIsoComputationSubmit: function onIsoComputationSubmit() {\n if (!this._currentPoint || !this._currentPoint.getCoordinate || !this._currentPoint.getCoordinate()) {\n return;\n }\n\n // récupération du temps\n var time;\n if (this._currentComputation.toLowerCase() === \"time\") {\n // durée exprimée en secondes\n time = this._currentTimeHour * 3600 + this._currentTimeMinute * 60;\n logger.log(\"time : \", time);\n }\n\n // récupération de la distance\n var distance;\n if (this._currentComputation.toLowerCase() === \"distance\") {\n // distance exprimée en mètres\n distance = this._currentDistance * 1000;\n logger.log(\"distance : \", distance);\n }\n\n // si on n'a pas de valeur de calcul renseignée, on ne lance pas la requête.\n if (!time && !distance) {\n logger.log(\"Missing time or distance parameter\");\n return;\n }\n\n // mise en place de la patience\n this._displayWaitingContainer();\n var self = this;\n var pointCoordinate = self._currentPoint.getCoordinate();\n var position = {\n x: pointCoordinate.lon || pointCoordinate.lng,\n y: pointCoordinate.lat\n };\n this._requestIsoCurve({\n position: position,\n graph: self._currentTransport,\n exclusions: self._currentExclusions,\n method: self._currentComputation,\n reverse: self._currentDirection.toLowerCase() === \"arrival\",\n time: time,\n distance: distance,\n smoothing: true,\n timeout: 7000,\n protocol: \"XHR\",\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results) {\n self._drawIsoResults(results);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME mise à jour du controle mais le service ne repond pas en 200 !?\n self._hideWaitingContainer();\n self._clearIsoResultsGeometry();\n logger.log(error.message);\n }\n });\n },\n // ################################################################### //\n // ######################## isocurve calculation ##################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onIsoComputationSubmit\n * and executes a request to the service.\n *\n * @param {Object} settings - service settings\n *\n * @private\n */\n _requestIsoCurve: function _requestIsoCurve(settings) {\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!settings || _typeof(settings) === \"object\" && Object.keys(settings).length === 0) {\n return;\n }\n\n // on ne fait pas de requête si on n'a pas de point d'origine\n if (!settings.position) {\n return;\n }\n var options = {};\n // on recupere les parametres de saisie et les callbacks\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(options, settings);\n // ainsi que les options du service\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(options, this.options.isocurveOptions);\n options.apiKey = this.options.isocurveOptions.apiKey || this.options.apiKey;\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n options.ssl = this.options.ssl;\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Services.isoCurve(options);\n },\n /**\n * this method is called by this.onIsoComputationSubmit (in case of success)\n * and draw isocurve results geometry on map\n *\n * @param {Object} results - isocurve response results\n *\n * @private\n */\n _drawIsoResults: function _drawIsoResults(results) {\n this._clearIsoResultsGeometry();\n\n // sauvegarde de l'etat des resultats\n this._currentIsoResults = results;\n if (!results.geometry) {\n // cache la patience\n this._hideWaitingContainer();\n return;\n }\n var map = this._map;\n var _geometry = results.geometry;\n var _style = {\n color: \"#ff7800\",\n weight: 5,\n opacity: 0.65\n };\n this._geojsonIso = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.geoJson(_geometry, {\n style: _style\n }).addTo(map);\n\n // cache la patience\n this._hideWaitingContainer();\n this._formContainer.className = \"GPisochroComponentHidden\";\n },\n // ################################################################### //\n // ############################# Clean ############################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onShowIsoPanelClick()\n * and it clears all elements (reinit).\n *\n * @private\n */\n _clear: function _clear() {\n this._initTransport();\n this._initExclusions();\n this._initComputation();\n this._initDirection();\n\n // resultats du service\n this._currentIsoResults = null;\n\n // la geometrie\n this._clearIsoResultsGeometry();\n\n // les points\n this._currentPoint.clear();\n\n // nettoyer les valeurs dans le DOM !\n if (this._timeHourContainer) {\n this._timeHourContainer.value = 0;\n }\n if (this._timeMinuteContainer) {\n this._timeMinuteContainer.value = 0;\n }\n if (this._distanceContainer) {\n this._distanceContainer.value = 0;\n }\n },\n /**\n * this method is called by this.onIsoComputationSubmit()\n * and it clears all route geometries.\n *\n * @private\n */\n _clearIsoResultsGeometry: function _clearIsoResultsGeometry() {\n var map = this._map;\n if (this._geojsonIso != null) {\n map.removeLayer(this._geojsonIso);\n this._geojsonIso = null;\n }\n },\n // ################################################################### //\n // ############################ Patience ############################# //\n // ################################################################### //\n\n /**\n * this method displays waiting container and sets a timeout\n *\n * @private\n */\n _displayWaitingContainer: function _displayWaitingContainer() {\n this._waitingContainer.className = \"GPisochronCalcWaitingContainerVisible\";\n this._waiting = true;\n\n // mise en place d'un timeout pour réinitialiser le panel (cacher la patience)\n // si on est toujours en attente (si la requête est bloquée par exemple)\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n var context = this;\n this._timer = setTimeout(function () {\n if (context._waiting === true) {\n context._hideWaitingContainer();\n } else {\n if (context._timer) {\n clearTimeout(context._timer);\n }\n }\n }, 16000);\n },\n /**\n * this method hides waiting container and clears timeout\n *\n * @private\n */\n _hideWaitingContainer: function _hideWaitingContainer() {\n if (this._waiting) {\n this._waitingContainer.className = \"GPisochronCalcWaitingContainerHidden\";\n this._waiting = false;\n clearTimeout(this._timer);\n this._timer = null;\n }\n },\n // ################################################################### //\n // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ //\n // ################################################################### //\n\n /**\n * This method is public.\n * It allows to control the execution of a traitment.\n *\n * @param {Object} position - position = {lon: , lat: }\n * @param {Object} value - distance en km ou heures-minutes\n * @param {Object} options - options = {...}\n */\n compute: function compute(position, value, options) {\n if (!this._showContainer.checked) {\n this._pictoContainer.click();\n }\n var map = this._map;\n if (!map) {\n return;\n }\n\n // Les options par defauts\n var settings = {\n direction: \"departure\",\n method: \"time\",\n transport: \"Voiture\",\n exclusions: []\n };\n\n // On recupere les options\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(settings, options);\n this._currentPoint.setCoordinate(position);\n var input = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPlocationOrigin_\" + 0 + \"-\" + this._uid);\n input.value = position.lng + \" , \" + position.lat;\n this._currentTransport = settings.transport;\n if (settings.transport === \"Voiture\") {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronTransportCar-\" + this._uid).checked = true;\n } else {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronTransportPedestrian-\" + this._uid).checked = true;\n }\n this._currentExclusions = settings.exclusions;\n this._currentComputation = settings.method;\n if (settings.method === \"time\") {\n var time = value.split(\".\");\n this._currentTimeHour = time[0] || 0;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronValueChronInput1-\" + this._uid).value = this._currentTimeHour;\n this._currentTimeMinute = time[1] || 0;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronValueChronInput2-\" + this._uid).value = this._currentTimeMinute;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronChoiceAltChron-\" + this._uid).click();\n } else {\n this._currentDistance = value;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronValueDistInput-\" + this._uid).value = this._currentDistance;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronChoiceAltDist-\" + this._uid).click();\n }\n this._currentDirection = settings.direction;\n settings.direction === \"departure\" ? leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 0 : leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 1;\n this.onIsoComputationSubmit();\n map.flyTo(position);\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Isocurve);\nvar deepEqual = function deepEqual(x, y) {\n if (x === y) {\n return true;\n } else if (_typeof(x) === \"object\" && x != null && _typeof(y) === \"object\" && y != null) {\n if (Object.keys(x).length !== Object.keys(y).length) {\n return false;\n }\n for (var prop in x) {\n if (y.hasOwnProperty(prop)) {\n if (!deepEqual(x[prop], y[prop])) {\n return false;\n }\n } else {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL0lzb2N1cnZlLmpzP2QwODYiXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiSXNvY3VydmUiLCJMIiwiQ29udHJvbCIsImV4dGVuZCIsImluY2x1ZGVzIiwiSXNvRE9NIiwib3B0aW9ucyIsInBvc2l0aW9uIiwiY29sbGFwc2VkIiwibWV0aG9kcyIsImdyYXBocyIsImV4Y2x1c2lvbnMiLCJ0b2xsIiwidHVubmVsIiwiYnJpZGdlIiwiZGlyZWN0aW9ucyIsImRpc2FibGVSZXZlcnNlIiwiaXNvY3VydmVPcHRpb25zIiwiYXV0b2NvbXBsZXRlT3B0aW9ucyIsImluaXRpYWxpemUiLCJVdGlsIiwic2V0T3B0aW9ucyIsIl91aWQiLCJJRCIsImdlbmVyYXRlIiwiX2lzRGVza3RvcCIsIl9kZXRlY3RTdXBwb3J0IiwiX3dhaXRpbmdDb250YWluZXIiLCJfc2hvd0NvbnRhaW5lciIsIl9waWN0b0NvbnRhaW5lciIsIl9mb3JtQ29udGFpbmVyIiwiX3N1Ym1pdENvbnRhaW5lciIsIl9jdXJyZW50VHJhbnNwb3J0IiwiX2N1cnJlbnREaXJlY3Rpb24iLCJfY3VycmVudENvbXB1dGF0aW9uIiwiX2N1cnJlbnRUaW1lSG91ciIsIl9jdXJyZW50VGltZU1pbnV0ZSIsIl9j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biAgICAgICAgLy8gb3B0aW9uXG4gICAgICAgIGlmIChleGNsdXNpb24gJiYgdHlwZW9mIGV4Y2x1c2lvbiA9PT0gXCJvYmplY3RcIiAmJiBPYmplY3Qua2V5cyhleGNsdXNpb24pLmxlbmd0aCkge1xuICAgICAgICAgICAgZm9yICh2YXIgayBpbiBleGNsdXNpb24pIHtcbiAgICAgICAgICAgICAgICBpZiAoZXhjbHVzaW9uLmhhc093blByb3BlcnR5KGspKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChleGNsdXNpb24uaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEV4Y2x1c2lvbnMucHVzaChrKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHNpIGwndXRpbGlzYXRldXIgYSBzcMOpY2lmacOpIGRlcyBleGNsdXNpb25zIGRhbnMgbGUgc2VydmljZSwgb24gc3VyY2hhcmdlIGxlcyBvcHRpb25zIGR1IHdpZGdldFxuICAgICAgICB2YXIgc2VydmljZU9wdGlvbnMgPSB0aGlzLm9wdGlvbnMuaXNvY3VydmVPcHRpb25zO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShzZXJ2aWNlT3B0aW9ucy5leGNsdXNpb25zKSkge1xuICAgICAgICAgICAgdGhpcy5fY3VycmVudEV4Y2x1c2lvbnMgPSBzZXJ2aWNlT3B0aW9ucy5leGNsdXNpb25zO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8vICMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMgLy9cbiAgICAvLyAjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMgb3RoZXIgaW5pdCAjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIC8vXG4gICAg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pcyBjYWxsZWQgYnkgdGhpcy5vbkFkZChtYXApXG4gICAgICogYW5kIGluaXRpYWxpemUgdGhlIGNvbnRhaW5lciBIVE1MRWxlbWVudFxuICAgICAqIEBwYXJhbSB7TC5NYXB9IG1hcCAtIG9iamVjdCBtYXBcbiAgICAgKiBAcmV0dXJucyB7RE9NRWxlbWVudH0gY29udGFpbmVyXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBfaW5pdExheW91dCA6IGZ1bmN0aW9uIChtYXApIHtcbiAgICAgICAgLy8gY3JlYXRlIG1haW4gY29udGFpbmVyXG4gICAgICAgIHZhciBjb250YWluZXIgPSB0aGlzLl9jcmVhdGVNYWluQ29udGFpbmVyRWxlbWVudCgpO1xuXG4gICAgICAgIHZhciBpbnB1dFNob3cgPSB0aGlzLl9zaG93Q29udGFpbmVyID0gdGhpcy5fY3JlYXRlU2hvd0lzb0VsZW1lbnQoKTtcbiAgICAgICAgY29udGFpbmVyLmFwcGVuZENoaWxkKGlucHV0U2hvdyk7XG5cbiAgICAgICAgLy8gbW9kZSBcImNvbGxhcHNlZFwiXG4gICAgICAgIGlmICghdGhpcy5vcHRpb25zLmNvbGxhcHNlZCkge1xuICAgICAgICAgICAgaW5wdXRTaG93LmNoZWNrZWQgPSB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHBpY3RvID0gdGhpcy5fcGljdG9Db250YWluZXIgPSB0aGlzLl9jcmVhdGVTaG93SXNvUGljdG9FbGVtZW50KCk7XG4gICAgICAgIGNvbnRhaW5lci5hcHBlbmRDaGlsZChwaWN0byk7XG5cbiAgICAgICAgLy8gcGFubmVhdVxuICAgICAgICB2YXIgcGFuZWwgPSB0aGlzLl9jcmVhdGVJc29QYW5lbEVsZW1lbnQoKTtcblxuICAgICAgICAvLyBoZWFkZXJcbiAgICAgICAgdmFyIGhlYWRlciA9IHRoaXMuX2NyZWF0ZUlzb1BhbmVsSGVhZGVyRWxlbWVudCgpO1xuICAgICAgICBwYW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AcHJpdmF0ZVxuICAgICAqL1xuICAgIF9kaXNwbGF5V2FpdGluZ0NvbnRhaW5lciA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy5fd2FpdGluZ0NvbnRhaW5lci5jbGFzc05hbWUgPSBcIkdQaXNvY2hyb25DYWxjV2FpdGluZ0NvbnRhaW5lclZpc2libGVcIjtcbiAgICAgICAgdGhpcy5fd2FpdGluZyA9IHRydWU7XG5cbiAgICAgICAgLy8gbWlzZSBlbiBwbGFjZSBkJ3VuIHRpbWVvdXQgcG91ciByw6lpbml0aWFsaXNlciBsZSBwYW5lbCAoY2FjaGVyIGxhIHBhdGllbmNlKVxuICAgICAgICAvLyBzaSBvbiBlc3QgdG91am91cnMgZW4gYXR0ZW50ZSAoc2kgbGEgcmVxdcOqdGUgZXN0IGJsb3F1w6llIHBhciBleGVtcGxlKVxuICAgICAgICBpZiAodGhpcy5fdGltZXIpIHtcbiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl90aW1lcik7XG4gICAgICAgICAgICB0aGlzLl90aW1lciA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGNvbnRleHQgPSB0aGlzO1xuICAgICAgICB0aGlzLl90aW1lciA9IHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgaWYgKGNvbnRleHQuX3dhaXRpbmcgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICBjb250ZXh0Ll9oaWRlV2FpdGluZ0NvbnRhaW5lcigpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5fdGltZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KGNvbnRleHQuX3RpbWVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIDE2MDAwKTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaGlk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mJiB4ICE9IG51bGwpICYmICh0eXBlb2YgeSA9PT0gXCJvYmplY3RcIiAmJiB5ICE9IG51bGwpKSB7XG4gICAgICAgIGlmIChPYmplY3Qua2V5cyh4KS5sZW5ndGggIT09IE9iamVjdC5rZXlzKHkpLmxlbmd0aCkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgcHJvcCBpbiB4KSB7XG4gICAgICAgICAgICBpZiAoeS5oYXNPd25Qcm9wZXJ0eShwcm9wKSkge1xuICAgICAgICAgICAgICAgIGlmICghZGVlcEVxdWFsKHhbcHJvcF0sIHlbcHJvcF0pKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/Isocurve.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LocationSelector */ \"./src/Leaflet/Controls/LocationSelector.js\");\n/* harmony import */ var _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Common/Controls/IsoDOM */ \"./src/Common/Controls/IsoDOM.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n\n\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getLogger(\"Isocurve\");\n\n/**\n * @classdesc\n *\n * Leaflet Control Class to compute and display Isochrone or isodistances curves.\n *\n * Use {@link module:Controls.Isocurve L.geoportalControl.Isocurve()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.Control native class.\n *\n * @namespace\n * @alias L.geoportalControl.Isocurve\n */\nvar Isocurve = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Control.extend( /** @lends L.geoportalControl.Isocurve.prototype */{\n includes: _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n /**\n * Options du service\n *\n * @private\n */\n options: {\n position: \"topleft\",\n collapsed: true,\n // plier !\n methods: [\"time\", \"distance\"],\n graphs: [\"Voiture\", \"Pieton\"],\n exclusions: {\n toll: false,\n tunnel: false,\n bridge: false\n },\n directions: [\"departure\", \"arrival\"],\n disableReverse: false,\n isocurveOptions: {},\n autocompleteOptions: {}\n },\n /**\n * @constructor Isocurve\n *\n * @private\n * @param {Object} options - Isocurve control options\n * @param {String} [options.apiKey] - API key for services call (isocurve and autocomplete services). The \"calcul\" key is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.\n * @param {Object} [options.exclusions = {\"toll\" : false, \"tunnel\" : false, \"bridge\" : false}] - list of exclusions with status (true = checked), by default : [\"toll\":false, \"tunnel\":false, \"bridge\":false].\n * @param {Array} [options.graphs = [\"Voiture\", \"Pieton\"]] - list of graph resources to be used for isocurve calculation, by default : [\"Voiture\", \"Pieton\"]. The first element is selected.\n * @param {Array} [options.methods = [\"time\", \"distance\"]] - list of methods, by default : [\"time\", \"distance\"]. The first element is selected by default.\n * @param {Array} [options.directions = [\"departure\", \"arrival\"]] - list of directions to be displayed, by default : [\"departure\", \"arrival\"]. The first element is selected by default.\n * Directions enable to specify if input location point will be used as a departure point (\"departure\") or as an arrival point (\"arrival\")\n * @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding\n * @param {Object} [options.isocurveOptions = {}] - isocurve service options.\n * @param {Object} [options.autocompleteOptions = {}] - autocomplete service options.\n * @example\n * var iso = L.geoportalControl.Isocurve({\n * collapsed : false\n * methods : [\"time\", \"distance\"],\n * exclusions : {\n * toll : true,\n * bridge : false,\n * tunnel : true\n * },\n * graphs : [\"Pieton\", \"Voiture\"],\n * isocurveOptions : {},\n * autocompleteOptions : {}\n * });\n */\n initialize: function initialize(options) {\n // on transmet les options au controle\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.setOptions(this, options);\n\n /** uuid */\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].generate();\n\n /** detection du support : desktop ou tactile */\n this._isDesktop = this._detectSupport();\n\n /** detection si le panneau est reduit */\n // on desactive l'impl. reduction de la fenetre\n // this._reducePanel = false;\n\n /** container principaux */\n this._waitingContainer = null;\n this._showContainer = null;\n this._pictoContainer = null;\n this._formContainer = null;\n this._submitContainer = null;\n\n /** Mode de transport selectionné : 'Voiture' ou 'Pieton' */\n this._currentTransport = null;\n\n /** Sens du parcours selectionné : 'Départ' ou 'Arrivée' */\n this._currentDirection = null;\n\n /** Type d'isochrone et valeur selectionné : 'isochrone' ou 'distance' */\n this._currentComputation = null;\n this._currentTimeHour = 0;\n this._currentTimeMinute = 0;\n this._currentDistance = 0;\n\n /** Exclusions selectionnées : Tunnel, Toll et Bridge */\n this._currentExclusions = [];\n\n // initialisation\n this._initTransport();\n this._initComputation();\n this._initDirection();\n this._initExclusions();\n\n /** le point */\n this._currentPoint = null;\n\n /** la geometrie de l'isochrone */\n this._geojsonIso = null;\n\n /** si un calcul est en cours ou non */\n this._waiting = false;\n /** timer pour cacher la patience après un certain temps */\n this._timer = null;\n\n /**\n * reponse du service\n * Ex. {\n * totalTime, totalDistance, bbox, routeGeometry,\n * routeInstructions : [{duration, distance, code, instruction, bbox, geometry}]\n * }\n */\n this._currentIsoResults = null;\n\n /**\n * liste des ressources avec droits par service\n * Ex. {\n * \"IsoChrone\" : {\n * key : \"ger4g456re45er456t4er5ge5\",\n * resources : [\"Pieton\", \"Voiture\"]\n * }\n * }\n */\n this._resources = {};\n },\n /**\n * this method is called by this.addTo(map) when the control is added on the map\n * and fills variable 'this._container = this.onAdd(map)',\n * and create or disable events on map.\n * @param {L.Map} map - object map\n * @returns {DOMElement} container\n * @private\n */\n onAdd: function onAdd(map) {\n // initialisation du DOM du composant\n var container = this._container = this._initLayout(map);\n\n // deactivate of events that may interfere with the map\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container);\n return container;\n },\n /**\n * TODO this method is called when the control is removed from the map\n * and removes events on map.\n *\n * @private\n */\n onRemove: function onRemove( /* map */) {},\n // ################################################################### //\n // ####################### init application ########################## //\n // ################################################################### //\n\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initTransport: function _initTransport() {\n // Mode de transport selectionné\n this._currentTransport = \"Voiture\"; // par defaut\n\n // par defaut\n var transport = this.options.graphs;\n if (!transport || transport.length === 0) {\n this.options.graphs = [\"Voiture\", \"Pieton\"];\n }\n\n // option\n if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.isArray(transport) && transport.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (transport[0] === \"Voiture\" || transport[0] === \"Pieton\") {\n this._currentTransport = transport[0];\n }\n }\n\n // option sur le service\n var serviceOptions = this.options.isocurveOptions;\n if (serviceOptions.graph) {\n this._currentTransport = serviceOptions.graph;\n }\n },\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initDirection: function _initDirection() {\n this._currentDirection = \"departure\"; // par defaut\n\n // par defaut\n var directions = this.options.directions;\n if (!directions || directions.length === 0) {\n this.options.directions = [\"departure\", \"arrival\"];\n }\n\n // option\n if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.isArray(directions) && directions.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (directions[0] === \"departure\" || directions[0] === \"arrival\") {\n this._currentDirection = directions[0];\n }\n }\n\n // si l'utilisateur a spécifié une méthode dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (!serviceOptions.reverse) {\n this._currentDirection = \"departure\";\n }\n if (serviceOptions.reverse === true) {\n this._currentDirection = \"arrival\";\n this.options.directions = [\"arrival\", \"departure\"];\n }\n },\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initComputation: function _initComputation() {\n // Mode de calcul selectionné\n this._currentComputation = \"time\"; // par defaut\n\n // par defaut\n var methods = this.options.methods;\n if (!methods || methods.length === 0) {\n this.options.methods = [\"time\", \"distance\"];\n }\n\n // option\n if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.isArray(methods) && methods.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (methods[0] === \"time\" || methods[0] === \"distance\") {\n this._currentComputation = methods[0];\n }\n }\n\n // si l'utilisateur a spécifié une méthode dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (serviceOptions.method) {\n this._currentComputation = serviceOptions.method;\n }\n if (serviceOptions.time) {\n this._currentComputation = \"time\";\n }\n if (serviceOptions.distance) {\n this._currentComputation = \"distance\";\n }\n },\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initExclusions: function _initExclusions() {\n // Exclusions selectionnées : Tunnel, Toll et Bridge\n this._currentExclusions = []; // par defaut\n\n // par defaut\n var exclusion = this.options.exclusions;\n if (!exclusion || _typeof(exclusion) === \"object\" && Object.keys(exclusion).length === 0) {\n this.options.exclusions = {\n toll: false,\n tunnel: false,\n bridge: false\n };\n }\n\n // option\n if (exclusion && _typeof(exclusion) === \"object\" && Object.keys(exclusion).length) {\n for (var k in exclusion) {\n if (exclusion.hasOwnProperty(k)) {\n if (exclusion.k) {\n this._currentExclusions.push(k);\n }\n }\n }\n }\n\n // si l'utilisateur a spécifié des exclusions dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (Array.isArray(serviceOptions.exclusions)) {\n this._currentExclusions = serviceOptions.exclusions;\n }\n },\n // ################################################################### //\n // ############################## other init ######################### //\n // ################################################################### //\n\n /**\n * this method is called by the constructor.\n * this information is useful to switch to touch mode.\n * Detection : test for desktop or tactile\n * @returns {Boolean} desktop or tactile\n * @private\n */\n _detectSupport: function _detectSupport() {\n // TODO\n // Choix de gérer la détection dans le code du composant au lieu du DOM car :\n // Utilisation de l'implémentation Leaflet\n // http://leafletjs.com/reference.html#browser\n\n var isDesktop = true;\n var userAgent = window.navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\"iphone\") !== -1 || userAgent.indexOf(\"ipod\") !== -1 || userAgent.indexOf(\"ipad\") !== -1 || userAgent.indexOf(\"android\") !== -1 || userAgent.indexOf(\"mobile\") !== -1 || userAgent.indexOf(\"blackberry\") !== -1 || userAgent.indexOf(\"tablet\") !== -1 || userAgent.indexOf(\"phone\") !== -1 || userAgent.indexOf(\"touch\") !== -1) {\n isDesktop = false;\n }\n if (userAgent.indexOf(\"msie\") !== -1 || userAgent.indexOf(\"trident\") !== -1) {\n isDesktop = true;\n }\n return isDesktop;\n },\n // ################################################################### //\n // ########################### init dom ############################## //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd(map)\n * and initialize the container HTMLElement\n * @param {L.Map} map - object map\n * @returns {DOMElement} container\n * @private\n */\n _initLayout: function _initLayout(map) {\n // create main container\n var container = this._createMainContainerElement();\n var inputShow = this._showContainer = this._createShowIsoElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.options.collapsed) {\n inputShow.checked = true;\n }\n var picto = this._pictoContainer = this._createShowIsoPictoElement();\n container.appendChild(picto);\n\n // panneau\n var panel = this._createIsoPanelElement();\n\n // header\n var header = this._createIsoPanelHeaderElement();\n panel.appendChild(header);\n\n // form\n var form = this._formContainer = this._createIsoPanelFormElement();\n\n // form: menu des points\n var point = this._createIsoPanelFormPointElement(map);\n form.appendChild(point);\n\n // form: menu du choix de la méthode de calcul (time ou distance)\n var isoChronChecked = false;\n var isoDistChecked = false;\n var typeChoice = this._createIsoPanelFormTypeChoiceElement();\n for (var i = 0; i < this.options.methods.length; i++) {\n if (this.options.methods[i] === \"time\") {\n isoChronChecked = i === 0;\n typeChoice.appendChild(this._createIsoPanelFormTypeChoiceChronElement(isoChronChecked));\n }\n if (this.options.methods[i] === \"distance\") {\n isoDistChecked = i === 0;\n typeChoice.appendChild(this._createIsoPanelFormTypeChoiceDistElement(isoDistChecked));\n }\n }\n form.appendChild(typeChoice);\n\n // form: menu du choix des valeurs\n form.appendChild(this._createIsoPanelFormValueIsochronElement(isoChronChecked));\n form.appendChild(this._createIsoPanelFormValueIsodistanceElement(isoDistChecked));\n\n // form: menu du choix du transport et du sens du parcours\n var modeChoice = this._createIsoPanelFormModeChoiceElement();\n modeChoice.appendChild(this._createIsoPanelFormModeChoiceTransportElement(this.options.graphs));\n modeChoice.appendChild(this._createIsoPanelFormModeChoiceDirectionElement(this.options.directions));\n form.appendChild(modeChoice);\n\n // form: menu des exclusions\n if (this.options.exclusions && _typeof(this.options.exclusions) === \"object\" && Object.keys(this.options.exclusions).length !== 0) {\n form.appendChild(this._createShowIsoExclusionsElement());\n form.appendChild(this._createShowIsoExclusionsPictoElement());\n var exclusion = this._createIsoPanelFormExclusionsElement();\n exclusion.appendChild(this._createIsoPanelFormExclusionOptionsElement(this.options.exclusions));\n form.appendChild(exclusion);\n }\n var divReset = this._createIsoFormResetElement();\n form.appendChild(divReset);\n\n // form: bouton du calcul\n var submit = this._submitContainer = this._createIsoSubmitFormElement();\n form.appendChild(submit);\n panel.appendChild(form);\n\n // waiting\n var waiting = this._waitingContainer = this._createIsoWaitingElement();\n panel.appendChild(waiting);\n container.appendChild(panel);\n return container;\n },\n // ################################################################### //\n // ############################## DOM ################################ //\n // ################################################################### //\n\n /**\n * Create a Point\n * OVERWRITTEN\n * @param {L.Map} map - object map\n * @returns {Object} DOM element\n * @private\n */\n _createIsoPanelFormPointElement: function _createIsoPanelFormPointElement(map) {\n // point de depart\n this._currentPoint = new _LocationSelector__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: 0,\n unique: this._uid,\n label: \"Départ\",\n color: \"red\",\n display: true\n },\n displayInfo: true,\n disableReverse: this.options.disableReverse,\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n this._currentPoint.setMap(map);\n return this._currentPoint.getContainer();\n },\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on 'GPshowIsochronPicto' picto\n * (cf. this._createShowIsoPictoElement),\n * and clear inputs and previous isochrone drawings\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onShowIsoPanelClick: function onShowIsoPanelClick(e) {\n logger.log(\"onShowIsoPanelClick\", e);\n // on desactive l'impl. reduction de la fenetre\n // if (this._geojsonIso && !this._reducePanel) {\n // this._clear();\n // }\n // this._reducePanel = false;\n },\n\n /**\n * this method is called by event 'click' on '' arrow button\n * (cf. this.),\n * and clear inputs and previous isochrone drawings\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoResetClick: function onIsoResetClick(e) {\n logger.log(\"onIsoResetClick\", e);\n this._clear();\n },\n // // on desactive l'impl. reduction de la fenetre\n // /**\n // * this method is called by event 'click' on 'GPisochronPanelReduce' picto\n // * (cf. this.),\n // * and reduce the panel\n // *\n // * @private\n // */\n // onReduceIsoPanelClick : function () {\n // logger.log(\"onReduceIsoPanelClick\");\n // this._reducePanel = true;\n // },\n\n /**\n * this method is called by event 'change' on 'GPisochronChoiceAltDist' or 'GPisochronChoiceAltChron'\n * input (cf. this._createIsoPanelFormTypeChoiceElement),\n * and updates current computation mode\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoTypeChoiceChange: function onIsoTypeChoiceChange(e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n if (value === \"isodistance\") {\n this._currentComputation = \"distance\";\n }\n if (value === \"isochron\") {\n this._currentComputation = \"time\";\n }\n },\n /**\n * this method is called by event 'click' on 'GPisochronTransportPedestrian' or 'GPisochronTransportCar'\n * input (cf. this._createIsoPanelFormModeChoiceTransportElement),\n * and updates current transport mode\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoModeTransportChange: function onIsoModeTransportChange(e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n this._currentTransport = value;\n },\n /**\n * this method is called by event 'change' on 'GPisochronDirectionSelect' select\n * (cf. this._createIsoPanelFormModeChoiceDirectionElement),\n * and updates current direction mode\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoModeDirectionChange: function onIsoModeDirectionChange(e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n this._currentDirection = value;\n },\n /**\n * this method is called by event 'change' on ''\n * input (cf. this.),\n * and updates current time value\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoValueChronTimeHourChange: function onIsoValueChronTimeHourChange(e) {\n var value = e.target.value;\n\n // pointer to...\n this._timeHourContainer = e.target;\n if (!value) {\n return;\n }\n this._currentTimeHour = value;\n },\n /**\n * this method is called by event 'change' on ''\n * input (cf. this.),\n * and updates current time value\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoValueChronTimeMinuteChange: function onIsoValueChronTimeMinuteChange(e) {\n var value = e.target.value;\n\n // pointer to...\n this._timeMinuteContainer = e.target;\n if (!value) {\n return;\n }\n this._currentTimeMinute = value;\n },\n /**\n * this method is called by event 'change' on ''\n * input (cf. this.),\n * and updates current distance value\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoValueDistChange: function onIsoValueDistChange(e) {\n var value = e.target.value;\n\n // pointer to...\n this._distanceContainer = e.target;\n if (!value) {\n return;\n }\n this._currentDistance = value;\n },\n /**\n * this method is called by event 'change' on 'GPIsoExclusionsToll'\n * or 'GPIsoeExclusionsTunnel' or 'GPIsoExclusionsBridge' tag input\n * (cf. this._createIsoPanelFormExclusionOptionsElement).\n * this value is saved as a parameter for the service isocurve.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoExclusionsChange: function onIsoExclusionsChange(e) {\n var value = e.target.value;\n var checked = e.target.checked;\n if (!value) {\n return;\n }\n var bFound = false;\n var iFound = null;\n for (var i = 0; i < this._currentExclusions.length; i++) {\n if (deepEqual(this._currentExclusions[i], value.toLowerCase())) {\n iFound = i;\n bFound = true;\n }\n }\n // on l'ajoute si la valeur n'existe pas et est selectionnée\n if (!bFound && !checked) {\n this._currentExclusions.push(value.toLowerCase());\n }\n // on la retire si la valeur existe et est deselectionnée\n if (bFound && checked) {\n this._currentExclusions.splice(iFound, 1);\n }\n },\n /**\n * this method is called by event 'submit' on 'GPisochronForm' tag form\n * (cf. this._createIsoPanelFormElement),\n * and call isocurve service to display results\n *\n * @private\n */\n onIsoComputationSubmit: function onIsoComputationSubmit() {\n if (!this._currentPoint || !this._currentPoint.getCoordinate || !this._currentPoint.getCoordinate()) {\n return;\n }\n\n // récupération du temps\n var time;\n if (this._currentComputation.toLowerCase() === \"time\") {\n // durée exprimée en secondes\n time = this._currentTimeHour * 3600 + this._currentTimeMinute * 60;\n logger.log(\"time : \", time);\n }\n\n // récupération de la distance\n var distance;\n if (this._currentComputation.toLowerCase() === \"distance\") {\n // distance exprimée en mètres\n distance = this._currentDistance * 1000;\n logger.log(\"distance : \", distance);\n }\n\n // si on n'a pas de valeur de calcul renseignée, on ne lance pas la requête.\n if (!time && !distance) {\n logger.log(\"Missing time or distance parameter\");\n return;\n }\n\n // mise en place de la patience\n this._displayWaitingContainer();\n var self = this;\n var pointCoordinate = self._currentPoint.getCoordinate();\n var position = {\n x: pointCoordinate.lon || pointCoordinate.lng,\n y: pointCoordinate.lat\n };\n this._requestIsoCurve({\n position: position,\n graph: self._currentTransport,\n exclusions: self._currentExclusions,\n method: self._currentComputation,\n reverse: self._currentDirection.toLowerCase() === \"arrival\",\n time: time,\n distance: distance,\n smoothing: true,\n timeout: 7000,\n protocol: \"XHR\",\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results) {\n self._drawIsoResults(results);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME mise à jour du controle mais le service ne repond pas en 200 !?\n self._hideWaitingContainer();\n self._clearIsoResultsGeometry();\n logger.log(error.message);\n }\n });\n },\n // ################################################################### //\n // ######################## isocurve calculation ##################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onIsoComputationSubmit\n * and executes a request to the service.\n *\n * @param {Object} settings - service settings\n *\n * @private\n */\n _requestIsoCurve: function _requestIsoCurve(settings) {\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!settings || _typeof(settings) === \"object\" && Object.keys(settings).length === 0) {\n return;\n }\n\n // on ne fait pas de requête si on n'a pas de point d'origine\n if (!settings.position) {\n return;\n }\n var options = {};\n // on recupere les parametres de saisie et les callbacks\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(options, settings);\n // ainsi que les options du service\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(options, this.options.isocurveOptions);\n options.apiKey = this.options.isocurveOptions.apiKey || this.options.apiKey;\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n options.ssl = this.options.ssl;\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Services.isoCurve(options);\n },\n /**\n * this method is called by this.onIsoComputationSubmit (in case of success)\n * and draw isocurve results geometry on map\n *\n * @param {Object} results - isocurve response results\n *\n * @private\n */\n _drawIsoResults: function _drawIsoResults(results) {\n this._clearIsoResultsGeometry();\n\n // sauvegarde de l'etat des resultats\n this._currentIsoResults = results;\n if (!results.geometry) {\n // cache la patience\n this._hideWaitingContainer();\n return;\n }\n var map = this._map;\n var _geometry = results.geometry;\n var _style = {\n color: \"#ff7800\",\n weight: 5,\n opacity: 0.65\n };\n this._geojsonIso = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.geoJson(_geometry, {\n style: _style\n }).addTo(map);\n\n // cache la patience\n this._hideWaitingContainer();\n this._formContainer.className = \"GPisochroComponentHidden\";\n },\n // ################################################################### //\n // ############################# Clean ############################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onShowIsoPanelClick()\n * and it clears all elements (reinit).\n *\n * @private\n */\n _clear: function _clear() {\n this._initTransport();\n this._initExclusions();\n this._initComputation();\n this._initDirection();\n\n // resultats du service\n this._currentIsoResults = null;\n\n // la geometrie\n this._clearIsoResultsGeometry();\n\n // les points\n this._currentPoint.clear();\n\n // nettoyer les valeurs dans le DOM !\n if (this._timeHourContainer) {\n this._timeHourContainer.value = 0;\n }\n if (this._timeMinuteContainer) {\n this._timeMinuteContainer.value = 0;\n }\n if (this._distanceContainer) {\n this._distanceContainer.value = 0;\n }\n },\n /**\n * this method is called by this.onIsoComputationSubmit()\n * and it clears all route geometries.\n *\n * @private\n */\n _clearIsoResultsGeometry: function _clearIsoResultsGeometry() {\n var map = this._map;\n if (this._geojsonIso != null) {\n map.removeLayer(this._geojsonIso);\n this._geojsonIso = null;\n }\n },\n // ################################################################### //\n // ############################ Patience ############################# //\n // ################################################################### //\n\n /**\n * this method displays waiting container and sets a timeout\n *\n * @private\n */\n _displayWaitingContainer: function _displayWaitingContainer() {\n this._waitingContainer.className = \"GPisochronCalcWaitingContainerVisible\";\n this._waiting = true;\n\n // mise en place d'un timeout pour réinitialiser le panel (cacher la patience)\n // si on est toujours en attente (si la requête est bloquée par exemple)\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n var context = this;\n this._timer = setTimeout(function () {\n if (context._waiting === true) {\n context._hideWaitingContainer();\n } else {\n if (context._timer) {\n clearTimeout(context._timer);\n }\n }\n }, 16000);\n },\n /**\n * this method hides waiting container and clears timeout\n *\n * @private\n */\n _hideWaitingContainer: function _hideWaitingContainer() {\n if (this._waiting) {\n this._waitingContainer.className = \"GPisochronCalcWaitingContainerHidden\";\n this._waiting = false;\n clearTimeout(this._timer);\n this._timer = null;\n }\n },\n // ################################################################### //\n // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ //\n // ################################################################### //\n\n /**\n * This method is public.\n * It allows to control the execution of a traitment.\n *\n * @param {Object} position - position = {lon: , lat: }\n * @param {Object} value - distance en km ou heures-minutes\n * @param {Object} options - options = {...}\n */\n compute: function compute(position, value, options) {\n if (!this._showContainer.checked) {\n this._pictoContainer.click();\n }\n var map = this._map;\n if (!map) {\n return;\n }\n\n // Les options par defauts\n var settings = {\n direction: \"departure\",\n method: \"time\",\n transport: \"Voiture\",\n exclusions: []\n };\n\n // On recupere les options\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(settings, options);\n this._currentPoint.setCoordinate(position);\n var input = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPlocationOrigin_\" + 0 + \"-\" + this._uid);\n input.value = position.lng + \" , \" + position.lat;\n this._currentTransport = settings.transport;\n if (settings.transport === \"Voiture\") {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronTransportCar-\" + this._uid).checked = true;\n } else {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronTransportPedestrian-\" + this._uid).checked = true;\n }\n this._currentExclusions = settings.exclusions;\n this._currentComputation = settings.method;\n if (settings.method === \"time\") {\n var time = value.split(\".\");\n this._currentTimeHour = time[0] || 0;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronValueChronInput1-\" + this._uid).value = this._currentTimeHour;\n this._currentTimeMinute = time[1] || 0;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronValueChronInput2-\" + this._uid).value = this._currentTimeMinute;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronChoiceAltChron-\" + this._uid).click();\n } else {\n this._currentDistance = value;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronValueDistInput-\" + this._uid).value = this._currentDistance;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronChoiceAltDist-\" + this._uid).click();\n }\n this._currentDirection = settings.direction;\n settings.direction === \"departure\" ? leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 0 : leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 1;\n this.onIsoComputationSubmit();\n map.flyTo(position);\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Isocurve);\nvar deepEqual = function deepEqual(x, y) {\n if (x === y) {\n return true;\n } else if (_typeof(x) === \"object\" && x != null && _typeof(y) === \"object\" && y != null) {\n if (Object.keys(x).length !== Object.keys(y).length) {\n return false;\n }\n for (var prop in x) {\n if (y.hasOwnProperty(prop)) {\n if (!deepEqual(x[prop], y[prop])) {\n return false;\n }\n } else {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL0lzb2N1cnZlLmpzP2QwODYiXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiSXNvY3VydmUiLCJMIiwiQ29udHJvbCIsImV4dGVuZCIsImluY2x1ZGVzIiwiSXNvRE9NIiwib3B0aW9ucyIsInBvc2l0aW9uIiwiY29sbGFwc2VkIiwibWV0aG9kcyIsImdyYXBocyIsImV4Y2x1c2lvbnMiLCJ0b2xsIiwidHVubmVsIiwiYnJpZGdlIiwiZGlyZWN0aW9ucyIsImRpc2FibGVSZXZlcnNlIiwiaXNvY3VydmVPcHRpb25zIiwiYXV0b2NvbXBsZXRlT3B0aW9ucyIsImluaXRpYWxpemUiLCJVdGlsIiwic2V0T3B0aW9ucyIsIl91aWQiLCJJRCIsImdlbmVyYXRlIiwiX2lzRGVza3RvcCIsIl9kZXRlY3RTdXBwb3J0IiwiX3dhaXRpbmdDb250YWluZXIiLCJfc2hvd0NvbnRhaW5lciIsIl9waWN0b0NvbnRhaW5lciIsIl9mb3JtQ29udGFpbmVyIiwiX3N1Ym1pdENvbnRhaW5lciIsIl9jdXJyZW50VHJhbnNwb3J0IiwiX2N1cnJlbnREaXJlY3Rpb24iLCJfY3VycmVudENvbXB1dGF0aW9uIiwiX2N1cnJlbnRUaW1lSG91ciIsIl9jdXJyZW50VGltZU1pbnV0ZSIsIl9jdXJyZW50RGlzdGFuY2UiLCJfY3VycmVudEV4Y2x1c2lvbnMiLCJfaW5pdFRyYW5zcG9ydCIsIl9pbml0Q29tcHV0Y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BvciBhcyBhbiBhcnJpdmFsIHBvaW50IChcImFycml2YWxcIilcbiAgICAgKiBAcGFyYW0ge0Jvb2xlYW59IFtvcHRpb25zLmRpc2FibGVSZXZlcnNlID0gZmFsc2VdIC0gd2hldGhlciB0byBlbmFibGUvZGlzYWJsZSB0aGUgcmV2ZXJzZSBnZW9jb2RpbmdcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gW29wdGlvbnMuaXNvY3VydmVPcHRpb25zID0ge31dIC0gaXNvY3VydmUgc2VydmljZSBvcHRpb25zLlxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBbb3B0aW9ucy5hdXRvY29tcGxldGVPcHRpb25zID0ge31dIC0gYXV0b2NvbXBsZXRlIHNlcnZpY2Ugb3B0aW9ucy5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqICB2YXIgaXNvID0gTC5nZW9wb3J0YWxDb250cm9sLklzb2N1cnZlKHtcbiAgICAgKiAgICAgIGNvbGxhcHNlZCA6IGZhbHNlXG4gICAgICogICAgICBtZXRob2RzIDogW1widGltZVwiLCBcImRpc3RhbmNlXCJdLFxuICAgICAqICAgICAgZXhjbHVzaW9ucyA6IHtcbiAgICAgKiAgICAgICAgIHRvbGwgOiB0cnVlLFxuICAgICAqICAgICAgICAgYnJpZGdlIDogZmFsc2UsXG4gICAgICogICAgICAgICB0dW5uZWwgOiB0cnVlXG4gICAgICogICAgICB9LFxuICAgICAqICAgICAgZ3JhcGhzIDogW1wiUGlldG9uXCIsIFwiVm9pdHVyZVwiXSxcbiAgICAgKiAgICAgIGlzb2N1cnZlT3B0aW9ucyA6IHt9LFxuICAgICAqICAgICAgYXV0b2NvbXBsZXRlT3B0aW9ucyA6IHt9XG4gICAgICogIH0pO1xuICAgICAqL1xuICAgIGluaXRpYWxpemUgOiBmdW5jdGlvbiAob3B0aW9ucykge1xuICAgICAgICAvLyBvbiB0cmFuc21ldCBsZXMgb3B0aW9ucyBhdSBjb250cm9sZVxuICAgICAgICBMLlV0aWwuc2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AgICAgICAgICAgbG9nZ2VyLmxvZyhcIk1pc3NpbmcgdGltZSBvciBkaXN0YW5jZSBwYXJhbWV0ZXJcIik7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBtaXNlIGVuIHBsYWNlIGRlIGxhIHBhdGllbmNlXG4gICAgICAgIHRoaXMuX2Rpc3BsYXlXYWl0aW5nQ29udGFpbmVyKCk7XG5cbiAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuXG4gICAgICAgIHZhciBwb2ludENvb3JkaW5hdGUgPSBzZWxmLl9jdXJyZW50UG9pbnQuZ2V0Q29vcmRpbmF0ZSgpO1xuICAgICAgICB2YXIgcG9zaXRpb24gPSB7XG4gICAgICAgICAgICB4IDogcG9pbnRDb29yZGluYXRlLmxvbiB8fCBwb2ludENvb3JkaW5hdGUubG5nLFxuICAgICAgICAgICAgeSA6IHBvaW50Q29vcmRpbmF0ZS5sYXRcbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLl9yZXF1ZXN0SXNvQ3VydmUoe1xuICAgICAgICAgICAgcG9zaXRpb24gOiBwb3NpdGlvbixcbiAgICAgICAgICAgIGdyYXBoIDogc2VsZi5fY3VycmVudFRyYW5zcG9ydCxcbiAgICAgICAgICAgIGV4Y2x1c2lvbnMgOiBzZWxmLl9jdXJyZW50RXhjbHVzaW9ucyxcbiAgICAgICAgICAgIG1ldGhvZCA6IHNlbGYuX2N1cnJlbnRDb21wdXRhdGlvbixcbiAgICAgICAgICAgIHJldmVyc2UgOiAoc2VsZi5fY3VycmVudERpcmVjdGlvbi50b0xvd2VyQ2FzZSgpID09PSBcImFycml2YWxcIiksXG4gICAgICAgICAgICB0aW1lIDogdGltZSxcbiAgICAgICAgICAgIGRpc3RhbmNlIDogZGlzdGFuY2UsXG4gICAgICAgICAgICBzbW9vdGhpbmcgOiB0cnVlLFxuICAgICAgICAgICAgdGltZW91dCA6IDcwMDAsXG4gICAgICAgICAgICBwcm90b2NvbCA6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ICAgICAgdGhpcy5fd2FpdGluZ0NvbnRhaW5lci5jbGFzc05hbWUgPSBcIkdQaXNvY2hyb25DYWxjV2FpdGluZ0NvbnRhaW5lclZpc2libGVcIjtcbiAgICAgICAgdGhpcy5fd2FpdGluZyA9IHRydWU7XG5cbiAgICAgICAgLy8gbWlzZSBlbiBwbGFjZSBkJ3VuIHRpbWVvdXQgcG91ciByw6lpbml0aWFsaXNlciBsZSBwYW5lbCAoY2FjaGVyIGxhIHBhdGllbmNlKVxuICAgICAgICAvLyBzaSBvbiBlc3QgdG91am91cnMgZW4gYXR0ZW50ZSAoc2kgbGEgcmVxdcOqdGUgZXN0IGJsb3F1w6llIHBhciBleGVtcGxlKVxuICAgICAgICBpZiAodGhpcy5fdGltZXIpIHtcbiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl90aW1lcik7XG4gICAgICAgICAgICB0aGlzLl90aW1lciA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGNvbnRleHQgPSB0aGlzO1xuICAgICAgICB0aGlzLl90aW1lciA9IHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgaWYgKGNvbnRleHQuX3dhaXRpbmcgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICBjb250ZXh0Ll9oaWRlV2FpdGluZ0NvbnRhaW5lcigpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5fdGltZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KGNvbnRleHQuX3RpbWVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIDE2MDAwKTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaGlkZXMgd2FpdGluZyBjb250YWluZXIgYW5kIGNsZWFycyB0aW1lb3V0XG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICA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IChPYmplY3Qua2V5cyh4KS5sZW5ndGggIT09IE9iamVjdC5rZXlzKHkpLmxlbmd0aCkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgcHJvcCBpbiB4KSB7XG4gICAgICAgICAgICBpZiAoeS5oYXNPd25Qcm9wZXJ0eShwcm9wKSkge1xuICAgICAgICAgICAgICAgIGlmICghZGVlcEVxdWFsKHhbcHJvcF0sIHlbcHJvcF0pKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/Isocurve.js\n"); /***/ }), @@ -1619,7 +1619,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var leaf /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Common/Utils/MathUtils */ \"./src/Common/Utils/MathUtils.js\");\n/* harmony import */ var _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Common/Controls/MousePositionDOM */ \"./src/Common/Controls/MousePositionDOM.js\");\n/* harmony import */ var _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Utils/PositionFormater */ \"./src/Leaflet/Controls/Utils/PositionFormater.js\");\n/* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../CRS/CRS */ \"./src/Leaflet/CRS/CRS.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n\n\n\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getLogger(\"mouseposition\");\n\n/**\n * @classdesc\n *\n * Leaflet Control Class to display Mouse position in various CRS and altitude using the altimetric web service of the Geoportal Platform.\n *\n * Use {@link module:Controls.MousePosition L.geoportalControl.MousePosition()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.Control native class.\n *\n * @namespace\n * @alias L.geoportalControl.MousePosition\n */\nvar MousePosition = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends L.geoportalControl.MousePosition.prototype */{\n includes: _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n /**\n * options by default\n *\n * @private\n */\n options: {\n position: \"bottomleft\",\n collapsed: true,\n units: [],\n systems: [],\n displayAltitude: true,\n displayCoordinates: true,\n editCoordinates: false,\n altitude: {\n triggerDelay: 200,\n responseDelay: 500,\n noDataValue: -99999,\n noDataValueTolerance: 90000,\n serviceOptions: {}\n }\n },\n /**\n * @constructor MousePosition\n *\n * @private\n * @alias MousePosition\n * @extends {L.Control}\n * @param {Object} options - options for function call.\n * @param {String} [options.apiKey] - API key. The \"calcul\" key is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {String} [options.position] - position of component into the map, 'bottomleft' by default\n * @param {Boolean} [options.collapsed = true] - collapse mode, false by default\n * @param {Array} [options.systems] - list of projection systems, GEOGRAPHIC, MERCATOR, LAMB93 and LAMB2E by default\n * Each array element (=system) is an object with following properties :\n * @param {String} options.systems.crs - Proj4 crs alias (from proj4 defs). e.g. : \"EPSG:4326\". Required\n * @param {String} [options.systems.label] - CRS label to be displayed in control. Default is crs code (e.g. \"EPSG:4326\")\n * @param {String} [options.systems.type] - CRS units type for coordinates conversion : \"Geographical\" or \"Metric\". Default: \"Metric\"\n * @param {Object} [options.systems.geoBBox] - Aera covered by the system (WGS84 coordinates).\n * @param {Number} options.systems.geoBBox.right - Right bound.\n * @param {Number} options.systems.geoBBox.left - Left bound.\n * @param {Number} options.systems.geoBBox.top - Top bound.\n * @param {Number} options.systems.geoBBox.bottom - Bottom bound.\n * @param {Array} [options.units] - list of units by system, Geographical and Metric by default\n * Values may be \"DEC\" (decimal degrees), \"DMS\" (sexagecimal), \"RAD\" (radians) and \"GON\" (grades) for geographical coordinates,\n * and \"M\" or \"KM\" for metric coordinates\n * @param {Boolean} [options.displayAltitude= true] - active/desactivate the altitude panel, if desactivate, have just the coordinate panel, true by default\n * @param {Boolean} [options.displayCoordinates= true] - active/desactivate the coordinate panel, if desactivate, have just the altitude panel, true by default\n * @param {Boolean} [options.editCoordinates = false] - add edit coordinates options. False by default.\n * @param {Object} [options.altitude] - elevation configuration\n * @param {Object} [options.altitude.serviceOptions] - options of elevation service\n * @param {Number} [options.altitude.responseDelay] - latency for altitude request, 500 ms by default\n * @param {Number} [options.altitude.triggerDelay] - immobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default\n * @param {Number} [options.altitude.noDataValue] - value used for altitude service no data (default is -99999). In this case, \"---m\" will be displayed instead of \"-99999m\"\n * @param {Number} [options.altitude.noDataValueTolerance] - tolerance for no data value :\n * values in [noDataValue - noDataValueTolerance ; noDataValue + noDataValueTolerance] interval will not be displayed, but \"---m\" will be displayed instead.\n * Default is 90000\n * @example\n * var MousePosition = L.geoportalControl.MousePosition({\n * position : 'bottomleft',\n * collapsed : false,\n * displayAltitude : true,\n * displayCoordinates : true,\n * editCoordinates : false,\n * altitude : {\n * triggerDelay : 100,\n * responseDelay : 500,\n * noDataValue : -99999,\n * noDataValueTolerance : 90000,\n * serviceOptions : {}\n * },\n * systems : [\n * {\n * crs : L.CRS.EPSG4326,\n * label : \"Lon,Lat\",\n * type : \"Geographical\"\n * },\n * {\n * crs : L.geoportalCRS.EPSG2154,\n * label : \"Lambert 93\",\n * type : \"Metric\"\n * }\n * ],\n * units : [\"DEC\", \"DMS\"]\n * });\n */\n initialize: function initialize(options) {\n // on merge les options avec celles par defaut\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(this.options, options);\n\n // uuid\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].generate();\n\n // initialisation des systemes de projections\n this._projectionSystems = [];\n this._initProjectionSystems();\n\n // initialisation des systemes des unités\n this._projectionUnits = {};\n this._initProjectionUnits();\n\n // detection du support : desktop ou tactile\n this._isDesktop = this._detectSupport();\n\n // on met en place un seuil sur le timer\n if (this.options.altitude.triggerDelay < 100) {\n this.options.altitude.triggerDelay = 100;\n }\n\n // timer sur le delai d'immobilisation du mouvement\n this._timer = this.options.altitude.triggerDelay;\n\n // Systeme de projection selectionné (cf. _initProjectionSystems)\n this._currentProjectionSystems = this._projectionSystems[0];\n\n // Container des systemes\n this._projectionSystemsContainer = null;\n\n /** Type d'unité de projection selectionnés : Geographical ou Metric (cf._initProjectionSystems ) */\n this._currentProjectionType = this._projectionSystems[0].type;\n\n // Unité de projection selectionnés (cf. _initProjectionUnits)\n this._currentProjectionUnits = this._projectionUnits[this._currentProjectionType][0].code;\n\n // Container des unités\n this._projectionUnitsContainer = null;\n\n /** Container de visualisation du panneau du composant */\n this._showContainer = null;\n this._pictoContainer = null;\n this._panelContainer = null;\n this._panelHeaderContainer = null;\n\n // gestion de l'affichage du panneau de l'altitude / coordonnées\n if (!this.options.displayAltitude && !this.options.displayCoordinates) {\n // on reactive cette option !\n this.options.displayCoordinates = true;\n }\n if (!this.options.displayCoordinates) {\n // si les coordonnées ne sont pas affichées : pas besoin de les éditer...\n this.options.editCoordinates = false;\n }\n\n /** Edition des coordonnées en cours ou non */\n this._isEditing = false;\n\n // on transmet les options au controle\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.setOptions(this, this.options);\n },\n /**\n * this method is called by this.addTo(map) when the control is added on the map\n * and fills variable 'this._container = this.onAdd(map)',\n * and create events on map.\n * @param {Object} map - the map\n *\n * @returns {DOMElement} DOM element\n * @private\n */\n onAdd: function onAdd(map) {\n // initialisation du DOM du composant\n var container = this._container = this._initLayout();\n\n // on met en place l'evenement sur la carte pour recuperer les coordonnées,\n // on l'active à l'ouverture du panneau uniquement !\n if (!this.options.collapsed) {\n // this.onShowMousePositionClick();\n // evenement valable pour le mode desktop !\n if (this._isDesktop) {\n map.on(\"mousemove\", this.onMouseMove, this);\n } else {\n map.on(\"move\", this.onMapMove, this);\n }\n }\n\n // deactivate of events that may interfere with the map\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container);\n\n // on stoppe la propagation de l'événement mousemove sur le container\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.addListener(container, \"mousemove\", leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.stopPropagation).addListener(container, \"mousemove\", leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.preventDefault);\n return container;\n },\n /**\n * this method is called when the control is removed from the map\n * and removes events on map.\n * @param {Object} map - the map\n *\n * @private\n */\n onRemove: function onRemove(map) {\n map.off(\"mousemove\", this.onMouseMove);\n },\n /**\n * this method is called by the constructor and initialize the projection\n * systems.\n * getting coordinates in the requested projection :\n * see this.onMousePositionProjectionSystemChange()\n *\n * @private\n */\n _initProjectionSystems: function _initProjectionSystems() {\n // on donne la possibilité à l'utilisateur de modifier\n // la liste des systèmes à afficher\n // Ex. this.options.systems\n\n // systemes de projection disponible par defaut\n var projectionSystemsByDefault = [{\n label: \"G\\xE9ographique\",\n crs: leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.Simple,\n // L.Projection.LonLat !\n type: \"Geographical\"\n }, {\n label: \"Web Mercator\",\n crs: leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.EPSG3395,\n // L.Projection.SphericalMercator !\n type: \"Metric\"\n }, {\n label: \"Lambert 93\",\n crs: _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__[\"default\"].EPSG2154,\n type: \"Metric\",\n geoBBox: {\n left: -9.86,\n bottom: 41.15,\n right: 10.38,\n top: 51.56\n }\n }, {\n label: \"Lambert II \\xE9tendu\",\n crs: _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__[\"default\"].EPSG27572,\n type: \"Metric\",\n geoBBox: {\n left: -4.87,\n bottom: 42.33,\n right: 8.23,\n top: 51.14\n }\n }];\n var systems = this.options.systems;\n for (var i = 0; i < systems.length; i++) {\n // definition d'un systeme de reference\n var sys = systems[i];\n if (!sys.label) {\n logger.error(\"not defined !\");\n continue;\n }\n if (!sys.crs) {\n logger.error(\"crs not defined !\");\n continue;\n }\n if (!sys.type) {\n logger.warn(\"type srs not defined, use 'Metric' by default !\");\n sys.type = \"Metric\";\n }\n this._projectionSystems.push(systems[i]);\n\n // it's a just a test ...\n var found = false;\n for (var j = 0; j < projectionSystemsByDefault.length; j++) {\n var obj = projectionSystemsByDefault[j];\n if (sys.crs === obj.crs) {\n found = true;\n logger.info(\"crs '{}' already configured by default\", obj.code);\n }\n }\n if (!found) {\n logger.info(\"crs '{}' not found, it's a new projection\", sys.code || sys.label);\n }\n }\n\n // au cas où...\n if (this._projectionSystems.length === 0) {\n this._projectionSystems = projectionSystemsByDefault;\n }\n\n // re-initilisation des codes pour gerer le lien entre _projectionSystems et select du mouse position (lien code/value)\n for (var k = 0; k < this._projectionSystems.length; ++k) {\n this._projectionSystems[k].code = k;\n }\n },\n /**\n * this method is called by the constructor and initialize the units.\n * getting coordinates in the requested units :\n * see this.onMousePositionProjectionUnitsChange()\n *\n * @private\n */\n _initProjectionUnits: function _initProjectionUnits() {\n // on donne la possibilité à l'utilisateur de modifier\n // la liste des unités à afficher\n // Ex.\n // this.options.units : [\"DEC\", \"DMS\"]\n\n // unités disponible par defaut\n var projectionUnitsByDefault = {\n Geographical: [{\n code: \"DEC\",\n label: \"degrés décimaux\",\n format: this._displayDEC\n }, {\n code: \"DMS\",\n label: \"degrés sexagésimaux\",\n format: this._displayDMS\n }, {\n code: \"RAD\",\n label: \"radians\",\n format: this._displayRAD\n }, {\n code: \"GON\",\n label: \"grades\",\n format: this._displayGON\n }],\n Metric: [{\n code: \"M\",\n label: \"mètres\",\n format: this._displayMeter\n }, {\n code: \"KM\",\n label: \"kilomètres\",\n format: this._displayKMeter\n }]\n };\n var units = this.options.units;\n for (var type in projectionUnitsByDefault) {\n if (projectionUnitsByDefault.hasOwnProperty(type)) {\n var found = false;\n for (var j = 0; j < projectionUnitsByDefault[type].length; j++) {\n var obj = projectionUnitsByDefault[type][j];\n for (var i = 0; i < units.length; i++) {\n var unit = units[i];\n if (obj.code === unit) {\n found = true;\n if (!this._projectionUnits[type]) {\n this._projectionUnits[type] = [];\n }\n this._projectionUnits[type].push(obj);\n }\n }\n }\n if (!found) {\n this._projectionUnits[type] = projectionUnitsByDefault[type];\n }\n }\n }\n\n // au cas où...\n if (Object.keys(this._projectionUnits).length === 0) {\n this._projectionUnits = projectionUnitsByDefault;\n }\n },\n /**\n * this method is called by the constructor.\n * this information is useful to switch to touch mode.\n * Detection : test for desktop or tactile\n *\n * @returns {Boolean} is desktop\n * @private\n */\n _detectSupport: function _detectSupport() {\n // TODO\n // Choix de gérer la détection dans le code du composant au lieu du DOM car :\n // Utilisation de l'implémentation Leaflet\n // http://leafletjs.com/reference.html#browser\n\n var isDesktop = true;\n var userAgent = window.navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\"iphone\") !== -1 || userAgent.indexOf(\"ipod\") !== -1 || userAgent.indexOf(\"ipad\") !== -1 || userAgent.indexOf(\"android\") !== -1 || userAgent.indexOf(\"mobile\") !== -1 || userAgent.indexOf(\"blackberry\") !== -1 || userAgent.indexOf(\"tablet\") !== -1 || userAgent.indexOf(\"phone\") !== -1 || userAgent.indexOf(\"touch\") !== -1) {\n isDesktop = false;\n }\n if (userAgent.indexOf(\"msie\") !== -1 || userAgent.indexOf(\"trident\") !== -1) {\n isDesktop = true;\n }\n return isDesktop;\n },\n // ################################################################### //\n // ######################## methods handle dom ####################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd(map)\n * and initialize the container HTMLElement\n *\n * @returns {DOMElement} DOM element\n * @private\n */\n _initLayout: function _initLayout() {\n // create main container\n var container = this._createMainContainerElement();\n var inputShow = this._showContainer = this._createShowMousePositionElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.options.collapsed) {\n inputShow.checked = true;\n }\n var picto = this._pictoContainer = this._createShowMousePositionPictoElement(this._isDesktop);\n container.appendChild(picto);\n var panel = this._panelContainer = this._createMousePositionPanelElement();\n var header = this._panelHeaderContainer = this._createMousePositionPanelHeaderElement();\n panel.appendChild(header);\n var basic = this._createMousePositionPanelBasicElement(this.options.displayAltitude, this.options.displayCoordinates, this.options.editCoordinates);\n panel.appendChild(basic);\n var arraySettings = this._createShowMousePositionSettingsElement(this.options.displayCoordinates);\n for (var j = 0; j < arraySettings.length; j++) {\n panel.appendChild(arraySettings[j]);\n }\n var settings = this._createMousePositionSettingsElement();\n var systems = this._projectionSystemsContainer = this._createMousePositionSettingsSystemsElement(this._projectionSystems);\n var units = this._projectionUnitsContainer = this._createMousePositionSettingsUnitsElement(this._projectionUnits[this._currentProjectionType]);\n settings.appendChild(systems);\n settings.appendChild(units);\n panel.appendChild(settings);\n container.appendChild(panel);\n\n // ce tag n'est pas à placer dans le container du controle,\n // mais dans celui de la map !\n var center = this._createMapCenter();\n var map = this._map;\n map.getContainer().appendChild(center);\n return container;\n },\n /**\n * this method is called by this.()\n * and it changes the elevation view panel into the dom.\n * FIXME call by ID !\n *\n * @param {Boolean} active - true:active, false:disable\n *\n * @private\n */\n _setElevationPanel: function _setElevationPanel(active) {\n var div = null;\n if (!active) {\n div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionAltitude\"));\n div.style.display = \"none\";\n }\n },\n /**\n * this method is called by this.()\n * and it changes the coordinate view panel into the dom.\n * FIXME call by ID !\n *\n * @param {Boolean} active - true:active, false:disable\n *\n * @private\n */\n _setCoordinatePanel: function _setCoordinatePanel(active) {\n if (!active) {\n var div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionCoordinate\"));\n div.style.display = \"none\";\n }\n },\n /**\n * this method is called by this.()\n * and it changes the settings view panel into the dom.\n * FIXME call by ID !\n *\n * @param {Boolean} active - true:active, false:disable\n *\n * @private\n */\n _setSettingsPanel: function _setSettingsPanel(active) {\n if (!active) {\n var divPicto = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GPshowMousePositionSettingsPicto\");\n var divPanel = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionSettings\"));\n divPicto.style.display = \"none\";\n divPanel.style.display = \"none\";\n }\n },\n /**\n * this method is called by this.onMousePositionProjectionSystemChange()\n * when changes to a metric or a geographical units.\n *\n * @param {String} type - Geographical or Metric\n *\n * @private\n */\n _setTypeUnitsPanel: function _setTypeUnitsPanel(type) {\n var container = this._projectionUnitsContainer;\n\n // on supprime les enfants...\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n var units = this._projectionUnits[type];\n for (var j = 0; j < units.length; j++) {\n var obj = units[j];\n var option = document.createElement(\"option\");\n option.value = obj.code ? obj.code : j;\n option.text = obj.label || j;\n // option.label = obj.label;\n container.appendChild(option);\n }\n var projectionUnits = this._projectionUnits[type][0].code;\n if (this._currentProjectionUnits === \"DMS\" || projectionUnits === \"DMS\") {\n this._resetCoordinateElements(this.options.editCoordinates, type, projectionUnits);\n this._setEditMode(this._isEditing);\n }\n\n // le nouveau type de system ...\n this._currentProjectionType = type;\n\n // Mise a jour des elements labels et unites\n this._resetLabelElements(type);\n this._resetUnitElements(projectionUnits);\n\n // et comme on a changé de type de systeme,\n // il faut changer aussi d'unité !\n this._currentProjectionUnits = this._projectionUnits[type][0].code;\n },\n // ################################################################### //\n // ######################## method units format ###################### //\n // ################################################################### //\n\n /**\n * degreedecimal\n * @param {Object} oLatLng - coordinates\n *\n * @returns {Object} coordinates in decimal\n * @private\n */\n _displayDEC: function _displayDEC(oLatLng) {\n var coordinate = {};\n coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].roundToDecimal(oLatLng.lat, 6);\n coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].roundToDecimal(oLatLng.lng, 6);\n coordinate.unit = \"°\";\n return coordinate;\n },\n /**\n * degreedecimal2sexagecimal\n * @param {Object} oLatLng - coordinates\n *\n * @returns {Object} coordinates in DMS\n * @private\n */\n _displayDMS: function _displayDMS(oLatLng) {\n var coordinate = {};\n coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalLatToDMS(oLatLng.lat, true);\n coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalLonToDMS(oLatLng.lng, true);\n return coordinate;\n },\n /**\n * degreedecimal2radian\n * @param {Object} oLatLng - coordinates\n *\n * @returns {Object} coordinates in radian\n * @private\n */\n _displayRAD: function _displayRAD(oLatLng) {\n var coordinate = {};\n coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalToRadian(oLatLng.lat);\n coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalToRadian(oLatLng.lng);\n coordinate.unit = \"rad\";\n return coordinate;\n },\n /**\n * degreedecimal2grade\n * @param {Object} oLatLng - coordinates\n *\n * @returns {Object} coordinates in gon\n * @private\n */\n _displayGON: function _displayGON(oLatLng) {\n var coordinate = {};\n coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalToGrade(oLatLng.lat);\n coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalToGrade(oLatLng.lng);\n coordinate.unit = \"gon\";\n return coordinate;\n },\n /**\n * meter\n * @param {Object} oXY - coordinates\n *\n * @returns {Object} coordinates in meters\n * @private\n */\n _displayMeter: function _displayMeter(oXY) {\n // on recoit toujours des coordonnées metriques\n var coordinate = {};\n coordinate.x = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.x, 2);\n coordinate.y = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.y, 2);\n coordinate.unit = \"m\";\n return coordinate;\n },\n /**\n * kilometer\n * @param {Object} oXY - coordinates\n *\n * @returns {Object} coordinates in km\n * @private\n */\n _displayKMeter: function _displayKMeter(oXY) {\n var coordinate = {};\n coordinate.x = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.x / 1000, 2);\n coordinate.y = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.y / 1000, 2);\n coordinate.unit = \"km\";\n return coordinate;\n },\n // ################################################################### //\n // ####################### method system project ##################### //\n // ################################################################### //\n\n /**\n * this method projects a coordinate to a specific projection.\n * FIXME\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n * @param {Object} crs - projection system (ex. GEOGRAPHIC, LAMB93, LAMB2E, MERCATOR, ...)\n * @returns {Object} oXY - coordinate\n * @private\n */\n _project: function _project(oLatLng, crs) {\n // cf. http://leafletjs.com/reference.html#iprojection\n // notre carte est dans la projection par defaut :\n // Spherical Mercator projection (EPSG:3857)\n // - GEOGRAPHIC : conversion native, L.CRS.Simple ou L.Projection.LngLat.project(latlng)\n // - LAMB93 : L.GeoportalCRS.EPSG2154 ou projection.project(latlng)\n // - LAMB2E : L.GeoportalCRS.EPSG27572 ou projection.project(latlng)\n // - MERCATOR ou EPSG:3395 : L.CRS.EPSG3395 ou L.Projection.Mercator.project(latlng)\n\n if (typeof crs === \"function\") {\n // \"crs is an function !\"... en mode AMD !\n crs = crs();\n }\n if (_typeof(crs) !== \"object\") {\n logger.log(\"crs is not an object !\");\n return;\n }\n\n // pas de reprojection pour le systeme de projection natif !\n if (crs === leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.Simple) {\n return oLatLng;\n }\n if (!crs.projection || _typeof(crs.projection) !== \"object\") {\n logger.error(\"projection is not an object !\");\n return;\n }\n var oPoint = crs.projection.project(oLatLng);\n\n // FIXME reprojeter du geographique en geographique cause qq problemes\n // Ex. LatLng en EPSG4326 !\n // FIXME probleme d'inversion d'axe sur les projections geographiques\n // Ex. EPSG:4326 -> lat/lon\n // IGNF:RGF93G -> lon/lat\n if (this._currentProjectionType === \"Geographical\") {\n oPoint.lat = oPoint.y;\n oPoint.lng = oPoint.x;\n }\n if (!oPoint || Object.keys(oPoint).length === 0) {\n logger.error(\"Failed to project with crs code : \" + crs.code);\n }\n return oPoint;\n },\n /**\n * this method unprojects a coordinate to a geographic projection.\n *\n * @param {Object} oXY - coordinate\n * @returns {Object} oLatLng - geographic coordinate (L.LatLng)\n * @private\n */\n _unproject: function _unproject(oXY) {\n // cf. http://leafletjs.com/reference.html#iprojection\n // notre carte est dans la projection par defaut :\n // Spherical Mercator projection (EPSG:3857)\n // - GEOGRAPHIC : conversion native, L.CRS.Simple ou L.Projection.LngLat.project(latlng)\n // - LAMB93 : L.GeoportalCRS.EPSG2154 ou projection.project(latlng)\n // - LAMB2E : L.GeoportalCRS.EPSG27572 ou projection.project(latlng)\n // - MERCATOR ou EPSG:3395 : L.CRS.EPSG3395 ou L.Projection.Mercator.project(latlng)\n\n var oSrs = this._currentProjectionSystems.crs;\n if (!oSrs) {\n logger.log(\"system crs not found\");\n return;\n }\n if (typeof oSrs === \"function\") {\n // \"crs is an function !\"... en mode AMD !\n oSrs = oSrs();\n }\n if (_typeof(oSrs) !== \"object\") {\n logger.log(\"crs is not an object !\");\n return;\n }\n\n // pas de reprojection pour le systeme de projection natif !\n if (oSrs === leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.Simple) {\n return {\n lat: oXY.y,\n lng: oXY.x\n };\n }\n if (this._currentProjectionType === \"Geographical\") {\n return {\n lat: oXY.y,\n lng: oXY.x\n };\n }\n if (!oSrs.projection || _typeof(oSrs.projection) !== \"object\") {\n logger.error(\"projection is not an object !\");\n return;\n }\n var oLatLng = oSrs.projection.unproject(oXY);\n if (!oLatLng || Object.keys(oLatLng).length === 0) {\n logger.error(\"Failed to unproject coordinate\");\n }\n return oLatLng;\n },\n // ################################################################### //\n // ##################### handlers events to control ################## //\n // ################################################################### //\n\n /**\n * this sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n *\n * @private\n */\n _setCoordinate: function _setCoordinate(oLatLng) {\n // structure\n // L.LatLng\n // lat: 4.07249425916745\n // lng: 2.4609375\n\n // type de systeme : Geographical ou Metric\n var type = this._currentProjectionSystems.type;\n\n // on recherche la fonction de formatage dans l'unitée demandée\n var format = null;\n var units = this._projectionUnits[type];\n for (var i = 0; i < units.length; i++) {\n if (units[i].code === this._currentProjectionUnits) {\n format = units[i].format;\n break;\n }\n }\n\n // structure pour les coordonnées en fonctin du type demandé :\n // {x:, y:, unit:} ou {lng:, lat:} ou {lon:, lat:} ou {e:, n:, unit:}...\n var coordinate = {};\n // on projete le point dans le systeme demandé\n var oSrs = this._currentProjectionSystems.crs;\n if (!oSrs) {\n logger.error(\"crs not found !\");\n return;\n }\n coordinate = format(this._project(oLatLng, oSrs));\n if (!coordinate || Object.keys(coordinate).length === 0) {\n return;\n }\n this.GPdisplayCoords(coordinate);\n },\n /**\n * this sends the coordinates to the panel.\n * (cf. this.GPdisplayElevation() into the DOM functions)\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n *\n * @private\n */\n _setElevation: function _setElevation(oLatLng) {\n // gestion du timer de la requete du service d'altitude\n var delay = this.options.altitude.responseDelay;\n var noDataValue = this.options.altitude.noDataValue;\n var noDataValueTolerance = this.options.altitude.noDataValueTolerance;\n this.GPdisplayElevation(oLatLng, delay, noDataValue, noDataValueTolerance);\n },\n /**\n * this method is triggered when the mouse or the map is stopped.\n * (cf. onMouseMove and onMapMove)\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n *\n * @private\n */\n onMoveStopped: function onMoveStopped(oLatLng) {\n this._setElevation(oLatLng);\n },\n /**\n * this method is an handler event to control. The event is 'mousemove' on\n * the map. The handler sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMouseMove: function onMouseMove(e) {\n var self = this;\n var oLatLng = e.latlng;\n this._setCoordinate(oLatLng);\n clearTimeout(this._timer);\n this._timer = setTimeout(function () {\n self.onMoveStopped(oLatLng);\n }, this.options.altitude.triggerDelay);\n },\n /**\n * this method is an handler event to control. The event is 'moveend' on\n * the map. The handler sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @private\n */\n onMapMove: function onMapMove() {\n var self = this;\n var map = this._map;\n var oLatLng = map.getCenter();\n this._setCoordinate(oLatLng);\n clearTimeout(this._timer);\n this._timer = setTimeout(function () {\n self.onMoveStopped(oLatLng);\n }, this.options.altitude.triggerDelay);\n },\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by this.GPdisplayCoords() in the dom, and\n * it executes a request to the elevation service.\n *\n * @param {Object} coordinate - {lat:..., lng:...}\n * @param {Function} callback - callback\n *\n * @private\n */\n onRequestAltitude: function onRequestAltitude(coordinate, callback) {\n logger.log(\"onRequestAltitude\");\n\n // INFORMATION\n // on effectue la requête au service d'altitude...\n // on met en place des callbacks afin de recuperer les resultats ou\n // les messages d'erreurs du service.\n // le resultat est affiché dans une balise du dom.\n // les messages d'erreurs sont affichés sur la console (?)\n\n if (!coordinate || Object.keys(coordinate).length === 0) {\n return;\n }\n\n // si on ne veut pas de calcul d'altitude, on ne continue pas !\n if (!this.options.displayAltitude) {\n return;\n }\n logger.log(coordinate);\n var options = {};\n // on recupere les options du service\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.altitude.serviceOptions);\n\n // ainsi que les coordonnées\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n zonly: true,\n positions: [{\n lon: coordinate.lon || coordinate.lng,\n lat: coordinate.lat\n }]\n });\n\n // et les callbacks\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n scope: this,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results && Object.keys(results).length) {\n // var context = this.options.scope;\n // context._setAltidude(results.elevations[0].z);\n callback.call(this, results.elevations[0].z);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n logger.error(error.message);\n }\n });\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle ou la clé \"calcul\" par défaut\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n apiKey: options.apiKey || this.options.apiKey\n });\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n ssl: this.options.ssl\n });\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Services.getAltitude(options);\n },\n /**\n * this method is called by event 'click' on 'GPshowMousePositionPicto' tag label\n * (cf. this._createShowMousePositionPictoElement),\n * and toggles event 'mousemove' on map.\n * FIXME\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onShowMousePositionClick: function onShowMousePositionClick(e) {\n logger.log(e);\n\n // checked : true - panel close\n // checked : false - panel open\n var map = this._map;\n\n // evenement declenché à l'ouverture/fermeture du panneau,\n // et en fonction du mode : desktop ou tactile !\n if (this._showContainer.checked) {\n this._isDesktop ? map.off(\"mousemove\", this.onMouseMove, this) : map.off(\"move\", this.onMapMove, this);\n } else {\n this._isDesktop ? map.on(\"mousemove\", this.onMouseMove, this) : map.on(\"move\", this.onMapMove, this);\n }\n\n // on gère l'affichage des panneaux ici...,\n // même si ce n'est pas l'endroit adequate...\n this._setElevationPanel(this.options.displayAltitude);\n this._setCoordinatePanel(this.options.displayCoordinates);\n if (!this.options.displayCoordinates) {\n this._setSettingsPanel(false);\n }\n },\n /**\n * this method is called by event 'click' on input coordinate\n *\n * @param {Boolean} editing - editing mode\n * @private\n */\n onMousePositionEditModeClick: function onMousePositionEditModeClick(editing) {\n if (!this.options.editCoordinates) {\n return;\n }\n if (this._isEditing === editing) {\n return;\n }\n this._isEditing = editing;\n\n // Affichage des outils, input en ecriture\n this._setEditMode(this._isEditing);\n var map = this._map;\n if (this._isDesktop) {\n this._isEditing ? map.off(\"mousemove\", this.onMouseMove, this) : map.on(\"mousemove\", this.onMouseMove, this);\n } else {\n this._isEditing ? map.off(\"move\", this.onMapMove, this) : map.on(\"move\", this.onMapMove, this);\n }\n },\n /**\n * Convert Coordinate value : km to meters, radians, grades to decimal degrees\n * @param {Number} value - value to convert\n * @param {String} unit - unit\n *\n * @returns {Number} converted value\n * @private\n */\n _convertCoordinate: function _convertCoordinate(value, unit) {\n var result;\n if (unit === \"DEC\" || unit === \"DMS\") {\n // DMS est converti en DEC !\n result = value;\n } else if (unit === \"M\") {\n result = value;\n } else if (unit === \"KM\") {\n result = value * 1000;\n } else if (unit === \"RAD\") {\n var rd = (180 / Math.PI).toFixed(20);\n result = (value * rd).toFixed(20);\n } else if (unit === \"GON\") {\n var d = (9 / 10).toFixed(20);\n result = (value * d).toFixed(20);\n }\n return result;\n },\n /**\n * Validate Extend coordinate\n *\n * @param {String} coordType - Lat or Lon\n * @param {String} value - coordinate\n * @param {Event} e - event\n * @returns {Boolean} value is within extent\n */\n validateExtentCoordinate: function validateExtentCoordinate(coordType, value, e) {\n // FIXME pas de validation...\n if (e !== undefined) {\n return true;\n }\n if ([\"Lon\", \"Lat\"].indexOf(coordType) === -1) {\n return false;\n }\n var geoBBox = this._currentProjectionSystems.geoBBox;\n if (geoBBox === undefined) {\n return true;\n }\n if (geoBBox) {\n // check if coordinates are in the extent\n\n var extent = [geoBBox.left, geoBBox.bottom, geoBBox.right, geoBBox.top];\n var unit = this._currentProjectionUnits;\n\n // on convertit un point..., mais on n'a pas de fonction\n // de conversion comme pour openlayers...\n var oLatLon = this._unproject({\n x: coordType === \"Lon\" ? this._convertCoordinate(value, unit) : 0,\n y: coordType === \"Lat\" ? this._convertCoordinate(value, unit) : 0\n });\n if (coordType === \"Lon\" && (oLatLon.lng < extent[0] || oLatLon.lng > extent[2])) {\n logger.warn(\"coordinates (lon) out of extent !?\");\n return false;\n }\n if (coordType === \"Lat\" && (oLatLon.lat < extent[1] || oLatLon.lat > extent[3])) {\n logger.warn(\"coordinates (lat) out of extent !?\");\n return false;\n }\n }\n return true;\n },\n /**\n * Get coordinate from inputs and select in decimal degrees\n *\n * @param {String} coordType - \"Lon\" or \"Lat\"\n * @returns {String} coordinate\n * @private\n */\n _getCoordinate: function _getCoordinate(coordType) {\n var inputDegrees = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePosition\" + coordType + \"Degrees\"));\n var degrees = inputDegrees.value;\n if (!degrees) {\n return null;\n }\n degrees = degrees.replace(\",\", \".\");\n if (!_Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].isInteger(degrees)) {\n return null;\n }\n var result = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].toInteger(degrees);\n if (result < Number(inputDegrees.dataset.min) || result > Number(inputDegrees.dataset.max)) {\n return null;\n }\n var direction = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePosition\" + coordType + \"Direction\")).value;\n var inputMinutes = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePosition\" + coordType + \"Minutes\"));\n var minutes = inputMinutes.value;\n if (minutes) {\n minutes = minutes.replace(\",\", \".\");\n if (_Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].isInteger(minutes)) {\n var mins = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].toInteger(minutes);\n if (mins >= Number(inputMinutes.dataset.min) && mins <= Number(inputMinutes.dataset.max)) {\n result += mins / 60;\n }\n }\n }\n var inputSeconds = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePosition\" + coordType + \"Seconds\"));\n var seconds = inputSeconds.value;\n if (seconds) {\n seconds = seconds.replace(\",\", \".\");\n var secs = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].toFloat(seconds);\n if (secs && secs >= Number(inputSeconds.dataset.min) && secs <= Number(inputSeconds.dataset.max)) {\n result += secs / 3600;\n }\n }\n if (direction === \"O\" || direction === \"S\") {\n result = -result;\n }\n return result;\n },\n /**\n * locate DMS coordinates on map\n *\n * @private\n */\n _locateDMSCoordinates: function _locateDMSCoordinates() {\n // on est toujours en coordonnées geographiques...\n var oLatLon = {\n lat: this._getCoordinate(\"Lat\"),\n lng: this._getCoordinate(\"Lon\")\n };\n if (!this.validateExtentCoordinate(\"Lon\", oLatLon.lng)) {\n return;\n }\n if (!this.validateExtentCoordinate(\"Lat\", oLatLon.lat)) {\n return;\n }\n\n // FIXME https://github.com/Leaflet/Leaflet/issues/922\n var map = this._map;\n map.panTo(oLatLon);\n },\n /**\n * locate coordinates on map (not DMS)\n *\n * @private\n */\n _locateCoordinates: function _locateCoordinates() {\n // soit longitude ou soit y\n var lonYDom = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionLon\")).value;\n lonYDom = lonYDom.replace(\",\", \".\");\n lonYDom = parseFloat(lonYDom);\n if (isNaN(lonYDom)) {\n return;\n }\n\n // soit lattitude ou soit x\n var latXDom = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionLat\")).value;\n latXDom = latXDom.replace(\",\", \".\");\n latXDom = parseFloat(latXDom);\n if (isNaN(latXDom)) {\n return;\n }\n var lon = null;\n var lat = null;\n var x = null;\n var y = null;\n if (this._currentProjectionType === \"Geographical\") {\n lon = lonYDom;\n lat = latXDom;\n } else {\n x = latXDom;\n y = lonYDom;\n }\n if (!this.validateExtentCoordinate(\"Lon\", lon || x)) {\n return;\n }\n if (!this.validateExtentCoordinate(\"Lat\", lat || y)) {\n return;\n }\n var unit = this._currentProjectionUnits;\n var oLatLon = this._unproject({\n x: this._convertCoordinate(lon !== null ? lon : x, unit),\n y: this._convertCoordinate(lat !== null ? lat : y, unit)\n });\n\n // FIXME https://github.com/Leaflet/Leaflet/issues/922\n var map = this._map;\n map.panTo(oLatLon);\n },\n /**\n * locate coordinates on map\n *\n * @method locate\n * @private\n */\n onMousePositionEditModeLocateClick: function onMousePositionEditModeLocateClick() {\n if (!this.options.editCoordinates) {\n return;\n }\n if (!this._isEditing) {\n this.onMousePositionEditModeClick(true);\n return;\n }\n this._currentProjectionUnits === \"DMS\" ? this._locateDMSCoordinates() : this._locateCoordinates();\n },\n /**\n * this method is called by event 'change' on 'GPmousePositionProjectionSystem'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the system projection.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMousePositionProjectionSystemChange: function onMousePositionProjectionSystemChange(e) {\n logger.log(\"onMousePositionProjectionSystemChange\", e);\n var idx = e.target.selectedIndex; // index\n var value = e.target.options[idx].value; // crs, ex. MERCATOR (optionnel)\n var label = e.target.options[idx].label; // etiquette, ex Géographiques\n\n logger.log(idx, value, label);\n this._setCurrentSystem(value);\n },\n /**\n * this method selects the current system projection.\n *\n * @param {Object} systemCode - inner code (rank in array _projectionSystems)\n *\n * @private\n */\n _setCurrentSystem: function _setCurrentSystem(systemCode) {\n // si on change de type de systeme, on doit aussi changer le type d'unités !\n var type = null;\n for (var i = 0; i < this._projectionSystems.length; ++i) {\n if (this._projectionSystems[i].code === Number(systemCode)) {\n type = this._projectionSystems[i].type;\n break;\n }\n }\n if (!type) {\n logger.log(\"system not found in projection systems container\");\n return;\n }\n if (type !== this._currentProjectionType) {\n this._setTypeUnitsPanel(type);\n }\n\n // on enregistre le systeme courrant\n this._currentProjectionSystems = this._projectionSystems[Number(systemCode)];\n\n // on simule un deplacement en mode tactile pour mettre à jour les\n // resultats\n if (!this._isDesktop) {\n this.onMapMove();\n }\n },\n /**\n * this method is called by event 'mouseover' on 'GPmousePositionProjectionSystem'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the system projection.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMousePositionProjectionSystemMouseOver: function onMousePositionProjectionSystemMouseOver(e) {\n logger.log(\"onMousePositionProjectionSystemMouseOver\", e);\n var map = this._map;\n if (!map) {\n return;\n }\n\n // clear select\n var systemList = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionProjectionSystem\"));\n systemList.innerHTML = \"\";\n\n // add systems whose extent intersects the map extent\n for (var j = 0; j < this._projectionSystems.length; j++) {\n var proj = this._projectionSystems[j];\n var option = null;\n if (proj.geoBBox) {\n // bboxes intersection test\n if (map.getBounds()._southWest.lng > proj.geoBBox.right || map.getBounds()._southWest.lat > proj.geoBBox.top || map.getBounds()._northEast.lng < proj.geoBBox.left || map.getBounds()._northEast.lat < proj.geoBBox.bottom) {\n if (proj === this._currentProjectionSystems) {\n option = document.createElement(\"option\");\n option.value = proj.code;\n option.text = proj.label || j;\n option.setAttribute(\"selected\", \"selected\");\n option.setAttribute(\"disabled\", \"disabled\");\n systemList.appendChild(option);\n }\n continue; // do not intersect\n }\n }\n\n option = document.createElement(\"option\");\n option.value = proj.code;\n option.text = proj.label || j;\n if (proj === this._currentProjectionSystems) {\n option.setAttribute(\"selected\", \"selected\");\n }\n systemList.appendChild(option);\n }\n },\n /**\n * this method is called by event 'change' on 'GPmousePositionProjectionUnits'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the units projection.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMousePositionProjectionUnitsChange: function onMousePositionProjectionUnitsChange(e) {\n logger.log(\"onMousePositionProjectionUnitsChange\", e);\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n var label = e.target.options[idx].label;\n logger.log(idx, value, label);\n var oldProjectionUnits = this._currentProjectionUnits;\n var newProjectionUnits = this._currentProjectionUnits = value;\n var newProjectionType = this._currentProjectionType;\n\n // Mise a jour des elements lebels et unites\n this._resetLabelElements(newProjectionType);\n this._resetUnitElements(newProjectionUnits);\n\n // mise a jour des inputs pour les coordonnees\n if (oldProjectionUnits === \"DMS\" || newProjectionUnits === \"DMS\") {\n this._resetCoordinateElements(this.options.editCoordinates, newProjectionType, newProjectionUnits);\n this._setEditMode(this._isEditing);\n }\n\n // on simule un deplacement en mode tactile pour mettre à jour les\n // resultats\n if (!this._isDesktop) {\n this.onMapMove();\n }\n },\n // ################################################################### //\n // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ //\n // ################################################################### //\n\n /**\n * This method is public.\n * It allows to control the execution of a movement.\n *\n * @param {Object} position - position = {lon: , lat: }\n * @param {Number} zoom - zoom\n * @param {Object} options - Zoom/pan options\n */\n moveTo: function moveTo(position, zoom, options) {\n if (!this._showContainer.checked) {\n this._pictoContainer.click();\n }\n var map = this._map;\n if (!map) {\n return;\n }\n this.onMouseMove({\n latlng: position\n });\n map.flyTo(position, zoom || 10, options || {});\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (MousePosition);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL01vdXNlUG9zaXRpb24uanM/NDJiMSJdLCJuYW1lcyI6WyJsb2dnZXIiLCJMb2dnZXIiLCJnZXRMb2dnZXIiLCJNb3VzZVBvc2l0aW9uIiwiTCIsIkNvbnRyb2wiLCJleHRlbmQiLCJpbmNsdWRlcyIsIk1vdXNlUG9zaXRpb25ET00iLCJvcHRpb25zIiwicG9zaXRpb24iLCJjb2xsYXBzZWQiLCJ1bml0cyIsInN5c3RlbXMiLCJkaXNwbGF5QWx0aXR1ZGUiLCJkaXNwbGF5Q29vcmRpbmF0ZXMiLCJlZGl0Q29vcmRpbmF0ZXMiLCJhbHRpdHVkZSIsInRyaWdnZXJEZWxheSIsInJlc3BvbnNlRGVsYXkiLCJub0RhdGFWYWx1ZSIsIm5vRGF0YVZhbHVlVG9sZXJhbmNlIiwic2VydmljZU9wdGlvbnMiLCJpbml0aWFsaXplIiwiVXRp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AgICAgICAgICAgIHZhbHVlcyBpbiBbbm9EYXRhVmFsdWUgLSBub0RhdGFWYWx1ZVRvbGVyYW5jZSA7IG5vRGF0YVZhbHVlICsgbm9EYXRhVmFsdWVUb2xlcmFuY2VdIGludGVydmFsIHdpbGwgbm90IGJlIGRpc3BsYXllZCwgYnV0IFwiLS0tbVwiIHdpbGwgYmUgZGlzcGxheWVkIGluc3RlYWQuXG4gICAgICogICAgICAgICAgICAgICAgICBEZWZhdWx0IGlzIDkwMDAwXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiAgdmFyIE1vdXNlUG9zaXRpb24gPSBMLmdlb3BvcnRhbENvbnRyb2wuTW91c2VQb3NpdGlvbih7XG4gICAgICogICAgICBwb3NpdGlvbiA6ICdib3R0b21sZWZ0JyxcbiAgICAgKiAgICAgIGNvbGxhcHNlZCA6IGZhbHNlLFxuICAgICAqICAgICAgZGlzcGxheUFsdGl0dWRlIDogdHJ1ZSxcbiAgICAgKiAgICAgIGRpc3BsYXlDb29yZGluYXRlcyA6IHRydWUsXG4gICAgICogICAgICBlZGl0Q29vcmRpbmF0ZXMgOiBmYWxzZSxcbiAgICAgKiAgICAgIGFsdGl0dWRlIDoge1xuICAgICAqICAgICAgICAgICB0cmlnZ2VyRGVsYXkgOiAxMDAsXG4gICAgICogICAgICAgICAgIHJlc3BvbnNlRGVsYXkgOiA1MDAsXG4gICAgICogICAgICAgICAgIG5vRGF0YVZhbHVlIDogLTk5OTk5LFxuICAgICAqICAgICAgICAgICBub0RhdGFWYWx1ZVRvbGVyYW5jZSA6IDkwMDAwLFxuICAgICAqICAgICAgICAgICBzZXJ2aWNlT3B0aW9ucyA6IHt9XG4gICAgICogICAgICB9LFxuICAgICAqICAgICAgc3lzdGVtcyA6IFtcbiAgICAgKiAgICAgICB7XG4gICAgICogICAgICAgICAgY3JzIDogTC5DUlMuRVBTRzQzMjYsXG4gICAgICogICAgICAgICAgbGFiZWwgOiBcIkxvbixMYXRcIixcbiAgICAgKiAgICAg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FyIHByb2plY3Rpb25TeXN0ZW1zQnlEZWZhdWx0ID0gW3tcbiAgICAgICAgICAgIGxhYmVsIDogXCJHXFx1MDBlOW9ncmFwaGlxdWVcIixcbiAgICAgICAgICAgIGNycyA6IEwuQ1JTLlNpbXBsZSwgLy8gTC5Qcm9qZWN0aW9uLkxvbkxhdCAhXG4gICAgICAgICAgICB0eXBlIDogXCJHZW9ncmFwaGljYWxcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICBsYWJlbCA6IFwiV2ViIE1lcmNhdG9yXCIsXG4gICAgICAgICAgICBjcnMgOiBMLkNSUy5FUFNHMzM5NSwgLy8gTC5Qcm9qZWN0aW9uLlNwaGVyaWNhbE1lcmNhdG9yICFcbiAgICAgICAgICAgIHR5cGUgOiBcIk1ldHJpY1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGxhYmVsIDogXCJMYW1iZXJ0IDkzXCIsXG4gICAgICAgICAgICBjcnMgOiBDUlMuRVBTRzIxNTQsXG4gICAgICAgICAgICB0eXBlIDogXCJNZXRyaWNcIixcbiAgICAgICAgICAgIGdlb0JCb3ggOiB7XG4gICAgICAgICAgICAgICAgbGVmdCA6IC05Ljg2LFxuICAgICAgICAgICAgICAgIGJvdHRvbSA6IDQxLjE1LFxuICAgICAgICAgICAgICAgIHJpZ2h0IDogMTAuMzgsXG4gICAgICAgICAgICAgICAgdG9wIDogNTEuNTZcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwge1xuICAgICAgICAgICAgbGFiZWwgOiBcIkxhbWJlcnQgSUkgXFx1MDBlOXRlbmR1XCIsXG4gICAgICAgICAgICBjcnMgOiBDUlMuRVBTRzI3NTcyLFxuICAgICAgICAgICAgdHlwZSA6IFwiTWV0cmljXCIsXG4gICAgICAgICAgICBnZW9CQm94IDoge1xuICAgICAgICAgICAgICAgIGxlZnQgOiAtNC44NyxcbiAgICAgICAgICAgICAgICBib3R0b20gOiA0Mi4zMyxcbiAgICAgICAgICAgICAgICByaWdodCA6IDguMjMsXG4gICAgICAgICAgICAgICAgdG9wIDogNTEuMTRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfV07XG5cbiAgICAgICAgdmFyIHN5c3RlbXMgPSB0aGlzLm9wdGlvbnMuc3lzdGVtcztcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBzeXN0ZW1zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAvLyBkZWZpbml0aW9uIGQndW4gc3lzdGVtZSBkZSByZWZlcmVuY2VcbiAgICAgICAgICAgIHZhciBzeXMgPSBzeXN0ZW1zW2ldO1xuXG4gICAgICAgICAgICBpZiAoIXN5cy5sYWJlbCkge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5lcnJvcihcIm5vdCBkZWZpbmVkICFcIik7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghc3lzLmNycykge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5lcnJvcihcImNycyBub3QgZGVmaW5lZCAhXCIpO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIXN5cy50eXBlKSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLndhcm4oXCJ0eXBlIHNycyBub3QgZGVmaW5lZCwgdXNlICdNZXRyaWMnIGJ5IGRlZmF1bHQgIVwiKTtcbiAgICAgICAgICAgICAgICBzeXMudHlwZSA9IFwiTWV0cmljXCI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuX3Byb2plY3Rpb25TeXN0ZW1zLnB1c2goc3lzdGVtc1tpXSk7XG5cbiAgICAgICAgICAgIC8vIGl0J3MgYSBqdXN0IGEgdGVzdCAuLi5cbiAgICAgICAgICAgIHZhciBmb3VuZCA9IGZhbHNlO1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBwcm9qZWN0aW9uU3lzdGVtc0J5RGVmYXVsdC5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIHZhciBvYmogPSBwcm9qZWN0aW9uU3lzdGVtc0J5RGVmYXVsdFtqXTtcbiAgICAgICAgICAgICAgICBpZiAoc3lzLmNycyA9PT0gb2JqLmNycykge1xuICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGxvZ2dlci5pbmZvKFwiY3JzICd7fScgYWxyZWFkeSBjb25maWd1cmVkIGJ5IGRlZmF1bHRcIiwgb2JqLmNvZGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghZm91bmQpIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIuaW5mbyhcImNycyAne30nIG5vdCBmb3VuZCwgaXQncyBhIG5ldyBwcm9qZWN0aW9uXCIsIHN5cy5jb2RlIHx8IHN5cy5sYWJlbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBhdSBjYXMgb8O5Li4uXG4gICAgICAgIGlmICh0aGlzLl9wcm9qZWN0aW9uU3lzdGVtcy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIHRoaXMuX3Byb2plY3Rpb25TeXN0ZW1zID0gcHJvamVjdGlvblN5c3RlbXNCeURlZmF1bHQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyByZS1pbml0aWxpc2F0aW9uIGRlcyBjb2RlcyBwb3VyIGdlcmVyIGxlIGxpZW4gZW50cmUgX3Byb2plY3Rpb25TeXN0ZW1zIGV0IHNlbGVjdCBkdSBtb3VzZSBwb3NpdGlvbiAobGllbiBjb2RlL3ZhbHVlKVxuICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IHRoaXMuX3Byb2plY3Rpb25TeXN0ZW1zLmxlbmd0aDsgKytrKSB7XG4gICAgICAgICAgICB0aGlzLl9wcm9qZWN0aW9uU3lzdGVtc1trXS5jb2RlID0gaztcbiAgICA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9kaXNwbGF5RE1TXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgY29kZSA6IFwiUkFEXCIsXG4gICAgICAgICAgICAgICAgbGFiZWwgOiBcInJhZGlhbnNcIixcbiAgICAgICAgICAgICAgICBmb3JtYXQgOiB0aGlzLl9kaXNwbGF5UkFEXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgY29kZSA6IFwiR09OXCIsXG4gICAgICAgICAgICAgICAgbGFiZWwgOiBcImdyYWRlc1wiLFxuICAgICAgICAgICAgICAgIGZvcm1hdCA6IHRoaXMuX2Rpc3BsYXlHT05cbiAgICAgICAgICAgIH1dLFxuICAgICAgICAgICAgTWV0cmljIDogW3tcbiAgICAgICAgICAgICAgICBjb2RlIDogXCJNXCIsXG4gICAgICAgICAgICAgICAgbGFiZWwgOiBcIm3DqHRyZXNcIixcbiAgICAgICAgICAgICAgICBmb3JtYXQgOiB0aGlzLl9kaXNwbGF5TWV0ZXJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBjb2RlIDogXCJLTVwiLFxuICAgICAgICAgICAgICAgIGxhYmVsIDogXCJraWxvbcOodHJlc1wiLFxuICAgICAgICAgICAgICAgIGZvcm1hdCA6IHRoaXMuX2Rpc3BsYXlLTWV0ZXJcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH07XG5cbiAgICAgICAgdmFyIHVuaXRzID0gdGhpcy5vcHRpb25zLnVuaXRzO1xuXG4gICAgICAgIGZvciAodmFyIHR5cGUgaW4gcHJvamVjdGlvblVuaXRzQnlEZWZhdWx0KSB7XG4gICAgICAgICAgICBpZiAocHJvamVjdGlvblVuaXRzQnlEZWZhdWx0Lmhhc093blByb3BlcnR5KHR5cGUpKSB7XG4gICAgICAgICAgICAgICAgdmFyIGZvdW5kID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBwcm9qZWN0aW9uVW5pdHNCeURlZmF1bHRbdHlwZV0ubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG9iaiA9IHByb2plY3Rpb25Vbml0c0J5RGVmYXVsdFt0eXBlXVtqXTtcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB1bml0cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVuaXQgPSB1bml0c1tpXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvYmouY29kZSA9PT0gdW5pdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX3Byb2plY3Rpb25Vbml0c1t0eXBlXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9wcm9qZWN0aW9uVW5pdHNbdHlwZV0gPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcHJvamVjdGlvblVuaXRzW3R5cGVdLnB1c2gob2JqKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWZvdW5kKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3Byb2plY3Rpb25Vbml0c1t0eXBlXSA9IHByb2plY3Rpb25Vbml0c0J5RGVmYXVsdFt0eXBlXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBhdSBjYXMgb8O5Li4uXG4gICAgICAgIGlmIChPYmplY3Qua2V5cyh0aGlzLl9wcm9qZWN0aW9uVW5pdHMpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgdGhpcy5fcHJvamVjdGlvblVuaXRzID0gcHJvamVjdGlv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y5sYXQsIDYpO1xuICAgICAgICBjb29yZGluYXRlLmxuZyA9IFBvc2l0aW9uRm9ybWF0ZXIucm91bmRUb0RlY2ltYWwob0xhdExuZy5sbmcsIDYpO1xuICAgICAgICBjb29yZGluYXRlLnVuaXQgPSBcIsKwXCI7XG4gICAgICAgIHJldHVybiBjb29yZGluYXRlO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBkZWdyZWVkZWNpbWFsMnNleGFnZWNpbWFsXG4gICAgICogQHBhcmFtIHtPYmplY3R9IG9MYXRMbmcgLSBjb29yZGluYXRlc1xuICAgICAqXG4gICAgICogQHJldHVybnMge09iamVjdH0gY29vcmRpbmF0ZXMgaW4gRE1TXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBfZGlzcGxheURNUyA6IGZ1bmN0aW9uIChvTGF0TG5nKSB7XG4gICAgICAgIHZhciBjb29yZGluYXRlID0ge307XG4gICAgICAgIGNvb3JkaW5hdGUubGF0ID0gUG9zaXRpb25Gb3JtYXRlci5kZWNpbWFsTGF0VG9ETVMob0xhdExuZy5sYXQsIHRydWUpO1xuICAgICAgICBjb29yZGluYXRlLmxuZyA9IFBvc2l0aW9uRm9ybWF0ZXIuZGVjaW1hbExvblRvRE1TKG9MYXRMbmcubG5nLCB0cnVlKTtcbiAgICAgICAgcmV0dXJuIGNvb3JkaW5hdGU7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIGRlZ3JlZWRlY2ltYWwycmFkaWFuXG4gICAgICogQHBhcmFtIHtPYmplY3R9IG9MYXRMbmcgLSBjb29yZGluYXRlc1xuICAgICAqXG4gICAgICogQHJldHVybnMge09iamVjdH0gY29vcmRpbmF0ZXMgaW4gcmFkaWFuXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBfZGlzcGxheVJBRCA6IGZ1bmN0aW9uIChvTGF0TG5nKSB7XG4gICAgICAgIHZhciBjb29yZGluYXRlID0ge307XG4gICAgICAgIGNvb3JkaW5hdGUubGF0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0bG5nKVxuICAgICAgICAvLyAtIExBTUIyRSA6IEwuR2VvcG9ydGFsQ1JTLkVQU0cyNzU3MiBvdSBwcm9qZWN0aW9uLnByb2plY3QobGF0bG5nKVxuICAgICAgICAvLyAtIE1FUkNBVE9SIG91IEVQU0c6MzM5NSA6IEwuQ1JTLkVQU0czMzk1IG91IEwuUHJvamVjdGlvbi5NZXJjYXRvci5wcm9qZWN0KGxhdGxuZylcblxuICAgICAgICBpZiAodHlwZW9mIGNycyA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAvLyBcImNycyBpcyBhbiBmdW5jdGlvbiAhXCIuLi4gZW4gbW9kZSBBTUQgIVxuICAgICAgICAgICAgY3JzID0gY3JzKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZW9mIGNycyAhPT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgbG9nZ2VyLmxvZyhcImNycyBpcyBub3QgYW4gb2JqZWN0ICFcIik7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBwYXMgZGUgcmVwcm9qZWN0aW9uIHBvdXIgbGUgc3lzdGVtZSBkZSBwcm9qZWN0aW9uIG5hdGlmICFcbiAgICAgICAgaWYgKGNycyA9PT0gTC5DUlMuU2ltcGxlKSB7XG4gICAgICAgICAgICByZXR1cm4gb0xhdExuZztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghY3JzLnByb2plY3Rpb24gfHwgdHlwZW9mIGNycy5wcm9qZWN0aW9uICE9PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICBsb2dnZXIuZXJyb3IoXCJwcm9qZWN0aW9uIGlzIG5vdCBhbiBvYmplY3QgIVwiKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBvUG9pbnQgPSBjcnMucHJvamVjdGlvbi5wcm9qZWN0KG9MYXRMbmcpO1xuXG4gICAgICAgIC8vIEZJWE1FIHJlcH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gb1NycyA9IG9TcnMoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0eXBlb2Ygb1NycyAhPT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgbG9nZ2VyLmxvZyhcImNycyBpcyBub3QgYW4gb2JqZWN0ICFcIik7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBwYXMgZGUgcmVwcm9qZWN0aW9uIHBvdXIgbGUgc3lzdGVtZSBkZSBwcm9qZWN0aW9uIG5hdGlmICFcbiAgICAgICAgaWYgKG9TcnMgPT09IEwuQ1JTLlNpbXBsZSkge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBsYXQgOiBvWFkueSxcbiAgICAgICAgICAgICAgICBsbmcgOiBvWFkueFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLl9jdXJyZW50UHJvamVjdGlvblR5cGUgPT09IFwiR2VvZ3JhcGhpY2FsXCIpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgbGF0IDogb1hZLnksXG4gICAgICAgICAgICAgICAgbG5nIDogb1hZLnhcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIW9TcnMucHJvamVjdGlvbiB8fCB0eXBlb2Ygb1Nycy5wcm9qZWN0aW9uICE9PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICBsb2dnZXIuZXJyb3IoXCJwcm9qZWN0aW9uIGlzIG5vdCBhbiBvYmplY3QgIVwiKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBvTGF0TG5nID0gb1Nycy5wcm9qZWN0aW9uLnVucHJvamVjdChvWFkpO1xuXG4gICAgICAgIGlmICghb0xhdExuZyB8fCBPYmplY3Qua2V5cyhvTGF0TG5nKS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIGxvZ2dl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xcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSBldmVudCAnY2xpY2snIG9uIGlucHV0IGNvb3JkaW5hdGVcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7Qm9vbGVhbn0gZWRpdGluZyAtIGVkaXRpbmcgbW9kZVxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgb25Nb3VzZVBvc2l0aW9uRWRpdE1vZGVDbGljayA6IGZ1bmN0aW9uIChlZGl0aW5nKSB7XG4gICAgICAgIGlmICghdGhpcy5vcHRpb25zLmVkaXRDb29yZGluYXRlcykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuX2lzRWRpdGluZyA9PT0gZWRpdGluZykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5faXNFZGl0aW5nID0gZWRpdGluZztcblxuICAgICAgICAvLyBBZmZpY2hhZ2UgZGVzIG91dGlscywgaW5wdXQgZW4gZWNyaXR1cmVcbiAgICAgICAgdGhpcy5fc2V0RWRpdE1vZGUodGhpcy5faXNFZGl0aW5nKTtcblxuICAgICAgICB2YXIgbWFwID0gdGhpcy5fbWFwO1xuXG4gICAgICAgIGlmICh0aGlzLl9pc0Rlc2t0b3ApIHtcbiAgICAgICAgICAgICh0aGlzLl9pc0VkaXRpbmcpXG4gICAgICAgICAgICAgICAgPyBtYXAub2ZmKFwibW91c2Vtb3ZlXCIsIHRoaXMub25Nb3VzZU1vdmUsIHRoaXMpXG4gICAgICAgICAgICAgICAgOiBtYXAub24oXCJtb3VzZW1vdmVcIiwgdGhpcy5vbk1vdXNlTW92ZSwgdGhpcyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAodGhpcy5faXNFZGl0aW5nKVxuICAgICAgICAgICAgICAgID8gbWFwLm9mZihcIm1vdmVcIiwgdGhpcy5vbk1hcE1vdmUsIHRoaXM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2sgaWYgY29vcmRpbmF0ZXMgYXJlIGluIHRoZSBleHRlbnRcblxuICAgICAgICAgICAgdmFyIGV4dGVudCA9IFtnZW9CQm94LmxlZnQsIGdlb0JCb3guYm90dG9tLCBnZW9CQm94LnJpZ2h0LCBnZW9CQm94LnRvcF07XG4gICAgICAgICAgICB2YXIgdW5pdCA9IHRoaXMuX2N1cnJlbnRQcm9qZWN0aW9uVW5pdHM7XG5cbiAgICAgICAgICAgIC8vIG9uIGNvbnZlcnRpdCB1biBwb2ludC4uLiwgbWFpcyBvbiBuJ2EgcGFzIGRlIGZvbmN0aW9uXG4gICAgICAgICAgICAvLyBkZSBjb252ZXJzaW9uIGNvbW1lIHBvdXIgb3BlbmxheWVycy4uLlxuICAgICAgICAgICAgdmFyIG9MYXRMb24gPSB0aGlzLl91bnByb2plY3Qoe1xuICAgICAgICAgICAgICAgIHggOiAoY29vcmRUeXBlID09PSBcIkxvblwiKSA/IHRoaXMuX2NvbnZlcnRDb29yZGluYXRlKHZhbHVlLCB1bml0KSA6IDAsXG4gICAgICAgICAgICAgICAgeSA6IChjb29yZFR5cGUgPT09IFwiTGF0XCIpID8gdGhpcy5fY29udmVydENvb3JkaW5hdGUodmFsdWUsIHVuaXQpIDogMFxuXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgaWYgKGNvb3JkVHlwZSA9PT0gXCJMb25cIiAmJiAob0xhdExvbi5sbmcgPCBleHRlbnRbMF0gfHwgb0xhdExvbi5sbmcgPiBleHRlbnRbMl0pKSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLndhcm4oXCJjb29yZGluYXRlcyAobG9uKSBvdXQgb2YgZXh0ZW50ICE/XCIpO1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChjb29yZFR5cGUgPT09IFwiTGF0XCIgJiYgKG9MYXRMb24ubGF0IDwgZXh0ZW50WzFdIHx8IG9MYXRMb24ubGF0ID4gZ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cIkxvblwiKVxuICAgICAgICB9O1xuXG4gICAgICAgIGlmICghdGhpcy52YWxpZGF0ZUV4dGVudENvb3JkaW5hdGUoXCJMb25cIiwgb0xhdExvbi5sbmcpKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIXRoaXMudmFsaWRhdGVFeHRlbnRDb29yZGluYXRlKFwiTGF0XCIsIG9MYXRMb24ubGF0KSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gRklYTUUgaHR0cHM6Ly9naXRodWIuY29tL0xlYWZsZXQvTGVhZmxldC9pc3N1ZXMvOTIyXG4gICAgICAgIHZhciBtYXAgPSB0aGlzLl9tYXA7XG4gICAgICAgIG1hcC5wYW5UbyhvTGF0TG9uKTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogbG9jYXRlIGNvb3JkaW5hdGVzIG9uIG1hcCAobm90IERNUylcbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgX2xvY2F0ZUNvb3JkaW5hdGVzIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAvLyBzb2l0IGxvbmdpdHVkZSBvdSBzb2l0IHlcbiAgICAgICAgdmFyIGxvbllEb20gPSBMLkRvbVV0aWwuZ2V0KHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkxvblwiKSkudmFsdWU7XG4gICAgICAgIGxvbllEb20gPSBsb25ZRG9tLnJlcGxhY2UoXCIsXCIsIFwiLlwiKTtcbiAgICAgICAgbG9uWURvbSA9IHBhcnNlRmxvYXQobG9uWURvbSk7XG4gICAgICAgIGlmIChpc05hTihsb25ZRG9tKSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gc29pdCBsYXR0aXR1ZGUgb3Ugc29pdCB4XG4gICAgICAgIHZhciBsYXRYRG9tID0gTC5Eb21VdGlsLmdldCh0aGlzLl9hZGRVSUQoXCJHUG1vdXNlUG9zaXRpb25MYXRcIikpLnZhbHVlO1xuICAgICAgICBsYXRYRG9tID0gbGF0WERvbS5yZXBsYWNlKFwiLFwiLCBcIi5cIik7XG4gICAgICAgIGxhdFhEb20gPSBwYXJzZUZsb2F0KGxhdFhEb20pO1xuICAgICAgICBpZiAoaXNOYU4obGF0WERvbSkpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBsb24gPSBudWxsO1xuICAgICAgICB2YXIgbGF0ID0gbnVsbDtcbiAgICAgICAgdmFyIHggPSBudWxsO1xuICAgICAgICB2YXIgeSA9IG51bGw7XG5cbiAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRQcm9qZWN0aW9uVHlwZSA9PT0gXCJHZW9ncmFwaGljYWxcIikge1xuICAgICAgICAgICAgbG9uID0gbG9uWURvbTtcbiAgICAgICAgICAgIGxhdCA9IGxhdFhEb207XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB4ID0gbGF0WERvbTtcbiAgICAgICAgICAgIHkgPSBsb25ZRG9tO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCF0aGlzLnZhbGlkYXRlRXh0ZW50Q29vcmRpbmF0ZShcIkxvblwiLCBsb24gfHwgeCkpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdGhpcy52YWxpZGF0ZUV4dGVudENvb3JkaW5hdGUoXCJMYXRcIiwgbGF0IHx8IHkpKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdW5pdCA9IHRoaXMuX2N1cnJlbnRQcm9qZWN0aW9uVW5pdHM7XG4gICAgICAgIHZhciBvTGF0TG9uID0gdGhpcy5fdW5wcm9qZWN0KHtcbiAgICAgICAgICAgIHggOiB0aGlzLl9jb252ZXJ0Q29vcmRpbmF0ZShsb24gIT09IG51bGwgPyBsb24gOiB4LCB1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lIGV4dGVudCBpbnRlcnNlY3RzIHRoZSBtYXAgZXh0ZW50XG4gICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGhpcy5fcHJvamVjdGlvblN5c3RlbXMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIHZhciBwcm9qID0gdGhpcy5fcHJvamVjdGlvblN5c3RlbXNbal07XG4gICAgICAgICAgICB2YXIgb3B0aW9uID0gbnVsbDtcblxuICAgICAgICAgICAgaWYgKHByb2ouZ2VvQkJveCkge1xuICAgICAgICAgICAgICAgIC8vIGJib3hlcyBpbnRlcnNlY3Rpb24gdGVzdFxuICAgICAgICAgICAgICAgIGlmIChtYXAuZ2V0Qm91bmRzKCkuX3NvdXRoV2VzdC5sbmcgPiBwcm9qLmdlb0JCb3gucmlnaHQgfHxcbiAgICAgICAgICAgICAgICAgICAgbWFwLmdldEJvdW5kcygpLl9zb3V0aFdlc3QubGF0ID4gcHJvai5nZW9CQm94LnRvcCB8fFxuICAgICAgICAgICAgICAgICAgICBtYXAuZ2V0Qm91bmRzKCkuX25vcnRoRWFzdC5sbmcgPCBwcm9qLmdlb0JCb3gubGVmdCB8fFxuICAgICAgICAgICAgICAgICAgICBtYXAuZ2V0Qm91bmRzKCkuX25vcnRoRWFzdC5sYXQgPCBwcm9qLmdlb0JCb3guYm90dG9tXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwcm9qID09PSB0aGlzLl9jdXJyZW50UHJvamVjdGlvblN5c3RlbXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJvcHRpb25cIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb24udmFsdWUgPSBwcm9qLmNvZGU7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb24udGV4dCA9IHByb2oubGFiZWwgfHwgajtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbi5zZXRBdHRyaWJ1dGUoXCJzZWxlY3RlZFwiLCBcInNlbGVjdGVkXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uLnNldEF0dHJpYnV0ZShcImRpc2FibGVkXCIsIFwiZGlzYWJsZWRcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHN5c3RlbUxpc3QuYXBwZW5kQ2hpbGQob3B0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsgLy8gZG8gbm90IGludGVyc2VjdFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG9wdGlvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJvcHRpb25cIik7XG4gICAgICAgICAgICBvcHRpb24udmFsdWUgPSBwcm9qLmNvZGU7XG4gICAgICAgICAgICBvcHRpb24udGV4dCA9IHByb2oubGFiZWwgfHwgajtcbiAgICAgICAgICAgIGlmIChwcm9qID09PSB0aGlzLl9jdXJyZW50UHJvamVjdGlvblN5c3RlbXMpIHtcbiAgICAgICAgICAgICAgICBvcHRpb24uc2V0QXR0cmlidXRlKFwic2VsZWN0ZWRcIiwgXCJzZWxlY3RlZFwiKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc3lzdGVtTGlzdC5hcHBlbmRDaGlsZChvcHRpb24pO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSBldmVudCAnY2hhbmdlJyBvbiAnR1Btb3VzZVBvc2l0aW9uUHJvamVjdGlvblVuaXRzJ1xuICAgICAqIHRhZyBzZWxlY3QgKGNmLiB0aGlzLl9jcmVhdGVNb3VzZVBvc2l0aW9uU2V0dGluZ3NFbGVtZW50KSxcbiAgICAgKiBhbmQgc2VsZWN0cyB0aGUgdW5pdHMgcHJvamVjdGlvbi5cbiAgICAgKlxuICAgICAq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LCBsYXQ6IH1cbiAgICAgKiBAcGFyYW0ge051bWJlcn0gem9vbSAtIHpvb21cbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb3B0aW9ucyAtIFpvb20vcGFuIG9wdGlvbnNcbiAgICAgKi9cbiAgICBtb3ZlVG8gOiBmdW5jdGlvbiAocG9zaXRpb24sIHpvb20sIG9wdGlvbnMpIHtcbiAgICAgICAgaWYgKCF0aGlzLl9zaG93Q29udGFpbmVyLmNoZWNrZWQpIHtcbiAgICAgICAgICAgIHRoaXMuX3BpY3RvQ29udGFpbmVyLmNsaWNrKCk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgbWFwID0gdGhpcy5fbWFwO1xuICAgICAgICBpZiAoIW1hcCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5vbk1vdXNlTW92ZSh7XG4gICAgICAgICAgICBsYXRsbmcgOiBwb3NpdGlvblxuICAgICAgICB9KTtcblxuICAgICAgICBtYXAuZmx5VG8ocG9zaXRpb24sIHpvb20gfHwgMTAsIG9wdGlvbnMgfHwge30pO1xuICAgIH1cbn0pO1xuXG5leHBvcnQgZGVmYXVsdCBNb3VzZVBvc2l0aW9uO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/MousePosition.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Common/Utils/MathUtils */ \"./src/Common/Utils/MathUtils.js\");\n/* harmony import */ var _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Common/Controls/MousePositionDOM */ \"./src/Common/Controls/MousePositionDOM.js\");\n/* harmony import */ var _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Utils/PositionFormater */ \"./src/Leaflet/Controls/Utils/PositionFormater.js\");\n/* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../CRS/CRS */ \"./src/Leaflet/CRS/CRS.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n\n\n\n\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getLogger(\"mouseposition\");\n\n/**\n * @classdesc\n *\n * Leaflet Control Class to display Mouse position in various CRS and altitude using the altimetric web service of the Geoportal Platform.\n *\n * Use {@link module:Controls.MousePosition L.geoportalControl.MousePosition()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.Control native class.\n *\n * @namespace\n * @alias L.geoportalControl.MousePosition\n */\nvar MousePosition = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends L.geoportalControl.MousePosition.prototype */{\n includes: _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n /**\n * options by default\n *\n * @private\n */\n options: {\n position: \"bottomleft\",\n collapsed: true,\n units: [],\n systems: [],\n displayAltitude: true,\n displayCoordinates: true,\n editCoordinates: false,\n altitude: {\n triggerDelay: 200,\n responseDelay: 500,\n noDataValue: -99999,\n noDataValueTolerance: 90000,\n serviceOptions: {}\n }\n },\n /**\n * @constructor MousePosition\n *\n * @private\n * @alias MousePosition\n * @extends {L.Control}\n * @param {Object} options - options for function call.\n * @param {String} [options.apiKey] - API key. The \"calcul\" key is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {String} [options.position] - position of component into the map, 'bottomleft' by default\n * @param {Boolean} [options.collapsed = true] - collapse mode, false by default\n * @param {Array} [options.systems] - list of projection systems, GEOGRAPHIC, MERCATOR, LAMB93 and LAMB2E by default\n * Each array element (=system) is an object with following properties :\n * @param {String} options.systems.crs - Proj4 crs alias (from proj4 defs). e.g. : \"EPSG:4326\". Required\n * @param {String} [options.systems.label] - CRS label to be displayed in control. Default is crs code (e.g. \"EPSG:4326\")\n * @param {String} [options.systems.type] - CRS units type for coordinates conversion : \"Geographical\" or \"Metric\". Default: \"Metric\"\n * @param {Object} [options.systems.geoBBox] - Aera covered by the system (WGS84 coordinates).\n * @param {Number} options.systems.geoBBox.right - Right bound.\n * @param {Number} options.systems.geoBBox.left - Left bound.\n * @param {Number} options.systems.geoBBox.top - Top bound.\n * @param {Number} options.systems.geoBBox.bottom - Bottom bound.\n * @param {Array} [options.units] - list of units by system, Geographical and Metric by default\n * Values may be \"DEC\" (decimal degrees), \"DMS\" (sexagecimal), \"RAD\" (radians) and \"GON\" (grades) for geographical coordinates,\n * and \"M\" or \"KM\" for metric coordinates\n * @param {Boolean} [options.displayAltitude= true] - active/desactivate the altitude panel, if desactivate, have just the coordinate panel, true by default\n * @param {Boolean} [options.displayCoordinates= true] - active/desactivate the coordinate panel, if desactivate, have just the altitude panel, true by default\n * @param {Boolean} [options.editCoordinates = false] - add edit coordinates options. False by default.\n * @param {Object} [options.altitude] - elevation configuration\n * @param {Object} [options.altitude.serviceOptions] - options of elevation service\n * @param {Number} [options.altitude.responseDelay] - latency for altitude request, 500 ms by default\n * @param {Number} [options.altitude.triggerDelay] - immobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default\n * @param {Number} [options.altitude.noDataValue] - value used for altitude service no data (default is -99999). In this case, \"---m\" will be displayed instead of \"-99999m\"\n * @param {Number} [options.altitude.noDataValueTolerance] - tolerance for no data value :\n * values in [noDataValue - noDataValueTolerance ; noDataValue + noDataValueTolerance] interval will not be displayed, but \"---m\" will be displayed instead.\n * Default is 90000\n * @example\n * var MousePosition = L.geoportalControl.MousePosition({\n * position : 'bottomleft',\n * collapsed : false,\n * displayAltitude : true,\n * displayCoordinates : true,\n * editCoordinates : false,\n * altitude : {\n * triggerDelay : 100,\n * responseDelay : 500,\n * noDataValue : -99999,\n * noDataValueTolerance : 90000,\n * serviceOptions : {}\n * },\n * systems : [\n * {\n * crs : L.CRS.EPSG4326,\n * label : \"Lon,Lat\",\n * type : \"Geographical\"\n * },\n * {\n * crs : L.geoportalCRS.EPSG2154,\n * label : \"Lambert 93\",\n * type : \"Metric\"\n * }\n * ],\n * units : [\"DEC\", \"DMS\"]\n * });\n */\n initialize: function initialize(options) {\n // on merge les options avec celles par defaut\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(this.options, options);\n\n // uuid\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].generate();\n\n // initialisation des systemes de projections\n this._projectionSystems = [];\n this._initProjectionSystems();\n\n // initialisation des systemes des unités\n this._projectionUnits = {};\n this._initProjectionUnits();\n\n // detection du support : desktop ou tactile\n this._isDesktop = this._detectSupport();\n\n // on met en place un seuil sur le timer\n if (this.options.altitude.triggerDelay < 100) {\n this.options.altitude.triggerDelay = 100;\n }\n\n // timer sur le delai d'immobilisation du mouvement\n this._timer = this.options.altitude.triggerDelay;\n\n // Systeme de projection selectionné (cf. _initProjectionSystems)\n this._currentProjectionSystems = this._projectionSystems[0];\n\n // Container des systemes\n this._projectionSystemsContainer = null;\n\n /** Type d'unité de projection selectionnés : Geographical ou Metric (cf._initProjectionSystems ) */\n this._currentProjectionType = this._projectionSystems[0].type;\n\n // Unité de projection selectionnés (cf. _initProjectionUnits)\n this._currentProjectionUnits = this._projectionUnits[this._currentProjectionType][0].code;\n\n // Container des unités\n this._projectionUnitsContainer = null;\n\n /** Container de visualisation du panneau du composant */\n this._showContainer = null;\n this._pictoContainer = null;\n this._panelContainer = null;\n this._panelHeaderContainer = null;\n\n // gestion de l'affichage du panneau de l'altitude / coordonnées\n if (!this.options.displayAltitude && !this.options.displayCoordinates) {\n // on reactive cette option !\n this.options.displayCoordinates = true;\n }\n if (!this.options.displayCoordinates) {\n // si les coordonnées ne sont pas affichées : pas besoin de les éditer...\n this.options.editCoordinates = false;\n }\n\n /** Edition des coordonnées en cours ou non */\n this._isEditing = false;\n\n // on transmet les options au controle\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.setOptions(this, this.options);\n },\n /**\n * this method is called by this.addTo(map) when the control is added on the map\n * and fills variable 'this._container = this.onAdd(map)',\n * and create events on map.\n * @param {Object} map - the map\n *\n * @returns {DOMElement} DOM element\n * @private\n */\n onAdd: function onAdd(map) {\n // initialisation du DOM du composant\n var container = this._container = this._initLayout();\n\n // on met en place l'evenement sur la carte pour recuperer les coordonnées,\n // on l'active à l'ouverture du panneau uniquement !\n if (!this.options.collapsed) {\n // this.onShowMousePositionClick();\n // evenement valable pour le mode desktop !\n if (this._isDesktop) {\n map.on(\"mousemove\", this.onMouseMove, this);\n } else {\n map.on(\"move\", this.onMapMove, this);\n }\n }\n\n // deactivate of events that may interfere with the map\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container);\n\n // on stoppe la propagation de l'événement mousemove sur le container\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.addListener(container, \"mousemove\", leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.stopPropagation).addListener(container, \"mousemove\", leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.preventDefault);\n return container;\n },\n /**\n * this method is called when the control is removed from the map\n * and removes events on map.\n * @param {Object} map - the map\n *\n * @private\n */\n onRemove: function onRemove(map) {\n map.off(\"mousemove\", this.onMouseMove);\n },\n /**\n * this method is called by the constructor and initialize the projection\n * systems.\n * getting coordinates in the requested projection :\n * see this.onMousePositionProjectionSystemChange()\n *\n * @private\n */\n _initProjectionSystems: function _initProjectionSystems() {\n // on donne la possibilité à l'utilisateur de modifier\n // la liste des systèmes à afficher\n // Ex. this.options.systems\n\n // systemes de projection disponible par defaut\n var projectionSystemsByDefault = [{\n label: \"G\\xE9ographique\",\n crs: leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.Simple,\n // L.Projection.LonLat !\n type: \"Geographical\"\n }, {\n label: \"Web Mercator\",\n crs: leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.EPSG3395,\n // L.Projection.SphericalMercator !\n type: \"Metric\"\n }, {\n label: \"Lambert 93\",\n crs: _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__[\"default\"].EPSG2154,\n type: \"Metric\",\n geoBBox: {\n left: -9.86,\n bottom: 41.15,\n right: 10.38,\n top: 51.56\n }\n }, {\n label: \"Lambert II \\xE9tendu\",\n crs: _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__[\"default\"].EPSG27572,\n type: \"Metric\",\n geoBBox: {\n left: -4.87,\n bottom: 42.33,\n right: 8.23,\n top: 51.14\n }\n }];\n var systems = this.options.systems;\n for (var i = 0; i < systems.length; i++) {\n // definition d'un systeme de reference\n var sys = systems[i];\n if (!sys.label) {\n logger.error(\"not defined !\");\n continue;\n }\n if (!sys.crs) {\n logger.error(\"crs not defined !\");\n continue;\n }\n if (!sys.type) {\n logger.warn(\"type srs not defined, use 'Metric' by default !\");\n sys.type = \"Metric\";\n }\n this._projectionSystems.push(systems[i]);\n\n // it's a just a test ...\n var found = false;\n for (var j = 0; j < projectionSystemsByDefault.length; j++) {\n var obj = projectionSystemsByDefault[j];\n if (sys.crs === obj.crs) {\n found = true;\n logger.info(\"crs '{}' already configured by default\", obj.code);\n }\n }\n if (!found) {\n logger.info(\"crs '{}' not found, it's a new projection\", sys.code || sys.label);\n }\n }\n\n // au cas où...\n if (this._projectionSystems.length === 0) {\n this._projectionSystems = projectionSystemsByDefault;\n }\n\n // re-initilisation des codes pour gerer le lien entre _projectionSystems et select du mouse position (lien code/value)\n for (var k = 0; k < this._projectionSystems.length; ++k) {\n this._projectionSystems[k].code = k;\n }\n },\n /**\n * this method is called by the constructor and initialize the units.\n * getting coordinates in the requested units :\n * see this.onMousePositionProjectionUnitsChange()\n *\n * @private\n */\n _initProjectionUnits: function _initProjectionUnits() {\n // on donne la possibilité à l'utilisateur de modifier\n // la liste des unités à afficher\n // Ex.\n // this.options.units : [\"DEC\", \"DMS\"]\n\n // unités disponible par defaut\n var projectionUnitsByDefault = {\n Geographical: [{\n code: \"DEC\",\n label: \"degrés décimaux\",\n format: this._displayDEC\n }, {\n code: \"DMS\",\n label: \"degrés sexagésimaux\",\n format: this._displayDMS\n }, {\n code: \"RAD\",\n label: \"radians\",\n format: this._displayRAD\n }, {\n code: \"GON\",\n label: \"grades\",\n format: this._displayGON\n }],\n Metric: [{\n code: \"M\",\n label: \"mètres\",\n format: this._displayMeter\n }, {\n code: \"KM\",\n label: \"kilomètres\",\n format: this._displayKMeter\n }]\n };\n var units = this.options.units;\n for (var type in projectionUnitsByDefault) {\n if (projectionUnitsByDefault.hasOwnProperty(type)) {\n var found = false;\n for (var j = 0; j < projectionUnitsByDefault[type].length; j++) {\n var obj = projectionUnitsByDefault[type][j];\n for (var i = 0; i < units.length; i++) {\n var unit = units[i];\n if (obj.code === unit) {\n found = true;\n if (!this._projectionUnits[type]) {\n this._projectionUnits[type] = [];\n }\n this._projectionUnits[type].push(obj);\n }\n }\n }\n if (!found) {\n this._projectionUnits[type] = projectionUnitsByDefault[type];\n }\n }\n }\n\n // au cas où...\n if (Object.keys(this._projectionUnits).length === 0) {\n this._projectionUnits = projectionUnitsByDefault;\n }\n },\n /**\n * this method is called by the constructor.\n * this information is useful to switch to touch mode.\n * Detection : test for desktop or tactile\n *\n * @returns {Boolean} is desktop\n * @private\n */\n _detectSupport: function _detectSupport() {\n // TODO\n // Choix de gérer la détection dans le code du composant au lieu du DOM car :\n // Utilisation de l'implémentation Leaflet\n // http://leafletjs.com/reference.html#browser\n\n var isDesktop = true;\n var userAgent = window.navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\"iphone\") !== -1 || userAgent.indexOf(\"ipod\") !== -1 || userAgent.indexOf(\"ipad\") !== -1 || userAgent.indexOf(\"android\") !== -1 || userAgent.indexOf(\"mobile\") !== -1 || userAgent.indexOf(\"blackberry\") !== -1 || userAgent.indexOf(\"tablet\") !== -1 || userAgent.indexOf(\"phone\") !== -1 || userAgent.indexOf(\"touch\") !== -1) {\n isDesktop = false;\n }\n if (userAgent.indexOf(\"msie\") !== -1 || userAgent.indexOf(\"trident\") !== -1) {\n isDesktop = true;\n }\n return isDesktop;\n },\n // ################################################################### //\n // ######################## methods handle dom ####################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd(map)\n * and initialize the container HTMLElement\n *\n * @returns {DOMElement} DOM element\n * @private\n */\n _initLayout: function _initLayout() {\n // create main container\n var container = this._createMainContainerElement();\n var inputShow = this._showContainer = this._createShowMousePositionElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.options.collapsed) {\n inputShow.checked = true;\n }\n var picto = this._pictoContainer = this._createShowMousePositionPictoElement(this._isDesktop);\n container.appendChild(picto);\n var panel = this._panelContainer = this._createMousePositionPanelElement();\n var header = this._panelHeaderContainer = this._createMousePositionPanelHeaderElement();\n panel.appendChild(header);\n var basic = this._createMousePositionPanelBasicElement(this.options.displayAltitude, this.options.displayCoordinates, this.options.editCoordinates);\n panel.appendChild(basic);\n var arraySettings = this._createShowMousePositionSettingsElement(this.options.displayCoordinates);\n for (var j = 0; j < arraySettings.length; j++) {\n panel.appendChild(arraySettings[j]);\n }\n var settings = this._createMousePositionSettingsElement();\n var systems = this._projectionSystemsContainer = this._createMousePositionSettingsSystemsElement(this._projectionSystems);\n var units = this._projectionUnitsContainer = this._createMousePositionSettingsUnitsElement(this._projectionUnits[this._currentProjectionType]);\n settings.appendChild(systems);\n settings.appendChild(units);\n panel.appendChild(settings);\n container.appendChild(panel);\n\n // ce tag n'est pas à placer dans le container du controle,\n // mais dans celui de la map !\n var center = this._createMapCenter();\n var map = this._map;\n map.getContainer().appendChild(center);\n return container;\n },\n /**\n * this method is called by this.()\n * and it changes the elevation view panel into the dom.\n * FIXME call by ID !\n *\n * @param {Boolean} active - true:active, false:disable\n *\n * @private\n */\n _setElevationPanel: function _setElevationPanel(active) {\n var div = null;\n if (!active) {\n div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionAltitude\"));\n div.style.display = \"none\";\n }\n },\n /**\n * this method is called by this.()\n * and it changes the coordinate view panel into the dom.\n * FIXME call by ID !\n *\n * @param {Boolean} active - true:active, false:disable\n *\n * @private\n */\n _setCoordinatePanel: function _setCoordinatePanel(active) {\n if (!active) {\n var div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionCoordinate\"));\n div.style.display = \"none\";\n }\n },\n /**\n * this method is called by this.()\n * and it changes the settings view panel into the dom.\n * FIXME call by ID !\n *\n * @param {Boolean} active - true:active, false:disable\n *\n * @private\n */\n _setSettingsPanel: function _setSettingsPanel(active) {\n if (!active) {\n var divPicto = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GPshowMousePositionSettingsPicto\");\n var divPanel = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionSettings\"));\n divPicto.style.display = \"none\";\n divPanel.style.display = \"none\";\n }\n },\n /**\n * this method is called by this.onMousePositionProjectionSystemChange()\n * when changes to a metric or a geographical units.\n *\n * @param {String} type - Geographical or Metric\n *\n * @private\n */\n _setTypeUnitsPanel: function _setTypeUnitsPanel(type) {\n var container = this._projectionUnitsContainer;\n\n // on supprime les enfants...\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n var units = this._projectionUnits[type];\n for (var j = 0; j < units.length; j++) {\n var obj = units[j];\n var option = document.createElement(\"option\");\n option.value = obj.code ? obj.code : j;\n option.text = obj.label || j;\n // option.label = obj.label;\n container.appendChild(option);\n }\n var projectionUnits = this._projectionUnits[type][0].code;\n if (this._currentProjectionUnits === \"DMS\" || projectionUnits === \"DMS\") {\n this._resetCoordinateElements(this.options.editCoordinates, type, projectionUnits);\n this._setEditMode(this._isEditing);\n }\n\n // le nouveau type de system ...\n this._currentProjectionType = type;\n\n // Mise a jour des elements labels et unites\n this._resetLabelElements(type);\n this._resetUnitElements(projectionUnits);\n\n // et comme on a changé de type de systeme,\n // il faut changer aussi d'unité !\n this._currentProjectionUnits = this._projectionUnits[type][0].code;\n },\n // ################################################################### //\n // ######################## method units format ###################### //\n // ################################################################### //\n\n /**\n * degreedecimal\n * @param {Object} oLatLng - coordinates\n *\n * @returns {Object} coordinates in decimal\n * @private\n */\n _displayDEC: function _displayDEC(oLatLng) {\n var coordinate = {};\n coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].roundToDecimal(oLatLng.lat, 6);\n coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].roundToDecimal(oLatLng.lng, 6);\n coordinate.unit = \"°\";\n return coordinate;\n },\n /**\n * degreedecimal2sexagecimal\n * @param {Object} oLatLng - coordinates\n *\n * @returns {Object} coordinates in DMS\n * @private\n */\n _displayDMS: function _displayDMS(oLatLng) {\n var coordinate = {};\n coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalLatToDMS(oLatLng.lat, true);\n coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalLonToDMS(oLatLng.lng, true);\n return coordinate;\n },\n /**\n * degreedecimal2radian\n * @param {Object} oLatLng - coordinates\n *\n * @returns {Object} coordinates in radian\n * @private\n */\n _displayRAD: function _displayRAD(oLatLng) {\n var coordinate = {};\n coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalToRadian(oLatLng.lat);\n coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalToRadian(oLatLng.lng);\n coordinate.unit = \"rad\";\n return coordinate;\n },\n /**\n * degreedecimal2grade\n * @param {Object} oLatLng - coordinates\n *\n * @returns {Object} coordinates in gon\n * @private\n */\n _displayGON: function _displayGON(oLatLng) {\n var coordinate = {};\n coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalToGrade(oLatLng.lat);\n coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalToGrade(oLatLng.lng);\n coordinate.unit = \"gon\";\n return coordinate;\n },\n /**\n * meter\n * @param {Object} oXY - coordinates\n *\n * @returns {Object} coordinates in meters\n * @private\n */\n _displayMeter: function _displayMeter(oXY) {\n // on recoit toujours des coordonnées metriques\n var coordinate = {};\n coordinate.x = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.x, 2);\n coordinate.y = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.y, 2);\n coordinate.unit = \"m\";\n return coordinate;\n },\n /**\n * kilometer\n * @param {Object} oXY - coordinates\n *\n * @returns {Object} coordinates in km\n * @private\n */\n _displayKMeter: function _displayKMeter(oXY) {\n var coordinate = {};\n coordinate.x = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.x / 1000, 2);\n coordinate.y = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.y / 1000, 2);\n coordinate.unit = \"km\";\n return coordinate;\n },\n // ################################################################### //\n // ####################### method system project ##################### //\n // ################################################################### //\n\n /**\n * this method projects a coordinate to a specific projection.\n * FIXME\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n * @param {Object} crs - projection system (ex. GEOGRAPHIC, LAMB93, LAMB2E, MERCATOR, ...)\n * @returns {Object} oXY - coordinate\n * @private\n */\n _project: function _project(oLatLng, crs) {\n // cf. http://leafletjs.com/reference.html#iprojection\n // notre carte est dans la projection par defaut :\n // Spherical Mercator projection (EPSG:3857)\n // - GEOGRAPHIC : conversion native, L.CRS.Simple ou L.Projection.LngLat.project(latlng)\n // - LAMB93 : L.GeoportalCRS.EPSG2154 ou projection.project(latlng)\n // - LAMB2E : L.GeoportalCRS.EPSG27572 ou projection.project(latlng)\n // - MERCATOR ou EPSG:3395 : L.CRS.EPSG3395 ou L.Projection.Mercator.project(latlng)\n\n if (typeof crs === \"function\") {\n // \"crs is an function !\"... en mode AMD !\n crs = crs();\n }\n if (_typeof(crs) !== \"object\") {\n logger.log(\"crs is not an object !\");\n return;\n }\n\n // pas de reprojection pour le systeme de projection natif !\n if (crs === leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.Simple) {\n return oLatLng;\n }\n if (!crs.projection || _typeof(crs.projection) !== \"object\") {\n logger.error(\"projection is not an object !\");\n return;\n }\n var oPoint = crs.projection.project(oLatLng);\n\n // FIXME reprojeter du geographique en geographique cause qq problemes\n // Ex. LatLng en EPSG4326 !\n // FIXME probleme d'inversion d'axe sur les projections geographiques\n // Ex. EPSG:4326 -> lat/lon\n // IGNF:RGF93G -> lon/lat\n if (this._currentProjectionType === \"Geographical\") {\n oPoint.lat = oPoint.y;\n oPoint.lng = oPoint.x;\n }\n if (!oPoint || Object.keys(oPoint).length === 0) {\n logger.error(\"Failed to project with crs code : \" + crs.code);\n }\n return oPoint;\n },\n /**\n * this method unprojects a coordinate to a geographic projection.\n *\n * @param {Object} oXY - coordinate\n * @returns {Object} oLatLng - geographic coordinate (L.LatLng)\n * @private\n */\n _unproject: function _unproject(oXY) {\n // cf. http://leafletjs.com/reference.html#iprojection\n // notre carte est dans la projection par defaut :\n // Spherical Mercator projection (EPSG:3857)\n // - GEOGRAPHIC : conversion native, L.CRS.Simple ou L.Projection.LngLat.project(latlng)\n // - LAMB93 : L.GeoportalCRS.EPSG2154 ou projection.project(latlng)\n // - LAMB2E : L.GeoportalCRS.EPSG27572 ou projection.project(latlng)\n // - MERCATOR ou EPSG:3395 : L.CRS.EPSG3395 ou L.Projection.Mercator.project(latlng)\n\n var oSrs = this._currentProjectionSystems.crs;\n if (!oSrs) {\n logger.log(\"system crs not found\");\n return;\n }\n if (typeof oSrs === \"function\") {\n // \"crs is an function !\"... en mode AMD !\n oSrs = oSrs();\n }\n if (_typeof(oSrs) !== \"object\") {\n logger.log(\"crs is not an object !\");\n return;\n }\n\n // pas de reprojection pour le systeme de projection natif !\n if (oSrs === leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.Simple) {\n return {\n lat: oXY.y,\n lng: oXY.x\n };\n }\n if (this._currentProjectionType === \"Geographical\") {\n return {\n lat: oXY.y,\n lng: oXY.x\n };\n }\n if (!oSrs.projection || _typeof(oSrs.projection) !== \"object\") {\n logger.error(\"projection is not an object !\");\n return;\n }\n var oLatLng = oSrs.projection.unproject(oXY);\n if (!oLatLng || Object.keys(oLatLng).length === 0) {\n logger.error(\"Failed to unproject coordinate\");\n }\n return oLatLng;\n },\n // ################################################################### //\n // ##################### handlers events to control ################## //\n // ################################################################### //\n\n /**\n * this sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n *\n * @private\n */\n _setCoordinate: function _setCoordinate(oLatLng) {\n // structure\n // L.LatLng\n // lat: 4.07249425916745\n // lng: 2.4609375\n\n // type de systeme : Geographical ou Metric\n var type = this._currentProjectionSystems.type;\n\n // on recherche la fonction de formatage dans l'unitée demandée\n var format = null;\n var units = this._projectionUnits[type];\n for (var i = 0; i < units.length; i++) {\n if (units[i].code === this._currentProjectionUnits) {\n format = units[i].format;\n break;\n }\n }\n\n // structure pour les coordonnées en fonctin du type demandé :\n // {x:, y:, unit:} ou {lng:, lat:} ou {lon:, lat:} ou {e:, n:, unit:}...\n var coordinate = {};\n // on projete le point dans le systeme demandé\n var oSrs = this._currentProjectionSystems.crs;\n if (!oSrs) {\n logger.error(\"crs not found !\");\n return;\n }\n coordinate = format(this._project(oLatLng, oSrs));\n if (!coordinate || Object.keys(coordinate).length === 0) {\n return;\n }\n this.GPdisplayCoords(coordinate);\n },\n /**\n * this sends the coordinates to the panel.\n * (cf. this.GPdisplayElevation() into the DOM functions)\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n *\n * @private\n */\n _setElevation: function _setElevation(oLatLng) {\n // gestion du timer de la requete du service d'altitude\n var delay = this.options.altitude.responseDelay;\n var noDataValue = this.options.altitude.noDataValue;\n var noDataValueTolerance = this.options.altitude.noDataValueTolerance;\n this.GPdisplayElevation(oLatLng, delay, noDataValue, noDataValueTolerance);\n },\n /**\n * this method is triggered when the mouse or the map is stopped.\n * (cf. onMouseMove and onMapMove)\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n *\n * @private\n */\n onMoveStopped: function onMoveStopped(oLatLng) {\n this._setElevation(oLatLng);\n },\n /**\n * this method is an handler event to control. The event is 'mousemove' on\n * the map. The handler sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMouseMove: function onMouseMove(e) {\n var self = this;\n var oLatLng = e.latlng;\n this._setCoordinate(oLatLng);\n clearTimeout(this._timer);\n this._timer = setTimeout(function () {\n self.onMoveStopped(oLatLng);\n }, this.options.altitude.triggerDelay);\n },\n /**\n * this method is an handler event to control. The event is 'moveend' on\n * the map. The handler sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @private\n */\n onMapMove: function onMapMove() {\n var self = this;\n var map = this._map;\n var oLatLng = map.getCenter();\n this._setCoordinate(oLatLng);\n clearTimeout(this._timer);\n this._timer = setTimeout(function () {\n self.onMoveStopped(oLatLng);\n }, this.options.altitude.triggerDelay);\n },\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by this.GPdisplayCoords() in the dom, and\n * it executes a request to the elevation service.\n *\n * @param {Object} coordinate - {lat:..., lng:...}\n * @param {Function} callback - callback\n *\n * @private\n */\n onRequestAltitude: function onRequestAltitude(coordinate, callback) {\n logger.log(\"onRequestAltitude\");\n\n // INFORMATION\n // on effectue la requête au service d'altitude...\n // on met en place des callbacks afin de recuperer les resultats ou\n // les messages d'erreurs du service.\n // le resultat est affiché dans une balise du dom.\n // les messages d'erreurs sont affichés sur la console (?)\n\n if (!coordinate || Object.keys(coordinate).length === 0) {\n return;\n }\n\n // si on ne veut pas de calcul d'altitude, on ne continue pas !\n if (!this.options.displayAltitude) {\n return;\n }\n logger.log(coordinate);\n var options = {};\n // on recupere les options du service\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.altitude.serviceOptions);\n\n // ainsi que les coordonnées\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n zonly: true,\n positions: [{\n lon: coordinate.lon || coordinate.lng,\n lat: coordinate.lat\n }]\n });\n\n // et les callbacks\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n scope: this,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results && Object.keys(results).length) {\n // var context = this.options.scope;\n // context._setAltidude(results.elevations[0].z);\n callback.call(this, results.elevations[0].z);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n logger.error(error.message);\n }\n });\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle ou la clé \"calcul\" par défaut\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n apiKey: options.apiKey || this.options.apiKey\n });\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n ssl: this.options.ssl\n });\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Services.getAltitude(options);\n },\n /**\n * this method is called by event 'click' on 'GPshowMousePositionPicto' tag label\n * (cf. this._createShowMousePositionPictoElement),\n * and toggles event 'mousemove' on map.\n * FIXME\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onShowMousePositionClick: function onShowMousePositionClick(e) {\n logger.log(e);\n\n // checked : true - panel close\n // checked : false - panel open\n var map = this._map;\n\n // evenement declenché à l'ouverture/fermeture du panneau,\n // et en fonction du mode : desktop ou tactile !\n if (this._showContainer.checked) {\n this._isDesktop ? map.off(\"mousemove\", this.onMouseMove, this) : map.off(\"move\", this.onMapMove, this);\n } else {\n this._isDesktop ? map.on(\"mousemove\", this.onMouseMove, this) : map.on(\"move\", this.onMapMove, this);\n }\n\n // on gère l'affichage des panneaux ici...,\n // même si ce n'est pas l'endroit adequate...\n this._setElevationPanel(this.options.displayAltitude);\n this._setCoordinatePanel(this.options.displayCoordinates);\n if (!this.options.displayCoordinates) {\n this._setSettingsPanel(false);\n }\n },\n /**\n * this method is called by event 'click' on input coordinate\n *\n * @param {Boolean} editing - editing mode\n * @private\n */\n onMousePositionEditModeClick: function onMousePositionEditModeClick(editing) {\n if (!this.options.editCoordinates) {\n return;\n }\n if (this._isEditing === editing) {\n return;\n }\n this._isEditing = editing;\n\n // Affichage des outils, input en ecriture\n this._setEditMode(this._isEditing);\n var map = this._map;\n if (this._isDesktop) {\n this._isEditing ? map.off(\"mousemove\", this.onMouseMove, this) : map.on(\"mousemove\", this.onMouseMove, this);\n } else {\n this._isEditing ? map.off(\"move\", this.onMapMove, this) : map.on(\"move\", this.onMapMove, this);\n }\n },\n /**\n * Convert Coordinate value : km to meters, radians, grades to decimal degrees\n * @param {Number} value - value to convert\n * @param {String} unit - unit\n *\n * @returns {Number} converted value\n * @private\n */\n _convertCoordinate: function _convertCoordinate(value, unit) {\n var result;\n if (unit === \"DEC\" || unit === \"DMS\") {\n // DMS est converti en DEC !\n result = value;\n } else if (unit === \"M\") {\n result = value;\n } else if (unit === \"KM\") {\n result = value * 1000;\n } else if (unit === \"RAD\") {\n var rd = (180 / Math.PI).toFixed(20);\n result = (value * rd).toFixed(20);\n } else if (unit === \"GON\") {\n var d = (9 / 10).toFixed(20);\n result = (value * d).toFixed(20);\n }\n return result;\n },\n /**\n * Validate Extend coordinate\n *\n * @param {String} coordType - Lat or Lon\n * @param {String} value - coordinate\n * @param {Event} e - event\n * @returns {Boolean} value is within extent\n */\n validateExtentCoordinate: function validateExtentCoordinate(coordType, value, e) {\n // FIXME pas de validation...\n if (e !== undefined) {\n return true;\n }\n if ([\"Lon\", \"Lat\"].indexOf(coordType) === -1) {\n return false;\n }\n var geoBBox = this._currentProjectionSystems.geoBBox;\n if (geoBBox === undefined) {\n return true;\n }\n if (geoBBox) {\n // check if coordinates are in the extent\n\n var extent = [geoBBox.left, geoBBox.bottom, geoBBox.right, geoBBox.top];\n var unit = this._currentProjectionUnits;\n\n // on convertit un point..., mais on n'a pas de fonction\n // de conversion comme pour openlayers...\n var oLatLon = this._unproject({\n x: coordType === \"Lon\" ? this._convertCoordinate(value, unit) : 0,\n y: coordType === \"Lat\" ? this._convertCoordinate(value, unit) : 0\n });\n if (coordType === \"Lon\" && (oLatLon.lng < extent[0] || oLatLon.lng > extent[2])) {\n logger.warn(\"coordinates (lon) out of extent !?\");\n return false;\n }\n if (coordType === \"Lat\" && (oLatLon.lat < extent[1] || oLatLon.lat > extent[3])) {\n logger.warn(\"coordinates (lat) out of extent !?\");\n return false;\n }\n }\n return true;\n },\n /**\n * Get coordinate from inputs and select in decimal degrees\n *\n * @param {String} coordType - \"Lon\" or \"Lat\"\n * @returns {String} coordinate\n * @private\n */\n _getCoordinate: function _getCoordinate(coordType) {\n var inputDegrees = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePosition\" + coordType + \"Degrees\"));\n var degrees = inputDegrees.value;\n if (!degrees) {\n return null;\n }\n degrees = degrees.replace(\",\", \".\");\n if (!_Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].isInteger(degrees)) {\n return null;\n }\n var result = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].toInteger(degrees);\n if (result < Number(inputDegrees.dataset.min) || result > Number(inputDegrees.dataset.max)) {\n return null;\n }\n var direction = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePosition\" + coordType + \"Direction\")).value;\n var inputMinutes = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePosition\" + coordType + \"Minutes\"));\n var minutes = inputMinutes.value;\n if (minutes) {\n minutes = minutes.replace(\",\", \".\");\n if (_Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].isInteger(minutes)) {\n var mins = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].toInteger(minutes);\n if (mins >= Number(inputMinutes.dataset.min) && mins <= Number(inputMinutes.dataset.max)) {\n result += mins / 60;\n }\n }\n }\n var inputSeconds = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePosition\" + coordType + \"Seconds\"));\n var seconds = inputSeconds.value;\n if (seconds) {\n seconds = seconds.replace(\",\", \".\");\n var secs = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].toFloat(seconds);\n if (secs && secs >= Number(inputSeconds.dataset.min) && secs <= Number(inputSeconds.dataset.max)) {\n result += secs / 3600;\n }\n }\n if (direction === \"O\" || direction === \"S\") {\n result = -result;\n }\n return result;\n },\n /**\n * locate DMS coordinates on map\n *\n * @private\n */\n _locateDMSCoordinates: function _locateDMSCoordinates() {\n // on est toujours en coordonnées geographiques...\n var oLatLon = {\n lat: this._getCoordinate(\"Lat\"),\n lng: this._getCoordinate(\"Lon\")\n };\n if (!this.validateExtentCoordinate(\"Lon\", oLatLon.lng)) {\n return;\n }\n if (!this.validateExtentCoordinate(\"Lat\", oLatLon.lat)) {\n return;\n }\n\n // FIXME https://github.com/Leaflet/Leaflet/issues/922\n var map = this._map;\n map.panTo(oLatLon);\n },\n /**\n * locate coordinates on map (not DMS)\n *\n * @private\n */\n _locateCoordinates: function _locateCoordinates() {\n // soit longitude ou soit y\n var lonYDom = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionLon\")).value;\n lonYDom = lonYDom.replace(\",\", \".\");\n lonYDom = parseFloat(lonYDom);\n if (isNaN(lonYDom)) {\n return;\n }\n\n // soit lattitude ou soit x\n var latXDom = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionLat\")).value;\n latXDom = latXDom.replace(\",\", \".\");\n latXDom = parseFloat(latXDom);\n if (isNaN(latXDom)) {\n return;\n }\n var lon = null;\n var lat = null;\n var x = null;\n var y = null;\n if (this._currentProjectionType === \"Geographical\") {\n lon = lonYDom;\n lat = latXDom;\n } else {\n x = latXDom;\n y = lonYDom;\n }\n if (!this.validateExtentCoordinate(\"Lon\", lon || x)) {\n return;\n }\n if (!this.validateExtentCoordinate(\"Lat\", lat || y)) {\n return;\n }\n var unit = this._currentProjectionUnits;\n var oLatLon = this._unproject({\n x: this._convertCoordinate(lon !== null ? lon : x, unit),\n y: this._convertCoordinate(lat !== null ? lat : y, unit)\n });\n\n // FIXME https://github.com/Leaflet/Leaflet/issues/922\n var map = this._map;\n map.panTo(oLatLon);\n },\n /**\n * locate coordinates on map\n *\n * @method locate\n * @private\n */\n onMousePositionEditModeLocateClick: function onMousePositionEditModeLocateClick() {\n if (!this.options.editCoordinates) {\n return;\n }\n if (!this._isEditing) {\n this.onMousePositionEditModeClick(true);\n return;\n }\n this._currentProjectionUnits === \"DMS\" ? this._locateDMSCoordinates() : this._locateCoordinates();\n },\n /**\n * this method is called by event 'change' on 'GPmousePositionProjectionSystem'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the system projection.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMousePositionProjectionSystemChange: function onMousePositionProjectionSystemChange(e) {\n logger.log(\"onMousePositionProjectionSystemChange\", e);\n var idx = e.target.selectedIndex; // index\n var value = e.target.options[idx].value; // crs, ex. MERCATOR (optionnel)\n var label = e.target.options[idx].label; // etiquette, ex Géographiques\n\n logger.log(idx, value, label);\n this._setCurrentSystem(value);\n },\n /**\n * this method selects the current system projection.\n *\n * @param {Object} systemCode - inner code (rank in array _projectionSystems)\n *\n * @private\n */\n _setCurrentSystem: function _setCurrentSystem(systemCode) {\n // si on change de type de systeme, on doit aussi changer le type d'unités !\n var type = null;\n for (var i = 0; i < this._projectionSystems.length; ++i) {\n if (this._projectionSystems[i].code === Number(systemCode)) {\n type = this._projectionSystems[i].type;\n break;\n }\n }\n if (!type) {\n logger.log(\"system not found in projection systems container\");\n return;\n }\n if (type !== this._currentProjectionType) {\n this._setTypeUnitsPanel(type);\n }\n\n // on enregistre le systeme courrant\n this._currentProjectionSystems = this._projectionSystems[Number(systemCode)];\n\n // on simule un deplacement en mode tactile pour mettre à jour les\n // resultats\n if (!this._isDesktop) {\n this.onMapMove();\n }\n },\n /**\n * this method is called by event 'mouseover' on 'GPmousePositionProjectionSystem'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the system projection.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMousePositionProjectionSystemMouseOver: function onMousePositionProjectionSystemMouseOver(e) {\n logger.log(\"onMousePositionProjectionSystemMouseOver\", e);\n var map = this._map;\n if (!map) {\n return;\n }\n\n // clear select\n var systemList = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionProjectionSystem\"));\n systemList.innerHTML = \"\";\n\n // add systems whose extent intersects the map extent\n for (var j = 0; j < this._projectionSystems.length; j++) {\n var proj = this._projectionSystems[j];\n var option = null;\n if (proj.geoBBox) {\n // bboxes intersection test\n if (map.getBounds()._southWest.lng > proj.geoBBox.right || map.getBounds()._southWest.lat > proj.geoBBox.top || map.getBounds()._northEast.lng < proj.geoBBox.left || map.getBounds()._northEast.lat < proj.geoBBox.bottom) {\n if (proj === this._currentProjectionSystems) {\n option = document.createElement(\"option\");\n option.value = proj.code;\n option.text = proj.label || j;\n option.setAttribute(\"selected\", \"selected\");\n option.setAttribute(\"disabled\", \"disabled\");\n systemList.appendChild(option);\n }\n continue; // do not intersect\n }\n }\n\n option = document.createElement(\"option\");\n option.value = proj.code;\n option.text = proj.label || j;\n if (proj === this._currentProjectionSystems) {\n option.setAttribute(\"selected\", \"selected\");\n }\n systemList.appendChild(option);\n }\n },\n /**\n * this method is called by event 'change' on 'GPmousePositionProjectionUnits'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the units projection.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMousePositionProjectionUnitsChange: function onMousePositionProjectionUnitsChange(e) {\n logger.log(\"onMousePositionProjectionUnitsChange\", e);\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n var label = e.target.options[idx].label;\n logger.log(idx, value, label);\n var oldProjectionUnits = this._currentProjectionUnits;\n var newProjectionUnits = this._currentProjectionUnits = value;\n var newProjectionType = this._currentProjectionType;\n\n // Mise a jour des elements lebels et unites\n this._resetLabelElements(newProjectionType);\n this._resetUnitElements(newProjectionUnits);\n\n // mise a jour des inputs pour les coordonnees\n if (oldProjectionUnits === \"DMS\" || newProjectionUnits === \"DMS\") {\n this._resetCoordinateElements(this.options.editCoordinates, newProjectionType, newProjectionUnits);\n this._setEditMode(this._isEditing);\n }\n\n // on simule un deplacement en mode tactile pour mettre à jour les\n // resultats\n if (!this._isDesktop) {\n this.onMapMove();\n }\n },\n // ################################################################### //\n // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ //\n // ################################################################### //\n\n /**\n * This method is public.\n * It allows to control the execution of a movement.\n *\n * @param {Object} position - position = {lon: , lat: }\n * @param {Number} zoom - zoom\n * @param {Object} options - Zoom/pan options\n */\n moveTo: function moveTo(position, zoom, options) {\n if (!this._showContainer.checked) {\n this._pictoContainer.click();\n }\n var map = this._map;\n if (!map) {\n return;\n }\n this.onMouseMove({\n latlng: position\n });\n map.flyTo(position, zoom || 10, options || {});\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (MousePosition);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL01vdXNlUG9zaXRpb24uanM/NDJiMSJdLCJuYW1lcyI6WyJsb2dnZXIiLCJMb2dnZXIiLCJnZXRMb2dnZXIiLCJNb3VzZVBvc2l0aW9uIiwiTCIsIkNvbnRyb2wiLCJleHRlbmQiLCJpbmNsdWRlcyIsIk1vdXNlUG9zaXRpb25ET00iLCJvcHRpb25zIiwicG9zaXRpb24iLCJjb2xsYXBzZWQiLCJ1bml0cyIsInN5c3RlbXMiLCJkaXNwbGF5QWx0aXR1ZGUiLCJkaXNwbGF5Q29vcmRpbmF0ZXMiLCJlZGl0Q29vcmRpbmF0ZXMiLCJhbHRpdHVkZSIsInRyaWdnZXJEZWxheSIsInJlc3BvbnNlRGVsYXkiLCJub0RhdGFWYWx1ZSIsIm5vRGF0YVZhbHVlVG9sZXJhbmNlIiwic2Vydmlj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yBkYXRhIHZhbHVlIDpcbiAgICAgKiAgICAgICAgICAgICAgICAgIHZhbHVlcyBpbiBbbm9EYXRhVmFsdWUgLSBub0RhdGFWYWx1ZVRvbGVyYW5jZSA7IG5vRGF0YVZhbHVlICsgbm9EYXRhVmFsdWVUb2xlcmFuY2VdIGludGVydmFsIHdpbGwgbm90IGJlIGRpc3BsYXllZCwgYnV0IFwiLS0tbVwiIHdpbGwgYmUgZGlzcGxheWVkIGluc3RlYWQuXG4gICAgICogICAgICAgICAgICAgICAgICBEZWZhdWx0IGlzIDkwMDAwXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiAgdmFyIE1vdXNlUG9zaXRpb24gPSBMLmdlb3BvcnRhbENvbnRyb2wuTW91c2VQb3NpdGlvbih7XG4gICAgICogICAgICBwb3NpdGlvbiA6ICdib3R0b21sZWZ0JyxcbiAgICAgKiAgICAgIGNvbGxhcHNlZCA6IGZhbHNlLFxuICAgICAqICAgICAgZGlzcGxheUFsdGl0dWRlIDogdHJ1ZSxcbiAgICAgKiAgICAgIGRpc3BsYXlDb29yZGluYXRlcyA6IHRydWUsXG4gICAgICogICAgICBlZGl0Q29vcmRpbmF0ZXMgOiBmYWxzZSxcbiAgICAgKiAgICAgIGFsdGl0dWRlIDoge1xuICAgICAqICAgICAgICAgICB0cmlnZ2VyRGVsYXkgOiAxMDAsXG4gICAgICogICAgICAgICAgIHJlc3BvbnNlRGVsYXkgOiA1MDAsXG4gICAgICogICAgICAgICAgIG5vRGF0YVZhbHVlIDogLTk5OTk5LFxuICAgICAqICAgICAgICAgICBub0RhdGFWYWx1ZVRvbGVyYW5jZSA6IDkwMDAwLFxuICAgICAqICAgICAgICAgICBzZXJ2aWNlT3B0aW9ucyA6IHt9XG4gICAgICogICAgICB9LFxuICAgICAqICAgICAgc3lzdGVtcyA6IFtcbiAgICAgKiAgICAgICB7XG4gICAgICogICAgICAgICAgY3JzIDogTC5DUlMuRVBTRzQzMjYsXG4gICAgICogICAgICAgICAgbGFiZW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b25pYmxlIHBhciBkZWZhdXRcbiAgICAgICAgdmFyIHByb2plY3Rpb25TeXN0ZW1zQnlEZWZhdWx0ID0gW3tcbiAgICAgICAgICAgIGxhYmVsIDogXCJHXFx1MDBlOW9ncmFwaGlxdWVcIixcbiAgICAgICAgICAgIGNycyA6IEwuQ1JTLlNpbXBsZSwgLy8gTC5Qcm9qZWN0aW9uLkxvbkxhdCAhXG4gICAgICAgICAgICB0eXBlIDogXCJHZW9ncmFwaGljYWxcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICBsYWJlbCA6IFwiV2ViIE1lcmNhdG9yXCIsXG4gICAgICAgICAgICBjcnMgOiBMLkNSUy5FUFNHMzM5NSwgLy8gTC5Qcm9qZWN0aW9uLlNwaGVyaWNhbE1lcmNhdG9yICFcbiAgICAgICAgICAgIHR5cGUgOiBcIk1ldHJpY1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGxhYmVsIDogXCJMYW1iZXJ0IDkzXCIsXG4gICAgICAgICAgICBjcnMgOiBDUlMuRVBTRzIxNTQsXG4gICAgICAgICAgICB0eXBlIDogXCJNZXRyaWNcIixcbiAgICAgICAgICAgIGdlb0JCb3ggOiB7XG4gICAgICAgICAgICAgICAgbGVmdCA6IC05Ljg2LFxuICAgICAgICAgICAgICAgIGJvdHRvbSA6IDQxLjE1LFxuICAgICAgICAgICAgICAgIHJpZ2h0IDogMTAuMzgsXG4gICAgICAgICAgICAgICAgdG9wIDogNTEuNTZcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwge1xuICAgICAgICAgICAgbGFiZWwgOiBcIkxhbWJlcnQgSUkgXFx1MDBlOXRlbmR1XCIsXG4gICAgICAgICAgICBjcnMgOiBDUlMuRVBTRzI3NTcyLFxuICAgICAgICAgICAgdHlwZSA6IFwiTWV0cmljXCIsXG4gICAgICAgICAgICBnZW9CQm94IDoge1xuICAgICAgICAgICAgICAgIGxlZnQgOiAtNC44NyxcbiAgICAgICAgICAgICAgICBib3R0b20gOiA0Mi4zMyxcbiAgICAgICAgICAgICAgICByaWdodCA6IDguMjMsXG4gICAgICAgICAgICAgICAgdG9wIDogNTEuMTRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfV07XG5cbiAgICAgICAgdmFyIHN5c3RlbXMgPSB0aGlzLm9wdGlvbnMuc3lzdGVtcztcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBzeXN0ZW1zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAvLyBkZWZpbml0aW9uIGQndW4gc3lzdGVtZSBkZSByZWZlcmVuY2VcbiAgICAgICAgICAgIHZhciBzeXMgPSBzeXN0ZW1zW2ldO1xuXG4gICAgICAgICAgICBpZiAoIXN5cy5sYWJlbCkge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5lcnJvcihcIm5vdCBkZWZpbmVkICFcIik7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghc3lzLmNycykge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5lcnJvcihcImNycyBub3QgZGVmaW5lZCAhXCIpO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIXN5cy50eXBlKSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLndhcm4oXCJ0eXBlIHNycyBub3QgZGVmaW5lZCwgdXNlICdNZXRyaWMnIGJ5IGRlZmF1bHQgIVwiKTtcbiAgICAgICAgICAgICAgICBzeXMudHlwZSA9IFwiTWV0cmljXCI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuX3Byb2plY3Rpb25TeXN0ZW1zLnB1c2goc3lzdGVtc1tpXSk7XG5cbiAgICAgICAgICAgIC8vIGl0J3MgYSBqdXN0IGEgdGVzdCAuLi5cbiAgICAgICAgICAgIHZhciBmb3VuZCA9IGZhbHNlO1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBwcm9qZWN0aW9uU3lzdGVtc0J5RGVmYXVsdC5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIHZhciBvYmogPSBwcm9qZWN0aW9uU3lzdGVtc0J5RGVmYXVsdFtqXTtcbiAgICAgICAgICAgICAgICBpZiAoc3lzLmNycyA9PT0gb2JqLmNycykge1xuICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGxvZ2dlci5pbmZvKFwiY3JzICd7fScgYWxyZWFkeSBjb25maWd1cmVkIGJ5IGRlZmF1bHRcIiwgb2JqLmNvZGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghZm91bmQpIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIuaW5mbyhcImNycyAne30nIG5vdCBmb3VuZCwgaXQncyBhIG5ldyBwcm9qZWN0aW9uXCIsIHN5cy5jb2RlIHx8IHN5cy5sYWJlbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBhdSBjYXMgb8O5Li4uXG4gICAgICAgIGlmICh0aGlzLl9wcm9qZWN0aW9uU3lzdGVtcy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIHRoaXMuX3Byb2plY3Rpb25TeXN0ZW1zID0gcHJvamVjdGlvblN5c3RlbXNCeURlZmF1bHQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyByZS1pbml0aWxpc2F0aW9uIGRlcyBjb2RlcyBwb3VyIGdlcmVyIGxlIGxpZW4gZW50cmUgX3Byb2plY3Rpb25TeXN0ZW1zIGV0IHNlbGVjdCBkdSBtb3VzZSBwb3NpdGlvbiAobGllbiBjb2RlL3ZhbHVlKVxuICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IHRoaXMuX3Byb2plY3Rpb25TeXN0ZW1zLmxlbmd0aDsgKytrKSB7XG4gICAgICAgICAgICB0aGlzLl9wcm9qZWN0a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gICAgICAgICAgICAgICBmb3JtYXQgOiB0aGlzLl9kaXNwbGF5RE1TXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgY29kZSA6IFwiUkFEXCIsXG4gICAgICAgICAgICAgICAgbGFiZWwgOiBcInJhZGlhbnNcIixcbiAgICAgICAgICAgICAgICBmb3JtYXQgOiB0aGlzLl9kaXNwbGF5UkFEXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgY29kZSA6IFwiR09OXCIsXG4gICAgICAgICAgICAgICAgbGFiZWwgOiBcImdyYWRlc1wiLFxuICAgICAgICAgICAgICAgIGZvcm1hdCA6IHRoaXMuX2Rpc3BsYXlHT05cbiAgICAgICAgICAgIH1dLFxuICAgICAgICAgICAgTWV0cmljIDogW3tcbiAgICAgICAgICAgICAgICBjb2RlIDogXCJNXCIsXG4gICAgICAgICAgICAgICAgbGFiZWwgOiBcIm3DqHRyZXNcIixcbiAgICAgICAgICAgICAgICBmb3JtYXQgOiB0aGlzLl9kaXNwbGF5TWV0ZXJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBjb2RlIDogXCJLTVwiLFxuICAgICAgICAgICAgICAgIGxhYmVsIDogXCJraWxvbcOodHJlc1wiLFxuICAgICAgICAgICAgICAgIGZvcm1hdCA6IHRoaXMuX2Rpc3BsYXlLTWV0ZXJcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH07XG5cbiAgICAgICAgdmFyIHVuaXRzID0gdGhpcy5vcHRpb25zLnVuaXRzO1xuXG4gICAgICAgIGZvciAodmFyIHR5cGUgaW4gcHJvamVjdGlvblVuaXRzQnlEZWZhdWx0KSB7XG4gICAgICAgICAgICBpZiAocHJvamVjdGlvblVuaXRzQnlEZWZhdWx0Lmhhc093blByb3BlcnR5KHR5cGUpKSB7XG4gICAgICAgICAgICAgICAgdmFyIGZvdW5kID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBwcm9qZWN0aW9uVW5pdHNCeURlZmF1bHRbdHlwZV0ubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG9iaiA9IHByb2plY3Rpb25Vbml0c0J5RGVmYXVsdFt0eXBlXVtqXTtcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB1bml0cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVuaXQgPSB1bml0c1tpXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvYmouY29kZSA9PT0gdW5pdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX3Byb2plY3Rpb25Vbml0c1t0eXBlXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9wcm9qZWN0aW9uVW5pdHNbdHlwZV0gPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcHJvamVjdGlvblVuaXRzW3R5cGVdLnB1c2gob2JqKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWZvdW5kKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3Byb2plY3Rpb25Vbml0c1t0eXBlXSA9IHByb2plY3Rpb25Vbml0c0J5RGVmYXVsdFt0eXBlXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBhdSBjYXMgb8O5Li4uXG4gICAgICAgIGlmIChPYmplY3Qua2V5cyh0aGlzLl9wcm9qZWN0aW9uVW5pdHMpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgdGhpcy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ybWF0ZXIucm91bmRUb0RlY2ltYWwob0xhdExuZy5sYXQsIDYpO1xuICAgICAgICBjb29yZGluYXRlLmxuZyA9IFBvc2l0aW9uRm9ybWF0ZXIucm91bmRUb0RlY2ltYWwob0xhdExuZy5sbmcsIDYpO1xuICAgICAgICBjb29yZGluYXRlLnVuaXQgPSBcIsKwXCI7XG4gICAgICAgIHJldHVybiBjb29yZGluYXRlO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBkZWdyZWVkZWNpbWFsMnNleGFnZWNpbWFsXG4gICAgICogQHBhcmFtIHtPYmplY3R9IG9MYXRMbmcgLSBjb29yZGluYXRlc1xuICAgICAqXG4gICAgICogQHJldHVybnMge09iamVjdH0gY29vcmRpbmF0ZXMgaW4gRE1TXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBfZGlzcGxheURNUyA6IGZ1bmN0aW9uIChvTGF0TG5nKSB7XG4gICAgICAgIHZhciBjb29yZGluYXRlID0ge307XG4gICAgICAgIGNvb3JkaW5hdGUubGF0ID0gUG9zaXRpb25Gb3JtYXRlci5kZWNpbWFsTGF0VG9ETVMob0xhdExuZy5sYXQsIHRydWUpO1xuICAgICAgICBjb29yZGluYXRlLmxuZyA9IFBvc2l0aW9uRm9ybWF0ZXIuZGVjaW1hbExvblRvRE1TKG9MYXRMbmcubG5nLCB0cnVlKTtcbiAgICAgICAgcmV0dXJuIGNvb3JkaW5hdGU7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIGRlZ3JlZWRlY2ltYWwycmFkaWFuXG4gICAgICogQHBhcmFtIHtPYmplY3R9IG9MYXRMbmcgLSBjb29yZGluYXRlc1xuICAgICAqXG4gICAgICogQHJldHVybnMge09iamVjdH0gY29vcmRpbmF0ZXMgaW4gcmFkaWFuXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBfZGlzcGxheVJBRCA6IGZ1bmN0aW9uIChvTGF0TG5nKSB7XG4gICAgICAgIHZhciBjb29yZGluYXRl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E1NCBvdSBwcm9qZWN0aW9uLnByb2plY3QobGF0bG5nKVxuICAgICAgICAvLyAtIExBTUIyRSA6IEwuR2VvcG9ydGFsQ1JTLkVQU0cyNzU3MiBvdSBwcm9qZWN0aW9uLnByb2plY3QobGF0bG5nKVxuICAgICAgICAvLyAtIE1FUkNBVE9SIG91IEVQU0c6MzM5NSA6IEwuQ1JTLkVQU0czMzk1IG91IEwuUHJvamVjdGlvbi5NZXJjYXRvci5wcm9qZWN0KGxhdGxuZylcblxuICAgICAgICBpZiAodHlwZW9mIGNycyA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAvLyBcImNycyBpcyBhbiBmdW5jdGlvbiAhXCIuLi4gZW4gbW9kZSBBTUQgIVxuICAgICAgICAgICAgY3JzID0gY3JzKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZW9mIGNycyAhPT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgbG9nZ2VyLmxvZyhcImNycyBpcyBub3QgYW4gb2JqZWN0ICFcIik7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBwYXMgZGUgcmVwcm9qZWN0aW9uIHBvdXIgbGUgc3lzdGVtZSBkZSBwcm9qZWN0aW9uIG5hdGlmICFcbiAgICAgICAgaWYgKGNycyA9PT0gTC5DUlMuU2ltcGxlKSB7XG4gICAgICAgICAgICByZXR1cm4gb0xhdExuZztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghY3JzLnByb2plY3Rpb24gfHwgdHlwZW9mIGNycy5wcm9qZWN0aW9uICE9PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICBsb2dnZXIuZXJyb3IoXCJwcm9qZWN0aW9uIGlzIG5vdCBhbiBvYmplY3QgIVwiKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBvUG9pbnQgPSBjcnMucHJvamVjdGlvbi5wcm9qZWN0KG9MYXRMbm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i4gZW4gbW9kZSBBTUQgIVxuICAgICAgICAgICAgb1NycyA9IG9TcnMoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0eXBlb2Ygb1NycyAhPT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgbG9nZ2VyLmxvZyhcImNycyBpcyBub3QgYW4gb2JqZWN0ICFcIik7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBwYXMgZGUgcmVwcm9qZWN0aW9uIHBvdXIgbGUgc3lzdGVtZSBkZSBwcm9qZWN0aW9uIG5hdGlmICFcbiAgICAgICAgaWYgKG9TcnMgPT09IEwuQ1JTLlNpbXBsZSkge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBsYXQgOiBvWFkueSxcbiAgICAgICAgICAgICAgICBsbmcgOiBvWFkueFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLl9jdXJyZW50UHJvamVjdGlvblR5cGUgPT09IFwiR2VvZ3JhcGhpY2FsXCIpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgbGF0IDogb1hZLnksXG4gICAgICAgICAgICAgICAgbG5nIDogb1hZLnhcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIW9TcnMucHJvamVjdGlvbiB8fCB0eXBlb2Ygb1Nycy5wcm9qZWN0aW9uICE9PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICBsb2dnZXIuZXJyb3IoXCJwcm9qZWN0aW9uIGlzIG5vdCBhbiBvYmplY3QgIVwiKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBvTGF0TG5nID0gb1Nycy5wcm9qZWN0aW9uLnVucHJvamVjdChvWFkpO1xuXG4gICAgICAgIGlmICghb0xhdExuZyB8fCBPYmplY3Qua2V5cyhvTGF0TG5nKS5sZW5nd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ZWwoZmFsc2UpO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSBldmVudCAnY2xpY2snIG9uIGlucHV0IGNvb3JkaW5hdGVcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7Qm9vbGVhbn0gZWRpdGluZyAtIGVkaXRpbmcgbW9kZVxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgb25Nb3VzZVBvc2l0aW9uRWRpdE1vZGVDbGljayA6IGZ1bmN0aW9uIChlZGl0aW5nKSB7XG4gICAgICAgIGlmICghdGhpcy5vcHRpb25zLmVkaXRDb29yZGluYXRlcykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuX2lzRWRpdGluZyA9PT0gZWRpdGluZykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5faXNFZGl0aW5nID0gZWRpdGluZztcblxuICAgICAgICAvLyBBZmZpY2hhZ2UgZGVzIG91dGlscywgaW5wdXQgZW4gZWNyaXR1cmVcbiAgICAgICAgdGhpcy5fc2V0RWRpdE1vZGUodGhpcy5faXNFZGl0aW5nKTtcblxuICAgICAgICB2YXIgbWFwID0gdGhpcy5fbWFwO1xuXG4gICAgICAgIGlmICh0aGlzLl9pc0Rlc2t0b3ApIHtcbiAgICAgICAgICAgICh0aGlzLl9pc0VkaXRpbmcpXG4gICAgICAgICAgICAgICAgPyBtYXAub2ZmKFwibW91c2Vtb3ZlXCIsIHRoaXMub25Nb3VzZU1vdmUsIHRoaXMpXG4gICAgICAgICAgICAgICAgOiBtYXAub24oXCJtb3VzZW1vdmVcIiwgdGhpcy5vbk1vdXNlTW92ZSwgdGhpcyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAodGhpcy5faXNFZGl0aW5nKVxuICAgICAgICAgICAgICAgID8gbWFwLm9mZihcIm1vd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2VvQkJveCkge1xuICAgICAgICAgICAgLy8gY2hlY2sgaWYgY29vcmRpbmF0ZXMgYXJlIGluIHRoZSBleHRlbnRcblxuICAgICAgICAgICAgdmFyIGV4dGVudCA9IFtnZW9CQm94LmxlZnQsIGdlb0JCb3guYm90dG9tLCBnZW9CQm94LnJpZ2h0LCBnZW9CQm94LnRvcF07XG4gICAgICAgICAgICB2YXIgdW5pdCA9IHRoaXMuX2N1cnJlbnRQcm9qZWN0aW9uVW5pdHM7XG5cbiAgICAgICAgICAgIC8vIG9uIGNvbnZlcnRpdCB1biBwb2ludC4uLiwgbWFpcyBvbiBuJ2EgcGFzIGRlIGZvbmN0aW9uXG4gICAgICAgICAgICAvLyBkZSBjb252ZXJzaW9uIGNvbW1lIHBvdXIgb3BlbmxheWVycy4uLlxuICAgICAgICAgICAgdmFyIG9MYXRMb24gPSB0aGlzLl91bnByb2plY3Qoe1xuICAgICAgICAgICAgICAgIHggOiAoY29vcmRUeXBlID09PSBcIkxvblwiKSA/IHRoaXMuX2NvbnZlcnRDb29yZGluYXRlKHZhbHVlLCB1bml0KSA6IDAsXG4gICAgICAgICAgICAgICAgeSA6IChjb29yZFR5cGUgPT09IFwiTGF0XCIpID8gdGhpcy5fY29udmVydENvb3JkaW5hdGUodmFsdWUsIHVuaXQpIDogMFxuXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgaWYgKGNvb3JkVHlwZSA9PT0gXCJMb25cIiAmJiAob0xhdExvbi5sbmcgPCBleHRlbnRbMF0gfHwgb0xhdExvbi5sbmcgPiBleHRlbnRbMl0pKSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLndhcm4oXCJjb29yZGluYXRlcyAobG9uKSBvdXQgb2YgZXh0ZW50ICE/XCIpO1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChjb29yZFR5cGUgPT09IFwiTGF0XCIgJiYgKG9MYXRMb24ubGF0IDwgZX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9tID0gTC5Eb21VdGlsLmdldCh0aGlzLl9hZGRVSUQoXCJHUG1vdXNlUG9zaXRpb25MYXRcIikpLnZhbHVlO1xuICAgICAgICBsYXRYRG9tID0gbGF0WERvbS5yZXBsYWNlKFwiLFwiLCBcIi5cIik7XG4gICAgICAgIGxhdFhEb20gPSBwYXJzZUZsb2F0KGxhdFhEb20pO1xuICAgICAgICBpZiAoaXNOYU4obGF0WERvbSkpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBsb24gPSBudWxsO1xuICAgICAgICB2YXIgbGF0ID0gbnVsbDtcbiAgICAgICAgdmFyIHggPSBudWxsO1xuICAgICAgICB2YXIgeSA9IG51bGw7XG5cbiAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRQcm9qZWN0aW9uVHlwZSA9PT0gXCJHZW9ncmFwaGljYWxcIikge1xuICAgICAgICAgICAgbG9uID0gbG9uWURvbTtcbiAgICAgICAgICAgIGxhdCA9IGxhdFhEb207XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB4ID0gbGF0WERvbTtcbiAgICAgICAgICAgIHkgPSBsb25ZRG9tO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCF0aGlzLnZhbGlkYXRlRXh0ZW50Q29vcmRpbmF0ZShcIkxvblwiLCBsb24gfHwgeCkpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdGhpcy52YWxpZGF0ZUV4dGVudENvb3JkaW5hdGUoXCJMYXRcIiwgbGF0IHx8IHkpKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdW5pdCA9IHRoaXMuX2N1cnJlbnRQcm9qZWN0aW9uVW5pdHM7XG4gICAgICAgIHZhciBvTGF0TG9uID0gdGhpcy5fdW5wcm9qZWN0KHtcbiAgICAgICAgICAgIHggOiB0aGlzLl9jb252ZXJ0Q29vcmRpbm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gICAgICAgIC8vIGFkZCBzeXN0ZW1zIHdob3NlIGV4dGVudCBpbnRlcnNlY3RzIHRoZSBtYXAgZXh0ZW50XG4gICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGhpcy5fcHJvamVjdGlvblN5c3RlbXMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIHZhciBwcm9qID0gdGhpcy5fcHJvamVjdGlvblN5c3RlbXNbal07XG4gICAgICAgICAgICB2YXIgb3B0aW9uID0gbnVsbDtcblxuICAgICAgICAgICAgaWYgKHByb2ouZ2VvQkJveCkge1xuICAgICAgICAgICAgICAgIC8vIGJib3hlcyBpbnRlcnNlY3Rpb24gdGVzdFxuICAgICAgICAgICAgICAgIGlmIChtYXAuZ2V0Qm91bmRzKCkuX3NvdXRoV2VzdC5sbmcgPiBwcm9qLmdlb0JCb3gucmlnaHQgfHxcbiAgICAgICAgICAgICAgICAgICAgbWFwLmdldEJvdW5kcygpLl9zb3V0aFdlc3QubGF0ID4gcHJvai5nZW9CQm94LnRvcCB8fFxuICAgICAgICAgICAgICAgICAgICBtYXAuZ2V0Qm91bmRzKCkuX25vcnRoRWFzdC5sbmcgPCBwcm9qLmdlb0JCb3gubGVmdCB8fFxuICAgICAgICAgICAgICAgICAgICBtYXAuZ2V0Qm91bmRzKCkuX25vcnRoRWFzdC5sYXQgPCBwcm9qLmdlb0JCb3guYm90dG9tXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwcm9qID09PSB0aGlzLl9jdXJyZW50UHJvamVjdGlvblN5c3RlbXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJvcHRpb25cIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb24udmFsdWUgPSBwcm9qLmNvZGU7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb24udGV4dCA9IHByb2oubGFiZWwgfHwgajtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbi5zZXRBdHRyaWJ1dGUoXCJzZWxlY3RlZFwiLCBcInNlbGVjdGVkXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uLnNldEF0dHJpYnV0ZShcImRpc2FibGVkXCIsIFwiZGlzYWJsZWRcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHN5c3RlbUxpc3QuYXBwZW5kQ2hpbGQob3B0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsgLy8gZG8gbm90IGludGVyc2VjdFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG9wdGlvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJvcHRpb25cIik7XG4gICAgICAgICAgICBvcHRpb24udmFsdWUgPSBwcm9qLmNvZGU7XG4gICAgICAgICAgICBvcHRpb24udGV4dCA9IHByb2oubGFiZWwgfHwgajtcbiAgICAgICAgICAgIGlmIChwcm9qID09PSB0aGlzLl9jdXJyZW50UHJvamVjdGlvblN5c3RlbXMpIHtcbiAgICAgICAgICAgICAgICBvcHRpb24uc2V0QXR0cmlidXRlKFwic2VsZWN0ZWRcIiwgXCJzZWxlY3RlZFwiKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc3lzdGVtTGlzdC5hcHBlbmRDaGlsZChvcHRpb24pO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSBldmVudCAnY2hhbmdlJyBvbiAnR1Btb3VzZVBvc2l0aW9uUHJvamVjdGlvblVuaXRzJ1xuICAgICAqIHRhZyBzZWxlY3QgKGNmLiB0aGlzLl9jcmVhdGVNb3VzZVBvc2l0aW9uU2V0dGluZ3NFbGVtZW50KSxcbiAgICAgKiBhbmQgc2VsZWN0cyB0aGUgdW5pdH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b3NpdGlvbiAtIHBvc2l0aW9uID0ge2xvbjogLCBsYXQ6IH1cbiAgICAgKiBAcGFyYW0ge051bWJlcn0gem9vbSAtIHpvb21cbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb3B0aW9ucyAtIFpvb20vcGFuIG9wdGlvbnNcbiAgICAgKi9cbiAgICBtb3ZlVG8gOiBmdW5jdGlvbiAocG9zaXRpb24sIHpvb20sIG9wdGlvbnMpIHtcbiAgICAgICAgaWYgKCF0aGlzLl9zaG93Q29udGFpbmVyLmNoZWNrZWQpIHtcbiAgICAgICAgICAgIHRoaXMuX3BpY3RvQ29udGFpbmVyLmNsaWNrKCk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgbWFwID0gdGhpcy5fbWFwO1xuICAgICAgICBpZiAoIW1hcCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5vbk1vdXNlTW92ZSh7XG4gICAgICAgICAgICBsYXRsbmcgOiBwb3NpdGlvblxuICAgICAgICB9KTtcblxuICAgICAgICBtYXAuZmx5VG8ocG9zaXRpb24sIHpvb20gfHwgMTAsIG9wdGlvbnMgfHwge30pO1xuICAgIH1cbn0pO1xuXG5leHBvcnQgZGVmYXVsdCBNb3VzZVBvc2l0aW9uO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/MousePosition.js\n"); /***/ }), diff --git a/current/dist/leaflet/GpPluginLeaflet-src.css b/current/dist/leaflet/GpPluginLeaflet-src.css index 176b7de71..f0de31a41 100644 --- a/current/dist/leaflet/GpPluginLeaflet-src.css +++ b/current/dist/leaflet/GpPluginLeaflet-src.css @@ -9,8 +9,8 @@ * @copyright copyright (c) IGN * @license CeCILL-B * @author IGN - * @version 2.3.3 - * @date 21/07/2023 + * @version 2.3.4 + * @date 30/08/2023 * */ diff --git a/current/dist/leaflet/GpPluginLeaflet-src.js b/current/dist/leaflet/GpPluginLeaflet-src.js index 21d23b94d..a6f428e9d 100644 --- a/current/dist/leaflet/GpPluginLeaflet-src.js +++ b/current/dist/leaflet/GpPluginLeaflet-src.js @@ -9,8 +9,8 @@ * @copyright copyright (c) IGN * @license CeCILL-B * @author IGN - * @version 2.3.3 - * @date 21/07/2023 + * @version 2.3.4 + * @date 30/08/2023 * */ @@ -327,7 +327,7 @@ leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalCRS.EPSG4326 = _CRS_CRS_ /* 1 */ /***/ (function(module) { -module.exports = JSON.parse("{\"name\":\"geoportal-extensions\",\"description\":\"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries\",\"version\":\"2.8.3\",\"date\":\"21/07/2023\",\"leafletExtName\":\"French Geoportal Extension for Leaflet\",\"leafletExtVersion\":\"2.3.3\",\"olExtName\":\"French Geoportal Extension for OpenLayers\",\"olExtVersion\":\"3.3.2\",\"itownsExtName\":\"French Geoportal Extension for Itowns\",\"itownsExtVersion\":\"2.4.1\",\"main\":\"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js\",\"types\":\"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts\",\"module\":\"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js\",\"directories\":{},\"scripts\":{\"setup\":\"npm install\",\"clean\":\"echo \\\"Warning: target not yet implemented!\\\" && exit 0\",\"eslint\":\"eslint src/\",\"test\":\"npm run test:serve\",\"test:serve\":\"cd test && webpack-dev-server --hot --config webpack.test.serve.js\",\"sample\":\"npm run sample:serve\",\"sample:serve\":\"npm run sample:ol:serve\",\"sample:itowns:serve\":\"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path '/dist/itowns/' --port 9001 --open\",\"sample:leaflet:serve\":\"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path '/dist/leaflet/' --port 9001 --open\",\"sample:ol:serve\":\"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path '/dist/openlayers/' --port 9001 --open\",\"generate-types:ol\":\"npx tsc -p build/types/tsconfig-openlayers.json\",\"generate-types:leaflet\":\"npx tsc -p build/types/tsconfig-leaflet.json\",\"generate-types:itowns\":\"npx tsc -p build/types/tsconfig-itowns.json\",\"generate-jsdoc:ol\":\"jsdoc -c build/jsdoc/jsdoc-openlayers.json\",\"generate-jsdoc:leaflet\":\"jsdoc -c build/jsdoc/jsdoc-leaflet.json\",\"generate-jsdoc:itowns\":\"jsdoc -c build/jsdoc/jsdoc-itowns.json\",\"doc\":\"npm run doc:serve\",\"doc:serve\":\"npm run doc:ol:serve\",\"doc:itowns:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open\",\"doc:leaflet:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open\",\"doc:ol:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open\",\"build:dev\":\"npm-run-all --print-label --print-name build:*:dev\",\"build:prod\":\"npm-run-all --print-label --print-name build:*:prod\",\"build:src\":\"npm-run-all --print-label --print-name build:*:src\",\"build\":\"npm-run-all --print-label --print-name build:*:*\",\"build:itowns\":\"npm-run-all --print-label --print-name build:itowns:*\",\"build:itowns:dev\":\"webpack --config build/webpack/webpack.config.itowns --mode=development\",\"build:itowns:prod\":\"webpack --config build/webpack/webpack.config.itowns --mode=production\",\"build:itowns:src\":\"webpack --config build/webpack/webpack.config.itowns --mode=none\",\"build:ol\":\"npm-run-all --print-label --print-name build:ol:*\",\"build:ol:dev\":\"webpack --config build/webpack/webpack.config.openlayers --mode=development\",\"build:ol:prod\":\"webpack --config build/webpack/webpack.config.openlayers --mode=production\",\"build:ol:src\":\"webpack --config build/webpack/webpack.config.openlayers --mode=none\",\"build:leaflet\":\"npm-run-all --print-label --print-name build:leaflet:*\",\"build:leaflet:dev\":\"webpack --config build/webpack/webpack.config.leaflet --mode=development\",\"build:leaflet:prod\":\"webpack --config build/webpack/webpack.config.leaflet --mode=production\",\"build:leaflet:src\":\"webpack --config build/webpack/webpack.config.leaflet --mode=none\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/IGNF/geoportal-extensions.git\"},\"author\":\"IGNF\",\"keywords\":[\"geoportail\",\"javascript\",\"OpenLayers\",\"Leaflet\",\"Itowns\",\"3D\"],\"license\":\"CECILL-B\",\"bugs\":{\"url\":\"https://github.com/IGNF/geoportal-extensions/issues\"},\"homepage\":\"https://github.com/IGNF/geoportal-extensions#readme\",\"dependencies\":{\"@mapbox/mapbox-gl-style-spec\":\"13.20.1\",\"eventbusjs\":\"0.2.0\",\"geoportal-access-lib\":\"3.3.2\",\"itowns\":\"2.38.2\",\"leaflet\":\"1.7.1\",\"leaflet-draw\":\"1.0.4\",\"loglevel\":\"^1.6.7\",\"markdown-toc\":\"^1.2.0\",\"ol\":\"6.9.0\",\"ol-mapbox-style\":\"6.7.0\",\"proj4\":\"2.7.5\",\"proj4leaflet\":\"1.0.2\",\"sortablejs\":\"1.14.0\",\"three\":\"0.137.5\",\"typescript\":\"^4.5.5\",\"whatwg-fetch\":\"3.0.0\"},\"devDependencies\":{\"@babel/core\":\"^7.4.4\",\"@babel/plugin-transform-template-literals\":\"^7.7.4\",\"@babel/preset-env\":\"^7.4.4\",\"babel-loader\":\"^8.0.5\",\"chai\":\"^4.2.0\",\"chalk\":\"^4.0.0\",\"clean-webpack-plugin\":\"^3.0.0\",\"copy-webpack-plugin\":\"^5.0.3\",\"core-js\":\"^3.6.4\",\"css-loader\":\"^3.4.2\",\"eslint\":\"^6.8.0\",\"eslint-config-standard\":\"^14.1.1\",\"eslint-loader\":\"^4.0.0\",\"eslint-plugin-import\":\"^2.17.2\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"^4.1.1\",\"eslint-plugin-standard\":\"^4.0.0\",\"exports-loader\":\"^0.7.0\",\"expose-loader\":\"^0.7.5\",\"fs-extra\":\"^9.0.0\",\"handlebars\":\"^4.7.5\",\"handlebars-layouts\":\"^3.1.4\",\"html-webpack-plugin\":\"^4.0.4\",\"jsdoc-webpack-plugin\":\"^0.3.0\",\"mini-css-extract-plugin\":\"^0.9.0\",\"mocha\":\"^7.1.1\",\"mocha-loader\":\"^5.0.0\",\"npm-run-all\":\"^4.1.5\",\"optimize-css-assets-webpack-plugin\":\"^5.0.1\",\"path\":\"^0.12.7\",\"replace-bundle-webpack-plugin\":\"^1.0.0\",\"requirejs\":\"^2.3.6\",\"responsive-loader\":\"^1.2.0\",\"speed-measure-webpack-plugin\":\"^1.3.0\",\"string-template\":\"^1.0.0\",\"style-loader\":\"^1.1.3\",\"terser-webpack-plugin\":\"^2.0.0\",\"url-loader\":\"^4.0.0\",\"webpack\":\"^4.30.0\",\"webpack-cli\":\"^3.3.1\",\"webpack-dev-server\":\"^3.3.1\",\"webpack-node-externals\":\"^1.7.2\"}}"); +module.exports = JSON.parse("{\"name\":\"geoportal-extensions\",\"description\":\"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries\",\"version\":\"2.8.6\",\"date\":\"30/08/2023\",\"leafletExtName\":\"French Geoportal Extension for Leaflet\",\"leafletExtVersion\":\"2.3.4\",\"olExtName\":\"French Geoportal Extension for OpenLayers\",\"olExtVersion\":\"3.3.4\",\"itownsExtName\":\"French Geoportal Extension for Itowns\",\"itownsExtVersion\":\"2.4.3\",\"main\":\"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js\",\"types\":\"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts\",\"module\":\"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js\",\"directories\":{},\"scripts\":{\"setup\":\"npm install\",\"clean\":\"echo \\\"Warning: target not yet implemented!\\\" && exit 0\",\"eslint\":\"eslint src/\",\"test\":\"npm run test:serve\",\"test:serve\":\"cd test && webpack-dev-server --hot --config webpack.test.serve.js\",\"sample\":\"npm run sample:serve\",\"sample:serve\":\"npm run sample:ol:serve\",\"sample:itowns:serve\":\"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path '/dist/itowns/' --port 9001 --open\",\"sample:leaflet:serve\":\"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path '/dist/leaflet/' --port 9001 --open\",\"sample:ol:serve\":\"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path '/dist/openlayers/' --port 9001 --open\",\"generate-types:ol\":\"npx tsc -p build/types/tsconfig-openlayers.json\",\"generate-types:leaflet\":\"npx tsc -p build/types/tsconfig-leaflet.json\",\"generate-types:itowns\":\"npx tsc -p build/types/tsconfig-itowns.json\",\"generate-jsdoc:ol\":\"jsdoc -c build/jsdoc/jsdoc-openlayers.json\",\"generate-jsdoc:leaflet\":\"jsdoc -c build/jsdoc/jsdoc-leaflet.json\",\"generate-jsdoc:itowns\":\"jsdoc -c build/jsdoc/jsdoc-itowns.json\",\"doc\":\"npm run doc:serve\",\"doc:serve\":\"npm run doc:ol:serve\",\"doc:itowns:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open\",\"doc:leaflet:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open\",\"doc:ol:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open\",\"build:dev\":\"npm-run-all --print-label --print-name build:*:dev\",\"build:prod\":\"npm-run-all --print-label --print-name build:*:prod\",\"build:src\":\"npm-run-all --print-label --print-name build:*:src\",\"build\":\"npm-run-all --print-label --print-name build:*:*\",\"build:itowns\":\"npm-run-all --print-label --print-name build:itowns:*\",\"build:itowns:dev\":\"webpack --config build/webpack/webpack.config.itowns --mode=development\",\"build:itowns:prod\":\"webpack --config build/webpack/webpack.config.itowns --mode=production\",\"build:itowns:src\":\"webpack --config build/webpack/webpack.config.itowns --mode=none\",\"build:ol\":\"npm-run-all --print-label --print-name build:ol:*\",\"build:ol:dev\":\"webpack --config build/webpack/webpack.config.openlayers --mode=development\",\"build:ol:prod\":\"webpack --config build/webpack/webpack.config.openlayers --mode=production\",\"build:ol:src\":\"webpack --config build/webpack/webpack.config.openlayers --mode=none\",\"build:leaflet\":\"npm-run-all --print-label --print-name build:leaflet:*\",\"build:leaflet:dev\":\"webpack --config build/webpack/webpack.config.leaflet --mode=development\",\"build:leaflet:prod\":\"webpack --config build/webpack/webpack.config.leaflet --mode=production\",\"build:leaflet:src\":\"webpack --config build/webpack/webpack.config.leaflet --mode=none\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/IGNF/geoportal-extensions.git\"},\"author\":\"IGNF\",\"keywords\":[\"geoportail\",\"javascript\",\"OpenLayers\",\"Leaflet\",\"Itowns\",\"3D\"],\"license\":\"CECILL-B\",\"bugs\":{\"url\":\"https://github.com/IGNF/geoportal-extensions/issues\"},\"homepage\":\"https://github.com/IGNF/geoportal-extensions#readme\",\"dependencies\":{\"@mapbox/mapbox-gl-style-spec\":\"13.20.1\",\"eventbusjs\":\"0.2.0\",\"geoportal-access-lib\":\"3.3.4\",\"itowns\":\"2.38.2\",\"leaflet\":\"1.7.1\",\"leaflet-draw\":\"1.0.4\",\"loglevel\":\"^1.6.7\",\"markdown-toc\":\"^1.2.0\",\"ol\":\"6.9.0\",\"ol-mapbox-style\":\"6.7.0\",\"proj4\":\"2.7.5\",\"proj4leaflet\":\"1.0.2\",\"sortablejs\":\"1.14.0\",\"three\":\"0.137.5\",\"typescript\":\"^4.5.5\",\"whatwg-fetch\":\"3.0.0\"},\"devDependencies\":{\"@babel/core\":\"^7.4.4\",\"@babel/plugin-transform-template-literals\":\"^7.7.4\",\"@babel/preset-env\":\"^7.4.4\",\"babel-loader\":\"^8.0.5\",\"chai\":\"^4.2.0\",\"chalk\":\"^4.0.0\",\"clean-webpack-plugin\":\"^3.0.0\",\"copy-webpack-plugin\":\"^5.0.3\",\"core-js\":\"^3.6.4\",\"css-loader\":\"^3.4.2\",\"eslint\":\"^6.8.0\",\"eslint-config-standard\":\"^14.1.1\",\"eslint-loader\":\"^4.0.0\",\"eslint-plugin-import\":\"^2.17.2\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"^4.1.1\",\"eslint-plugin-standard\":\"^4.0.0\",\"exports-loader\":\"^0.7.0\",\"expose-loader\":\"^0.7.5\",\"fs-extra\":\"^9.0.0\",\"handlebars\":\"^4.7.5\",\"handlebars-layouts\":\"^3.1.4\",\"html-webpack-plugin\":\"^4.0.4\",\"jsdoc-webpack-plugin\":\"^0.3.0\",\"mini-css-extract-plugin\":\"^0.9.0\",\"mocha\":\"^7.1.1\",\"mocha-loader\":\"^5.0.0\",\"npm-run-all\":\"^4.1.5\",\"optimize-css-assets-webpack-plugin\":\"^5.0.1\",\"path\":\"^0.12.7\",\"replace-bundle-webpack-plugin\":\"^1.0.0\",\"requirejs\":\"^2.3.6\",\"responsive-loader\":\"^1.2.0\",\"speed-measure-webpack-plugin\":\"^1.3.0\",\"string-template\":\"^1.0.0\",\"style-loader\":\"^1.1.3\",\"terser-webpack-plugin\":\"^2.0.0\",\"url-loader\":\"^4.0.0\",\"webpack\":\"^4.30.0\",\"webpack-cli\":\"^3.3.1\",\"webpack-dev-server\":\"^3.3.1\",\"webpack-node-externals\":\"^1.7.2\"}}"); /***/ }), /* 2 */ @@ -6687,7 +6687,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37); /* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98); /* harmony import */ var _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(103); -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } @@ -8149,7 +8149,11 @@ function Config (options) { this.options.sync = options.sync || false; // gestion d'un tableau d'url des fichiers de configuration - this.options.listConfigUrls = (options.customConfigFile) ? [options.customConfigFile] : _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__["default"].Config.url(options.apiKey.split(",")); + this.options.listConfigUrls = (options.customConfigFile) + ? [options.customConfigFile] + : !Array.isArray(options.apiKey) + ? _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__["default"].Config.url(options.apiKey.split(",")) + : _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__["default"].Config.url(options.apiKey); } /** @@ -11697,7 +11701,7 @@ var DefaultUrlService = { /* 58 */ /***/ (function(module) { -module.exports = JSON.parse("{\"_from\":\"geoportal-access-lib@3.3.2\",\"_id\":\"geoportal-access-lib@3.3.2\",\"_inBundle\":false,\"_integrity\":\"sha512-YDQNRworHuZGLECBknikFW2u5abYqDw1zvXxdKIcRGheHdPENt6J3mxd/SYBALp6vHPwGKw53mD/idRP0Lh+XA==\",\"_location\":\"/geoportal-access-lib\",\"_phantomChildren\":{},\"_requested\":{\"type\":\"version\",\"registry\":true,\"raw\":\"geoportal-access-lib@3.3.2\",\"name\":\"geoportal-access-lib\",\"escapedName\":\"geoportal-access-lib\",\"rawSpec\":\"3.3.2\",\"saveSpec\":null,\"fetchSpec\":\"3.3.2\"},\"_requiredBy\":[\"/\"],\"_resolved\":\"https://registry.npmjs.org/geoportal-access-lib/-/geoportal-access-lib-3.3.2.tgz\",\"_shasum\":\"1b78a3eea7edf97f78af7aaec49f259d9753501a\",\"_spec\":\"geoportal-access-lib@3.3.2\",\"_where\":\"/home/runner/work/geoportal-extensions/geoportal-extensions\",\"author\":{\"name\":\"IGNF\"},\"bugs\":{\"url\":\"https://github.com/IGNF/geoportal-access-lib/issues\"},\"bundleDependencies\":false,\"date\":\"20/07/2023\",\"dependencies\":{\"es6-promise\":\"^4.2.4\",\"node-fetch\":\"^2.6.1\",\"xmldom\":\"^0.1.27\"},\"deprecated\":false,\"description\":\"French Geoportal resources access library\",\"devDependencies\":{\"@babel/core\":\"^7.12.10\",\"@babel/plugin-transform-template-literals\":\"^7.12.1\",\"@babel/preset-env\":\"^7.12.11\",\"babel-loader\":\"^8.2.2\",\"chai\":\"^4.1.2\",\"clean-webpack-plugin\":\"^3.0.0\",\"copy-webpack-plugin\":\"^5.1.2\",\"eslint\":\"^7.18.0\",\"eslint-config-standard\":\"^16.0.2\",\"eslint-loader\":\"^4.0.2\",\"eslint-plugin-import\":\"^2.22.1\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"^4.2.1\",\"eslint-plugin-standard\":\"^5.0.0\",\"glob\":\"^7.1.2\",\"handlebars-layouts\":\"^3.1.4\",\"handlebars-webpack-plugin\":\"^1.4.1\",\"html-webpack-plugin\":\"^4.5.1\",\"istanbul-instrumenter-loader\":\"^3.0.1\",\"jsdoc-webpack-plugin\":\"^0.3.0\",\"loglevel\":\"^1.6.1\",\"mocha\":\"^7.2.0\",\"mocha-loader\":\"^5.1.5\",\"mocha-webpack\":\"^2.0.0-beta.0\",\"mochawesome\":\"^6.2.1\",\"nyc\":\"^15.1.0\",\"path\":\"^0.12.7\",\"replace-bundle-webpack-plugin\":\"^1.0.0\",\"sinon\":\"^9.2.4\",\"sinon-es6\":\"0.0.3\",\"speed-measure-webpack-plugin\":\"^1.4.2\",\"string-template\":\"^1.0.0\",\"terser-webpack-plugin\":\"^2.3.8\",\"webpack\":\"^4.46.0\",\"webpack-cli\":\"^3.3.12\",\"webpack-dev-server\":\"^3.11.2\",\"webpack-node-externals\":\"^2.5.2\",\"webpack-shell-plugin\":\"^0.5.0\"},\"homepage\":\"https://github.com/IGNF/geoportal-access-lib#readme\",\"keywords\":[\"geoportail\",\"webservice\",\"javascript\",\"es6\"],\"license\":\"CECILL-B\",\"main\":\"dist/GpServices-src.js\",\"module\":\"src/Gp.js\",\"name\":\"geoportal-access-lib\",\"nyc\":{\"include\":[\"src/**/*.js\"],\"instrument\":false,\"sourceMap\":false},\"optionalDependencies\":{},\"peerDependencies\":{},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/IGNF/geoportal-access-lib.git\"},\"scripts\":{\"build\":\"webpack --mode=none\",\"build:dev\":\"webpack --mode=development\",\"build:prod\":\"webpack --mode=production\",\"clean\":\"echo \\\"Warning: no yet implemented!\\\" && exit 0\",\"cover\":\"nyc --reporter=lcov --reporter=text npm run test\",\"doc\":\"npm run doc:serve\",\"doc:serve\":\"webpack-dev-server --content-base jsdoc --port 9001 --open\",\"eslint\":\"eslint src/\",\"sample\":\"npm run sample:serve\",\"sample:serve\":\"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path '/dist/' --port 9001 --open\",\"sample:serve:dev\":\"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path '/dist/' --port 9001 --open\",\"sample:serve:prod\":\"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path '/dist/' --port 9001 --open\",\"setup\":\"npm install\",\"test\":\"mocha-webpack --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob \\\"test_*.js\\\" test/spec/\",\"test:end-to-end:serve\":\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js\",\"test:end-to-end:serve:docker\":\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js\",\"test:serve\":\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js\",\"test:serve:docker\":\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js\"},\"version\":\"3.3.2\"}"); +module.exports = JSON.parse("{\"_from\":\"geoportal-access-lib@3.3.4\",\"_id\":\"geoportal-access-lib@3.3.4\",\"_inBundle\":false,\"_integrity\":\"sha512-0D0YT93mRjhm7tvKC7tM0V/10CoftWqZ836AR/O79BEUwSk/CicmE85IK5NLh/sFclQX8hvaYexpn3ZetVbJWg==\",\"_location\":\"/geoportal-access-lib\",\"_phantomChildren\":{},\"_requested\":{\"type\":\"version\",\"registry\":true,\"raw\":\"geoportal-access-lib@3.3.4\",\"name\":\"geoportal-access-lib\",\"escapedName\":\"geoportal-access-lib\",\"rawSpec\":\"3.3.4\",\"saveSpec\":null,\"fetchSpec\":\"3.3.4\"},\"_requiredBy\":[\"/\"],\"_resolved\":\"https://registry.npmjs.org/geoportal-access-lib/-/geoportal-access-lib-3.3.4.tgz\",\"_shasum\":\"5a82701a7c12c54a40c4d0b5f2aa145acb22a434\",\"_spec\":\"geoportal-access-lib@3.3.4\",\"_where\":\"/home/runner/work/geoportal-extensions/geoportal-extensions\",\"author\":{\"name\":\"IGNF\"},\"bugs\":{\"url\":\"https://github.com/IGNF/geoportal-access-lib/issues\"},\"bundleDependencies\":false,\"date\":\"29/08/2023\",\"dependencies\":{\"es6-promise\":\"^4.2.4\",\"node-fetch\":\"^2.6.1\",\"xmldom\":\"^0.1.27\"},\"deprecated\":false,\"description\":\"French Geoportal resources access library\",\"devDependencies\":{\"@babel/core\":\"^7.12.10\",\"@babel/plugin-transform-template-literals\":\"^7.12.1\",\"@babel/preset-env\":\"^7.12.11\",\"babel-loader\":\"^8.2.2\",\"chai\":\"^4.1.2\",\"clean-webpack-plugin\":\"^3.0.0\",\"copy-webpack-plugin\":\"^5.1.2\",\"eslint\":\"^7.18.0\",\"eslint-config-standard\":\"^16.0.2\",\"eslint-loader\":\"^4.0.2\",\"eslint-plugin-import\":\"^2.22.1\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"^4.2.1\",\"eslint-plugin-standard\":\"^5.0.0\",\"glob\":\"^7.1.2\",\"handlebars-layouts\":\"^3.1.4\",\"handlebars-webpack-plugin\":\"^1.4.1\",\"html-webpack-plugin\":\"^4.5.1\",\"istanbul-instrumenter-loader\":\"^3.0.1\",\"jsdoc-webpack-plugin\":\"^0.3.0\",\"loglevel\":\"^1.6.1\",\"mocha\":\"^7.2.0\",\"mocha-loader\":\"^5.1.5\",\"mocha-webpack\":\"^2.0.0-beta.0\",\"mochawesome\":\"^6.2.1\",\"nyc\":\"^15.1.0\",\"path\":\"^0.12.7\",\"replace-bundle-webpack-plugin\":\"^1.0.0\",\"sinon\":\"^9.2.4\",\"sinon-es6\":\"0.0.3\",\"speed-measure-webpack-plugin\":\"^1.4.2\",\"string-template\":\"^1.0.0\",\"terser-webpack-plugin\":\"^2.3.8\",\"webpack\":\"^4.46.0\",\"webpack-cli\":\"^3.3.12\",\"webpack-dev-server\":\"^3.11.2\",\"webpack-node-externals\":\"^2.5.2\",\"webpack-shell-plugin\":\"^0.5.0\"},\"homepage\":\"https://github.com/IGNF/geoportal-access-lib#readme\",\"keywords\":[\"geoportail\",\"webservice\",\"javascript\",\"es6\"],\"license\":\"CECILL-B\",\"main\":\"dist/GpServices-src.js\",\"module\":\"src/Gp.js\",\"name\":\"geoportal-access-lib\",\"nyc\":{\"include\":[\"src/**/*.js\"],\"instrument\":false,\"sourceMap\":false},\"optionalDependencies\":{},\"peerDependencies\":{},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/IGNF/geoportal-access-lib.git\"},\"scripts\":{\"build\":\"webpack --mode=none\",\"build:dev\":\"webpack --mode=development\",\"build:prod\":\"webpack --mode=production\",\"clean\":\"echo \\\"Warning: no yet implemented!\\\" && exit 0\",\"cover\":\"nyc --reporter=lcov --reporter=text npm run test\",\"doc\":\"npm run doc:serve\",\"doc:serve\":\"webpack-dev-server --content-base jsdoc --port 9001 --open\",\"eslint\":\"eslint src/\",\"sample\":\"npm run sample:serve\",\"sample:serve\":\"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path '/dist/' --port 9001 --open\",\"sample:serve:dev\":\"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path '/dist/' --port 9001 --open\",\"sample:serve:prod\":\"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path '/dist/' --port 9001 --open\",\"setup\":\"npm install\",\"test\":\"mocha-webpack --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob \\\"test_*.js\\\" test/spec/\",\"test:end-to-end:serve\":\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js\",\"test:end-to-end:serve:docker\":\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js\",\"test:serve\":\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js\",\"test:serve:docker\":\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js\"},\"version\":\"3.3.4\"}"); /***/ }), /* 59 */ @@ -11904,7 +11908,7 @@ ConfigInterface.prototype = { const wmsTypeRegex = /\/v\//; // WMS vector style always empty (not in getCap) if (wmsTypeRegex.test(params.url)) { - params.styles = ""; + params.styles = " "; } else { // WMS raster style is defined in getCap params.styles = layerConf.styles[0].name; @@ -20869,7 +20873,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(106); /* harmony import */ var _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(101); /* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(107); -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } @@ -22321,7 +22325,7 @@ var MathUtils = { "use strict"; __webpack_require__.r(__webpack_exports__); -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var MousePositionDOM = { /** * Add uuid to the tag ID @@ -42446,7 +42450,7 @@ var SearchEngineDOM = { "use strict"; __webpack_require__.r(__webpack_exports__); -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } /** * @module Utils * @alias Gp.olUtils diff --git a/current/dist/leaflet/GpPluginLeaflet.css b/current/dist/leaflet/GpPluginLeaflet.css index 3c8004777..9eac3034f 100644 --- a/current/dist/leaflet/GpPluginLeaflet.css +++ b/current/dist/leaflet/GpPluginLeaflet.css @@ -9,8 +9,8 @@ * @copyright copyright (c) IGN * @license CeCILL-B * @author IGN - * @version 2.3.3 - * @date 21/07/2023 + * @version 2.3.4 + * @date 30/08/2023 * */ diff --git a/current/dist/leaflet/GpPluginLeaflet.js b/current/dist/leaflet/GpPluginLeaflet.js index 880ee1583..e12b6e7a3 100644 --- a/current/dist/leaflet/GpPluginLeaflet.js +++ b/current/dist/leaflet/GpPluginLeaflet.js @@ -9,8 +9,8 @@ * @copyright copyright (c) IGN * @license CeCILL-B * @author IGN - * @version 2.3.3 - * @date 21/07/2023 + * @version 2.3.4 + * @date 30/08/2023 * */ /*! @@ -81,7 +81,7 @@ * See https://raw.githubusercontent.com/proj4js/proj4js/master/LICENSE.md * @version 2.7.5 */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("leaflet"),require("node-fetch"),require("xmldom")):"function"==typeof define&&define.amd?define("Gp",["leaflet","require","require"],e):"object"==typeof exports?exports.Gp=e(require("leaflet"),require("node-fetch"),require("xmldom")):t.Gp=e(t.L,t[void 0],t[void 0])}(this,(function(t,e,i){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=42)}([function(e,i){e.exports=t},function(t,e,i){"use strict";(function(t){var i={configuration:{},isConfigLoaded:function(){if(this.configuration&&0!==Object.keys(this.configuration).length)return!0;var e="undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==t?t:{};return!!(e.Gp&&e.Gp.Config&&e.Gp.Config.layers&&0!==Object.keys(e.Gp.Config.layers).length)&&(this.configuration=e.Gp.Config,!0)}};e.a=i}).call(this,i(5))},function(t){t.exports=JSON.parse('{"name":"geoportal-extensions","description":"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries","version":"2.8.3","date":"21/07/2023","leafletExtName":"French Geoportal Extension for Leaflet","leafletExtVersion":"2.3.3","olExtName":"French Geoportal Extension for OpenLayers","olExtVersion":"3.3.2","itownsExtName":"French Geoportal Extension for Itowns","itownsExtVersion":"2.4.1","main":"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js","types":"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts","module":"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js","directories":{},"scripts":{"setup":"npm install","clean":"echo \\"Warning: target not yet implemented!\\" && exit 0","eslint":"eslint src/","test":"npm run test:serve","test:serve":"cd test && webpack-dev-server --hot --config webpack.test.serve.js","sample":"npm run sample:serve","sample:serve":"npm run sample:ol:serve","sample:itowns:serve":"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path \'/dist/itowns/\' --port 9001 --open","sample:leaflet:serve":"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path \'/dist/leaflet/\' --port 9001 --open","sample:ol:serve":"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path \'/dist/openlayers/\' --port 9001 --open","generate-types:ol":"npx tsc -p build/types/tsconfig-openlayers.json","generate-types:leaflet":"npx tsc -p build/types/tsconfig-leaflet.json","generate-types:itowns":"npx tsc -p build/types/tsconfig-itowns.json","generate-jsdoc:ol":"jsdoc -c build/jsdoc/jsdoc-openlayers.json","generate-jsdoc:leaflet":"jsdoc -c build/jsdoc/jsdoc-leaflet.json","generate-jsdoc:itowns":"jsdoc -c build/jsdoc/jsdoc-itowns.json","doc":"npm run doc:serve","doc:serve":"npm run doc:ol:serve","doc:itowns:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open","doc:leaflet:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open","doc:ol:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open","build:dev":"npm-run-all --print-label --print-name build:*:dev","build:prod":"npm-run-all --print-label --print-name build:*:prod","build:src":"npm-run-all --print-label --print-name build:*:src","build":"npm-run-all --print-label --print-name build:*:*","build:itowns":"npm-run-all --print-label --print-name build:itowns:*","build:itowns:dev":"webpack --config build/webpack/webpack.config.itowns --mode=development","build:itowns:prod":"webpack --config build/webpack/webpack.config.itowns --mode=production","build:itowns:src":"webpack --config build/webpack/webpack.config.itowns --mode=none","build:ol":"npm-run-all --print-label --print-name build:ol:*","build:ol:dev":"webpack --config build/webpack/webpack.config.openlayers --mode=development","build:ol:prod":"webpack --config build/webpack/webpack.config.openlayers --mode=production","build:ol:src":"webpack --config build/webpack/webpack.config.openlayers --mode=none","build:leaflet":"npm-run-all --print-label --print-name build:leaflet:*","build:leaflet:dev":"webpack --config build/webpack/webpack.config.leaflet --mode=development","build:leaflet:prod":"webpack --config build/webpack/webpack.config.leaflet --mode=production","build:leaflet:src":"webpack --config build/webpack/webpack.config.leaflet --mode=none"},"repository":{"type":"git","url":"https://github.com/IGNF/geoportal-extensions.git"},"author":"IGNF","keywords":["geoportail","javascript","OpenLayers","Leaflet","Itowns","3D"],"license":"CECILL-B","bugs":{"url":"https://github.com/IGNF/geoportal-extensions/issues"},"homepage":"https://github.com/IGNF/geoportal-extensions#readme","dependencies":{"@mapbox/mapbox-gl-style-spec":"13.20.1","eventbusjs":"0.2.0","geoportal-access-lib":"3.3.2","itowns":"2.38.2","leaflet":"1.7.1","leaflet-draw":"1.0.4","loglevel":"^1.6.7","markdown-toc":"^1.2.0","ol":"6.9.0","ol-mapbox-style":"6.7.0","proj4":"2.7.5","proj4leaflet":"1.0.2","sortablejs":"1.14.0","three":"0.137.5","typescript":"^4.5.5","whatwg-fetch":"3.0.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-transform-template-literals":"^7.7.4","@babel/preset-env":"^7.4.4","babel-loader":"^8.0.5","chai":"^4.2.0","chalk":"^4.0.0","clean-webpack-plugin":"^3.0.0","copy-webpack-plugin":"^5.0.3","core-js":"^3.6.4","css-loader":"^3.4.2","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-loader":"^4.0.0","eslint-plugin-import":"^2.17.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.1.1","eslint-plugin-standard":"^4.0.0","exports-loader":"^0.7.0","expose-loader":"^0.7.5","fs-extra":"^9.0.0","handlebars":"^4.7.5","handlebars-layouts":"^3.1.4","html-webpack-plugin":"^4.0.4","jsdoc-webpack-plugin":"^0.3.0","mini-css-extract-plugin":"^0.9.0","mocha":"^7.1.1","mocha-loader":"^5.0.0","npm-run-all":"^4.1.5","optimize-css-assets-webpack-plugin":"^5.0.1","path":"^0.12.7","replace-bundle-webpack-plugin":"^1.0.0","requirejs":"^2.3.6","responsive-loader":"^1.2.0","speed-measure-webpack-plugin":"^1.3.0","string-template":"^1.0.0","style-loader":"^1.1.3","terser-webpack-plugin":"^2.0.0","url-loader":"^4.0.0","webpack":"^4.30.0","webpack-cli":"^3.3.1","webpack-dev-server":"^3.3.1","webpack-node-externals":"^1.7.2"}}')},function(t,e,i){var o,n;!function(s,a){"use strict";void 0===(n="function"==typeof(o=function(){var t=function(){},e="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"];function o(t,e){var i=t[e];if("function"==typeof i.bind)return i.bind(t);try{return Function.prototype.bind.call(i,t)}catch(e){return function(){return Function.prototype.apply.apply(i,[t,arguments])}}}function n(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(i){return"debug"===i&&(i="log"),"undefined"!=typeof console&&("trace"===i&&e?n:void 0!==console[i]?o(console,i):void 0!==console.log?o(console,"log"):t)}function a(e,o){for(var n=0;n=0&&e<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(n=e,!1!==o&&function(t){var e=(i[t]||"silent").toUpperCase();if("undefined"!=typeof window&&r){try{return void(window.localStorage[r]=e)}catch(t){}try{window.document.cookie=encodeURIComponent(r)+"="+e+";"}catch(t){}}}(e),a.call(s,e,t),"undefined"==typeof console&&eError: shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=e.getLatLngs(),o=i.splice(-1,1)[0];this._poly.setLatLngs(i),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(o,!1)}},addVertex:function(t){this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this._currentLatLng=i,this._updateTooltip(i),this._updateGuide(e),this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,o=e.clientY;this._startPoint.call(this,i,o)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,i=e.clientX,o=e.clientY;this._endPoint.call(this,i,o,t),this._clickHandled=null},_endPoint:function(e,i,o){if(this._mouseDownOrigin){var n=L.point(e,i).distanceTo(this._mouseDownOrigin),s=this._calculateFinishDistance(o.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(o.latlng),this._finishShape()):s<10&&L.Browser.touch?this._finishShape():Math.abs(n)<9*(t.devicePixelRatio||1)&&this.addVertex(o.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,i,o=t.originalEvent;!o.touches||!o.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=o.touches[0].clientX,i=o.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,i),this._endPoint.call(this,e,i,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var i;if(this.type===L.Draw.Polyline.TYPE)i=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;i=this._markers[0]}var o=this._map.latLngToContainerPoint(i.getLatLng()),n=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),s=this._map.latLngToContainerPoint(n.getLatLng());e=o.distanceTo(s)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var i,o,n,s=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),a=this.options.guidelineDistance,r=this.options.maxGuideLineLength,l=s>r?s-r:a;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="
"+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(t,e){var i;!this.options.allowIntersection&&this.options.showArea&&(i=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(i)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,i,o=L.Draw.SimpleShape.prototype._getTooltipText.call(this),n=this._shape,s=this.options.showArea;return n&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),i=s?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:o.text,subtext:i}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,i=t.latlng,o=this.options.showRadius,n=this.options.metric;if(this._tooltip.updatePosition(i),this._isDrawing){this._drawShape(i),e=this._shape.getRadius().toFixed(1);var s="";o&&(s=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,n,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:s})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var i=parseInt(t.style.marginTop,10)-e,o=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=i+"px",t.style.marginLeft=o+"px"}}),L.Marker.addInitHook((function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())})),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;et&&(i._index+=e)}))},_createMiddleMarker:function(t,e){var i,o,n,s=this._getMiddleLatLng(t,e),a=this._createMarker(s);a.setOpacity(.6),t._middleRight=e._middleLeft=a,o=function(){a.off("touchmove",o,this);var n=e._index;a._index=n,a.off("click",i,this).on("click",this._onMarkerClick,this),s.lat=a.getLatLng().lat,s.lng=a.getLatLng().lng,this._spliceLatLngs(n,0,s),this._markers.splice(n,0,a),a.setOpacity(1),this._updateIndexes(n,1),e._index++,this._updatePrevNext(t,a),this._updatePrevNext(a,e),this._poly.fire("editstart")},n=function(){a.off("dragstart",o,this),a.off("dragend",n,this),a.off("touchmove",o,this),this._createMiddleMarker(t,a),this._createMiddleMarker(a,e)},i=function(){o.call(this),n.call(this),this._fireEdit()},a.on("click",i,this).on("dragstart",o,this).on("dragend",n,this).on("touchmove",o,this),this._markerGroup.addLayer(a)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var i=this._poly._map,o=i.project(t.getLatLng()),n=i.project(e.getLatLng());return i.unproject(o._add(n)._divideBy(2))}}),L.Polyline.addInitHook((function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",(function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()})),this.on("remove",(function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})))})),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,i=this._resizeMarkers.length;e"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook((function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())})),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(t,e){var i={};if(void 0!==t.touches){if(!t.touches.length)return;i=t.touches[0]}else{if("touch"!==t.pointerType)return;if(i=t,!this._filterClick(t))return}var o=this._map.mouseEventToContainerPoint(i),n=this._map.mouseEventToLayerPoint(i),s=this._map.layerPointToLatLng(n);this._map.fire(e,{latlng:s,layerPoint:n,containerPoint:o,pageX:i.pageX,pageY:i.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,i=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){if(this._map._loaded){this._touchEvent(t,"touchstart")}},_onTouchEnd:function(t){if(this._map._loaded){this._touchEvent(t,"touchend")}},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){if(this._map._loaded){this._touchEvent(t,"touchleave")}},_onTouchMove:function(t){if(this._map._loaded){this._touchEvent(t,"touchmove")}},_detectIE:function(){var e=t.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?e.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):e.concat(["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],i=0,o=t.length;i2){for(var a=0;a1&&(i=i+a+r[1])}return i},readableArea:function(t,e,i){var n,s;return i=L.Util.extend({},o,i),e?(s=["ha","m"],type=typeof e,"string"===type?s=[e]:"boolean"!==type&&(s=e),n=t>=1e6&&-1!==s.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*t,i.km)+" km²":t>=1e4&&-1!==s.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*t,i.ha)+" ha":L.GeometryUtil.formattedNumber(t,i.m)+" m²"):n=(t/=.836127)>=3097600?L.GeometryUtil.formattedNumber(t/3097600,i.mi)+" mi²":t>=4840?L.GeometryUtil.formattedNumber(t/4840,i.ac)+" acres":L.GeometryUtil.formattedNumber(t,i.yd)+" yd²",n},readableDistance:function(t,e,i,n,s){var a;switch(s=L.Util.extend({},o,s),e?"string"==typeof e?e:"metric":i?"feet":n?"nauticalMile":"yards"){case"metric":a=t>1e3?L.GeometryUtil.formattedNumber(t/1e3,s.km)+" km":L.GeometryUtil.formattedNumber(t,s.m)+" m";break;case"feet":t*=3.28083,a=L.GeometryUtil.formattedNumber(t,s.ft)+" ft";break;case"nauticalMile":t*=.53996,a=L.GeometryUtil.formattedNumber(t/1e3,s.nm)+" nm";break;case"yards":default:a=(t*=1.09361)>1760?L.GeometryUtil.formattedNumber(t/1760,s.mi)+" miles":L.GeometryUtil.formattedNumber(t,s.yd)+" yd"}return a},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}}),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,i,o){return this._checkCounterclockwise(t,i,o)!==this._checkCounterclockwise(e,i,o)&&this._checkCounterclockwise(t,e,i)!==this._checkCounterclockwise(t,e,o)},_checkCounterclockwise:function(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,i,o=this._getProjectedPoints(),n=o?o.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=n-1;t>=3;t--)if(e=o[t-1],i=o[t],this._lineSegmentsIntersectsRange(e,i,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var i=this._getProjectedPoints(),o=i?i.length:0,n=i?i[o-1]:null,s=o-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(n,t,s,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return!e||(i+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,i,o){var n,s,a=this._getProjectedPoints();o=o||0;for(var r=i;r>o;r--)if(n=a[r-1],s=a[r],L.LineUtil.segmentsIntersect(t,e,n,s))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),i=0;i=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,i=L.DomUtil.create("div","leaflet-draw-section"),o=0,n=this._toolbarClass||"",s=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?''+t.subtext+"
":"")+""+t.text+"",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),i=this._container;return this._container&&(this._visible&&(i.style.visibility="inherit"),L.DomUtil.setPosition(i,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer((function(t){this._revertLayer(t)}),this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer((function(e){e.edited&&(t.addLayer(e),e.edited=!1)})),this._map.fire(L.Draw.Event.EDITED,{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,i,o=t.layer||t.target||t;this._backupLayer(o),this.options.poly&&(i=L.Util.extend({},this.options.poly),o.options.poly=i),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=o.options.color,e.fillColor=o.options.fillColor),o.options.original=L.extend({},o.options),o.options.editing=e),o instanceof L.Marker?(o.editing&&o.editing.enable(),o.dragging.enable(),o.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):o.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),o=this._map.layerPointToLatLng(i);t.target.setLatLng(o)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer((function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})}),this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer((function(t){this._removeLayer({layer:t})}),this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}(window,document)},function(t,e,i){(function(e,i){ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("leaflet"),require("node-fetch"),require("xmldom")):"function"==typeof define&&define.amd?define("Gp",["leaflet","require","require"],e):"object"==typeof exports?exports.Gp=e(require("leaflet"),require("node-fetch"),require("xmldom")):t.Gp=e(t.L,t[void 0],t[void 0])}(this,(function(t,e,i){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=42)}([function(e,i){e.exports=t},function(t,e,i){"use strict";(function(t){var i={configuration:{},isConfigLoaded:function(){if(this.configuration&&0!==Object.keys(this.configuration).length)return!0;var e="undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==t?t:{};return!!(e.Gp&&e.Gp.Config&&e.Gp.Config.layers&&0!==Object.keys(e.Gp.Config.layers).length)&&(this.configuration=e.Gp.Config,!0)}};e.a=i}).call(this,i(5))},function(t){t.exports=JSON.parse('{"name":"geoportal-extensions","description":"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries","version":"2.8.6","date":"30/08/2023","leafletExtName":"French Geoportal Extension for Leaflet","leafletExtVersion":"2.3.4","olExtName":"French Geoportal Extension for OpenLayers","olExtVersion":"3.3.4","itownsExtName":"French Geoportal Extension for Itowns","itownsExtVersion":"2.4.3","main":"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js","types":"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts","module":"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js","directories":{},"scripts":{"setup":"npm install","clean":"echo \\"Warning: target not yet implemented!\\" && exit 0","eslint":"eslint src/","test":"npm run test:serve","test:serve":"cd test && webpack-dev-server --hot --config webpack.test.serve.js","sample":"npm run sample:serve","sample:serve":"npm run sample:ol:serve","sample:itowns:serve":"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path \'/dist/itowns/\' --port 9001 --open","sample:leaflet:serve":"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path \'/dist/leaflet/\' --port 9001 --open","sample:ol:serve":"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path \'/dist/openlayers/\' --port 9001 --open","generate-types:ol":"npx tsc -p build/types/tsconfig-openlayers.json","generate-types:leaflet":"npx tsc -p build/types/tsconfig-leaflet.json","generate-types:itowns":"npx tsc -p build/types/tsconfig-itowns.json","generate-jsdoc:ol":"jsdoc -c build/jsdoc/jsdoc-openlayers.json","generate-jsdoc:leaflet":"jsdoc -c build/jsdoc/jsdoc-leaflet.json","generate-jsdoc:itowns":"jsdoc -c build/jsdoc/jsdoc-itowns.json","doc":"npm run doc:serve","doc:serve":"npm run doc:ol:serve","doc:itowns:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open","doc:leaflet:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open","doc:ol:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open","build:dev":"npm-run-all --print-label --print-name build:*:dev","build:prod":"npm-run-all --print-label --print-name build:*:prod","build:src":"npm-run-all --print-label --print-name build:*:src","build":"npm-run-all --print-label --print-name build:*:*","build:itowns":"npm-run-all --print-label --print-name build:itowns:*","build:itowns:dev":"webpack --config build/webpack/webpack.config.itowns --mode=development","build:itowns:prod":"webpack --config build/webpack/webpack.config.itowns --mode=production","build:itowns:src":"webpack --config build/webpack/webpack.config.itowns --mode=none","build:ol":"npm-run-all --print-label --print-name build:ol:*","build:ol:dev":"webpack --config build/webpack/webpack.config.openlayers --mode=development","build:ol:prod":"webpack --config build/webpack/webpack.config.openlayers --mode=production","build:ol:src":"webpack --config build/webpack/webpack.config.openlayers --mode=none","build:leaflet":"npm-run-all --print-label --print-name build:leaflet:*","build:leaflet:dev":"webpack --config build/webpack/webpack.config.leaflet --mode=development","build:leaflet:prod":"webpack --config build/webpack/webpack.config.leaflet --mode=production","build:leaflet:src":"webpack --config build/webpack/webpack.config.leaflet --mode=none"},"repository":{"type":"git","url":"https://github.com/IGNF/geoportal-extensions.git"},"author":"IGNF","keywords":["geoportail","javascript","OpenLayers","Leaflet","Itowns","3D"],"license":"CECILL-B","bugs":{"url":"https://github.com/IGNF/geoportal-extensions/issues"},"homepage":"https://github.com/IGNF/geoportal-extensions#readme","dependencies":{"@mapbox/mapbox-gl-style-spec":"13.20.1","eventbusjs":"0.2.0","geoportal-access-lib":"3.3.4","itowns":"2.38.2","leaflet":"1.7.1","leaflet-draw":"1.0.4","loglevel":"^1.6.7","markdown-toc":"^1.2.0","ol":"6.9.0","ol-mapbox-style":"6.7.0","proj4":"2.7.5","proj4leaflet":"1.0.2","sortablejs":"1.14.0","three":"0.137.5","typescript":"^4.5.5","whatwg-fetch":"3.0.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-transform-template-literals":"^7.7.4","@babel/preset-env":"^7.4.4","babel-loader":"^8.0.5","chai":"^4.2.0","chalk":"^4.0.0","clean-webpack-plugin":"^3.0.0","copy-webpack-plugin":"^5.0.3","core-js":"^3.6.4","css-loader":"^3.4.2","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-loader":"^4.0.0","eslint-plugin-import":"^2.17.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.1.1","eslint-plugin-standard":"^4.0.0","exports-loader":"^0.7.0","expose-loader":"^0.7.5","fs-extra":"^9.0.0","handlebars":"^4.7.5","handlebars-layouts":"^3.1.4","html-webpack-plugin":"^4.0.4","jsdoc-webpack-plugin":"^0.3.0","mini-css-extract-plugin":"^0.9.0","mocha":"^7.1.1","mocha-loader":"^5.0.0","npm-run-all":"^4.1.5","optimize-css-assets-webpack-plugin":"^5.0.1","path":"^0.12.7","replace-bundle-webpack-plugin":"^1.0.0","requirejs":"^2.3.6","responsive-loader":"^1.2.0","speed-measure-webpack-plugin":"^1.3.0","string-template":"^1.0.0","style-loader":"^1.1.3","terser-webpack-plugin":"^2.0.0","url-loader":"^4.0.0","webpack":"^4.30.0","webpack-cli":"^3.3.1","webpack-dev-server":"^3.3.1","webpack-node-externals":"^1.7.2"}}')},function(t,e,i){var o,n;!function(s,a){"use strict";void 0===(n="function"==typeof(o=function(){var t=function(){},e="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"];function o(t,e){var i=t[e];if("function"==typeof i.bind)return i.bind(t);try{return Function.prototype.bind.call(i,t)}catch(e){return function(){return Function.prototype.apply.apply(i,[t,arguments])}}}function n(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(i){return"debug"===i&&(i="log"),"undefined"!=typeof console&&("trace"===i&&e?n:void 0!==console[i]?o(console,i):void 0!==console.log?o(console,"log"):t)}function a(e,o){for(var n=0;n=0&&e<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(n=e,!1!==o&&function(t){var e=(i[t]||"silent").toUpperCase();if("undefined"!=typeof window&&r){try{return void(window.localStorage[r]=e)}catch(t){}try{window.document.cookie=encodeURIComponent(r)+"="+e+";"}catch(t){}}}(e),a.call(s,e,t),"undefined"==typeof console&&eError: shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=e.getLatLngs(),o=i.splice(-1,1)[0];this._poly.setLatLngs(i),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(o,!1)}},addVertex:function(t){this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this._currentLatLng=i,this._updateTooltip(i),this._updateGuide(e),this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,o=e.clientY;this._startPoint.call(this,i,o)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,i=e.clientX,o=e.clientY;this._endPoint.call(this,i,o,t),this._clickHandled=null},_endPoint:function(e,i,o){if(this._mouseDownOrigin){var n=L.point(e,i).distanceTo(this._mouseDownOrigin),s=this._calculateFinishDistance(o.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(o.latlng),this._finishShape()):s<10&&L.Browser.touch?this._finishShape():Math.abs(n)<9*(t.devicePixelRatio||1)&&this.addVertex(o.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,i,o=t.originalEvent;!o.touches||!o.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=o.touches[0].clientX,i=o.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,i),this._endPoint.call(this,e,i,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var i;if(this.type===L.Draw.Polyline.TYPE)i=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;i=this._markers[0]}var o=this._map.latLngToContainerPoint(i.getLatLng()),n=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),s=this._map.latLngToContainerPoint(n.getLatLng());e=o.distanceTo(s)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var i,o,n,s=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),a=this.options.guidelineDistance,r=this.options.maxGuideLineLength,l=s>r?s-r:a;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="
"+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(t,e){var i;!this.options.allowIntersection&&this.options.showArea&&(i=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(i)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,i,o=L.Draw.SimpleShape.prototype._getTooltipText.call(this),n=this._shape,s=this.options.showArea;return n&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),i=s?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:o.text,subtext:i}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,i=t.latlng,o=this.options.showRadius,n=this.options.metric;if(this._tooltip.updatePosition(i),this._isDrawing){this._drawShape(i),e=this._shape.getRadius().toFixed(1);var s="";o&&(s=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,n,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:s})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var i=parseInt(t.style.marginTop,10)-e,o=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=i+"px",t.style.marginLeft=o+"px"}}),L.Marker.addInitHook((function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())})),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;et&&(i._index+=e)}))},_createMiddleMarker:function(t,e){var i,o,n,s=this._getMiddleLatLng(t,e),a=this._createMarker(s);a.setOpacity(.6),t._middleRight=e._middleLeft=a,o=function(){a.off("touchmove",o,this);var n=e._index;a._index=n,a.off("click",i,this).on("click",this._onMarkerClick,this),s.lat=a.getLatLng().lat,s.lng=a.getLatLng().lng,this._spliceLatLngs(n,0,s),this._markers.splice(n,0,a),a.setOpacity(1),this._updateIndexes(n,1),e._index++,this._updatePrevNext(t,a),this._updatePrevNext(a,e),this._poly.fire("editstart")},n=function(){a.off("dragstart",o,this),a.off("dragend",n,this),a.off("touchmove",o,this),this._createMiddleMarker(t,a),this._createMiddleMarker(a,e)},i=function(){o.call(this),n.call(this),this._fireEdit()},a.on("click",i,this).on("dragstart",o,this).on("dragend",n,this).on("touchmove",o,this),this._markerGroup.addLayer(a)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var i=this._poly._map,o=i.project(t.getLatLng()),n=i.project(e.getLatLng());return i.unproject(o._add(n)._divideBy(2))}}),L.Polyline.addInitHook((function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",(function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()})),this.on("remove",(function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})))})),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,i=this._resizeMarkers.length;e"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook((function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())})),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(t,e){var i={};if(void 0!==t.touches){if(!t.touches.length)return;i=t.touches[0]}else{if("touch"!==t.pointerType)return;if(i=t,!this._filterClick(t))return}var o=this._map.mouseEventToContainerPoint(i),n=this._map.mouseEventToLayerPoint(i),s=this._map.layerPointToLatLng(n);this._map.fire(e,{latlng:s,layerPoint:n,containerPoint:o,pageX:i.pageX,pageY:i.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,i=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){if(this._map._loaded){this._touchEvent(t,"touchstart")}},_onTouchEnd:function(t){if(this._map._loaded){this._touchEvent(t,"touchend")}},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){if(this._map._loaded){this._touchEvent(t,"touchleave")}},_onTouchMove:function(t){if(this._map._loaded){this._touchEvent(t,"touchmove")}},_detectIE:function(){var e=t.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?e.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):e.concat(["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],i=0,o=t.length;i2){for(var a=0;a1&&(i=i+a+r[1])}return i},readableArea:function(t,e,i){var n,s;return i=L.Util.extend({},o,i),e?(s=["ha","m"],type=typeof e,"string"===type?s=[e]:"boolean"!==type&&(s=e),n=t>=1e6&&-1!==s.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*t,i.km)+" km²":t>=1e4&&-1!==s.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*t,i.ha)+" ha":L.GeometryUtil.formattedNumber(t,i.m)+" m²"):n=(t/=.836127)>=3097600?L.GeometryUtil.formattedNumber(t/3097600,i.mi)+" mi²":t>=4840?L.GeometryUtil.formattedNumber(t/4840,i.ac)+" acres":L.GeometryUtil.formattedNumber(t,i.yd)+" yd²",n},readableDistance:function(t,e,i,n,s){var a;switch(s=L.Util.extend({},o,s),e?"string"==typeof e?e:"metric":i?"feet":n?"nauticalMile":"yards"){case"metric":a=t>1e3?L.GeometryUtil.formattedNumber(t/1e3,s.km)+" km":L.GeometryUtil.formattedNumber(t,s.m)+" m";break;case"feet":t*=3.28083,a=L.GeometryUtil.formattedNumber(t,s.ft)+" ft";break;case"nauticalMile":t*=.53996,a=L.GeometryUtil.formattedNumber(t/1e3,s.nm)+" nm";break;case"yards":default:a=(t*=1.09361)>1760?L.GeometryUtil.formattedNumber(t/1760,s.mi)+" miles":L.GeometryUtil.formattedNumber(t,s.yd)+" yd"}return a},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}}),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,i,o){return this._checkCounterclockwise(t,i,o)!==this._checkCounterclockwise(e,i,o)&&this._checkCounterclockwise(t,e,i)!==this._checkCounterclockwise(t,e,o)},_checkCounterclockwise:function(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,i,o=this._getProjectedPoints(),n=o?o.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=n-1;t>=3;t--)if(e=o[t-1],i=o[t],this._lineSegmentsIntersectsRange(e,i,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var i=this._getProjectedPoints(),o=i?i.length:0,n=i?i[o-1]:null,s=o-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(n,t,s,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return!e||(i+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,i,o){var n,s,a=this._getProjectedPoints();o=o||0;for(var r=i;r>o;r--)if(n=a[r-1],s=a[r],L.LineUtil.segmentsIntersect(t,e,n,s))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),i=0;i=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,i=L.DomUtil.create("div","leaflet-draw-section"),o=0,n=this._toolbarClass||"",s=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?''+t.subtext+"
":"")+""+t.text+"",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),i=this._container;return this._container&&(this._visible&&(i.style.visibility="inherit"),L.DomUtil.setPosition(i,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer((function(t){this._revertLayer(t)}),this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer((function(e){e.edited&&(t.addLayer(e),e.edited=!1)})),this._map.fire(L.Draw.Event.EDITED,{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,i,o=t.layer||t.target||t;this._backupLayer(o),this.options.poly&&(i=L.Util.extend({},this.options.poly),o.options.poly=i),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=o.options.color,e.fillColor=o.options.fillColor),o.options.original=L.extend({},o.options),o.options.editing=e),o instanceof L.Marker?(o.editing&&o.editing.enable(),o.dragging.enable(),o.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):o.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),o=this._map.layerPointToLatLng(i);t.target.setLatLng(o)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer((function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})}),this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer((function(t){this._removeLayer({layer:t})}),this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}(window,document)},function(t,e,i){(function(e,i){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) @@ -95,4 +95,4 @@ * @author owenm * @license MIT */ -function h(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function d(t){for(var e=1;e=0||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function g(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var _=g(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),v=g(/Edge/i),y=g(/firefox/i),E=g(/safari/i)&&!g(/chrome/i)&&!g(/android/i),w=g(/iP(ad|od|hone)/i),P=g(/chrome/i)&&g(/android/i),b={capture:!1,passive:!1};function M(t,e,i){t.addEventListener(e,i,!_&&b)}function C(t,e,i){t.removeEventListener(e,i,!_&&b)}function L(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function S(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function x(t,e,i,o){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&L(t,e):L(t,e))||o&&t===i)return t;if(t===i)break}while(t=S(t))}return null}var G,I=/\s+/g;function k(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(I," ").replace(" "+e+" "," ");t.className=(o+(i?" "+e:"")).replace(I," ")}}function R(t,e,i){var o=t&&t.style;if(o){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=i+("string"==typeof i?"":"px")}}function T(t,e){var i="";if("string"==typeof t)i=t;else do{var o=R(t,"transform");o&&"none"!==o&&(i=o+" "+i)}while(!e&&(t=t.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(i)}function A(t,e,i){if(t){var o=t.getElementsByTagName(e),n=0,s=o.length;if(i)for(;n=s:n<=s))return o;if(o===D())break;o=B(o,!1)}return!1}function U(t,e,i,o){for(var n=0,s=0,a=t.children;s2&&void 0!==arguments[2]?arguments[2]:{},o=i.evt,n=f(i,$);J.pluginEvent.bind(Vt)(t,e,d({dragEl:it,parentEl:ot,ghostEl:nt,rootEl:st,nextEl:at,lastDownEl:rt,cloneEl:lt,cloneHidden:ct,dragStarted:Pt,putSortable:ft,activeSortable:Vt.active,originalEvent:o,oldIndex:ht,oldDraggableIndex:ut,newIndex:dt,newDraggableIndex:pt,hideGhostForTarget:Bt,unhideGhostForTarget:Wt,cloneNowHidden:function(){ct=!0},cloneNowShown:function(){ct=!1},dispatchSortableEvent:function(t){et({sortable:e,name:t,originalEvent:o})}},n))};function et(t){Q(d({putSortable:ft,cloneEl:lt,targetEl:it,rootEl:st,oldIndex:ht,oldDraggableIndex:ut,newIndex:dt,newDraggableIndex:pt},t))}var it,ot,nt,st,at,rt,lt,ct,ht,dt,ut,pt,mt,ft,gt,_t,vt,yt,Et,wt,Pt,bt,Mt,Ct,Lt,St=!1,xt=!1,Gt=[],It=!1,kt=!1,Rt=[],Tt=!1,At=[],Dt="undefined"!=typeof document,Ot=w,Nt=v||_?"cssFloat":"float",Ut=Dt&&!P&&!w&&"draggable"in document.createElement("div"),jt=function(){if(Dt){if(_)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ft=function(t,e){var i=R(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),n=U(t,0,e),s=U(t,1,e),a=n&&R(n),r=s&&R(s),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(n).width,c=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+O(s).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(n&&a.float&&"none"!==a.float){var h="left"===a.float?"left":"right";return!s||"both"!==r.clear&&r.clear!==h?"horizontal":"vertical"}return n&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=o&&"none"===i[Nt]||s&&"none"===i[Nt]&&l+c>o)?"vertical":"horizontal"},zt=function(t){function e(t,i){return function(o,n,s,a){var r=o.options.group.name&&n.options.group.name&&o.options.group.name===n.options.group.name;if(null==t&&(i||r))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(o,n,s,a),i)(o,n,s,a);var l=(i?o:n).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var i={},o=t.group;o&&"object"==u(o)||(o={name:o}),i.name=o.name,i.checkPull=e(o.pull,!0),i.checkPut=e(o.put),i.revertClone=o.revertClone,t.group=i},Bt=function(){!jt&&nt&&R(nt,"display","none")},Wt=function(){!jt&&nt&&R(nt,"display","")};Dt&&document.addEventListener("click",(function(t){if(xt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),xt=!1,!1}),!0);var qt=function(t){if(it){t=t.touches?t.touches[0]:t;var e=(n=t.clientX,s=t.clientY,Gt.some((function(t){var e=t[Y].options.emptyInsertThreshold;if(e&&!j(t)){var i=O(t),o=n>=i.left-e&&n<=i.right+e,r=s>=i.top-e&&s<=i.bottom+e;return o&&r?a=t:void 0}})),a);if(e){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Y]._onDragOver(i)}}var n,s,a},Ht=function(t){it&&it.parentNode[Y]._isOutsideThisEl(t.target)};function Vt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=m({},e),t[Y]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ft(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Vt.supportPointer&&"PointerEvent"in window&&!E,emptyInsertThreshold:5};for(var o in J.initializePlugins(this,t,i),i)!(o in e)&&(e[o]=i[o]);for(var n in zt(e),this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));this.nativeDraggable=!e.forceFallback&&Ut,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?M(t,"pointerdown",this._onTapStart):(M(t,"mousedown",this._onTapStart),M(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(M(t,"dragover",this),M(t,"dragenter",this)),Gt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),m(this,X())}function Yt(t,e,i,o,n,s,a,r){var l,c,h=t[Y],d=h.options.onMove;return!window.CustomEvent||_||v?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=i,l.draggedRect=o,l.related=n||e,l.relatedRect=s||O(e),l.willInsertAfter=r,l.originalEvent=a,t.dispatchEvent(l),d&&(c=d.call(h,l,a)),c}function Xt(t){t.draggable=!1}function Kt(){Tt=!1}function Zt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,o=0;i--;)o+=e.charCodeAt(i);return o.toString(36)}function Jt(t){return setTimeout(t,0)}function Qt(t){return clearTimeout(t)}Vt.prototype={constructor:Vt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(bt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,it):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,o=this.options,n=o.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,r=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||r,c=o.filter;if(function(t){At.length=0;var e=t.getElementsByTagName("input"),i=e.length;for(;i--;){var o=e[i];o.checked&&At.push(o)}}(i),!it&&!(/mousedown|pointerdown/.test(s)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!E||!r||"SELECT"!==r.tagName.toUpperCase())&&!((r=x(r,o.draggable,i,!1))&&r.animated||rt===r)){if(ht=F(r),ut=F(r,o.draggable),"function"==typeof c){if(c.call(this,t,r,this))return et({sortable:e,rootEl:l,name:"filter",targetEl:r,toEl:i,fromEl:i}),tt("filter",e,{evt:t}),void(n&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=x(l,o.trim(),i,!1))return et({sortable:e,rootEl:o,name:"filter",targetEl:r,fromEl:i,toEl:i}),tt("filter",e,{evt:t}),!0}))))return void(n&&t.cancelable&&t.preventDefault());o.handle&&!x(l,o.handle,i,!1)||this._prepareDragStart(t,a,r)}}},_prepareDragStart:function(t,e,i){var o,n=this,s=n.el,a=n.options,r=s.ownerDocument;if(i&&!it&&i.parentNode===s){var l=O(i);if(st=s,ot=(it=i).parentNode,at=it.nextSibling,rt=i,mt=a.group,Vt.dragged=it,gt={target:it,clientX:(e||t).clientX,clientY:(e||t).clientY},Et=gt.clientX-l.left,wt=gt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,it.style["will-change"]="all",o=function(){tt("delayEnded",n,{evt:t}),Vt.eventCanceled?n._onDrop():(n._disableDelayedDragEvents(),!y&&n.nativeDraggable&&(it.draggable=!0),n._triggerDragStart(t,e),et({sortable:n,name:"choose",originalEvent:t}),k(it,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){A(it,t.trim(),Xt)})),M(r,"dragover",qt),M(r,"mousemove",qt),M(r,"touchmove",qt),M(r,"mouseup",n._onDrop),M(r,"touchend",n._onDrop),M(r,"touchcancel",n._onDrop),y&&this.nativeDraggable&&(this.options.touchStartThreshold=4,it.draggable=!0),tt("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(v||_))o();else{if(Vt.eventCanceled)return void this._onDrop();M(r,"mouseup",n._disableDelayedDrag),M(r,"touchend",n._disableDelayedDrag),M(r,"touchcancel",n._disableDelayedDrag),M(r,"mousemove",n._delayedDragTouchMoveHandler),M(r,"touchmove",n._delayedDragTouchMoveHandler),a.supportPointer&&M(r,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){it&&Xt(it),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;C(t,"mouseup",this._disableDelayedDrag),C(t,"touchend",this._disableDelayedDrag),C(t,"touchcancel",this._disableDelayedDrag),C(t,"mousemove",this._delayedDragTouchMoveHandler),C(t,"touchmove",this._delayedDragTouchMoveHandler),C(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?M(document,"pointermove",this._onTouchMove):M(document,e?"touchmove":"mousemove",this._onTouchMove):(M(it,"dragend",this),M(st,"dragstart",this._onDragStart));try{document.selection?Jt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(St=!1,st&&it){tt("dragStarted",this,{evt:e}),this.nativeDraggable&&M(document,"dragover",Ht);var i=this.options;!t&&k(it,i.dragClass,!1),k(it,i.ghostClass,!0),Vt.active=this,t&&this._appendGhost(),et({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(_t){this._lastX=_t.clientX,this._lastY=_t.clientY,Bt();for(var t=document.elementFromPoint(_t.clientX,_t.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(_t.clientX,_t.clientY))!==e;)e=t;if(it.parentNode[Y]._isOutsideThisEl(t),e)do{if(e[Y]){if(e[Y]._onDragOver({clientX:_t.clientX,clientY:_t.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Wt()}},_onTouchMove:function(t){if(gt){var e=this.options,i=e.fallbackTolerance,o=e.fallbackOffset,n=t.touches?t.touches[0]:t,s=nt&&T(nt,!0),a=nt&&s&&s.a,r=nt&&s&&s.d,l=Ot&&Lt&&z(Lt),c=(n.clientX-gt.clientX+o.x)/(a||1)+(l?l[0]-Rt[0]:0)/(a||1),h=(n.clientY-gt.clientY+o.y)/(r||1)+(l?l[1]-Rt[1]:0)/(r||1);if(!Vt.active&&!St){if(i&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,n,this)&&!g.animated){if(g===it)return D(!1);if(g&&s===t.target&&(a=g),a&&(i=O(a)),!1!==Yt(st,s,it,e,a,i,t,!!a))return A(),s.appendChild(it),ot=s,z(),D(!0)}else if(g&&function(t,e,i){var o=O(U(i.el,0,i.options,!0));return e?t.clientXh+c*s/2:ld-Ct)return-Mt}else if(l>h+c*(1-n)/2&&ld-c*s/2))return l>h+c/2?1:-1;return 0}(t,a,i,n,P?1:r.swapThreshold,null==r.invertedSwapThreshold?r.swapThreshold:r.invertedSwapThreshold,kt,bt===a))){var L=F(it);do{L-=v,E=ot.children[L]}while(E&&("none"===R(E,"display")||E===nt))}if(0===v||E===a)return D(!1);bt=a,Mt=v;var S=a.nextElementSibling,G=!1,I=Yt(st,s,it,e,a,i,t,G=1===v);if(!1!==I)return 1!==I&&-1!==I||(G=1===I),Tt=!0,setTimeout(Kt,30),A(),G&&!S?s.appendChild(it):a.parentNode.insertBefore(it,G?S:a),M&&H(M,0,C-M.scrollTop),ot=it.parentNode,void 0===y||kt||(Ct=Math.abs(y-O(a)[b])),z(),D(!0)}if(s.contains(it))return D(!1)}return!1}function T(r,l){tt(r,m,d({evt:t,isOwner:h,axis:n?"vertical":"horizontal",revert:o,dragRect:e,targetRect:i,canSort:u,fromSortable:p,target:a,completed:D,onMove:function(i,o){return Yt(st,s,it,e,i,O(i),t,o)},changed:z},l))}function A(){T("dragOverAnimationCapture"),m.captureAnimationState(),m!==p&&p.captureAnimationState()}function D(e){return T("dragOverCompleted",{insertion:e}),e&&(h?c._hideClone():c._showClone(m),m!==p&&(k(it,ft?ft.options.ghostClass:c.options.ghostClass,!1),k(it,r.ghostClass,!0)),ft!==m&&m!==Vt.active?ft=m:m===Vt.active&&ft&&(ft=null),p===m&&(m._ignoreWhileAnimating=a),m.animateAll((function(){T("dragOverAnimationComplete"),m._ignoreWhileAnimating=null})),m!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===it&&!it.animated||a===s&&!a.animated)&&(bt=null),r.dragoverBubble||t.rootEl||a===document||(it.parentNode[Y]._isOutsideThisEl(t.target),!e&&qt(t)),!r.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function z(){dt=F(it),pt=F(it,r.draggable),et({sortable:m,name:"change",toEl:s,newIndex:dt,newDraggableIndex:pt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){C(document,"mousemove",this._onTouchMove),C(document,"touchmove",this._onTouchMove),C(document,"pointermove",this._onTouchMove),C(document,"dragover",qt),C(document,"mousemove",qt),C(document,"touchmove",qt)},_offUpEvents:function(){var t=this.el.ownerDocument;C(t,"mouseup",this._onDrop),C(t,"touchend",this._onDrop),C(t,"pointerup",this._onDrop),C(t,"touchcancel",this._onDrop),C(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;dt=F(it),pt=F(it,i.draggable),tt("drop",this,{evt:t}),ot=it&&it.parentNode,dt=F(it),pt=F(it,i.draggable),Vt.eventCanceled||(St=!1,kt=!1,It=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Qt(this.cloneId),Qt(this._dragStartId),this.nativeDraggable&&(C(document,"drop",this),C(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),E&&R(document.body,"user-select",""),R(it,"transform",""),t&&(Pt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),nt&&nt.parentNode&&nt.parentNode.removeChild(nt),(st===ot||ft&&"clone"!==ft.lastPutMode)&<&<.parentNode&<.parentNode.removeChild(lt),it&&(this.nativeDraggable&&C(it,"dragend",this),Xt(it),it.style["will-change"]="",Pt&&!St&&k(it,ft?ft.options.ghostClass:this.options.ghostClass,!1),k(it,this.options.chosenClass,!1),et({sortable:this,name:"unchoose",toEl:ot,newIndex:null,newDraggableIndex:null,originalEvent:t}),st!==ot?(dt>=0&&(et({rootEl:ot,name:"add",toEl:ot,fromEl:st,originalEvent:t}),et({sortable:this,name:"remove",toEl:ot,originalEvent:t}),et({rootEl:ot,name:"sort",toEl:ot,fromEl:st,originalEvent:t}),et({sortable:this,name:"sort",toEl:ot,originalEvent:t})),ft&&ft.save()):dt!==ht&&dt>=0&&(et({sortable:this,name:"update",toEl:ot,originalEvent:t}),et({sortable:this,name:"sort",toEl:ot,originalEvent:t})),Vt.active&&(null!=dt&&-1!==dt||(dt=ht,pt=ut),et({sortable:this,name:"end",toEl:ot,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){tt("nulling",this),st=it=ot=nt=at=lt=rt=ct=gt=_t=Pt=dt=pt=ht=ut=bt=Mt=ft=mt=Vt.dragged=Vt.ghost=Vt.clone=Vt.active=null,At.forEach((function(t){t.checked=!0})),At.length=vt=yt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":it&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,o=0,n=i.length,s=this.options;othis._map.getZoom()||t.layer.options.maxZoomt.getZoom()||o.options.maxZoom1||e<0||this._map.hasLayer(t)&&(void 0!==t.setOpacity?t.setOpacity(e):(t.options.opacity=e,t.setStyle({fillOpacity:e,opacity:e})),this._updateOpacityDOMLayer(t))},setVisibility:function(t,e){ge.trace(t,e),this._layers[s.a.stamp(t)].visibility=e,this._updateVisibilityDOMLayer(t),this._updateVisibilityLayer(t)}}),ve={getLogger:function(t){"true".match(/true/)?r.disableAll():r.enableAll();var e=t||"default";return r.getLogger(e)}},ye={PARAM_MISSING:"Parameter(s) '%var%' missing",PARAM_EMPTY:"Parameter(s) '%var%' empty",PARAM_TYPE:"Wrong type(s) for parameter(s) '%var%'",PARAM_FORMAT:"Parameter(s) '%var%' not correctly formatted",PARAM_NOT_SUPPORT:"Value(s) for parameter(s) '%var%' not supported",PARAM_NOT_SUPPORT_NODEJS:"Value(s) for parameter(s) '%var%' not supported to NodeJS",PARAM_UNKNOWN:"Value(s) for parameter(s) '%var%' unknown",SERVICE_REQUEST_BUILD:"An error occurred during the request building of the service",SERVICE_REQUEST_EMPTY:"The request sent to the service is empty",SERVICE_RESPONSE_EXCEPTION:"The service returned an exception : '%var%'",SERVICE_RESPONSE_EXCEPTION_2:"The service returned an exception",SERVICE_RESPONSE_ANALYSE:"An error occurred while parsing the response '%var%' of the service",SERVICE_RESPONSE_ANALYSE_2:"An unknown error occurred while parsing the response",SERVICE_RESPONSE_EMPTY:"The response of the service is empty",SERVICE_RESPONSE_EMPTY_2:"The response from the service could not be analyzed or is empty",SERVICE_RESPONSE_FORMAT:"The format of the service response is not supported (handled format(s) : '%var%')",SERVICE_RESPONSE_FORMAT_2:"The format of the service response is not supported",SERVICE_RESPONSE_FORMAT_3:"No suggestion matching the search",CLASS_CONSTRUCTOR:"'%var%' constructor cannot be called as a function.",getMessage:function(t,e){if(0===Object.keys(arguments).length)return"Message indefined !";var i=Array.prototype.slice.call(arguments),o=i.shift(),n=i,s=this[o];try{s=Array.isArray(n)&&n.length>0?s.replace("%var%",n.join(" - ")):s.replace("%var%","%var% (not specified)")}catch(t){}return s}},Ee={normalyzeParameters:function(t){var e=null;if(t){var i=[];for(var o in t)if(t.hasOwnProperty(o)){var n=t[o];n||(n=""),i.push(o+"="+n)}e=i.join("&")}return e},normalyzeUrl:function(t,e,i){var o=t;if(t){var n=t.indexOf("?");-1===n&&(o+="?"),-1!==n&&n!==t.length-1&&(o+="&")}return e&&(o+="string"==typeof e?e:this.normalyzeParameters(e)),i&&(o=encodeURIComponent(o)),o},indent:function(t,e){return new Array((t||0)+1).join("\t")+e}},we=i(10),Pe=i.n(we),be={call:function(t){var e=ve.getLogger("XHR");if(e.trace("[XHR::call()]"),Pe.a.polyfill(),!t.url)throw new Error("missing parameter : url is not defined !");if(!t.method)throw new Error("missing parameter : method is not defined !");t.format||(t.format="text");var i={};switch(i.url=t.url,i.data=t.data?t.data:null,i.method=t.method,i.timeOut=t.timeOut||0,i.scope=t.scope||this,i.proxy=t.proxy||null,i.content=t.content||null,i.headers=t.headers||{referer:"http://localhost"},t.method){case"DELETE":case"GET":break;case"PUT":case"POST":i.content=t.content?t.content:"application/x-www-form-urlencoded",i.headers=t.headers?t.headers:{referer:"http://localhost"};break;case"HEAD":case"OPTIONS":throw new Error("HTTP method not yet supported !");default:throw new Error("HTTP method unknown !")}switch(t.format){case"text":this.__call(i).then((function(i){e.trace(i),t.onResponse.call(this,i)})).catch((function(e){t.onFailure.call(this,e)}));break;case"json":this.__callJSON(i).then((function(i){e.trace(i),t.onResponse.call(this,i)})).catch((function(e){t.onFailure.call(this,e)}));break;case"xml":this.__callXML(i).then((function(i){e.trace(i),t.onResponse.call(this,i)})).catch((function(e){t.onFailure.call(this,e)}));break;default:throw new Error("This output Format is not yet supported !")}},__call:function(t){var e=ve.getLogger("XHR");return e.trace("[XHR::__call()]"),new Promise((function(o,n){var s="POST"===t.method||"PUT"===t.method?1:0;t.data&&("object"==typeof t.data&&Object.keys(t.data).length||"string"==typeof t.data&&t.data.length)&&!s&&("Geocode"===t.scope.CLASSNAME||"ReverseGeocode"===t.scope.CLASSNAME?t.url=t.url+t.data:t.url=Ee.normalyzeUrl(t.url,t.data)),e.trace("URL = ",t.url);var a=null;if("undefined"==typeof window){var r=i(7),l={headers:{Referer:"https://localhost"}};return t.data&&"string"==typeof t.data&&s&&(l={method:t.method,body:t.data,headers:{"Content-Type":t.content,Referer:"https://localhost"}}),r(t.url,l).then((function(t){if(t.ok)o(t.text());else{var e="Errors Occured on Http Request (status : '"+t.statusText+"' | url : '"+t.url+"')",i=t.status;n({message:e,status:i})}})).catch((function(t){n({message:t,status:-1})}))}if(window.XMLHttpRequest){e.trace("XMLHttpRequest"),(a=new XMLHttpRequest).open(t.method,t.url,!0),a.overrideMimeType=t.content;var c=null;t.timeOut>0&&(e.trace("XHR - TimeOut actif !"),c=window.setTimeout((function(){n({message:"TimeOut Occured on Http Request with XMLHttpRequest !",status:-1})}),t.timeOut)),s&&(e.trace("data = ",t.data),a.setRequestHeader("Content-type",t.content)),a.onerror=function(t){console.log(t),n(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},a.ontimeout=function(t){console.log(t),n(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},a.onreadystatechange=function(t){if(4===a.readyState)if(200===a.status)window.clearTimeout(c),o(a.response);else{var e="Errors Occured on Http Request (status : '"+t.target.statusText+"' | url : '"+t.target.responseURL+"' | response : '"+t.target.response+"')",i=t.target.status;n({message:e,status:i})}};var h=t.data&&s?t.data:null;a.send(h)}else{if(!window.XDomainRequest)throw new Error("CORS not supported");e.trace("XDomainRequest"),(a=new XDomainRequest).open(t.method,t.url),a.overrideMimeType=t.content,t.timeOut>0&&(a.timeout=t.timeout,e.trace("XHR - TimeOut actif !")),s&&a.setRequestHeader("Content-type",t.content),a.onerror=function(){n(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},a.ontimeout=function(){n(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},a.onload=function(t){if(200===a.status)o(a.responseText);else{var e="Errors Occured on Http Request (status : '"+t.target.statusText+"' | url : '"+t.target.responseURL+"')",i=t.target.status;n({message:e,status:i})}};var d=t.data&&s?t.data:null;a.send(d)}}))},__callJSON:function(t){return this.__call(t).then(JSON.parse).catch((function(e){console.log("_callJSON failed on : ",t.url,e)}))},__callXML:function(t){return this.__call(t).then((function(t){var e;"undefined"==typeof window?e=(new(0,i(8).DOMParser)).parseFromString(t,"text/xml"):window.DOMParser?e=(new window.DOMParser).parseFromString(t,"text/xml"):((e=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,e.loadXML(t));return e})).catch((function(e){console.log("__callXML failed on : ",t.url,e)}))}},Me={uuid:(pe=Math.floor(Date.now()),function(){return pe++}),call:function(t){var e=ve.getLogger("JSONP");if(e.trace("[JSONP::call ()]"),!t)throw e.error("missing parameter : options !"),new Error("missing parameter : options !");if(!t.url)throw e.error("missing parameter : options.url !"),new Error("missing parameter : options.url !");if(t.timeOut||(e.info("setting 'options.timeOut' default value"),t.timeOut=0),!t.onResponse)throw e.error("missing parameter : options.onResponse !"),new Error("missing parameter : options.onResponse !");var i="string"==typeof t.callbackSuffix?t.callbackSuffix:this.uuid(),o=!1,n=!1,s=t.url.indexOf("callback=");if(-1!==s){o=!0;var a=t.url.indexOf("&",s);-1===a&&(a=t.url.length);var r=t.url.substring(s+9,a);r&&(n=!0,t.callbackName=r,e.info("setting 'options.callbackName' value ("+t.callbackName+") from 'options.url' parameter"))}if(!o){var l=t.url.indexOf("?");-1===l?t.url=t.url+"?callback=":l===t.url.length?t.url=t.url+"callback=":t.url=t.url+"&callback=",e.info("setting callback default key in 'options.url' : "+t.url)}var c=!!t.callbackName||n;if(n||(t.callbackName||(e.info("setting 'options.callbackName' default value"),t.callbackName="callback",(i||""===i)&&(t.callbackName+=i)),t.url=t.url.replace("callback=","callback="+t.callbackName),e.info("setting callback function name in 'options.url' : "+t.url)),t.onTimeOut||(e.info("setting 'options.onTimeOut' default value"),t.onTimeOut=function(){console.log("TimeOut while invoking url : "+t.url)}),!c){var h=this,d=null;t.timeOut>0&&(d=window.setTimeout((function(){window[t.callbackName]=function(){},t.onTimeOut(),h._deleteScript(i)}),t.timeOut)),window[t.callbackName]=function(e){window.clearTimeout(d),t.onResponse(e),h._deleteScript(i)}}this._createScript(i,t.url)},_createScript:function(t,e){var i,o=document.getElementById("results"+t);(i=document.createElement("script")).setAttribute("type","text/javascript"),i.setAttribute("src",e),i.setAttribute("charset","UTF-8"),i.setAttribute("id","results"+t),i.setAttribute("async","true");var n=document.documentElement||document.getElementsByTagName("head")[0];null===o?n.appendChild(i):n.replaceChild(i,o)},_deleteScript:function(t){var e=document.getElementById("results"+t);if(e){var i=e.parentNode||document.documentElement;if(!i)return;i.removeChild(e)}}},Ce={send:function(t){var e=t||{method:"GET",protocol:"XHR",timeOut:0,format:null,wrap:!0,nocache:!0,output:"json",callback:null,callbackSuffix:null};if("undefined"!=typeof window||"JSONP"!==t.protocol){if("XHR"===t.protocol||"json"===t.format?e.wrap=!1:"JSONP"===t.protocol&&"xml"===t.format&&(e.wrap=!0),e.callback=null,e.output=e.wrap?"json":null,e.wrap){var i={};i.output=e.output,i.callback=e.callback,delete i.callback,e.url=Ee.normalyzeUrl(t.url,i)}switch(e.protocol){case"XHR":"GET"===t.method&&t.nocache&&(e.url=Ee.normalyzeUrl(e.url,{t:(new Date).getTime()})),be.call(e);break;case"JSONP":e.data&&(e.url=Ee.normalyzeUrl(e.url,e.data)),Me.call(e);break;default:throw new Error("protocol not supported (XHR|JSONP) !")}}else console.log("Value (s) for parameter (s) 'protocol=JSONP (instead use XHR)' not supported to NodeJS")}};function Le(t){if(!(this instanceof Le))throw new TypeError("ErrorService constructor cannot be called as a function.");var e=t;"string"==typeof t||t instanceof String?(this.message=t,this.status=-1,this.type=Le.TYPE_UNKERR):(this.message=e.message||"undefined!?",this.type=e.type,this.status=e.status||-1),this.name="ErrorService",this.stack=(new Error).stack}Le.TYPE_SRVERR="SERVICE_ERROR",Le.TYPE_USEERR="USAGE_ERROR",Le.TYPE_UNKERR="UNKNOWN_ERROR",Le.prototype=Object.create(Error.prototype,{constructor:{value:Le,writable:!0,configurable:!0}});var Se=Le,xe={ssl:!0,url:function(t,e){return(!1===xe.ssl?"http://":"https://")+"wxs.ign.fr".concat("/",t,e)},Alti:{_key:{"elevation-json":"/alti/rest/elevation.json","elevation-xml":"/alti/rest/elevation.xml","profil-json":"/alti/rest/elevationLine.json","profil-xml":"/alti/rest/elevationLine.xml",wps:"/alti/wps"},url:function(t){return{"elevation-json":xe.url(t,this._key["elevation-json"]),"elevation-xml":xe.url(t,this._key["elevation-xml"]),"profil-json":xe.url(t,this._key["profil-json"]),"profil-xml":xe.url(t,this._key["profil-xml"]),wps:xe.url(t,this._key.wps)}}},ProcessIsoCurve:{_key:"/geoportail/isochrone/rest/1.0.0/isochrone",url:function(t){return xe.url(t,this._key)}},Config:{_key:"https://raw.githubusercontent.com/IGNF/geoportal-configuration/main/dist/",url:function(t){Array.isArray(t)||(t=t.split(","));for(var e=[],i=0;io(t,{credentials:"same-origin"}).then(t=>{if(t.ok)return t.json().then(t=>t).catch(t=>{throw new Error("Exception Json : "+t)});throw new Error("Exception HTTP : "+t.status+" (status code) !")}).catch(t=>new Promise((e,i)=>{i(t)})),a=[];for(let t=0;t{if(!t)throw new Error("results config empty !?");t.forEach(t=>{this.listConfigResults.push(t)})}).then(()=>{e.call(this,this.listConfigResults)}).catch(e=>{t.call(this,e)})},Ne=function(t,e){this.listConfigResults=[];for(var i=0;ie||t__IDENTIFIER__\x3c!-- __DATAINPUTS__ --\x3e__RAWDATAOUTPUT__',input:"__KEY____DATA__"}},namespaceByDefault:function(){return['xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"','xmlns="http://www.opengis.net/wps/1.0.0"','xmlns:wfs="http://www.opengis.net/wfs"','xmlns:wps="http://www.opengis.net/wps/1.0.0"','xmlns:ows="http://www.opengis.net/ows/1.1"','xmlns:gml="http://www.opengis.net/gml"','xmlns:ogc="http://www.opengis.net/ogc"','xmlns:wcs="http://www.opengis.net/wcs/1.1.1"','xmlns:xlink="http://www.w3.org/1999/xlink"'].join(" ")},schemaLocationByDefault:function(){return'xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"'},processRequestString:function(){this.logger.trace("WPS::processRequestString ()");var t="";if("POST"===this.method)t=this.template.post.value;else{if("GET"!==this.method)return this.logger.error("No other method supported by the service !"),!1;t=this.template.get.value}return t=(t=(t=(t=(t=t.replace(/__SERVICE__/g,this.paramservice)).replace(/__VERSION__/g,this.paramversion)).replace(/__RAWDATAOUTPUT__/g,this.paramrawdataoutput)).replace(/__IDENTIFIER__/g,this.paramidentifier)).replace(/__REQUEST__/g,this.paramrequest),"POST"===this.method&&(t=(t=t.replace(/__NAMESPACE__/g,this.namespaceByDefault)).replace(/__SCHEMALOCATION__/g,this.schemaLocationByDefault)),(t=t.replace(//g,this.__addDataInputs()))?(this.requestString=t,this.logger.trace("traduction tmpl",t),!0):(this.logger.warn("traduction tmpl : empty request !?"),!1)},__addDataInputs:function(){this.logger.trace("WPS::__addDataInputs ()");for(var t,e="GET"===this.method?this.template.get.input:this.template.post.input,i="GET"===this.method?";":"",o="",n=this,s=this.DataObject.getData(),a=0;a0)for(var a=o.getElementsByTagName("parsererror"),r=0;r0){var o=function(t){if(t.attributes.length>0){for(var e={},i=t.attributes,o=0;o0?e.index=e.filters.type[0]:e.index=e.filters.type),delete e.filters.type),e.filters.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),delete e.filters.bbox)),delete e.filterOptions),e.position&&(e.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),e.position.lon||(e.position.lon=e.position.x),delete e.position.x),e.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),e.position.lat||(e.position.lat=e.position.y),delete e.position.y)),e.returnFreeForm&&(this.logger.warn("The parameter 'returnFreeForm' is deprecated"),delete e.returnFreeForm),e.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete e.srs),e},Pi.prototype.buildRequest=function(t,e){var i={httpMethod:this.options.httpMethod,geocodeMethod:"search",query:this.options.query,index:this.options.index,returnTrueGeometry:this.options.returnTrueGeometry,position:this.options.position,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=pi.build(i),this.request?e.call(this,this.request):t.call(this,new Se(ye.getMessage("SERVICE_REQUEST_BUILD")))},Pi.prototype.analyzeResponse=function(t,e){if(this.response){var i={response:this.response,rawResponse:this.options.rawResponse,onError:t,onSuccess:e,scope:this};wi.build(i)}else t.call(this,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))};var bi=Pi;function Mi(t){if(!(this instanceof Mi))throw new TypeError(ye.getMessage("CLASS_CONSTRUCTOR","ReverseGeocode"));this.CLASSNAME="ReverseGeocode",this.logger=ve.getLogger("Gp.Services.ReverseGeocode"),this.logger.trace("[Constructeur ReverseGeocode (options)]");var e=this.patchOptionConvertor(t);if(e.serverUrl=e.serverUrl||"https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/reverse",Re.apply(this,[e]),e.searchGeometry)this.options.searchGeometry=e.searchGeometry;else if(!e.position)throw new Error(ye.getMessage("PARAM_MISSING","searchGeometry"));if(e.index||(this.options.index=e.index="StreetAddress"),e.filters)for(var i=Object.keys(e.filters),o=0;o0?e.index=e.filterOptions.type[0]:e.index=e.filterOptions.type),delete e.filterOptions.type),e.filterOptions.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),e.searchGeometry||(e.searchGeometry=this.bbox2Json(e.filterOptions.bbox)),delete e.filterOptions.bbox),e.filterOptions.circle&&(this.logger.warn("The parameter 'filterOptions.circle' is deprecated"),e.searchGeometry||(e.searchGeometry=this.circle2Json(e.filterOptions.circle)),delete e.filterOptions.circle),e.filterOptions.polygon&&(this.logger.warn("The parameter 'filterOptions.polygon' is deprecated"),e.searchGeometry||(e.searchGeometry=this.polygon2Json(e.filterOptions.polygon)),delete e.filterOptions.polygon),!e.filters&&Object.keys(e.filterOptions).length>0&&(e.filters=e.filterOptions),delete e.filterOptions),e.position&&(e.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),e.position.lon||(e.position.lon=e.position.x),delete e.position.x),e.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),e.position.lat||(e.position.lat=e.position.y),delete e.position.y)),e.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete e.srs),e},Mi.prototype.buildRequest=function(t,e){var i={httpMethod:this.options.httpMethod,geocodeMethod:"reverse",searchGeometry:this.options.searchGeometry,index:this.options.index,position:this.options.position,returnTrueGeometry:this.options.returnTrueGeometry,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=pi.build(i),this.request?e.call(this,this.request):t.call(this,new Se(ye.getMessage("SERVICE_REQUEST_BUILD")))},Mi.prototype.analyzeResponse=function(t,e){if(this.response){var i={response:this.response,rawResponse:this.options.rawResponse,onError:t,onSuccess:e,scope:this};wi.build(i)}else t.call(this,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))},Mi.prototype.bbox2Json=function(t){return{type:"Polygon",coordinates:[[[t.left,t.top],[t.right,t.top],[t.right,t.bottom],[t.left,t.bottom],[t.left,t.top]]]}},Mi.prototype.circle2Json=function(t){return{type:"Circle",radius:t.radius,coordinates:[t.x,t.y]}},Mi.prototype.polygon2Json=function(t){for(var e={type:"Polygon",coordinates:[[]]},i=0;i2?document.getElementById(e._addUID("GPlocationAutoCompleteList_"+o)).style.display="block":document.getElementById(e._addUID("GPlocationAutoCompleteList_"+o)).style.display="none",e.onAutoCompleteSearchText(t)}})),i.addEventListener("keydown",(function(i){var o=i.which||i.keyCode,n=document.getElementById(e._addUID("GPlocationAutoCompleteList_"+t));if(n){var s=n.getElementsByClassName("GPautoCompleteProposal current"),a=n.getElementsByClassName("GPautoCompleteProposal"),r=a.length;if(r){var l=null;if(!s.length)return(l=a[0]).className="GPautoCompleteProposal current",l.style.color="#000000",void(l.style["background-color"]="#CEDBEF");l=s[0];var h=parseInt(c.index(l.id),10),d=h===r-1?a[0]:a[h+1],u=0===h?a[r-1]:a[h-1];switch(l.style["background-color"]="",l.style.color="",u.style["background-color"]="",u.style.color="",d.style["background-color"]="",d.style.color="",o){case 38:ao.log("arrow up"),l.className="GPautoCompleteProposal",u.className="GPautoCompleteProposal current",u.style.color="#000000",u.style["background-color"]="#CEDBEF";break;case 40:ao.log("arrow down"),l.className="GPautoCompleteProposal",d.className="GPautoCompleteProposal current",d.style.color="#000000",d.style["background-color"]="#CEDBEF";break;case 13:ao.log("enter"),l.click(i)}l.focus()}}})),i},_createLocationCoordinateInputElement:function(t){var e=this,i=document.createElement("input");return i.id=this._addUID("GPlocationOriginCoords_"+t),i.className="GPlocationOriginHidden",i.type="text",i.disabled=!1,i.addEventListener("click",(function(){var t=c.index(this.id);document.getElementById(e._addUID("GPlocationOriginLabel_"+t)).click()})),i},_createLocationPointerShowInputElement:function(t){var e=document.createElement("input");return e.id=this._addUID("GPlocationOriginPointer_"+t),e.type="checkbox",e},_createLocationPointerInputElement:function(t){var e=this,i=document.createElement("label");return i.id=this._addUID("GPlocationOriginPointerImg_"+t),i.htmlFor=this._addUID("GPlocationOriginPointer_"+t),i.className="GPlocationOriginPointerImg",i.title="Pointer un lieu sur la carte",i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var i,o,n,s=c.index(this.id),a=document.getElementsByClassName(e._addUID("GPlocationPoint"));for(i=0;i",color:"blue",display:!0,addOption:!1,removeOption:!1},disableReverse:!1,displayInfo:!0,autocompleteOptions:{},reverseGeocodeOptions:{}},initialize:function(t){s.a.Util.setOptions(this,t),this._uid=this.options.tag.unique||null,this._activeDragAndDrop=!1,this._pressedKeyOnDragAndDrop=!1,this._map=null,this._inputsContainer=null,this._inputLabelContainer=null,this._inputAutoCompleteContainer=null,this._inputShowPointerContainer=null,this._inputCoordinateContainer=null,this._coordinate=null,this._suggestedContainer=null,this._suggestedLocations=[],this._currentLocation=null,this._marker=null,this._resources={},this._container=this._uid?this._initLayout():null},onAdd:function(){this._uid=c.generate();var t=this._initLayout();return s.a.DomEvent.disableClickPropagation(t).disableScrollPropagation(t),t},onRemove:function(){},getCoordinate:function(){return this._coordinate},setCoordinate:function(t){this._displayResultOfCoordinate(t)},setMap:function(t){this._map||(this._map=t)},clear:function(){this._setCursor(),this._setMarker(),this._clearResults(),this._inputLabelContainer.click()},dragging:function(t){this._marker&&(t?this._marker.dragging.enable():this._marker.dragging.disable())},_initLayout:function(){var t=this.options.tag.id,e=this._createMainContainerElement(),i=this._inputsContainer=this._createLocationPointElement(t,this.options.tag.display);e.appendChild(i);var o=this._inputLabelContainer=this._createLocationPointLabelElement(t,this.options.tag.label);i.appendChild(o);var n=this._inputAutoCompleteContainer=this._createLocationAutoCompleteteInputElement(t);i.appendChild(n);var s=this._inputCoordinateContainer=this._createLocationCoordinateInputElement(t);i.appendChild(s);var a=this._inputShowPointerContainer=this._createLocationPointerShowInputElement(t);i.appendChild(a);var r=this._createLocationPointerInputElement(t);if(i.appendChild(r),this.options.tag.addOption){var l=this._createLocationAddPointElement();i.appendChild(l)}if(this.options.tag.removeOption){var c=this._createLocationRemovePointElement(t);i.appendChild(c)}var h=this._suggestedContainer=this._createLocationAutoCompleteResultElement(t);return e.appendChild(h),e},_setLabel:function(t){this._inputAutoCompleteContainer.value=t||""},_setCoordinate:function(t){this._coordinate=t;var e;e=lo.roundToDecimal(t.lat,4);var i=lo.roundToDecimal(t.lng,4)+" , "+e;this.GPdisplayCoordinate(i)},_setPosition:function(t){uo.log("_setPosition()",t),this._map.panTo(s.a.latLng(t))},_setMarker:function(t,e,i){if(uo.log("_setMarker()",t,e,i),!this._activeDragAndDrop){var o=this._map;if(null!=this._marker&&(this._marker.off("mousedown",this.onMouseDownMarker,this),this._marker.off("dragstart",this.onStartDragMarker,this),this._marker.off("drag",this.onDragMarker,this),this._marker.off("dragend",this.onEndDragMarker,this),o.removeLayer(this._marker),this._marker=null),t){var n={icon:new ho(this.options.tag.color),draggable:!0,clickable:!0,zIndexOffset:1e3};if(this._marker=s.a.marker(s.a.latLng(t),n),this._marker.on("mousedown",this.onMouseDownMarker,this),this._marker.on("dragstart",this.onStartDragMarker,this),this._marker.on("drag",this.onDragMarker,this),this._marker.on("dragend",this.onEndDragMarker,this),this._marker.addTo(o),i){var a=null;a="string"!=typeof e?"GeocodedLocation"===e.service?so.getGeocodedLocationFreeform(e.location):"SuggestedLocation"===e.service?so.getSuggestedLocationFreeform(e.location):"sans informations.":e,this._marker.bindPopup(a)}}}},_setCursor:function(t){var e=this._map.getContainer();e.style.cursor=t||null},_clearResults:function(){this._currentLocation=null,this._coordinate=null,this._clearSuggestedLocation()},_clearSuggestedLocation:function(){if(this._suggestedLocations=[],this._suggestedContainer)for(;this._suggestedContainer.firstChild;)this._suggestedContainer.removeChild(this._suggestedContainer.firstChild)},_requestAutoComplete:function(t){if(uo.log("_requestAutoComplete()",t),t&&0!==Object.keys(t).length&&t.text){uo.log(t);var e={};s.a.Util.extend(e,this.options.autocompleteOptions),s.a.Util.extend(e,t),s.a.Util.extend(e,{apiKey:e.apiKey||this.options.apiKey}),uo.log(e),no.Services.autoComplete(e)}},_fillAutoCompletedLocationListContainer:function(t){if(uo.log("_fillAutoCompletedLocationListContainer()",t),t&&0!==t.length){var e=this._suggestedContainer;if(e.childElementCount)for(;e.firstChild;)e.removeChild(e.firstChild);for(var i=0;i=60&&(c=0,l+=1),l>=60&&(l=0,r+=1),{d:r,m:l,s:c,direction:e.charAt(o<0?1:0)}},toInteger:function(t,e){var i=parseInt(t,e||10);return!isNaN(i)&&isFinite(i)?i:null},isInteger:function(t){if(isNaN(t))return!1;var e=parseFloat(t);return(0|e)===e},toFloat:function(t){var e=parseFloat(t);return!isNaN(e)&&isFinite(e)?e:null}};function Eo(t){return(Eo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var wo={_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPmousePosition"),t.className="GPwidget",t},_createShowMousePositionElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowMousePosition"),t.type="checkbox",t},_createShowMousePositionPictoElement:function(t){var e=this,i=document.createElement("label");i.id=this._addUID("GPshowMousePositionPicto"),i.className="GPshowAdvancedToolPicto",i.htmlFor=this._addUID("GPshowMousePosition"),i.title="Afficher les coordonnées du curseur",i.addEventListener("click",(function(i){var o="";document.getElementById(e._addUID("GPshowMousePosition")).checked||t||(o="GPmapCenterVisible"),document.getElementById("GPmapCenter").className=o,e.onShowMousePositionClick(i)}));var o=document.createElement("span");return o.id=this._addUID("GPshowMousePositionOpen"),o.className="GPshowAdvancedToolOpen",i.appendChild(o),i},_createMousePositionPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPmousePositionPanel"),t.className="GPpanel",t},_createMapCenter:function(){var t=document.createElement("div");return t.id="GPmapCenter",t.className="",t},_createMousePositionPanelHeaderElement:function(){var t=document.createElement("div");t.className="GPpanelHeader";var e=document.createElement("div");e.className="GPpanelTitle",e.innerHTML="Coordonnées",t.appendChild(e);var i=document.createElement("div");i.id="GPmousePositionPanelClose",i.className="GPpanelClose",i.title="Fermer le panneau";var o=this;return i.addEventListener?i.addEventListener("click",(function(){document.getElementById(o._addUID("GPshowMousePositionPicto")).click()}),!1):i.attachEvent&&i.attachEvent("onclick",(function(){document.getElementById(o._addUID("GPshowMousePositionPicto")).click()})),t.appendChild(i),t},_createMousePositionPanelBasicElement:function(t,e,i,o){t=void 0===t||t,e=void 0===e||e,i=void 0!==i&&i;var n=document.createElement("div");return n.id=this._addUID("GPmousePositionBasicPanel"),n.appendChild(this._createMousePositionPanelBasicCoordinateElement(e,i,o)),n.appendChild(this._createMousePositionPanelEditToolsElement(i)),n.appendChild(this._createMousePositionPanelBasicAltitudeElement(t)),n},_createCoordinateElement:function(t,e){var i=this;if(-1===["Lon","Lat"].indexOf(t))return[];var o=[],n=document.createElement("input");n.id=this._addUID("GPmousePosition"+t),n.title=!0===e?"Cliquer pour saisir des coordonnées":"",n.readOnly=!0,e&&(n.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),n.addEventListener("change",(function(e){this.classList.remove("error"),i.validateExtentCoordinate(t,this.value,e)?this.classList.remove("error"):this.classList.add("error")}))),o.push(n);var s=document.createElement("span");return s.className="GPmousePositionUnits",o.push(s),o},_createDMSCoordinateElement:function(t,e){if(-1===["Lon","Lat"].indexOf(t))return[];var i=this,o=[],n=document.createElement("input");n.id=this._addUID("GPmousePosition"+t+"Degrees"),n.className="GPSexagesimal",n.setAttribute("name","degrees"),n.title=!0===e?"Cliquer pour saisir des coordonnées":"",n.readOnly=!0,n.dataset.min=0,n.dataset.max="Lon"===t?180:90,e&&(n.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),n.addEventListener("change",(function(){this.classList.remove("error"),i._checkDMSDegrees(t,this)?this.classList.remove("error"):this.classList.add("error")}))),o.push(n);var s=document.createElement("span");s.className="GPmousePositionSexagesimalLabel",s.innerHTML="°",o.push(s);var a=document.createElement("input");a.id=this._addUID("GPmousePosition"+t+"Minutes"),a.className="GPSexagesimal",a.setAttribute("name","minutes"),a.title=!0===e?"Cliquer pour saisir des coordonnées":"",a.readOnly=!0,a.dataset.min=0,a.dataset.max=59,e&&(a.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),a.addEventListener("change",(function(){this.classList.remove("error"),i._checkDMSElement(this)?this.classList.remove("error"):this.classList.add("error")}))),o.push(a);var r=document.createElement("span");r.className="GPmousePositionSexagesimalLabel",r.innerHTML="'",o.push(r);var l=document.createElement("input");l.id=this._addUID("GPmousePosition"+t+"Seconds"),l.className="GPSexagesimalsec",l.setAttribute("name","seconds"),l.title=!0===e?"Cliquer pour saisir des coordonnées":"",l.readOnly=!0,l.dataset.min=0,l.dataset.max=59,e&&(l.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),l.addEventListener("change",(function(){this.classList.remove("error"),i._checkDMSElement(this,!0)?this.classList.remove("error"):this.classList.add("error")}))),o.push(l);var c=document.createElement("span");c.className="GPmousePositionSexagesimalLabel",c.innerHTML="''",o.push(c);var h=document.createElement("select");h.id=this._addUID("GPmousePosition"+t+"Direction"),h.className="GPmousePositionDirection",h.setAttribute("name","direction"),h.disabled=!0;var d=document.createElement("option");d.value="Lon"===t?"E":"N",d.innerHTML="Lon"===t?"E":"N",h.appendChild(d);var u=document.createElement("option");return u.value="Lon"===t?"O":"S",u.innerHTML="Lon"===t?"O":"S",h.appendChild(u),o.push(h),o},_createMousePositionPanelBasicCoordinateElement:function(t,e,i){var o=document.createElement("div");o.id=this._addUID("GPmousePositionCoordinate"),o.style.display=t?"block":"none";var n=document.createElement("div"),s=document.createElement("span");s.className="GPmousePositionLabel",s.id=this._addUID("GPmousePositionLatLabel"),s.innerHTML="Latitude : ",n.appendChild(s);var a,r=document.createElement("span");r.id=this._addUID("GPmousePositionLatCoordinate"),a="DMS"===i?this._createDMSCoordinateElement("Lat",e):this._createCoordinateElement("Lat",e);for(var l=0;l=s&&n<=a},_checkDMSDegrees:function(t,e){if(isNaN(e.value))return!1;var i=parseFloat(e.value);if((0|i)!==i)return!1;var o=Number(e.dataset.min),n=Number(e.dataset.max);if(in)return!1;var s=document.getElementById(this._addUID("GPmousePosition"+t+"Minutes")),a=document.getElementById(this._addUID("GPmousePosition"+t+"Seconds"));return i>=n?(s.dataset.max=0,a.dataset.max=0):(s.dataset.max=59,a.dataset.max=59.9999),!0},GPdisplayCoords:function(t){if(t){var e=document.getElementById(this._addUID("GPmousePositionLonLabel")),i=document.getElementById(this._addUID("GPmousePositionLatLabel"));if(t.x||t.y?(i.innerHTML="X : ",e.innerHTML="Y : "):t.e||t.n?(i.innerHTML="E : ",e.innerHTML="N : "):(i.innerHTML="Latitude : ",e.innerHTML="Longitude : "),"object"===Eo(t.lat)&&"object"===Eo(t.lng)){var o={lng:"Lon",lat:"Lat"},n=["Degrees","Minutes","Seconds"];for(var s in o)for(var a=0;an[2]))return Ro.warn("coordinates (lon) out of extent !?"),!1;if("Lat"===t&&(a.latn[3]))return Ro.warn("coordinates (lat) out of extent !?"),!1}return!0},_getCoordinate:function(t){var e=s.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Degrees")),i=e.value;if(!i)return null;if(i=i.replace(",","."),!yo.isInteger(i))return null;var o=yo.toInteger(i);if(oNumber(e.dataset.max))return null;var n=s.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Direction")).value,a=s.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Minutes")),r=a.value;if(r&&(r=r.replace(",","."),yo.isInteger(r))){var l=yo.toInteger(r);l>=Number(a.dataset.min)&&l<=Number(a.dataset.max)&&(o+=l/60)}var c=s.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Seconds")),h=c.value;if(h){h=h.replace(",",".");var d=yo.toFloat(h);d&&d>=Number(c.dataset.min)&&d<=Number(c.dataset.max)&&(o+=d/3600)}return"O"!==n&&"S"!==n||(o=-o),o},_locateDMSCoordinates:function(){var t={lat:this._getCoordinate("Lat"),lng:this._getCoordinate("Lon")};this.validateExtentCoordinate("Lon",t.lng)&&(this.validateExtentCoordinate("Lat",t.lat)&&this._map.panTo(t))},_locateCoordinates:function(){var t=s.a.DomUtil.get(this._addUID("GPmousePositionLon")).value;if(t=t.replace(",","."),t=parseFloat(t),!isNaN(t)){var e=s.a.DomUtil.get(this._addUID("GPmousePositionLat")).value;if(e=e.replace(",","."),e=parseFloat(e),!isNaN(e)){var i=null,o=null,n=null,a=null;if("Geographical"===this._currentProjectionType?(i=t,o=e):(n=e,a=t),this.validateExtentCoordinate("Lon",i||n)&&this.validateExtentCoordinate("Lat",o||a)){var r=this._currentProjectionUnits,l=this._unproject({x:this._convertCoordinate(null!==i?i:n,r),y:this._convertCoordinate(null!==o?o:a,r)});this._map.panTo(l)}}}},onMousePositionEditModeLocateClick:function(){this.options.editCoordinates&&(this._isEditing?"DMS"===this._currentProjectionUnits?this._locateDMSCoordinates():this._locateCoordinates():this.onMousePositionEditModeClick(!0))},onMousePositionProjectionSystemChange:function(t){Ro.log("onMousePositionProjectionSystemChange",t);var e=t.target.selectedIndex,i=t.target.options[e].value,o=t.target.options[e].label;Ro.log(e,i,o),this._setCurrentSystem(i)},_setCurrentSystem:function(t){for(var e=null,i=0;in.geoBBox.right||e.getBounds()._southWest.lat>n.geoBBox.top||e.getBounds()._northEast.lng1e3&&(Do.log("INFO : initial circle radius ("+this._requestGeom.radius+") limited to 1000m."),this._requestGeom.radius=1e3),i.searchGeometry=this._requestGeom):"polygon"===this._requestGeom.type.toLowerCase()?i.searchGeometry=this._requestGeom:"point"===this._requestGeom.type.toLowerCase()&&("StreetAddress"===this._currentGeocodingType?(i.searchGeometry={type:"Circle",radius:50,coordinates:this._requestGeom.coordinates},i.maximumResponses=1):i.searchGeometry=this._requestGeom),Do.log("reverseGeocode request options : ",i),this._displayWaitingContainer(),no.Services.reverseGeocode(i)},_displayGeocodedLocations:function(t){var e=this._map;this._clearLocations(),this._clearLocationsFeature(e),this._reverseGeocodingLocations=t,t&&0!==t.length?(this._formContainer.className="GPreverseGeocodingComponentHidden",this._hideWaitingContainer(),this._panelTitleContainer.innerHTML="Résultats de la recherche",this._returnPictoContainer.className="",this._resultsContainer.className="GPpanel",this._fillGeocodedLocationListContainer(t),this._displayGeocodedLocationsOnMap(t),e.fitBounds(this._inputResultsLayer.getBounds())):this._clearInputRequest()},_fillGeocodedLocationListContainer:function(t){for(var e=0;e",d=r.placeAttributes;for(var u in d)d.hasOwnProperty(u)&&"trueGeometry"!==u&&"extraFields"!==u&&"houseNumberInfos"!==u&&"_count"!==u&&(h+="
  • ",h+=''+u.toUpperCase()+" : ",h+=d[u],h+="
  • ");h+=" ",c.bindPopup(h),c.on("mouseover",o),c.on("mouseout",n),c.on("click",(function(t){i.fire("reverse:onclickresult",{data:t.target.options.data})})),this._inputResultsLayer.addLayer(c)}}},onShowReverseGeocodingClick:function(){var t=this._map;this._showReverseGeocodingContainer.checked?this._removeMapInteraction(t):this._waiting||this._reverseGeocodingLocations.length||this._activateMapInteraction(t)},onReverseGeocodingTypeChange:function(t){var e=t.target.selectedIndex,i=t.target.options[e].value;i&&(Do.log(i),this._currentGeocodingType=i)},onReverseGeocodingDelimitationChange:function(t){var e=t.target.selectedIndex,i=t.target.options[e].value;if(i){Do.log(i),this._currentGeocodingDelimitation=i,this._clearInputRequest();var o=this._map;this._removeMapInteraction(o),this._activateMapInteraction(o)}},onGPreverseGeocodingReturnPictoClick:function(){var t=this._map;this._clearLocations(),this._clearLocationsFeature(t),this._clearInputRequest(),this._activateMapInteraction(t)},onReverseGeocodingSubmit:function(){if(this._requestGeom){var t=this._map,e=this;this._reverseGeocodingRequest({index:e._currentGeocodingType,onSuccess:function(i){if(Do.log(i),i){var o=i.locations;e._displayGeocodedLocations(o),e._hideWaitingContainer(),0===o.length&&e._activateMapInteraction(t)}},onFailure:function(i){e._hideWaitingContainer(),e._clearLocations(),e._clearLocationsFeature(t),e._clearInputRequest(),e._activateMapInteraction(t),Do.log(i.message)}})}else Do.log("missing search geometry")},onReverseGeocodingResultClick:function(t){var e=c.index(t.target.id);this._inputResultsLayer&&this._inputResultsLayer.eachLayer((function(t){t.options.id===parseInt(e,10)&&t.fire("click")}))},onReverseGeocodingResultMouseOver:function(t){var e=c.index(t.target.id);t.target.classList&&t.target.classList.add("GPreverseGeocodedLocationHighlight"),this._inputResultsLayer&&this._inputResultsLayer.eachLayer((function(t){t.options.id===parseInt(e,10)&&t.fire("mouseover")}))},onReverseGeocodingResultMouseOut:function(t){var e=c.index(t.target.id);t.target.classList&&t.target.classList.remove("GPreverseGeocodedLocationHighlight"),this._inputResultsLayer&&this._inputResultsLayer.eachLayer((function(t){t.options.id===parseInt(e,10)&&t.fire("mouseout")}))},_clearLocations:function(){if(this._reverseGeocodingLocations=[],this._resultsListContainer)for(;this._resultsListContainer.firstChild;)this._resultsListContainer.removeChild(this._resultsListContainer.firstChild)},_clearLocationsFeature:function(t){null!==this._inputResultsLayer&&(t.removeLayer(this._inputResultsLayer),this._inputResultsLayer=null)},_clearInputRequest:function(){this._requestPosition=null,this._requestCircleFilter=null,this._requestBboxFilter=null},_displayWaitingContainer:function(){this._waitingContainer.className="GPreverseGeocodingCalcWaitingContainerVisible",this._waiting=!0,this._timer&&(clearTimeout(this._timer),this._timer=null);var t=this;this._timer=setTimeout((function(){!0===t._waiting?t._hideWaitingContainer():t._timer&&clearTimeout(t._timer)}),16e3)},_hideWaitingContainer:function(){this._waiting&&(this._waitingContainer.className="GPreverseGeocodingCalcWaitingContainerHidden",this._waiting=!1,clearTimeout(this._timer),this._timer=null)}});s.a.extend(Oo.prototype,s.a.Evented.prototype);var No=Oo,Uo=l.getLogger("RouteDOM"),jo={_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProute"),t.className="GPwidget",t},_createShowRouteElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowRoute"),t.type="checkbox",t},_createShowRoutePictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowRoutePicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowRoute"),e.title="Ouvrir le calcul d'itinéraire",e.addEventListener?e.addEventListener("click",(function(e){t.onShowRoutePanelClick(e)})):e.attachEvent&&e.attachEvent("onclick",(function(e){t.onShowRoutePanelClick(e)}));var i=document.createElement("span");return i.id=this._addUID("GPshowRouteOpen"),i.className="GPshowAdvancedToolOpen",e.appendChild(i),e},_createRoutePanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProutePanel"),t.className="GPpanel",t},_createRoutePanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var i=document.createElement("div");i.className="GPpanelTitle",i.innerHTML="Calcul d'itinéraire",e.appendChild(i);var o=document.createElement("div");return o.id=this._addUID("GProutePanelClose"),o.className="GPpanelClose",o.title="Masquer le panneau",o.addEventListener?o.addEventListener("click",(function(){document.getElementById(t._addUID("GPshowRoutePicto")).click()}),!1):o.attachEvent&&o.attachEvent("onclick",(function(){document.getElementById(t._addUID("GPshowRoutePicto")).click()})),e.appendChild(o),e},_createRoutePanelFormElement:function(){var t=this,e=document.createElement("form");return e.id=this._addUID("GProuteForm"),e.setAttribute("onkeypress","return event.keyCode != 13;"),e.addEventListener("submit",(function(e){Uo.log(e),e.preventDefault();var i=document.getElementsByClassName(t._addUID("GPlocationPoint")),o=i[0].childNodes[0].id,n=i[i.length-1].childNodes[0].id,s=c.index(o),a=c.index(n);if(""===document.getElementById(t._addUID("GPlocationOrigin_"+s)).value&&""===document.getElementById(t._addUID("GPlocationOriginCoords_"+s)).value||""===document.getElementById(t._addUID("GPlocationOrigin_"+a)).value&&""===document.getElementById(t._addUID("GPlocationOriginCoords_"+a)).value)return!1;t._addRouteResultsStagesValuesElement(i);var r=null;if(document.getElementById(t._addUID("GProuteComputationSelect"))){var l=document.getElementById(t._addUID("GProuteResultsComputationSelect"));l.selectedIndex=document.getElementById(t._addUID("GProuteComputationSelect")).selectedIndex,r=l.options[l.selectedIndex].value}var h=null;document.getElementById(t._addUID("GProuteTransportCar"))&&document.getElementById(t._addUID("GProuteTransportCar")).checked&&(h=document.getElementById(t._addUID("GProuteTransportCar")).value),document.getElementById(t._addUID("GProuteTransportPedestrian"))&&document.getElementById(t._addUID("GProuteTransportPedestrian")).checked&&(h=document.getElementById(t._addUID("GProuteTransportPedestrian")).value);for(var d=[],u=document.getElementsByClassName("GProuteExclusionsOption"),p=0;p2?document.getElementById("GProuteAutoCompleteList"+i).style.display="block":document.getElementById("GProuteAutoCompleteList"+i).style.display="none",o.onAutoCompleteSearchText(t)}})),a.addEventListener("blur",(function(){var t=this.id.charAt(this.id.length-1);document.getElementById("GProuteAutoCompleteList"+t).style.display="none"})),n.appendChild(a);var r=document.createElement("input");r.id="GProuteOriginCoords"+t,r.className="GProuteOriginHidden",r.type="text",r.disabled=!0,n.appendChild(r);var l=document.createElement("input");l.id="GProuteOriginPointer"+t,l.type="checkbox",n.appendChild(l);var c=document.createElement("label");return c.id="GProuteOriginPointerImg"+t,c.htmlFor="GProuteOriginPointer"+t,c.className="GProuteOriginPointerImg",c.title="Pointer un lieu sur la carte",c.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e,i=this.id.charAt(this.id.length-1);for(e=1;e<8;e++)i!==e&&(document.getElementById("GProuteOriginPointer"+e).checked=!1,"Pointer un lieu sur la carte"===document.getElementById("GProuteOriginCoords"+e).value&&(document.getElementById("GProuteOriginCoords"+e).value="",document.getElementById("GProuteOrigin"+e).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+e).className="GProuteOriginHidden"));if(document.getElementById("GProuteOriginPointer"+i).checked){for(document.getElementById("GProuteOriginCoords"+i).value="",e=1;e<8;e++)document.getElementById("GProutePoint"+e).style.display="flex";document.getElementById("GProuteForm").className="",document.getElementById("GProuteOriginPointer"+i).checked=!1,document.getElementById("GProuteOrigin"+i).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+i).className="GProuteOriginHidden"}else{for(document.getElementById("GProuteOriginCoords"+i).value="Pointer un lieu sur la carte",e=1;e<8;e++)document.getElementById("GProutePoint"+e).style.display=i===e?"flex":"none";document.getElementById("GProuteForm").className="GProuteFormMini",document.getElementById("GProuteOriginPointer"+i).checked=!0,document.getElementById("GProuteOrigin"+i).className="GProuteOriginHidden",document.getElementById("GProuteOriginCoords"+i).className="GProuteOriginVisible"}o.onRouteMapPointClick(t)})),n.appendChild(c),n},_createRoutePanelFormRemoveStageElement:function(t){var e=this,i=document.createElement("div");return i.id="GProuteStageRemove"+t,i.className="GProuteStageRemove",i.title="Supprimer l'étape",1!==t&&7!==t&&i.addEventListener("click",(function(t){var i=this.id.charAt(this.id.length-1);document.getElementById("GProutePoint"+i).className="GPflexInput GProuteStageFlexInputHidden",document.getElementById("GProuteOrigin"+i).value="",document.getElementById("GProuteOrigin"+i).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+i).value="",document.getElementById("GProuteOriginCoords"+i).className="GProuteOriginHidden",document.getElementById("GProuteStageAdd").style.display="",e.onRouteRemovePointClick(t)})),i},_createRoutePanelFormAddStageElement:function(){var t=this,e=document.createElement("div");return e.id="GProuteStageAdd",e.title="Ajouter une étape",e.addEventListener("click",(function(e){for(var i=1,o=0,n=2;n<7;n++)"GPflexInput GProuteStageFlexInputHidden"===document.getElementById("GProutePoint"+n).className?1===i&&(i=n):o++;i<7&&(document.getElementById("GProutePoint"+i).className="GPflexInput GProuteStageFlexInput"),4===o&&(document.getElementById("GProuteStageAdd").style.display="none"),t.onRouteAddPointClick(e)})),e},_createRoutePanelFormAutoCompleteListElement:function(t){var e=this,i=document.createElement("div");return i.id="GProuteAutoCompleteList"+t,i.className="GPadvancedAutoCompleteList",i.addEventListener?i.addEventListener("click",(function(i){e.onAutoCompletedResultsItemClick(i),document.getElementById("GProuteAutoCompleteList"+t).style.display="none"}),!1):i.attachEvent&&i.attachEvent("onclick",(function(i){e.onAutoCompletedResultsItemClick(i),document.getElementById("GProuteAutoCompleteList"+t).style.display="none"})),i},_createRouteAutoCompletedLocationElement:function(t,e,i){var o=document.getElementById("GProuteAutoCompleteList"+e),n=document.createElement("div");n.id="AutoCompletedLocation"+i,n.className="GPautoCompleteProposal",n.innerHTML=so.getSuggestedLocationFreeform(t),o.appendChild(n)},_createRoutePanelFormModeChoiceElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProuteModeChoice"),t},_createRoutePanelFormModeChoiceTransportElement:function(t){var e=this,i=document.createElement("div");i.id=this._addUID("GProuteTransportChoice");var o=document.createElement("span");o.className="GProuteModeLabel",o.innerHTML="Mode de transport",i.appendChild(o);for(var n=0;n2?document.getElementById(e._addUID("GPautoCompleteList")).style.display="block":document.getElementById(e._addUID("GPautoCompleteList")).style.display="none",e.onAutoCompleteSearchText(t))})),o.addEventListener("keydown",(function(t){var i=t.which||t.keyCode,o=document.getElementById(e._addUID("GPautocompleteResults"));if(o){var n=o.getElementsByClassName("GPautoCompleteProposal current"),s=o.getElementsByClassName("GPautoCompleteProposal"),a=s.length;if(a){var r=null;if(!n.length)return(r=s[0]).className="GPautoCompleteProposal current",r.style.color="#000000",void(r.style["background-color"]="#CEDBEF");r=n[0];var l=parseInt(c.index(r.id),10),h=l===a-1?s[0]:s[l+1],d=0===l?s[a-1]:s[l-1];switch(r.style["background-color"]="",r.style.color="",d.style["background-color"]="",d.style.color="",h.style["background-color"]="",h.style.color="",i){case 38:r.className="GPautoCompleteProposal",d.className="GPautoCompleteProposal current",d.style.color="#000000",d.style["background-color"]="#CEDBEF";break;case 40:r.className="GPautoCompleteProposal",h.className="GPautoCompleteProposal current",h.style.color="#000000",h.style["background-color"]="#CEDBEF";break;case 13:t.preventDefault(),r.click(t)}r.focus()}}})),i.appendChild(o);var n=document.createElement("div");return n.id=this._addUID("GPsearchInputReset"),n.addEventListener("click",(function(){document.getElementById(e._addUID("GPsearchInputText")).value="",document.getElementById(e._addUID("GPautoCompleteList")).style.display="none",document.getElementById(e._addUID("GPgeocodeResultsList")).style.display="none",e.onSearchResetClick()})),i.appendChild(n),i},_createShowAdvancedSearchElement:function(){var t=this,e=document.createElement("div");e.id=this._addUID("GPshowAdvancedSearch"),e.className="GPshowAdvancedToolPicto",e.title="Ouvrir la recherche avancée",e.addEventListener("click",(function(){var e="#GPsearchInput-"+t._uid;document.querySelector(e+" input").disabled=!0,document.getElementById(t._addUID("GPautoCompleteList")).style.display="none",document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",document.getElementById(t._addUID("GPshowAdvancedSearch")).style.display="none",document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="inline-block"}));var i=document.createElement("span");return i.id=this._addUID("GPshowAdvancedSearchOpen"),i.className="GPshowAdvancedToolOpen",e.appendChild(i),e},_createAdvancedSearchPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPadvancedSearchPanel"),t.className="GPpanel",t.style.display="none",t},_createGeocodeResultsElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPgeocodeResultsList"),t.className="GPpanel",t.style.display="none",t.appendChild(this._createGeocodeResultsHeaderElement()),t},_createAutoCompleteElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPautoCompleteList"),t.className="GPautoCompleteList",t.style.display="none",t},_createAutoCompleteListElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPautocompleteResults"),e.addEventListener?e.addEventListener("click",(function(e){t.onAutoCompletedResultsItemClick(e),document.getElementById(t._addUID("GPautoCompleteList")).style.display="none"}),!1):e.attachEvent&&e.attachEvent("onclick",(function(e){t.onAutoCompletedResultsItemClick(e),document.getElementById(t._addUID("GPautoCompleteList")).style.display="none"})),e},_createAutoCompletedLocationElement:function(t,e){var i=document.getElementById(this._addUID("GPautocompleteResults")),o=document.createElement("div");o.id=this._addUID("AutoCompletedLocation_"+e),o.className="GPautoCompleteProposal",o.innerHTML=so.getSuggestedLocationFreeform(t),o.addEventListener?o.addEventListener("click",(function(t){i.click(t)}),!1):o.attachEvent&&o.attachEvent("onclick",(function(t){i.click(t)})),i.appendChild(o)},_createAdvancedSearchPanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var i=document.createElement("div");i.className="GPpanelTitle",i.innerHTML="Recherche avancée",e.appendChild(i);var o=document.createElement("div");return o.id=this._addUID("GPadvancedSearchClose"),o.className="GPpanelClose",o.title="Fermer la recherche avancée",o.addEventListener?o.addEventListener("click",(function(){var e="#GPsearchInput-"+t._uid;document.querySelector(e+" input").disabled=!1,document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",document.getElementById(t._addUID("GPshowAdvancedSearch")).style.display="inline-block",document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="none"}),!1):o.attachEvent&&o.attachEvent("onclick",(function(){var e="#GPsearchInput-"+t._uid;document.querySelector(e+" input").disabled=!1,document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",document.getElementById(t._addUID("GPshowAdvancedSearch")).style.display="inline-block",document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="none"})),e.appendChild(o),e},_createAdvancedSearchPanelFormElement:function(t){var e=this,i=document.createElement("form");i.id=this._addUID("GPadvancedSearchForm"),i.addEventListener("submit",(function(t){t.preventDefault();for(var i=[],o="#GPadvancedSearchFilters-"+e._uid,n=document.querySelectorAll(o+" > div > div > input"),s=0;sa&&(Vo.trace("zoom level max..."),o=a),Vo.trace("zoom",o),o},_setMarker:function(t,e,i,o){var n=this._map;if(null!=this._marker&&(n.removeLayer(this._marker),this._marker=null),t){var a=null;"string"==typeof o?a=new ho(o):o instanceof s.a.Icon?a=o:(a=new ho("blue"),Vo.log("Utilisation du marker par défaut !"));var r={clickable:!0,zIndexOffset:1e3,icon:a};if(this._marker=s.a.marker(s.a.latLng(t),r),this._marker.addTo(n),i){var l=null;if("string"!=typeof e)if("GeocodedLocation"===e.service){l="
      ";var c=e.location.placeAttributes;for(var h in c)c.hasOwnProperty(h)&&"trueGeometry"!==h&&"extraFields"!==h&&"houseNumberInfos"!==h&&"_count"!==h&&(l+="
    • ",l+=''+h.toUpperCase()+" : ",l+=c[h],l+="
    • ");l+="
    "}else l="SuggestedLocation"===e.service?so.getSuggestedLocationFreeform(e.location):"sans informations.";else l=e;this._marker.bindPopup(l)}}},_clearResults:function(){this._currentGeocodingLocation=null,this._clearSuggestedLocation(),this._clearGeocodedLocation(),this._setMarker()},_clearSuggestedLocation:function(){if(this._suggestedLocations=[],this._suggestedContainer)for(;this._suggestedContainer.firstChild;)this._suggestedContainer.removeChild(this._suggestedContainer.firstChild)},_clearGeocodedLocation:function(){if(this._geocodedLocations=[],this._geocodedContainer)for(;this._geocodedContainer.firstChild;)this._geocodedContainer.removeChild(this._geocodedContainer.firstChild)},onShowSearchEngineClick:function(){},onSearchResetClick:function(){this._clearResults()},onAutoCompleteSearchText:function(t){var e=t.target.value;if(e&&(this._currentGeocodingLocation=e,!(e.length<3))){var i=this.options.autocompleteOptions.triggerGeocode,o=this.options.autocompleteOptions.triggerDelay,n=this;this._requestAutoComplete({text:e,onSuccess:function(t){if(Vo.log("request from AutoComplete",t),t){n._suggestedLocations=t.suggestedLocations,n._locationsToBeDisplayed=[];for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:null,o=this.canvas||(this.canvas=document.createElement("canvas")),n=o.getContext("2d");n.font=null===i?"".concat(this._getCssProperty(e,"font-weight")," ").concat(this._getCssProperty(e,"font-size")," ").concat(this._getCssProperty(e,"font-family")):i;var s=n.measureText(t);return s.width},_dataZToSvgY:function(t,e,i,o){return e-(t-i)*o-.5},_dataDistToSvgX:function(t,e,i,o){return e-i+t*o},_svgXToDataDist:function(t,e,i,o){return(t+i-e)/o},_arrayBisect:function(t,e){var i;if(0===t.length)return 0;for(i=0;iS&&(L=Math.pow(10,Math.ceil(Math.log((p-u)/S)/Math.log(10))),x=Math.floor(u/L)*L,(G=Math.ceil(p/L)*L)===p&&(G+=L),x=Math.round(100*x)/100,G=Math.round(100*G)/100,I=Math.floor((G-x)/L)),I=Math.max(Math.round(I),1);var k=document.createElementNS("http://www.w3.org/2000/svg","g");k.setAttribute("class","profile-z-vertical");var R,T,A,D,O,N,U,j=document.createElementNS("http://www.w3.org/2000/svg","g"),F=b/I;R=p===u?b/.2:b/(G-x);for(var z=0;z<=I;z++)(T=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("class","profile-z-graduation"),T.setAttribute("font-family","Verdana"),T.setAttribute("font-size","10px"),T.setAttribute("fill","#5E5E5E"),T.textContent=(Math.round(100*(x+z*L))/100).toLocaleString(),A=b-z*F,T.setAttribute("transform","translate(".concat(17+w-8,", ").concat(A+5,")")),T.setAttribute("text-anchor","end"),k.appendChild(T),D=Math.round(A)-.5,O=document.createElementNS("http://www.w3.org/2000/svg","g"),(N=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),N.setAttribute("stroke-width","1"),0!==z?N.setAttribute("stroke-opacity","0.2"):N.setAttribute("stroke-opacity","1"),N.setAttribute("stroke","#000000"),N.setAttribute("fill","none"),N.setAttribute("d","M".concat(17+w,",").concat(D," L").concat(M+17+w,",").concat(D)),(U=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),U.setAttribute("stroke-width","1"),U.setAttribute("stroke-opacity","1"),U.setAttribute("stroke","#000000"),U.setAttribute("fill","none"),U.setAttribute("d","M".concat(17+w,",").concat(D," L").concat(17+w+5,",").concat(D)),U.setAttribute("transform","translate(-5, 0)"),O.appendChild(U),O.appendChild(N),j.appendChild(O);var B=document.createElementNS("http://www.w3.org/2000/svg","text");B.setAttribute("class","profile-z-legend"),B.setAttribute("font-family","Verdana"),B.setAttribute("font-size","11px"),B.setAttribute("fill","#5E5E5E"),B.textContent="Altitude (m)",B.setAttribute("transform","translate(".concat(9,", ").concat(Math.round(b/2),") rotate(-90)")),B.setAttribute("text-anchor","middle"),k.appendChild(B),C.appendChild(k),C.appendChild(j),m>2e3&&(m/=1e3,f="km");var W=Math.floor(M/P),q=Math.pow(10,Math.ceil(Math.log(m/W)/Math.log(10)))/2,H=m,V=Math.floor(H/q);V>W?(q=Math.pow(10,Math.ceil(Math.log(m/W)/Math.log(10))),V=Math.floor(H/q)):V<1&&(q=Math.pow(10,Math.ceil(Math.log(m/W)/Math.log(10))-1),V=Math.floor(H/q));var Y=q*(V=Math.max(V,1)),X=document.createElementNS("http://www.w3.org/2000/svg","g");X.setAttribute("class","profile-x-vertical");for(var K,Z,J,Q,$,tt,et=document.createElementNS("http://www.w3.org/2000/svg","g"),it=M/H,ot=(H-Y)*it,nt=Math.round((M-ot)/V),st=0;st<=V+1;st++)(K=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("class","profile-x-graduation"),K.setAttribute("font-family","Verdana"),K.setAttribute("font-size","10px"),K.setAttribute("fill","#5E5E5E"),st!==V+1&&(K.textContent=(Math.round(100*st*q)/100).toLocaleString()),Z=17+w+st*nt,st===V+1&&(Z=17+w+M),K.setAttribute("transform","translate(".concat(Z,", ").concat(b+15+5,")")),K.setAttribute("text-anchor","middle"),X.appendChild(K),J=Z-.5,Q=document.createElementNS("http://www.w3.org/2000/svg","g"),($=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),$.setAttribute("stroke-width","1"),0!==st?$.setAttribute("stroke-opacity","0.2"):$.setAttribute("stroke-opacity","1"),$.setAttribute("stroke","#000000"),$.setAttribute("fill","none"),$.setAttribute("d","M".concat(J,",").concat(b," L").concat(J,",0")),(tt=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),tt.setAttribute("stroke-width","1"),tt.setAttribute("stroke-opacity","1"),tt.setAttribute("stroke","#000000"),tt.setAttribute("fill","none"),tt.setAttribute("d","M".concat(J,",").concat(b," L").concat(J,",").concat(b-5)),tt.setAttribute("transform","translate(0, 5)"),Q.appendChild(tt),Q.appendChild($),et.appendChild(Q);var at=document.createElementNS("http://www.w3.org/2000/svg","text");at.setAttribute("class","profile-x-legend"),at.setAttribute("font-family","Verdana"),at.setAttribute("font-size","11px"),at.setAttribute("fill","#5E5E5E"),at.textContent="Distance (".concat(f,")"),at.setAttribute("transform","translate(".concat(17+w+M/2,", ").concat(b+15+17+3,")")),at.setAttribute("text-anchor","middle"),X.appendChild(at),C.appendChild(X),C.appendChild(et);var rt=document.createElementNS("http://www.w3.org/2000/svg","g"),lt=1;"km"===f&&(lt=1e3);for(var ct=this._dataDistToSvgX(h[0].dist/lt,E,M,it),ht=this._dataZToSvgY(h[0].z,b,x,R),dt="M".concat(ct,",").concat(ht),ut=1;utl.dist-s&&(c=l);var d=this._dataDistToSvgX(c.dist/lt,E,M,it),u=this._dataZToSvgY(c.z,b,x,R);Et.setAttribute("cx",d),Et.setAttribute("cy",u),vt.setAttribute("x1",d),vt.setAttribute("y1",b),vt.setAttribute("x2",d),vt.setAttribute("y2",0),yt.setAttribute("x1",17+w),yt.setAttribute("y1",u),yt.setAttribute("x2",M+17+w),yt.setAttribute("y2",u),o.__updateProfileMarker(n,c);var p="Altitude : ".concat(c.z.toLocaleString()," m"),f="Pente : ".concat(c.slope," %"),g="(lat : ".concat(c.lat.toLocaleString()," / lon : ").concat(c.lon.toLocaleString(),")");Pt.innerHTML=p,bt.innerHTML=f,Mt.innerHTML=g;var _,v=Math.max(this._getTextWidth(g,Mt),this._getTextWidth(p,Pt));c.dist>m*lt/2?(_="M -0.5 -0.5 l -6 6 l 0 16 l -".concat(v+10," 0 l 0 -44 l ").concat(v+10," 0 l 0 16 l 6 6"),wt.setAttribute("transform","translate(".concat(-(v/2+12),",0)"))):c.dist<=m*lt/2&&(_="M -0.5 -0.5 l 6 6 l 0 16 l ".concat(v+10," 0 l 0 -44 l -").concat(v+10," 0 l 0 16 l -6 6"),wt.setAttribute("transform","translate(".concat(v/2+12,",0)"))),Lt.setAttribute("d",_),St.setAttribute("d",_),Ct.setAttribute("transform","translate(".concat(d,",").concat(u,")")),Ct.style.transform="translate(".concat(d,"px,").concat(u,"px)")}.bind(this)),ft.appendChild(gt),C.appendChild(ft),g.appendChild(C),e}},displayProfileRaw:function(t,e,i,o){if(e){for(;e.firstChild;)e.removeChild(e.firstChild);var n=t&&t.points?t.points:{},s=document.createElement("textarea");return s.id="profilElevationResults",s.rows=10,s.cols=50,s.style.width="100%",s.innerHTML=JSON.stringify(n,void 0,4),s.addEventListener("mouseover",(function(t){o.__customRawProfileMouseOverEvent(i,t)})),e.appendChild(s),e}},displayProfileLibD3:function(t,e,i,o){var n=i;if(e&&t){for(;e.firstChild;)e.removeChild(e.firstChild);var s=t.points;if(t.distance>2e3){t.unit="km";for(var a=0;al[0]-e?l:a,h=g(c.dist),d=_(c.z);C.select("#focusCircle").attr("cx",h).attr("cy",d),C.select("#focusLineX").attr("x1",h).attr("y1",_(M[0])).attr("x2",h).attr("y2",_(M[1])),C.select("#focusLineY").attr("x1",g(b[0])).attr("y1",d).attr("x2",g(b[1])).attr("y2",d),o.__updateProfileMarker(n,c),L.transition().duration(200).style("opacity",.9);var u="";u+=" Altitude : "+c.z+" m",r.currentSlope&&(u+="
    Pente : "+c.slope+" %"),u+="
    (Lat : "+c.lat+"/ Lon : "+c.lon+")",L.html(u).style("left",d3.event.pageX+"px").style("top",d3.event.pageY-28+"px")})),P}},displayProfileLibAmCharts:function(t,e,i,o){var n=i;if(e&&t){var s=t.points,a="[[title]] : [[value]]m
    ";if(n.options.displayProfileOptions.currentSlope&&(a+="Pente : [[slope]] %
    "),a+="(Lat: [[lat]] / Lon:[[lon]])",AmCharts.addInitHandler((function(){})),t.distance>2e3){t.unit="km";for(var r=0;r100?h=1:c>10&&(h=10),c=Math.round(c*h)/h,s[l].dist=c}var d={type:"serial",pathToImages:"http://cdn.amcharts.com/lib/3/images/",categoryField:"dist",autoMarginOffset:0,marginRight:10,marginTop:10,startDuration:0,color:"#5E5E5E",fontSize:8,theme:"light",thousandsSeparator:"",numberFormatter:{precision:-1,decimalSeparator:",",thousandsSeparator:" "},categoryAxis:{color:"#5E5E5E",gridPosition:"start",minHorizontalGap:40,tickPosition:"start",title:"Distance ("+t.unit+")",titleColor:"#5E5E5E",labelOffset:0,startOnAxis:!0},chartCursor:{animationDuration:0,bulletsEnabled:!0,bulletSize:10,categoryBalloonEnabled:!1,cursorColor:"#F90",graphBulletAlpha:1,graphBulletSize:1,zoomable:!1},trendLines:[],graphs:[{balloonColor:"#CCCCCC",balloonText:a,bullet:"round",bulletAlpha:0,bulletBorderColor:"#FFF",bulletBorderThickness:2,bulletColor:"#F90",bulletSize:6,hidden:!1,id:"AmGraph-1",fillAlphas:.4,fillColors:"#C77A04",lineAlpha:1,lineColor:"#C77A04",lineThickness:1,title:"Altitude",valueField:"z"}],guides:[],valueAxes:[{id:"ValueAxis-1",minVerticalGap:20,title:"Altitude (m)"}],balloon:{borderColor:"#CCCCCC",borderThickness:1,fillColor:"#FFFFFF",showBullet:!0},titles:[],allLabels:[],dataProvider:s},u=AmCharts.makeChart(e,d);return u.addListener("changed",(function(t){var e=t.chart.dataProvider[t.index];o.__updateProfileMarker(n,e)})),u}}},Jo=l.getLogger("ElevationPath"),Qo=s.a.Control.extend({includes:Ko,options:{position:"topleft",active:!1,elevationPathOptions:{},stylesOptions:{},displayProfileOptions:{greaterSlope:!0,meanSlope:!0,ascendingElevation:!0,descendingElevation:!0,currentSlope:!0,apply:null,target:null}},initialize:function(t){s.a.Util.setOptions(this,t),this._uid=c.generate(),this._initDisplayProfileOptions(),this._showContainer=null,this._pictoContainer=null,this._panelContainer=null,this._profilContainer=null,this._waitingContainer=null,this._infoContainer=null,this._timerHdlr=null,this._reducePanel=!1,this._featuresLayer=null,this._lastIdLayer=0,this._currentIdLayer=0,this._currentFeature=null,this._profile=null,this._marker=null,this._geometry=null,this._distance=0,this._data={}},onAdd:function(t){var e=this._container=this._initLayout();return t&&this.options.active&&(null===this._profile&&(this._panelContainer.style.display="none"),this._activateMapInteraction(t)),s.a.DomEvent.disableClickPropagation(e).disableScrollPropagation(e),e},onRemove:function(){},_initDisplayProfileOptions:function(){var t=this.options.displayProfileOptions,e=t.apply;t.apply="function"==typeof e?e:Qo.DISPLAY_PROFILE_BY_DEFAULT;var i=t.target;t.target=void 0!==i?i:null;var o=Object.getPrototypeOf(this.options);void 0===t.meanSlope&&(t.meanSlope=o.displayProfileOptions.meanSlope),void 0===t.greaterSlope&&(t.greaterSlope=o.displayProfileOptions.greaterSlope),void 0===t.ascendingElevation&&(t.ascendingElevation=o.displayProfileOptions.ascendingElevation),void 0===t.descendingElevation&&(t.descendingElevation=o.displayProfileOptions.descendingElevation),void 0===t.currentSlope&&(t.currentSlope=o.displayProfileOptions.currentSlope)},_initLayout:function(){var t=this._createMainContainerElement(),e=this._showContainer=this._createShowElevationPathElement();t.appendChild(e),this.options.active&&(this._showContainer.checked=!0);var i=this._pictoContainer=this._createShowElevationPathPictoElement();t.appendChild(i);var o=this._panelContainer=this._createElevationPathPanelElement(),n=this._createElevationPathPanelHeaderElement();o.appendChild(n);var s=this._profilContainer=this._createElevationPathPanelProfilElement();o.appendChild(s);var a=this._waitingContainer=this._createElevationPathWaitingElement();o.appendChild(a);var r=this._infoContainer=this._createElevationPathInformationsElement();return o.appendChild(r),t.appendChild(o),t},onShowElevationPathClick:function(t){Jo.trace(t);var e=this._map;this._reducePanel?null!==this._profile&&(null===this.options.displayProfileOptions.target&&(this._pictoContainer.style.display="none"),this._panelContainer.style.display="block"):this._showContainer.checked?(this._pictoContainer.style.display="block",this._panelContainer.style.display="none",this._removeMapInteraction(e),this._clear()):(null===this._profile&&(this._panelContainer.style.display="none"),this._activateMapInteraction(e)),this._reducePanel=!1},onReduceElevationPathPanelClick:function(){this._reducePanel=!0,this._pictoContainer.style.display="block",this._panelContainer.style.display="none"},onOpenElevationPathInfoClick:function(){var t=this.options.displayProfileOptions.meanSlope,e=this.options.displayProfileOptions.greaterSlope,i=this.options.displayProfileOptions.ascendingElevation,o=this.options.displayProfileOptions.descendingElevation,n=this._infoContainer;if(n.childElementCount)for(;n.firstChild;)n.removeChild(n.firstChild);i&&this._addElevationPathInformationsItem("Dénivelé positif : "+this._data.ascendingElevation.toLocaleString()+" m"),o&&this._addElevationPathInformationsItem("Dénivelé négatif : "+this._data.descendingElevation.toLocaleString()+" m"),t&&this._addElevationPathInformationsItem("Pente moyenne : "+this._data.meanSlope.toLocaleString()+" %"),e&&this._addElevationPathInformationsItem("Plus forte pente : "+this._data.greaterSlope.toLocaleString()+" %"),"GPelevationPathInformationsContainerVisible"===n.className?(clearTimeout(this._timerHdlr),n.className="GPelevationPathInformationsContainerHidden"):n.className="GPelevationPathInformationsContainerVisible",this._timerHdlr=setTimeout((function(){n.className="GPelevationPathInformationsContainerHidden"}),4e3)},_activateMapInteraction:function(t){if(Jo.info("_activateMapInteraction()"),null===this._featuresLayer){this._featuresLayer=new s.a.FeatureGroup,t.addLayer(this._featuresLayer);var e=this;t.on("contextmenu",(function(){})),t.on("draw:created",(function(t){Jo.trace("draw:created"),e._currentIdLayer=s.a.Util.stamp(t.layer),e._getFeatureGeometry(t.layer),e._addFeatureLayer(t.layer)})),t.on("draw:drawstart",(function(){Jo.trace("draw:drawstart"),e._removeFeatureLayer(e._lastIdLayer),e._lastIdLayer=e._currentIdLayer})),t.on("draw:drawstop",(function(){Jo.trace("draw:drawstop"),void 0===e.options.elevationPathOptions.onSuccess&&null===e.options.displayProfileOptions.target&&(e._pictoContainer.style.display="none",e._panelContainer.style.display="block"),e._altiRequest()}))}this._activatePolyLineInteraction(t)},_removeMapInteraction:function(t){t&&(null!==this._featuresLayer&&(t.off("draw:created"),t.off("draw:drawstart"),t.off("draw:drawstop"),t.removeLayer(this._featuresLayer),this._featuresLayer=null),this._lastIdLayer=this._currentIdLayer=0,this._currentFeature&&this._currentFeature.disable())},_activatePolyLineInteraction:function(t){this._currentFeature&&this._currentFeature.disable();var e=this.options.stylesOptions||{},i=0!==Object.keys(e).length?e:{stroke:!0,color:"#C77A04",weight:4,opacity:.5,fill:!1};this._currentFeature=new s.a.Draw.Polyline(t,{shapeOptions:i}),this._currentFeature.enable()},_getFeatureGeometry:function(t){Jo.log(t.getLatLngs()),null!==this._geometry&&(this._geometry=null),this._geometry=[],this._distance=0;for(var e=t.getLatLngs(),i=0;i=200?200:Math.floor(o)}var n=this;s.a.Util.extend(t,{sampling:e,onSuccess:this.options.elevationPathOptions.onSuccess||function(t){Jo.log(t),t&&(null!==n.options.displayProfileOptions.target&&(n._pictoContainer.style.display="block",n._panelContainer.style.display="block"),n._displayProfil(t.elevations),n._waitingContainer.className="GPelevationPathCalcWaitingContainerHidden",n._waiting=!1)},onFailure:this.options.elevationPathOptions.onFailure||function(t){Jo.log(t.message),n._pictoContainer.style.display="block",n._panelContainer.style.display="none",n._waitingContainer.className="GPelevationPathCalcWaitingContainerHidden",n._waiting=!1,n._clear()}});var a=this._geometry;s.a.Util.extend(t,{positions:a}),Jo.log(t),this._waitingContainer.className="GPelevationPathCalcWaitingContainerVisible",no.Services.getAltitude(t)}else Jo.log("missing position")},_computeElevationMeasure:function(t){var e=function(t,e){var i=lo.decimalToRadian(t[1]),o=lo.decimalToRadian(e[1]),n=(o-i)/2,s=lo.decimalToRadian(e[0]-t[0])/2,a=Math.sin(n)*Math.sin(n)+Math.sin(s)*Math.sin(s)*Math.cos(i)*Math.cos(o);return 12756274*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))},i=t,o=this._geometry,n=0,s=0,a=o[1];i[0].dist=0,i[0].slope=0,i[0].lat=Math.round(1e4*i[0].lat)/1e4,i[0].lon=Math.round(1e4*i[0].lon)/1e4;for(var r=0,l=0,c=0,h=0,d=0,u=0,p=[],m=1;m0&&(l+=_,c+=E),d=g,i[m].dist=g,p.push(g),u+=E?Math.abs(Math.round(E/_*100)):0,i[m].slope=E?Math.abs(Math.round(E/_*100)):0;var w=i[m].slope;i[m].color=w>15&&w<30?"#005b4c":w>30&&w<45?"#00362d":w>45?"#00120f":"#00B798",i[m].lat=Math.round(1e4*i[m].lat)/1e4,i[m].lon=Math.round(1e4*i[m].lon)/1e4}Jo.trace("List Distances",p);for(var P=i[0].z,b=i[0].z,M=i[0].slope,C=0;Cb&&(b=L.z),L.zM&&(M=L.slope)}return{greaterSlope:M,meanSlope:Math.round(u/i.length),distancePlus:l,distanceMinus:r,ascendingElevation:c,descendingElevation:h,altMin:P.toLocaleString(),altMax:b.toLocaleString(),distance:this._distance,unit:"m",points:i}},_displayProfil:function(t){this._map.off("contextmenu"),this._data&&(this._data={});var e=this._data=this._computeElevationMeasure(t),i=this.options.displayProfileOptions.target;i&&i.appendChild(this._panelContainer),i=this._profilContainer;var o=this.options.displayProfileOptions,n=o.apply;"undefined"!=typeof AmCharts&&"undefined"!=typeof d3&&Jo.trace("Aucune lib. n'est presente !"),n.call(this,e,i,this);var a=s.a.DomUtil.get("GPelevationPathPanelInfo-"+this._uid);(o.greaterSlope||o.meanSlope||o.ascendingElevation||o.descendingElevation)&&(a.style.display="block")},_clear:function(){if(this._geometry=null,this._profile=null,this._profilContainer)for(;this._profilContainer.firstChild;)this._profilContainer.removeChild(this._profilContainer.firstChild);var t=this._map;this._marker&&(t.removeLayer(this._marker),this._marker=null)}});Qo.__createProfileMarker=function(t,e){Jo.log("__createProfileMarker");var i=t,o=i._map;i._marker=s.a.marker(s.a.latLng(e),{icon:new ho("orange"),draggable:!1,clickable:!1,zIndexOffset:1e3}),i._marker.addTo(o)},Qo.__updateProfileMarker=function(t,e){Jo.log("__updateProfileMarker");var i=t,o=i._map;i._marker?(i._marker.setLatLng(s.a.latLng(e)),i._marker.update()):(i._marker=s.a.marker(s.a.latLng(e),{icon:new ho("orange"),draggable:!1,clickable:!1,zIndexOffset:1e3}),i._marker.addTo(o))},Qo.__removeProfileMarker=function(t){Jo.log("__removeProfileMarker");var e=t,i=e._map;e._marker&&(i.removeLayer(e._marker),e._marker=null)},Qo.__customRawProfileOperation=function(){Jo.log("__customRawProfileOperation")},Qo.__customRawProfileMouseOverEvent=function(t,e){Jo.log("__customRawProfileMouseOverEvent",t,e)},Qo.DISPLAY_PROFILE_BY_DEFAULT=function(t,e,i){Jo.trace("ElevationPath.DISPLAY_PROFILE_BY_DEFAULT");var o=Zo.displayProfileByDefault(t,e,i,Qo);o&&(this._profile=o)},Qo.DISPLAY_PROFILE_RAW=function(t,e,i){Jo.trace("ElevationPath.DISPLAY_PROFILE_RAW");var o=Zo.displayProfileRaw(t,e,i,Qo);o&&(this._profile=o)},Qo.DISPLAY_PROFILE_LIB_D3=function(t,e,i){if(Jo.trace("ElevationPath.DISPLAY_PROFILE_LIB_D3"),"undefined"!=typeof d3){var o=Zo.displayProfileLibD3(t,e,i,Qo);o&&(this._profile=o)}else Jo.log("Lib. D3 is not loaded !")},Qo.DISPLAY_PROFILE_LIB_AMCHARTS=function(t,e,i){if(Jo.trace("ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS"),"undefined"!=typeof AmCharts){var o=Zo.displayProfileLibAmCharts(t,e,i,Qo);o&&(this._profile=o)}else Jo.log("Lib. AmCharts is not loaded !")};var $o=Qo,tn=s.a.Control.extend({options:{position:"topright",picto:null,url:null,text:null,size:"30px"},initialize:function(t){s.a.setOptions(this,t)},onAdd:function(){var t=null;t=s.a.DomUtil.create("div","gp-control-logo",t);var e=!(!this.options.url&&!this.options.text),i=null;e&&((i=s.a.DomUtil.create("a","",t)).target="_blank",this.options.url&&(i.href=this.options.url,this.options.text&&(i.title=this.options.text))),e&&this.options.text&&(i.text=this.options.text);var o=null;return!!this.options.picto&&((o=e?s.a.DomUtil.create("img","",i):s.a.DomUtil.create("img","",t)).src=this.options.picto,"string"==typeof this.options.size?o.style.height=o.style.width=this.options.size:(o.style.height=this.options.size.height,o.style.width=this.options.size.width)),t}}),en={LayerSwitcher:function(t){return new _e(t)},Isocurve:function(t){return new _o(t)},MousePosition:function(t){return new To(t)},ReverseGeocode:function(t){return new No(t)},Route:function(t){return new zo(t)},SearchEngine:function(t){return new Xo(t)},ElevationPath:function(t){return new $o(t)},Logo:function(t){return new tn(t)}},on={getZoomLevelFromScaleDenominator:function(t,e){var i={};switch(e){case"EPSG:2154":i={0:104579.224549894,1:52277.5323537905,2:26135.4870785954,3:13066.8913818,4:6533.2286041135,5:3266.5595244627,6:1633.2660045974,7:816.629554986,8:408.3139146768,9:204.1567415109,10:102.0783167832,11:51.0391448966,12:25.5195690743,13:12.7597836936,14:6.379891636,15:3.1899457653,16:1.5949728695,17:.7974864315,18:.3987432149,19:.1993716073,20:.0996858037,21:.0498429018};break;default:i={0:156543.033928041,1:78271.51696402048,2:39135.758482010235,3:19567.87924100512,4:9783.93962050256,5:4891.96981025128,6:2445.98490512564,7:1222.99245256282,8:611.49622628141,9:305.7481131407048,10:152.8740565703525,11:76.43702828517624,12:38.21851414258813,13:19.10925707129406,14:9.554628535647032,15:4.777314267823516,16:2.388657133911758,17:1.194328566955879,18:.5971642834779395,19:.2985821417389697,20:.1492910708694849,21:.0746455354347424}}var o=28e-5*t;for(var n in i)if(i.hasOwnProperty(n)&&i[n]<=o)return n=parseInt(n,10);return 0},getAttributions:function(t){var e=t.zoom,i=[];if(null!=t.originators&&t.visibility)for(var o,n=0,s=t.originators.length;ne&&(o=!1),o&&u&&u=1.3&&-1!==["EPSG:4326"].indexOf(this._crs.code)?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),c=s.a.Util.template(this._url,{s:this._getSubdomain(t)});return c+s.a.Util.getParamString(this.wmsParams,c,!0)+"&BBOX="+l}}),hn=l.getLogger("wmts"),dn=s.a.TileLayer.extend({includes:rn,defaultWmtsParams:{service:"WMTS",request:"GetTile",version:"1.0.0",layer:"",style:"",tilematrixset:"PM",format:"image/jpeg"},initialize:function(t,e){hn.log("initialize"),this._wmtsParams={},s.a.Util.extend(this._wmtsParams,this.defaultWmtsParams,e.paramsWmts),s.a.TileLayer.prototype.initialize.call(this,no.Helper.normalyzeUrl(t,{"gp-leaflet-ext":o.leafletExtVersion||o.version},!1),e.paramsNative),this._originators=e.originators,this._legends=e.legends,this._metadata=e.metadata,this._title=e.title,this._description=e.description,this._quicklookUrl=e.quicklookUrl,this._geoportal_id=0},onAdd:function(t){hn.trace("onAdd layer",this._geoportal_id),this._map=t,this._geoportal_id=s.a.stamp(this),s.a.TileLayer.prototype.onAdd.call(this,t),this.setVisible(!0),this.updateAttributions(t),t.on({overlayremove:this._onRemoveLayer,overlayadd:this._onAddLayer,layerremove:this._onRemoveLayer,layeradd:this._onAddLayer,moveend:this._onMoveEndLayer},this)},onRemove:function(t){hn.trace("onRemove layer",this._geoportal_id),this._map=t,s.a.TileLayer.prototype.onRemove.call(this,t),this.setVisible(!1),this.removeAttributions(t),t.off({overlayremove:this._onRemoveLayer,overlayadd:this._onAddLayer,layerremove:this._onRemoveLayer,layeradd:this._onAddLayer,moveend:this._onMoveEndLayer},this)},getTileUrl:function(t){var e=this._getZoomForUrl(),i=s.a.Util.template(this._url,{s:this._getSubdomain(t)});return i+s.a.Util.getParamString(this._wmtsParams,i)+"&tilematrix="+e+"&tilerow="+t.y+"&tilecol="+t.x},setParams:function(t,e){return s.a.extend(this._wmtsParams,t),e||this.redraw(),this}}),un=l.getLogger("layers"),pn={options:{},params:{},protocol:null,serviceUrl:"http://localhost?no-rights-found-for=[{layer}]",_initOptions:function(){if(!this.options||0===Object.keys(this.options).length)throw new Error("PARAM_MISSING : options !");if(!this.options.layer)throw new Error("PARAM_MISSING : layer !");this.options.apiKey||un.log("PARAM_MISSING : apiKey !"),void 0===this.options.ssl&&(this.options.ssl=!0)},_initContext:function(){this.protocol=!1===this.options.ssl?"http://":"https://"},_initParams:function(t){t||(t="WMTS"),this.params=sn.get({key:this.options.apiKey,layer:this.options.layer,service:t}),this.params&&0!==Object.keys(this.params).length||(this.params={},this.options.apiKey||un.log("WARNING PARAM_MISSING : parameter 'apiKey' is mandatory if the contract key configuration has not been loaded !"))},WMS:function(t,e){var i=l.getLogger("layers-wms");this.options=t||{},this._initOptions(),this.settings=e||{},this._initContext(),this._initParams("WMS"),i.log(this.params);var o=null;o=this.options.apiKey?s.a.Util.template("https://wxs.ign.fr/{key}/geoportail/r/wms",{key:this.options.apiKey}):this.params.url?this.params.url:s.a.Util.template(this.serviceUrl,{layer:this.options.layer});var n={layers:this.options.layer,styles:this.params.styles||"normal",format:this.params.format||"image/jpeg",version:this.params.version||"1.3.0"},a={minZoom:this.params.minZoom||1,maxZoom:this.params.maxZoom||21};return s.a.Util.extend(n,this.settings),s.a.Util.extend(a,this.settings),new cn(o.replace(/(http|https):\/\//,this.protocol),{paramsNative:a,paramsWms:n,originators:this.params.originators||this.settings.originators||[],legends:this.settings.originators||this.params.legends||[],metadata:this.settings.metadata||this.params.metadata||[],title:this.settings.title||this.params.title||"",description:this.settings.description||this.params.description||"",quicklookUrl:this.settings.quicklookUrl||this.params.quicklookUrl||""})},WMTS:function(t,e){var i=l.getLogger("layers-wmts");this.options=t||{},this._initOptions(),this.settings=e||{},this._initContext(),this._initParams("WMTS"),i.log(this.params);var o=null;o=this.options.apiKey?s.a.Util.template("https://wxs.ign.fr/{key}/geoportail/wmts",{key:this.options.apiKey}):this.params.url?this.params.url:s.a.Util.template(this.serviceUrl,{layer:this.options.layer});var n={layer:this.options.layer,style:this.params.styles||"normal",format:this.params.format||"image/jpeg",version:this.params.version||"1.0.0",tilematrixset:this.params.TMSLink||"PM"},a={minZoom:this.params.minZoom||1,maxZoom:this.params.maxZoom||21};return s.a.Util.extend(n,this.settings),s.a.Util.extend(a,this.settings),new dn(o.replace(/(http|https):\/\//,this.protocol),{paramsNative:a,paramsWmts:n,originators:this.params.originators||this.settings.originators||[],legends:this.settings.originators||this.params.legends||[],metadata:this.settings.metadata||this.params.metadata||[],title:this.settings.title||this.params.title||"",description:this.settings.description||this.params.description||"",quicklookUrl:this.settings.quicklookUrl||this.params.quicklookUrl||""})}};!function(){var t=document.getElementsByTagName("script"),e=t[t.length-1].getAttribute("data-key"),i=t[t.length-1].getAttribute("data-url"),o=t[t.length-1].getAttribute("data-timeout");if(e||i){var n={apiKey:e,sync:!0,onSuccess:function(){},onFailure:function(t){throw new Error("Configuration load failed : "+t.message)}};i&&(n.customConfigFile=i,n.callbackSuffix=""),o&&(n.timeOut=o),window.Gp||no.Services.getConfig(n)}}();var mn={proxifyUrl:function(t,e){var i=l.getLogger("proxifyUrl");if(!e||!e.hasOwnProperty("proxyUrl")||null===e.proxyUrl||0===e.proxyUrl.trim().length)return t;if(e.noProxyDomains&&Array.isArray(e.noProxyDomains)&&e.noProxyDomains.length>0)for(var o in e.noProxyDomains)if(i.trace("[ProxyUtils] proxifyUrl : analyzing "+e.noProxyDomains[o]),-1!==t.indexOf(e.noProxyDomains[o]))return i.info("[ProxyUtils] proxifyUrl : "+t+" found in noProxyDomains list ("+e.noProxyDomains[o]+")."),t;return e.proxyUrl+encodeURIComponent(t)}},fn={hex:function(t){if(t>255)throw new Error("'"+t+"'' is greater than 255(0xff);");return("0"+Number(t).toString(16)).slice(-2)},num:function(t){return parseInt(t,16)},arrayToRgba:function(t){if(!Array.isArray(t))throw new Error("Not an array !");var e=t[0],i=t[1],o=t[2],n=t[3]||1;return"rgba("+e+", "+i+", "+o+", "+parseFloat(n)+")"},arrayToHex:function(t){if(!Array.isArray(t))throw new Error("Not an array !");var e=t[0],i=t[1],o=t[2],n=t[3],s=[this.hex(e),this.hex(i),this.hex(o)],a={};return a.hex="#"+s.join(""),n&&(a.opacity=parseFloat(n)),a},rgbaToHex:function(t){var e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/.exec(t);if(!e)throw new Error("Invalid format: "+t);var i=e[1],o=e[2],n=e[3],s=e[4],a=[this.hex(i),this.hex(o),this.hex(n)],r={};return r.hex="#"+a.join(""),s&&(r.opacity=parseFloat(s)),r},hexToRgba:function(t,e){if(!t)throw new Error("Invalid format");t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,o){return e+e+i+i+o+o}));var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return(i=i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null)?"rgba("+i.r+", "+i.g+", "+i.b+", "+e+")":null},isHex:function(t){if(!t)return!1;if("#"!==t.charAt(0))return!1;return!!/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t)},isRGB:function(t){if(!t)return!1;return!!/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/.exec(t)}},gn=no.Services,_n=no.Error,vn=no.Helper,yn=no.Protocols,En=no.servicesDate,wn=no.servicesVersion,Pn=o.leafletExtVersion||o.version,bn=o.date,Mn=window.Gp?window.Gp.Config:{};s.a.geoportalLayer=pn,s.a.geoportalControl=en,s.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_LIB_D3=$o.DISPLAY_PROFILE_LIB_D3,s.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS=$o.DISPLAY_PROFILE_LIB_AMCHARTS,s.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_RAW=$o.DISPLAY_PROFILE_RAW,s.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_BY_DEFAULT=$o.DISPLAY_PROFILE_BY_DEFAULT,s.a.geoportalCRS=Io,s.a.geoportalCRS.EPSG2154=Io.EPSG2154(),s.a.geoportalCRS.EPSG27572=Io.EPSG27572(),s.a.geoportalCRS.EPSG4326=Io.EPSG4326()}])})); \ No newline at end of file +function h(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function d(t){for(var e=1;e=0||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function g(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var _=g(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),v=g(/Edge/i),y=g(/firefox/i),E=g(/safari/i)&&!g(/chrome/i)&&!g(/android/i),w=g(/iP(ad|od|hone)/i),P=g(/chrome/i)&&g(/android/i),b={capture:!1,passive:!1};function M(t,e,i){t.addEventListener(e,i,!_&&b)}function C(t,e,i){t.removeEventListener(e,i,!_&&b)}function L(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function S(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function x(t,e,i,o){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&L(t,e):L(t,e))||o&&t===i)return t;if(t===i)break}while(t=S(t))}return null}var G,I=/\s+/g;function k(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(I," ").replace(" "+e+" "," ");t.className=(o+(i?" "+e:"")).replace(I," ")}}function R(t,e,i){var o=t&&t.style;if(o){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=i+("string"==typeof i?"":"px")}}function T(t,e){var i="";if("string"==typeof t)i=t;else do{var o=R(t,"transform");o&&"none"!==o&&(i=o+" "+i)}while(!e&&(t=t.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(i)}function A(t,e,i){if(t){var o=t.getElementsByTagName(e),n=0,s=o.length;if(i)for(;n=s:n<=s))return o;if(o===D())break;o=B(o,!1)}return!1}function U(t,e,i,o){for(var n=0,s=0,a=t.children;s2&&void 0!==arguments[2]?arguments[2]:{},o=i.evt,n=f(i,$);J.pluginEvent.bind(Vt)(t,e,d({dragEl:it,parentEl:ot,ghostEl:nt,rootEl:st,nextEl:at,lastDownEl:rt,cloneEl:lt,cloneHidden:ct,dragStarted:Pt,putSortable:ft,activeSortable:Vt.active,originalEvent:o,oldIndex:ht,oldDraggableIndex:ut,newIndex:dt,newDraggableIndex:pt,hideGhostForTarget:Bt,unhideGhostForTarget:Wt,cloneNowHidden:function(){ct=!0},cloneNowShown:function(){ct=!1},dispatchSortableEvent:function(t){et({sortable:e,name:t,originalEvent:o})}},n))};function et(t){Q(d({putSortable:ft,cloneEl:lt,targetEl:it,rootEl:st,oldIndex:ht,oldDraggableIndex:ut,newIndex:dt,newDraggableIndex:pt},t))}var it,ot,nt,st,at,rt,lt,ct,ht,dt,ut,pt,mt,ft,gt,_t,vt,yt,Et,wt,Pt,bt,Mt,Ct,Lt,St=!1,xt=!1,Gt=[],It=!1,kt=!1,Rt=[],Tt=!1,At=[],Dt="undefined"!=typeof document,Ot=w,Nt=v||_?"cssFloat":"float",Ut=Dt&&!P&&!w&&"draggable"in document.createElement("div"),jt=function(){if(Dt){if(_)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ft=function(t,e){var i=R(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),n=U(t,0,e),s=U(t,1,e),a=n&&R(n),r=s&&R(s),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(n).width,c=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+O(s).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(n&&a.float&&"none"!==a.float){var h="left"===a.float?"left":"right";return!s||"both"!==r.clear&&r.clear!==h?"horizontal":"vertical"}return n&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=o&&"none"===i[Nt]||s&&"none"===i[Nt]&&l+c>o)?"vertical":"horizontal"},zt=function(t){function e(t,i){return function(o,n,s,a){var r=o.options.group.name&&n.options.group.name&&o.options.group.name===n.options.group.name;if(null==t&&(i||r))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(o,n,s,a),i)(o,n,s,a);var l=(i?o:n).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var i={},o=t.group;o&&"object"==u(o)||(o={name:o}),i.name=o.name,i.checkPull=e(o.pull,!0),i.checkPut=e(o.put),i.revertClone=o.revertClone,t.group=i},Bt=function(){!jt&&nt&&R(nt,"display","none")},Wt=function(){!jt&&nt&&R(nt,"display","")};Dt&&document.addEventListener("click",(function(t){if(xt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),xt=!1,!1}),!0);var qt=function(t){if(it){t=t.touches?t.touches[0]:t;var e=(n=t.clientX,s=t.clientY,Gt.some((function(t){var e=t[Y].options.emptyInsertThreshold;if(e&&!j(t)){var i=O(t),o=n>=i.left-e&&n<=i.right+e,r=s>=i.top-e&&s<=i.bottom+e;return o&&r?a=t:void 0}})),a);if(e){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Y]._onDragOver(i)}}var n,s,a},Ht=function(t){it&&it.parentNode[Y]._isOutsideThisEl(t.target)};function Vt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=m({},e),t[Y]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ft(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Vt.supportPointer&&"PointerEvent"in window&&!E,emptyInsertThreshold:5};for(var o in J.initializePlugins(this,t,i),i)!(o in e)&&(e[o]=i[o]);for(var n in zt(e),this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));this.nativeDraggable=!e.forceFallback&&Ut,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?M(t,"pointerdown",this._onTapStart):(M(t,"mousedown",this._onTapStart),M(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(M(t,"dragover",this),M(t,"dragenter",this)),Gt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),m(this,X())}function Yt(t,e,i,o,n,s,a,r){var l,c,h=t[Y],d=h.options.onMove;return!window.CustomEvent||_||v?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=i,l.draggedRect=o,l.related=n||e,l.relatedRect=s||O(e),l.willInsertAfter=r,l.originalEvent=a,t.dispatchEvent(l),d&&(c=d.call(h,l,a)),c}function Xt(t){t.draggable=!1}function Kt(){Tt=!1}function Zt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,o=0;i--;)o+=e.charCodeAt(i);return o.toString(36)}function Jt(t){return setTimeout(t,0)}function Qt(t){return clearTimeout(t)}Vt.prototype={constructor:Vt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(bt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,it):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,o=this.options,n=o.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,r=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||r,c=o.filter;if(function(t){At.length=0;var e=t.getElementsByTagName("input"),i=e.length;for(;i--;){var o=e[i];o.checked&&At.push(o)}}(i),!it&&!(/mousedown|pointerdown/.test(s)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!E||!r||"SELECT"!==r.tagName.toUpperCase())&&!((r=x(r,o.draggable,i,!1))&&r.animated||rt===r)){if(ht=F(r),ut=F(r,o.draggable),"function"==typeof c){if(c.call(this,t,r,this))return et({sortable:e,rootEl:l,name:"filter",targetEl:r,toEl:i,fromEl:i}),tt("filter",e,{evt:t}),void(n&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=x(l,o.trim(),i,!1))return et({sortable:e,rootEl:o,name:"filter",targetEl:r,fromEl:i,toEl:i}),tt("filter",e,{evt:t}),!0}))))return void(n&&t.cancelable&&t.preventDefault());o.handle&&!x(l,o.handle,i,!1)||this._prepareDragStart(t,a,r)}}},_prepareDragStart:function(t,e,i){var o,n=this,s=n.el,a=n.options,r=s.ownerDocument;if(i&&!it&&i.parentNode===s){var l=O(i);if(st=s,ot=(it=i).parentNode,at=it.nextSibling,rt=i,mt=a.group,Vt.dragged=it,gt={target:it,clientX:(e||t).clientX,clientY:(e||t).clientY},Et=gt.clientX-l.left,wt=gt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,it.style["will-change"]="all",o=function(){tt("delayEnded",n,{evt:t}),Vt.eventCanceled?n._onDrop():(n._disableDelayedDragEvents(),!y&&n.nativeDraggable&&(it.draggable=!0),n._triggerDragStart(t,e),et({sortable:n,name:"choose",originalEvent:t}),k(it,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){A(it,t.trim(),Xt)})),M(r,"dragover",qt),M(r,"mousemove",qt),M(r,"touchmove",qt),M(r,"mouseup",n._onDrop),M(r,"touchend",n._onDrop),M(r,"touchcancel",n._onDrop),y&&this.nativeDraggable&&(this.options.touchStartThreshold=4,it.draggable=!0),tt("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(v||_))o();else{if(Vt.eventCanceled)return void this._onDrop();M(r,"mouseup",n._disableDelayedDrag),M(r,"touchend",n._disableDelayedDrag),M(r,"touchcancel",n._disableDelayedDrag),M(r,"mousemove",n._delayedDragTouchMoveHandler),M(r,"touchmove",n._delayedDragTouchMoveHandler),a.supportPointer&&M(r,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){it&&Xt(it),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;C(t,"mouseup",this._disableDelayedDrag),C(t,"touchend",this._disableDelayedDrag),C(t,"touchcancel",this._disableDelayedDrag),C(t,"mousemove",this._delayedDragTouchMoveHandler),C(t,"touchmove",this._delayedDragTouchMoveHandler),C(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?M(document,"pointermove",this._onTouchMove):M(document,e?"touchmove":"mousemove",this._onTouchMove):(M(it,"dragend",this),M(st,"dragstart",this._onDragStart));try{document.selection?Jt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(St=!1,st&&it){tt("dragStarted",this,{evt:e}),this.nativeDraggable&&M(document,"dragover",Ht);var i=this.options;!t&&k(it,i.dragClass,!1),k(it,i.ghostClass,!0),Vt.active=this,t&&this._appendGhost(),et({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(_t){this._lastX=_t.clientX,this._lastY=_t.clientY,Bt();for(var t=document.elementFromPoint(_t.clientX,_t.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(_t.clientX,_t.clientY))!==e;)e=t;if(it.parentNode[Y]._isOutsideThisEl(t),e)do{if(e[Y]){if(e[Y]._onDragOver({clientX:_t.clientX,clientY:_t.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Wt()}},_onTouchMove:function(t){if(gt){var e=this.options,i=e.fallbackTolerance,o=e.fallbackOffset,n=t.touches?t.touches[0]:t,s=nt&&T(nt,!0),a=nt&&s&&s.a,r=nt&&s&&s.d,l=Ot&&Lt&&z(Lt),c=(n.clientX-gt.clientX+o.x)/(a||1)+(l?l[0]-Rt[0]:0)/(a||1),h=(n.clientY-gt.clientY+o.y)/(r||1)+(l?l[1]-Rt[1]:0)/(r||1);if(!Vt.active&&!St){if(i&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,n,this)&&!g.animated){if(g===it)return D(!1);if(g&&s===t.target&&(a=g),a&&(i=O(a)),!1!==Yt(st,s,it,e,a,i,t,!!a))return A(),s.appendChild(it),ot=s,z(),D(!0)}else if(g&&function(t,e,i){var o=O(U(i.el,0,i.options,!0));return e?t.clientXh+c*s/2:ld-Ct)return-Mt}else if(l>h+c*(1-n)/2&&ld-c*s/2))return l>h+c/2?1:-1;return 0}(t,a,i,n,P?1:r.swapThreshold,null==r.invertedSwapThreshold?r.swapThreshold:r.invertedSwapThreshold,kt,bt===a))){var L=F(it);do{L-=v,E=ot.children[L]}while(E&&("none"===R(E,"display")||E===nt))}if(0===v||E===a)return D(!1);bt=a,Mt=v;var S=a.nextElementSibling,G=!1,I=Yt(st,s,it,e,a,i,t,G=1===v);if(!1!==I)return 1!==I&&-1!==I||(G=1===I),Tt=!0,setTimeout(Kt,30),A(),G&&!S?s.appendChild(it):a.parentNode.insertBefore(it,G?S:a),M&&H(M,0,C-M.scrollTop),ot=it.parentNode,void 0===y||kt||(Ct=Math.abs(y-O(a)[b])),z(),D(!0)}if(s.contains(it))return D(!1)}return!1}function T(r,l){tt(r,m,d({evt:t,isOwner:h,axis:n?"vertical":"horizontal",revert:o,dragRect:e,targetRect:i,canSort:u,fromSortable:p,target:a,completed:D,onMove:function(i,o){return Yt(st,s,it,e,i,O(i),t,o)},changed:z},l))}function A(){T("dragOverAnimationCapture"),m.captureAnimationState(),m!==p&&p.captureAnimationState()}function D(e){return T("dragOverCompleted",{insertion:e}),e&&(h?c._hideClone():c._showClone(m),m!==p&&(k(it,ft?ft.options.ghostClass:c.options.ghostClass,!1),k(it,r.ghostClass,!0)),ft!==m&&m!==Vt.active?ft=m:m===Vt.active&&ft&&(ft=null),p===m&&(m._ignoreWhileAnimating=a),m.animateAll((function(){T("dragOverAnimationComplete"),m._ignoreWhileAnimating=null})),m!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===it&&!it.animated||a===s&&!a.animated)&&(bt=null),r.dragoverBubble||t.rootEl||a===document||(it.parentNode[Y]._isOutsideThisEl(t.target),!e&&qt(t)),!r.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function z(){dt=F(it),pt=F(it,r.draggable),et({sortable:m,name:"change",toEl:s,newIndex:dt,newDraggableIndex:pt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){C(document,"mousemove",this._onTouchMove),C(document,"touchmove",this._onTouchMove),C(document,"pointermove",this._onTouchMove),C(document,"dragover",qt),C(document,"mousemove",qt),C(document,"touchmove",qt)},_offUpEvents:function(){var t=this.el.ownerDocument;C(t,"mouseup",this._onDrop),C(t,"touchend",this._onDrop),C(t,"pointerup",this._onDrop),C(t,"touchcancel",this._onDrop),C(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;dt=F(it),pt=F(it,i.draggable),tt("drop",this,{evt:t}),ot=it&&it.parentNode,dt=F(it),pt=F(it,i.draggable),Vt.eventCanceled||(St=!1,kt=!1,It=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Qt(this.cloneId),Qt(this._dragStartId),this.nativeDraggable&&(C(document,"drop",this),C(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),E&&R(document.body,"user-select",""),R(it,"transform",""),t&&(Pt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),nt&&nt.parentNode&&nt.parentNode.removeChild(nt),(st===ot||ft&&"clone"!==ft.lastPutMode)&<&<.parentNode&<.parentNode.removeChild(lt),it&&(this.nativeDraggable&&C(it,"dragend",this),Xt(it),it.style["will-change"]="",Pt&&!St&&k(it,ft?ft.options.ghostClass:this.options.ghostClass,!1),k(it,this.options.chosenClass,!1),et({sortable:this,name:"unchoose",toEl:ot,newIndex:null,newDraggableIndex:null,originalEvent:t}),st!==ot?(dt>=0&&(et({rootEl:ot,name:"add",toEl:ot,fromEl:st,originalEvent:t}),et({sortable:this,name:"remove",toEl:ot,originalEvent:t}),et({rootEl:ot,name:"sort",toEl:ot,fromEl:st,originalEvent:t}),et({sortable:this,name:"sort",toEl:ot,originalEvent:t})),ft&&ft.save()):dt!==ht&&dt>=0&&(et({sortable:this,name:"update",toEl:ot,originalEvent:t}),et({sortable:this,name:"sort",toEl:ot,originalEvent:t})),Vt.active&&(null!=dt&&-1!==dt||(dt=ht,pt=ut),et({sortable:this,name:"end",toEl:ot,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){tt("nulling",this),st=it=ot=nt=at=lt=rt=ct=gt=_t=Pt=dt=pt=ht=ut=bt=Mt=ft=mt=Vt.dragged=Vt.ghost=Vt.clone=Vt.active=null,At.forEach((function(t){t.checked=!0})),At.length=vt=yt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":it&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,o=0,n=i.length,s=this.options;othis._map.getZoom()||t.layer.options.maxZoomt.getZoom()||o.options.maxZoom1||e<0||this._map.hasLayer(t)&&(void 0!==t.setOpacity?t.setOpacity(e):(t.options.opacity=e,t.setStyle({fillOpacity:e,opacity:e})),this._updateOpacityDOMLayer(t))},setVisibility:function(t,e){ge.trace(t,e),this._layers[s.a.stamp(t)].visibility=e,this._updateVisibilityDOMLayer(t),this._updateVisibilityLayer(t)}}),ve={getLogger:function(t){"true".match(/true/)?r.disableAll():r.enableAll();var e=t||"default";return r.getLogger(e)}},ye={PARAM_MISSING:"Parameter(s) '%var%' missing",PARAM_EMPTY:"Parameter(s) '%var%' empty",PARAM_TYPE:"Wrong type(s) for parameter(s) '%var%'",PARAM_FORMAT:"Parameter(s) '%var%' not correctly formatted",PARAM_NOT_SUPPORT:"Value(s) for parameter(s) '%var%' not supported",PARAM_NOT_SUPPORT_NODEJS:"Value(s) for parameter(s) '%var%' not supported to NodeJS",PARAM_UNKNOWN:"Value(s) for parameter(s) '%var%' unknown",SERVICE_REQUEST_BUILD:"An error occurred during the request building of the service",SERVICE_REQUEST_EMPTY:"The request sent to the service is empty",SERVICE_RESPONSE_EXCEPTION:"The service returned an exception : '%var%'",SERVICE_RESPONSE_EXCEPTION_2:"The service returned an exception",SERVICE_RESPONSE_ANALYSE:"An error occurred while parsing the response '%var%' of the service",SERVICE_RESPONSE_ANALYSE_2:"An unknown error occurred while parsing the response",SERVICE_RESPONSE_EMPTY:"The response of the service is empty",SERVICE_RESPONSE_EMPTY_2:"The response from the service could not be analyzed or is empty",SERVICE_RESPONSE_FORMAT:"The format of the service response is not supported (handled format(s) : '%var%')",SERVICE_RESPONSE_FORMAT_2:"The format of the service response is not supported",SERVICE_RESPONSE_FORMAT_3:"No suggestion matching the search",CLASS_CONSTRUCTOR:"'%var%' constructor cannot be called as a function.",getMessage:function(t,e){if(0===Object.keys(arguments).length)return"Message indefined !";var i=Array.prototype.slice.call(arguments),o=i.shift(),n=i,s=this[o];try{s=Array.isArray(n)&&n.length>0?s.replace("%var%",n.join(" - ")):s.replace("%var%","%var% (not specified)")}catch(t){}return s}},Ee={normalyzeParameters:function(t){var e=null;if(t){var i=[];for(var o in t)if(t.hasOwnProperty(o)){var n=t[o];n||(n=""),i.push(o+"="+n)}e=i.join("&")}return e},normalyzeUrl:function(t,e,i){var o=t;if(t){var n=t.indexOf("?");-1===n&&(o+="?"),-1!==n&&n!==t.length-1&&(o+="&")}return e&&(o+="string"==typeof e?e:this.normalyzeParameters(e)),i&&(o=encodeURIComponent(o)),o},indent:function(t,e){return new Array((t||0)+1).join("\t")+e}},we=i(10),Pe=i.n(we),be={call:function(t){var e=ve.getLogger("XHR");if(e.trace("[XHR::call()]"),Pe.a.polyfill(),!t.url)throw new Error("missing parameter : url is not defined !");if(!t.method)throw new Error("missing parameter : method is not defined !");t.format||(t.format="text");var i={};switch(i.url=t.url,i.data=t.data?t.data:null,i.method=t.method,i.timeOut=t.timeOut||0,i.scope=t.scope||this,i.proxy=t.proxy||null,i.content=t.content||null,i.headers=t.headers||{referer:"http://localhost"},t.method){case"DELETE":case"GET":break;case"PUT":case"POST":i.content=t.content?t.content:"application/x-www-form-urlencoded",i.headers=t.headers?t.headers:{referer:"http://localhost"};break;case"HEAD":case"OPTIONS":throw new Error("HTTP method not yet supported !");default:throw new Error("HTTP method unknown !")}switch(t.format){case"text":this.__call(i).then((function(i){e.trace(i),t.onResponse.call(this,i)})).catch((function(e){t.onFailure.call(this,e)}));break;case"json":this.__callJSON(i).then((function(i){e.trace(i),t.onResponse.call(this,i)})).catch((function(e){t.onFailure.call(this,e)}));break;case"xml":this.__callXML(i).then((function(i){e.trace(i),t.onResponse.call(this,i)})).catch((function(e){t.onFailure.call(this,e)}));break;default:throw new Error("This output Format is not yet supported !")}},__call:function(t){var e=ve.getLogger("XHR");return e.trace("[XHR::__call()]"),new Promise((function(o,n){var s="POST"===t.method||"PUT"===t.method?1:0;t.data&&("object"==typeof t.data&&Object.keys(t.data).length||"string"==typeof t.data&&t.data.length)&&!s&&("Geocode"===t.scope.CLASSNAME||"ReverseGeocode"===t.scope.CLASSNAME?t.url=t.url+t.data:t.url=Ee.normalyzeUrl(t.url,t.data)),e.trace("URL = ",t.url);var a=null;if("undefined"==typeof window){var r=i(7),l={headers:{Referer:"https://localhost"}};return t.data&&"string"==typeof t.data&&s&&(l={method:t.method,body:t.data,headers:{"Content-Type":t.content,Referer:"https://localhost"}}),r(t.url,l).then((function(t){if(t.ok)o(t.text());else{var e="Errors Occured on Http Request (status : '"+t.statusText+"' | url : '"+t.url+"')",i=t.status;n({message:e,status:i})}})).catch((function(t){n({message:t,status:-1})}))}if(window.XMLHttpRequest){e.trace("XMLHttpRequest"),(a=new XMLHttpRequest).open(t.method,t.url,!0),a.overrideMimeType=t.content;var c=null;t.timeOut>0&&(e.trace("XHR - TimeOut actif !"),c=window.setTimeout((function(){n({message:"TimeOut Occured on Http Request with XMLHttpRequest !",status:-1})}),t.timeOut)),s&&(e.trace("data = ",t.data),a.setRequestHeader("Content-type",t.content)),a.onerror=function(t){console.log(t),n(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},a.ontimeout=function(t){console.log(t),n(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},a.onreadystatechange=function(t){if(4===a.readyState)if(200===a.status)window.clearTimeout(c),o(a.response);else{var e="Errors Occured on Http Request (status : '"+t.target.statusText+"' | url : '"+t.target.responseURL+"' | response : '"+t.target.response+"')",i=t.target.status;n({message:e,status:i})}};var h=t.data&&s?t.data:null;a.send(h)}else{if(!window.XDomainRequest)throw new Error("CORS not supported");e.trace("XDomainRequest"),(a=new XDomainRequest).open(t.method,t.url),a.overrideMimeType=t.content,t.timeOut>0&&(a.timeout=t.timeout,e.trace("XHR - TimeOut actif !")),s&&a.setRequestHeader("Content-type",t.content),a.onerror=function(){n(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},a.ontimeout=function(){n(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},a.onload=function(t){if(200===a.status)o(a.responseText);else{var e="Errors Occured on Http Request (status : '"+t.target.statusText+"' | url : '"+t.target.responseURL+"')",i=t.target.status;n({message:e,status:i})}};var d=t.data&&s?t.data:null;a.send(d)}}))},__callJSON:function(t){return this.__call(t).then(JSON.parse).catch((function(e){console.log("_callJSON failed on : ",t.url,e)}))},__callXML:function(t){return this.__call(t).then((function(t){var e;"undefined"==typeof window?e=(new(0,i(8).DOMParser)).parseFromString(t,"text/xml"):window.DOMParser?e=(new window.DOMParser).parseFromString(t,"text/xml"):((e=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,e.loadXML(t));return e})).catch((function(e){console.log("__callXML failed on : ",t.url,e)}))}},Me={uuid:(pe=Math.floor(Date.now()),function(){return pe++}),call:function(t){var e=ve.getLogger("JSONP");if(e.trace("[JSONP::call ()]"),!t)throw e.error("missing parameter : options !"),new Error("missing parameter : options !");if(!t.url)throw e.error("missing parameter : options.url !"),new Error("missing parameter : options.url !");if(t.timeOut||(e.info("setting 'options.timeOut' default value"),t.timeOut=0),!t.onResponse)throw e.error("missing parameter : options.onResponse !"),new Error("missing parameter : options.onResponse !");var i="string"==typeof t.callbackSuffix?t.callbackSuffix:this.uuid(),o=!1,n=!1,s=t.url.indexOf("callback=");if(-1!==s){o=!0;var a=t.url.indexOf("&",s);-1===a&&(a=t.url.length);var r=t.url.substring(s+9,a);r&&(n=!0,t.callbackName=r,e.info("setting 'options.callbackName' value ("+t.callbackName+") from 'options.url' parameter"))}if(!o){var l=t.url.indexOf("?");-1===l?t.url=t.url+"?callback=":l===t.url.length?t.url=t.url+"callback=":t.url=t.url+"&callback=",e.info("setting callback default key in 'options.url' : "+t.url)}var c=!!t.callbackName||n;if(n||(t.callbackName||(e.info("setting 'options.callbackName' default value"),t.callbackName="callback",(i||""===i)&&(t.callbackName+=i)),t.url=t.url.replace("callback=","callback="+t.callbackName),e.info("setting callback function name in 'options.url' : "+t.url)),t.onTimeOut||(e.info("setting 'options.onTimeOut' default value"),t.onTimeOut=function(){console.log("TimeOut while invoking url : "+t.url)}),!c){var h=this,d=null;t.timeOut>0&&(d=window.setTimeout((function(){window[t.callbackName]=function(){},t.onTimeOut(),h._deleteScript(i)}),t.timeOut)),window[t.callbackName]=function(e){window.clearTimeout(d),t.onResponse(e),h._deleteScript(i)}}this._createScript(i,t.url)},_createScript:function(t,e){var i,o=document.getElementById("results"+t);(i=document.createElement("script")).setAttribute("type","text/javascript"),i.setAttribute("src",e),i.setAttribute("charset","UTF-8"),i.setAttribute("id","results"+t),i.setAttribute("async","true");var n=document.documentElement||document.getElementsByTagName("head")[0];null===o?n.appendChild(i):n.replaceChild(i,o)},_deleteScript:function(t){var e=document.getElementById("results"+t);if(e){var i=e.parentNode||document.documentElement;if(!i)return;i.removeChild(e)}}},Ce={send:function(t){var e=t||{method:"GET",protocol:"XHR",timeOut:0,format:null,wrap:!0,nocache:!0,output:"json",callback:null,callbackSuffix:null};if("undefined"!=typeof window||"JSONP"!==t.protocol){if("XHR"===t.protocol||"json"===t.format?e.wrap=!1:"JSONP"===t.protocol&&"xml"===t.format&&(e.wrap=!0),e.callback=null,e.output=e.wrap?"json":null,e.wrap){var i={};i.output=e.output,i.callback=e.callback,delete i.callback,e.url=Ee.normalyzeUrl(t.url,i)}switch(e.protocol){case"XHR":"GET"===t.method&&t.nocache&&(e.url=Ee.normalyzeUrl(e.url,{t:(new Date).getTime()})),be.call(e);break;case"JSONP":e.data&&(e.url=Ee.normalyzeUrl(e.url,e.data)),Me.call(e);break;default:throw new Error("protocol not supported (XHR|JSONP) !")}}else console.log("Value (s) for parameter (s) 'protocol=JSONP (instead use XHR)' not supported to NodeJS")}};function Le(t){if(!(this instanceof Le))throw new TypeError("ErrorService constructor cannot be called as a function.");var e=t;"string"==typeof t||t instanceof String?(this.message=t,this.status=-1,this.type=Le.TYPE_UNKERR):(this.message=e.message||"undefined!?",this.type=e.type,this.status=e.status||-1),this.name="ErrorService",this.stack=(new Error).stack}Le.TYPE_SRVERR="SERVICE_ERROR",Le.TYPE_USEERR="USAGE_ERROR",Le.TYPE_UNKERR="UNKNOWN_ERROR",Le.prototype=Object.create(Error.prototype,{constructor:{value:Le,writable:!0,configurable:!0}});var Se=Le,xe={ssl:!0,url:function(t,e){return(!1===xe.ssl?"http://":"https://")+"wxs.ign.fr".concat("/",t,e)},Alti:{_key:{"elevation-json":"/alti/rest/elevation.json","elevation-xml":"/alti/rest/elevation.xml","profil-json":"/alti/rest/elevationLine.json","profil-xml":"/alti/rest/elevationLine.xml",wps:"/alti/wps"},url:function(t){return{"elevation-json":xe.url(t,this._key["elevation-json"]),"elevation-xml":xe.url(t,this._key["elevation-xml"]),"profil-json":xe.url(t,this._key["profil-json"]),"profil-xml":xe.url(t,this._key["profil-xml"]),wps:xe.url(t,this._key.wps)}}},ProcessIsoCurve:{_key:"/geoportail/isochrone/rest/1.0.0/isochrone",url:function(t){return xe.url(t,this._key)}},Config:{_key:"https://raw.githubusercontent.com/IGNF/geoportal-configuration/main/dist/",url:function(t){Array.isArray(t)||(t=t.split(","));for(var e=[],i=0;io(t,{credentials:"same-origin"}).then(t=>{if(t.ok)return t.json().then(t=>t).catch(t=>{throw new Error("Exception Json : "+t)});throw new Error("Exception HTTP : "+t.status+" (status code) !")}).catch(t=>new Promise((e,i)=>{i(t)})),a=[];for(let t=0;t{if(!t)throw new Error("results config empty !?");t.forEach(t=>{this.listConfigResults.push(t)})}).then(()=>{e.call(this,this.listConfigResults)}).catch(e=>{t.call(this,e)})},Ne=function(t,e){this.listConfigResults=[];for(var i=0;ie||t__IDENTIFIER__\x3c!-- __DATAINPUTS__ --\x3e__RAWDATAOUTPUT__',input:"__KEY____DATA__"}},namespaceByDefault:function(){return['xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"','xmlns="http://www.opengis.net/wps/1.0.0"','xmlns:wfs="http://www.opengis.net/wfs"','xmlns:wps="http://www.opengis.net/wps/1.0.0"','xmlns:ows="http://www.opengis.net/ows/1.1"','xmlns:gml="http://www.opengis.net/gml"','xmlns:ogc="http://www.opengis.net/ogc"','xmlns:wcs="http://www.opengis.net/wcs/1.1.1"','xmlns:xlink="http://www.w3.org/1999/xlink"'].join(" ")},schemaLocationByDefault:function(){return'xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"'},processRequestString:function(){this.logger.trace("WPS::processRequestString ()");var t="";if("POST"===this.method)t=this.template.post.value;else{if("GET"!==this.method)return this.logger.error("No other method supported by the service !"),!1;t=this.template.get.value}return t=(t=(t=(t=(t=t.replace(/__SERVICE__/g,this.paramservice)).replace(/__VERSION__/g,this.paramversion)).replace(/__RAWDATAOUTPUT__/g,this.paramrawdataoutput)).replace(/__IDENTIFIER__/g,this.paramidentifier)).replace(/__REQUEST__/g,this.paramrequest),"POST"===this.method&&(t=(t=t.replace(/__NAMESPACE__/g,this.namespaceByDefault)).replace(/__SCHEMALOCATION__/g,this.schemaLocationByDefault)),(t=t.replace(//g,this.__addDataInputs()))?(this.requestString=t,this.logger.trace("traduction tmpl",t),!0):(this.logger.warn("traduction tmpl : empty request !?"),!1)},__addDataInputs:function(){this.logger.trace("WPS::__addDataInputs ()");for(var t,e="GET"===this.method?this.template.get.input:this.template.post.input,i="GET"===this.method?";":"",o="",n=this,s=this.DataObject.getData(),a=0;a0)for(var a=o.getElementsByTagName("parsererror"),r=0;r0){var o=function(t){if(t.attributes.length>0){for(var e={},i=t.attributes,o=0;o0?e.index=e.filters.type[0]:e.index=e.filters.type),delete e.filters.type),e.filters.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),delete e.filters.bbox)),delete e.filterOptions),e.position&&(e.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),e.position.lon||(e.position.lon=e.position.x),delete e.position.x),e.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),e.position.lat||(e.position.lat=e.position.y),delete e.position.y)),e.returnFreeForm&&(this.logger.warn("The parameter 'returnFreeForm' is deprecated"),delete e.returnFreeForm),e.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete e.srs),e},Pi.prototype.buildRequest=function(t,e){var i={httpMethod:this.options.httpMethod,geocodeMethod:"search",query:this.options.query,index:this.options.index,returnTrueGeometry:this.options.returnTrueGeometry,position:this.options.position,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=pi.build(i),this.request?e.call(this,this.request):t.call(this,new Se(ye.getMessage("SERVICE_REQUEST_BUILD")))},Pi.prototype.analyzeResponse=function(t,e){if(this.response){var i={response:this.response,rawResponse:this.options.rawResponse,onError:t,onSuccess:e,scope:this};wi.build(i)}else t.call(this,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))};var bi=Pi;function Mi(t){if(!(this instanceof Mi))throw new TypeError(ye.getMessage("CLASS_CONSTRUCTOR","ReverseGeocode"));this.CLASSNAME="ReverseGeocode",this.logger=ve.getLogger("Gp.Services.ReverseGeocode"),this.logger.trace("[Constructeur ReverseGeocode (options)]");var e=this.patchOptionConvertor(t);if(e.serverUrl=e.serverUrl||"https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/reverse",Re.apply(this,[e]),e.searchGeometry)this.options.searchGeometry=e.searchGeometry;else if(!e.position)throw new Error(ye.getMessage("PARAM_MISSING","searchGeometry"));if(e.index||(this.options.index=e.index="StreetAddress"),e.filters)for(var i=Object.keys(e.filters),o=0;o0?e.index=e.filterOptions.type[0]:e.index=e.filterOptions.type),delete e.filterOptions.type),e.filterOptions.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),e.searchGeometry||(e.searchGeometry=this.bbox2Json(e.filterOptions.bbox)),delete e.filterOptions.bbox),e.filterOptions.circle&&(this.logger.warn("The parameter 'filterOptions.circle' is deprecated"),e.searchGeometry||(e.searchGeometry=this.circle2Json(e.filterOptions.circle)),delete e.filterOptions.circle),e.filterOptions.polygon&&(this.logger.warn("The parameter 'filterOptions.polygon' is deprecated"),e.searchGeometry||(e.searchGeometry=this.polygon2Json(e.filterOptions.polygon)),delete e.filterOptions.polygon),!e.filters&&Object.keys(e.filterOptions).length>0&&(e.filters=e.filterOptions),delete e.filterOptions),e.position&&(e.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),e.position.lon||(e.position.lon=e.position.x),delete e.position.x),e.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),e.position.lat||(e.position.lat=e.position.y),delete e.position.y)),e.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete e.srs),e},Mi.prototype.buildRequest=function(t,e){var i={httpMethod:this.options.httpMethod,geocodeMethod:"reverse",searchGeometry:this.options.searchGeometry,index:this.options.index,position:this.options.position,returnTrueGeometry:this.options.returnTrueGeometry,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=pi.build(i),this.request?e.call(this,this.request):t.call(this,new Se(ye.getMessage("SERVICE_REQUEST_BUILD")))},Mi.prototype.analyzeResponse=function(t,e){if(this.response){var i={response:this.response,rawResponse:this.options.rawResponse,onError:t,onSuccess:e,scope:this};wi.build(i)}else t.call(this,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))},Mi.prototype.bbox2Json=function(t){return{type:"Polygon",coordinates:[[[t.left,t.top],[t.right,t.top],[t.right,t.bottom],[t.left,t.bottom],[t.left,t.top]]]}},Mi.prototype.circle2Json=function(t){return{type:"Circle",radius:t.radius,coordinates:[t.x,t.y]}},Mi.prototype.polygon2Json=function(t){for(var e={type:"Polygon",coordinates:[[]]},i=0;i2?document.getElementById(e._addUID("GPlocationAutoCompleteList_"+o)).style.display="block":document.getElementById(e._addUID("GPlocationAutoCompleteList_"+o)).style.display="none",e.onAutoCompleteSearchText(t)}})),i.addEventListener("keydown",(function(i){var o=i.which||i.keyCode,n=document.getElementById(e._addUID("GPlocationAutoCompleteList_"+t));if(n){var s=n.getElementsByClassName("GPautoCompleteProposal current"),a=n.getElementsByClassName("GPautoCompleteProposal"),r=a.length;if(r){var l=null;if(!s.length)return(l=a[0]).className="GPautoCompleteProposal current",l.style.color="#000000",void(l.style["background-color"]="#CEDBEF");l=s[0];var h=parseInt(c.index(l.id),10),d=h===r-1?a[0]:a[h+1],u=0===h?a[r-1]:a[h-1];switch(l.style["background-color"]="",l.style.color="",u.style["background-color"]="",u.style.color="",d.style["background-color"]="",d.style.color="",o){case 38:ao.log("arrow up"),l.className="GPautoCompleteProposal",u.className="GPautoCompleteProposal current",u.style.color="#000000",u.style["background-color"]="#CEDBEF";break;case 40:ao.log("arrow down"),l.className="GPautoCompleteProposal",d.className="GPautoCompleteProposal current",d.style.color="#000000",d.style["background-color"]="#CEDBEF";break;case 13:ao.log("enter"),l.click(i)}l.focus()}}})),i},_createLocationCoordinateInputElement:function(t){var e=this,i=document.createElement("input");return i.id=this._addUID("GPlocationOriginCoords_"+t),i.className="GPlocationOriginHidden",i.type="text",i.disabled=!1,i.addEventListener("click",(function(){var t=c.index(this.id);document.getElementById(e._addUID("GPlocationOriginLabel_"+t)).click()})),i},_createLocationPointerShowInputElement:function(t){var e=document.createElement("input");return e.id=this._addUID("GPlocationOriginPointer_"+t),e.type="checkbox",e},_createLocationPointerInputElement:function(t){var e=this,i=document.createElement("label");return i.id=this._addUID("GPlocationOriginPointerImg_"+t),i.htmlFor=this._addUID("GPlocationOriginPointer_"+t),i.className="GPlocationOriginPointerImg",i.title="Pointer un lieu sur la carte",i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var i,o,n,s=c.index(this.id),a=document.getElementsByClassName(e._addUID("GPlocationPoint"));for(i=0;i",color:"blue",display:!0,addOption:!1,removeOption:!1},disableReverse:!1,displayInfo:!0,autocompleteOptions:{},reverseGeocodeOptions:{}},initialize:function(t){s.a.Util.setOptions(this,t),this._uid=this.options.tag.unique||null,this._activeDragAndDrop=!1,this._pressedKeyOnDragAndDrop=!1,this._map=null,this._inputsContainer=null,this._inputLabelContainer=null,this._inputAutoCompleteContainer=null,this._inputShowPointerContainer=null,this._inputCoordinateContainer=null,this._coordinate=null,this._suggestedContainer=null,this._suggestedLocations=[],this._currentLocation=null,this._marker=null,this._resources={},this._container=this._uid?this._initLayout():null},onAdd:function(){this._uid=c.generate();var t=this._initLayout();return s.a.DomEvent.disableClickPropagation(t).disableScrollPropagation(t),t},onRemove:function(){},getCoordinate:function(){return this._coordinate},setCoordinate:function(t){this._displayResultOfCoordinate(t)},setMap:function(t){this._map||(this._map=t)},clear:function(){this._setCursor(),this._setMarker(),this._clearResults(),this._inputLabelContainer.click()},dragging:function(t){this._marker&&(t?this._marker.dragging.enable():this._marker.dragging.disable())},_initLayout:function(){var t=this.options.tag.id,e=this._createMainContainerElement(),i=this._inputsContainer=this._createLocationPointElement(t,this.options.tag.display);e.appendChild(i);var o=this._inputLabelContainer=this._createLocationPointLabelElement(t,this.options.tag.label);i.appendChild(o);var n=this._inputAutoCompleteContainer=this._createLocationAutoCompleteteInputElement(t);i.appendChild(n);var s=this._inputCoordinateContainer=this._createLocationCoordinateInputElement(t);i.appendChild(s);var a=this._inputShowPointerContainer=this._createLocationPointerShowInputElement(t);i.appendChild(a);var r=this._createLocationPointerInputElement(t);if(i.appendChild(r),this.options.tag.addOption){var l=this._createLocationAddPointElement();i.appendChild(l)}if(this.options.tag.removeOption){var c=this._createLocationRemovePointElement(t);i.appendChild(c)}var h=this._suggestedContainer=this._createLocationAutoCompleteResultElement(t);return e.appendChild(h),e},_setLabel:function(t){this._inputAutoCompleteContainer.value=t||""},_setCoordinate:function(t){this._coordinate=t;var e;e=lo.roundToDecimal(t.lat,4);var i=lo.roundToDecimal(t.lng,4)+" , "+e;this.GPdisplayCoordinate(i)},_setPosition:function(t){uo.log("_setPosition()",t),this._map.panTo(s.a.latLng(t))},_setMarker:function(t,e,i){if(uo.log("_setMarker()",t,e,i),!this._activeDragAndDrop){var o=this._map;if(null!=this._marker&&(this._marker.off("mousedown",this.onMouseDownMarker,this),this._marker.off("dragstart",this.onStartDragMarker,this),this._marker.off("drag",this.onDragMarker,this),this._marker.off("dragend",this.onEndDragMarker,this),o.removeLayer(this._marker),this._marker=null),t){var n={icon:new ho(this.options.tag.color),draggable:!0,clickable:!0,zIndexOffset:1e3};if(this._marker=s.a.marker(s.a.latLng(t),n),this._marker.on("mousedown",this.onMouseDownMarker,this),this._marker.on("dragstart",this.onStartDragMarker,this),this._marker.on("drag",this.onDragMarker,this),this._marker.on("dragend",this.onEndDragMarker,this),this._marker.addTo(o),i){var a=null;a="string"!=typeof e?"GeocodedLocation"===e.service?so.getGeocodedLocationFreeform(e.location):"SuggestedLocation"===e.service?so.getSuggestedLocationFreeform(e.location):"sans informations.":e,this._marker.bindPopup(a)}}}},_setCursor:function(t){var e=this._map.getContainer();e.style.cursor=t||null},_clearResults:function(){this._currentLocation=null,this._coordinate=null,this._clearSuggestedLocation()},_clearSuggestedLocation:function(){if(this._suggestedLocations=[],this._suggestedContainer)for(;this._suggestedContainer.firstChild;)this._suggestedContainer.removeChild(this._suggestedContainer.firstChild)},_requestAutoComplete:function(t){if(uo.log("_requestAutoComplete()",t),t&&0!==Object.keys(t).length&&t.text){uo.log(t);var e={};s.a.Util.extend(e,this.options.autocompleteOptions),s.a.Util.extend(e,t),s.a.Util.extend(e,{apiKey:e.apiKey||this.options.apiKey}),uo.log(e),no.Services.autoComplete(e)}},_fillAutoCompletedLocationListContainer:function(t){if(uo.log("_fillAutoCompletedLocationListContainer()",t),t&&0!==t.length){var e=this._suggestedContainer;if(e.childElementCount)for(;e.firstChild;)e.removeChild(e.firstChild);for(var i=0;i=60&&(c=0,l+=1),l>=60&&(l=0,r+=1),{d:r,m:l,s:c,direction:e.charAt(o<0?1:0)}},toInteger:function(t,e){var i=parseInt(t,e||10);return!isNaN(i)&&isFinite(i)?i:null},isInteger:function(t){if(isNaN(t))return!1;var e=parseFloat(t);return(0|e)===e},toFloat:function(t){var e=parseFloat(t);return!isNaN(e)&&isFinite(e)?e:null}};function Eo(t){return(Eo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var wo={_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPmousePosition"),t.className="GPwidget",t},_createShowMousePositionElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowMousePosition"),t.type="checkbox",t},_createShowMousePositionPictoElement:function(t){var e=this,i=document.createElement("label");i.id=this._addUID("GPshowMousePositionPicto"),i.className="GPshowAdvancedToolPicto",i.htmlFor=this._addUID("GPshowMousePosition"),i.title="Afficher les coordonnées du curseur",i.addEventListener("click",(function(i){var o="";document.getElementById(e._addUID("GPshowMousePosition")).checked||t||(o="GPmapCenterVisible"),document.getElementById("GPmapCenter").className=o,e.onShowMousePositionClick(i)}));var o=document.createElement("span");return o.id=this._addUID("GPshowMousePositionOpen"),o.className="GPshowAdvancedToolOpen",i.appendChild(o),i},_createMousePositionPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPmousePositionPanel"),t.className="GPpanel",t},_createMapCenter:function(){var t=document.createElement("div");return t.id="GPmapCenter",t.className="",t},_createMousePositionPanelHeaderElement:function(){var t=document.createElement("div");t.className="GPpanelHeader";var e=document.createElement("div");e.className="GPpanelTitle",e.innerHTML="Coordonnées",t.appendChild(e);var i=document.createElement("div");i.id="GPmousePositionPanelClose",i.className="GPpanelClose",i.title="Fermer le panneau";var o=this;return i.addEventListener?i.addEventListener("click",(function(){document.getElementById(o._addUID("GPshowMousePositionPicto")).click()}),!1):i.attachEvent&&i.attachEvent("onclick",(function(){document.getElementById(o._addUID("GPshowMousePositionPicto")).click()})),t.appendChild(i),t},_createMousePositionPanelBasicElement:function(t,e,i,o){t=void 0===t||t,e=void 0===e||e,i=void 0!==i&&i;var n=document.createElement("div");return n.id=this._addUID("GPmousePositionBasicPanel"),n.appendChild(this._createMousePositionPanelBasicCoordinateElement(e,i,o)),n.appendChild(this._createMousePositionPanelEditToolsElement(i)),n.appendChild(this._createMousePositionPanelBasicAltitudeElement(t)),n},_createCoordinateElement:function(t,e){var i=this;if(-1===["Lon","Lat"].indexOf(t))return[];var o=[],n=document.createElement("input");n.id=this._addUID("GPmousePosition"+t),n.title=!0===e?"Cliquer pour saisir des coordonnées":"",n.readOnly=!0,e&&(n.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),n.addEventListener("change",(function(e){this.classList.remove("error"),i.validateExtentCoordinate(t,this.value,e)?this.classList.remove("error"):this.classList.add("error")}))),o.push(n);var s=document.createElement("span");return s.className="GPmousePositionUnits",o.push(s),o},_createDMSCoordinateElement:function(t,e){if(-1===["Lon","Lat"].indexOf(t))return[];var i=this,o=[],n=document.createElement("input");n.id=this._addUID("GPmousePosition"+t+"Degrees"),n.className="GPSexagesimal",n.setAttribute("name","degrees"),n.title=!0===e?"Cliquer pour saisir des coordonnées":"",n.readOnly=!0,n.dataset.min=0,n.dataset.max="Lon"===t?180:90,e&&(n.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),n.addEventListener("change",(function(){this.classList.remove("error"),i._checkDMSDegrees(t,this)?this.classList.remove("error"):this.classList.add("error")}))),o.push(n);var s=document.createElement("span");s.className="GPmousePositionSexagesimalLabel",s.innerHTML="°",o.push(s);var a=document.createElement("input");a.id=this._addUID("GPmousePosition"+t+"Minutes"),a.className="GPSexagesimal",a.setAttribute("name","minutes"),a.title=!0===e?"Cliquer pour saisir des coordonnées":"",a.readOnly=!0,a.dataset.min=0,a.dataset.max=59,e&&(a.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),a.addEventListener("change",(function(){this.classList.remove("error"),i._checkDMSElement(this)?this.classList.remove("error"):this.classList.add("error")}))),o.push(a);var r=document.createElement("span");r.className="GPmousePositionSexagesimalLabel",r.innerHTML="'",o.push(r);var l=document.createElement("input");l.id=this._addUID("GPmousePosition"+t+"Seconds"),l.className="GPSexagesimalsec",l.setAttribute("name","seconds"),l.title=!0===e?"Cliquer pour saisir des coordonnées":"",l.readOnly=!0,l.dataset.min=0,l.dataset.max=59,e&&(l.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),l.addEventListener("change",(function(){this.classList.remove("error"),i._checkDMSElement(this,!0)?this.classList.remove("error"):this.classList.add("error")}))),o.push(l);var c=document.createElement("span");c.className="GPmousePositionSexagesimalLabel",c.innerHTML="''",o.push(c);var h=document.createElement("select");h.id=this._addUID("GPmousePosition"+t+"Direction"),h.className="GPmousePositionDirection",h.setAttribute("name","direction"),h.disabled=!0;var d=document.createElement("option");d.value="Lon"===t?"E":"N",d.innerHTML="Lon"===t?"E":"N",h.appendChild(d);var u=document.createElement("option");return u.value="Lon"===t?"O":"S",u.innerHTML="Lon"===t?"O":"S",h.appendChild(u),o.push(h),o},_createMousePositionPanelBasicCoordinateElement:function(t,e,i){var o=document.createElement("div");o.id=this._addUID("GPmousePositionCoordinate"),o.style.display=t?"block":"none";var n=document.createElement("div"),s=document.createElement("span");s.className="GPmousePositionLabel",s.id=this._addUID("GPmousePositionLatLabel"),s.innerHTML="Latitude : ",n.appendChild(s);var a,r=document.createElement("span");r.id=this._addUID("GPmousePositionLatCoordinate"),a="DMS"===i?this._createDMSCoordinateElement("Lat",e):this._createCoordinateElement("Lat",e);for(var l=0;l=s&&n<=a},_checkDMSDegrees:function(t,e){if(isNaN(e.value))return!1;var i=parseFloat(e.value);if((0|i)!==i)return!1;var o=Number(e.dataset.min),n=Number(e.dataset.max);if(in)return!1;var s=document.getElementById(this._addUID("GPmousePosition"+t+"Minutes")),a=document.getElementById(this._addUID("GPmousePosition"+t+"Seconds"));return i>=n?(s.dataset.max=0,a.dataset.max=0):(s.dataset.max=59,a.dataset.max=59.9999),!0},GPdisplayCoords:function(t){if(t){var e=document.getElementById(this._addUID("GPmousePositionLonLabel")),i=document.getElementById(this._addUID("GPmousePositionLatLabel"));if(t.x||t.y?(i.innerHTML="X : ",e.innerHTML="Y : "):t.e||t.n?(i.innerHTML="E : ",e.innerHTML="N : "):(i.innerHTML="Latitude : ",e.innerHTML="Longitude : "),"object"===Eo(t.lat)&&"object"===Eo(t.lng)){var o={lng:"Lon",lat:"Lat"},n=["Degrees","Minutes","Seconds"];for(var s in o)for(var a=0;an[2]))return Ro.warn("coordinates (lon) out of extent !?"),!1;if("Lat"===t&&(a.latn[3]))return Ro.warn("coordinates (lat) out of extent !?"),!1}return!0},_getCoordinate:function(t){var e=s.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Degrees")),i=e.value;if(!i)return null;if(i=i.replace(",","."),!yo.isInteger(i))return null;var o=yo.toInteger(i);if(oNumber(e.dataset.max))return null;var n=s.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Direction")).value,a=s.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Minutes")),r=a.value;if(r&&(r=r.replace(",","."),yo.isInteger(r))){var l=yo.toInteger(r);l>=Number(a.dataset.min)&&l<=Number(a.dataset.max)&&(o+=l/60)}var c=s.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Seconds")),h=c.value;if(h){h=h.replace(",",".");var d=yo.toFloat(h);d&&d>=Number(c.dataset.min)&&d<=Number(c.dataset.max)&&(o+=d/3600)}return"O"!==n&&"S"!==n||(o=-o),o},_locateDMSCoordinates:function(){var t={lat:this._getCoordinate("Lat"),lng:this._getCoordinate("Lon")};this.validateExtentCoordinate("Lon",t.lng)&&(this.validateExtentCoordinate("Lat",t.lat)&&this._map.panTo(t))},_locateCoordinates:function(){var t=s.a.DomUtil.get(this._addUID("GPmousePositionLon")).value;if(t=t.replace(",","."),t=parseFloat(t),!isNaN(t)){var e=s.a.DomUtil.get(this._addUID("GPmousePositionLat")).value;if(e=e.replace(",","."),e=parseFloat(e),!isNaN(e)){var i=null,o=null,n=null,a=null;if("Geographical"===this._currentProjectionType?(i=t,o=e):(n=e,a=t),this.validateExtentCoordinate("Lon",i||n)&&this.validateExtentCoordinate("Lat",o||a)){var r=this._currentProjectionUnits,l=this._unproject({x:this._convertCoordinate(null!==i?i:n,r),y:this._convertCoordinate(null!==o?o:a,r)});this._map.panTo(l)}}}},onMousePositionEditModeLocateClick:function(){this.options.editCoordinates&&(this._isEditing?"DMS"===this._currentProjectionUnits?this._locateDMSCoordinates():this._locateCoordinates():this.onMousePositionEditModeClick(!0))},onMousePositionProjectionSystemChange:function(t){Ro.log("onMousePositionProjectionSystemChange",t);var e=t.target.selectedIndex,i=t.target.options[e].value,o=t.target.options[e].label;Ro.log(e,i,o),this._setCurrentSystem(i)},_setCurrentSystem:function(t){for(var e=null,i=0;in.geoBBox.right||e.getBounds()._southWest.lat>n.geoBBox.top||e.getBounds()._northEast.lng1e3&&(Do.log("INFO : initial circle radius ("+this._requestGeom.radius+") limited to 1000m."),this._requestGeom.radius=1e3),i.searchGeometry=this._requestGeom):"polygon"===this._requestGeom.type.toLowerCase()?i.searchGeometry=this._requestGeom:"point"===this._requestGeom.type.toLowerCase()&&("StreetAddress"===this._currentGeocodingType?(i.searchGeometry={type:"Circle",radius:50,coordinates:this._requestGeom.coordinates},i.maximumResponses=1):i.searchGeometry=this._requestGeom),Do.log("reverseGeocode request options : ",i),this._displayWaitingContainer(),no.Services.reverseGeocode(i)},_displayGeocodedLocations:function(t){var e=this._map;this._clearLocations(),this._clearLocationsFeature(e),this._reverseGeocodingLocations=t,t&&0!==t.length?(this._formContainer.className="GPreverseGeocodingComponentHidden",this._hideWaitingContainer(),this._panelTitleContainer.innerHTML="Résultats de la recherche",this._returnPictoContainer.className="",this._resultsContainer.className="GPpanel",this._fillGeocodedLocationListContainer(t),this._displayGeocodedLocationsOnMap(t),e.fitBounds(this._inputResultsLayer.getBounds())):this._clearInputRequest()},_fillGeocodedLocationListContainer:function(t){for(var e=0;e",d=r.placeAttributes;for(var u in d)d.hasOwnProperty(u)&&"trueGeometry"!==u&&"extraFields"!==u&&"houseNumberInfos"!==u&&"_count"!==u&&(h+="
  • ",h+=''+u.toUpperCase()+" : ",h+=d[u],h+="
  • ");h+=" ",c.bindPopup(h),c.on("mouseover",o),c.on("mouseout",n),c.on("click",(function(t){i.fire("reverse:onclickresult",{data:t.target.options.data})})),this._inputResultsLayer.addLayer(c)}}},onShowReverseGeocodingClick:function(){var t=this._map;this._showReverseGeocodingContainer.checked?this._removeMapInteraction(t):this._waiting||this._reverseGeocodingLocations.length||this._activateMapInteraction(t)},onReverseGeocodingTypeChange:function(t){var e=t.target.selectedIndex,i=t.target.options[e].value;i&&(Do.log(i),this._currentGeocodingType=i)},onReverseGeocodingDelimitationChange:function(t){var e=t.target.selectedIndex,i=t.target.options[e].value;if(i){Do.log(i),this._currentGeocodingDelimitation=i,this._clearInputRequest();var o=this._map;this._removeMapInteraction(o),this._activateMapInteraction(o)}},onGPreverseGeocodingReturnPictoClick:function(){var t=this._map;this._clearLocations(),this._clearLocationsFeature(t),this._clearInputRequest(),this._activateMapInteraction(t)},onReverseGeocodingSubmit:function(){if(this._requestGeom){var t=this._map,e=this;this._reverseGeocodingRequest({index:e._currentGeocodingType,onSuccess:function(i){if(Do.log(i),i){var o=i.locations;e._displayGeocodedLocations(o),e._hideWaitingContainer(),0===o.length&&e._activateMapInteraction(t)}},onFailure:function(i){e._hideWaitingContainer(),e._clearLocations(),e._clearLocationsFeature(t),e._clearInputRequest(),e._activateMapInteraction(t),Do.log(i.message)}})}else Do.log("missing search geometry")},onReverseGeocodingResultClick:function(t){var e=c.index(t.target.id);this._inputResultsLayer&&this._inputResultsLayer.eachLayer((function(t){t.options.id===parseInt(e,10)&&t.fire("click")}))},onReverseGeocodingResultMouseOver:function(t){var e=c.index(t.target.id);t.target.classList&&t.target.classList.add("GPreverseGeocodedLocationHighlight"),this._inputResultsLayer&&this._inputResultsLayer.eachLayer((function(t){t.options.id===parseInt(e,10)&&t.fire("mouseover")}))},onReverseGeocodingResultMouseOut:function(t){var e=c.index(t.target.id);t.target.classList&&t.target.classList.remove("GPreverseGeocodedLocationHighlight"),this._inputResultsLayer&&this._inputResultsLayer.eachLayer((function(t){t.options.id===parseInt(e,10)&&t.fire("mouseout")}))},_clearLocations:function(){if(this._reverseGeocodingLocations=[],this._resultsListContainer)for(;this._resultsListContainer.firstChild;)this._resultsListContainer.removeChild(this._resultsListContainer.firstChild)},_clearLocationsFeature:function(t){null!==this._inputResultsLayer&&(t.removeLayer(this._inputResultsLayer),this._inputResultsLayer=null)},_clearInputRequest:function(){this._requestPosition=null,this._requestCircleFilter=null,this._requestBboxFilter=null},_displayWaitingContainer:function(){this._waitingContainer.className="GPreverseGeocodingCalcWaitingContainerVisible",this._waiting=!0,this._timer&&(clearTimeout(this._timer),this._timer=null);var t=this;this._timer=setTimeout((function(){!0===t._waiting?t._hideWaitingContainer():t._timer&&clearTimeout(t._timer)}),16e3)},_hideWaitingContainer:function(){this._waiting&&(this._waitingContainer.className="GPreverseGeocodingCalcWaitingContainerHidden",this._waiting=!1,clearTimeout(this._timer),this._timer=null)}});s.a.extend(Oo.prototype,s.a.Evented.prototype);var No=Oo,Uo=l.getLogger("RouteDOM"),jo={_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProute"),t.className="GPwidget",t},_createShowRouteElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowRoute"),t.type="checkbox",t},_createShowRoutePictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowRoutePicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowRoute"),e.title="Ouvrir le calcul d'itinéraire",e.addEventListener?e.addEventListener("click",(function(e){t.onShowRoutePanelClick(e)})):e.attachEvent&&e.attachEvent("onclick",(function(e){t.onShowRoutePanelClick(e)}));var i=document.createElement("span");return i.id=this._addUID("GPshowRouteOpen"),i.className="GPshowAdvancedToolOpen",e.appendChild(i),e},_createRoutePanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProutePanel"),t.className="GPpanel",t},_createRoutePanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var i=document.createElement("div");i.className="GPpanelTitle",i.innerHTML="Calcul d'itinéraire",e.appendChild(i);var o=document.createElement("div");return o.id=this._addUID("GProutePanelClose"),o.className="GPpanelClose",o.title="Masquer le panneau",o.addEventListener?o.addEventListener("click",(function(){document.getElementById(t._addUID("GPshowRoutePicto")).click()}),!1):o.attachEvent&&o.attachEvent("onclick",(function(){document.getElementById(t._addUID("GPshowRoutePicto")).click()})),e.appendChild(o),e},_createRoutePanelFormElement:function(){var t=this,e=document.createElement("form");return e.id=this._addUID("GProuteForm"),e.setAttribute("onkeypress","return event.keyCode != 13;"),e.addEventListener("submit",(function(e){Uo.log(e),e.preventDefault();var i=document.getElementsByClassName(t._addUID("GPlocationPoint")),o=i[0].childNodes[0].id,n=i[i.length-1].childNodes[0].id,s=c.index(o),a=c.index(n);if(""===document.getElementById(t._addUID("GPlocationOrigin_"+s)).value&&""===document.getElementById(t._addUID("GPlocationOriginCoords_"+s)).value||""===document.getElementById(t._addUID("GPlocationOrigin_"+a)).value&&""===document.getElementById(t._addUID("GPlocationOriginCoords_"+a)).value)return!1;t._addRouteResultsStagesValuesElement(i);var r=null;if(document.getElementById(t._addUID("GProuteComputationSelect"))){var l=document.getElementById(t._addUID("GProuteResultsComputationSelect"));l.selectedIndex=document.getElementById(t._addUID("GProuteComputationSelect")).selectedIndex,r=l.options[l.selectedIndex].value}var h=null;document.getElementById(t._addUID("GProuteTransportCar"))&&document.getElementById(t._addUID("GProuteTransportCar")).checked&&(h=document.getElementById(t._addUID("GProuteTransportCar")).value),document.getElementById(t._addUID("GProuteTransportPedestrian"))&&document.getElementById(t._addUID("GProuteTransportPedestrian")).checked&&(h=document.getElementById(t._addUID("GProuteTransportPedestrian")).value);for(var d=[],u=document.getElementsByClassName("GProuteExclusionsOption"),p=0;p2?document.getElementById("GProuteAutoCompleteList"+i).style.display="block":document.getElementById("GProuteAutoCompleteList"+i).style.display="none",o.onAutoCompleteSearchText(t)}})),a.addEventListener("blur",(function(){var t=this.id.charAt(this.id.length-1);document.getElementById("GProuteAutoCompleteList"+t).style.display="none"})),n.appendChild(a);var r=document.createElement("input");r.id="GProuteOriginCoords"+t,r.className="GProuteOriginHidden",r.type="text",r.disabled=!0,n.appendChild(r);var l=document.createElement("input");l.id="GProuteOriginPointer"+t,l.type="checkbox",n.appendChild(l);var c=document.createElement("label");return c.id="GProuteOriginPointerImg"+t,c.htmlFor="GProuteOriginPointer"+t,c.className="GProuteOriginPointerImg",c.title="Pointer un lieu sur la carte",c.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e,i=this.id.charAt(this.id.length-1);for(e=1;e<8;e++)i!==e&&(document.getElementById("GProuteOriginPointer"+e).checked=!1,"Pointer un lieu sur la carte"===document.getElementById("GProuteOriginCoords"+e).value&&(document.getElementById("GProuteOriginCoords"+e).value="",document.getElementById("GProuteOrigin"+e).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+e).className="GProuteOriginHidden"));if(document.getElementById("GProuteOriginPointer"+i).checked){for(document.getElementById("GProuteOriginCoords"+i).value="",e=1;e<8;e++)document.getElementById("GProutePoint"+e).style.display="flex";document.getElementById("GProuteForm").className="",document.getElementById("GProuteOriginPointer"+i).checked=!1,document.getElementById("GProuteOrigin"+i).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+i).className="GProuteOriginHidden"}else{for(document.getElementById("GProuteOriginCoords"+i).value="Pointer un lieu sur la carte",e=1;e<8;e++)document.getElementById("GProutePoint"+e).style.display=i===e?"flex":"none";document.getElementById("GProuteForm").className="GProuteFormMini",document.getElementById("GProuteOriginPointer"+i).checked=!0,document.getElementById("GProuteOrigin"+i).className="GProuteOriginHidden",document.getElementById("GProuteOriginCoords"+i).className="GProuteOriginVisible"}o.onRouteMapPointClick(t)})),n.appendChild(c),n},_createRoutePanelFormRemoveStageElement:function(t){var e=this,i=document.createElement("div");return i.id="GProuteStageRemove"+t,i.className="GProuteStageRemove",i.title="Supprimer l'étape",1!==t&&7!==t&&i.addEventListener("click",(function(t){var i=this.id.charAt(this.id.length-1);document.getElementById("GProutePoint"+i).className="GPflexInput GProuteStageFlexInputHidden",document.getElementById("GProuteOrigin"+i).value="",document.getElementById("GProuteOrigin"+i).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+i).value="",document.getElementById("GProuteOriginCoords"+i).className="GProuteOriginHidden",document.getElementById("GProuteStageAdd").style.display="",e.onRouteRemovePointClick(t)})),i},_createRoutePanelFormAddStageElement:function(){var t=this,e=document.createElement("div");return e.id="GProuteStageAdd",e.title="Ajouter une étape",e.addEventListener("click",(function(e){for(var i=1,o=0,n=2;n<7;n++)"GPflexInput GProuteStageFlexInputHidden"===document.getElementById("GProutePoint"+n).className?1===i&&(i=n):o++;i<7&&(document.getElementById("GProutePoint"+i).className="GPflexInput GProuteStageFlexInput"),4===o&&(document.getElementById("GProuteStageAdd").style.display="none"),t.onRouteAddPointClick(e)})),e},_createRoutePanelFormAutoCompleteListElement:function(t){var e=this,i=document.createElement("div");return i.id="GProuteAutoCompleteList"+t,i.className="GPadvancedAutoCompleteList",i.addEventListener?i.addEventListener("click",(function(i){e.onAutoCompletedResultsItemClick(i),document.getElementById("GProuteAutoCompleteList"+t).style.display="none"}),!1):i.attachEvent&&i.attachEvent("onclick",(function(i){e.onAutoCompletedResultsItemClick(i),document.getElementById("GProuteAutoCompleteList"+t).style.display="none"})),i},_createRouteAutoCompletedLocationElement:function(t,e,i){var o=document.getElementById("GProuteAutoCompleteList"+e),n=document.createElement("div");n.id="AutoCompletedLocation"+i,n.className="GPautoCompleteProposal",n.innerHTML=so.getSuggestedLocationFreeform(t),o.appendChild(n)},_createRoutePanelFormModeChoiceElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProuteModeChoice"),t},_createRoutePanelFormModeChoiceTransportElement:function(t){var e=this,i=document.createElement("div");i.id=this._addUID("GProuteTransportChoice");var o=document.createElement("span");o.className="GProuteModeLabel",o.innerHTML="Mode de transport",i.appendChild(o);for(var n=0;n2?document.getElementById(e._addUID("GPautoCompleteList")).style.display="block":document.getElementById(e._addUID("GPautoCompleteList")).style.display="none",e.onAutoCompleteSearchText(t))})),o.addEventListener("keydown",(function(t){var i=t.which||t.keyCode,o=document.getElementById(e._addUID("GPautocompleteResults"));if(o){var n=o.getElementsByClassName("GPautoCompleteProposal current"),s=o.getElementsByClassName("GPautoCompleteProposal"),a=s.length;if(a){var r=null;if(!n.length)return(r=s[0]).className="GPautoCompleteProposal current",r.style.color="#000000",void(r.style["background-color"]="#CEDBEF");r=n[0];var l=parseInt(c.index(r.id),10),h=l===a-1?s[0]:s[l+1],d=0===l?s[a-1]:s[l-1];switch(r.style["background-color"]="",r.style.color="",d.style["background-color"]="",d.style.color="",h.style["background-color"]="",h.style.color="",i){case 38:r.className="GPautoCompleteProposal",d.className="GPautoCompleteProposal current",d.style.color="#000000",d.style["background-color"]="#CEDBEF";break;case 40:r.className="GPautoCompleteProposal",h.className="GPautoCompleteProposal current",h.style.color="#000000",h.style["background-color"]="#CEDBEF";break;case 13:t.preventDefault(),r.click(t)}r.focus()}}})),i.appendChild(o);var n=document.createElement("div");return n.id=this._addUID("GPsearchInputReset"),n.addEventListener("click",(function(){document.getElementById(e._addUID("GPsearchInputText")).value="",document.getElementById(e._addUID("GPautoCompleteList")).style.display="none",document.getElementById(e._addUID("GPgeocodeResultsList")).style.display="none",e.onSearchResetClick()})),i.appendChild(n),i},_createShowAdvancedSearchElement:function(){var t=this,e=document.createElement("div");e.id=this._addUID("GPshowAdvancedSearch"),e.className="GPshowAdvancedToolPicto",e.title="Ouvrir la recherche avancée",e.addEventListener("click",(function(){var e="#GPsearchInput-"+t._uid;document.querySelector(e+" input").disabled=!0,document.getElementById(t._addUID("GPautoCompleteList")).style.display="none",document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",document.getElementById(t._addUID("GPshowAdvancedSearch")).style.display="none",document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="inline-block"}));var i=document.createElement("span");return i.id=this._addUID("GPshowAdvancedSearchOpen"),i.className="GPshowAdvancedToolOpen",e.appendChild(i),e},_createAdvancedSearchPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPadvancedSearchPanel"),t.className="GPpanel",t.style.display="none",t},_createGeocodeResultsElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPgeocodeResultsList"),t.className="GPpanel",t.style.display="none",t.appendChild(this._createGeocodeResultsHeaderElement()),t},_createAutoCompleteElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPautoCompleteList"),t.className="GPautoCompleteList",t.style.display="none",t},_createAutoCompleteListElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPautocompleteResults"),e.addEventListener?e.addEventListener("click",(function(e){t.onAutoCompletedResultsItemClick(e),document.getElementById(t._addUID("GPautoCompleteList")).style.display="none"}),!1):e.attachEvent&&e.attachEvent("onclick",(function(e){t.onAutoCompletedResultsItemClick(e),document.getElementById(t._addUID("GPautoCompleteList")).style.display="none"})),e},_createAutoCompletedLocationElement:function(t,e){var i=document.getElementById(this._addUID("GPautocompleteResults")),o=document.createElement("div");o.id=this._addUID("AutoCompletedLocation_"+e),o.className="GPautoCompleteProposal",o.innerHTML=so.getSuggestedLocationFreeform(t),o.addEventListener?o.addEventListener("click",(function(t){i.click(t)}),!1):o.attachEvent&&o.attachEvent("onclick",(function(t){i.click(t)})),i.appendChild(o)},_createAdvancedSearchPanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var i=document.createElement("div");i.className="GPpanelTitle",i.innerHTML="Recherche avancée",e.appendChild(i);var o=document.createElement("div");return o.id=this._addUID("GPadvancedSearchClose"),o.className="GPpanelClose",o.title="Fermer la recherche avancée",o.addEventListener?o.addEventListener("click",(function(){var e="#GPsearchInput-"+t._uid;document.querySelector(e+" input").disabled=!1,document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",document.getElementById(t._addUID("GPshowAdvancedSearch")).style.display="inline-block",document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="none"}),!1):o.attachEvent&&o.attachEvent("onclick",(function(){var e="#GPsearchInput-"+t._uid;document.querySelector(e+" input").disabled=!1,document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",document.getElementById(t._addUID("GPshowAdvancedSearch")).style.display="inline-block",document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="none"})),e.appendChild(o),e},_createAdvancedSearchPanelFormElement:function(t){var e=this,i=document.createElement("form");i.id=this._addUID("GPadvancedSearchForm"),i.addEventListener("submit",(function(t){t.preventDefault();for(var i=[],o="#GPadvancedSearchFilters-"+e._uid,n=document.querySelectorAll(o+" > div > div > input"),s=0;sa&&(Vo.trace("zoom level max..."),o=a),Vo.trace("zoom",o),o},_setMarker:function(t,e,i,o){var n=this._map;if(null!=this._marker&&(n.removeLayer(this._marker),this._marker=null),t){var a=null;"string"==typeof o?a=new ho(o):o instanceof s.a.Icon?a=o:(a=new ho("blue"),Vo.log("Utilisation du marker par défaut !"));var r={clickable:!0,zIndexOffset:1e3,icon:a};if(this._marker=s.a.marker(s.a.latLng(t),r),this._marker.addTo(n),i){var l=null;if("string"!=typeof e)if("GeocodedLocation"===e.service){l="
      ";var c=e.location.placeAttributes;for(var h in c)c.hasOwnProperty(h)&&"trueGeometry"!==h&&"extraFields"!==h&&"houseNumberInfos"!==h&&"_count"!==h&&(l+="
    • ",l+=''+h.toUpperCase()+" : ",l+=c[h],l+="
    • ");l+="
    "}else l="SuggestedLocation"===e.service?so.getSuggestedLocationFreeform(e.location):"sans informations.";else l=e;this._marker.bindPopup(l)}}},_clearResults:function(){this._currentGeocodingLocation=null,this._clearSuggestedLocation(),this._clearGeocodedLocation(),this._setMarker()},_clearSuggestedLocation:function(){if(this._suggestedLocations=[],this._suggestedContainer)for(;this._suggestedContainer.firstChild;)this._suggestedContainer.removeChild(this._suggestedContainer.firstChild)},_clearGeocodedLocation:function(){if(this._geocodedLocations=[],this._geocodedContainer)for(;this._geocodedContainer.firstChild;)this._geocodedContainer.removeChild(this._geocodedContainer.firstChild)},onShowSearchEngineClick:function(){},onSearchResetClick:function(){this._clearResults()},onAutoCompleteSearchText:function(t){var e=t.target.value;if(e&&(this._currentGeocodingLocation=e,!(e.length<3))){var i=this.options.autocompleteOptions.triggerGeocode,o=this.options.autocompleteOptions.triggerDelay,n=this;this._requestAutoComplete({text:e,onSuccess:function(t){if(Vo.log("request from AutoComplete",t),t){n._suggestedLocations=t.suggestedLocations,n._locationsToBeDisplayed=[];for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:null,o=this.canvas||(this.canvas=document.createElement("canvas")),n=o.getContext("2d");n.font=null===i?"".concat(this._getCssProperty(e,"font-weight")," ").concat(this._getCssProperty(e,"font-size")," ").concat(this._getCssProperty(e,"font-family")):i;var s=n.measureText(t);return s.width},_dataZToSvgY:function(t,e,i,o){return e-(t-i)*o-.5},_dataDistToSvgX:function(t,e,i,o){return e-i+t*o},_svgXToDataDist:function(t,e,i,o){return(t+i-e)/o},_arrayBisect:function(t,e){var i;if(0===t.length)return 0;for(i=0;iS&&(L=Math.pow(10,Math.ceil(Math.log((p-u)/S)/Math.log(10))),x=Math.floor(u/L)*L,(G=Math.ceil(p/L)*L)===p&&(G+=L),x=Math.round(100*x)/100,G=Math.round(100*G)/100,I=Math.floor((G-x)/L)),I=Math.max(Math.round(I),1);var k=document.createElementNS("http://www.w3.org/2000/svg","g");k.setAttribute("class","profile-z-vertical");var R,T,A,D,O,N,U,j=document.createElementNS("http://www.w3.org/2000/svg","g"),F=b/I;R=p===u?b/.2:b/(G-x);for(var z=0;z<=I;z++)(T=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("class","profile-z-graduation"),T.setAttribute("font-family","Verdana"),T.setAttribute("font-size","10px"),T.setAttribute("fill","#5E5E5E"),T.textContent=(Math.round(100*(x+z*L))/100).toLocaleString(),A=b-z*F,T.setAttribute("transform","translate(".concat(17+w-8,", ").concat(A+5,")")),T.setAttribute("text-anchor","end"),k.appendChild(T),D=Math.round(A)-.5,O=document.createElementNS("http://www.w3.org/2000/svg","g"),(N=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),N.setAttribute("stroke-width","1"),0!==z?N.setAttribute("stroke-opacity","0.2"):N.setAttribute("stroke-opacity","1"),N.setAttribute("stroke","#000000"),N.setAttribute("fill","none"),N.setAttribute("d","M".concat(17+w,",").concat(D," L").concat(M+17+w,",").concat(D)),(U=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),U.setAttribute("stroke-width","1"),U.setAttribute("stroke-opacity","1"),U.setAttribute("stroke","#000000"),U.setAttribute("fill","none"),U.setAttribute("d","M".concat(17+w,",").concat(D," L").concat(17+w+5,",").concat(D)),U.setAttribute("transform","translate(-5, 0)"),O.appendChild(U),O.appendChild(N),j.appendChild(O);var B=document.createElementNS("http://www.w3.org/2000/svg","text");B.setAttribute("class","profile-z-legend"),B.setAttribute("font-family","Verdana"),B.setAttribute("font-size","11px"),B.setAttribute("fill","#5E5E5E"),B.textContent="Altitude (m)",B.setAttribute("transform","translate(".concat(9,", ").concat(Math.round(b/2),") rotate(-90)")),B.setAttribute("text-anchor","middle"),k.appendChild(B),C.appendChild(k),C.appendChild(j),m>2e3&&(m/=1e3,f="km");var W=Math.floor(M/P),q=Math.pow(10,Math.ceil(Math.log(m/W)/Math.log(10)))/2,H=m,V=Math.floor(H/q);V>W?(q=Math.pow(10,Math.ceil(Math.log(m/W)/Math.log(10))),V=Math.floor(H/q)):V<1&&(q=Math.pow(10,Math.ceil(Math.log(m/W)/Math.log(10))-1),V=Math.floor(H/q));var Y=q*(V=Math.max(V,1)),X=document.createElementNS("http://www.w3.org/2000/svg","g");X.setAttribute("class","profile-x-vertical");for(var K,Z,J,Q,$,tt,et=document.createElementNS("http://www.w3.org/2000/svg","g"),it=M/H,ot=(H-Y)*it,nt=Math.round((M-ot)/V),st=0;st<=V+1;st++)(K=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("class","profile-x-graduation"),K.setAttribute("font-family","Verdana"),K.setAttribute("font-size","10px"),K.setAttribute("fill","#5E5E5E"),st!==V+1&&(K.textContent=(Math.round(100*st*q)/100).toLocaleString()),Z=17+w+st*nt,st===V+1&&(Z=17+w+M),K.setAttribute("transform","translate(".concat(Z,", ").concat(b+15+5,")")),K.setAttribute("text-anchor","middle"),X.appendChild(K),J=Z-.5,Q=document.createElementNS("http://www.w3.org/2000/svg","g"),($=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),$.setAttribute("stroke-width","1"),0!==st?$.setAttribute("stroke-opacity","0.2"):$.setAttribute("stroke-opacity","1"),$.setAttribute("stroke","#000000"),$.setAttribute("fill","none"),$.setAttribute("d","M".concat(J,",").concat(b," L").concat(J,",0")),(tt=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),tt.setAttribute("stroke-width","1"),tt.setAttribute("stroke-opacity","1"),tt.setAttribute("stroke","#000000"),tt.setAttribute("fill","none"),tt.setAttribute("d","M".concat(J,",").concat(b," L").concat(J,",").concat(b-5)),tt.setAttribute("transform","translate(0, 5)"),Q.appendChild(tt),Q.appendChild($),et.appendChild(Q);var at=document.createElementNS("http://www.w3.org/2000/svg","text");at.setAttribute("class","profile-x-legend"),at.setAttribute("font-family","Verdana"),at.setAttribute("font-size","11px"),at.setAttribute("fill","#5E5E5E"),at.textContent="Distance (".concat(f,")"),at.setAttribute("transform","translate(".concat(17+w+M/2,", ").concat(b+15+17+3,")")),at.setAttribute("text-anchor","middle"),X.appendChild(at),C.appendChild(X),C.appendChild(et);var rt=document.createElementNS("http://www.w3.org/2000/svg","g"),lt=1;"km"===f&&(lt=1e3);for(var ct=this._dataDistToSvgX(h[0].dist/lt,E,M,it),ht=this._dataZToSvgY(h[0].z,b,x,R),dt="M".concat(ct,",").concat(ht),ut=1;utl.dist-s&&(c=l);var d=this._dataDistToSvgX(c.dist/lt,E,M,it),u=this._dataZToSvgY(c.z,b,x,R);Et.setAttribute("cx",d),Et.setAttribute("cy",u),vt.setAttribute("x1",d),vt.setAttribute("y1",b),vt.setAttribute("x2",d),vt.setAttribute("y2",0),yt.setAttribute("x1",17+w),yt.setAttribute("y1",u),yt.setAttribute("x2",M+17+w),yt.setAttribute("y2",u),o.__updateProfileMarker(n,c);var p="Altitude : ".concat(c.z.toLocaleString()," m"),f="Pente : ".concat(c.slope," %"),g="(lat : ".concat(c.lat.toLocaleString()," / lon : ").concat(c.lon.toLocaleString(),")");Pt.innerHTML=p,bt.innerHTML=f,Mt.innerHTML=g;var _,v=Math.max(this._getTextWidth(g,Mt),this._getTextWidth(p,Pt));c.dist>m*lt/2?(_="M -0.5 -0.5 l -6 6 l 0 16 l -".concat(v+10," 0 l 0 -44 l ").concat(v+10," 0 l 0 16 l 6 6"),wt.setAttribute("transform","translate(".concat(-(v/2+12),",0)"))):c.dist<=m*lt/2&&(_="M -0.5 -0.5 l 6 6 l 0 16 l ".concat(v+10," 0 l 0 -44 l -").concat(v+10," 0 l 0 16 l -6 6"),wt.setAttribute("transform","translate(".concat(v/2+12,",0)"))),Lt.setAttribute("d",_),St.setAttribute("d",_),Ct.setAttribute("transform","translate(".concat(d,",").concat(u,")")),Ct.style.transform="translate(".concat(d,"px,").concat(u,"px)")}.bind(this)),ft.appendChild(gt),C.appendChild(ft),g.appendChild(C),e}},displayProfileRaw:function(t,e,i,o){if(e){for(;e.firstChild;)e.removeChild(e.firstChild);var n=t&&t.points?t.points:{},s=document.createElement("textarea");return s.id="profilElevationResults",s.rows=10,s.cols=50,s.style.width="100%",s.innerHTML=JSON.stringify(n,void 0,4),s.addEventListener("mouseover",(function(t){o.__customRawProfileMouseOverEvent(i,t)})),e.appendChild(s),e}},displayProfileLibD3:function(t,e,i,o){var n=i;if(e&&t){for(;e.firstChild;)e.removeChild(e.firstChild);var s=t.points;if(t.distance>2e3){t.unit="km";for(var a=0;al[0]-e?l:a,h=g(c.dist),d=_(c.z);C.select("#focusCircle").attr("cx",h).attr("cy",d),C.select("#focusLineX").attr("x1",h).attr("y1",_(M[0])).attr("x2",h).attr("y2",_(M[1])),C.select("#focusLineY").attr("x1",g(b[0])).attr("y1",d).attr("x2",g(b[1])).attr("y2",d),o.__updateProfileMarker(n,c),L.transition().duration(200).style("opacity",.9);var u="";u+=" Altitude : "+c.z+" m",r.currentSlope&&(u+="
    Pente : "+c.slope+" %"),u+="
    (Lat : "+c.lat+"/ Lon : "+c.lon+")",L.html(u).style("left",d3.event.pageX+"px").style("top",d3.event.pageY-28+"px")})),P}},displayProfileLibAmCharts:function(t,e,i,o){var n=i;if(e&&t){var s=t.points,a="[[title]] : [[value]]m
    ";if(n.options.displayProfileOptions.currentSlope&&(a+="Pente : [[slope]] %
    "),a+="(Lat: [[lat]] / Lon:[[lon]])",AmCharts.addInitHandler((function(){})),t.distance>2e3){t.unit="km";for(var r=0;r100?h=1:c>10&&(h=10),c=Math.round(c*h)/h,s[l].dist=c}var d={type:"serial",pathToImages:"http://cdn.amcharts.com/lib/3/images/",categoryField:"dist",autoMarginOffset:0,marginRight:10,marginTop:10,startDuration:0,color:"#5E5E5E",fontSize:8,theme:"light",thousandsSeparator:"",numberFormatter:{precision:-1,decimalSeparator:",",thousandsSeparator:" "},categoryAxis:{color:"#5E5E5E",gridPosition:"start",minHorizontalGap:40,tickPosition:"start",title:"Distance ("+t.unit+")",titleColor:"#5E5E5E",labelOffset:0,startOnAxis:!0},chartCursor:{animationDuration:0,bulletsEnabled:!0,bulletSize:10,categoryBalloonEnabled:!1,cursorColor:"#F90",graphBulletAlpha:1,graphBulletSize:1,zoomable:!1},trendLines:[],graphs:[{balloonColor:"#CCCCCC",balloonText:a,bullet:"round",bulletAlpha:0,bulletBorderColor:"#FFF",bulletBorderThickness:2,bulletColor:"#F90",bulletSize:6,hidden:!1,id:"AmGraph-1",fillAlphas:.4,fillColors:"#C77A04",lineAlpha:1,lineColor:"#C77A04",lineThickness:1,title:"Altitude",valueField:"z"}],guides:[],valueAxes:[{id:"ValueAxis-1",minVerticalGap:20,title:"Altitude (m)"}],balloon:{borderColor:"#CCCCCC",borderThickness:1,fillColor:"#FFFFFF",showBullet:!0},titles:[],allLabels:[],dataProvider:s},u=AmCharts.makeChart(e,d);return u.addListener("changed",(function(t){var e=t.chart.dataProvider[t.index];o.__updateProfileMarker(n,e)})),u}}},Jo=l.getLogger("ElevationPath"),Qo=s.a.Control.extend({includes:Ko,options:{position:"topleft",active:!1,elevationPathOptions:{},stylesOptions:{},displayProfileOptions:{greaterSlope:!0,meanSlope:!0,ascendingElevation:!0,descendingElevation:!0,currentSlope:!0,apply:null,target:null}},initialize:function(t){s.a.Util.setOptions(this,t),this._uid=c.generate(),this._initDisplayProfileOptions(),this._showContainer=null,this._pictoContainer=null,this._panelContainer=null,this._profilContainer=null,this._waitingContainer=null,this._infoContainer=null,this._timerHdlr=null,this._reducePanel=!1,this._featuresLayer=null,this._lastIdLayer=0,this._currentIdLayer=0,this._currentFeature=null,this._profile=null,this._marker=null,this._geometry=null,this._distance=0,this._data={}},onAdd:function(t){var e=this._container=this._initLayout();return t&&this.options.active&&(null===this._profile&&(this._panelContainer.style.display="none"),this._activateMapInteraction(t)),s.a.DomEvent.disableClickPropagation(e).disableScrollPropagation(e),e},onRemove:function(){},_initDisplayProfileOptions:function(){var t=this.options.displayProfileOptions,e=t.apply;t.apply="function"==typeof e?e:Qo.DISPLAY_PROFILE_BY_DEFAULT;var i=t.target;t.target=void 0!==i?i:null;var o=Object.getPrototypeOf(this.options);void 0===t.meanSlope&&(t.meanSlope=o.displayProfileOptions.meanSlope),void 0===t.greaterSlope&&(t.greaterSlope=o.displayProfileOptions.greaterSlope),void 0===t.ascendingElevation&&(t.ascendingElevation=o.displayProfileOptions.ascendingElevation),void 0===t.descendingElevation&&(t.descendingElevation=o.displayProfileOptions.descendingElevation),void 0===t.currentSlope&&(t.currentSlope=o.displayProfileOptions.currentSlope)},_initLayout:function(){var t=this._createMainContainerElement(),e=this._showContainer=this._createShowElevationPathElement();t.appendChild(e),this.options.active&&(this._showContainer.checked=!0);var i=this._pictoContainer=this._createShowElevationPathPictoElement();t.appendChild(i);var o=this._panelContainer=this._createElevationPathPanelElement(),n=this._createElevationPathPanelHeaderElement();o.appendChild(n);var s=this._profilContainer=this._createElevationPathPanelProfilElement();o.appendChild(s);var a=this._waitingContainer=this._createElevationPathWaitingElement();o.appendChild(a);var r=this._infoContainer=this._createElevationPathInformationsElement();return o.appendChild(r),t.appendChild(o),t},onShowElevationPathClick:function(t){Jo.trace(t);var e=this._map;this._reducePanel?null!==this._profile&&(null===this.options.displayProfileOptions.target&&(this._pictoContainer.style.display="none"),this._panelContainer.style.display="block"):this._showContainer.checked?(this._pictoContainer.style.display="block",this._panelContainer.style.display="none",this._removeMapInteraction(e),this._clear()):(null===this._profile&&(this._panelContainer.style.display="none"),this._activateMapInteraction(e)),this._reducePanel=!1},onReduceElevationPathPanelClick:function(){this._reducePanel=!0,this._pictoContainer.style.display="block",this._panelContainer.style.display="none"},onOpenElevationPathInfoClick:function(){var t=this.options.displayProfileOptions.meanSlope,e=this.options.displayProfileOptions.greaterSlope,i=this.options.displayProfileOptions.ascendingElevation,o=this.options.displayProfileOptions.descendingElevation,n=this._infoContainer;if(n.childElementCount)for(;n.firstChild;)n.removeChild(n.firstChild);i&&this._addElevationPathInformationsItem("Dénivelé positif : "+this._data.ascendingElevation.toLocaleString()+" m"),o&&this._addElevationPathInformationsItem("Dénivelé négatif : "+this._data.descendingElevation.toLocaleString()+" m"),t&&this._addElevationPathInformationsItem("Pente moyenne : "+this._data.meanSlope.toLocaleString()+" %"),e&&this._addElevationPathInformationsItem("Plus forte pente : "+this._data.greaterSlope.toLocaleString()+" %"),"GPelevationPathInformationsContainerVisible"===n.className?(clearTimeout(this._timerHdlr),n.className="GPelevationPathInformationsContainerHidden"):n.className="GPelevationPathInformationsContainerVisible",this._timerHdlr=setTimeout((function(){n.className="GPelevationPathInformationsContainerHidden"}),4e3)},_activateMapInteraction:function(t){if(Jo.info("_activateMapInteraction()"),null===this._featuresLayer){this._featuresLayer=new s.a.FeatureGroup,t.addLayer(this._featuresLayer);var e=this;t.on("contextmenu",(function(){})),t.on("draw:created",(function(t){Jo.trace("draw:created"),e._currentIdLayer=s.a.Util.stamp(t.layer),e._getFeatureGeometry(t.layer),e._addFeatureLayer(t.layer)})),t.on("draw:drawstart",(function(){Jo.trace("draw:drawstart"),e._removeFeatureLayer(e._lastIdLayer),e._lastIdLayer=e._currentIdLayer})),t.on("draw:drawstop",(function(){Jo.trace("draw:drawstop"),void 0===e.options.elevationPathOptions.onSuccess&&null===e.options.displayProfileOptions.target&&(e._pictoContainer.style.display="none",e._panelContainer.style.display="block"),e._altiRequest()}))}this._activatePolyLineInteraction(t)},_removeMapInteraction:function(t){t&&(null!==this._featuresLayer&&(t.off("draw:created"),t.off("draw:drawstart"),t.off("draw:drawstop"),t.removeLayer(this._featuresLayer),this._featuresLayer=null),this._lastIdLayer=this._currentIdLayer=0,this._currentFeature&&this._currentFeature.disable())},_activatePolyLineInteraction:function(t){this._currentFeature&&this._currentFeature.disable();var e=this.options.stylesOptions||{},i=0!==Object.keys(e).length?e:{stroke:!0,color:"#C77A04",weight:4,opacity:.5,fill:!1};this._currentFeature=new s.a.Draw.Polyline(t,{shapeOptions:i}),this._currentFeature.enable()},_getFeatureGeometry:function(t){Jo.log(t.getLatLngs()),null!==this._geometry&&(this._geometry=null),this._geometry=[],this._distance=0;for(var e=t.getLatLngs(),i=0;i=200?200:Math.floor(o)}var n=this;s.a.Util.extend(t,{sampling:e,onSuccess:this.options.elevationPathOptions.onSuccess||function(t){Jo.log(t),t&&(null!==n.options.displayProfileOptions.target&&(n._pictoContainer.style.display="block",n._panelContainer.style.display="block"),n._displayProfil(t.elevations),n._waitingContainer.className="GPelevationPathCalcWaitingContainerHidden",n._waiting=!1)},onFailure:this.options.elevationPathOptions.onFailure||function(t){Jo.log(t.message),n._pictoContainer.style.display="block",n._panelContainer.style.display="none",n._waitingContainer.className="GPelevationPathCalcWaitingContainerHidden",n._waiting=!1,n._clear()}});var a=this._geometry;s.a.Util.extend(t,{positions:a}),Jo.log(t),this._waitingContainer.className="GPelevationPathCalcWaitingContainerVisible",no.Services.getAltitude(t)}else Jo.log("missing position")},_computeElevationMeasure:function(t){var e=function(t,e){var i=lo.decimalToRadian(t[1]),o=lo.decimalToRadian(e[1]),n=(o-i)/2,s=lo.decimalToRadian(e[0]-t[0])/2,a=Math.sin(n)*Math.sin(n)+Math.sin(s)*Math.sin(s)*Math.cos(i)*Math.cos(o);return 12756274*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))},i=t,o=this._geometry,n=0,s=0,a=o[1];i[0].dist=0,i[0].slope=0,i[0].lat=Math.round(1e4*i[0].lat)/1e4,i[0].lon=Math.round(1e4*i[0].lon)/1e4;for(var r=0,l=0,c=0,h=0,d=0,u=0,p=[],m=1;m0&&(l+=_,c+=E),d=g,i[m].dist=g,p.push(g),u+=E?Math.abs(Math.round(E/_*100)):0,i[m].slope=E?Math.abs(Math.round(E/_*100)):0;var w=i[m].slope;i[m].color=w>15&&w<30?"#005b4c":w>30&&w<45?"#00362d":w>45?"#00120f":"#00B798",i[m].lat=Math.round(1e4*i[m].lat)/1e4,i[m].lon=Math.round(1e4*i[m].lon)/1e4}Jo.trace("List Distances",p);for(var P=i[0].z,b=i[0].z,M=i[0].slope,C=0;Cb&&(b=L.z),L.zM&&(M=L.slope)}return{greaterSlope:M,meanSlope:Math.round(u/i.length),distancePlus:l,distanceMinus:r,ascendingElevation:c,descendingElevation:h,altMin:P.toLocaleString(),altMax:b.toLocaleString(),distance:this._distance,unit:"m",points:i}},_displayProfil:function(t){this._map.off("contextmenu"),this._data&&(this._data={});var e=this._data=this._computeElevationMeasure(t),i=this.options.displayProfileOptions.target;i&&i.appendChild(this._panelContainer),i=this._profilContainer;var o=this.options.displayProfileOptions,n=o.apply;"undefined"!=typeof AmCharts&&"undefined"!=typeof d3&&Jo.trace("Aucune lib. n'est presente !"),n.call(this,e,i,this);var a=s.a.DomUtil.get("GPelevationPathPanelInfo-"+this._uid);(o.greaterSlope||o.meanSlope||o.ascendingElevation||o.descendingElevation)&&(a.style.display="block")},_clear:function(){if(this._geometry=null,this._profile=null,this._profilContainer)for(;this._profilContainer.firstChild;)this._profilContainer.removeChild(this._profilContainer.firstChild);var t=this._map;this._marker&&(t.removeLayer(this._marker),this._marker=null)}});Qo.__createProfileMarker=function(t,e){Jo.log("__createProfileMarker");var i=t,o=i._map;i._marker=s.a.marker(s.a.latLng(e),{icon:new ho("orange"),draggable:!1,clickable:!1,zIndexOffset:1e3}),i._marker.addTo(o)},Qo.__updateProfileMarker=function(t,e){Jo.log("__updateProfileMarker");var i=t,o=i._map;i._marker?(i._marker.setLatLng(s.a.latLng(e)),i._marker.update()):(i._marker=s.a.marker(s.a.latLng(e),{icon:new ho("orange"),draggable:!1,clickable:!1,zIndexOffset:1e3}),i._marker.addTo(o))},Qo.__removeProfileMarker=function(t){Jo.log("__removeProfileMarker");var e=t,i=e._map;e._marker&&(i.removeLayer(e._marker),e._marker=null)},Qo.__customRawProfileOperation=function(){Jo.log("__customRawProfileOperation")},Qo.__customRawProfileMouseOverEvent=function(t,e){Jo.log("__customRawProfileMouseOverEvent",t,e)},Qo.DISPLAY_PROFILE_BY_DEFAULT=function(t,e,i){Jo.trace("ElevationPath.DISPLAY_PROFILE_BY_DEFAULT");var o=Zo.displayProfileByDefault(t,e,i,Qo);o&&(this._profile=o)},Qo.DISPLAY_PROFILE_RAW=function(t,e,i){Jo.trace("ElevationPath.DISPLAY_PROFILE_RAW");var o=Zo.displayProfileRaw(t,e,i,Qo);o&&(this._profile=o)},Qo.DISPLAY_PROFILE_LIB_D3=function(t,e,i){if(Jo.trace("ElevationPath.DISPLAY_PROFILE_LIB_D3"),"undefined"!=typeof d3){var o=Zo.displayProfileLibD3(t,e,i,Qo);o&&(this._profile=o)}else Jo.log("Lib. D3 is not loaded !")},Qo.DISPLAY_PROFILE_LIB_AMCHARTS=function(t,e,i){if(Jo.trace("ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS"),"undefined"!=typeof AmCharts){var o=Zo.displayProfileLibAmCharts(t,e,i,Qo);o&&(this._profile=o)}else Jo.log("Lib. AmCharts is not loaded !")};var $o=Qo,tn=s.a.Control.extend({options:{position:"topright",picto:null,url:null,text:null,size:"30px"},initialize:function(t){s.a.setOptions(this,t)},onAdd:function(){var t=null;t=s.a.DomUtil.create("div","gp-control-logo",t);var e=!(!this.options.url&&!this.options.text),i=null;e&&((i=s.a.DomUtil.create("a","",t)).target="_blank",this.options.url&&(i.href=this.options.url,this.options.text&&(i.title=this.options.text))),e&&this.options.text&&(i.text=this.options.text);var o=null;return!!this.options.picto&&((o=e?s.a.DomUtil.create("img","",i):s.a.DomUtil.create("img","",t)).src=this.options.picto,"string"==typeof this.options.size?o.style.height=o.style.width=this.options.size:(o.style.height=this.options.size.height,o.style.width=this.options.size.width)),t}}),en={LayerSwitcher:function(t){return new _e(t)},Isocurve:function(t){return new _o(t)},MousePosition:function(t){return new To(t)},ReverseGeocode:function(t){return new No(t)},Route:function(t){return new zo(t)},SearchEngine:function(t){return new Xo(t)},ElevationPath:function(t){return new $o(t)},Logo:function(t){return new tn(t)}},on={getZoomLevelFromScaleDenominator:function(t,e){var i={};switch(e){case"EPSG:2154":i={0:104579.224549894,1:52277.5323537905,2:26135.4870785954,3:13066.8913818,4:6533.2286041135,5:3266.5595244627,6:1633.2660045974,7:816.629554986,8:408.3139146768,9:204.1567415109,10:102.0783167832,11:51.0391448966,12:25.5195690743,13:12.7597836936,14:6.379891636,15:3.1899457653,16:1.5949728695,17:.7974864315,18:.3987432149,19:.1993716073,20:.0996858037,21:.0498429018};break;default:i={0:156543.033928041,1:78271.51696402048,2:39135.758482010235,3:19567.87924100512,4:9783.93962050256,5:4891.96981025128,6:2445.98490512564,7:1222.99245256282,8:611.49622628141,9:305.7481131407048,10:152.8740565703525,11:76.43702828517624,12:38.21851414258813,13:19.10925707129406,14:9.554628535647032,15:4.777314267823516,16:2.388657133911758,17:1.194328566955879,18:.5971642834779395,19:.2985821417389697,20:.1492910708694849,21:.0746455354347424}}var o=28e-5*t;for(var n in i)if(i.hasOwnProperty(n)&&i[n]<=o)return n=parseInt(n,10);return 0},getAttributions:function(t){var e=t.zoom,i=[];if(null!=t.originators&&t.visibility)for(var o,n=0,s=t.originators.length;ne&&(o=!1),o&&u&&u=1.3&&-1!==["EPSG:4326"].indexOf(this._crs.code)?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),c=s.a.Util.template(this._url,{s:this._getSubdomain(t)});return c+s.a.Util.getParamString(this.wmsParams,c,!0)+"&BBOX="+l}}),hn=l.getLogger("wmts"),dn=s.a.TileLayer.extend({includes:rn,defaultWmtsParams:{service:"WMTS",request:"GetTile",version:"1.0.0",layer:"",style:"",tilematrixset:"PM",format:"image/jpeg"},initialize:function(t,e){hn.log("initialize"),this._wmtsParams={},s.a.Util.extend(this._wmtsParams,this.defaultWmtsParams,e.paramsWmts),s.a.TileLayer.prototype.initialize.call(this,no.Helper.normalyzeUrl(t,{"gp-leaflet-ext":o.leafletExtVersion||o.version},!1),e.paramsNative),this._originators=e.originators,this._legends=e.legends,this._metadata=e.metadata,this._title=e.title,this._description=e.description,this._quicklookUrl=e.quicklookUrl,this._geoportal_id=0},onAdd:function(t){hn.trace("onAdd layer",this._geoportal_id),this._map=t,this._geoportal_id=s.a.stamp(this),s.a.TileLayer.prototype.onAdd.call(this,t),this.setVisible(!0),this.updateAttributions(t),t.on({overlayremove:this._onRemoveLayer,overlayadd:this._onAddLayer,layerremove:this._onRemoveLayer,layeradd:this._onAddLayer,moveend:this._onMoveEndLayer},this)},onRemove:function(t){hn.trace("onRemove layer",this._geoportal_id),this._map=t,s.a.TileLayer.prototype.onRemove.call(this,t),this.setVisible(!1),this.removeAttributions(t),t.off({overlayremove:this._onRemoveLayer,overlayadd:this._onAddLayer,layerremove:this._onRemoveLayer,layeradd:this._onAddLayer,moveend:this._onMoveEndLayer},this)},getTileUrl:function(t){var e=this._getZoomForUrl(),i=s.a.Util.template(this._url,{s:this._getSubdomain(t)});return i+s.a.Util.getParamString(this._wmtsParams,i)+"&tilematrix="+e+"&tilerow="+t.y+"&tilecol="+t.x},setParams:function(t,e){return s.a.extend(this._wmtsParams,t),e||this.redraw(),this}}),un=l.getLogger("layers"),pn={options:{},params:{},protocol:null,serviceUrl:"http://localhost?no-rights-found-for=[{layer}]",_initOptions:function(){if(!this.options||0===Object.keys(this.options).length)throw new Error("PARAM_MISSING : options !");if(!this.options.layer)throw new Error("PARAM_MISSING : layer !");this.options.apiKey||un.log("PARAM_MISSING : apiKey !"),void 0===this.options.ssl&&(this.options.ssl=!0)},_initContext:function(){this.protocol=!1===this.options.ssl?"http://":"https://"},_initParams:function(t){t||(t="WMTS"),this.params=sn.get({key:this.options.apiKey,layer:this.options.layer,service:t}),this.params&&0!==Object.keys(this.params).length||(this.params={},this.options.apiKey||un.log("WARNING PARAM_MISSING : parameter 'apiKey' is mandatory if the contract key configuration has not been loaded !"))},WMS:function(t,e){var i=l.getLogger("layers-wms");this.options=t||{},this._initOptions(),this.settings=e||{},this._initContext(),this._initParams("WMS"),i.log(this.params);var o=null;o=this.options.apiKey?s.a.Util.template("https://wxs.ign.fr/{key}/geoportail/r/wms",{key:this.options.apiKey}):this.params.url?this.params.url:s.a.Util.template(this.serviceUrl,{layer:this.options.layer});var n={layers:this.options.layer,styles:this.params.styles||"normal",format:this.params.format||"image/jpeg",version:this.params.version||"1.3.0"},a={minZoom:this.params.minZoom||1,maxZoom:this.params.maxZoom||21};return s.a.Util.extend(n,this.settings),s.a.Util.extend(a,this.settings),new cn(o.replace(/(http|https):\/\//,this.protocol),{paramsNative:a,paramsWms:n,originators:this.params.originators||this.settings.originators||[],legends:this.settings.originators||this.params.legends||[],metadata:this.settings.metadata||this.params.metadata||[],title:this.settings.title||this.params.title||"",description:this.settings.description||this.params.description||"",quicklookUrl:this.settings.quicklookUrl||this.params.quicklookUrl||""})},WMTS:function(t,e){var i=l.getLogger("layers-wmts");this.options=t||{},this._initOptions(),this.settings=e||{},this._initContext(),this._initParams("WMTS"),i.log(this.params);var o=null;o=this.options.apiKey?s.a.Util.template("https://wxs.ign.fr/{key}/geoportail/wmts",{key:this.options.apiKey}):this.params.url?this.params.url:s.a.Util.template(this.serviceUrl,{layer:this.options.layer});var n={layer:this.options.layer,style:this.params.styles||"normal",format:this.params.format||"image/jpeg",version:this.params.version||"1.0.0",tilematrixset:this.params.TMSLink||"PM"},a={minZoom:this.params.minZoom||1,maxZoom:this.params.maxZoom||21};return s.a.Util.extend(n,this.settings),s.a.Util.extend(a,this.settings),new dn(o.replace(/(http|https):\/\//,this.protocol),{paramsNative:a,paramsWmts:n,originators:this.params.originators||this.settings.originators||[],legends:this.settings.originators||this.params.legends||[],metadata:this.settings.metadata||this.params.metadata||[],title:this.settings.title||this.params.title||"",description:this.settings.description||this.params.description||"",quicklookUrl:this.settings.quicklookUrl||this.params.quicklookUrl||""})}};!function(){var t=document.getElementsByTagName("script"),e=t[t.length-1].getAttribute("data-key"),i=t[t.length-1].getAttribute("data-url"),o=t[t.length-1].getAttribute("data-timeout");if(e||i){var n={apiKey:e,sync:!0,onSuccess:function(){},onFailure:function(t){throw new Error("Configuration load failed : "+t.message)}};i&&(n.customConfigFile=i,n.callbackSuffix=""),o&&(n.timeOut=o),window.Gp||no.Services.getConfig(n)}}();var mn={proxifyUrl:function(t,e){var i=l.getLogger("proxifyUrl");if(!e||!e.hasOwnProperty("proxyUrl")||null===e.proxyUrl||0===e.proxyUrl.trim().length)return t;if(e.noProxyDomains&&Array.isArray(e.noProxyDomains)&&e.noProxyDomains.length>0)for(var o in e.noProxyDomains)if(i.trace("[ProxyUtils] proxifyUrl : analyzing "+e.noProxyDomains[o]),-1!==t.indexOf(e.noProxyDomains[o]))return i.info("[ProxyUtils] proxifyUrl : "+t+" found in noProxyDomains list ("+e.noProxyDomains[o]+")."),t;return e.proxyUrl+encodeURIComponent(t)}},fn={hex:function(t){if(t>255)throw new Error("'"+t+"'' is greater than 255(0xff);");return("0"+Number(t).toString(16)).slice(-2)},num:function(t){return parseInt(t,16)},arrayToRgba:function(t){if(!Array.isArray(t))throw new Error("Not an array !");var e=t[0],i=t[1],o=t[2],n=t[3]||1;return"rgba("+e+", "+i+", "+o+", "+parseFloat(n)+")"},arrayToHex:function(t){if(!Array.isArray(t))throw new Error("Not an array !");var e=t[0],i=t[1],o=t[2],n=t[3],s=[this.hex(e),this.hex(i),this.hex(o)],a={};return a.hex="#"+s.join(""),n&&(a.opacity=parseFloat(n)),a},rgbaToHex:function(t){var e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/.exec(t);if(!e)throw new Error("Invalid format: "+t);var i=e[1],o=e[2],n=e[3],s=e[4],a=[this.hex(i),this.hex(o),this.hex(n)],r={};return r.hex="#"+a.join(""),s&&(r.opacity=parseFloat(s)),r},hexToRgba:function(t,e){if(!t)throw new Error("Invalid format");t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,o){return e+e+i+i+o+o}));var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return(i=i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null)?"rgba("+i.r+", "+i.g+", "+i.b+", "+e+")":null},isHex:function(t){if(!t)return!1;if("#"!==t.charAt(0))return!1;return!!/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t)},isRGB:function(t){if(!t)return!1;return!!/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/.exec(t)}},gn=no.Services,_n=no.Error,vn=no.Helper,yn=no.Protocols,En=no.servicesDate,wn=no.servicesVersion,Pn=o.leafletExtVersion||o.version,bn=o.date,Mn=window.Gp?window.Gp.Config:{};s.a.geoportalLayer=pn,s.a.geoportalControl=en,s.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_LIB_D3=$o.DISPLAY_PROFILE_LIB_D3,s.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS=$o.DISPLAY_PROFILE_LIB_AMCHARTS,s.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_RAW=$o.DISPLAY_PROFILE_RAW,s.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_BY_DEFAULT=$o.DISPLAY_PROFILE_BY_DEFAULT,s.a.geoportalCRS=Io,s.a.geoportalCRS.EPSG2154=Io.EPSG2154(),s.a.geoportalCRS.EPSG27572=Io.EPSG27572(),s.a.geoportalCRS.EPSG4326=Io.EPSG4326()}])})); \ No newline at end of file diff --git a/current/jsdoc/leaflet/L.geoportalControl.ElevationPath.html b/current/jsdoc/leaflet/L.geoportalControl.ElevationPath.html index 2c45de4a1..660311c27 100644 --- a/current/jsdoc/leaflet/L.geoportalControl.ElevationPath.html +++ b/current/jsdoc/leaflet/L.geoportalControl.ElevationPath.html @@ -3214,7 +3214,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/L.geoportalControl.Isocurve.html b/current/jsdoc/leaflet/L.geoportalControl.Isocurve.html index d5ef442dd..82cd4dbdf 100644 --- a/current/jsdoc/leaflet/L.geoportalControl.Isocurve.html +++ b/current/jsdoc/leaflet/L.geoportalControl.Isocurve.html @@ -2116,7 +2116,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/L.geoportalControl.LayerSwitcher.html b/current/jsdoc/leaflet/L.geoportalControl.LayerSwitcher.html index 50197b459..f9ebd371b 100644 --- a/current/jsdoc/leaflet/L.geoportalControl.LayerSwitcher.html +++ b/current/jsdoc/leaflet/L.geoportalControl.LayerSwitcher.html @@ -2496,7 +2496,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/L.geoportalControl.MousePosition.html b/current/jsdoc/leaflet/L.geoportalControl.MousePosition.html index bbfcf62c0..b975726b9 100644 --- a/current/jsdoc/leaflet/L.geoportalControl.MousePosition.html +++ b/current/jsdoc/leaflet/L.geoportalControl.MousePosition.html @@ -2289,7 +2289,7 @@

    Returns:
    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/L.geoportalControl.ReverseGeocode.html b/current/jsdoc/leaflet/L.geoportalControl.ReverseGeocode.html index 4ea7e3910..8b20227d8 100644 --- a/current/jsdoc/leaflet/L.geoportalControl.ReverseGeocode.html +++ b/current/jsdoc/leaflet/L.geoportalControl.ReverseGeocode.html @@ -1948,7 +1948,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/L.geoportalControl.Route.html b/current/jsdoc/leaflet/L.geoportalControl.Route.html index d86bd883b..b2284538a 100644 --- a/current/jsdoc/leaflet/L.geoportalControl.Route.html +++ b/current/jsdoc/leaflet/L.geoportalControl.Route.html @@ -2093,7 +2093,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/L.geoportalControl.SearchEngine.html b/current/jsdoc/leaflet/L.geoportalControl.SearchEngine.html index a3306945b..7a3ab267f 100644 --- a/current/jsdoc/leaflet/L.geoportalControl.SearchEngine.html +++ b/current/jsdoc/leaflet/L.geoportalControl.SearchEngine.html @@ -2121,7 +2121,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/L.geoportalLayers.WMS.html b/current/jsdoc/leaflet/L.geoportalLayers.WMS.html index dbf75a9a6..398d0e05d 100644 --- a/current/jsdoc/leaflet/L.geoportalLayers.WMS.html +++ b/current/jsdoc/leaflet/L.geoportalLayers.WMS.html @@ -1948,7 +1948,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/L.geoportalLayers.WMTS.html b/current/jsdoc/leaflet/L.geoportalLayers.WMTS.html index 64c90b86f..c93d1cd27 100644 --- a/current/jsdoc/leaflet/L.geoportalLayers.WMTS.html +++ b/current/jsdoc/leaflet/L.geoportalLayers.WMTS.html @@ -1948,7 +1948,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/global.html b/current/jsdoc/leaflet/global.html index 3728b0fd2..1c824de4d 100644 --- a/current/jsdoc/leaflet/global.html +++ b/current/jsdoc/leaflet/global.html @@ -2292,7 +2292,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/index.html b/current/jsdoc/leaflet/index.html index 6d4680597..05f0b7529 100644 --- a/current/jsdoc/leaflet/index.html +++ b/current/jsdoc/leaflet/index.html @@ -1985,7 +1985,7 @@

    Geoportal Controls

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-CRS.html b/current/jsdoc/leaflet/module-CRS.html index e5b7e0171..45afa00a9 100644 --- a/current/jsdoc/leaflet/module-CRS.html +++ b/current/jsdoc/leaflet/module-CRS.html @@ -2181,7 +2181,7 @@
    Returns:
    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-ColorUtils.html b/current/jsdoc/leaflet/module-ColorUtils.html index 563c57dd0..179828e20 100644 --- a/current/jsdoc/leaflet/module-ColorUtils.html +++ b/current/jsdoc/leaflet/module-ColorUtils.html @@ -2496,7 +2496,7 @@
    Returns:
    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-Config.html b/current/jsdoc/leaflet/module-Config.html index 45a886d68..2045db7ed 100644 --- a/current/jsdoc/leaflet/module-Config.html +++ b/current/jsdoc/leaflet/module-Config.html @@ -1954,7 +1954,7 @@

    Example

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-Controls.html b/current/jsdoc/leaflet/module-Controls.html index 7bfaec3eb..b149067f5 100644 --- a/current/jsdoc/leaflet/module-Controls.html +++ b/current/jsdoc/leaflet/module-Controls.html @@ -6574,7 +6574,7 @@
    Example
    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-Draggable.html b/current/jsdoc/leaflet/module-Draggable.html index 0f06d88bd..90b52807a 100644 --- a/current/jsdoc/leaflet/module-Draggable.html +++ b/current/jsdoc/leaflet/module-Draggable.html @@ -2150,7 +2150,7 @@
    Example
    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-Gp.html b/current/jsdoc/leaflet/module-Gp.html index 19c463a1e..33f018e9b 100644 --- a/current/jsdoc/leaflet/module-Gp.html +++ b/current/jsdoc/leaflet/module-Gp.html @@ -2428,7 +2428,7 @@

    stati
    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-LayerUtils.html b/current/jsdoc/leaflet/module-LayerUtils.html index 794d149cf..d38ad9101 100644 --- a/current/jsdoc/leaflet/module-LayerUtils.html +++ b/current/jsdoc/leaflet/module-LayerUtils.html @@ -2525,7 +2525,7 @@
    Returns:
    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-Layers.html b/current/jsdoc/leaflet/module-Layers.html index f65b048ee..a9173e125 100644 --- a/current/jsdoc/leaflet/module-Layers.html +++ b/current/jsdoc/leaflet/module-Layers.html @@ -2767,7 +2767,7 @@
    Example
    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-Leaflet_CRS_EPSG2154.html b/current/jsdoc/leaflet/module-Leaflet_CRS_EPSG2154.html index be2e234ad..11e96483f 100644 --- a/current/jsdoc/leaflet/module-Leaflet_CRS_EPSG2154.html +++ b/current/jsdoc/leaflet/module-Leaflet_CRS_EPSG2154.html @@ -2007,7 +2007,7 @@

    innerEPSG21
    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-Leaflet_CRS_EPSG27572.html b/current/jsdoc/leaflet/module-Leaflet_CRS_EPSG27572.html index 372a18700..6044a4823 100644 --- a/current/jsdoc/leaflet/module-Leaflet_CRS_EPSG27572.html +++ b/current/jsdoc/leaflet/module-Leaflet_CRS_EPSG27572.html @@ -2016,7 +2016,7 @@

    innerEPSG2
    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-LoggerByDefault.html b/current/jsdoc/leaflet/module-LoggerByDefault.html index 2f00212a4..e9904b36d 100644 --- a/current/jsdoc/leaflet/module-LoggerByDefault.html +++ b/current/jsdoc/leaflet/module-LoggerByDefault.html @@ -2240,7 +2240,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-MathUtils.html b/current/jsdoc/leaflet/module-MathUtils.html index 3a4afa2ef..ffa99a0f6 100644 --- a/current/jsdoc/leaflet/module-MathUtils.html +++ b/current/jsdoc/leaflet/module-MathUtils.html @@ -2678,7 +2678,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-Parser.html b/current/jsdoc/leaflet/module-Parser.html index b7c88df60..315cd8507 100644 --- a/current/jsdoc/leaflet/module-Parser.html +++ b/current/jsdoc/leaflet/module-Parser.html @@ -1955,7 +1955,7 @@

    Example

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-ProfileElevationPathDOM.html b/current/jsdoc/leaflet/module-ProfileElevationPathDOM.html index c20a4eeb2..5f3e9e4d1 100644 --- a/current/jsdoc/leaflet/module-ProfileElevationPathDOM.html +++ b/current/jsdoc/leaflet/module-ProfileElevationPathDOM.html @@ -1946,7 +1946,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-ProxyUtils.html b/current/jsdoc/leaflet/module-ProxyUtils.html index 37d5e67c7..87cfc8f79 100644 --- a/current/jsdoc/leaflet/module-ProxyUtils.html +++ b/current/jsdoc/leaflet/module-ProxyUtils.html @@ -2201,7 +2201,7 @@

    Returns:
    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-Register.html b/current/jsdoc/leaflet/module-Register.html index c55370d7e..337e6e874 100644 --- a/current/jsdoc/leaflet/module-Register.html +++ b/current/jsdoc/leaflet/module-Register.html @@ -2621,7 +2621,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-SearchEngineUtils.html b/current/jsdoc/leaflet/module-SearchEngineUtils.html index 28af975ac..62c035357 100644 --- a/current/jsdoc/leaflet/module-SearchEngineUtils.html +++ b/current/jsdoc/leaflet/module-SearchEngineUtils.html @@ -2157,7 +2157,7 @@

    Returns:
    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-SelectorID.html b/current/jsdoc/leaflet/module-SelectorID.html index 47faf28ac..1f0ff7a19 100644 --- a/current/jsdoc/leaflet/module-SelectorID.html +++ b/current/jsdoc/leaflet/module-SelectorID.html @@ -2402,7 +2402,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/module-Utils.html b/current/jsdoc/leaflet/module-Utils.html index 3381ff3e5..f3a1b7ea7 100644 --- a/current/jsdoc/leaflet/module-Utils.html +++ b/current/jsdoc/leaflet/module-Utils.html @@ -2352,7 +2352,7 @@

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/tutorial-leaflet-Iso.html b/current/jsdoc/leaflet/tutorial-leaflet-Iso.html index 539a52a5f..ac0453660 100644 --- a/current/jsdoc/leaflet/tutorial-leaflet-Iso.html +++ b/current/jsdoc/leaflet/tutorial-leaflet-Iso.html @@ -2057,7 +2057,7 @@

    Demo

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/tutorial-leaflet-LayerSwitcher.html b/current/jsdoc/leaflet/tutorial-leaflet-LayerSwitcher.html index 54b618fa5..2220e4ede 100644 --- a/current/jsdoc/leaflet/tutorial-leaflet-LayerSwitcher.html +++ b/current/jsdoc/leaflet/tutorial-leaflet-LayerSwitcher.html @@ -2041,7 +2041,7 @@

    Demo

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/tutorial-leaflet-MousePosition.html b/current/jsdoc/leaflet/tutorial-leaflet-MousePosition.html index e47b8f93e..fdff9b223 100644 --- a/current/jsdoc/leaflet/tutorial-leaflet-MousePosition.html +++ b/current/jsdoc/leaflet/tutorial-leaflet-MousePosition.html @@ -2080,7 +2080,7 @@

    Demo

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/tutorial-leaflet-Route.html b/current/jsdoc/leaflet/tutorial-leaflet-Route.html index caabef1c0..ca0f0ae0d 100644 --- a/current/jsdoc/leaflet/tutorial-leaflet-Route.html +++ b/current/jsdoc/leaflet/tutorial-leaflet-Route.html @@ -2031,7 +2031,7 @@

    Demo

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/current/jsdoc/leaflet/tutorial-leaflet-SearchEngine.html b/current/jsdoc/leaflet/tutorial-leaflet-SearchEngine.html index c835ed4ba..4d98fe103 100644 --- a/current/jsdoc/leaflet/tutorial-leaflet-SearchEngine.html +++ b/current/jsdoc/leaflet/tutorial-leaflet-SearchEngine.html @@ -2043,7 +2043,7 @@

    Demo

    Geoportail - Copyright (c) IGN, released under the CECILL-B license
    - Documentation generated by JSDoc 3.6.11 on Fri Jul 21 2023 16:38:16 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time)
    diff --git a/leaflet-2.3.4/dist/Common/Controls/AttributionDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/AttributionDOM.d.ts new file mode 100644 index 000000000..c52c8b503 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/AttributionDOM.d.ts @@ -0,0 +1,10 @@ +export default AttributionDOM; +declare namespace AttributionDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createMainAttributionsShowElement(): DOMElement; + function _createAttributionsList(): DOMElement; + function _createMainAttributionsListContainer(): DOMElement; + function _createMainPictoElement(collapsed: boolean): DOMElement; +} +//# sourceMappingURL=AttributionDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/AttributionDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/AttributionDOM.d.ts.map new file mode 100644 index 000000000..bb71a361d --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/AttributionDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AttributionDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/AttributionDOM.js"],"names":[],"mappings":";;IAYc,qCAGT;IAO6B,mDAM7B;IAOoC,0DAKpC;IAOyB,+CAIzB;IAOsC,4DAKtC;IAOyB,iEAqBzB"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/BoostReliefDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/BoostReliefDOM.d.ts new file mode 100644 index 000000000..9925da69a --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/BoostReliefDOM.d.ts @@ -0,0 +1,11 @@ +export default BoostReliefDOM; +declare namespace BoostReliefDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createMainBoostReliefShowElement(collapsed: boolean): DOMElement; + function _createAdvancedToolElement(brOptions: Object): DOMElement; + function _createAdvancedToolReliefElement(scale: Object, defaultBoost: number): DOMElement[]; + function _createMainBoostReliefListContainer(): DOMElement; + function _createMainPictoElement(): DOMElement; +} +//# sourceMappingURL=BoostReliefDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/BoostReliefDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/BoostReliefDOM.d.ts.map new file mode 100644 index 000000000..ced06364f --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/BoostReliefDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BoostReliefDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/BoostReliefDOM.js"],"names":[],"mappings":";;IAWc,qCAGT;IAO6B,mDAK7B;IASmC,2EAQnC;IAa4B,mEAc5B;IASkC,6FAgHlC;IAOqC,2DAMrC;IASyB,+CAyBzB"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/BuildingsDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/BuildingsDOM.d.ts new file mode 100644 index 000000000..95b86c5cc --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/BuildingsDOM.d.ts @@ -0,0 +1,7 @@ +export default BuildingsDOM; +declare namespace BuildingsDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createMainPictoElement(): DOMElement; +} +//# sourceMappingURL=BuildingsDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/BuildingsDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/BuildingsDOM.d.ts.map new file mode 100644 index 000000000..c0fdd1394 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/BuildingsDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BuildingsDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/BuildingsDOM.js"],"names":[],"mappings":";;IAWc,qCAGT;IAO6B,mDAK7B;IASyB,+CAKzB"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/DrawingDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/DrawingDOM.d.ts new file mode 100644 index 000000000..00a145531 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/DrawingDOM.d.ts @@ -0,0 +1,3 @@ +export default DrawingDOM; +declare var DrawingDOM: any; +//# sourceMappingURL=DrawingDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/DrawingDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/DrawingDOM.d.ts.map new file mode 100644 index 000000000..8bf44b186 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/DrawingDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DrawingDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/DrawingDOM.js"],"names":[],"mappings":";AAIA,4BA+sBE"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/Editor/EditorDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/Editor/EditorDOM.d.ts new file mode 100644 index 000000000..e6ee82035 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/Editor/EditorDOM.d.ts @@ -0,0 +1,5 @@ +export default EditorDOM; +declare namespace EditorDOM { + function _addUID(id: string): string; +} +//# sourceMappingURL=EditorDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/Editor/EditorDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/Editor/EditorDOM.d.ts.map new file mode 100644 index 000000000..c1d7682cb --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/Editor/EditorDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"EditorDOM.d.ts","sourceRoot":"","sources":["../../../../../src/Common/Controls/Editor/EditorDOM.js"],"names":[],"mappings":";;IAOc,qCAGT"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/ElevationPathDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/ElevationPathDOM.d.ts new file mode 100644 index 000000000..72ceb6f58 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/ElevationPathDOM.d.ts @@ -0,0 +1,14 @@ +export default ElevationPathDOM; +declare namespace ElevationPathDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createShowElevationPathElement(): DOMElement; + function _createShowElevationPathPictoElement(): DOMElement; + function _createElevationPathPanelElement(): DOMElement; + function _createElevationPathPanelHeaderElement(): DOMElement; + function _createElevationPathPanelProfilElement(): DOMElement; + function _createElevationPathWaitingElement(): DOMElement; + function _createElevationPathInformationsElement(): DOMElement; + function _addElevationPathInformationsItem(value: string): DOMElement; +} +//# sourceMappingURL=ElevationPathDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/ElevationPathDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/ElevationPathDOM.d.ts.map new file mode 100644 index 000000000..bc5f48f96 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/ElevationPathDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ElevationPathDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/ElevationPathDOM.js"],"names":[],"mappings":";;IAOc,qCAGT;IAO6B,mDAK7B;IAWiC,uDAKjC;IAQsC,4DA8BtC;IAekC,wDASlC;IAOwC,8DA0ExC;IAQwC,8DAKxC;IAOoC,0DAYpC;IAOyC,+DAWzC;IAQmC,sEAWnC"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/ExportDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/ExportDOM.d.ts new file mode 100644 index 000000000..5bba9d425 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/ExportDOM.d.ts @@ -0,0 +1,5 @@ +export default ExportDOM; +declare namespace ExportDOM { + function _addUID(id: string): string; +} +//# sourceMappingURL=ExportDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/ExportDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/ExportDOM.d.ts.map new file mode 100644 index 000000000..1f3f92344 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/ExportDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ExportDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/ExportDOM.js"],"names":[],"mappings":";;IAOc,qCAGT"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/GetFeatureInfoDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/GetFeatureInfoDOM.d.ts new file mode 100644 index 000000000..c5e1680e7 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/GetFeatureInfoDOM.d.ts @@ -0,0 +1,8 @@ +export default GetFeatureInfoDOM; +declare namespace GetFeatureInfoDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createActivateGetFeatureInfoElement(activate: boolean): DOMElement; + function _createMainPictoElement(): DOMElement; +} +//# sourceMappingURL=GetFeatureInfoDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/GetFeatureInfoDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/GetFeatureInfoDOM.d.ts.map new file mode 100644 index 000000000..949e12c80 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/GetFeatureInfoDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GetFeatureInfoDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/GetFeatureInfoDOM.js"],"names":[],"mappings":";;IAOc,qCAGT;IAO6B,mDAK7B;IAYsC,6EActC;IAMyB,+CAmBzB"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/IsoDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/IsoDOM.d.ts new file mode 100644 index 000000000..240752b2e --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/IsoDOM.d.ts @@ -0,0 +1,26 @@ +export default IsoDOM; +declare namespace IsoDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createShowIsoElement(): DOMElement; + function _createShowIsoPictoElement(): DOMElement; + function _createIsoPanelElement(): DOMElement; + function _createIsoPanelHeaderElement(): DOMElement; + function _createIsoPanelFormElement(): DOMElement; + function _createIsoWaitingElement(): DOMElement; + function _createIsoPanelFormTypeChoiceElement(): DOMElement; + function _createIsoPanelFormTypeChoiceChronElement(checked: boolean): DOMElement; + function _createIsoPanelFormTypeChoiceDistElement(checked: boolean): DOMElement; + function _createIsoPanelFormValueIsochronElement(checked: boolean): DOMElement; + function _createIsoPanelFormValueIsodistanceElement(checked: boolean): DOMElement; + function _createIsoPanelFormModeChoiceElement(): DOMElement; + function _createIsoPanelFormModeChoiceTransportElement(transports: any[]): DOMElement; + function _createIsoPanelFormModeChoiceDirectionElement(directions: any[]): DOMElement; + function _createShowIsoExclusionsElement(): DOMElement; + function _createShowIsoExclusionsPictoElement(): DOMElement; + function _createIsoPanelFormExclusionsElement(): DOMElement; + function _createIsoPanelFormExclusionOptionsElement(exclusions: any[]): DOMElement; + function _createIsoSubmitFormElement(): DOMElement; + function _createIsoFormResetElement(): DOMElement; +} +//# sourceMappingURL=IsoDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/IsoDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/IsoDOM.d.ts.map new file mode 100644 index 000000000..e2f631c75 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/IsoDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"IsoDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/IsoDOM.js"],"names":[],"mappings":";;IAOc,qCAGT;IAO6B,mDAK7B;IAWuB,6CAKvB;IAQ4B,kDA8B5B;IAewB,8CASxB;IAO8B,oDAoD9B;IAQ4B,kDAc5B;IAO0B,gDAY1B;IAesC,4DAQtC;IAS2C,iFAgD3C;IAS0C,gFAgD1C;IAYyC,+EAkEzC;IAQ4C,kFAwC5C;IAesC,4DAQtC;IAS+C,sFAgF/C;IAS+C,sFA8C/C;IAWiC,uDAKjC;IAOsC,4DAStC;IAOsC,4DAYtC;IAS4C,mFAoG5C;IAW6B,mDAQ7B;IAW4B,kDAW5B"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/LayerImportDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/LayerImportDOM.d.ts new file mode 100644 index 000000000..80ecbef76 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/LayerImportDOM.d.ts @@ -0,0 +1,42 @@ +export default LayerImportDOM; +declare namespace LayerImportDOM { + function _addUID(id: string): string; + function _createLoadingElement(): DOMElement; + function _createMainContainerElement(): DOMElement; + function _createShowImportElement(): DOMElement; + function _createShowImportPictoElement(): DOMElement; + function _createImportPanelElement(): DOMElement; + function _createImportPanelHeaderElement(): DOMElement; + function _createImportPanelTitleElement(): DOMElement; + function _createImportPanelCloseElement(): DOMElement; + function _createImportPanelFormElement(): DOMElement; + function _createImportTypeLineElement(importTypes: any[]): DOMElement; + function _createImportWaitingElement(): DOMElement; + function _createImportStaticParamsContainer(currentType: string): DOMElement; + function _createStaticNameLabel(): DOMElement; + function _createStaticModeChoiceDiv(): DOMElement; + function _createStaticLocalChoiceDiv(): DOMElement; + function _createStaticUrlChoiceDiv(): DOMElement; + function _createStaticLocalInputDiv(): DOMElement; + function _createStaticLocalInputLabel(): DOMElement; + function _createStaticLocalInput(): DOMElement; + function _createStaticUrlInputDiv(): DOMElement; + function _createStaticUrlInputLabel(): DOMElement; + function _createStaticUrlInput(): DOMElement; + function _createServiceParamsContainer(currentType: string): DOMElement; + function _createServiceUrlDiv(): DOMElement; + function _createServiceUrlInputLabel(): DOMElement; + function _createServiceUrlInput(): DOMElement; + function _createImportSubmitFormElement(): DOMElement; + function _createImportGetCapPanelElement(): DOMElement; + function _createImportGetCapPanelHeaderElement(): DOMElement; + function _createImportGetCapResultsContainer(): DOMElement; + function _addImportGetCapResultListRubrique(title: any, container: any): any; + function _addImportGetCapResultRubrique(title: any, container: any): any; + function _addImportGetCapResultListLayer(container: any): any; + function _addImportGetCapResultLayer(description: any, id: any, container: any): any; + function _createImportMapBoxPanelElement(): DOMElement; + function _createImportMapBoxPanelHeaderElement(): DOMElement; + function _createImportMapBoxResultsContainer(): DOMElement; +} +//# sourceMappingURL=LayerImportDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/LayerImportDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/LayerImportDOM.d.ts.map new file mode 100644 index 000000000..ed8c594f5 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/LayerImportDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LayerImportDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/LayerImportDOM.js"],"names":[],"mappings":";;IASc,qCAGT;IAOuB,6CAKvB;IAO6B,mDAK7B;IAW0B,gDAK1B;IAO+B,qDA2B/B;IAW2B,iDAM3B;IAOiC,uDAYjC;IAOgC,sDAKhC;IAOgC,sDAqBhC;IAY+B,qDAsB/B;IAQ8B,sEAsE9B;IAO6B,mDAY7B;IAWoC,6EAUpC;IAOwB,8CAkBxB;IAO4B,kDAI5B;IAO6B,mDAmC7B;IAO2B,iDAmC3B;IAO4B,kDAK5B;IAO8B,oDAO9B;IAOyB,+CAMzB;IAO0B,gDAK1B;IAO4B,kDAO5B;IAOuB,6CAMvB;IAW+B,wEAU/B;IAOsB,4CAItB;IAO6B,mDAO7B;IAOwB,8CAMxB;IAWgC,sDAQhC;IAWiC,uDAKjC;IAOuC,6DAmCvC;IAOqC,2DAMrC;IAEoC,6EAOpC;IAEgC,yEAqBhC;IAEiC,8DAMjC;IAE6B,qFAoB7B;IAWiC,uDAKjC;IAOuC,6DAuDvC;IAOqC,2DAKrC"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/LayerSwitcherDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/LayerSwitcherDOM.d.ts new file mode 100644 index 000000000..a0712978e --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/LayerSwitcherDOM.d.ts @@ -0,0 +1,28 @@ +export default LayerSwitcherDOM; +declare namespace LayerSwitcherDOM { + function _createDraggableElement(elementDraggable: Object, context: Object): void; + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createMainLayersShowElement(): DOMElement; + function _createMainLayersElement(): DOMElement; + function _createMainPictoElement(): DOMElement; + function _createMainInfoElement(): DOMElement; + function _createContainerLayerElement(obj: { + layer: Object; + id: string; + title: string; + description: string; + visibility: boolean; + opacity: Float; + }): DOMElement; + function _createBasicToolElement(obj: Object): DOMElement; + function _createBasicToolNameElement(obj: Object): DOMElement; + function _createBasicToolVisibilityElement(obj: Object): DOMElement[]; + function _createAdvancedToolShowElement(obj: Object): DOMElement[]; + function _createAdvancedToolElement(obj: Object): DOMElement; + function _createAdvancedToolDeleteElement(obj: Object): DOMElement; + function _createAdvancedToolInformationElement(obj: Object): DOMElement; + function _createAdvancedToolOpacityElement(obj: Object): DOMElement[]; + function _createContainerLayerInfoElement(obj: Object): DOMElement; +} +//# sourceMappingURL=LayerSwitcherDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/LayerSwitcherDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/LayerSwitcherDOM.d.ts.map new file mode 100644 index 000000000..c425102af --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/LayerSwitcherDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LayerSwitcherDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/LayerSwitcherDOM.js"],"names":[],"mappings":";;IAU8B,kFA8BzB;IAWS,qCAGT;IAO6B,mDAK7B;IAO8B,oDAM9B;IAO0B,gDAS1B;IAOyB,+CA6CzB;IAOwB,8CAOxB;IAmB8B;;;;;;;mBAsC9B;IAayB,0DAmBzB;IAS6B,8DAU7B;IASmC,sEA4CnC;IASgC,mEAoBhC;IAS4B,6DA0B5B;IASkC,mEA6BlC;IASuC,wEA6BvC;IASmC,sEA+EnC;IAgBkC,mEA4HlC"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/LocationSelectorDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/LocationSelectorDOM.d.ts new file mode 100644 index 000000000..bdc355683 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/LocationSelectorDOM.d.ts @@ -0,0 +1,17 @@ +export default LocationSelectorDOM; +declare namespace LocationSelectorDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createLocationPointElement(id: number, display: number): DOMElement; + function _createLocationPointLabelElement(id: number, text: string): DOMElement; + function _createLocationAutoCompleteteInputElement(id: number): DOMElement; + function _createLocationCoordinateInputElement(id: number): DOMElement; + function _createLocationPointerShowInputElement(id: number): DOMElement; + function _createLocationPointerInputElement(id: number): DOMElement; + function _createLocationRemovePointElement(id: number): DOMElement; + function _createLocationAddPointElement(): DOMElement; + function _createLocationAutoCompleteResultElement(id: number): DOMElement; + function _createLocationAutoCompletedLocationElement(id: number, location: Object, n: number): void; + function GPdisplayCoordinate(value: string): void; +} +//# sourceMappingURL=LocationSelectorDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/LocationSelectorDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/LocationSelectorDOM.d.ts.map new file mode 100644 index 000000000..9b6d13b9f --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/LocationSelectorDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LocationSelectorDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/LocationSelectorDOM.js"],"names":[],"mappings":";;IAac,qCAGT;IAO6B,mDAK7B;IAU6B,8EAO7B;IAUkC,gFAiClC;IAQ2C,2EAgG3C;IAQuC,uEAcvC;IAQwC,wEAKxC;IAQoC,oEAyEpC;IASmC,mEAoCnC;IAQgC,sDAwChC;IAS0C,0EAqB1C;IAY6C,oGAS7C;IAMqB,kDAuBrB"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/MeasureAreaDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/MeasureAreaDOM.d.ts new file mode 100644 index 000000000..16f2579bc --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/MeasureAreaDOM.d.ts @@ -0,0 +1,8 @@ +export default MeasureAreaDOM; +declare namespace MeasureAreaDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createShowMeasureAreaElement(): DOMElement; + function _createShowMeasureAreaPictoElement(): DOMElement; +} +//# sourceMappingURL=MeasureAreaDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/MeasureAreaDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/MeasureAreaDOM.d.ts.map new file mode 100644 index 000000000..5df3b26c7 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/MeasureAreaDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MeasureAreaDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/MeasureAreaDOM.js"],"names":[],"mappings":";;IAOc,qCAGT;IAO6B,mDAK7B;IAW+B,qDAK/B;IAQoC,0DA8BpC"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/MeasureAzimuthDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/MeasureAzimuthDOM.d.ts new file mode 100644 index 000000000..ddafd68c1 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/MeasureAzimuthDOM.d.ts @@ -0,0 +1,8 @@ +export default MeasureAzimuthDOM; +declare namespace MeasureAzimuthDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createShowMeasureAzimuthElement(): DOMElement; + function _createShowMeasureAzimuthPictoElement(): DOMElement; +} +//# sourceMappingURL=MeasureAzimuthDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/MeasureAzimuthDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/MeasureAzimuthDOM.d.ts.map new file mode 100644 index 000000000..b5a9c3016 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/MeasureAzimuthDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MeasureAzimuthDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/MeasureAzimuthDOM.js"],"names":[],"mappings":";;IAOc,qCAGT;IAO6B,mDAK7B;IAWkC,wDAKlC;IAQuC,6DA8BvC"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/MeasureLengthDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/MeasureLengthDOM.d.ts new file mode 100644 index 000000000..c9e8c56c9 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/MeasureLengthDOM.d.ts @@ -0,0 +1,8 @@ +export default MeasureLengthDOM; +declare namespace MeasureLengthDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createShowMeasureLengthElement(): DOMElement; + function _createShowMeasureLengthPictoElement(): DOMElement; +} +//# sourceMappingURL=MeasureLengthDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/MeasureLengthDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/MeasureLengthDOM.d.ts.map new file mode 100644 index 000000000..bec5b39c8 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/MeasureLengthDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MeasureLengthDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/MeasureLengthDOM.js"],"names":[],"mappings":";;IAOc,qCAGT;IAO6B,mDAK7B;IAWiC,uDAKjC;IAQsC,4DA8BtC"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/MeasureToolBoxDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/MeasureToolBoxDOM.d.ts new file mode 100644 index 000000000..01b2cd7cb --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/MeasureToolBoxDOM.d.ts @@ -0,0 +1,11 @@ +export default MeasureToolBoxDOM; +declare namespace MeasureToolBoxDOM { + const _toolboxId: string; + const _buttonId: string; + const _widgetId: string; + function getToolBoxID(uid: number): string; + function getButtonID(uid: number): string; + function getWidgetID(uid: number): string; + function _createToolBoxContainerElement(uid: number): DOMElement; +} +//# sourceMappingURL=MeasureToolBoxDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/MeasureToolBoxDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/MeasureToolBoxDOM.d.ts.map new file mode 100644 index 000000000..c96568285 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/MeasureToolBoxDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MeasureToolBoxDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/MeasureToolBoxDOM.js"],"names":[],"mappings":";;;;;IAWmB,2CAEd;IAOa,0CAEb;IAOa,0CAEb;IAOgC,iEA4DhC"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/MiniGlobeDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/MiniGlobeDOM.d.ts new file mode 100644 index 000000000..23ea89199 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/MiniGlobeDOM.d.ts @@ -0,0 +1,6 @@ +export default MiniGlobeDOM; +declare namespace MiniGlobeDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; +} +//# sourceMappingURL=MiniGlobeDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/MiniGlobeDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/MiniGlobeDOM.d.ts.map new file mode 100644 index 000000000..66408d948 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/MiniGlobeDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MiniGlobeDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/MiniGlobeDOM.js"],"names":[],"mappings":";;IAOc,qCAGT;IAO6B,mDAO7B"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/MousePositionDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/MousePositionDOM.d.ts new file mode 100644 index 000000000..4c622a5ba --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/MousePositionDOM.d.ts @@ -0,0 +1,30 @@ +export default MousePositionDOM; +declare namespace MousePositionDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createShowMousePositionElement(): DOMElement; + function _createShowMousePositionPictoElement(isDesktop: boolean): DOMElement; + function _createMousePositionPanelElement(): DOMElement; + function _createMapCenter(): DOMElement; + function _createMousePositionPanelHeaderElement(): DOMElement; + function _createMousePositionPanelBasicElement(displayAltitude?: boolean | undefined, displayCoordinates?: boolean | undefined, editCoordinates?: boolean | undefined, currentProjectionUnits?: boolean | undefined): DOMElement; + function _createCoordinateElement(coordType: string, editCoordinates?: boolean | undefined): any[]; + function _createDMSCoordinateElement(coordType: string, editCoordinates?: boolean | undefined): any[]; + function _createMousePositionPanelBasicCoordinateElement(display?: boolean | undefined, editCoordinates?: boolean | undefined, currentProjectionUnits?: boolean | undefined): DOMElement; + function _createMousePositionPanelBasicAltitudeElement(display?: boolean | undefined): DOMElement; + function _createMousePositionPanelEditToolsElement(editCoordinates?: boolean | undefined): DOMElement; + function _createShowMousePositionSettingsElement(display?: boolean | undefined): DOMElement[]; + function _createMousePositionSettingsElement(display?: boolean | undefined): DOMElement; + function _createMousePositionSettingsSystemsElement(systems: Object[]): DOMElement; + function _createMousePositionSettingsUnitsElement(units: Object[]): DOMElement; + function _resetLabelElements(currentProjectionType?: string | undefined): void; + function _resetUnitElements(currentProjectionUnits: string): void; + function _resetCoordinateElements(editCoordinates: boolean, currentProjectionType: string, currentProjectionUnits: string): void; + function _setEditMode(editing: boolean): void; + function _checkDMSElement(input: DOMElement, isFloat: boolean): boolean; + function _checkDMSDegrees(coordType: string, input: DOMElement): boolean; + function GPdisplayCoords(coordinate: Object): void; + function GPdisplayElevation(coordinate: Object, altitudeTimeoutDelay: number, noDataValue: number, noDataValueTolerance: number): void; + function GPresetElevation(): void; +} +//# sourceMappingURL=MousePositionDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/MousePositionDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/MousePositionDOM.d.ts.map new file mode 100644 index 000000000..530699d71 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/MousePositionDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MousePositionDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/MousePositionDOM.js"],"names":[],"mappings":";;IAOc,qCAGT;IAO6B,mDAK7B;IAWiC,uDAKjC;IAQsC,8EA8CtC;IAOkC,wDAalC;IAOkB,wCAKlB;IASwC,8DA6BxC;IAeuC,iOAgBvC;IAU0B,mGA8B1B;IAS6B,sGAsG7B;IASiD,yLAsDjD;IAO+C,kGAsB/C;IAO2C,sGAkC3C;IAWyC,8FAiCzC;IAYqC,wFA+DrC;IAO4C,mFA2B5C;IAO0C,+EAqB1C;IAKqB,+EAOrB;IAKoB,kEAUpB;IAO0B,iIAmC1B;IAOc,8CAoBd;IASkB,wEAmBlB;IAQkB,yEA4BlB;IAWiB,mDAiDjB;IAUoB,uIAqCpB;IAKkB,kCAIlB"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/ProfileElevationPathDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/ProfileElevationPathDOM.d.ts new file mode 100644 index 000000000..13e7df17d --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/ProfileElevationPathDOM.d.ts @@ -0,0 +1,14 @@ +export default ProfileElevationPathDOM; +declare namespace ProfileElevationPathDOM { + function _getCssProperty(element: HTMLElement, property: string): string; + function _getTextWidth(text: string, container: HTMLElement, font?: string): number; + function _dataZToSvgY(z: Object, pathHeight: number, minGraphZ: number, pxPerMZ: number): number; + function _dataDistToSvgX(dist: number, svgWidth: number, pathWidth: number, pxPerMX: number): any[]; + function _svgXToDataDist(svgX: number, svgWidth: number, pathWidth: number, pxPerMX: number): any[]; + function _arrayBisect(array: any[], value: number): number; + function displayProfileByDefault(data: Object, container: HTMLElement, context: Object, className: Object): DOMElement; + function displayProfileRaw(data: Object, container: HTMLElement, context: Object, className: Object): DOMElement; + function displayProfileLibD3(data: Object, container: HTMLElement, context: Object, className: Object): DOMElement; + function displayProfileLibAmCharts(data: Object, container: HTMLElement, context: Object, className: Object): DOMElement; +} +//# sourceMappingURL=ProfileElevationPathDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/ProfileElevationPathDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/ProfileElevationPathDOM.d.ts.map new file mode 100644 index 000000000..b22cde47f --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/ProfileElevationPathDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ProfileElevationPathDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/ProfileElevationPathDOM.js"],"names":[],"mappings":";;IAoBsB,yEAEjB;IAae,oFAYf;IAac,iGAEd;IAaiB,oGAEjB;IAaiB,oGAEjB;IAWc,2DAWd;IAYyB,uHAsiBzB;IAYmB,iHAqCnB;IAYqB,mHA2OrB;IAY2B,yHA6H3B"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/ReverseGeocodingDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/ReverseGeocodingDOM.d.ts new file mode 100644 index 000000000..8819239f9 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/ReverseGeocodingDOM.d.ts @@ -0,0 +1,21 @@ +export default ReverseGeocodingDOM; +declare namespace ReverseGeocodingDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createShowReverseGeocodingElement(): DOMElement; + function _createShowReverseGeocodingPictoElement(): DOMElement; + function _createReverseGeocodingWaitingElement(): DOMElement; + function _createReverseGeocodingResultsPanelElement(): DOMElement; + function _createReverseGeocodingResultsListElement(): DOMElement; + function _createReverseGeocodingResultElement(locationDescription: string, id: number): void; + function _createReverseGeocodingPanelElement(): DOMElement; + function _createReverseGeocodingPanelHeaderElement(): DOMElement; + function _createReverseGeocodingPanelReturnPictoElement(): DOMElement; + function _createReverseGeocodingPanelTitleElement(): DOMElement; + function _createReverseGeocodingPanelCloseElement(): DOMElement; + function _createReverseGeocodingPanelFormElement(): DOMElement; + function _createReverseGeocodingFormModeChoiceGeocodingTypeElement(resources: any[]): DOMElement; + function _createReverseGeocodingFormModeChoiceGeocodingDelimitationElement(delimitations: any[]): DOMElement; + function _createReverseGeocodingSubmitFormElement(): DOMElement; +} +//# sourceMappingURL=ReverseGeocodingDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/ReverseGeocodingDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/ReverseGeocodingDOM.d.ts.map new file mode 100644 index 000000000..f3f0e6c95 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/ReverseGeocodingDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ReverseGeocodingDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/ReverseGeocodingDOM.js"],"names":[],"mappings":";;IAOc,qCAGT;IAO6B,mDAK7B;IAWoC,0DAKpC;IAOyC,+DA2BzC;IAOuC,6DAYvC;IAO4C,kEAK5C;IAO2C,iEAK3C;IASsC,6FAuCtC;IAWqC,2DAMrC;IAO2C,iEAM3C;IAOgD,sEA0BhD;IAO0C,gEAM1C;IAO0C,gEAqB1C;IAQyC,+DAoBzC;IAY2D,iGA2D3D;IAQmE,6GA2DnE;IAW0C,gEAQ1C"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/RouteDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/RouteDOM.d.ts new file mode 100644 index 000000000..59aa4b055 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/RouteDOM.d.ts @@ -0,0 +1,34 @@ +export default RouteDOM; +declare namespace RouteDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createShowRouteElement(): DOMElement; + function _createShowRoutePictoElement(): DOMElement; + function _createRoutePanelElement(): DOMElement; + function _createRoutePanelHeaderElement(): DOMElement; + function _createRoutePanelFormElement(): DOMElement; + function _createRoutePanelResultsElement(): DOMElement; + function _createRouteWaitingElement(): DOMElement; + function _createRouteResultsStagesElement(): DOMElement; + function _addRouteResultsStagesValuesElement(points: DOMElement): void; + function _createRouteResultsElement(): DOMElement; + function _addRouteResultsValuesElement(distance: number, duration: number, fconvert: Function): DOMElement; + function _createRouteShowResultsDetailsElement(): DOMElement; + function _createRouteResultsDetailsElement(): DOMElement; + function _addRouteResultsDetailsElement(instructions: Object[], fconvert: Function): DOMElement; + function _createRoutePanelFormPointElement(n: Integer, text: string, visibility: boolean): DOMElement; + function _createRoutePanelFormRemoveStageElement(n: Integer): DOMElement; + function _createRoutePanelFormAddStageElement(): DOMElement; + function _createRoutePanelFormAutoCompleteListElement(n: Integer): DOMElement; + function _createRouteAutoCompletedLocationElement(location: Object, n: number, id: number): void; + function _createRoutePanelFormModeChoiceElement(): DOMElement; + function _createRoutePanelFormModeChoiceTransportElement(transports: string[]): DOMElement; + function _createRoutePanelFormModeChoiceComputeElement(): DOMElement; + function _createShowRouteExclusionsElement(): DOMElement; + function _createShowRouteExclusionsPictoElement(): DOMElement; + function _createRoutePanelFormExclusionsElement(): DOMElement; + function _createRoutePanelFormExclusionOptionsElement(exclusions: Object[]): DOMElement; + function _createRouteSubmitFormElement(): DOMElement; + function _createRouteFormResetElement(): DOMElement; +} +//# sourceMappingURL=RouteDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/RouteDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/RouteDOM.d.ts.map new file mode 100644 index 000000000..864862f84 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/RouteDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"RouteDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/RouteDOM.js"],"names":[],"mappings":";;IAac,qCAGT;IAO6B,mDAK7B;IAWyB,+CAKzB;IAQ8B,oDA8B9B;IAgB0B,gDAU1B;IAOgC,sDA8BhC;IAQ8B,oDAqF9B;IAOiC,uDA+BjC;IAO4B,kDAY5B;IAWkC,wDAIlC;IAOqC,uEA4BrC;IAQ4B,kDAoD5B;IAY+B,2GAoD/B;IAOuC,6DAKvC;IAOmC,yDAKnC;IAUgC,gGA+DhC;IAiBmC,sGAkHnC;IAWyC,yEA0BzC;IAUsC,4DAkCtC;IAW8C,8EAwB9C;IAa0C,iGAS1C;IAWwC,8DAQxC;IAUiD,2FA8EjD;IAQ+C,qEA0C/C;IAWmC,yDAKnC;IASwC,8DAwBxC;IAOwC,8DAYxC;IAU8C,wFAiG9C;IAW+B,qDAQ/B;IAW8B,oDAW9B"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/ScaleDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/ScaleDOM.d.ts new file mode 100644 index 000000000..13a775e14 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/ScaleDOM.d.ts @@ -0,0 +1,6 @@ +export default ScaleDOM; +declare namespace ScaleDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; +} +//# sourceMappingURL=ScaleDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/ScaleDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/ScaleDOM.d.ts.map new file mode 100644 index 000000000..36465b9a0 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/ScaleDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ScaleDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/ScaleDOM.js"],"names":[],"mappings":";;IAOc,qCAGT;IAO6B,mDAK7B"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/SearchEngineDOM.d.ts b/leaflet-2.3.4/dist/Common/Controls/SearchEngineDOM.d.ts new file mode 100644 index 000000000..bcd061223 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/SearchEngineDOM.d.ts @@ -0,0 +1,31 @@ +export default SearchEngineDOM; +declare namespace SearchEngineDOM { + function _addUID(id: string): string; + function _createMainContainerElement(): DOMElement; + function _createShowSearchEngineElement(): DOMElement; + function _createShowSearchEnginePictoElement(): DOMElement; + function _createSearchInputElement(placeholder: string): DOMElement; + function _createShowAdvancedSearchElement(): DOMElement; + function _createAdvancedSearchPanelElement(): DOMElement; + function _createGeocodeResultsElement(): DOMElement; + function _createAutoCompleteElement(): DOMElement; + function _createAutoCompleteListElement(): DOMElement; + function _createAutoCompletedLocationElement(location: Object, id: number): void; + function _createAdvancedSearchPanelHeaderElement(): DOMElement; + function _createAdvancedSearchPanelFormElement(advancedSearchCodes: Object[]): DOMElement; + function _createAdvancedSearchFormCodeElement(codes: Object[]): DOMElement; + function _createAdvancedSearchFormInputElement(): DOMElement; + function _createAdvancedSearchFormFiltersElement(): DOMElement; + function _createAdvancedSearchFiltersTableElement(code: string, display: boolean): DOMElement; + function _createAdvancedSearchFiltersAttributElement(filterAttributes: { + code: string; + name: string; + title: string; + description: string; + value: string; + }): DOMElement; + function _createGeocodeResultsHeaderElement(): DOMElement; + function _createGeocodeResultsListElement(): DOMElement; + function _createGeocodedLocationElement(location: Object, id: number): void; +} +//# sourceMappingURL=SearchEngineDOM.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Controls/SearchEngineDOM.d.ts.map b/leaflet-2.3.4/dist/Common/Controls/SearchEngineDOM.d.ts.map new file mode 100644 index 000000000..e22be1f55 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Controls/SearchEngineDOM.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SearchEngineDOM.d.ts","sourceRoot":"","sources":["../../../../src/Common/Controls/SearchEngineDOM.js"],"names":[],"mappings":";;IAUc,qCAGT;IAO6B,mDAK7B;IAWgC,sDAKhC;IAOqC,2DA8BrC;IAQ2B,oEAqI3B;IAOkC,wDAyBlC;IAWmC,yDAYnC;IAU8B,oDAa9B;IAU4B,kDAW5B;IAWgC,sDAuBhC;IAWqC,iFAkBrC;IASyC,+DAsCzC;IAOuC,0FAoDvC;IAMsC,2EAqCtC;IAKuC,6DAQvC;IAOyC,+DAIzC;IAW0C,8FAQ1C;IAgB6C;;;;;;mBAuD7C;IASoC,0DA4BpC;IAOkC,wDA0BlC;IAYgC,4EAchC"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Styles.d.ts b/leaflet-2.3.4/dist/Common/Styles.d.ts new file mode 100644 index 000000000..93815f397 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Styles.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=Styles.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Styles.d.ts.map b/leaflet-2.3.4/dist/Common/Styles.d.ts.map new file mode 100644 index 000000000..096caca7d --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Styles.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../src/Common/Styles.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils.d.ts b/leaflet-2.3.4/dist/Common/Utils.d.ts new file mode 100644 index 000000000..49877c30e --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils.d.ts @@ -0,0 +1,7 @@ +export default Utils; +declare namespace Utils { + function detectSupport(): boolean; + function assign(dest: Object, source: Object): Object; + function mergeParams(dest: Object, source: Object, replace: boolean): void; +} +//# sourceMappingURL=Utils.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils.d.ts.map b/leaflet-2.3.4/dist/Common/Utils.d.ts.map new file mode 100644 index 000000000..519f694da --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../../src/Common/Utils.js"],"names":[],"mappings":";;IAqBoB,kCAsBf;IAUQ,sDAQR;IAUa,2EA0Bb"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/AutoLoadConfig.d.ts b/leaflet-2.3.4/dist/Common/Utils/AutoLoadConfig.d.ts new file mode 100644 index 000000000..1172478a4 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/AutoLoadConfig.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=AutoLoadConfig.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/AutoLoadConfig.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/AutoLoadConfig.d.ts.map new file mode 100644 index 000000000..34c3ee12d --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/AutoLoadConfig.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AutoLoadConfig.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/AutoLoadConfig.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/ColorUtils.d.ts b/leaflet-2.3.4/dist/Common/Utils/ColorUtils.d.ts new file mode 100644 index 000000000..052062e94 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/ColorUtils.d.ts @@ -0,0 +1,12 @@ +export default ColorUtils; +declare namespace ColorUtils { + function hex(number: number): string; + function num(hexa: any): number; + function arrayToRgba(values: any[]): string; + function arrayToHex(values: any[]): Object; + function rgbaToHex(rgba: string): Object; + function hexToRgba(hex: string, opacity: number): string; + function isHex(value: any): boolean; + function isRGB(value: any): boolean; +} +//# sourceMappingURL=ColorUtils.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/ColorUtils.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/ColorUtils.d.ts.map new file mode 100644 index 000000000..ec32c0560 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/ColorUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ColorUtils.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/ColorUtils.js"],"names":[],"mappings":";;IAsBU,qCAML;IAQK,gCAEL;IASa,4CAUb;IASY,2CAgBZ;IAUW,yCAkBX;IAWW,yDAkBX;IAOO,oCAaP;IAOO,oCAUP"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/Config.d.ts b/leaflet-2.3.4/dist/Common/Utils/Config.d.ts new file mode 100644 index 000000000..5963ee88c --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/Config.d.ts @@ -0,0 +1,6 @@ +export default Config; +declare namespace Config { + const configuration: Object; + function isConfigLoaded(): boolean; +} +//# sourceMappingURL=Config.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/Config.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/Config.d.ts.map new file mode 100644 index 000000000..771d7dbdd --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/Config.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/Config.js"],"names":[],"mappings":";;yBAec,MAAM;IASC,mCAWhB"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/Draggable.d.ts b/leaflet-2.3.4/dist/Common/Utils/Draggable.d.ts new file mode 100644 index 000000000..7ce40a3d7 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/Draggable.d.ts @@ -0,0 +1,5 @@ +export default Draggable; +declare namespace Draggable { + function dragElement(element: DOMElement, header: DOMElement, container: DOMElement): void; +} +//# sourceMappingURL=Draggable.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/Draggable.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/Draggable.d.ts.map new file mode 100644 index 000000000..55e064c2f --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/Draggable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Draggable.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/Draggable.js"],"names":[],"mappings":";;IAsCkB,2FAwFb"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/GeocodeUtils.d.ts b/leaflet-2.3.4/dist/Common/Utils/GeocodeUtils.d.ts new file mode 100644 index 000000000..ea40a52b2 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/GeocodeUtils.d.ts @@ -0,0 +1,6 @@ +export default GeocodeUtils; +declare namespace GeocodeUtils { + function getGeocodedLocationFreeform(geocodedLocation: Object): string; + function getSuggestedLocationFreeform(suggestedLocation: Object): string; +} +//# sourceMappingURL=GeocodeUtils.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/GeocodeUtils.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/GeocodeUtils.d.ts.map new file mode 100644 index 000000000..215104620 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/GeocodeUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GeocodeUtils.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/GeocodeUtils.js"],"names":[],"mappings":";;IAOkC,uEAa7B;IAQ8B,yEAe9B"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/LayerUtils.d.ts b/leaflet-2.3.4/dist/Common/Utils/LayerUtils.d.ts new file mode 100644 index 000000000..e04ac6d80 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/LayerUtils.d.ts @@ -0,0 +1,13 @@ +export default LayerUtils; +declare namespace LayerUtils { + function getZoomLevelFromScaleDenominator(scaleDenominator: number, crs: string): Integer; + function getAttributions(params: { + extent: Float[]; + zoom: number; + crs: string; + visibility: boolean; + originators: Gp.Services.Config.Originator; + }): Object; + function intersects(extent1: Float[], extent2: Float[]): boolean; +} +//# sourceMappingURL=LayerUtils.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/LayerUtils.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/LayerUtils.d.ts.map new file mode 100644 index 000000000..2f37faa18 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/LayerUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LayerUtils.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/LayerUtils.js"],"names":[],"mappings":";;IAqBuC,0FAgKlC;IAciB;;;;;;eAsGjB;IAUY,iEAIZ"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/LoggerByDefault.d.ts b/leaflet-2.3.4/dist/Common/Utils/LoggerByDefault.d.ts new file mode 100644 index 000000000..faf0a1811 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/LoggerByDefault.d.ts @@ -0,0 +1,7 @@ +export default LoggerByDefault; +declare namespace LoggerByDefault { + function getLogger(name?: string | undefined): Object; + function disableAll(): void; + function enableAll(): void; +} +//# sourceMappingURL=LoggerByDefault.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/LoggerByDefault.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/LoggerByDefault.d.ts.map new file mode 100644 index 000000000..b33a02a78 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/LoggerByDefault.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LoggerByDefault.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/LoggerByDefault.js"],"names":[],"mappings":";;IAqBgB,sDAiBX;IAKY,4BAQZ;IAKW,2BAQX"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/MathUtils.d.ts b/leaflet-2.3.4/dist/Common/Utils/MathUtils.d.ts new file mode 100644 index 000000000..187bed23f --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/MathUtils.d.ts @@ -0,0 +1,9 @@ +export default MathUtils; +declare namespace MathUtils { + function modulo(a: number, b: number): number; + function decimalToDMS(degrees: number, hemispheres: any[], numDigits: number): Object; + function toInteger(s: string, base: Numeric): any; + function isInteger(s: string): boolean; + function toFloat(s: string): any; +} +//# sourceMappingURL=MathUtils.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/MathUtils.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/MathUtils.d.ts.map new file mode 100644 index 000000000..b5d4f4b9c --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/MathUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MathUtils.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/MathUtils.js"],"names":[],"mappings":";;IAqBa,8CAGR;IAYc,sFA4Bd;IAUW,kDAOX;IASW,uCAOX;IASS,iCAMT"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/Parser.d.ts b/leaflet-2.3.4/dist/Common/Utils/Parser.d.ts new file mode 100644 index 000000000..0591a82fa --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/Parser.d.ts @@ -0,0 +1,7 @@ +export default Parser; +declare namespace Parser { + function parse(xml: string): DOMElement; + function toString(doc: DOMElement): string; + function format(xml: string): string; +} +//# sourceMappingURL=Parser.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/Parser.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/Parser.d.ts.map new file mode 100644 index 000000000..fdade6492 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/Parser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Parser.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/Parser.js"],"names":[],"mappings":";;IAsBY,wCAiCP;IAQU,2CASV;IASQ,qCAoDR"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/ProxyUtils.d.ts b/leaflet-2.3.4/dist/Common/Utils/ProxyUtils.d.ts new file mode 100644 index 000000000..63237a20d --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/ProxyUtils.d.ts @@ -0,0 +1,8 @@ +export default ProxyUtils; +declare namespace ProxyUtils { + function proxifyUrl(url: string, proxyOptions?: { + proxyUrl: string; + noProxyDomains?: string[] | undefined; + } | undefined): string; +} +//# sourceMappingURL=ProxyUtils.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/ProxyUtils.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/ProxyUtils.d.ts.map new file mode 100644 index 000000000..5900e89f0 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/ProxyUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ProxyUtils.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/ProxyUtils.js"],"names":[],"mappings":";;IAuBiB;;;2BAwBZ"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/Register.d.ts b/leaflet-2.3.4/dist/Common/Utils/Register.d.ts new file mode 100644 index 000000000..bbbbdebee --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/Register.d.ts @@ -0,0 +1,441 @@ +export default Register; +declare namespace Register { + const isLoaded: boolean; + function get(name: string): Object; + function exist(name: string): boolean; + function load(Proj4: Object): void; + function loadByDefault(Proj4: Object): void; + function loadByName(Proj4: Object, name: string): boolean; + const EPSG: { + 4978: string; + 3857: string; + 3785: string; + 4149: string; + 4150: string; + 4151: string; + 4171: string; + 4230: string; + 4235: string; + 4258: string; + 4275: string; + 4322: string; + 4326: string; + 4467: string; + 4470: string; + 4471: string; + 4474: string; + 4558: string; + 4559: string; + 4621: string; + 4622: string; + 4623: string; + 4624: string; + 4625: string; + 4626: string; + 4627: string; + 4628: string; + 4629: string; + 4630: string; + 4632: string; + 4633: string; + 4634: string; + 4637: string; + 4638: string; + 4640: string; + 4641: string; + 4645: string; + 4687: string; + 4662: string; + 4689: string; + 4690: string; + 4691: string; + 4692: string; + 4698: string; + 4749: string; + 4750: string; + 4807: string; + 2056: string; + 2154: string; + 2213: string; + 2969: string; + 2970: string; + 2971: string; + 2972: string; + 2973: string; + 2975: string; + 2976: string; + 2977: string; + 2978: string; + 2980: string; + 2981: string; + 2982: string; + 2984: string; + 2986: string; + 2987: string; + 2989: string; + 2990: string; + 2995: string; + 3038: string; + 3039: string; + 3040: string; + 3041: string; + 3045: string; + 3046: string; + 3047: string; + 3048: string; + 3049: string; + 3050: string; + 3051: string; + 3034: string; + 3035: string; + 3042: string; + 3043: string; + 3044: string; + 25828: string; + 25829: string; + 25833: string; + 25834: string; + 25835: string; + 25836: string; + 25837: string; + 25838: string; + 3060: string; + 3163: string; + 3164: string; + 3165: string; + 3166: string; + 3169: string; + 3170: string; + 3171: string; + 3172: string; + 3296: string; + 3297: string; + 3298: string; + 3299: string; + 3302: string; + 3303: string; + 3304: string; + 3305: string; + 3306: string; + 3312: string; + 3313: string; + 3336: string; + 3395: string; + 3727: string; + 21781: string; + 25830: string; + 25831: string; + 25832: string; + 27561: string; + 27562: string; + 27563: string; + 27564: string; + 27571: string; + 27572: string; + 27573: string; + 27574: string; + 27581: string; + 27582: string; + 27583: string; + 27584: string; + 27591: string; + 27592: string; + 27593: string; + 27594: string; + 32601: string; + 32602: string; + 32603: string; + 32604: string; + 32605: string; + 32606: string; + 32607: string; + 32608: string; + 32609: string; + 32610: string; + 32611: string; + 32612: string; + 32613: string; + 32614: string; + 32615: string; + 32616: string; + 32617: string; + 32618: string; + 32619: string; + 32620: string; + 32621: string; + 32622: string; + 32623: string; + 32624: string; + 32625: string; + 32626: string; + 32627: string; + 32628: string; + 32629: string; + 32630: string; + 32631: string; + 32632: string; + 32633: string; + 32634: string; + 32635: string; + 32636: string; + 32637: string; + 32638: string; + 32639: string; + 32640: string; + 32641: string; + 32642: string; + 32643: string; + 32644: string; + 32645: string; + 32646: string; + 32647: string; + 32648: string; + 32649: string; + 32650: string; + 32651: string; + 32652: string; + 32653: string; + 32654: string; + 32655: string; + 32656: string; + 32657: string; + 32658: string; + 32659: string; + 32660: string; + 32661: string; + 32662: string; + 32701: string; + 32702: string; + 32703: string; + 32704: string; + 32705: string; + 32706: string; + 32707: string; + 32708: string; + 32709: string; + 32710: string; + 32711: string; + 32712: string; + 32713: string; + 32714: string; + 32715: string; + 32716: string; + 32717: string; + 32718: string; + 32719: string; + 32720: string; + 32721: string; + 32722: string; + 32723: string; + 32724: string; + 32725: string; + 32726: string; + 32727: string; + 32728: string; + 32729: string; + 32730: string; + 32731: string; + 32732: string; + 32733: string; + 32734: string; + 32735: string; + 32736: string; + 32737: string; + 32738: string; + 32739: string; + 32740: string; + 32741: string; + 32742: string; + 32743: string; + 32744: string; + 32745: string; + 32746: string; + 32747: string; + 32748: string; + 32749: string; + 32750: string; + 32751: string; + 32752: string; + 32753: string; + 32754: string; + 32755: string; + 32756: string; + 32757: string; + 32758: string; + 32759: string; + 32760: string; + 32761: string; + 310024802: string; + 310915814: string; + 310486805: string; + 310700806: string; + 310702807: string; + 310706808: string; + 310547809: string; + 310642810: string; + 310032811: string; + 310642812: string; + 310642801: string; + 310642813: string; + 310642901: string; + 5489: string; + 5490: string; + }; + const CRS: { + 84: string; + }; + namespace IGNF { + const AMST63: string; + const CROZ63: string; + const CSG67: string; + const ED50: string; + const ETRS89: string; + const GUAD48: string; + const GUADFM49: string; + const IGN63: string; + const IGN72: string; + const KERG62CAR: string; + const MART38: string; + const MAYO50: string; + const MOOREA87: string; + const NTF: string; + const NUKU72: string; + const REUN47: string; + const RGF93: string; + const RGFG95: string; + const RGM04: string; + const RGNC: string; + const RGPF: string; + const RGR92: string; + const RGSPM06: string; + const RGTAAF07: string; + const RRAF91: string; + const STPL69: string; + const STPM50: string; + const TAHAA: string; + const TAHI79: string; + const TERA50: string; + const WALL78: string; + const WGS72: string; + const WGS84: string; + const AMST63GEO: string; + const CROZ63GEO: string; + const CSG67GEO: string; + const ED50G: string; + const GUAD48GEO: string; + const GUADFM49GEO: string; + const IGN63GEO: string; + const IGN72GEO: string; + const KERG62GEO: string; + const MART38GEO: string; + const MAYO50GEO: string; + const MOOREA87GEO: string; + const NTFG: string; + const NTFP: string; + const NUKU72GEO: string; + const REUN47GEO: string; + const RGF93G: string; + const RGFG95GEO: string; + const RGM04GEO: string; + const RGNCGEO: string; + const RGPFGEO: string; + const RGR92GEO: string; + const RGSPM06GEO: string; + const RGTAAF07G: string; + const STPL69GEO: string; + const STPM50GEO: string; + const TAHAAGEO: string; + const TAHI79GEO: string; + const TERA50G: string; + const WALL78GEO: string; + const WGS72G: string; + const WGS84G: string; + const WGS84RRAFGEO: string; + const XGEO: string; + const AMST63UTM43S: string; + const CROZ63UTM39S: string; + const CSG67UTM21: string; + const CSG67UTM22: string; + const GEOPORTALANF: string; + const GEOPORTALASP: string; + const GEOPORTALCRZ: string; + const GEOPORTALFXX: string; + const GEOPORTALGUF: string; + const GEOPORTALKER: string; + const GEOPORTALMYT: string; + const GEOPORTALNCL: string; + const GEOPORTALPYF: string; + const GEOPORTALREU: string; + const GEOPORTALSPM: string; + const GEOPORTALWLF: string; + const GUAD48UTM20: string; + const GUADFM49U20: string; + const IGN63UTM7S: string; + const IGN72UTM58S: string; + const KERG62UTM42S: string; + const LAMB1: string; + const LAMB1C: string; + const LAMB2: string; + const LAMB2C: string; + const LAMB3: string; + const LAMB3C: string; + const LAMB4: string; + const LAMB4C: string; + const LAMB93: string; + const RGF93CC42: string; + const RGF93CC43: string; + const RGF93CC44: string; + const RGF93CC45: string; + const RGF93CC46: string; + const RGF93CC47: string; + const RGF93CC48: string; + const RGF93CC49: string; + const RGF93CC50: string; + const LAMBE: string; + const MART38UTM20: string; + const MAYO50UTM38S: string; + const MILLER: string; + const MOOREA87U6S: string; + const NUKU72U7S: string; + const RGM04UTM38S: string; + const RGNCUTM57S: string; + const RGNCUTM58S: string; + const RGNCUTM59S: string; + const RGPFUTM5S: string; + const RGPFUTM6S: string; + const RGPFUTM7S: string; + const RGR92UTM40S: string; + const RGSPM06U21: string; + const STPL69UTM43S: string; + const STPM50UTM21: string; + const TAHAAUTM05S: string; + const TAHI51UTM06S: string; + const TAHI79UTM6S: string; + const TERA50STEREO: string; + const UTM01SW84: string; + const UTM20W84GUAD: string; + const UTM20W84MART: string; + const UTM22RGFG95: string; + const UTM39SW84: string; + const UTM42SW84: string; + const UTM43SW84: string; + const WALL78UTM1S: string; + const ETRS89GEO: string; + const ETRS89LAEA: string; + const ETRS89LCC: string; + const UTM26ETRS89: string; + const UTM27ETRS89: string; + const UTM28ETRS89: string; + const UTM29ETRS89: string; + const UTM30ETRS89: string; + const UTM31ETRS89: string; + const UTM32ETRS89: string; + const UTM33ETRS89: string; + const UTM34ETRS89: string; + const UTM35ETRS89: string; + const UTM36ETRS89: string; + const UTM37ETRS89: string; + const UTM38ETRS89: string; + } +} +//# sourceMappingURL=Register.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/Register.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/Register.d.ts.map new file mode 100644 index 000000000..cd04c18d4 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/Register.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Register.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/Register.js"],"names":[],"mappings":";;;IA6BU,mCAsBL;IAWO,sCAsBP;IAOM,mCAgCN;IAoBe,4CAoCf;IAUY,0DAaZ"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/SearchEngineUtils.d.ts b/leaflet-2.3.4/dist/Common/Utils/SearchEngineUtils.d.ts new file mode 100644 index 000000000..b495d3394 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/SearchEngineUtils.d.ts @@ -0,0 +1,25 @@ +export default SearchEngineUtils; +declare namespace SearchEngineUtils { + namespace advancedSearchFiltersByDefault { + const PositionOfInterest: ({ + name: string; + title: string; + value: string[]; + } | { + name: string; + title: string; + value?: undefined; + })[]; + const StreetAddress: { + name: string; + title: string; + }[]; + const CadastralParcel: { + name: string; + title: string; + description: string; + }[]; + } + function zoomToResultsByDefault(info: Object): Integer; +} +//# sourceMappingURL=SearchEngineUtils.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/SearchEngineUtils.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/SearchEngineUtils.d.ts.map new file mode 100644 index 000000000..88999758f --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/SearchEngineUtils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SearchEngineUtils.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/SearchEngineUtils.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAwG6B,uDA4CxB"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/SelectorID.d.ts b/leaflet-2.3.4/dist/Common/Utils/SelectorID.d.ts new file mode 100644 index 000000000..3841c84b0 --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/SelectorID.d.ts @@ -0,0 +1,8 @@ +export default SelectorID; +declare namespace SelectorID { + function generate(): number; + function name(id: string): string; + function index(id: string): string; + function uuid(id: string): string; +} +//# sourceMappingURL=SelectorID.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Common/Utils/SelectorID.d.ts.map b/leaflet-2.3.4/dist/Common/Utils/SelectorID.d.ts.map new file mode 100644 index 000000000..d40e90e9c --- /dev/null +++ b/leaflet-2.3.4/dist/Common/Utils/SelectorID.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SelectorID.d.ts","sourceRoot":"","sources":["../../../../src/Common/Utils/SelectorID.js"],"names":[],"mappings":";;IAqBe,4BAEN;IASE,kCAWN;IASO,mCAYP;IASM,kCASN"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/GpPluginLeaflet-map.css b/leaflet-2.3.4/dist/GpPluginLeaflet-map.css new file mode 100644 index 000000000..f0de31a41 --- /dev/null +++ b/leaflet-2.3.4/dist/GpPluginLeaflet-map.css @@ -0,0 +1,3573 @@ +/*! + * @brief French Geoportal Extension for Leaflet + * + * This software is released under the licence CeCILL-B (Free BSD compatible) + * @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt + * @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt + * @see http://www.cecill.info/ + * + * @copyright copyright (c) IGN + * @license CeCILL-B + * @author IGN + * @version 2.3.4 + * @date 30/08/2023 + * + */ + +/*! + * @overview Proj4Leaflet - Smooth Proj4js integration with Leaflet + * @copyright Copyright (c) 2012, Kartena AB + * @license BSD 2-Clause "Simplified" License + * See https://raw.githubusercontent.com/kartena/Proj4Leaflet/master/LICENSE + * @version 1.0.2 + */ + +/*! + * @overview leaflet-draw - Vector drawing and editing plugin for Leaflet + * @copyright Copyright (c) 2012-2017 Jon West, Jacob Toye, and Leaflet + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/Leaflet/Leaflet.draw/master/MIT-LICENSE.md + * @version 1.0.4 + */ + +/*! + * Sortable -- JavaScript library for reorderable drag-and-drop lists on modern + * browsers and touch devices. No jQuery required. Supports Meteor, AngularJS, + * React, Polymer, Vue, Knockout and any CSS library, e.g. Bootstrap. + * + * Released under MIT LICENSE + * + * Copyright Lebedev Konstantin + * https://github.com/SortableJS/Sortable + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * @version 1.14.0 + */ + +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.4 + */ + +/*! + * @overview Proj4js - Javascript reprojection library. + * + * @authors + * - Mike Adair madairATdmsolutions.ca + * - Richard Greenwood richATgreenwoodmap.com + * - Didier Richard didier.richardATign.fr + * - Stephen Irons stephen.ironsATclear.net.nz + * - Olivier Terral oterralATgmail.com + * - Calvin Metcalf cmetcalfATappgeo.com + * + * @copyright Copyright (c) 2014, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons, Olivier Terral and Calvin Metcalf + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/proj4js/proj4js/master/LICENSE.md + * @version 2.7.5 + */ + +/* BOOST RELIEF */ + + div[id^=GPboostRelief-] { + font-size: 11px; + width: 150px; + } + + div[id^=GPboostRelief-] label { + display: block; + } + + div[id^=GPBoostReliefListContainer-] { + position: relative; + width: 100%; + height: 28px; + padding-left: 8px; + line-height: 28px; + } + + .GPlayerRelief, + .GPlayerReliefValue { + position: absolute; + top: 0; + } + + .GPlayerRelief { + width: calc(100% - 60px); + height: 28px; + padding-left: 8px; + } + + .GPlayerReliefValue { + width: 32px; + left: calc(100% - 40px); + line-height: 28px; + font-size: 10px; + font-style: italic; + cursor: default; + } + + /* Showing/hiding boost relief panel */ + + label[id^=GPshowBoostReliefPicto] { + display: inline-block; + } + + input[id^=GPshowBoostRelief-] + label { + display: block; + } + + input[id^=GPshowBoostRelief-]:checked + label { + display: none; + } + + input[id^=GPshowBoostRelief-] + label + div { + display: none; + } + + input[id^=GPshowBoostRelief-]:checked + label + div { + display: block; + } + + /* Showing layer advanced tools */ + + div[id^=GPboostRelief-] input[type="checkbox"]:checked + label + .GPlayerAdvancedToolsRelief { + max-height: 28px; + opacity: 1; + } + + .GPlayerAdvancedToolsRelief { + display: block; + position: relative; + width: 100%; + border-bottom : 1px dotted #CCC; + background-color : #FFF; + } + + .GPlayerReliefLayerId { + position: relative; + width: 100px; + height: 28px; + padding-left: 8px; + line-height: 28px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + /* Relief slider : general */ + + .GPlayerRelief input { + -webkit-appearance: none; + -moz-appearance: none; + background: none; + display: block; + width: 100%; + height: 100%; + margin: 0; + padding: 0; + overflow: hidden; + cursor: pointer; + } + + .GPlayerRelief input[type="range"]:focus { + box-shadow: none; + outline: none; + } + + /* Relief slider : Chrome, Safari, Opera */ + + .GPlayerRelief input[type="range"]::-webkit-slider-runnable-track { + -webkit-appearance: none; + height: 3px; + } + + .GPlayerRelief input[type="range"]::-webkit-slider-thumb:before { + position: absolute; + top: 0; + right: 50%; + left: -200px; + height: 3px; + pointer-events: none; + } + + .GPlayerRelief input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + width: 9px; + height: 17px; + -webkit-appearance: none; + border: 2px solid #FFF; + background-color: #505050; + position: relative; + top: -7px; + } + + /* Relief slider : Firefox */ + + .GPlayerRelief input[type="range"]::-moz-range-track { + width: 80px; + height: 3px; + } + + .GPlayerRelief input[type="range"]::-moz-range-thumb { + width: 5px; + height: 13px; + border: 2px solid #FFF; + border-radius: 0; + box-shadow: 0; + background-color: #505050; + position: relative; + } + + /* Relief slider : IE */ + + .GPlayerRelief input[type="range"]::-ms-track { + border: 0; + border-color: transparent; + border-radius: 0; + border-width: 0; + color: transparent; + height: 3px; + width: 80px; + } + + .GPlayerRelief input[type="range"]::-ms-fill-lower, + .GPlayerRelief input[type="range"]::-ms-fill-upper { + background: transparent; + border-radius: 0; + } + + .GPlayerRelief input[type="range"]::-ms-thumb { + width: 5px; + height: 13px; + border: 2px solid #FFF; + background-color: #505050; + } + + .GPlayerRelief input[type="range"]::-ms-tooltip { + display: none; + } +/* BUILDINGS */ + + div[id^=GPbuildings-] { + font-size: 11px; + } + + div[id^=GPbuildings-] label { + display: block; + } + + label[id^=GPshowBuildingsPicto] { + display: inline-block; + cursor: pointer; + } + + +/* MOUSE POSITION */ + +/* Showing/hiding drawing panel */ + +label[id^=GPshowDrawingPicto-] { + display: inline-block; +} + +input[id^=GPshowDrawing-] + label { + display: block; +} + +input[id^=GPshowDrawing-]:checked + label { + display: none; +} + +input[id^=GPshowDrawing-] + label + div { + display: none; +} + +input[id^=GPshowDrawing-]:checked + label + div { + display: block; +} + +/* General panels */ + +div[id^=GPdrawingPanel-] { + width: 240px; + overflow: hidden; +} + +/* Basic infos */ + +div[id^=GPdrawingBasicPanel-] { + padding: 10px 15px; +} + +.GPdrawingLabel, +.GPdrawingCoords { + display: inline-block; + line-height: 20px; +} + +.GPdrawingLabel { + width: 80px; + font-weight: bold; +} + +.GPdrawingCoords { + width: 110px; +} + +/* markers selector */ +.marker-input-radio { + display : none ; +} + +input.marker-input-radio:checked + label { + border: 1px solid red; +} + + +div[id^=GPelevationPathPanelInfo] { + display: none; /* on n'affiche pas le bouton d'information par defaut */ +} + +/* Calc waiting */ + +.GPelevationPathCalcWaitingContainerVisible, +.GPelevationPathCalcWaitingContainerHidden { + position: absolute; + top: 32px; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255,255,255,0.9); + font-size: 1.5em; + font-weight: bold; + overflow: hidden; +} + +.GPelevationPathInformationsContainerVisible, +.GPelevationPathInformationsContainerHidden { + position: absolute; + top: 32px; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255,255,255,0.9); + font-size: 13px; + font-weight: bold; + overflow: hidden; +} + +.GPelevationPathCalcWaitingContainerVisible { + display: -webkit-flex; + display: -webkit-box; + display: -ms-flexbox; + display: flex; +} + +.GPelevationPathInformationsContainerVisible { + display: -webkit-flex; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + flex-direction: column; +} + +.GPelevationPathCalcWaitingContainerHidden, +.GPelevationPathInformationsContainerHidden { + display: none; +} + +.GPelevationPathCalcWaiting, +.GPelevationPathInformations { + margin: auto; +} + +.GPelevationPathInformations { + font-size: 0.8em; +} + +.GPelevationPathCalcWaitingContainerVisible, +.GPelevationPathCalcWaitingContainerHidden, +.GPelevationPathInformationsContainerVisible, +.GPelevationPathInformationsContainerHidden { + border-radius: 5px; +} + +/* CSS : Raw */ + +#profileElevationRaw { + resize: none; + padding: unset; +} + +/* CSS : default */ + +#profileElevationByDefault { + display:-webkit-flex; + display:-webkit-box; + display:-ms-flexbox; + display:flex; + -webkit-box-orient:vertical; + -webkit-box-direction:normal; + -webkit-flex-direction:column; + -ms-flex-direction:column; + flex-direction:column; + height:100%; +} + +.altiPathValue { + font-weight: 700; + fill: #5E5E5E; +} + +.altiPathCoords { + font-style: italic; + fill: #5E5E5E; +} + +.tooltipInit { + opacity: 0; +} + +.tooltipFadeIn { + transition: opacity 300ms ease 0ms, transform 50ms ease 0s, top 50ms ease 0s, left 50ms ease 0s; + opacity: 1; +} + +.tooltipFadeOut { + transition: opacity 500ms ease 0ms; + opacity: 0; +} + + + +/* CSS : D3 */ + +.axis-d3 > text { + fill: rgb(94, 94, 94); + font-family: Verdana; + font-size: 10px; + opacity: 1; + text-anchor: end; +} + +.axis-d3 { + fill: none; + stroke: #5E5E5E; + stroke-width: 1; + shape-rendering: crispEdges; +} + +.area-d3 { + fill: #C77A04; + stroke: #5E5E5E; + stroke-width: 0; + fill-opacity: 0.4; +} + +.line-d3 { + fill: none; + stroke: #C77A04; + stroke-width: 1px; +} + +.grid-d3 .tick { + stroke: lightgrey; + opacity: 0.7; +} + +.grid-d3 path { + stroke-width: 0; +} + +.grid-d3 .tick { + stroke: lightgrey; + opacity: 0.7; +} + +.grid-d3 path { + stroke-width: 0; +} + +.overlay-d3 { + fill: none; + pointer-events: all; +} + +.focusLine-d3 { + fill: none; + stroke: #C77A04; + stroke-width: 0.5px; +} + +.focusCircle-d3 { + fill: #C77A04; +} + +div.tooltip-d3 { + position: inherit;; + text-align: left; + width: 80px; + height: 45px; + padding: 5px; + font: 8px sans-serif; + background: white; + border: 0px; + border-radius: 8px; + pointer-events: none; +} + +/* Widgets : general */ + +.GPwidget { + position: absolute; + font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; + font-size: 13px; + color: #333; +} + +.GPwidget input[type='text'], +.GPwidget input[type='button'] { + -webkit-appearance: none; + color: #333333; +} + +.GPwidget input[type="checkbox"] { + display: none; +} + +.GPwidget select { + padding-left: 3px; + border-radius: 3px; +} + +.GPwidget form { + margin-bottom: 0; +} + +.GPwidget * { + box-sizing: border-box; + background-repeat: no-repeat; +} + +/* waiting */ + +.GPwaiting { + background-image : url(data:image/gif;base64,R0lGODlhNAA0AIQSAAFkpSZ5sAGV3k2Ruiao3kOj1/GUBk225pe/B4S83XrK75HH3qrS5szMzNbW1sHe797e3ubm5v///////////////////////////////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFAQAfACwAAAAANAA0AAAF5uAnjmRpnmiqrmzrvnAsz3T9FXhh72Ke8zWfDzgT/ogxIw55cjgiJ6XOhKjaII1sNio8Vb8ImnbMXVLBVhl2vI2hvzIHOwt9veGxyLwhu4dlcw59bzVjgjNoPHU2f0yOj5CRkpMocg2HjwaaBitzmZuaKWuGTKCgKHt8SKabqHulrJwno1qYQLGyJ56OrCuWtrChlMPExcbHH4s1ymK1NJZtM4Fxu3mvMXvMLdBj2ip60zG0WoBzENLVJL+66TDj7GQmbOc1EE9N4SURDvSRqcgj/gH8wC0LsGPtAK7pN7Chw4cQSYQAACH5BAUBAB8ALBYABAAaACcAAAVw4PdBTQOJaKquX+k2bJw6b+nIcu3isV7yLFrttioYczWWcVmICYkq5hKolB6pKOsUm9Vyu9JvKiyOls/otHqNQ7gR6ff7LJeX63Mx3n3f0+txeWyDhIVlBmsGiopoi45njo9fkZKTlIhil42RaYsxIQAh+QQFAQAfACwWAAkAGgAnAAAFdOAnjmQZOVCprmTjuikrf289y/Ub32SUuw6e6teICEuO31GVfC1Zxqd0Sq1arYVsAavNUrvdKVgrHm+l5jMazPVe3/C4/IN4I+73Kn5P3fOffn+AgXUqBocGK4QriIiKfoaNjip4LJKTT5eHU5qJnJJWjVUhACH5BAUBAB8ALAkAFgAnABoAAAV04CeOZGmepdM0Duq+5yo3cO2qcwPZPJnLveBvFezhZrsi76cM4lrNqHRKrVpPhmoBZuh2o4VwGOUtK8VoU9lcRKdJazbP/R7Fv236tnQ/If4IJ3pYa36Af4JuLl6Gh4gmYlKOgFclk4+VIpeBmSOTnZaUTSEAIfkEBQEAHwAsBAAWACcAGgAABXfg9xmkIZ5oqq5rWbJwnLqubLP0e+9nTvJAnwnIyxGJtaNyyWw6n1Ao4hmRIa7XpaPBbbCw4OO2y1WBw0Ryt4o6o3cRNdeRcmfTcojZvSr4CytyXntvKH9/gWR6X3cph4crEQ6LSo+IUYaWgJgnmpucIpagjpc3IQAh+QQFAQAfACwEAAkAGgAnAAAFb+AnjqJhkmiamqyhvmjLwrA806p946Tu8isbMNca1ozIpHLJTCKeiCYUupxOlVaqMxvdZqtWqbZJLpvPyEK5wGYz23AlPJ6c0412t9yucjQaDi98KX+FDTBtfYZ/gUmLhUqPf0p+i42Oi00QfxAiIQAh+QQFAQAfACwEAAQAGgAnAAAFc+AnjmRZGqhhrmyasrDounE7o/V64yvi6zuTb4gA0oTEn+lYSg5zSGcROpJOqVUntknc9rzgsHhMLhXOhTEaHV6vwW62N36G09tutbzM7/v/JhFlDYQNDmKFhYdeEYmFYA6OhIJbEJINYZdhlolkEA6UUCEAIfkEAQEAHwAsBAAEACcAGgAABXXgJ45kWSIoYq5sS6apK8swPN9mHeP8p6O9UmG4+qlMhmRryCwUa6uk1LBqMp9A5FQptBKDW2nX6+SFxSRyuXemjpvBz5lljYu2srX9vu/7/4CBgh8NhQ6DK4WKDYgkEIuGjSKQipKElIySj5CHlpSWIw6RoCEAOw==); + background-position : center center; + background-repeat : no-repeat; +} + +/* General panels */ + +.GPpanel { + background-color: #FFF; +} + +.GPpanelHeader { + position: relative; + width: 100%; +} + +.GPpanelTitle { + width: 100%; + height: 100%; + text-align: center; + font-weight: bold; +} + +.GPpanelClose, .GPpanelReduce, .GPpanelInfo { + position: absolute; + cursor: pointer; +} + +/* Showing/hiding advanced panels */ + +.GPshowAdvancedToolPicto { + position: relative; + box-sizing: border-box; + cursor: pointer; +} + +.GPshowAdvancedToolOpen { + position: absolute; + display: block; + box-sizing: border-box; +} + +/* Flex inputs */ + +.GPflexInput { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; + transition: max-height 0.3s ease-out, opacity 0.3s ease-out; +} + +/* FIXME tempory hack with :not(.GPlocationOriginHidden) ! +.GPflexInput > *:not(.GPlocationOriginHidden) */ +.GPflexInput > * { + display: block; + height: 28px; + line-height: 26px; + border: 1px solid #999; + border-radius: 0; +} + +.GPflexInput *:not(:last-child) { + border-right:none; +} + +.GPflexInput *:first-child { + border-radius: 3px 0 0 3px; +} + +.GPflexInput *:last-child { + border-radius: 0 3px 3px 0; +} + +.GPflexInput > *:not(input) { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.GPflexInput > input { + -webkit-flex: 1; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + padding: 0 5px; + min-width: 0; +} + +.GPflexInput > select { + -webkit-flex: 1; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + padding-right: 7px; +} + +.GPflexInput > label { + background-color: #F2F2F2; + color: #666; + padding-left: 7px; + padding-right: 9px; + cursor: pointer; +} + +/* Particular inputs */ + +.GPinputSelect { + display: block; + height: 28px; + line-height: 26px; + margin: auto; + border: 1px solid #999; + color: #333; + cursor: pointer; +} + +input.GPinputSubmit { + display: block; + width: 80px; + margin: auto; + height: 28px; + line-height: 26px; + padding: 0; + background: none; + border: none; + border-radius: 3px; + font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; + color: #FFF; + font-weight: bold; + opacity: 0.8; + transition: opacity 0.2s ease-out; + cursor: pointer; +} + +input.GPinputSubmit:hover { + opacity: 1; +} + +/* Autocomplete/geocode results */ + +.GPautoCompleteList, +.GPadvancedAutoCompleteList { + z-index: 2; + display: none; + position: absolute; + max-height: 140px; + background-color: #FFF; + border: 1px solid #999; + overflow-y: hidden; +} + +.GPadvancedAutoCompleteList { + width: calc(100% - 28px); + border-top: none; + font-size: 0.9em; +} + +.GPautoCompleteProposal { + width: 100%; + height: 28px; + line-height: 16px; + padding: 6px 10px; + color: #5E5E5E; + font-size: 1.0em; + overflow: hidden; + white-space: nowrap; + text-overflow:ellipsis; + cursor: pointer; +} + +.GPautoCompleteProposal:hover { + color: #000000; + background-color: #CEDBEF +} + +/* Showing additional hidden options */ + +.GPshowMoreOptions { + display: block; + position: absolute; + width: 28px; + height: 28px; + cursor: pointer; + transition: all 0.5s ease-out 0s; +} + +input[type="checkbox"]:checked + .GPshowMoreOptions { + -webkit-transform: rotateX(180deg); + transform: rotateX(180deg); + /* bottom: 90px; */ +} + +/* GET FEATURE INFO */ + +label[id^=GPgetFeatureInfoPicto] { + display: inline-block; +} + +div[id^=GPgetFeatureInfo-] + label { + display: block; +} + +span[id^=GPgetFeatureInfoActivate], +span[id^=GPgetFeatureInfoDeactivate] { + position: absolute; + display: block; + transition: border-radius 0.5s ease-out 0s, opacity 0.5s ease-out 0s; +} + +span[id^=GPgetFeatureInfoActivate] { + background-position: 0 0; + opacity: 1; +} + +span[id^=GPgetFeatureInfoDeactivate] { + opacity: 0; +} + +div[id^=GPgetFeatureInfo-] input[type="checkbox"]:not(:checked) + label[id^=GPgetFeatureInfoPicto] span[id^=GPgetFeatureInfoDeactivate] { + opacity: 1; +} + +/* ISOCHRON */ + +div[id^=GPisochron-] { + top: 140px; +} + +/* Showing/hiding mouse position panel */ + +label[id^=GPshowIsochronPicto] { + display: inline-block; +} + +input[id^=GPshowIsochron-] + label { + display: block; +} + +input[id^=GPshowIsochron-]:checked + label { + display: none; +} + +input[id^=GPshowIsochron-] + label + div { + display: none; +} + +input[id^=GPshowIsochron-]:checked + label + div { + display: block; +} + +/* General panels */ + +div[id^=GPisochronPanel-] { + width: 280px; +} + +/* Calc waiting */ + +.GPisochronCalcWaitingContainerVisible, +.GPisochronCalcWaitingContainerHidden { + position: absolute; + top: 32px; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255,255,255,0.9); + font-size: 1.5em; + font-weight: bold; + overflow: hidden; +} + +.GPisochronCalcWaitingContainerVisible { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; +} + +.GPisochronCalcWaitingContainerHidden { + display: none; +} + +.GPisochronCalcWaiting { + margin: auto; +} + +/* Isochron form */ + +form[id^=GPisochronForm] { + padding: 15px; +} + +.GPisochronFormMini { + max-height: 58px; + overflow: hidden; +} + +.GPisochronFormMini div[id^="GPisochronReset-"], +.GPisochronFormMini label[id^="GPshowIsoExclusionsPicto-"] { + display: none; +} + +.GPisochronOriginVisible { + display: block; +} + +.GPisochronOriginHidden { + display: none; +} + +.GPisochronOriginPointerImg { + width: 28px; + background-color: #F2F2F2; + cursor: pointer; +} + +input[id^="GPisochronOriginPointer"] + .GPisochronOriginPointerImg { + background-position: -1px -1px; +} + +input[id^="GPisochronOriginPointer"]:checked + .GPisochronOriginPointerImg { + background-position: -29px -1px; +} + +input[id^=GPisochronSubmit] { + margin-top: 5px; +} + +/* Alternative choice */ + +div[id^=GPisochronChoice] { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; + width: 160px; + -webkit-justify-content: space-between; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + margin: auto; + margin-top: 15px; + margin-bottom: 5px; +} + +.GPisochronChoiceAlt input { + display: none; +} + +.GPisochronChoiceAltImg { + display: block; + width: 28px; + height: 28px; + margin: auto; + cursor: pointer; +} + +input[id^=GPisochronChoiceAltChron] + .GPisochronChoiceAltImg { + background-position: -56px 0; +} + +input[id^=GPisochronChoiceAltChron]:checked + .GPisochronChoiceAltImg { + background-position: -84px 0; +} + +input[id^=GPisochronChoiceAltDist] + .GPisochronChoiceAltImg { + background-position: -112px 0; +} + +input[id^=GPisochronChoiceAltDist]:checked + .GPisochronChoiceAltImg { + background-position: -140px 0; +} + +.GPisochronChoiceAlt span { + cursor: pointer; + display:block; + color: #999; +} + +.GPisochronValueHidden { + display: none; +} + +div[id^=GPisochronValueChron], +div[id^=GPisochronValueDist] { + width: 220px; + margin: auto; +} + +/* Mode choice */ + +div[id^=GPisochronModeChoice] { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; + -webkit-justify-content: space-between; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + margin: 15px 0; +} + +.GPisochronModeLabel { + display: block; + text-align: center; + margin-bottom: 5px; +} + +div[id^=GPisochronTransportChoice] input { + display: none; +} + +.GPisochronTransportImg { + display: inline-block; + width: 28px; + height: 28px; + cursor: pointer; +} + +.GPisochronTransportImg:first-of-type { + margin-left: 18px; + margin-right: 10px; +} + +input[id^=GPisochronTransportCar] + .GPisochronTransportImg { + background-position: -168px 0; +} + +input[id^=GPisochronTransportCar]:checked + .GPisochronTransportImg { + background-position: -196px 0; +} + +input[id^=GPisochronTransportPedestrian] + .GPisochronTransportImg { + background-position: -224px 0; +} + +input[id^=GPisochronTransportPedestrian]:checked + .GPisochronTransportImg { + background-position: -252px 0; +} + +select[id^=GPisochronDirectionSelect] { + width: 80px; +} + +/* Showing/hiding exclusions */ + +input[id^=GPshowIsoExclusions] { + display: none; +} + +.GPshowIsoExclusionsPicto { + top: 250px; + right: 0; + transition: all 0.5s ease-out 0s; +} + +input[id^=GPshowIsoExclusions] + label + div[id^=GPisoExclusions] { + max-height: 0; + opacity: 0; + margin-bottom: 0; +} + +input[id^=GPshowIsoExclusions]:checked + label + div[id^=GPisoExclusions] { + display: block; + max-height: 60px; + opacity: 1; + margin-bottom: 15px; +} + +/* Exclusions */ + +div[id^=GPisoExclusions] { + transition: max-height 0.5s ease-in-out 0.25s, opacity 0.5s ease-in-out 0.25s, margin 0.3s ease-in-out 0.25s; + overflow: hidden; +} + +.GPisoExclusionsLabel { + display: block; + text-align: center; + margin-bottom: 10px; + font-weight: bold; + line-height: 16px; +} + +.GPisoExclusionsOptions { + display: -webkit-flex; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-justify-content: space-around; + -ms-flex-pack: distribute; + justify-content: space-around; +} + +.GPisoExclusionsOption { + display: block; + height: 28px; + line-height: 26px; + color: #A77; + background-color: #FEE; + padding-left: 28px; + padding-right: 5px; + border: 1px solid #A77; + border-radius: 3px; + cursor: pointer; +} + +input:checked + .GPisoExclusionsOption { + background-color: #EFE; + background-position: 0 -28px; + color: #797; + border: 1px solid #797; +} + +/* Reset picto */ +div[id^=GPisochronReset] { + position: absolute; + margin-top: 5px; + width: 28px; + height: 28px; + border-radius: 3px; + opacity: 0.8; + background-position: -281px 0; + transition: opacity 0.2s ease-out; + cursor: pointer; +} + +div[id^=GPisochronReset]:hover { + opacity: 1; +} + +/* LAYER SWITCHER */ + +div[id^=GPlayerSwitcher-] { + font-size: 11px; +} + +div[id^=GPlayerSwitcher-] [draggable] { + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + user-select: none; + /* Required to make elements draggable in old WebKit */ + -khtml-user-drag: element; + -webkit-user-drag: element; +} + +/* Manage opening of the components through hiden checkboxes */ + +div[id^=GPlayerSwitcher-] input[type="checkbox"] + div, +div[id^=GPlayerSwitcher-] input[type="checkbox"] + label + div { + max-height: 0px; +} + +div[id^=GPlayerSwitcher-] label { + display: block; +} + +/* Showing/hiding layers list */ + +label[id^=GPshowLayersListPicto] { + position: relative; + float: right; + display: block; + opacity: 1; + transition: opacity 0.5s ease-out 0s, box-shadow 0.5s ease-out 0s, border 0.5s ease-out 0s, border-radius 0.5s ease-out 0s; + cursor: pointer; +} + +span[id^=GPshowLayersListOpen], +span[id^=GPshowLayersListClose] { + position: absolute; + display: block; + transition: border-radius 0.5s ease-out 0s, opacity 0.5s ease-out 0s; +} + +span[id^=GPshowLayersListOpen] { + background-position: 0 0; + opacity: 1; +} + +span[id^=GPshowLayersListClose] { + opacity: 0; +} + +div[id^=GPlayerSwitcher-] input[type="checkbox"]:checked + div + label[id^=GPshowLayersListPicto] { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +div[id^=GPlayerSwitcher-] input[type="checkbox"]:checked + div + label[id^=GPshowLayersListPicto] span[id^=GPshowLayersListClose] { + opacity: 1; +} + +/* Layers list */ + +div[id^=GPlayersList] { + position: relative; + width: 180px; + border-bottom-right-radius: 0; + opacity: 0; + overflow: auto; + transition: max-height 0.5s ease-out 0s, opacity 0.5s ease-out 0.25s; +} + +div[id^=GPlayerSwitcher-] input[type="checkbox"]:checked + div[id^=GPlayersList] { + max-height: 232px; + opacity: 1; + transition: max-height 0.5s ease-in 0s, opacity 0.25s ease-in 0s; +} + +/* Layer : general */ + +.GPlayerSwitcher_layer { + position: relative; + top: 0; + background-color: #FFF; + border-bottom: 1px dotted #CCC; + overflow: hidden; +} + +div[id^=GPlayersList] .GPlayerSwitcher_layer:last-child { + border-bottom: none; +} + +.GPlayerBasicTools, +.GPlayerAdvancedTools { + position: relative; + width: 100%; + height: 28px; +} + +.GPlayerVisibility, +.GPlayerInfo, +.GPlayerInfoOpened, +.GPlayerRemove { + width: 28px; + height: 28px; + cursor: pointer; +} + +.GPlayerVisibility, +.GPlayerName, +.GPlayerInfo, +.GPlayerInfoOpened, +.GPlayerRemove, +.GPlayerOpacity, +.GPlayerOpacityValue { + position: absolute; + top: 0; +} + +.GPghostLayer { + opacity: 0; +} + +/* Layer basic tools */ + +.GPlayerBasicTools { + background-color: #FFF; +} + +.GPlayerVisibility { + left: 0; + background-position: -28px 0; +} + +input[type="checkbox"]:checked + .GPlayerVisibility { + background-position: 0 0; +} + +.GPlayerName { + left: 28px; + width: calc(100% - 56px); + line-height: 28px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + padding-left: 4px; + cursor: move; +} + +.outOfRange .GPlayerName { + color: #AAA; +} + +/* Showing layer advanced tools */ + +.GPshowLayerAdvancedTools { + top: 0; + right: 0; + background-position: -112px 0; +} + +.GPlayerAdvancedTools { + display: block; + max-height: 0; + opacity: 0; + transition: max-height 0.5s ease-out 0s, opacity 0.5s ease-out 0s; +} + +div[id^=GPlayerSwitcher-] input[type="checkbox"]:checked + label + .GPlayerAdvancedTools { + max-height: 28px; + opacity: 1; +} + +/* Layer advanced tools */ + +.GPlayerInfo { + left: 0; + background-position: -55px 0; +} + +.GPlayerInfoOpened { + left: 0; + background-position: -83px 0; +} + +.GPlayerOpacity { + left: 28px; + width: calc(100% - 100px); + height: 28px; + padding-left: 8px; +} + +.GPlayerOpacityValue { + width: 32px; + left: calc(100% - 60px); + line-height: 28px; + font-size: 10px; + font-style: italic; + cursor: default; +} + +.GPlayerRemove { + right: 0; + background-position: -140px 0; +} + +/* Opacity slider : general */ + +.GPlayerOpacity input { + -webkit-appearance: none; + -moz-appearance: none; + background: none; + display: block; + width: 100%; + height: 100%; + margin: 0; + padding: 0; + overflow: hidden; + cursor: pointer; +} + +.GPlayerOpacity input[type="range"]:focus { + box-shadow: none; + outline: none; +} + +/* Opacity slider : Chrome, Safari, Opera */ + +.GPlayerOpacity input[type="range"]::-webkit-slider-runnable-track { + -webkit-appearance: none; + height: 3px; +} + +.GPlayerOpacity input[type="range"]::-webkit-slider-thumb:before { + position: absolute; + top: 0; + right: 50%; + left: -200px; + height: 3px; + pointer-events: none; +} + +.GPlayerOpacity input[type="range"]::-webkit-slider-thumb { + width: 9px; + height: 17px; + -webkit-appearance: none; + border: 2px solid #FFF; + background-color: #505050; + position: relative; + top: -7px; +} + +/* Opacity slider : Firefox */ + +.GPlayerOpacity input[type="range"]::-moz-range-track { + width: 80px; + height: 3px; +} + +.GPlayerOpacity input[type="range"]::-moz-range-thumb { + width: 5px; + height: 13px; + border: 2px solid #FFF; + border-radius: 0; + box-shadow: 0; + background-color: #505050; + position: relative; +} + +/* Opacity slider : IE */ + +.GPlayerOpacity input[type="range"]::-ms-track { + border: 0; + border-color: transparent; + border-radius: 0; + border-width: 0; + color: transparent; + height: 3px; + width: 80px; +} + +.GPlayerOpacity input[type="range"]::-ms-fill-lower, +.GPlayerOpacity input[type="range"]::-ms-fill-upper { + background: transparent; + border-radius: 0; +} + +.GPlayerOpacity input[type="range"]::-ms-thumb { + width: 5px; + height: 13px; + border: 2px solid #FFF; + background-color: #505050; +} + +.GPlayerOpacity input[type="range"]::-ms-tooltip { + display: none; +} + +/* Layer info panel */ + +div[id^=GPlayerInfoPanel] { + position: absolute; + top: 0; + overflow-y: hidden; + padding-top: 10px; + padding-bottom: 10px; +} + +.GPlayerInfoPanelOpened { + display: block; +} + +.GPlayerInfoPanelClosed { + display: none; +} + +div[id^=GPlayerInfoContent] { + position: relative; + width: 280px; + max-height: 200px; + overflow-y: auto; + padding-left: 10px; + padding-right: 10px; +} + +div[id^=GPlayerInfoTitle] { + width: calc(100% - 52px); + margin: auto; + margin-bottom: 10px; + padding-bottom: 5px; + text-align: center; + font-size: 1.1em; + font-weight: bold; +} + +div[id^=GPlayerInfoQuicklook] { + position: absolute; + top: -2px; + left: 10px; + width: 20px; + height: 20px; + cursor: pointer; +} + +div[id^=GPlayerInfoClose] { + position: absolute; + top: -8px; + right: 10px; + width: 28px; + height: 28px; + cursor: pointer; +} + +div[id^=GPlayerInfoDescription] { + font-size: 0.9em; +} + +div[id^=GPlayerInfoLegend] { + +} + +div[id^=GPlayerInfoMetadata] { + +} + +.GPlayerInfoSubtitle { + padding-left: 35px; + font-weight: bold; + margin-top: 10px; + margin-bottom: 4px; +} + +.GPlayerInfoLink, +.GPlayerInfoPopup { + line-height: 20px; + padding-left: 23px; + white-space: nowrap; + overflow-x: hidden; + text-overflow: ellipsis; + color: #999999; + background-repeat: no-repeat; + cursor: pointer; +} + +.GPlayerInfoLink { + background-position: 0 -20px; +} + +.GPlayerInfoLink:hover, +.GPlayerInfoPopup:hover { + color: #333; +} + +.GPlayerInfoLink a, +.GPlayerInfoLink a:visited +.GPlayerInfoLink a:focus +.GPlayerInfoLink a:hover { + text-decoration: none; + color: inherit; +} + +/* Location */ + +/* Location form */ + +.GPlocationStageFlexInput { + max-height: 28px; + opacity: 1; +} + +.GPlocationStageFlexInputHidden { + max-height: 0; + opacity: 0; + overflow: hidden; +} + +.GPlocationOriginVisible { + display: block; +} + +.GPlocationOriginHidden { + display: none; +} + +label.GPlocationOriginPointerImg[id*="GPlocationOriginPointerImg"] { + width: 28px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-right: 1px solid #999; +} + +input[id*="GPlocationOriginPointer"] + .GPlocationOriginPointerImg { + background-position: -1px -1px; +} + +input[id*="GPlocationOriginPointer"]:checked + .GPlocationOriginPointerImg { + background-position: -29px -1px; +} + +.GPlocationStageRemove, +div[id^=GPlocationStageAdd] { + width: 28px; + border: none; + cursor: pointer; +} + +.GPlocationStageRemove { + background-position: -84px 0; +} + +div[id^=GPlocationStageAdd] { + background-position: -56px 0; +} + +/* Showing/hiding drawing panel */ + +label[id^=GPshowMeasureAreaPicto-] { + display: inline-block; +} + +input[id^=GPshowMeasureArea-] + label { + display: block; +} + +input[id^=GPshowMeasureArea-]:checked + label { + display: block; + background-color: rgba(0,60,136,0.5); +} + +input[id^=GPshowMeasureArea-] + label + div { + display: block; +} + +input[id^=GPshowMeasureArea-]:checked + label + div { + display: block; +} + +/* Showing/hiding drawing panel */ + +label[id^=GPshowMeasureAzimuthPicto-] { + display: inline-block; +} + +input[id^=GPshowMeasureAzimuth-] + label { + display: block; +} + +input[id^=GPshowMeasureAzimuth-]:checked + label { + display: block; + background-color: rgba(0,60,136,0.5); +} + +input[id^=GPshowMeasureAzimuth-] + label + div { + display: block; +} + +input[id^=GPshowMeasureAzimuth-]:checked + label + div { + display: block; +} + +/* Showing/hiding drawing panel */ + +label[id^=GPshowMeasureLengthPicto-] { + display: inline-block; +} + +input[id^=GPshowMeasureLength-] + label { + display: block; +} + +input[id^=GPshowMeasureLength-]:checked + label { + display: block; + background-color: rgba(0,60,136,0.5); +} + +input[id^=GPshowMeasureLength-] + label + div { + display: block; +} + +input[id^=GPshowMeasureLength-]:checked + label + div { + display: block; +} + +/* MEASURE TOOL */ + +.GPmeasureTooltip { + position: relative; + background: rgba(0, 0, 0, 0.5); + border-radius: 4px; + color: white; + padding: 4px 8px; + white-space: nowrap; +} + +.GPmeasureTooltip-measure { + font-weight: bold; +} + +.GPmeasureTooltip-info { + font-size: 0.75em; + text-align: center; +} + +.GPmeasureTooltip-static { + background-color: #ffcc33; + color: black; + border: 1px solid white; +} + +.GPmeasureTooltip-hidden { + display: none; +} + +.GPmeasureTooltip-measure::before, +.GPmeasureTooltip-info::before, +.GPmeasureTooltip-static::before { + border-top: 6px solid rgba(0, 0, 0, 0.5); + border-right: 6px solid transparent; + border-left: 6px solid transparent; + content: ""; + position: absolute; + bottom: -6px; + margin-left: -7px; + left: 50%; +} + +.GPmeasureTooltip-static::before { + border-top-color: #ffcc33; +} + +/* MOUSE POSITION */ + +/* Showing/hiding mouse position panel */ + +label[id^=GPshowMousePositionPicto] { + display: inline-block; +} + +input[id^=GPshowMousePosition-] + label { + display: block; +} + +input[id^=GPshowMousePosition-]:checked + label { + display: none; +} + +input[id^=GPshowMousePosition-] + label + div { + display: none; +} + +input[id^=GPshowMousePosition-]:checked + label + div { + display: block; +} + +/* General panels */ + +div[id^=GPmousePositionPanel-] { + width: 300px; + overflow: hidden; +} + +/* Basic infos */ + +div[id^=GPmousePositionBasicPanel] { + padding: 10px 15px; + position: relative; +} + +.GPmousePositionLabel, +.GPmousePositionCoords { + display: inline-block; + line-height: 20px; +} + +.GPmousePositionLabel { + width: 80px; + font-weight: bold; +} + +.GPmousePositionCoords { + width: 110px; +} + +/* Showing settings */ + +.GPshowMousePositionSettingsPicto { + bottom: 5px; + right: 0; + transition: all 0.5s ease-out 0s; +} + +div[id^=GPmousePosition-] input[type="checkbox"]:checked + .GPshowMousePositionSettingsPicto { + bottom: 100px; +} + +div[id^=GPmousePositionSettings-] { + display: block; + max-height: 0; + opacity: 0; + transition: max-height 0.5s ease-out 0s, opacity 0.5s ease-out 0s; +} + +div[id^=GPmousePosition-] input[type="checkbox"]:checked + label + div[id^=GPmousePositionSettings-] { + max-height: 95px; + opacity: 1; +} + +/* Settings */ + +div[id^=GPmousePositionSettings-] { + height: 95px; + padding-left: 0 15px; + overflow: hidden; +} + +.GPmousePositionSettingsLabel { + display: block; + margin: auto; + text-align: center; + font-weight: bold; + line-height: 16px; +} + +.GPmousePositionSettingsSelect { + width: 180px; + margin-top: 5px; +} + +/* General panels */ + +div[id^=GPmousePositionCoordinate-] input.error { + border: 1px solid rgb(255, 0, 0); +} +div[id^=GPmousePositionCoordinate-] input[readonly] { + border: 1px solid transparent; + padding: 2px; + text-align: right; +} + +input[id^=GPmousePositionLat-], input[id^=GPmousePositionLon-] { + width: 120px; +} + +span[id^=GPmousePositionAlt-] { + display: inline-block; + padding: 2px; + width: 120px; + line-height: 20px; + text-align: right; +} + +/* sexagesimal coordinates */ + +.GPSexagesimal, .GPSexagesimalsec { + margin:0; + border: 1px solid rgb(204, 204, 204); + border-radius: 4px; +} + +input:read-only.GPSexagesimal, input:read-only.GPSexagesimalsec { + text-align: right; +} + +.GPSexagesimal { + width: 30px; +} + +.GPSexagesimalsec { + width: 45px; +} +.GPmousePositionSexagesimalLabel { + font-size: 1.2em; + vertical-align: middle; + padding: 0; +} + +/* direction N/S ou E/O */ +select.GPmousePositionDirection { + border: 1px solid #999; + margin-left: 2px; +} + +select.GPmousePositionDirection:disabled{ + border: none; + background: transparent; + color: black; + /*For FireFox*/ + -webkit-appearance: none; + /*For Chrome*/ + -moz-appearance: none; +} + +/*For IE10+*/ +select.GPmousePositionDirection:disabled::-ms-expand { + display: none; +} +select.GPmousePositionDirection:disabled::-ms-value { + color: black; +} + +.GPmousePositionUnits, +.GPmousePositionAltitudeUnits { + margin-left: 5px; +} + +/* EDIT COORDINATES TOOLS */ +.GPmousePositionPanelEditTools { + position: absolute; + top: 20px; + right: 5px; +} + +.GPmousePositionEditTool { + width: 18px; + height: 18px; + display: inline-block; + cursor: pointer; +} + +span[id^=GPmousePositionCloseEdit] { + background-position: -18px 0; + margin-left: 5px; +} + +img[id^=GPmousePositionMarker]:hover { + cursor: pointer; + opacity: 0.7; +} + +/* Map center localisation */ + +#GPmapCenter { + display: none; + position: absolute; + top: 50%; + left: 50%; + width: 50px; + height: 50px; + margin-top: -25px; + margin-left: -25px; +} + +#GPmapCenter.GPmapCenterVisible { + display: block; +} + +/* REVERSE GEOCODING */ + +[id^="GPreverseGeocoding-"] { + top: 180px; +} + +/* Showing/hiding reverse geocoding panel */ + +[id^="GPshowReverseGeocodingPicto-"] { + display: inline-block; +} + +[id^="GPshowReverseGeocoding-"] + label { + display: block; +} + +[id^="GPshowReverseGeocoding-"]:checked + label { + display: none; +} + +[id^="GPshowReverseGeocoding-"] + label + div { + display: none; +} + +[id^="GPshowReverseGeocoding-"]:checked + label + div { + display: block; +} + +/* General panels */ + +div[id^=GPreverseGeocodingResultsClose] { + top: 0; + right: 0; + width: 30px; + height: 32px; + /*background-position: -26px 0;*/ +} + +[id^="GPreverseGeocodingPanel-"] { + width: 280px; +} + +.GPreverseGeocodingComponentHidden { + display: none; +} + +div[id^="GPreverseGeocodingReturnPicto-"] { + position: absolute; + width: 26px; + height: 26px; + border-radius: 3px; + opacity: 1; + background-position: 0 0; + cursor: pointer; +} + +.GPreverseGeocodingReturnPictoHidden { + display: none; +} + +/* Calc waiting */ + +.GPreverseGeocodingCalcWaitingContainerVisible, +.GPreverseGeocodingCalcWaitingContainerHidden { + position: absolute; + top: 32px; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255,255,255,0.9); + font-size: 1.5em; + font-weight: bold; + overflow: hidden; +} + +.GPreverseGeocodingCalcWaitingContainerVisible { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; +} + +.GPreverseGeocodingCalcWaitingContainerHidden { + display: none; +} + +.GPreverseGeocodingCalcWaiting { + margin: auto; +} + +/* Search panel */ + +[id^="GPreverseGeocodingForm-"] { + position: relative; + max-height: 270px; + overflow-y: auto; + padding-left: 15px; + padding-right: 15px; + padding-top: 10px; +} + +.GPreverseGeocodingCodeLabel, +.GPreverseGeocodingFilterLabel { + max-width: 105px; +} + +.GPreverseGeocodingCodeLabel, +.GPreverseGeocodingCode { + margin-top: 5px; + margin-bottom: 0; +} + +.GPreverseGeocodingFilterLabel, +.GPreverseGeocodingFilterInput { + margin-bottom: 5px; +} + +input[id^="GPreverseGeocodingSubmit-"] { + margin-top: 5px; + margin-bottom: 15px; + width: 100px; +} + +/* Calc waiting */ + +/* TODO: waiting */ +.GPreverseGeocodingCalcWaitingContainerVisible, +.GPreverseGeocodingCalcWaitingContainerHidden { + position: absolute; + top: 32px; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255,255,255,0.9); + font-size: 1.5em; + font-weight: bold; + overflow: hidden; +} + +.GPreverseGeocodingCalcWaitingContainerVisible { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; +} + +.GPreverseGeocodingCalcWaitingContainerHidden { + display: none; +} + +.GPreverseGeocodingCalcWaiting { + margin: auto; +} + +/* Result panel */ + +div[id^=GPreverseGeocodingResultsList-] { + position: relative; + max-height: 210px; + overflow-y: auto; +} + +/* ROUTE */ + +div[id^=GProute-] { + top: 100px; +} + +/* Showing/hiding route panel */ + +label[id^=GPshowRoutePicto] { + display: inline-block; +} + +input[id^=GPshowRoute-] + label { + display: block; +} + +input[id^=GPshowRoute-]:checked + label { + display: none; +} + +input[id^=GPshowRoute-] + label + div { + display: none; +} + +input[id^=GPshowRoute-]:checked + label + div { + display: block; +} + +/* General panels */ + +div[id^=GProutePanel-] { + width: 320px; +} + +.GProuteComponentHidden { + display: none; +} + +/* Calc waiting */ + +.GProuteCalcWaitingContainerVisible, +.GProuteCalcWaitingContainerHidden { + position: absolute; + top: 32px; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255,255,255,0.9); + font-size: 1.5em; + font-weight: bold; + overflow: hidden; +} + +.GProuteCalcWaitingContainerVisible { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; +} + +.GProuteCalcWaitingContainerHidden { + display: none; +} + +.GProuteCalcWaiting { + margin: auto; +} + +/* Route form */ + +form[id^=GProuteForm] { + padding: 15px; +} + +.GProuteFormMini { + max-height: 58px; + overflow: hidden; + -webkit-transform: translateY(-5px); + transform: translateY(-5px); +} + +.GProuteStageFlexInput { + max-height: 28px; + opacity: 1; +} + +.GProuteStageFlexInputHidden { + max-height: 0; + opacity: 0; + overflow: hidden; +} + +form[id^=GProuteForm] > .GPlocationStageFlexInput { + margin-top: 5px; +} + +form[id^=GProuteForm] > .GPlocationStageFlexInputHidden { + margin-top: 0; +} + +form[id^=GProuteForm].GProuteFormMini .GPlocationStageFlexInput:first-child { + margin-top: 5px; +} + +.GProuteOriginVisible { + display: block; +} + +.GProuteOriginHidden { + display: none; +} + +label.GProuteOriginPointerImg[id*="GProuteOriginPointerImg"] { + width: 28px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-right: 1px solid #999; +} + +input[id*="GProuteOriginPointer"] + .GProuteOriginPointerImg { + background-position: -1px -1px; +} + +input[id*="GProuteOriginPointer"]:checked + .GProuteOriginPointerImg { + background-position: -29px -1px; +} + +.GProuteStageRemove, +div[id^=GProuteStageAdd] { + width: 28px; + border: none; + cursor: pointer; +} + +.GProuteFormMini .GProuteStageRemove, +.GProuteFormMini div[id^=GProuteStageAdd] { + display: none; +} + +.GProuteStageRemove { + background-position: -84px 0; +} + +div[id^=GProuteStageAdd] { + background-position: -56px 0; +} + +/* Mode choice */ + +div[id^=GProuteModeChoice] { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; + -webkit-justify-content: space-around; + -ms-flex-pack: distribute; + justify-content: space-around; + margin: 15px 0; +} + +.GProuteModeLabel { + display: block; + text-align: center; + margin-bottom: 5px; +} + +div[id^=GProuteTransportChoice] input { + display: none; +} + +.GProuteTransportImg { + display: inline-block; + width: 28px; + height: 28px; + cursor: pointer; +} + +.GProuteTransportImg:first-of-type { + margin-left: 18px; + margin-right: 10px; +} + +input[id^=GProuteTransportCar] + .GProuteTransportImg { + background-position: -112px 0; +} + +input[id^=GProuteTransportCar]:checked + .GProuteTransportImg { + background-position: -140px 0; +} + +input[id^=GProuteTransportPedestrian] + .GProuteTransportImg { + background-position: -168px 0; +} + +input[id^=GProuteTransportPedestrian]:checked + .GProuteTransportImg { + background-position: -196px 0; +} + +select[id^=GProuteComputationSelect] { + width: 100px; +} + +/* Showing/hiding exclusions */ + +input[id^=GPshowRouteExclusions] { + display: none; +} + +.GPshowRouteExclusionsPicto { + /* top: 185px; */ + /* bottom: 25px; */ + right: 0; + transition: all 0.3s ease-out 0s; +} + +input[id^=GPshowRouteExclusions] + label + div[id^=GProuteExclusions] { + max-height: 0; + opacity: 0; + margin-bottom: 0; +} + +input[id^=GPshowRouteExclusions]:checked + label + div[id^=GProuteExclusions] { + display: block; + max-height: 60px; + opacity: 1; + margin-bottom: 15px; +} + +/* Exclusions */ + +div[id^=GProuteExclusions] { + transition: max-height 0.5s ease-in-out 0.25s, opacity 0.5s ease-in-out 0.25s, margin 0.3s ease-in-out 0.25s; + overflow: hidden; +} + +.GProuteExclusionsLabel { + display: block; + text-align: center; + margin-bottom: 10px; + font-weight: bold; + line-height: 16px; +} + +.GProuteExclusionsOptions { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; + -webkit-justify-content: space-around; + -ms-flex-pack: distribute; + justify-content: space-around; +} + +.GProuteExclusionsOption { + display: block; + height: 28px; + line-height: 26px; + color: #A77; + background-color: #FEE; + padding-left: 28px; + padding-right: 5px; + border: 1px solid #A77; + border-radius: 3px; + cursor: pointer; +} + +input:checked + .GProuteExclusionsOption { + background-color: #EFE; + background-position: 0 -28px; + color: #797; + border: 1px solid #797; +} + +/* Reset picto */ +div[id^=GProuteReset] { + position: absolute; + width: 28px; + height: 28px; + border-radius: 3px; + opacity: 0.8; + background-position: -224px 0; + transition: opacity 0.2s ease-out; + cursor: pointer; +} + +div[id^=GProuteReset]:hover { + opacity: 1; +} + +/* Result panel */ + +div[id^=GProuteResultsPanel] { + padding: 15px; +} + +.GProuteResultStage { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; +} + +div[id^=GProuteResultsStages] { + margin-bottom: 15px; +} + +.GProuteResultStageLabel, +.GProuteResultStageValue, +.GProuteResultsValueLabel, +div[id^=GProuteResultsValueDist], +div[id^=GProuteResultsValueTime] { + display: inline-block; + line-height: 18px; +} + +.GProuteResultStageLabel, +.GProuteResultsValueLabel { + color: #666; +} + +.GProuteResultStageLabel { + width: 60px; +} + +.GProuteResultsValueLabel { + width: 65px; +} + +.GProuteResultStageValue { + -webkit-flex: 1; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + overflow-x: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +div[id^=GProuteResultsValueDist], +div[id^=GProuteResultsValueTime] { + width: 80px; + font-weight: bold; +} + +div[id^=GProuteResults-] { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; + -webkit-justify-content: space-between; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + margin-bottom: 10px; +} + +select[id^=GProuteResultsComputationSelect] { + width: 100px; +} + +div[id^=GProuteResultsNew] { + width: 28px; + height: 28px; + border-radius: 3px; + opacity: 0.8; + background-position: -224px 0; + transition: opacity 0.2s ease-out; + cursor: pointer; +} + +div[id^=GProuteResultsNew]:hover { + opacity: 1; +} + +/* Results details header */ + +.GPfakeBorder { + display: inline-block; + height: 14px; + width: 60px; + border-bottom: 1px solid #999; +} + +.GPfakeBorderLeft { + margin-left:15px; +} + +input[id^=GProuteResultsShowDetails] + label, +input[id^=GProuteResultsShowDetails] + label + label { + width: 130px; + line-height: 28px; + vertical-align: top; + text-align: center; + font-weight: bold; + cursor: pointer; + transition: color 0.2s ease-out; +} + +input[id^=GProuteResultsShowDetails] + label, +input[id^=GProuteResultsShowDetails]:checked + label + label { + display: inline-block; +} + +input[id^=GProuteResultsShowDetails]:checked + label, +input[id^=GProuteResultsShowDetails] + label + label { + display: none; +} + +input[id^=GProuteResultsShowDetails] + label + label + div + div[id^=GProuteResultsDetails] { + max-height: 0; + opacity: 0; +} + +input[id^=GProuteResultsShowDetails]:checked + label + label + div + div[id^=GProuteResultsDetails] { + max-height: 200px; + opacity: 1; +} + +div[id^=GProuteResultsDetails] { + overflow-y: auto; + transition: max-height 0.5s ease-in-out 0.25s, opacity 0.5s ease-in-out 0.25s; +} + +.GProuteResultsDetailsNumber, +.GProuteResultsDetailsInstruction { + display: inline-block; + margin-top: 4px; + line-height: 16px; + color: #666; +} + +.GProuteResultsDetailsNumber { + font-weight: bold; + width: 22px; + text-align: right; + vertical-align: top; +} + +.GProuteResultsDetailsInstruction { + width: calc(100% - 30px); + padding-left: 5px; +} + +/* SEARCH ENGINE */ + +input[id^=GPshowSearchEngine-] + label + form[id^=GPsearchInput-] { + max-width: 0px; +} + +/* Showing/hiding search engine input */ + +input[id^=GPshowSearchEngine-] { + display: none; +} + +label[id^=GPshowSearchEnginePicto] { + display: inline-block; + transition: border-radius 0s ease-out 0s; + transition-delay: 0.5s; +} + +input[id^=GPshowSearchEngine-]:checked + label { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + transition-delay: 0s; +} + +input[id^=GPshowSearchEngine-] + label + form[id^=GPsearchInput-] { + max-width: 0px; + border: none; + transition: max-width 0.5s ease-out 0s; +} + +input[id^=GPshowSearchEngine-]:checked + label + form[id^=GPsearchInput-] { + max-width: 280px; +} + +input[id^=GPshowSearchEngine-] + label + form[id^=GPsearchInput-] + div[id^=GPshowAdvancedSearch] { + display: none; +} + +input[id^=GPshowSearchEngine-]:checked + label + form[id^=GPsearchInput-] + div[id^=GPshowAdvancedSearch] { + display: inline-block; +} + +div[id^=GPautoCompleteList] { + display: none; +} + +input[id^=GPshowSearchEngine-]:checked + label + form[id^=GPsearchInput-] + div[id^=GPautoCompleteList] { + display: block; +} + +/* Simple search input */ + +form[id^=GPsearchInput-] { + display: inline-block; + position: relative; + left: -3px; + width: 280px; + overflow: hidden; +} + +form[id^=GPsearchInput-] input { + display: block; + width: 100%; + height: 100%; + border: 1px solid #999; + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + padding: 0; + padding-right: 30px; + padding-left: 5px; + color: #333; + font-size: 1.0em; +} + +form[id^=GPsearchInput-] input:disabled { + background-color: #DDD; + color: #999; +} + +div[id^=GPsearchInputReset] { + position: absolute; + top: 0; + right: 0; + width: 30px; + height: 32px; + background-position: -30px 0; + cursor: pointer; +} + +/* General panels */ + +div[id^=GPgeocodeResultsClose], +div[id^=GPadvancedSearchClose] { + top: 0; + right: 0; + width: 30px; + height: 32px; +} + +div[id^=GPgeocodeResultsClose] { + background-position: 0 0; +} + +div[id^=GPadvancedSearchClose] { + background-repeat: no-repeat; +} + +/* Advanced search picto */ + +div[id^=GPshowAdvancedSearch] { + transition: border-radius 0s ease-out 0s; + transition-delay: 0.5s; +} + +/* Advanced search panel */ + +div[id^=GPadvancedSearchPanel] { + display: none; + width: 280px; + vertical-align: top; + overflow: hidden; +} + +form[id^=GPadvancedSearchForm] { + max-height: 220px; + overflow-y: auto; + padding-left: 15px; + padding-right: 15px; +} + +.GPadvancedSearchCodeLabel, +.GPadvancedSearchFilterLabel { + max-width: 105px; +} + +.GPadvancedSearchCodeLabel, +.GPadvancedSearchCode, + div[id^=GPadvancedSearchFilters] { + margin-top: 15px; +} + +.GPadvancedSearchFilterLabel, +.GPadvancedSearchFilterInput { + margin-bottom: 5px; +} + +input[id^=GPadvancedSearchSubmit] { + margin-top: 10px; + margin-bottom: 15px; +} + +/* Autocomplete list / geocode results */ + +div[id^=GPautoCompleteList], +div[id^=GPgeocodeResultsList] { + width: 280px; +} + +div[id^=GPautoCompleteList] { + top: 35px; +} + +div[id^=GPgeocodeResultsList] { + display: none; + position: absolute; + top: 40px; + border-radius: 4px; + overflow: hidden; +} + +div[id^=GPgeocodeResults-] { + background-color: #FFF; + max-height: 140px; + overflow-y: auto; +} + +/** +* Map loading +* @sample +* function setMap(map) { +* var center = this._createLoadingElement(); +* map.getViewport().appendChild(center); +* center.className = ""; // invisible ! +* center.className = "GPmapLoadingVisible"; // visible ! +* } +* +* function _createLoadingElement() { +* var div = document.createElement("div"); +* div.id = "GPmapLoading"; +* div.className = ""; +* return div; +* } +*/ + +#GPmapLoading { + display: none; + position: absolute; + z-index: 50; + top: 50%; + left: 50%; + width: 50px; + height: 50px; + margin-top: -25px; + margin-left: -25px; +} + +#GPmapLoading.GPmapLoadingVisible { + display: block; +} + +#GPmapLoading { + background-image: url(data:image/gif;base64,R0lGODlhNAA0AIQSAAFkpSZ5sAGV3k2Ruiao3kOj1/GUBk225pe/B4S83XrK75HH3qrS5szMzNbW1sHe797e3ubm5v///////////////////////////////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFAQAfACwAAAAANAA0AAAF5uAnjmRpnmiqrmzrvnAsz3T9FXhh72Ke8zWfDzgT/ogxIw55cjgiJ6XOhKjaII1sNio8Vb8ImnbMXVLBVhl2vI2hvzIHOwt9veGxyLwhu4dlcw59bzVjgjNoPHU2f0yOj5CRkpMocg2HjwaaBitzmZuaKWuGTKCgKHt8SKabqHulrJwno1qYQLGyJ56OrCuWtrChlMPExcbHH4s1ymK1NJZtM4Fxu3mvMXvMLdBj2ip60zG0WoBzENLVJL+66TDj7GQmbOc1EE9N4SURDvSRqcgj/gH8wC0LsGPtAK7pN7Chw4cQSYQAACH5BAUBAB8ALBYABAAaACcAAAVw4PdBTQOJaKquX+k2bJw6b+nIcu3isV7yLFrttioYczWWcVmICYkq5hKolB6pKOsUm9Vyu9JvKiyOls/otHqNQ7gR6ff7LJeX63Mx3n3f0+txeWyDhIVlBmsGiopoi45njo9fkZKTlIhil42RaYsxIQAh+QQFAQAfACwWAAkAGgAnAAAFdOAnjmQZOVCprmTjuikrf289y/Ub32SUuw6e6teICEuO31GVfC1Zxqd0Sq1arYVsAavNUrvdKVgrHm+l5jMazPVe3/C4/IN4I+73Kn5P3fOffn+AgXUqBocGK4QriIiKfoaNjip4LJKTT5eHU5qJnJJWjVUhACH5BAUBAB8ALAkAFgAnABoAAAV04CeOZGmepdM0Duq+5yo3cO2qcwPZPJnLveBvFezhZrsi76cM4lrNqHRKrVpPhmoBZuh2o4VwGOUtK8VoU9lcRKdJazbP/R7Fv236tnQ/If4IJ3pYa36Af4JuLl6Gh4gmYlKOgFclk4+VIpeBmSOTnZaUTSEAIfkEBQEAHwAsBAAWACcAGgAABXfg9xmkIZ5oqq5rWbJwnLqubLP0e+9nTvJAnwnIyxGJtaNyyWw6n1Ao4hmRIa7XpaPBbbCw4OO2y1WBw0Ryt4o6o3cRNdeRcmfTcojZvSr4CytyXntvKH9/gWR6X3cph4crEQ6LSo+IUYaWgJgnmpucIpagjpc3IQAh+QQFAQAfACwEAAkAGgAnAAAFb+AnjqJhkmiamqyhvmjLwrA806p946Tu8isbMNca1ozIpHLJTCKeiCYUupxOlVaqMxvdZqtWqbZJLpvPyEK5wGYz23AlPJ6c0412t9yucjQaDi98KX+FDTBtfYZ/gUmLhUqPf0p+i42Oi00QfxAiIQAh+QQFAQAfACwEAAQAGgAnAAAFc+AnjmRZGqhhrmyasrDounE7o/V64yvi6zuTb4gA0oTEn+lYSg5zSGcROpJOqVUntknc9rzgsHhMLhXOhTEaHV6vwW62N36G09tutbzM7/v/JhFlDYQNDmKFhYdeEYmFYA6OhIJbEJINYZdhlolkEA6UUCEAIfkEAQEAHwAsBAAEACcAGgAABXXgJ45kWSIoYq5sS6apK8swPN9mHeP8p6O9UmG4+qlMhmRryCwUa6uk1LBqMp9A5FQptBKDW2nX6+SFxSRyuXemjpvBz5lljYu2srX9vu/7/4CBgh8NhQ6DK4WKDYgkEIuGjSKQipKElIySj5CHlpSWIw6RoCEAOw==); +} + + +.GPwidget { + position: relative; /* overwritten */ +} + + +#GPadvancedToolsPanel { + position: initial; /* overwritten */ +} + +/* General panels */ + +.GPpanel { + box-shadow: 0 1px 6px #000; + border-radius: 5px; +} + +.GPpanelHeader { + height: 32px; + background-color: #FFF; + border-top-left-radius: 5px; + border-top-right-radius: 5px; +} + +.GPpanelTitle { + width: calc(100% - 60px); + margin: auto; + line-height: 32px; + color: #C77A04; + border-bottom: 1px solid #C77A04; +} + +.GPpanelClose { + top: 0; + right: 0; + width: 30px; + height: 32px; + background-position: -30px 1px; +} + +.GPpanelReduce { + top: 0; + right: 30px; + width: 30px; + height: 32px; + background-position: -60px 1px; +} + +.GPpanelInfo { + top: 0; + left: 0px; + width: 30px; + height: 32px; + background-position: -90px 1px; +} + +/* Showing/hiding advanced panel */ + +.GPshowAdvancedToolPicto { + width: 30px; + height: 30px; + box-shadow: 0 1px 6px #000; + background-color: #FFF; + border-radius: 5px; +} + +.GPshowAdvancedToolPicto:hover { + background-color: #F4F4F4; +} + +.GPshowAdvancedToolOpen { + width: 100%; + height: 100%; +} + +/* Submit inputs */ + +input.GPinputSubmit { + background-color: #C77A04; +} + +/* Showing additional hidden options */ + +.GPshowMoreOptionsImage { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAA7klEQVRIx+3UsUtCURTH8e/x3eciSAhC/QnRGIQPHPoTHPJfyLEpyFqcXkGT/0HQ4uBQs4s4VAiO0b/QJKIIcn333QYVnErIt53PeO7hnnv4wQWllMqa7NL0fmu+wPeLeXd10sJun322yE9t0AY5j+Lk+K+7cjs+rAPSmFnTGzQpb4qDJuWZNT2QxqpnTxsCvN0FdfHyBIwllVoaihXnXkGOxPvLyr173utAgI+b8NTn/AtwsC5NJJVa5WE5yizD+ZySC00XIFgmF4UC40wzXBhcFCfVKE6qC4PTDP81EGB4zeF2hmePfOt3ppT61Q8G2258CD5NRAAAAABJRU5ErkJggg==); +} + +div[id^=GPelevationPath-] { + top: 0; /*overwritten*/ +} + +/* Showing/hiding elevationPath panel */ + +label[id^=GPshowElevationPathPicto] { + display: inline-block; +} + +input[id^=GPshowElevationPath-] + label { + display: block; +} + +input[id^=GPshowElevationPath-]:checked + label { + /* display: none; */ +} + +input[id^=GPshowElevationPath-] + label + div { + display: none; +} + +input[id^=GPshowElevationPath-]:checked + label + div { + display: block; +} + +span[id^=GPshowElevationPathOpen] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAeCAYAAADnydqVAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAOwwAADsMBx2+oZAAAA4VJREFUaN7tmEFv3EQUx3/PHkdIFT3RIk4gAZVAHIrEwUslJM7tsfABQlBLk+ZuL0K+ZPfOpgpRmg+AhLhQPgBFja1euCAObXqlatUL4oDqXe/jkHXj7jqNvesmWZj/xdbYY83Mz/837w1YWVlZWVlZWVk1LjnshTg0Ot7W6gzELt0cqwxq3n7QM6s5cXARYNGpefuL3FvlHaujlXNQ+K0L96VEksD7cid0NzWaHGcuBYkDt7fT9lYszkmZquG6DG4cGs3bi84vts8CF9HvBHGS1HU0yq5IxHACbuj2BFkWVd1pe3y81l+fdyh3Is46qVkVuKjw7ijW3gN+HnqD3oWIx1M7+EWgi3vw+LX5zWN4fn98spSk7roWthQFSUL3hiDLeQ/R4XvzDnen7X7mpGYXaCucB04Bp1A+RPnaSc1uEriXZ8qiqziwCthZXKwgSeB+i0gh9OpNfyG7QoTmzt2fiW75XnZ13OXzBldUvq9Q3aiofu53sx8ac3BduA1kf+p3s1VUCyFXlu6m7mYSuuv/Nbh3Is6KyvY4XH+tj7/Wn1geFdm+HXCmccBHWSaVQc6QJZBrxwU3Do3EoSkmoDL23IlD80rtbDc1q8CrNbqcNmKuz5xknYA6TrWbrd4NXDKRledjl95sCm4cmgj4FHiz4vsAT4GncWj+Ae4Dv7Y6g804NP0pJnqJEuskbe/gLsIl4JvGAB/nIUcmiExu1NKEI1udQT6vT6b4RDq6vg/sju7r/3DK22XNeXguBa2805iDjwtusRQq+YW/SFJXy0qoqirABfgFeKvmJxZG1z8LIVv2hl53qtMsTwOATxRc0S0ZkqrkbbKUpC7TQs4d3OoMosJ+emgW2+oMNA7NG8DrwGvAE+DR6IepvV4CD0ZlUZ1ODxo76DgpcH0vu0qEJoGr+yXU9JCLDi7ca8W+D4GHjcxXuIXWAyzw00xZ9HHuuROlELrhr+0BfJZdoxvFEipJ3d68lklDb9AD/q7R5S+z16f5Ovho5Pz2LFkR3fIXshUpOEtA/U62XCihVHH+mFfAFyIei+riePRI2l5ZgqWoLn4U8eSlnWQdSc0ZeF8hww/8zvNwJ068QncddX5vdfsbzLmSwL2sItvA6YOci+piq5v9WDGMn1zA/1fdDjhjxFwXuAicGzXfE+GW8Qa9Ks49FHATA7U/iZWVlZWVlZWVlZXV/OlfogGsuXT788cAAAAASUVORK5CYII=); +} + + +/* Panel */ + +[id^=GPelevationPathPanelClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAeCAYAAADnydqVAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAOwwAADsMBx2+oZAAAA4VJREFUaN7tmEFv3EQUx3/PHkdIFT3RIk4gAZVAHIrEwUslJM7tsfABQlBLk+ZuL0K+ZPfOpgpRmg+AhLhQPgBFja1euCAObXqlatUL4oDqXe/jkHXj7jqNvesmWZj/xdbYY83Mz/837w1YWVlZWVlZWVk1LjnshTg0Ot7W6gzELt0cqwxq3n7QM6s5cXARYNGpefuL3FvlHaujlXNQ+K0L96VEksD7cid0NzWaHGcuBYkDt7fT9lYszkmZquG6DG4cGs3bi84vts8CF9HvBHGS1HU0yq5IxHACbuj2BFkWVd1pe3y81l+fdyh3Is46qVkVuKjw7ijW3gN+HnqD3oWIx1M7+EWgi3vw+LX5zWN4fn98spSk7roWthQFSUL3hiDLeQ/R4XvzDnen7X7mpGYXaCucB04Bp1A+RPnaSc1uEriXZ8qiqziwCthZXKwgSeB+i0gh9OpNfyG7QoTmzt2fiW75XnZ13OXzBldUvq9Q3aiofu53sx8ac3BduA1kf+p3s1VUCyFXlu6m7mYSuuv/Nbh3Is6KyvY4XH+tj7/Wn1geFdm+HXCmccBHWSaVQc6QJZBrxwU3Do3EoSkmoDL23IlD80rtbDc1q8CrNbqcNmKuz5xknYA6TrWbrd4NXDKRledjl95sCm4cmgj4FHiz4vsAT4GncWj+Ae4Dv7Y6g804NP0pJnqJEuskbe/gLsIl4JvGAB/nIUcmiExu1NKEI1udQT6vT6b4RDq6vg/sju7r/3DK22XNeXguBa2805iDjwtusRQq+YW/SFJXy0qoqirABfgFeKvmJxZG1z8LIVv2hl53qtMsTwOATxRc0S0ZkqrkbbKUpC7TQs4d3OoMosJ+emgW2+oMNA7NG8DrwGvAE+DR6IepvV4CD0ZlUZ1ODxo76DgpcH0vu0qEJoGr+yXU9JCLDi7ca8W+D4GHjcxXuIXWAyzw00xZ9HHuuROlELrhr+0BfJZdoxvFEipJ3d68lklDb9AD/q7R5S+z16f5Ovho5Pz2LFkR3fIXshUpOEtA/U62XCihVHH+mFfAFyIei+riePRI2l5ZgqWoLn4U8eSlnWQdSc0ZeF8hww/8zvNwJ068QncddX5vdfsbzLmSwL2sItvA6YOci+piq5v9WDGMn1zA/1fdDjhjxFwXuAicGzXfE+GW8Qa9Ks49FHATA7U/iZWVlZWVlZWVlZXV/OlfogGsuXT788cAAAAASUVORK5CYII=); +} + +div[id^=GPelevationPathPanelReduce] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAeCAYAAADnydqVAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAOwwAADsMBx2+oZAAAA4VJREFUaN7tmEFv3EQUx3/PHkdIFT3RIk4gAZVAHIrEwUslJM7tsfABQlBLk+ZuL0K+ZPfOpgpRmg+AhLhQPgBFja1euCAObXqlatUL4oDqXe/jkHXj7jqNvesmWZj/xdbYY83Mz/837w1YWVlZWVlZWVk1LjnshTg0Ot7W6gzELt0cqwxq3n7QM6s5cXARYNGpefuL3FvlHaujlXNQ+K0L96VEksD7cid0NzWaHGcuBYkDt7fT9lYszkmZquG6DG4cGs3bi84vts8CF9HvBHGS1HU0yq5IxHACbuj2BFkWVd1pe3y81l+fdyh3Is46qVkVuKjw7ijW3gN+HnqD3oWIx1M7+EWgi3vw+LX5zWN4fn98spSk7roWthQFSUL3hiDLeQ/R4XvzDnen7X7mpGYXaCucB04Bp1A+RPnaSc1uEriXZ8qiqziwCthZXKwgSeB+i0gh9OpNfyG7QoTmzt2fiW75XnZ13OXzBldUvq9Q3aiofu53sx8ac3BduA1kf+p3s1VUCyFXlu6m7mYSuuv/Nbh3Is6KyvY4XH+tj7/Wn1geFdm+HXCmccBHWSaVQc6QJZBrxwU3Do3EoSkmoDL23IlD80rtbDc1q8CrNbqcNmKuz5xknYA6TrWbrd4NXDKRledjl95sCm4cmgj4FHiz4vsAT4GncWj+Ae4Dv7Y6g804NP0pJnqJEuskbe/gLsIl4JvGAB/nIUcmiExu1NKEI1udQT6vT6b4RDq6vg/sju7r/3DK22XNeXguBa2805iDjwtusRQq+YW/SFJXy0qoqirABfgFeKvmJxZG1z8LIVv2hl53qtMsTwOATxRc0S0ZkqrkbbKUpC7TQs4d3OoMosJ+emgW2+oMNA7NG8DrwGvAE+DR6IepvV4CD0ZlUZ1ODxo76DgpcH0vu0qEJoGr+yXU9JCLDi7ca8W+D4GHjcxXuIXWAyzw00xZ9HHuuROlELrhr+0BfJZdoxvFEipJ3d68lklDb9AD/q7R5S+z16f5Ovho5Pz2LFkR3fIXshUpOEtA/U62XCihVHH+mFfAFyIei+riePRI2l5ZgqWoLn4U8eSlnWQdSc0ZeF8hww/8zvNwJ068QncddX5vdfsbzLmSwL2sItvA6YOci+piq5v9WDGMn1zA/1fdDjhjxFwXuAicGzXfE+GW8Qa9Ks49FHATA7U/iZWVlZWVlZWVlZXV/OlfogGsuXT788cAAAAASUVORK5CYII=); +} + +div[id^=GPelevationPathPanelInfo] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAeCAYAAADnydqVAAAABGdBTUEAALGPC/xhBQAAAAZi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U62XCihVHH+mFfAFyIei+riePRI2l5ZgqWoLn4U8eSlnWQdSc0ZeF8hww/8zvNwJ068QncddX5vdfsbzLmSwL2sItvA6YOci+piq5v9WDGMn1zA/1fdDjhjxFwXuAicGzXfE+GW8Qa9Ks49FHATA7U/iZWVlZWVlZWVlZXV/OlfogGsuXT788cAAAAASUVORK5CYII=); +} + +[id^=GPelevationPathPanel-] { + width: 280px; +} + +/* ELEVATION PATH DISPLAY */ + +[id^=GPelevationPathProfil] { + height: 150px; + width: inherit; + line-height: normal; /* surcharge leaflet container */ +} + +/*.GPpanelHeader { + padding: unset; +}*/ + +/* +@media (min-width:720px) and (min-height:720px) { + +[id^=GPelevationPathPanel] { +top: 15px; +left: 15px; +} + +} + +@media (min-width:720px) and (min-height:520px) { + +[id^=GPelevationPathPanel] { +width: 460px; +} + +[id^=GPelevationPathProfil] { +height: 220px; +} + +} + +@media (max-width:560px), (max-height:340px) { + +[id^=GPelevationPathPanel] { +display: none !important; +} + +} +*/ + +/* ISOCHRON */ + +div[id^=GPisochron-] { + /* left: 10px; */ + top: 0; /*overwritten*/ +} + +/* Showing/hiding isochron panel */ + +span[id^=GPshowIsochronOpen] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4AUXCjIhczCQjQAABBBJREFUaN7tmE9oI2UYxn/vTCeQHjxou2ULroIHsazYg4ekiiDSk+AtSiyZNqbLtrYUFC8NKwTcbW+LuNm20ubQySGwvfWwe1gvImuDFxXqgqhgPWzp0t1jo0knr4dOutO0tmkTpcV5IJCZL+/Mlx/P93x/IFCgQIECBQoU6L+QnKTItu17QJ93ec9xnNcDlIfLOGFdn+/7awHGFjt6aGjo5Wq1mgIuAe3e7S1gXlUX8vn8ais7tzJpXVKpvhoNuaOSoXrQbxSkOGl+oYbxc9+1SvZMg47FYqFwOPw5cNkb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y6DfVfWuYRi55uMiUKBAgQIFChQoUHP6G9rPw3e7WtEyAAAAAElFTkSuQmCC); +} + +/* General panels */ + +div[id^=GPisochronPanel-] { + left: 10px; +} + +div[id^=GPisochronPanelClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4AUXCjIhczCQjQAABBBJREFUaN7tmE9oI2UYxn/vTCeQHjxou2ULroIHsazYg4ekiiDSk+AtSiyZNqbLtrYUFC8NKwTcbW+LuNm20ubQySGwvfWwe1gvImuDFxXqgqhgPWzp0t1jo0knr4dOutO0tmkTpcV5IJCZL+/Mlx/P93x/IFCgQIECBQoU6L+QnKTItu17QJ93ec9xnNcDlIfLOGFdn+/7awHGFjt6aGjo5Wq1mgIuAe3e7S1gXlUX8vn8ais7tzJpXVKpvhoNuaOSoXrQbxSkOGl+oYbxc9+1SvZMg47FYqFwOPw5cNkbBS7w0Gs+B5iAKyJzW1tbHy8tLZVbARnRuZ336UIk5F6uh60gK2nzhiBjgKrIxGmFbTQI+Q4wCqwDI5ZlnXMcp9txnG7Lss6p6iiwoapj4XD4diwWCzVvgWrvk/7JcLFsZtVnDAUpps2bHmQAEa2+dGYdbdv2jAd5pVKpvFMoFDYP+l08Hu+wLGsZiIrIzcXFxfFmOlaLBER8z9lxNhnU52Tvn+h8xHJH/iliTjVoL5N/ANYrlUpvPeREIpESkQnHcV7xwf4R6FLV3mYz+yDYBrpQhTLIh2cFMkDbYY3exGcAnx3kZBEZ2OGxo0KhsDk4OHhVVWcMw0gBHzXpAtVpd6I4aVKD7SLDe9zRJOSVdNtJzam+a62L41B0avvPhkGLSL+qupZlLdW3DQwMPOUt7a7vcaHqLSCrqv0tGnKq0+7Ed5Mmrsj43iGoCy10cgZ4E3juGDV/eZ8S8AvwDfAlUDmWo1X1ArCRy+Ue27b9PvCsr/kFICQid/w1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JxEfhARPp9y6DfVfWuYRi55uMiUKBAgQIFChQoUHP6G9rPw3e7WtEyAAAAAElFTkSuQmCC); +} + +/* Calc waiting */ + +.GPisochronCalcWaitingContainerVisible, +.GPisochronCalcWaitingContainerHidden { + border-radius: 5px; +} + +/* Isochron form */ + +.GPisochronChoiceAlt input:checked + label + span { + color: #C77A04; +} + +.GPisochronOriginPointerImg, +.GPisochronChoiceAltImg, +.GPisochronTransportImg { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAAcCAYAAADvCUNwAAAV90lEQVR42u1ce1RU173+fmceqMNTlIcoMYCVC6LUWl4Gn9Wbq4lGrpLXutZEwxCTmFsTY0BsaasQTWp6YxJmJj6aZNVWEhStWbUxMSGmgo9eNUgwcbDXRxQVZgRRcJg5v/sHZ2AYBpgZBpvS+dZiMXP2mfOds8/e3/72bz8AL7zwwgsvvPDCCy++XyBvFnRAo9GsJKJfAVBJh24BWKtWq1/vD77yNfKVYNjx0drUgtbX/xHPz8w+AJYAGA+gFsA7RFQ7UPi8GPiQe7PARt07ixmkz78C0D8C01nMJD7uP77esQPAAgDHAMQDUDNzAhEZBwjfgEFRUVGEIAhvM7OvKIrLly9f/k1/8h1egwiB6W0wfGUyXv7jdfjm+5gvgrdodILKwTHfAcTXk1sKBvAAAB0RJQN4GkAEgBkDgW+gQRAELYB5RDRDJpPt6nc+Ji1A80A0wyIKu76v+eKWQ9NqtQwAarX6rnRZy3PlDACpBeZ+4SsuLlYaDIYFzGwmIvs8Met0uszAwMDSzMxMkyf4qvKhbGyVLQDD7OAdmMtzZZn+SktpfD5Md6sgEFE9Mw8C4CMdCpb+Xx8IfAMQU20+x92FEtKvfMy8AUAWgFlEdNzb5XQTGo1modFo3EhE93aXR8y802g01mg0mpeys7P71DpV5MgWNpqwEeieD6CdjSZZTXkOXkottDjFZ21kHEGtVpMz6TqdDgBQWlqK1tZWNDQ0YPfu3WVwEGu1NjKOkFpgJmfSK9YoAACnNemwmJrQcv1bV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hp79A8bS4Ov4wYQRDOAJCRIMzs4tDQtvTr+yBoUtnZTETPdTKR/+qFJisra3dQUFAcgExm/j2AM5JbaAJQzcy/Z+ZFAOL6KmYAkLbesttfaYlj4kwwdeED0++JeZGizhJ3t8XMGssgou/ulrjcbb5/JpjN5uEADIIgRDkSMwkmIvLIPoQywnACDCSIUY7EzMoH8Iffkyza7i0lXnjhhRdeeOGFF1544YUXXtwl/D97JTQuDxIoMgAAAABJRU5ErkJggg==); +} + +.GPisoExclusionsOption { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAA4CAYAAADuMJi0AAAE60lEQVRYw+2YWWxUZRTHz/fd7y4zzAzTbaAdpgtQWsBiYVxYGpcEMCwRQkx48KHGhKg0WhESNYglwSUgWCKGTaMRBF4MwShpECUshlJqay2U0LCUwrRAp+0Ms997v8UnEl8Gp9Ppg2Z+bzfnn+/knHvud865AFmy/GfZVVZW/vvb9eduNn7Wc+ixGQ3/pm+UcO735VP3/rpsyc39TudHyXQ4maF61cqfZi97ocbjmVi6YGHNxoOeor3JtDskae606uqzFfPmvRqLxFg4EetIpiXJDJqqOHBwEEjIDyXjiVw4t/S1XD34TKs/MX+z4EEAgK0SwhPtjh+qq6tXBjGOtTY11a31D371qEygRxn3F3vWPVE1deN0G82T+m5BbCAIF+8lBttifLoFQeV0Wf7R7XbndsXird19/TUfAhgZeZ8H7eoXHYVWwzdBFTedsmhScfg0wfQPTRF7FfLdmBRRo4Q9RzTS8aeKRaeERAsC8TmRto30HJKqMCrhIcMUMuMcmADQJAQ5GJ4fqUMpFdE2mXgqOe+ewXhJFCHoJNJxu4omz7bhScVMyj/BeFPGUrlZIROOYRT4C0C0S0h8qUhHAAC2yGTFpUka7Skfx9/DZFZGnH2gEHxYwnc6EIguBYnDqtTzT3uDTFb3VdrEcZfWk5GUrgZxaI4QCyyaBAME04sUzTvL+dBD+xnOu8qiwrIgV1leEuf9JxhvTzu6Bgm5ThXkmNcciriaS8R2lXySTHvUqXb/lqsNp3Ju0qstx2Z7sfTZGuKsLAFkV4RK0J5k2s4wXYqYsO6WyYq0HUYN06c9XgX5SxcBuIt4gvJ40sJi7MaVONtVhGHmqIrmyLPzm29tqqf7ilwHUtHvVAjO9tksWbJkyQzehd7xo5ppUqW2tlbzLp380rhxitdB8q/4fD6acnsaKfX19c7Ji+QNJU/at7mmWaaZpklHNSY+irq6urzSxbBBy1PqEoJZfFdYoK2tjY2Jw4aGBpurJvKOmme8xWTTmgjq1DApAwAxoo6fIkieEnoF2+NvUDVqCekRiNIY4ip1eb1ekvEI39/65nOyO7hWtyWc0biOogkDooYOBhhujLEDAIZG4xADAH/4sH796y42ZWBNxBGrCEZMlNBNER1k8fBtdixwwzzY2toaTCtCr9drLXzKthgSiv7ztycfjvQo4O5fpWqR5eGojg2DCX1IBHUf3n2nSey5cOpCXzrfIXp6WZXXMtdYh8pi74JTL3WTijO913tDq2qXVxplA5vijgdTIvE4RO6zYOwO3t5/GhpbTrYMjnh78nq9VlwRfRmVRdewArM6rgJBTLbxErYEAL4J5vetwFJ4jghQxMNSSAyoO42Ttl0Xz58PpzXqS5JE7G5tqrAbM6lMiyljkimoQg1m8VhK7xrFwTpdixcbAaGz2/I+ekba0dzc/iDt3SIUCtH+Lv+lArWwjWPOOeMVJjI1imgRsyXKDas+mxoc83vKUfOC/dO2lst3M7LM3L816LdLBedlTIKU05lUNfJM2ZzEBZORXzuHrtk+vnSu63JGF9LhvmH9/uVAu8s9MUQFnWUSIweHFJ90z7qlq+n6L2OyAQMA918NdLrcrqgwoQrHyAHWqX49PDzMxsohAIAUuZ0YsHJHSO+G5t7eXj+k8ZsEjfCmsQGABgAmAMQBIJEdN7L8//gb3FshBGMt81oAAAAASUVORK5CYII=); +} + +/* Reset picto */ +div[id^=GPisochronReset] { + background-color: #C77A04; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAAcCAYAAADvCUNwAAAV90lEQVR42u1ce1RU173+fmceqMNTlIcoMYCV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75KnLtyt8HsABiuIsVfolkIGaq1eqjAI4C2KHRaD4lohkqlWqLg+B6X7CkLc4pzExbJx4FLEcB7KjIoU+ZaAYNFrYA4uMeFjXRyZg0iKiSmStsHbtLggYAUldyLYC1NjG0if1Vwdp20zCvBbC2PYbm/mimvevcpdFoXrPutNHY2Jj87rvvGqKioj6Pj48PCw4OHgW0LU6vqqqqPXfu3HhmthEX2qBWq/c4y5daaNl1OEf+Gkk7bbQYziUf+3WIYVjCos9DU54JGxI+bhQA3L5SebG2/M3a+tMl48Fiss0lNqSst+xBP0IURUyePBkNDQ04evQoEhISwMy4evVqv/AxWzD6wf9BS70eF/6Si/DJ/w2wiJsXyp2+RlNT03MqlWoeABOA3wUFBb3qxM/ypAprjaE5f8+3xeeEwcI8BkwE/O68XuyVj4E8kvjIRT4AKC4ullnjnE899dRBu4q9U+p+TvXUeyle1DEYkLzOfNDOue0E8wzyIF8f8A4cLJ9ya6uOgbDBoxvbB1mx8cqVKznubh9ETm8f1P6GNqYozDl3Y/sgZp4DYBuAUClA/iIRaQcK3z8jtFrtPrQteSpTq9XT7NICANzwZF2syKV9AM0lUFlygaUT3/HVCDDLhBsAkFIg/kP3rGNmFYAzRDSqz4I2kKDT6RYw86sAons5VQ9glVqtLu0L3+E1sgXEeBWgXvhYz4xVaYWW0rtcUASpC3aViMwDje+fCVu2bImxWCxnAMgEQZhp79A8bS4Ov4wYQRDOAJCRIMzs4tDQtvTr+yBoUtnZTETPdTKR/+qFJisra3dQUFAcgExm/j2AM5JbaAJQzcy/Z+ZFAOL6KmYAkLbesttfaYlj4kwwdeED0++JeZGizhJ3t8XMGssgou/ulrjcbb5/JpjN5uEADIIgRDkSMwkmIvLIPoQywnACDCSIUY7EzMoH8Iffkyza7i0lXnjhhRdeeOGFF1544YUXXtwl/D97JTQuDxIoMgAAAABJRU5ErkJggg==); +} + +/* LAYER SWITCHER LEAFLET */ + +div[id^=GPlayerSwitcher-] { + top: 10px; + right: 10px; +} + +/* Showing/hiding layers list */ + +label[id^=GPshowLayersListPicto] { + width: 36px; + height: 36px; +} + +span[id^=GPshowLayersListOpen], +span[id^=GPshowLayersListClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAkCAYAAAAq23xmAAAGfklEQVRo3u2YX0xT7R3HP6eUyp9DQUUI6BTKaCx/BowSNPXKmy7RKDF5r19v95ItWZYtTqMciGNxb+LFe+edu53DSjRxxisF5x/wBaNQB1rNG1ZaoAd6OFDaHs+zm9GFvTBfoEWz9XvV9DzP9zzPN9/f9znPD7LIIossPiFM0xRZFXZA5P9VoaXtEkSjUbG4uAhAUVERxcXF0ue6WUVRrgM/URTlpz90jmWrL0skEmJ6elokk0nsdjt2u51kMsn09LRIJBKfnZt6eno8wJeAvpl5WxJodnZWqKpKYWEhNpst9b/NZqOwsBBVVZmdnRWfWQxcAbBYLL/LWInpui6i0SiFhYVYLJaPLYilpSWKi4uRZfmTll13d/cXQog/A39RFOWLtDvIMAwRCoXE8vIyRUVFa8QxTRNN09A0DdM0/01ssVBUVMTy8jKhUEgYhvFJHHXt2rVcIcTvgWROTs75zc63fmyAqqpiZmYGWZa/92xlZQVd1xFCrOYSsiyTl5eXGrP6e2ZmBlVVxZ49e3bUTdPT0z8HaoFvLl68OLnZ+Rs6KBaLiWAwKIDviWMYBgsLCywuLqbEARBCsLi4yMLCAoZhrJmzyhEMBkUsFtsRN125cqUIuAAs5ubm9m6FY12BwuGw0DQNWZaxWq1rBNB1nfn5eZLJ5IakyWSS+fn5Ne4CsFqtyLKMpmmEw+GMixSLxc4DZUDvhQsXwmkTyOfzoetrT8N4PI6qqsRisc0sEFVVicfj/xn2+Hy+jIpz+fLl/cAvgX8A32yVZ90M8ng83Lhxg7q6Oo4cOUI8HieRSGz1eEXTNGw2G7t27eLJkyeMj49z4sSJjApkGEYvUCBJ0lddXV3Laf+SjsVior+/n8nJSdrb26mpqdnWgt++fcvTp0+pra3l9OnT5OfnZyyse3p6mkzT/BZ4BbQoimKm1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RCIRHA7Hhl3FVXeVlJRw8uTJjHUUFUU5AvwNeKYoylEg7R0C62YGr240EAiI/v5+KioqKCkpSZUTQDQaJRgMcurUKRwOR6abY38EJIvF8utMiLNpgVbhcDgkwzDEw4cPef78OS6XC4CJiQmam5s5c+YMVqt1JzqHMvCnS5cuPcrUC7a9CVVVxa1btwDo6Ohgp1uqWWSRRRZZ/B/jn0nf6l+CD/6FAAAAAElFTkSuQmCC); +} + +span[id^=GPshowLayersListClose] { + background-position: -36px 0; +} + +div[id^=GPlayerSwitcher-] input[type="checkbox"]:checked + div + label[id^=GPshowLayersListPicto] { + box-shadow: 0 2px 2px #000; + border-top: 1px solid #CCC; +} + +div[id^=GPlayerSwitcher-] input[type="checkbox"]:checked + div + label[id^=GPshowLayersListPicto] span[id^=GPshowLayersListOpen] { + opacity: 0.4; +} + +/* Layers list */ + +.GPlayerVisibility, +.GPshowLayerAdvancedTools, +.GPlayerInfo, +.GPlayerInfoOpened, +.GPlayerRemove { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAAAcCAYAAAD1EPTXAAAIRUlEQVR42u2aXUyU2R3Gf4eZQZjxo2peQzCCsSL6NkZjHQWrDjEYqxKjySy9MZpsooYLGIia1K+tXogaQhC8mKvGQJW0drKa1ErMbohYK7QzRal2LFiN7LiTcV8Tg2RGw3ycXshM/WCV+bAum/e5mjnnvO/D/5znPOf/Pwzo0KFDhw4dOnTo0KFDhw4dOiYGhD4FOj4W9u7du9BgMKx9vS0ajV5vbGz893jfYZxoQV+5ckU+efKEefPmYbPZMrbBGhoaZmVnZ9dIKTcDRaPNA8Cfw+Hwmf3793+XyTj+epRZWSPGGgGbZZxPvOKLmSJnfnGU7ya6QA0Gw1op5RohxF8ApJRrDAYDwLgFOuEcdM+ePfLhw4ccPnw4YwI9ffr0Z8BvgSnfM2RYSvl5XV2dKxN8Nw8ZPhNSvJdPSPl5yYmoayKtTVNT07ysrKxyKWU58Mv3xPdSCHFDSvm1EOJrh8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QYjOwYLR5ALgciUTO7Nu372km+a4fQDEKY7WAN/iE4LLRFDmz/ChPmaA4ffp0EDCXlZVx7dq1xB3oN98MEm8DQrW1tZYfhUC3bt0qg8EgLS0tLFq0SP+J4A9foAP87xdh33cqDTgcjmJ9tnTo0KFDhw4dOnTo0KFDh44fC/4LLzyqAy83zsEAAAAASUVORK5CYII=); +} + +/* Opacity slider : Chrome, Safari, Opera */ + +.GPlayerOpacity input[type="range"]::-webkit-slider-runnable-track { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAECAYAAAAZDrhMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAwSURBVDiNY/z379//v3//Mvz9+5fh379/DITYxKobKWYxMYwCisBoAFIIRgOQQgAADrTuhXfc36kAAAAASUVORK5CYII=); +} + +/* Opacity slider : Firefox */ + +.GPlayerOpacity input[type="range"]::-moz-range-track { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAECAYAAAAZDrhMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAwSURBVDiNY/z379//v3//Mvz9+5fh379/DITYxKobKWYxMYwCisBoAFIIRgOQQgAADrTuhXfc36kAAAAASUVORK5CYII=); +} + +/* Opacity slider : IE */ + +.GPlayerOpacity input[type="range"]::-ms-track { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAECAYAAAAZDrhMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAwSURBVDiNY/z379//v3//Mvz9+5fh379/DITYxKobKWYxMYwCisBoAFIIRgOQQgAADrTuhXfc36kAAAAASUVORK5CYII=); +} + +/* Layer info panel */ + +div[id^=GPlayerInfoPanel] { + right: 190px; +} + +div[id^=GPlayerInfoTitle] { + color: #C77A04; + border-bottom: 1px solid #C77A04; +} + +div[id^=GPlayerInfoQuicklook] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAI9SURBVEiJ7ZZBSxRhGMd/7zi7SGxLg4mWnSIWOoSFKLvbyUN5DtMPUEqfQNLJg0GuJlE3L+UXcA8JHRKDCERmaQOLTnoKXEkhq11nDzm783TIXdZ1d9TdCEL/p3mf9/3/eJ73eeedgWMnVTqYnp42gI7DGLPZrDU0NJQtj+t76Eq1h0KhN4FAwBNm2zarq6vdwDtPIEAwGMQwDE+gpmnV5zydNWhfhuVysxvY76dwNj8A4G/tgtBgbUA3+5Ufc7cQZxu9pROAX19eI6lFjNO9zUcG2skniLNN8OZz/OejAOysL5FeGOTcz7l7QLzc47mHzkYSvaWzCAPwt11Hnb2Gz92+Wsnz15viCfS3dpHbTLKzvlSMOetLyLdlclpwuZJn3x5mMhlc1/0zuHQXSS2SXhiEpt0Ktz4ieoBM4+X52b7Nhv44+apA27aTKysrN0pjZwK3m9vScwO+rc/tAI5mfPp+qvNla3p+qinkuyJjzh01hutV6aFkjeijlqlLwmyYkbI7oXaoqT+yTF0sU39aiNXV5UgsNwo8A7VWd3YnOs6qeMItU5fCsyjpj47n45ap3wcmS9dFYrl9fq+DnVKouIa2tmt+DPLioAyr3tgKZYVjTn9hnBj2dQjSexDwUK9e4oEvLJq8BQwgg5KZuoCuSDcQBDJKqZ7IeH4AeFgzMBrLTShhRCnVEx53EsnhxovKVa8qrT3wu1xQeCJX7HBey08K0keFU/Lv/hwEiSRM32y1uSMDgQu7ZZ3of9dvep7Bwy5Q9Q8AAAAASUVORK5CYII=); +} + +div[id^=GPlayerInfoClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAgCAYAAAAFQMh/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAFgSURBVEiJ7ZS7UoNAGIXPYYe8i52FMxKfJ5kEQ+yhSiP2MXhL3gfGxs4ZXyXO8luEyEXIglruaffsfv91ASsrK6tfin1MaehOhfnFeKR9rpC3eQRgFqq1OM7H1e3n5s/gNHSnoDwBcADZeSM9a8IFYBqpe4ILACLkjQnumMBgfl76OMn2aiOVgAVgFqmkgAIAKfmZ6Vkj2It1AJFK9PSzSL3ICs4xU4B+eSxbb6SXxnxMBqDsH8igjFh2ObAHeF2DunreNQeDwW1waV4eAB0EPsJfQ7XWZFC/2D50p2QeroY0wR/RyrAEgIGlrqxMm2NQ1r0yboVSthRJShcn2V49y6rfm0ZTF9Rz9fzyTi8bq9Ybbv65IpXUVgby6MV6wcNgf38gtV2GPIxj3dGSg3qUxXkDir4dPofgCC0iFy/Wi0rmInDeze/2UBq6fhqpRE5UqGhJkoau3+WxsrKy+hd9AZasoFzDGcuhAAAAAElFTkSuQmCC); +} + +.GPlayerInfoLink, +.GPlayerInfoPopup { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAI9SURBVEiJ7ZZBSxRhGMd/7zi7SGxLg4mWnSIWOoSFKLvbyUN5DtMPUEqfQNLJg0GuJlE3L+UXcA8JHRKDCERmaQOLTnoKXEkhq11nDzm783TIXdZ1d9TdCEL/p3mf9/3/eJ73eeedgWMnVTqYnp42gI7DGLPZrDU0NJQtj+t76Eq1h0KhN4FAwBNm2zarq6vdwDtPIEAwGMQwDE+gpmnV5zydNWhfhuVysxvY76dwNj8A4G/tgtBgbUA3+5Ufc7cQZxu9pROAX19eI6lFjNO9zUcG2skniLNN8OZz/OejAOysL5FeGOTcz7l7QLzc47mHzkYSvaWzCAPwt11Hnb2Gz92+Wsnz15viCfS3dpHbTLKzvlSMOetLyLdlclpwuZJn3x5mMhlc1/0zuHQXSS2SXhiEpt0Ktz4ieoBM4+X52b7Nhv44+apA27aTKysrN0pjZwK3m9vScwO+rc/tAI5mfPp+qvNla3p+qinkuyJjzh01hutV6aFkjeijlqlLwmyYkbI7oXaoqT+yTF0sU39aiNXV5UgsNwo8A7VWd3YnOs6qeMItU5fCsyjpj47n45ap3wcmS9dFYrl9fq+DnVKouIa2tmt+DPLioAyr3tgKZYVjTn9hnBj2dQjSexDwUK9e4oEvLJq8BQwgg5KZuoCuSDcQBDJKqZ7IeH4AeFgzMBrLTShhRCnVEx53EsnhxovKVa8qrT3wu1xQeCJX7HBey08K0keFU/Lv/hwEiSRM32y1uSMDgQu7ZZ3of9dvep7Bwy5Q9Q8AAAAASUVORK5CYII=); +} + +/* Location */ + +.GPlocationStageFlexInput { + margin-bottom: 5px; /*overwritten*/ +} + +/* Location form */ + +.GPlocationOriginPointerImg, +.GPlocationStageRemove, +div[id^=GPlocationStageAdd], +.GPlocationTransportImg { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAAcCAYAAABF79LlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAzSSURBVHic7Zx/bFxVdsc/575nl+BAGLWJYmVF1RUI9UfKbqGJHZKFghZVSgiriEQVlbKAnXmTHyTdVNtgJ1mGruNAqw1tQrDfOD8olSLFUNJ0UzVaxI9AcYyEGgQFiSXaKtsfNqTylOA2qvPmnv7xZuzxeH7POCjb+UjWzNx73v3esXz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c6ddoNLqZqUivIvJxqXE9z/vQcZwVwF+nm8Y6OzvPq+rDOabRYuNEIpGzuW3z5s07A4yq6uvGmE0Ay37IhzZlVyBTesue5rwo0/S0hN7Pf8oMvQufBGcQRlF93VrdlO+6XFKp1GSlw1r7JPBoVve2ffv21Te5aMykXgp9UpBJPQPbhr5X32SmiFwhfABokYiUc2x3f/r16zPGKlf0yJEj84Mg2KqqKwlLIADnCPfs+z3P+89yxyqHt7qY32Tc8GEdTesJ51Q51dwc7L8zTl31Msz203K+729U1d/yPG+as2ejqpJeDfyz53l91WolEolDOafmujzPe7rE/KbNqdzSKsDZneaQKFN6SlfbXltUL/fwSluvrbhKkZmzMea+DRs2vJ5p7+/vfy1dpjzmeV5u8qtqMnMWY+5b2hNM6g13yWuI3KtwrL3X1k2vGlT1LLBQRH4tu73sslx6qb4b2J1Vh68qG18O4amrYDewe7IOX0U2vlIq+QOvcvw+gFgsVtAmfSMotYwvyfj4+OMtLS2rCfd0L0QikT8v47JdhOUgBzhWiZ7+j33czDGrFSYEXrhw3pbUU9glaT2pUA9gcHDQSSaTAGQ7O4CIHCdc3tetojC4lskDLdnODoAxx1G9V65OxaQUA+Q5ntuow/8Ckz4kU1ZZK4PneXuocs8bHpIpr4yWob3XVq0HkEwmT6bfnsnTfRzwgUXVjp/LzbfKSQgTjrl9bpA6Hjimrno1cBx4Krexqv9443mezHYkzKa9N5BKTtE1+P/BoUOHbiH9QJAx5k9z+z3P+6KeekNPcAukHwgyMkPvzmeoq14tiMh/A3+b296I8A2uWYIgmC8iY8aYpRs2bPiXAmYTIvJ39dBzhPnAGMYuXdpjC+qB1kWvDhwtbdKgQYMGDRo0aNCgQYNriP8DimGotcEqvNwAAAAASUVORK5CYII=); +} + +/* MOUSE POSITION */ + +div[id^=GPmousePosition-] { + /* bottom: 10px; */ + /* left: 10px; */ +} + +/* Showing/hiding mouse position panel */ + +span[id^=GPshowMousePositionOpen] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAHjSURBVFiF7ZixctpAEIb/PVk09otkxkUKF8LPc45NwO5RGhqL3jZxHO55InVpMpnxg7iBOf0pLGEQaIREFJj4vhl1dzv7z7+7twA4HI53idaaWmvuO4+6qH0n4HD8XaTpxbx/jTGNY1QRD/0LSnrW7diejJBuOkNAkqF3R6Wez2/nD1UxD7aH46F/AeE3gXxKZt4TR+u5EpA49O4hMhDy7scXf1AV96hpQm06CwCQ9CMgmUjRycybE7YvAIHM2dCbCKSX3xCmH6rCHqzDQWQHIJdKVHpJ6H3nCGrh7JtYQDgNOva6Km5tl8re3jYcz/sTIotSVaBJgRkgnxcHhdPAt1dlfb7MLg6/ZF9rCMBgbG+WnbYQ3VQssEFwcYMq2ahejDEnxpgTFERveX9rctGKfCCKJUlTRyxwwD1cxApkrWdYvyV36eHc2WOgvamdDyiB9EtOmKBjLxuXdA2Os681NooVToWcvJ0SXfZOb6Ldt3QHysQGvr3CCCxO722dPljBcehNVqYx+BhE64vHylsMfu1GtqT0X2lc0u3/HlY/gcyt16VikIsFsukd2f7Sk0VC/a6K2ni1bJtuNDfx0Pch6Wlwuyo2RwBybG+S0FOg+nU+nj/uI1fHf4H7T8vhcDj+AX8AnMTkomeXEcwAAAAASUVORK5CYII=); +} + +div[id^=GPmousePositionPanelClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAHjSURBVFiF7ZixctpAEIb/PVk09otkxkUKF8LPc45NwO5RGhqL3jZxHO55InVpMpnxg7iBOf0pLGEQaIREFJj4vhl1dzv7z7+7twA4HI53idaaWmvuO4+6qH0n4HD8XaTpxbx/jTGNY1QRD/0LSnrW7diejJBuOkNAkqF3R6Wez2/nD1UxD7aH46F/AeE3gXxKZt4TR+u5EpA49O4hMhDy7scXf1AV96hpQm06CwCQ9CMgmUjRycybE7YvAIHM2dCbCKSX3xCmH6rCHqzDQWQHIJdKVHpJ6H3nCGrh7JtYQDgNOva6Km5tl8re3jYcz/sTIotSVaBJgRkgnxcHhdPAt1dlfb7MLg6/ZF9rCMBgbG+WnbYQ3VQssEFwcYMq2ahejDEnxpgTFERveX9rctGKfCCKJUlTRyxwwD1cxApkrWdYvyV36eHc2WOgvamdDyiB9EtOmKBjLxuXdA2Os681NooVToWcvJ0SXfZOb6Ldt3QHysQGvr3CCCxO722dPljBcehNVqYx+BhE64vHylsMfu1GtqT0X2lc0u3/HlY/gcyt16VikIsFsukd2f7Sk0VC/a6K2ni1bJtuNDfx0Pch6Wlwuyo2RwBybG+S0FOg+nU+nj/uI1fHf4H7T8vhcDj+AX8AnMTkomeXEcwAAAAASUVORK5CYII=); +} + +.GPmousePositionEditTool { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAASCAYAAAAzI3woAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QYXCC4cQlf82gAAAvFJREFUSMfllk9PE1EUxc99DDQBxZV8BKGUlkJKQjEK6rIWDQETFy5o17JwQ1s0QEKhbNTA1kLixogkhIBbURL+JDYyFKTtZ9DEgIQEmb7rojNkWmYoG42Jb/fm3rz5zbnn3jdAmbURU3gjpjD+0hL4xxZZPVwbQZ34pQwQEGDAqyeqTFg+kdrUzQl8O+/Q6cE7r2vohy/kCDZhdFTavXsm0qYe4lJuILHywBZofaiij5iSAC7bHHRAzOH2ify8HUyrWH0kiJGVnly/I9hoAUWvIr5tl1DdzECKb7wzoIQFzFsdZkESOo0YM7oYWARQy0Rzm9GKXiugatpvEVSwXINI188cv0+XfDjNRHw7LqG6AYAIqMFP5xkPrY2gTleGwBj0j2s91+PaqhHvmNA+dYxr94kRBUBMlFyN4mopUDiR8mRkS9rYO4Xqmo20ZjA8LAxlnEJ1GfEse7JhR6D5TMk2YsoYgCEAC/5xradM5y0C6AZhzB/Xntn5wym2PMaDnGzO5YGTRrHdZIbprwq6zCU1lywIAJLwslwnMOM5ABDjrl1KKPHZa1bqmtiuLwcDAGQ3Y/zjGhlzyGpvl1+q1GykTa0XWx5zMCvduX5Ht5XZ//wcyoPpDClbj5tiDw0pKhjNktBpNrOlh54qXZBYAWHLH9da7c42WtsqaDcSzAot6b54UvazZSGHGcsXhcmyJ5vJe3eMfYNI188eL+3p3XcWSFZq0wAOCLi3GVUidnfZekyJ6g2wr7E2fVGY/qqgKzSZajYb3QqqqJab0YpeJporCIVFMF4Q4aOOfktXJghAMnFvRzy/UEqTjPh2GoV62k0Z6f0aSqTcANg8GM2zaE96d8OFnGJTt0/k54m4z1DqFKZQphVDGTD3WcEAwCGufJFMp8qEHAGPCUYfCSm3oRQzcITavXMv19UorlYKZQBAAIwWPXOLGctVVdqUbwTfz79cb7+ppoOmcCJVClNU2mTElz7i2t3Hkx8eXrht//v/od8GMV64Yi7NnAAAAABJRU5ErkJggg==); +} + +/* Map center localisation */ + +#GPmapCenter { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAc0SURBVGiB1ZptTBzHGcefmdnz+e72bvcAO8UYUCtTKgMGmsSpGhtcJSTCRTXIaoJUjNUm5kCkFv7SSLaVqpUdKeqHIDcIDqdSgnFLXUXGqmUrNVV9pI0UavsM2FYoqKl5MQ0Gbve4F69vZ6YfeCkQXm7JwSU/6T7cvD3//+3u7MzNgzjnEAumGhyJgFkJRyQXESEVOKRwzpKBs62IM8Sx8DlC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skMdo0p95UPjW8E2Fyk9PIB5TQS2vJCoqJkYWmEiTCIsUAeHc0iWcArIti01Ujt89K/A+D1E+N+7GXOgAAAABJRU5ErkJggg==); +} + +/* REVERSE GEOCODING */ + +[id^="GPreverseGeocoding-"] { + /*left: 10px;*/ + top: 0; /*overwritten*/ +} + +/* Showing/hiding reverse geocoding panel */ + +[id^="GPshowReverseGeocodingOpen-"] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPcSURBVFiF7ZZPaBxVHMc/vxl3UggSwYMGAkVEqwfRQ4VNQRTUSw/2ksWiJZTs27QxaSGe3FRhpXS9qWiyavZPsBRLWal/QBHxIK2QPSiClYAeS8BbygTFkt15Pw87m2w2s91kiQgyn9sM733n9+H93nsDMTExMTExMf8Vsh8hxpj7gCngBeBhoA6sAO+USqVP+81dziYyKvbwqBdMSQ4bNUZBaln3PXWc345cqM/3yryjcDqdnhCRWZoSa8CXqpotl8tr7eOMMb8Aj0UWpPpyuVz+pFchnSxnExlEPwQc0FLSC051SivI8pz7viDTgKrI2V7STpf3kk6nL4tIGXgA+AnYACZF5NfJyckHO6QuAioi3wJ5VX0b+BtARF7dq2yzAvvEVn1iahvuvLYtkILU5tyFULb5KbWP9oq9K+qlMWYCOA587zjOawCNRuO267pHVTVvrV0Cnm5+F1zXLdbr9a+XlpZWWhmZTMZT1RngkT50SeaDmVrWtYjMhD5TtTk3oV5wihwaruzU5gTRYjIRnOmVG9nSxpgbNFf2OeAAgIgoUFfVWWDMWvtkpVL5sVuwMeZz4Bhws1QqHdytaDut/bklDQ5asrAB8sqWhRaTieB0t33eTreWfgi44TiObn5cVVTVcxznOoDruoe6hWYymddpyrbavS8ENPlWcBbVzX0ZIKZfWegufAsYbjQat8OVbWaLaBAE9wOo6q2oicaYN1T1fPj4zfr6+vmocbulJe2oziudLamlvchCF2ER+QI46LruUZpXzGZLi8gUsGatvd45zxjzDPBm+PiZ7/vHqtXqxm6LuROBIDv2n+79Wo0UttbOAX+oal5VZ0XkcRF5XlW/Au5R1TOVSuXPiKljNBfhd9/3j++HbMfVsx2RdG3D/UhzXTt1B5EDy+XymuM4T6nqD8CYqr5rrT0HWOAlERk2xlzO5XKdp/wBmtvh2r8mK1oU1YWtUWL2It2rJSSTyRxW1UPAmud51wqFwl/GmIvACeCS7/snq9VqsGebHnSTTSaC0+TQztO728/JDqF+ikmlUu7Q0FAFGAeujIyMnMjlco3x8fF7BwYGnhWR2uLi4s1+slssz7kL205j9INkPpiW8O5v/XjQfhejhdF8sLP129h177dTrVYD3/cngEvAi6urqyUAz/OuquoVa20tlUq5/WS3lfYzhKslWkx6wUxLFsLTOx9Mt11ZqjgrEUHbU/stJ5Q+CXwMfBe+bv1yDg8ODt7dbzbAaL5eQmUGtJC8EN2qm/c0WkBl+ki+vhCV1TFn/zDGnAOyInK1WCyO72d2TExMTEzM/5B/AE2JsceuwAzdAAAAAElFTkSuQmCC); +} + +/* General panels */ + +[id^="GPreverseGeocodingPanel-"] { + left: 10px; +} + +[id^="GPreverseGeocodingPanelClose-"] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPcSURBVFiF7ZZPaBxVHMc/vxl3UggSwYMGAkVEqwfRQ4VNQRTUSw/2ksWiJZTs27QxaSGe3FRhpXS9qWiyavZPsBRLWal/QBHxIK2QPSiClYAeS8BbygTFkt15Pw87m2w2s91kiQgyn9sM733n9+H93nsDMTExMTExMf8Vsh8hxpj7gCngBeBhoA6sAO+USqVP+81dziYyKvbwqBdMSQ4bNUZBaln3PXWc345cqM/3y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SuQmCC); +} + +/* Calc waiting */ + +.GPreverseGeocodingCalcWaitingContainerVisible, +.GPreverseGeocodingCalcWaitingContainerHidden { + border-radius: 5px; +} + +/* Results panel */ + +[id^="GPreverseGeocodingReturnPicto-"] { + width: 30px !important; + height: 30px !important; + background-color: #C77A04; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4AYBCQs6x0UYEQAAATZJREFUSMftliFLBFEURs/dVUQURJvYLCaLGESz1T9gUJsoWARBEBRM/obFIFgMygabTQSbVoNgMCqYLMLusawwYVdnZ8bdsHvS8Oab97377p33LvTp09OoJ+qHOt9p0x+28s5XSml6DOwlhuLfjdVD4KDoHRz4w3QfOGryakUdBerAG/AMPEXEexE53bU96uqtuqaWs5rumI87dSJLjmdybtgScNl25GqoFfOz3sojfjEvAadAs49vgIfG8yAwDkwDC8BQQncfEYtZcl1Wz5tEst1CP6aeJXQ1dSproZXVizTGiTRdJ7QbmQ6QiKgBq8BVmoVGhMAm8FVIoaqDarXxvy6n0P8U52URh0pJnUypnW0YP3bjGr1XXzLfTjmoAMPdiHhEfe14xBHxCVS71S7N9ZvG3uQbY/KgCDQBMlkAAAAASUVORK5CYII=); +} + +.GPreverseGeocodedLocationHighlight { + background-color: rgba(255,200,0,0.25); + color: #222; +} + +/* ROUTE */ + +div[id^=GProute-] { + /* left: 10px; */ + top: 0; /*overwritten*/ +} + +.GProuteStageFlexInput { + margin-bottom: 5px; /*overwritten*/ +} + +/* Showing/hiding route panel */ + +span[id^=GPshowRouteOpen] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAJySURBVFiF7Za/btNQFMa/z46rRkwIiXdAYmBAwilrxQBvENS7kJZWcbsnSChLk70tKk07OSISDwALf7Y2VhcWhMQjFAmxVklvDkPqNHFtktwmUCH/Nl/rfDlfzp9rICUlJSXlP0MpdaKUOvnXeZiQMYy7PdUs/iKJhpeWlm6QfAvgyeC57/scfFZKSVy8iNSz2axXr9c7psm1Ss6ysHs/N6fXWEE39ncABiV7Syzr+8JmZ2eUphV3qJS6RfIDImYngeTK6enp+3w+f9MkvlVylkF5TXAlaNt7UrmcqwBsle1tkB5Fto5eON4o3VjDAN4AyJkkGmExk8n4RpHs3kM/PxaCtr0jQL+7BGBQtl8RLIYRlO6dUbJJhp8CODJKdJiPZ2dnyiTQrWoPIgMtyrWgbNelAqtfWXDt4rXsu3N6fZRurGHf93+KyCMA70ySBXozPD8//7jZbP4yiScgbk1vREwXjtv2XlC2dwYq2zPr6NWkOY/oTk64qKILbBaESwmkd/48nPQEZgHza6lPZEsfisjLRqPx+aq6IQREanrjuGRDk97wPywHk5gFkmfYlIckP01ZEwCgCV5qJ5m8Q6dt+JDk4jQFwwU1NLMh5LOkKyuJK7f0LOc41ixln120heEZC0HbhlT083Fae9oVnhpJZl1Hrz6o6fXo9h630tfW8KWrB7Lrbvaq2L+yILsX71kI2vb2KN1raxiwvgDnLdr7qPDYu5V6R4C4VV0cqLQIrG+jVK88w7MiV+0ctEqOA3bvupvDZkPCKyso2xbE+rpQ6+zGaQ1ybQ0DQG4MAwQEVV0E9FiapoZ/GMalpKSkpKT8gd85//Z5bfxYOAAAAABJRU5ErkJggg==); +} + +/* General panels */ + +div[id^=GProutePanel-] { + left: 10px; +} + +div[id^=GProutePanelClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAJySURBVFiF7Za/btNQFMa/z46rRkwIiXdAYmBAwilrxQBvENS7kJZWcbsnSChLk70tKk07OSISDwALf7Y2VhcWhMQjFAmxVklvDkPqNHFtktwmUCH/Nl/rfDlfzp9rICUlJSXlP0MpdaKUOvnXeZiQMYy7PdUs/iKJhpeWlm6QfAvgyeC57/scfFZKSVy8iNSz2axXr9c7psm1Ss6ysHs/N6fXWEE39ncABiV7Syzr+8JmZ2eUphV3qJS6RfIDImYngeTK6enp+3w+f9MkvlVylkF5TXAlaNt7UrmcqwBsle1tkB5Fto5eON4o3VjDAN4AyJkkGmExk8n4RpHs3kM/PxaCtr0jQL+7BGBQtl8RLIYRlO6dUbJJhp8CODJKdJiPZ2dnyiTQrWoPIgMtyrWgbNelAqtfWXDt4rXsu3N6fZRurGHf93+KyCMA70ySBXozPD8//7jZbP4yiScgbk1vREwXjtv2XlC2dwYq2zPr6NWkOY/oTk64qKILbBaESwmkd/48nPQEZgHza6lPZEsfisjLRqPx+aq6IQREanrjuGRDk97wPywHk5gFkmfYlIckP01ZEwCgCV5qJ5m8Q6dt+JDk4jQFwwU1NLMh5LOkKyuJK7f0LOc41ixln120heEZC0HbhlT083Fae9oVnhpJZl1Hrz6o6fXo9h630tfW8KWrB7Lrbvaq2L+yILsX71kI2vb2KN1raxiwvgDnLdr7qPDYu5V6R4C4VV0cqLQIrG+jVK88w7MiV+0ctEqOA3bvupvDZkPCKyso2xbE+rpQ6+zGaQ1ybQ0DQG4MAwQEVV0E9FiapoZ/GMalpKSkpKT8gd85//Z5bfxYOAAAAABJRU5ErkJggg==); +} + +/* Calc waiting */ + +.GProuteCalcWaitingContainerVisible, +.GProuteCalcWaitingContainerHidden { + border-radius: 5px; +} + +/* Route form */ + +.GProuteOriginPointerImg, +.GProuteStageRemove, +div[id^=GProuteStageAdd], +.GProuteTransportImg { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAAcCAYAAABF79LlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wA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YpRs2bPiXAmYTIvJ39dBzhPnAGMYuXdpjC+qB1kWvDhwtbdKgQYMGDRo0aNCgQYNriP8DimGotcEqvNwAAAAASUVORK5CYII=); +} + +.GProuteExclusionsOption { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAA4CAYAAADuMJi0AAAE60lEQVRYw+2YWWxUZRTHz/fd7y4zzAzTbaAdpgtQWsBiYVxYGpcEMCwRQkx48KHGhKg0WhESNYglwSUgWCKGTaMRBF4MwShpECUshlJqay2U0LCUwrRAp+0Ms997v8UnEl8Gp9Ppg2Z+bzfnn+/knHvud865AFmy/GfZVVZW/vvb9eduNn7Wc+ixGQ3/pm+UcO735VP3/rpsyc39TudHyXQ4maF61cqfZi97ocbjmVi6YGHNxoOeor3JtDskae606uqzFfPmvRqLxFg4EetIpiXJDJqqOHBwEEjIDyXjiVw4t/S1XD34TKs/MX+z4EEAgK0SwhPtjh+qq6tXBjGOtTY11a31D371qEygRxn3F3vWPVE1deN0G82T+m5BbCAIF+8lBttifLoFQeV0Wf7R7XbndsXird19/TUfAhgZeZ8H7eoXHYVWwzdBFTedsmhScfg0wfQPTRF7FfLdmBRRo4Q9RzTS8aeKRaeERAsC8TmRto30HJKqMCrhIcMUMuMcmADQJAQ5GJ4fqUMpFdE2mXgqOe+ewXhJFCHoJNJxu4omz7bhScVMyj/BeFPGUrlZIROOYRT4C0C0S0h8qUhHAAC2yGTFpUka7Skfx9/DZFZGnH2gEHxYwnc6EIguBYnDqtTzT3uDTFb3VdrEcZfWk5GUrgZxaI4QCyyaBAME04sUzTvL+dBD+xnOu8qiwrIgV1leEuf9JxhvTzu6Bgm5ThXkmNcciriaS8R2lXySTHvUqXb/lqsNp3Ju0qstx2Z7sfTZGuKsLAFkV4RK0J5k2s4wXYqYsO6WyYq0HUYN06c9XgX5SxcBuIt4gvJ40sJi7MaVONtVhGHmqIrmyLPzm29tqqf7ilwHUtHvVAjO9tksWbJkyQzehd7xo5ppUqW2tlbzLp380rhxitdB8q/4fD6acnsaKfX19c7Ji+QNJU/at7mmWaaZpklHNSY+irq6urzSxbBBy1PqEoJZfFdYoK2tjY2Jw4aGBpurJvKOmme8xWTTmgjq1DApAwAxoo6fIkieEnoF2+NvUDVqCekRiNIY4ip1eb1ekvEI39/65nOyO7hWtyWc0biOogkDooYOBhhujLEDAIZG4xADAH/4sH796y42ZWBNxBGrCEZMlNBNER1k8fBtdixwwzzY2toaTCtCr9drLXzKthgSiv7ztycfjvQo4O5fpWqR5eGojg2DCX1IBHUf3n2nSey5cOpCXzrfIXp6WZXXMtdYh8pi74JTL3WTijO913tDq2qXVxplA5vijgdTIvE4RO6zYOwO3t5/GhpbTrYMjnh78nq9VlwRfRmVRdewArM6rgJBTLbxErYEAL4J5vetwFJ4jghQxMNSSAyoO42Ttl0Xz58PpzXqS5JE7G5tqrAbM6lMiyljkimoQg1m8VhK7xrFwTpdixcbAaGz2/I+ekba0dzc/iDt3SIUCtH+Lv+lArWwjWPOOeMVJjI1imgRsyXKDas+mxoc83vKUfOC/dO2lst3M7LM3L816LdLBedlTIKU05lUNfJM2ZzEBZORXzuHrtk+vnSu63JGF9LhvmH9/uVAu8s9MUQFnWUSIweHFJ90z7qlq+n6L2OyAQMA918NdLrcrqgwoQrHyAHWqX49PDzMxsohAIAUuZ0YsHJHSO+G5t7eXj+k8ZsEjfCmsQGABgAmAMQBIJEdN7L8//gb3FshBGMt81oAAAAASUVORK5CYII=); +} + +/* Results panel */ + +div[id^=GProuteResultsValueDist], +div[id^=GProuteResultsValueTime] { + color: #C77A04; +} + +div[id^=GProuteResultsNew] { + background-color: #C77A04; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAAcCAYAAABF79LlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAzSSURBVHic7Zx/bFxVdsc/575nl+BAGLWJYmVF1RUI9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=GProuteResultsShowDetails] + label:hover, +input[id^=GProuteResultsShowDetails] + label + label:hover { + color: #C77A04; +} + +.GProuteResultsDetailsHighlight { + background-color: rgba(255,200,0,0.25); + color: #222; +} + +/* SEARCH ENGINE */ + +div[id^=GPsearchEngine-] { + /* top: 10px; */ + /* left: 46px; */ +} + +/* Showing/hiding search engine input */ + +span[id^=GPshowSearchEngineOpen] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAGbElEQVRo3u2Zf4xUVxXHP+e+mV2QdVdCaaAZagoNbRMxEpeuP0CXbqupURuNVFqzK84OryxIjYJt0vjH9I/+Q0VNy9r17ZsJQrDo1hqNqdEKbECKRQjVxugGS8kyFZDS7UKxu8ube/znTvPcALuZfftHdb7/TO6ZM+/c9z0/7x2ooYYaaqihhv9BZLPZ5q6urtmT0ZUaXdVhzZo1M1Kp1ADwXuDjYRj+7Vr6pkZZdUin098AbhSRwUwmM5BYRHd2dn5CRDYAK4DrgHPAAaA7DMMD0xw53wc+NDY29tkdO3acB+jo6JhTV1f3a+ClKIq+uX379pEk7fq+n46i6F7P8zIjIyPbdu7ceQmgvb191syZM79trd0ENIjIXb29vb+fMtG+76ettU8A666h1pPJZDbm8/lomoh+2y1Pi8guAFX9CjAfYHh4uL6vr28saaKttdvcclhEXnR2W4C7gQ+o6m8KhcJnJvO81EQKqvok8IBbngWettb+0xhzA3A/cD2w7tSpUxbYMA0pulxVK8v5qrp5vE5jY+MKYE+Sdq21N8eWTar6KcdHo4jcBijw1GSf501ULoCKV5+PoujLnue9KiJnPc/7i4g8paq3AgtFZFlzc/Oeo0ePDiYYVS2q+jTQGBO/BVwG6t5JS5G2pUuX/uHYsWOvJWE3l8vdpKo5EZkRE4+KSBlYCcwBBoC3W1pa/nHkyJE3p1Q6crncT4F7gbNRFLWmUql543WiKDqTSqX2A3NVdXehULgvgRd9xJWqTGyPB1R1c6FQOFxxQrlc/q6ILK8kH1ACfhSG4WPV2F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YlcAZYK61NpEy0tDQEK/7r4nIFuBx4HRFePHixYMkDBHpcoH4V2vtIPBba+3vgOGKzokTJ16Z9DST5Oamg+yhoSEFeoAX0un0kt7e3ofDMHxobGxsCXAI6Jk3b16if2Bks9mVqvpp4N/As57nPRqG4bPFYvHno6Ojj4rICWvt/tbW1sk7bjrukH3fX2Kt3eNq+d4wDNt4lyCfz5tSqXQY+DDwUBiGjydyLpiOzQZB8LIxpg3YWy6XV/MuQqlUugVYCAxGUfQkNUwfurq6Zmez2eYaEzXUUEMN/x/4D41MuU8OSr8EAAAAAElFTkSuQmCC); +} + +/* Simple search input */ + +form[id^=GPsearchInput-] { + height: 30px; +} + +div[id^=GPsearchInputReset] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAKPSURBVFiF7Za9ctpAFIXPkQY39oukS+GZyHkeGKOA3YALqNSEFJbsGWzZscX7wKRJlxk/B3JDRntToD9kCUkJnjT7dYgVh2/v7t4FNBqNRqPR/C/YZNBy0ukJ1enZUWTTgSobIwBXE3MuhvHy+evv+0P8uevr6x7J0zAMbcdxynNFeHNzM1dKvVxdXdXm1govJ50eKN8BGIAsrKPovCgtAJdT847gAIAIefmv0rFsnItFGIbnRWkRoed5dwC2uSKXddJGbTLVx2wcu6uNeS+5iRKAq6npx7IAQIr60MKtPJbM5aJ7fHx8LyJZrghd1/WxlY1fYW1urbA1i4YQyc0a7dXUfBYHRlJZgHb2tQTWUXTRyGoPo9FoSDLNJWl7nvfsOI6RVJbMckkGYRjW5jbaw8n+BDlMnhmQhQI2AL9kvyaB1Yn6Vfu8Lcn+FJE0l+RCKbUhs1ySwXq97lft8zyNhIG30lJ8+cCyaW6J9E5sC1mghTCwlf4xMecROdx9sfwwOxQiwtvb27lSqihdepjto/7QKhARfDNL0m7i/gal1NvY3CHWlFZLOtd6yka8S5ULraeMVlVuVOFSWUpAET8bxe5qYz6J037VVOaWyJIMAORy0T05OXlyHKdRbu2gKlmrE/U/fYsuCi3rYNJVsuv1uj8ajS7yLQstpOtvWlPT32k9kEdrFg24PajTi8dOL4Y8nM2iqiXYiPhSkeaKyON4PB6QlPgzXdf1870YwMN4PN6b26ASxk8g3pfbS8UwkQUAAmLNokGu0iIwfjX02keaSzJ4fX0dJrLxM4knIM0leYhcYDnp2Mup6cueFREvfX856dhVY9rieZ7tuq6/7zROKu153sFyNRqNRqPRvA9/AHtLag4LyzlCAAAAAElFTkSuQmCC); +} + +/* General panels */ + +div[id^=GPgeocodeResultsClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAKPSURBVFiF7Za9ctpAFIXPkQY39oukS+GZyHkeGKOA3YALqNSEFJbsGWzZscX7wKRJlxk/B3JDRntToD9kCUkJnjT7dYgVh2/v7t4FNBqNRqPR/C/YZNBy0ukJ1enZUWTTgSobIwBXE3MuhvHy+evv+0P8uevr6x7J0zAMbcdxynNFeHNzM1dKvVxdXdXm1govJ50eKN8BGIAsrKPovCgtAJdT847gAIAIefmv0rFsnItFGIbnRWkRoed5dwC2uSKXddJGbTLVx2wcu6uNeS+5iRKAq6npx7IAQIr60MKtPJbM5aJ7fHx8LyJZrghd1/WxlY1fYW1urbA1i4YQyc0a7dXUfBYHRlJZgHb2tQTWUXTRyGoPo9FoSDLNJWl7nvfsOI6RVJbMckkGYRjW5jbaw8n+BDlMnhmQhQI2AL9kvyaB1Yn6Vfu8Lcn+FJE0l+RCKbUhs1ySwXq97lft8zyNhIG30lJ8+cCyaW6J9E5sC1mghTCwlf4xMecROdx9sfwwOxQiwtvb27lSqihdepjto/7QKhARfDNL0m7i/gal1NvY3CHWlFZLOtd6yka8S5ULraeMVlVuVOFSWUpAET8bxe5qYz6J037VVOaWyJIMAORy0T05OXlyHKdRbu2gKlmrE/U/fYsuCi3rYNJVsuv1uj8ajS7yLQstpOtvWlPT32k9kEdrFg24PajTi8dOL4Y8nM2iqiXYiPhSkeaKyON4PB6QlPgzXdf1870YwMN4PN6b26ASxk8g3pfbS8UwkQUAAmLNokGu0iIwfjX02keaSzJ4fX0dJrLxM4knIM0leYhcYDnp2Mup6cueFREvfX856dhVY9rieZ7tuq6/7zROKu153sFyNRqNRqPRvA9/AHtLag4LyzlCAAAAAElFTkSuQmCC); +} + +div[id^=GPadvancedSearchClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAGbElEQVRo3u2Zf4xUVxXHP+e+mV2QdVdCaaAZagoNbRMxEpeuP0CXbqupURuNVFqzK84OryxIjYJt0vjH9I/+Q0VNy9r17ZsJQrDo1hqNqdEKbECKRQjVxugGS8kyFZDS7UKxu8ube/znTvPcALuZfftHdb7/TO6ZM+/c9z0/7x2ooYYaaqihhv9BZLPZ5q6urtmT0ZUaXdVhzZo1M1Kp1ADwXuDjYRj+7Vr6pkZZdUin098AbhSRwUwmM5BYRHd2dn5CRDYAK4DrgHPAAaA7DMMD0xw53wc+NDY29tkdO3acB+jo6JhTV1f3a+ClKIq+uX379pEk7fq+n46i6F7P8zIjIyPbdu7ceQmgvb191syZM79trd0ENIjIXb29vb+fMtG+76ettU8A666h1pPJZDbm8/lomoh+2y1Pi8guAFX9CjAfYHh4uL6vr28saaKttdvcclhEXnR2W4C7gQ+o6m8KhcJnJvO81EQKqvok8IBbngWettb+0xhzA3A/cD2w7tSpUxbYMA0pulxVK8v5qrp5vE5jY+MKYE+Sdq21N8eWTar6KcdHo4jcBijw1GSf501ULoCKV5+PoujLnue9KiJnPc/7i4g8paq3AgtFZFlzc/Oeo0ePDiYYVS2q+jTQGB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bWxsXCEiO4AbYl9fcvt+T0xWEpEv9vb2/mkq3s3n86n+/n4WL158s6p+TVXvAW4BXhGR59xoVxeL5KF0Ot0TG/+m/5rU9/1brbX7XJpNmezYIeJOVX1+gnHwjmKxuC/JI3gul7sH+IWL5p+p6oUr2P1esVgcmMzzErsmDYLg78aYlcAZYK61NpEy0tDQEK/7r4nIFuBx4HRFePHixYMkDBHpcoH4V2vtIPBba+3vgOGKzokTJ16Z9DST5Oamg+yhoSEFeoAX0un0kt7e3ofDMHxobGxsCXAI6Jk3b16if2Bks9mVqvpp4N/As57nPRqG4bPFYvHno6Ojj4rICWvt/tbW1sk7bjrukH3fX2Kt3eNq+d4wDNt4lyCfz5tSqXQY+DDwUBiGjydyLpiOzQZB8LIxpg3YWy6XV/MuQqlUugVYCAxGUfQkNUwfurq6Zmez2eYaEzXUUEMN/x/4D41MuU8OSr8EAAAAAElFTkSuQmCC); + background-position: -60px 0; +} + +/* Advanced search picto */ + +span[id^=GPshowAdvancedSearchOpen] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAGbElEQVRo3u2Zf4xUVxXHP+e+mV2QdVdCaaAZagoNbRMxEpeuP0CXbqupURuNVFqzK84OryxIjYJt0vjH9I/+Q0VNy9r17ZsJQrDo1hqNqdEKbECKRQjVxugGS8kyFZDS7UKxu8ube/znTvPcALuZfftHdb7/TO6ZM+/c9z0/7x2ooYYaaqihhv9BZLPZ5q6urtmT0ZUaXdVhzZo1M1Kp1ADwXuDjYRj+7Vr6pkZZdUin098AbhSRwUwmM5BYRHd2dn5CRDYAK4DrgHPAAaA7DMMD0xw53wc+NDY29tkdO3acB+jo6JhTV1f3a+ClKIq+uX379pEk7fq+n46i6F7P8zIjIyPbdu7ceQmgvb191syZM79trd0ENIjIXb29vb+fMtG+76ettU8A666h1pPJZDbm8/lomoh+2y1Pi8guAFX9CjAfYHh4uL6vr28saaKttdvcclhEXnR2W4C7gQ+o6m8KhcJ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CXD90n/VBZHlTU1Ne33fr0Sb5HK5jzQ1Ne0DPhYb7wZV9SfVGi2Xy6Vxog+KyCZARWSzi+SFixYt+paILHJ7U+ANa+3hRO46fN9fXi6XN7gRbq5rfPtVtbtQKBzM5XJ7gDuAc8aYtiAIXq72hTdu3Fh/5swZbWxsXCEiO4AbYl9fcvt+T0xWEpEv9vb2/mkq3s3n86n+/n4WL158s6p+TVXvAW4BXhGR59xoVxeL5KF0Ot0TG/+m/5rU9/1brbX7XJpNmezYIeJOVX1+gnHwjmKxuC/JI3gul7sH+IWL5p+p6oUr2P1esVgcmMzzErsmDYLg78aYlcAZYK61NpEy0tDQEK/7r4nIFuBx4HRFePHixYMkDBHpcoH4V2vtIPBba+3vgOGKzokTJ16Z9DST5Oamg+yhoSEFeoAX0un0kt7e3ofDMHxobGxsCXAI6Jk3b16if2Bks9mVqvpp4N/As57nPRqG4bPFYvHno6Ojj4rICWvt/tbW1sk7bjrukH3fX2Kt3eNq+d4wDNt4lyCfz5tSqXQY+DDwUBiGjydyLpiOzQZB8LIxpg3YWy6XV/MuQqlUugVYCAxGUfQkNUwfurq6Zmez2eYaEzXUUEMN/x/4D41MuU8OSr8EAAAAAElFTkSuQmCC); + background-position: -30px 0; +} + +/* Autocomplete list / geocode results */ + +div[id^=GPautoCompleteList], +div[id^=GPgeocodeResultsList] { + margin-left: 27px; + box-shadow: 0 1px 5px #000; +} + +div[id^=GPgeocodeResultsList] { + top: 38px; + border-radius: 5px; +} + +/* ================================================================== */ +/* Toolbars +/* ================================================================== */ + +.leaflet-draw-section { + position: relative; +} + +.leaflet-draw-toolbar { + margin-top: 12px; +} + +.leaflet-draw-toolbar-top { + margin-top: 0; +} + +.leaflet-draw-toolbar-notop a:first-child { + border-top-right-radius: 0; +} + +.leaflet-draw-toolbar-nobottom a:last-child { + border-bottom-right-radius: 0; +} + +.leaflet-draw-toolbar a { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAAeCAYAAACWuCNnA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OTI2LDExIC0xMSwxMSAtNi4wNzQsMCAtMTEsLTQuOTIyIC0xMSwtMTEgMCwtNi4wNzQgNC45MjYsLTExIDExLC0xMSA2LjA3NCwwIDExLDQuOTI2IDExLDExIHoiCiAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIgLz4KPC9zdmc+Cg==); + background-repeat: no-repeat; + background-size: 300px 30px; + background-clip: padding-box; +} + +.leaflet-retina .leaflet-draw-toolbar a { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAA8CAYAAAC6nMS5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA16SURBVHic7d1/jBxneQfw7zNzvotdn+9sVQkxoRKoammBqqpbk6uT5mLfvHPn42yn1VFRVCEhoFH5IYpoSaUCKi1NcGkcfrbCVRFKEwG2aHLn83pmLvY2CTqT1AmCOBE0EOT4B0nBPw/snb2dp3/sLr6s77i923dud/a+H8ny7tzMo8f3eud99p133gGIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiFYGaXYCRETUPMYYrWe/MAzZX2QQ27d5OpqdABFROxgZGVlz5cqVrzuOc18QBJPNzofsYvvSYrVcgTVftZ2l6npgYODXHMc5oKoHHcfZHQTB2WbnRETpGRkZWVMoFA6IyO2qutX3/R1Z64TnO8fWOwLSzti+mSKDg4M3l0qlnSJyG4CbAFwP4ByAlwE8paoPX3fddcH4+PjP00yk5QqsrDPGvAZAHsBrReRNqvpeY8x/iMg9QRCcaXJ6ZIHv+xtUdReAHQBej/IHGABOAnhORMY6OjoempiYONe0JC3zPM84jjOqqrfi6r/3RQCPAdgXhmHUvOyaa3R01L1w4cJBALdVNq1W1THP87woir7ZzNyocWzf7PA8b4uI7E6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qo4BqD1xXRaRPw6CwMZl1GXjuu6XSqXSOwH8LoD1AMaMMecA1PtF53WV4wCUC+menp699jOlpWD7rhz5fP5Kf3//UFdX132q+l4Ad3d3d7/fGPN1EZlQ1e/19PS8dPbs2fWu694kIgOqOqqqm4Dy4rKlUumOw4cPN3KVYk7WVkE1xsx5aSBLT+duhDEmQrkSnssZlIeXnxWRY6p6PI7j41nveFeq4eHh9XEc7xSRnQBej6t3kp5EuWh+OI7jh+dYsDDTfN/frKrjAKpPmv9pkiS7JicnH29mXku1devWV3d0dBxAuRNeMhF5ulgsjqRxgk7DfOfqxWr1czvbtzGt3r5zGRwc7FPV3ap6y0L7ishPAHx63bp1e/bt2xenkQ8LLEuMMZtE5JCqfhfAMwCeSZLkO2vWrDk+NjbGyZHUFjzP2yginwcAVX1fVi99Vo2OjnaeP3/+3SLydgBvBNBd56GXAHxXVR/s7e3dm9YJOg0rqQNm+y5dFtp3HmKM2QxgF8qr9b8GwA0AzgH4MYBjIjJ28eLFkFeOiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIhWgv8Hnffz4dmwY9cAAAAASUVORK5CYII=); + background-image: linear-gradient(transparent, transparent), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5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tb3ZlIgogICAgICAgaWQ9InJlbW92ZS1kaXNhYmxlZCIKICAgICAgIHg9IjAiCiAgICAgICB5PSIwIgogICAgICAgd2lkdGg9IjEwMCUiCiAgICAgICBoZWlnaHQ9IjEwMCUiIC8+CiAgPC9nPgogIDxwYXRoCiAgICAgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzQ2NDY0NjtzdHJva2Utd2lkdGg6MjtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgIGlkPSJjaXJjbGUtMyIKICAgICBkPSJtIDU4MS42NTcyNSwzMCBjIDAsNi4wNzggLTQuOTI2LDExIC0xMSwxMSAtNi4wNzQsMCAtMTEsLTQuOTIyIC0xMSwtMTEgMCwtNi4wNzQgNC45MjYsLTExIDExLC0xMSA2LjA3NCwwIDExLDQuOTI2IDExLDExIHoiCiAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIgLz4KPC9zdmc+Cg==); +} + +.leaflet-draw a { + display: block; + text-align: center; + text-decoration: none; +} + +.leaflet-draw a .sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} + +/* ================================================================== */ +/* Toolbar actions menu +/* ================================================================== */ + +.leaflet-draw-actions { + display: none; + list-style: none; + margin: 0; + padding: 0; + position: absolute; + left: 26px; /* leaflet-draw-toolbar.left + leaflet-draw-toolbar.width */ + top: 0; + white-space: nowrap; +} + +.leaflet-touch .leaflet-draw-actions { + left: 32px; +} + +.leaflet-right .leaflet-draw-actions { + right: 26px; + left: auto; +} + +.leaflet-touch .leaflet-right .leaflet-draw-actions { + right: 32px; + left: auto; +} + +.leaflet-draw-actions li { + display: inline-block; +} + +.leaflet-draw-actions li:first-child a { + border-left: none; +} + +.leaflet-draw-actions li:last-child a { + -webkit-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.leaflet-right .leaflet-draw-actions li:last-child a { + -webkit-border-radius: 0; + border-radius: 0; +} + +.leaflet-right .leaflet-draw-actions li:first-child a { + -webkit-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.leaflet-draw-actions a { + background-color: #919187; + border-left: 1px solid #AAA; + color: #FFF; + font: 11px/19px "Helvetica Neue", Arial, Helvetica, sans-serif; + line-height: 28px; + text-decoration: none; + padding-left: 10px; + padding-right: 10px; + height: 28px; +} + +.leaflet-touch .leaflet-draw-actions a { + font-size: 12px; + line-height: 30px; + height: 30px; +} + +.leaflet-draw-actions-bottom { + margin-top: 0; +} + +.leaflet-draw-actions-top { + margin-top: 1px; +} + +.leaflet-draw-actions-top a, +.leaflet-draw-actions-bottom a { + height: 27px; + line-height: 27px; +} + +.leaflet-draw-actions a:hover { + background-color: #A0A098; +} + +.leaflet-draw-actions-top.leaflet-draw-actions-bottom a { + height: 26px; + line-height: 26px; +} + +/* ================================================================== */ +/* Draw toolbar +/* ================================================================== */ + +.leaflet-draw-toolbar .leaflet-draw-draw-polyline { + background-position: -2px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline { + background-position: 0 -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-polygon { + background-position: -31px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon { + background-position: -29px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-rectangle { + background-position: -62px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle { + background-position: -60px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-circle { + background-position: -92px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle { + background-position: -90px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-marker { + background-position: -122px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker { + background-position: -120px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker { + background-position: -273px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker { + background-position: -271px -1px; +} + +/* ================================================================== */ +/* Edit toolbar +/* ================================================================== */ + +.leaflet-draw-toolbar .leaflet-draw-edit-edit { + background-position: -152px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit { + background-position: -150px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-edit-remove { + background-position: -182px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove { + background-position: -180px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled { + background-position: -212px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled { + background-position: -210px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled { + background-position: -242px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled { + background-position: -240px -2px; +} + +/* ================================================================== */ +/* Drawing styles +/* ================================================================== */ + +.leaflet-mouse-marker { + background-color: #fff; + cursor: crosshair; +} + +.leaflet-draw-tooltip { + background: rgb(54, 54, 54); + background: rgba(0, 0, 0, 0.5); + border: 1px solid transparent; + -webkit-border-radius: 4px; + border-radius: 4px; + color: #fff; + font: 12px/18px "Helvetica Neue", Arial, Helvetica, sans-serif; + margin-left: 20px; + margin-top: -21px; + padding: 4px 8px; + position: absolute; + visibility: hidden; + white-space: nowrap; + z-index: 6; +} + +.leaflet-draw-tooltip:before { + border-right: 6px solid black; + border-right-color: rgba(0, 0, 0, 0.5); + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + content: ""; + position: absolute; + top: 7px; + left: -7px; +} + +.leaflet-error-draw-tooltip { + background-color: #F2DEDE; + border: 1px solid #E6B6BD; + color: #B94A48; +} + +.leaflet-error-draw-tooltip:before { + border-right-color: #E6B6BD; +} + +.leaflet-draw-tooltip-single { + margin-top: -12px +} + +.leaflet-draw-tooltip-subtext { + color: #f8d5e4; +} + +.leaflet-draw-guide-dash { + font-size: 1%; + opacity: 0.6; + position: absolute; + width: 5px; + height: 5px; +} + +/* ================================================================== */ +/* Edit styles +/* ================================================================== */ + +.leaflet-edit-marker-selected { + background-color: rgba(254, 87, 161, 0.1); + border: 4px dashed rgba(254, 87, 161, 0.6); + -webkit-border-radius: 4px; + border-radius: 4px; + box-sizing: content-box; +} + +.leaflet-edit-move { + cursor: move; +} + +.leaflet-edit-resize { + cursor: pointer; +} + +/* ================================================================== */ +/* Old IE styles +/* ================================================================== */ + +.leaflet-oldie .leaflet-draw-toolbar { + border: 1px solid #999; +} + diff --git a/leaflet-2.3.4/dist/GpPluginLeaflet-map.js b/leaflet-2.3.4/dist/GpPluginLeaflet-map.js new file mode 100644 index 000000000..269dcbd5b --- /dev/null +++ b/leaflet-2.3.4/dist/GpPluginLeaflet-map.js @@ -0,0 +1,1804 @@ +/*! + * @brief French Geoportal Extension for Leaflet + * + * This software is released under the licence CeCILL-B (Free BSD compatible) + * @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt + * @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt + * @see http://www.cecill.info/ + * + * @copyright copyright (c) IGN + * @license CeCILL-B + * @author IGN + * @version 2.3.4 + * @date 30/08/2023 + * + */ + +/*! + * @overview Proj4Leaflet - Smooth Proj4js integration with Leaflet + * @copyright Copyright (c) 2012, Kartena AB + * @license BSD 2-Clause "Simplified" License + * See https://raw.githubusercontent.com/kartena/Proj4Leaflet/master/LICENSE + * @version 1.0.2 + */ + +/*! + * @overview leaflet-draw - Vector drawing and editing plugin for Leaflet + * @copyright Copyright (c) 2012-2017 Jon West, Jacob Toye, and Leaflet + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/Leaflet/Leaflet.draw/master/MIT-LICENSE.md + * @version 1.0.4 + */ + +/*! + * Sortable -- JavaScript library for reorderable drag-and-drop lists on modern + * browsers and touch devices. No jQuery required. Supports Meteor, AngularJS, + * React, Polymer, Vue, Knockout and any CSS library, e.g. Bootstrap. + * + * Released under MIT LICENSE + * + * Copyright Lebedev Konstantin + * https://github.com/SortableJS/Sortable + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * @version 1.14.0 + */ + +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.4 + */ + +/*! + * @overview Proj4js - Javascript reprojection library. + * + * @authors + * - Mike Adair madairATdmsolutions.ca + * - Richard Greenwood richATgreenwoodmap.com + * - Didier Richard didier.richardATign.fr + * - Stephen Irons stephen.ironsATclear.net.nz + * - Olivier Terral oterralATgmail.com + * - Calvin Metcalf cmetcalfATappgeo.com + * + * @copyright Copyright (c) 2014, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons, Olivier Terral and Calvin Metcalf + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/proj4js/proj4js/master/LICENSE.md + * @version 2.7.5 + */ + +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("leaflet"), require("node-fetch"), require("xmldom")); + else if(typeof define === 'function' && define.amd) + define("Gp", ["leaflet", "require", "require"], factory); + else if(typeof exports === 'object') + exports["Gp"] = factory(require("leaflet"), require("node-fetch"), require("xmldom")); + else + root["Gp"] = factory(root["L"], root[undefined], root[undefined]); +})(this, function(__WEBPACK_EXTERNAL_MODULE_leaflet__, __WEBPACK_EXTERNAL_MODULE_node_fetch__, __WEBPACK_EXTERNAL_MODULE_xmldom__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./src/Leaflet/index.js"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./node_modules/es6-promise/dist/es6-promise.js": +/*!******************************************************!*\ + !*** ./node_modules/es6-promise/dist/es6-promise.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(process, global) {/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */\n\n(function (global, factory) {\n\t true ? module.exports = factory() :\n\tundefined;\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\n\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && \"function\" === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve$1(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n try {\n then$$1.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then$$1) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then$$1, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$1) {\n if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$1 === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$1)) {\n handleForeignThenable(promise, maybeThenable, then$$1);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n var then$$1 = void 0;\n try {\n then$$1 = value.then;\n } catch (error) {\n reject(promise, error);\n return;\n }\n handleMaybeThenable(promise, value, then$$1);\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = true;\n\n if (hasCallback) {\n try {\n value = callback(detail);\n } catch (e) {\n succeeded = false;\n error = e;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (succeeded === false) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n}\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve$$1 = c.resolve;\n\n\n if (resolve$$1 === resolve$1) {\n var _then = void 0;\n var error = void 0;\n var didError = false;\n try {\n _then = entry.then;\n } catch (e) {\n didError = true;\n error = e;\n }\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise$1) {\n var promise = new c(noop);\n if (didError) {\n reject(promise, error);\n } else {\n handleMaybeThenable(promise, entry, _then);\n }\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$1) {\n return resolve$$1(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$1(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise$1 = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise$1.prototype.then = then;\nPromise$1.all = all;\nPromise$1.race = race;\nPromise$1.resolve = resolve$1;\nPromise$1.reject = reject$1;\nPromise$1._setScheduler = setScheduler;\nPromise$1._setAsap = setAsap;\nPromise$1._asap = asap;\n\n/*global self*/\nfunction polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise$1;\n}\n\n// Strange compat..\nPromise$1.polyfill = polyfill;\nPromise$1.Promise = Promise$1;\n\nreturn Promise$1;\n\n})));\n\n\n\n//# sourceMappingURL=es6-promise.map\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9lczYtcHJvbWlzZS9kaXN0L2VzNi1wcm9taXNlLmpzPzEzNjgiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxDQUFDLEtBQTREO0FBQzdELENBQUMsU0FDK0I7QUFDaEMsQ0FBQyxxQkFBcUI7O0FBRXRCO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBLENBQUM7QUFDRDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx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uICAgIGF1dGhvciA9IGZpbmRBdXRob3IoKTtcbiAgICBib29rcyAgPSBmaW5kQm9va3NCeUF1dGhvcihhdXRob3IpO1xuICAgIC8vIHN1Y2Nlc3NcbiAgfSBjYXRjaChyZWFzb24pIHtcbiAgICAvLyBmYWlsdXJlXG4gIH1cbiAgYGBgXG4gICBFcnJiYWNrIEV4YW1wbGVcbiAgIGBgYGpzXG4gICBmdW5jdGlvbiBmb3VuZEJvb2tzKGJvb2tzKSB7XG4gICB9XG4gICBmdW5jdGlvbiBmYWlsdXJlKHJlYXNvbikge1xuICAgfVxuICAgZmluZEF1dGhvcihmdW5jdGlvbihhdXRob3IsIGVycil7XG4gICAgaWYgKGVycikge1xuICAgICAgZmFpbHVyZShlcnIpO1xuICAgICAgLy8gZmFpbHVyZVxuICAgIH0gZWxzZSB7XG4gICAgICB0cnkge1xuICAgICAgICBmaW5kQm9vb2tzQnlBdXRob3IoYXV0aG9yLCBmdW5jdGlvbihib29rcywgZXJyKSB7XG4gICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgZmFpbHVyZShlcnIpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICBmb3VuZEJvb2tzKGJvb2tzKTtcbiAgICAgICAgICAgIH0gY2F0Y2gocmVhc29uKSB7XG4gICAgICAgICAgICAgIGZhaWx1cmUocmVhc29uKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfSBjYXRjaChlcnJvcikge1xuICAgICAgICBmYWlsdXJlKGVycik7XG4gICAgICB9XG4gICAgICAvLyBzdWNjZXNzXG4gICAgfVxuICB9KTtcbiAgYGBgXG4gICBQcm9taXNlIEV4YW1wbGU7XG4gICBgYGBqYXZhc2NyaXB0XG4gIGZpbmRBdXRob3IoKS5cbiAgICB0aGVuKGZpbmRCb29rc0J5QXV0aG9yKS5cbiAgICB0aGVuKGZ1bmN0aW9uKGJvb2tzK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UkMTtcblxufSkpKTtcblxuXG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWVzNi1wcm9taXNlLm1hcFxuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/es6-promise/dist/es6-promise.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/package.json": +/*!********************************************************!*\ + !*** ./node_modules/geoportal-access-lib/package.json ***! + \********************************************************/ +/*! exports provided: _from, _id, _inBundle, _integrity, _location, _phantomChildren, _requested, _requiredBy, _resolved, _shasum, _spec, _where, author, bugs, bundleDependencies, date, dependencies, deprecated, description, devDependencies, homepage, keywords, license, main, module, name, nyc, optionalDependencies, peerDependencies, repository, scripts, version, default */ +/***/ (function(module) { + +eval("module.exports = JSON.parse(\"{\\\"_from\\\":\\\"geoportal-access-lib@3.3.4\\\",\\\"_id\\\":\\\"geoportal-access-lib@3.3.4\\\",\\\"_inBundle\\\":false,\\\"_integrity\\\":\\\"sha512-0D0YT93mRjhm7tvKC7tM0V/10CoftWqZ836AR/O79BEUwSk/CicmE85IK5NLh/sFclQX8hvaYexpn3ZetVbJWg==\\\",\\\"_location\\\":\\\"/geoportal-access-lib\\\",\\\"_phantomChildren\\\":{},\\\"_requested\\\":{\\\"type\\\":\\\"version\\\",\\\"registry\\\":true,\\\"raw\\\":\\\"geoportal-access-lib@3.3.4\\\",\\\"name\\\":\\\"geoportal-access-lib\\\",\\\"escapedName\\\":\\\"geoportal-access-lib\\\",\\\"rawSpec\\\":\\\"3.3.4\\\",\\\"saveSpec\\\":null,\\\"fetchSpec\\\":\\\"3.3.4\\\"},\\\"_requiredBy\\\":[\\\"/\\\"],\\\"_resolved\\\":\\\"https://registry.npmjs.org/geoportal-access-lib/-/geoportal-access-lib-3.3.4.tgz\\\",\\\"_shasum\\\":\\\"5a82701a7c12c54a40c4d0b5f2aa145acb22a434\\\",\\\"_spec\\\":\\\"geoportal-access-lib@3.3.4\\\",\\\"_where\\\":\\\"/home/runner/work/geoportal-extensions/geoportal-extensions\\\",\\\"author\\\":{\\\"name\\\":\\\"IGNF\\\"},\\\"bugs\\\":{\\\"url\\\":\\\"https://github.com/IGNF/geoportal-access-lib/issues\\\"},\\\"bundleDependencies\\\":false,\\\"date\\\":\\\"29/08/2023\\\",\\\"dependencies\\\":{\\\"es6-promise\\\":\\\"^4.2.4\\\",\\\"node-fetch\\\":\\\"^2.6.1\\\",\\\"xmldom\\\":\\\"^0.1.27\\\"},\\\"deprecated\\\":false,\\\"description\\\":\\\"French Geoportal resources access library\\\",\\\"devDependencies\\\":{\\\"@babel/core\\\":\\\"^7.12.10\\\",\\\"@babel/plugin-transform-template-literals\\\":\\\"^7.12.1\\\",\\\"@babel/preset-env\\\":\\\"^7.12.11\\\",\\\"babel-loader\\\":\\\"^8.2.2\\\",\\\"chai\\\":\\\"^4.1.2\\\",\\\"clean-webpack-plugin\\\":\\\"^3.0.0\\\",\\\"copy-webpack-plugin\\\":\\\"^5.1.2\\\",\\\"eslint\\\":\\\"^7.18.0\\\",\\\"eslint-config-standard\\\":\\\"^16.0.2\\\",\\\"eslint-loader\\\":\\\"^4.0.2\\\",\\\"eslint-plugin-import\\\":\\\"^2.22.1\\\",\\\"eslint-plugin-node\\\":\\\"^11.1.0\\\",\\\"eslint-plugin-promise\\\":\\\"^4.2.1\\\",\\\"eslint-plugin-standard\\\":\\\"^5.0.0\\\",\\\"glob\\\":\\\"^7.1.2\\\",\\\"handlebars-layouts\\\":\\\"^3.1.4\\\",\\\"handlebars-webpack-plugin\\\":\\\"^1.4.1\\\",\\\"html-webpack-plugin\\\":\\\"^4.5.1\\\",\\\"istanbul-instrumenter-loader\\\":\\\"^3.0.1\\\",\\\"jsdoc-webpack-plugin\\\":\\\"^0.3.0\\\",\\\"loglevel\\\":\\\"^1.6.1\\\",\\\"mocha\\\":\\\"^7.2.0\\\",\\\"mocha-loader\\\":\\\"^5.1.5\\\",\\\"mocha-webpack\\\":\\\"^2.0.0-beta.0\\\",\\\"mochawesome\\\":\\\"^6.2.1\\\",\\\"nyc\\\":\\\"^15.1.0\\\",\\\"path\\\":\\\"^0.12.7\\\",\\\"replace-bundle-webpack-plugin\\\":\\\"^1.0.0\\\",\\\"sinon\\\":\\\"^9.2.4\\\",\\\"sinon-es6\\\":\\\"0.0.3\\\",\\\"speed-measure-webpack-plugin\\\":\\\"^1.4.2\\\",\\\"string-template\\\":\\\"^1.0.0\\\",\\\"terser-webpack-plugin\\\":\\\"^2.3.8\\\",\\\"webpack\\\":\\\"^4.46.0\\\",\\\"webpack-cli\\\":\\\"^3.3.12\\\",\\\"webpack-dev-server\\\":\\\"^3.11.2\\\",\\\"webpack-node-externals\\\":\\\"^2.5.2\\\",\\\"webpack-shell-plugin\\\":\\\"^0.5.0\\\"},\\\"homepage\\\":\\\"https://github.com/IGNF/geoportal-access-lib#readme\\\",\\\"keywords\\\":[\\\"geoportail\\\",\\\"webservice\\\",\\\"javascript\\\",\\\"es6\\\"],\\\"license\\\":\\\"CECILL-B\\\",\\\"main\\\":\\\"dist/GpServices-src.js\\\",\\\"module\\\":\\\"src/Gp.js\\\",\\\"name\\\":\\\"geoportal-access-lib\\\",\\\"nyc\\\":{\\\"include\\\":[\\\"src/**/*.js\\\"],\\\"instrument\\\":false,\\\"sourceMap\\\":false},\\\"optionalDependencies\\\":{},\\\"peerDependencies\\\":{},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"git+https://github.com/IGNF/geoportal-access-lib.git\\\"},\\\"scripts\\\":{\\\"build\\\":\\\"webpack --mode=none\\\",\\\"build:dev\\\":\\\"webpack --mode=development\\\",\\\"build:prod\\\":\\\"webpack --mode=production\\\",\\\"clean\\\":\\\"echo \\\\\\\"Warning: no yet implemented!\\\\\\\" && exit 0\\\",\\\"cover\\\":\\\"nyc --reporter=lcov --reporter=text npm run test\\\",\\\"doc\\\":\\\"npm run doc:serve\\\",\\\"doc:serve\\\":\\\"webpack-dev-server --content-base jsdoc --port 9001 --open\\\",\\\"eslint\\\":\\\"eslint src/\\\",\\\"sample\\\":\\\"npm run sample:serve\\\",\\\"sample:serve\\\":\\\"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"sample:serve:dev\\\":\\\"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"sample:serve:prod\\\":\\\"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"setup\\\":\\\"npm install\\\",\\\"test\\\":\\\"mocha-webpack --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob \\\\\\\"test_*.js\\\\\\\" test/spec/\\\",\\\"test:end-to-end:serve\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js\\\",\\\"test:end-to-end:serve:docker\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js\\\",\\\"test:serve\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js\\\",\\\"test:serve:docker\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js\\\"},\\\"version\\\":\\\"3.3.4\\\"}\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiIuL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9wYWNrYWdlLmpzb24uanMiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/package.json\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js": +/*!**************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js ***! + \**************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Errors raised by API for one among three reasons : wrong API usage, underlying service error or unknown reason.\n *\n * @property {String} message - Error message\n * @property {Number} status - Error status : when {@link Gp.Error.TYPE_SRVERR}, gives the [HTTP status of the underlying web service response]{@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} ; -1 otherwise.\n * @property {String} type - Error type ({@link Gp.Error.TYPE_SRVERR}, {@link Gp.Error.TYPE_USEERR} or {@link Gp.Error.TYPE_UNKERR}).\n *\n * @namespace\n * @alias Gp.Error\n * @param {Object|String} error - Options for creating error object. Can be a String (message) or an Object.\n * @param {String} error.message - Error message to return to user.\n * @param {enum} [error.type=TYPE_UNKERR] - Error type\n * @param {status} [error.status=-1] - Error status : when {@link Gp.Error.TYPE_SRVERR}, gives the [HTTP status of the underlying web service response]{@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}.\n *\n */\nfunction ErrorService (error) {\n if (!(this instanceof ErrorService)) {\n throw new TypeError(\"ErrorService constructor cannot be called as a function.\");\n }\n\n var e = error;\n if (typeof error === \"string\" || error instanceof String) {\n this.message = error;\n this.status = -1;\n this.type = ErrorService.TYPE_UNKERR;\n } else {\n this.message = e.message || \"undefined!?\";\n this.type = e.type;\n this.status = e.status || -1;\n }\n\n this.name = \"ErrorService\";\n this.stack = (new Error()).stack;\n}\n\n/**\n * Error raised when underlying geoportal service answers on error.\n *\n * @type {String}\n * @constant\n * @static\n */\nErrorService.TYPE_SRVERR = \"SERVICE_ERROR\";\n/**\n * Error raised when funcion use is inappropriate\n *\n * @type {String}\n * @constant\n * @static\n */\nErrorService.TYPE_USEERR = \"USAGE_ERROR\";\n/**\n * Error raised when API can't perform the job for a reason other than the two other ones.\n *\n * @type {String}\n * @constant\n * @static\n */\nErrorService.TYPE_UNKERR = \"UNKNOWN_ERROR\";\n\n/**\n * @lends module:ErrorService\n */\nErrorService.prototype = Object.create(Error.prototype, {\n constructor : {\n value : ErrorService,\n writable : true,\n configurable : true\n }\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ErrorService);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvRXhjZXB0aW9ucy9FcnJvclNlcnZpY2UuanM/ODRiZCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBLGNBQWMsT0FBTztBQUNyQixjQUFjLE9BQU8sK0JBQStCLDJCQUEyQixpRUFBaUUsOERBQThELEVBQUU7QUFDaE4sY0FBYyxPQUFPLHFCQUFxQiwyQkFBMkIsR0FBRywyQkFBMkIsS0FBSywyQkFBMkI7QUFDbkk7QUFDQTtBQUNBO0FBQ0EsV0FBVyxjQUFjO0FBQ3pCLFdBQVcsT0FBTztBQUNsQixXQUFXLEtBQUs7QUFDaEIsV0FBVyxPQUFPLDBDQUEwQywyQkFBMkIsaUVBQWlFLDhEQUE4RDtBQUN0TjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsVUFBVTtBQUNWO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsVUFBVTtBQUNWO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsVUFBVTtBQUNWO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLENBQUM7O0FBRW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IDogdHJ1ZSxcbiAgICAgICAgY29uZmlndXJhYmxlIDogdHJ1ZVxuICAgIH1cbn0pO1xuXG5leHBvcnQgZGVmYXVsdCBFcnJvclNlcnZpY2U7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Formats/WPS.js": +/*!**************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Formats/WPS.js ***! + \**************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n\n\n/**\n * @classdesc\n * Standard WPS\n *\n * @constructor\n * @alias Gp.Formats.WPS\n * @param {Object} options - options\n * @param {Object} options.data - objet\n * @param {String} options.method - POST|GET\n * @param {String} options.param.service - \"WPS\"\n * @param {String} options.param.version - \"1.0.0\"\n * @param {String} options.param.identifier - \"gs:WPSElevation|gs:WPSLineElevation\"\n * @param {String} options.param.rawdataoutput - \"result\"\n * @param {String} options.param.request - \"Execute\"\n * @param {Function} options.onsuccess - function callback success (TODO)\n * @param {Function} options.onerror - function callback error (TODO)\n * @private\n */\nfunction WPS (options) {\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur WPS()]\");\n\n if (!(this instanceof WPS)) {\n throw new TypeError(\"WPS constructor cannot be called as a function.\");\n }\n\n this.options = options || {};\n\n /**\n * Objet DATA\n */\n this.DataObject = this.options.data;\n\n if (!this.DataObject) {\n throw new TypeError(\"This data object is not defined !\");\n }\n\n /**\n * param service.\n * Par defaut, \"WPS\".\n */\n this.paramservice = this.options.param.service || \"WPS\";\n\n /**\n * param version.\n * Par defaut, \"1.0.0\".\n */\n this.paramversion = this.options.param.version || \"1.0.0\";\n\n /**\n * param identifier\n * Par defaut, \"gs:WPS\"\n */\n this.paramidentifier = this.options.param.identifier || \"gs:WPS\";\n\n /**\n * param rawdataoutput\n * Par defaut, \"result\".\n */\n this.paramrawdataoutput = this.options.param.rawdataoutput || \"result\";\n\n /**\n * param request\n * Par defaut, \"Execute\".\n */\n this.paramrequest = this.options.param.request || \"Execute\";\n\n /**\n * methode.\n * Par defaut, \"GET\".\n */\n this.method = this.options.method || \"GET\";\n}\n\nWPS.prototype = {\n\n /**\n * @lends module:WPS#\n */\n\n /**\n * request\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : WPS,\n\n /**\n * Template de la requête.\n */\n template : {\n get : {\n value : \"service=__SERVICE__\" +\n \"&version=__VERSION__\" +\n \"&rawdataoutput=__RAWDATAOUTPUT__\" +\n \"&identifier=__IDENTIFIER__\" +\n \"&request=__REQUEST__\" +\n \"&datainputs=\",\n\n input : \"__KEY__=__DATA__\"\n\n },\n post : {\n\n value : \"\" +\n \"\" +\n \"__IDENTIFIER__\" +\n \"\" +\n \"\" +\n \"\" +\n \"\" +\n \"\" +\n \"__RAWDATAOUTPUT__\" +\n \"\" +\n \"\" +\n \"\",\n\n input : \"\" +\n \"__KEY__\" +\n \"\" +\n \"__DATA__\" +\n \"\" +\n \"\"\n }\n },\n\n /**\n * Namespace par defaut de la requete POST.\n *\n * @returns {String} namespace\n */\n namespaceByDefault : function () {\n var ns = [\n \"xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\"\",\n \"xmlns=\\\"http://www.opengis.net/wps/1.0.0\\\"\",\n \"xmlns:wfs=\\\"http://www.opengis.net/wfs\\\"\",\n \"xmlns:wps=\\\"http://www.opengis.net/wps/1.0.0\\\"\",\n \"xmlns:ows=\\\"http://www.opengis.net/ows/1.1\\\"\",\n \"xmlns:gml=\\\"http://www.opengis.net/gml\\\"\",\n \"xmlns:ogc=\\\"http://www.opengis.net/ogc\\\"\",\n \"xmlns:wcs=\\\"http://www.opengis.net/wcs/1.1.1\\\"\",\n \"xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"\"\n ];\n\n return ns.join(\" \");\n },\n\n /**\n * Schemalocation par defaut.\n *\n * @returns {String} schemaLocation\n */\n schemaLocationByDefault : function () {\n return \"xsi:schemaLocation=\\\"http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd\\\"\";\n },\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out :\n * // service=__SERVICE__\n * // &version=__VERSION__\n * // &rawdataoutput=__RAWDATAOUTPUT__\n * // &identifier=__IDENTIFIER__\n * // &request=__REQUEST__\n * // &datainputs=\"__DATAINPUTS__\"\n * // avec __DATAINPUTS__ = __KEY__=__DATA__;...\n *\n * // POST out :\n * // \n * // \n * // __IDENTIFIER__\n * // \n * // \n * // \n * // \n * // \n * // __RAWDATAOUTPUT__\n * // \n * // \n * // \",\n * // avec __DATAINPUTS__\n * // \n * // __KEY__\n * // \n * // __DATA__\n * // \n * // \n *\n * @returns {Boolean} validation de la construction de la requete\n */\n processRequestString : function () {\n this.logger.trace(\"WPS::processRequestString ()\");\n\n var template = \"\";\n if (this.method === \"POST\") {\n template = this.template.post.value;\n } else if (this.method === \"GET\") {\n template = this.template.get.value;\n } else {\n this.logger.error(\"No other method supported by the service !\");\n return false;\n }\n\n template = template.replace(/__SERVICE__/g, this.paramservice);\n template = template.replace(/__VERSION__/g, this.paramversion);\n template = template.replace(/__RAWDATAOUTPUT__/g, this.paramrawdataoutput);\n template = template.replace(/__IDENTIFIER__/g, this.paramidentifier);\n template = template.replace(/__REQUEST__/g, this.paramrequest);\n\n // ajout +\n if (this.method === \"POST\") {\n template = template.replace(/__NAMESPACE__/g, this.namespaceByDefault);\n template = template.replace(/__SCHEMALOCATION__/g, this.schemaLocationByDefault);\n }\n\n // ajout des datainputs\n template = template.replace(//g, this.__addDataInputs());\n\n if (!template) {\n this.logger.warn(\"traduction tmpl : empty request !?\");\n return false;\n }\n\n this.requestString = template;\n this.logger.trace(\"traduction tmpl\", template);\n\n return true;\n },\n\n /**\n * Ajout des données\n *\n * @returns {String} Données concaténées dans une chaine\n */\n __addDataInputs : function () {\n this.logger.trace(\"WPS::__addDataInputs ()\");\n\n // c'est un peu grossier...\n var tmpl = this.method === \"GET\" ? this.template.get.input : this.template.post.input;\n var sep = this.method === \"GET\" ? \";\" : \"\";\n\n var result = \"\";\n var that = this;\n var map = this.DataObject.getData();\n for (var i = 0; i < map.length; i++) {\n // FIXME closure ?\n (function (j) {\n if (sep) {\n sep = (j === map.length - 1) ? \"\" : \";\";\n }\n result = result.concat(that.__addDataInput(tmpl, map[j].k, map[j].v), sep);\n })(i);\n }\n\n return result;\n },\n\n /**\n * Ajout d'une donnée.\n *\n * @param {String} tmpl - template\n * @param {String} key - clef\n * @param {String} data - valeur\n * @returns {String} chaine avec les substitutions clef/valeur\n */\n __addDataInput : function (tmpl, key, data) {\n var tmp = tmpl;\n tmp = tmp.replace(/__KEY__/g, key);\n tmp = tmp.replace(/__DATA__/g, data);\n return tmp;\n },\n\n /**\n * Definir le mode de requête\n *\n * @param {String} method - GET|POST\n */\n setMethod : function (method) {\n if (method === \"GET\" || method === \"POST\") {\n this.method = method;\n } else {\n this.logger.warn(\"support only GET and POST method !\");\n }\n },\n\n /**\n * Retourne le mode de requete (GET|POST).\n *\n * @returns {AltiRequest.options.mode|String} methode (GET|POST)\n */\n getMethod : function () {\n return this.method;\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (WPS);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvRm9ybWF0cy9XUFMuanM/M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kdFVFwiO1xufVxuXG5XUFMucHJvdG90eXBlID0ge1xuXG4gICAgLyoqXG4gICAgICogQGxlbmRzIG1vZHVsZTpXUFMjXG4gICAgICovXG5cbiAgICAvKipcbiAgICAgKiByZXF1ZXN0XG4gICAgICogQHR5cGUge1N0cmluZ31cbiAgICAgKi9cbiAgICByZXF1ZXN0U3RyaW5nIDogbnVsbCxcblxuICAgIC8qKlxuICAgICAqIENvbnN0cnVjdGV1ciAoYWxpYXMpXG4gICAgICovXG4gICAgY29uc3RydWN0b3IgOiBXUFMsXG5cbiAgICAvKipcbiAgICAgKiBUZW1wbGF0ZSBkZSBsYSByZXF1w6p0ZS5cbiAgICAgKi9cbiAgICB0ZW1wbGF0ZSA6IHtcbiAgICAgICAgZ2V0IDoge1xuICAgICAgICAgICAgdmFsdWUgOiBcInNlcnZpY2U9X19TRVJWSUNFX19cIiArXG4gICAgICAgICAgICAgICAgXCImdmVyc2lvbj1fX1ZFUlNJT05fX1wiICtcbiAgICAgICAgICAgICAgICBcIiZyYXdkYXRhb3V0cHV0PV9fUkFXREFUQU9VVFBVVF9fXCIgK1xuICAgICAgICAgICAgICAgIFwiJmlkZW50aWZpZXI9X19JREVOVElGSUVSX19cIiArXG4gICAgICAgICAgICAgICAgXCImcmVxdWVzdD1fX1JFUVVFU1RfX1wiICtcbiAgICAgICAgICAgICAgICBcIiZkYXRhaW5wdXRzPTwhLS0gX19EQVRBSU5QVVRTX18gLS0+XCIsXG5cbiAgICAgICAgICAgIGlucHV0IDogXCJfX0tFWV9fPV9fREFUQV9fXCJcblxuICAgICAgICB9LFxuICAgICAgICBwb3N0IDoge1xuXG4gICAgICAgICAgICB2YWx1ZSA6IFwiPD94bWwgdmVyc2lvbj1cXFwiMS4wXFxcIiBlbmNvZGluZz1cXFwiVVRGLThcXFwiPz5cIiArXG4gICAgICAgICAgICAgICAgXCI8d3BzOl9fUkVRVUVTVF9fIHZlcnNpb249XFxcIl9fVkVSU0lPTl9fXFxcIiBzZXJ2aWNlPVxcXCJfX1NFUlZJQ0VfX1xcXCIgXCIgK1xuICAgICAgICAgICAgICAgIFwiX19OQU1FU1BBQ0VfXyBfX1NDSEVNQUxPQ0FUSU9OX18+XCIgK1xuICAgICAgICAgICAgICAgIFwiPG93czpJZGVudGlmaWVyPl9fSURFTlRJRklFUl9fPC9vd3M6SWRlbnRpZmllcj5cIiArXG4gICAgICAgICAgICAgICAgXCI8d3BzOkRhdGFJbnB1dHM+XCIgK1xuICAgICAgICAgICAgICAgIFwiPCEtLSBfX0RBVEFJTlBVVFNfXyAtLT5cIiArXG4gICAgICAgICAgICAgICAgXCI8L3dwczpEYXRhSW5wdXRzPlwiICtcbiAgICAgICAgICAgICAgICBcIjx3cHM6UmVzcG9uc2VGb3JtPlwiICtcbiAgICAgICAgICAgICAgICBcIjx3cHM6UmF3RGF0YU91dHB1dD5cIiArXG4gICAgICAgICAgICAgICAgXCI8b3dzOklkZW50aWZpZXI+X19SQVdEQVRBT1VUUFVUX188L293czpJZGVudGlmaWVyPlwiICtcbiAgICAgICAgICAgICAgICBcIjwvd3BzOlJhd0RhdGFPdXRwdXQ+XCIgK1xuICAgICAgICAgICAgICAgIFwiPC93cHM6UmVzcG9uc2VGb3JtPlwiICtcbiAgICAgICAgICAgICAgICBcIjwvd3BzOl9fUkVRVUVTVF9fPlwiLFxuXG4gICAgICAgICAgICBpbnB1dCA6IFwiPHdwczpJbnB1dD5cIiArXG4gICAgICAgICAgICAgICAgXCI8b3dzOklkZW50aWZpZXI+X19LRVlfXzwvb3dzOklkZW50aWZpZXI+XCIgK1xuICAgICAgICAgICAgICAgIFwiPHdwczpEYXRhPlwiICtcbiAgICAgICAgICAgICAgICBcIjx3cHM6TGl0ZXJhbERhdGE+X19EQVRBX188L3dwczpMaXRlcmFsRGF0YT5cIiArXG4gICAgICAgICAgICAgICAgXCI8L3dwczpEYXRhPlwiICtcbiAgICAgICAgICAgICAgICBcIjwvd3BzOklucHV0PlwiXG4gICAgICAgIH1cbiAgICB9LFx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Il9fU0VSVklDRV9fXFxcIlxuICAgICAqIC8vICAgICAgICAgX19OQU1FU1BBQ0VfXyBfX1NDSEVNQUxPQ0FUSU9OX18+XG4gICAgICogLy8gICAgICAgICAgPG93czpJZGVudGlmaWVyPl9fSURFTlRJRklFUl9fPC9vd3M6SWRlbnRpZmllcj5cbiAgICAgKiAvLyAgICAgICAgICA8d3BzOkRhdGFJbnB1dHM+XG4gICAgICogLy8gICAgICAgICAgICAgIDwhLS0gX19EQVRBSU5QVVRTX18gLS0+XG4gICAgICogLy8gICAgICAgICAgPC93cHM6RGF0YUlucHV0cz5cbiAgICAgKiAvLyAgICAgICAgICA8d3BzOlJlc3BvbnNlRm9ybT5cbiAgICAgKiAvLyAgICAgICAgICAgICAgPHdwczpSYXdEYXRhT3V0cHV0PlxuICAgICAqIC8vICAgICAgICAgICAgICA8b3dzOklkZW50aWZpZXI+X19SQVdEQVRBT1VUUFVUX188L293czpJZGVudGlmaWVyPlxuICAgICAqIC8vICAgICAgICAgICAgICA8L3dwczpSYXdEYXRhT3V0cHV0PlxuICAgICAqIC8vICAgICAgICAgIDwvd3BzOlJlc3BvbnNlRm9ybT5cbiAgICAgKiAvLyAgICAgIDwvd3BzOl9fUkVRVUVTVF9fPlwiLFxuICAgICAqIC8vICAgICAgYXZlYyBfX0RBVEFJTlBVVFNfX1xuICAgICAqIC8vICAgICAgICAgICAgIDx3cHM6SW5wdXQ+XG4gICAgICogLy8gICAgICAgICAgICAgICAgICA8b3dzOklkZW50aWZpZXI+X19LRVlfXzwvb3dzOklkZW50aWZpZXI+XG4gICAgICogLy8gICAgICAgICAgICAgICAgICA8d3BzOkRhdGE+XG4gICAgICogLy8gICAgICAgICAgICAgICAgICAgIDx3cHM6TGl0ZXJhbERhdGE+X19EQVRBX188L3dwczpMaXRlcmFsRGF0YT5cbiAgICAgKiAvLyAgICAgICAgICAgICAgICAgIDwvd3BzOkRhdGE+XG4gICAgICogLy8gICAgICAgICAgICAgIDwvd3BzOklucHV0Plxu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ICpcbiAgICAgKiBAcmV0dXJucyB7QWx0aVJlcXVlc3Qub3B0aW9ucy5tb2RlfFN0cmluZ30gbWV0aG9kZSAoR0VUfFBPU1QpXG4gICAgICovXG4gICAgZ2V0TWV0aG9kIDogZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5tZXRob2Q7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgV1BTO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Formats/WPS.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Formats/XML.js": +/*!**************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Formats/XML.js ***! + \**************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* global require */\n\n\n// import __xmldom from \"xmldom\";\n\n/**\n * @classdesc\n *\n * Classe permettant d'écrire ou de lire du XML, sous forme de document DOM,\n * éventuellement selon des clés de lecture (readers) ou d'écriture (writers) spécifiques.\n *\n * @constructor\n * @alias Gp.Formats.XML\n *\n * @param {Object} [options] - options du format XML\n *\n * @param {Object} [options.reader] - Instance d'un Reader de service (AltiResponseReader, GeocodeRequestReader, etc.)\n * utile pour interpréter le XML lorsque sa structure est connue.\n * Ce reader doit comporter au moins une fonction statique read (root) permettant d'initialiser la lecture.\n *\n * @param {Object} [options.writers] - writers\n *\n * @param {String} [options.xmlString] - chaîne de caractère contenant du XML à interpréter.\n *\n * @private\n */\nfunction XML (options) {\n if (!(this instanceof XML)) {\n throw new TypeError(\"XML constructor cannot be called as a function.\");\n }\n\n // FIXME : notion de singleton\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur XML ()]\");\n\n /**\n * Chaîne de caractères contenant le texte XML\n * @type {String}\n */\n this.xmlString = null;\n\n /**\n * DOM Element correspondant à la structure du XML.\n * @type {DOMElement}\n */\n this.xmlDoc = null;\n\n /**\n * Objet contenant des fonctions de lecture des différentes balises XML.\n * @type {Object}\n */\n this.reader = null;\n\n // traitement des paramètres d'options s'il y en a\n if (options) {\n if (options.xmlString && typeof options.xmlString === \"string\") {\n this.xmlString = options.xmlString;\n // Si une chaine de caractère a été passée en entrée : on la transforme aussi en XML document\n this.xmlDoc = __getXMLDOC(options.xmlString);\n }\n if (options.reader) {\n this.setReader(options.reader);\n }\n }\n}\n\nXML.prototype = {\n\n /**\n * @lends module:XML\n */\n\n /*\n * Constructeur (alias)\n */\n constructor : XML,\n\n /**\n * Méthode permettant de récupérer la chaîne de caractères associée au format XML\n *\n * @returns {String} xmlString - la chaîne de caractères correspondant au format XML\n */\n getXMLString : function () {\n return this.xmlString;\n },\n\n /**\n * Méthode permettant d'attribuer une chaîne de caractères au format XML (attribut xmlString).\n * La méthode va aussi transformer cette chaîne de caractères en document XML,\n * afin de remplir l'attribut xmlDoc.\n *\n * @param {String} xmlString - la chaîne de caractères correspondant au format XML\n */\n setXMLString : function (xmlString) {\n if (xmlString && typeof xmlString === \"string\") {\n this.xmlString = xmlString;\n this.xmlDoc = __getXMLDOC(xmlString);\n }\n },\n\n /**\n * Méthode permettant de récupérer les readers associés au format XML, s'ils ont été définis\n *\n * @return {Object} readers - les readers associés au format XML, s'ils existent,\n * sous forme d'une collection de fonctions\n */\n getReader : function () {\n return this.reader;\n },\n\n /**\n * Méthode permettant d'attribuer des readers, sous la forme d'un objet de fonctions (node, data),\n * lorsqu'ils n'ont pas été définis lors de l'instanciation par exemple (new XML (options)).\n *\n * @param {Object} reader - Instance d'un Reader de service (AltiResponseReader, GeocodeRequestReader, etc.)\n * utile pour interpréter le XML lorsque sa structure est connue.\n * Ce reader doit comporter au moins une fonction statique read (root) permettant d'initialiser la lecture.\n */\n setReader : function (reader) {\n if (reader && reader.read && typeof reader.read === \"function\") {\n this.reader = reader;\n }\n },\n\n /**\n * Méthode permettant de récupérer le document XML associé au format, s'il existe.\n *\n * @return {DOMElement} xmlDoc - le document XML (DOM document node) s'il existe\n */\n getXMLDoc : function () {\n return this.xmlDoc;\n },\n\n /**\n * Setter\n */\n setXMLDoc : function (doc) {\n this.xmlDoc = doc;\n },\n /**\n * Méthode initialisant la lecture du XML, à partir d'un XML Document :\n * création d'un objet JavaScript contenant les informations du XML,\n * sauf dans le cas où il n'existe pas de XML Document à interpréter (retourne un objet vide).\n *\n * @return {Object} [parserOutput] - un objet JavaScript contenant les informations du XML :\n * - soit toutes les informations si aucun reader n'a été spécifié à la création du format\n * - soit les informations spécifiées dans le reader.\n */\n parse : function () {\n // build xml document from xmlString\n if (!this.xmlDoc && this.xmlString) {\n this.xmlDoc = __getXMLDOC(this.xmlString);\n }\n if (this.xmlDoc) {\n var root = __getRootNode(this.xmlDoc);\n if (root) {\n var parserOutput;\n // call reader if exists\n if (this.reader && this.reader.read) {\n parserOutput = this.reader.read(root);\n } else {\n parserOutput = {};\n parserOutput[root.nodeName] = __readDefault(root);\n }\n return parserOutput;\n } else {\n return {};\n }\n }\n }\n\n};\n\n/**\n * Méthode de la classe (privée) permettant de créer un XML Document à partir d'une chaîne de caractères XML,\n * en utilisant DOMParser () lorsque c'est possible.\n * For more information, see: https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#the-domparser-interface\n *\n * @private\n * @memberof XML\n * @method __getXMLDOC\n * @param {String} xmlString - xml string to be converted into DOM element\n * @return {DOMElement} - the corresponding XML Document\n */\nfunction __getXMLDOC (xmlString) {\n if (typeof window === \"undefined\") {\n // env. nodejs\n var DOMParser = __webpack_require__(/*! xmldom */ \"xmldom\").DOMParser; // __xmldom.DOMParser;\n return new DOMParser().parseFromString(xmlString, \"text/xml\");\n } else {\n // env. browser\n\n var parser;\n var xmlDoc;\n var errorMsg = \"Erreur lors du parsing de la réponse du service : XML non conforme\";\n\n if (window.ActiveXObject) {\n // Internet Explorer < 9\n xmlDoc = new window.ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async = false;\n xmlDoc.loadXML(xmlString);\n var parseError = xmlDoc.parseError;\n if (parseError.errorCode) {\n if (parseError.line && parseError.linepos) {\n errorMsg += \"( ligne \" + parseError.line + \", colonne \" + parseError.linepos;\n }\n if (parseError.reason) {\n errorMsg += \": \" + parseError.reason + \")\";\n }\n throw new Error(errorMsg);\n }\n return xmlDoc;\n } else if (window.DOMParser) {\n // les autres (Chrome, Mozilla, IE >= 9)\n parser = new window.DOMParser();\n try {\n xmlDoc = parser.parseFromString(xmlString, \"text/xml\");\n } catch (e) {\n // Internet Explorer browser raises exception if xmlString is not valid XML\n if (e.message === \"SyntaxError\") {\n throw new Error(errorMsg);\n } else {\n throw new Error(\"Erreur lors du parsing de la réponse du service : \" + e.message);\n }\n }\n // look for parsing error in case no exception was raised\n if (xmlDoc.getElementsByTagName(\"parsererror\").length > 0) {\n var parsererror = xmlDoc.getElementsByTagName(\"parsererror\");\n for (var i = 0; i < parsererror.length; i++) {\n var content = parsererror[i].innerHTML;\n // except in case parsererror is just because of huge xml, but parsing is done.\n if (content.indexOf(\"Huge input lookup\") === -1) {\n errorMsg += \"(\" + content + \")\";\n throw new Error(errorMsg);\n }\n }\n } else if (!xmlDoc.documentElement) { // may happen in chrome browser\n throw new Error(errorMsg);\n }\n return xmlDoc;\n } else {\n // FIXME\n throw new Error(\"Incompatible DOM Parser pour ce navigateur !\");\n }\n }\n}\n\n/**\n * Méthode de la classe (privée) permettant de récupérer le noeud racine du document,\n * à partir d'un document node (nodeType=9), puis lecture de ce noeud (readNode)\n *\n * @private\n * @memberof XML\n * @method __getRootNode\n * @param {DOMElement} [xmlDoc] - a Document Node\n * @return {DOMElement} root - the document root node\n */\nfunction __getRootNode (xmlDoc) {\n var root;\n if (xmlDoc.nodeType === 9) {\n // INFO : nodeType 9 represents the entire document (the root-node of the DOM tree)\n root = xmlDoc.documentElement;\n } else if (xmlDoc.nodeType === 1) {\n root = xmlDoc;\n }\n return root;\n}\n\n/**\n * Méthode de la classe (privée) permettant de lire automatiquement un noeud XML,\n * lorsqu'aucun reader spécifique n'a été spécifié (parser brut)\n *\n * @private\n * @memberof XML\n * @method readDefault\n * @param {DOMElement} node - a DOM element node\n * @example final data object looks like :\n * data = {\n * attributeName: attributeValue,\n * childName: {\n * attributeName: attributeValue,\n * attributeName: attributeValue,\n * childName: {\n * \"textContent\": textContent\n * },\n * childName: {\n * childName: {\n * attributeName:attributeValue\n * }\n * }\n * }\n * }\n */\nfunction __readDefault (node) {\n var data = {};\n\n // if element node has attributes, set their values to data\n if (node.attributes.length > 0) {\n var dataAttributes = __getAttributes(node);\n data[\"attributes\"] = dataAttributes;\n }\n\n // if element node has childNodes, read them and set them to data\n if (node.hasChildNodes()) {\n var childData = {};\n var child;\n var children = node.childNodes;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.nodeType === 3) { // TEXT_NODE\n data[\"textContent\"] = child.nodeValue;\n } else if (child.nodeType === 1) {\n childData = __readDefault(child);\n\n if (!data[child.nodeName]) {\n // store childData in an object\n data[child.nodeName] = childData;\n } else {\n // in case several childNodes has the same name : store them in an array.\n // if data[nodeName] already exists but is not an array\n if (!Array.isArray(data[child.nodeName])) {\n var old = data[child.nodeName];\n data[child.nodeName] = [];\n data[child.nodeName].push(old);\n }\n data[child.nodeName].push(childData);\n }\n }\n // TODO : manage other node types (4=CDATA, etc)\n }\n }\n\n return data;\n}\n\n/**\n * Méthode de la classe (privée) permettant de récupérer les attributs d'un noeud élément\n *\n * @private\n * @memberof XML\n * @method __getAttributes\n * @param {DOMElement} node - noeud contenant l'attribut recherché\n * @return {Object} nodeAttributes - objet contenant les noms et valeurs des différents attributs\n */\nfunction __getAttributes (node) {\n if (node.attributes.length > 0) {\n var nodeAttributes = {};\n var attributes = node.attributes;\n for (var i = 0; i < attributes.length; i++) {\n var attribute = attributes[i];\n nodeAttributes[attribute.nodeName] = attribute.nodeValue;\n }\n return nodeAttributes;\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (XML);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvRm9ybWF0cy9YTUwuanM/NGMxZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7O0FBRThDO0FBQzlDOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUEsa0JBQWtCLDhEQUFNO0FBQ3hCOztBQUVBO0FBQ0E7QUFDQSxjQUFjO0FBQ2Q7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsY0FBYztBQUNkO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLGNBQWM7QUFDZDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsaUJBQWlCLE9BQU87QUFDeEI7QUFDQTtBQUNBO0FBQ0EsS0FBSzs7QUFFTDtBQUNBO0FBQ0E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W5kb3cgPT09IFwidW5kZWZpbmVkXCIpIHtcbiAgICAgICAgLy8gZW52LiBub2RlanNcbiAgICAgICAgdmFyIERPTVBhcnNlciA9IHJlcXVpcmUoXCJ4bWxkb21cIikuRE9NUGFyc2VyOyAvLyBfX3htbGRvbS5ET01QYXJzZXI7XG4gICAgICAgIHJldHVybiBuZXcgRE9NUGFyc2VyKCkucGFyc2VGcm9tU3RyaW5nKHhtbFN0cmluZywgXCJ0ZXh0L3htbFwiKTtcbiAgICB9IGVsc2Uge1xuICAgICAgICAvLyBlbnYuIGJyb3dzZXJcblxuICAgICAgICB2YXIgcGFyc2VyO1xuICAgICAgICB2YXIgeG1sRG9jO1xuICAgICAgICB2YXIgZXJyb3JNc2cgPSBcIkVycmV1ciBsb3JzIGR1IHBhcnNpbmcgZGUgbGEgcsOpcG9uc2UgZHUgc2VydmljZSA6IFhNTCBub24gY29uZm9ybWVcIjtcblxuICAgICAgICBpZiAod2luZG93LkFjdGl2ZVhPYmplY3QpIHtcbiAgICAgICAgICAgIC8vIEludGVybmV0IEV4cGxvcmVyIDwgOVxuICAgICAgICAgICAgeG1sRG9jID0gbmV3IHdpbmRvdy5BY3RpdmVYT2JqZWN0KFwiTWljcm9zb2Z0LlhNTERPTVwiKTtcbiAgICAgICAgICAgIHhtbERvYy5hc3luYyA9IGZhbHNlO1xuICAgICAgICAgICAgeG1sRG9jLmxvYWRYTUwoeG1sU3RyaW5nKTtcbiAgICAgICAgICAgIHZhciBwYXJzZUVycm9yID0geG1sRG9jLnBhcnNlRXJyb3I7XG4gICAgICAgICAgICBpZiAocGFyc2VFcnJvci5lcnJvckNvZGUpIHtcbiAgICAgICAgICAgICAgICBpZiAocGFyc2VFcnJvci5saW5lICYmIHBhcnNlRXJyb3IubGluZXBvcykge1xuICAgICAgICAgICAgICAgICAgICBlcnJvck1zZyArPSBcIiggbGlnbmUgXCIgKyBwYXJzZUVycm9yLmxpbmUgKyBcIiwgY29sb25uZSBcIiArIHBhcnNlRXJyb3IubGluZXBvcztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHBhcnNlRXJyb3IucmVhc29uKSB7XG4gICAgICAgICAgICAgICAgICAgIGVycm9yTXNnICs9IFwiOiAgXCIgKyBwYXJzZUVycm9yLnJlYXNvbiArIFwiKVwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoZXJyb3JNc2cpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHhtbERvYztcbiAgICAgICAgfSBlbHNlIGlmICh3aW5kb3cuRE9NUGFyc2VyKSB7XG4gICAgICAgICAgICAvLyBsZXMgYXV0cmVzIChDaHJvbWUsIE1vemlsbGEsIElFID49IDkpXG4gICAgICAgICAgICBwYXJzZXIgPSBuZXcgd2luZG93LkRPTVBhcnNlcigpO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICB4bWxEb2MgPSBwYXJzZXIucGFyc2VGcm9tU3RyaW5nKHhtbFN0cmluZywgXCJ0ZXh0L3htbFwiKTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAvLyBJbnRlcm5ldCBFeHBsb3JlciBicm93c2VyIHJhaXNlcyBleGNlcHRpb24gaWYgeG1sU3RyaW5nIGlzIG5vdCB2YWxpZCBYTUxcbiAgICAgICAgICAgICAgICBpZiAoZS5tZXNzYWdlID09PSBcIlN5bnRheEVycm9yXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGVycm9yTXNnKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJFcnJldXIgbG9ycyBkdSBwYXJzaW5nIGRlIGxhIHLDqXBvbnNlIGR1IHNlcnZpY2UgOiBcIiArIGUubWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gbG9vayBmb3IgcGFyc2luZyBlcnJvciBpbiBjYXNlIG5vIGV4Y2VwdGlvbiB3YXMgcmFpc2VkXG4gICAgICAgICAgICBpZiAoeG1sRG9jLmdldEVsZW1lbnRzQnlUYWdOYW1lKFwicGFyc2VyZXJyb3JcIikubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIHZhciBwYXJzZXJlcnJvciA9IHhtbERvYy5nZXRFbGVtZW50c0J5VGFnTmFtZShcInBhcnNlcmVycm9yXCIpO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcGFyc2VyZXJyb3IubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvbnRlbnQgPSBwYXJzZXJlcnJvcltpXS5pbm5lckhUTUw7XG4gICAgICAgICAgICAgICAgICAgIC8vIGV4Y2VwdCBpbiBjYXNlIHBhcnNlcmVycm9yIGlzIGp1c3QgYmVjYXVzZSBvZiBodWdlIHhtbCwgYnV0IHBhcnNpbmcgaXMgZG9uZS5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRlbnQuaW5kZXhPZihcIkh1Z2UgaW5wdXQgbG9va3VwXCIpID09PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JNc2cgKz0gXCIoXCIgKyBjb250ZW50ICsgXCIpXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoZXJyb3JNc2cpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICgheG1sRG9jLmRvY3VtZW50RWxlbWVudCkgeyAvLyBtYXkgaGFwcGVuIGluIGNocm9tZSBicm93c2VyXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGVycm9yTXNnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB4bW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SBsYSBjbGFzc2UgKHByaXbDqWUpIHBlcm1ldHRhbnQgZGUgbGlyZSBhdXRvbWF0aXF1ZW1lbnQgdW4gbm9ldWQgWE1MLFxuICogICAgICBsb3JzcXUnYXVjdW4gcmVhZGVyIHNww6ljaWZpcXVlIG4nYSDDqXTDqSBzcMOpY2lmacOpIChwYXJzZXIgYnJ1dClcbiAqXG4gKiBAcHJpdmF0ZVxuICogQG1lbWJlcm9mIFhNTFxuICogQG1ldGhvZCByZWFkRGVmYXVsdFxuICogQHBhcmFtIHtET01FbGVtZW50fSBub2RlIC0gYSBET00gZWxlbWVudCBub2RlXG4gKiBAZXhhbXBsZSBmaW5hbCBkYXRhIG9iamVjdCBsb29rcyBsaWtlIDpcbiAqICAgICAgICAgIGRhdGEgPSB7XG4gKiAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZTogYXR0cmlidXRlVmFsdWUsXG4gKiAgICAgICAgICAgICAgY2hpbGROYW1lOiB7XG4gKiAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU6IGF0dHJpYnV0ZVZhbHVlLFxuICogICAgICAgICAgICAgICAgICBhdHRyaWJ1dGVOYW1lOiBhdHRyaWJ1dGVWYWx1ZSxcbiAqICAgICAgICAgICAgICAgICAgY2hpbGROYW1lOiB7XG4gKiAgICAgICAgICAgICAgICAgICAgICBcInRleHRDb250ZW50XCI6IHRleHRDb250ZW50XG4gKiAgICAgICAgICAgICAgICAgIH0sXG4gKiAgICAgICAgICAgICAgICAgIGNoaWxkTmFtZToge1xuICogICAgICAgICAgICAgICAgICAgICAgY2hpbGROYW1lOiB7XG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZTphdHRyaWJ1dGVWYWx1ZVxuICogICAgICAgICAgICAgICAgICAgICAgfVxuICogICAgICAgICAgICAgICAgICB9XG4gKiAgICAgICAgICAgICAgfVxuICogICAgICAgICAgfVxuICovXG5mdW5jdGlvbiBfX3JlYWREZWZhdWx0IChub2RlK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iAgICAgICAgICAgICAgICAgICAgZGF0YVtjaGlsZC5ub2RlTmFtZV0gPSBjaGlsZERhdGE7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gaW4gY2FzZSBzZXZlcmFsIGNoaWxkTm9kZXMgaGFzIHRoZSBzYW1lIG5hbWUgOiBzdG9yZSB0aGVtIGluIGFuIGFycmF5LlxuICAgICAgICAgICAgICAgICAgICAvLyBpZiBkYXRhW25vZGVOYW1lXSBhbHJlYWR5IGV4aXN0cyBidXQgaXMgbm90IGFuIGFycmF5XG4gICAgICAgICAgICAgICAgICAgIGlmICghQXJyYXkuaXNBcnJheShkYXRhW2NoaWxkLm5vZGVOYW1lXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBvbGQgPSBkYXRhW2NoaWxkLm5vZGVOYW1lXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbY2hpbGQubm9kZU5hbWVdID0gW107XG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhW2NoaWxkLm5vZGVOYW1lXS5wdXNoKG9sZCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZGF0YVtjaGlsZC5ub2RlTmFtZV0ucHVzaChjaGlsZERhdGEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFRPRE8gOiBtYW5hZ2Ugb3RoZXIgbm9kZSB0eXBlcyAoND1DREFUQSwgZXRjKVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIGRhdGE7XG59XG5cbi8qKlxuICogTcOpdGhvZGUgZGUgbGEgY2xhc3NlIChwcml2w6llKSBwZXJtZXR0YW50IGRlIHLDqWN1cMOpcmVyIGxlcyBhdHRyaWJ1dHMgZCd1biBub2V1ZCDDqWzDqW1lbnRcbiAqXG4gKiBAcHJpdmF0ZVxuICogQG1lbWJlcm9mIFhNTFxuICogQG1ldGhvZCBfX2dldEF0dHJpYnV0ZXNcbiAqIEBwYXJhbSB7RE9NRWxlbWVudH0gbm9kZSAtIG5vZXVkIGNvbnRlbmFudCBsJ2F0dHJpYnV0IHJlY2hlcmNow6lcbiAqIEByZXR1cm4ge09iamVjdH0gbm9kZUF0dHJpYnV0ZXMgLSBvYmpldCBjb250ZW5hbnQgbGVzIG5vbXMgZXQgdmFsZXVycyBkZXMgZGlmZsOpcmVudHMgYXR0cmlidXRzXG4gKi9cbmZ1bmN0aW9uIF9fZ2V0QXR0cmlidXRlcyAobm9kZSkge1xuICAgIGlmIChub2RlLmF0dHJpYnV0ZXMubGVuZ3RoID4gMCkge1xuICAgICAgICB2YXIgbm9kZUF0dHJpYnV0ZXMgPSB7fTtcbiAgICAgICAgdmFyIGF0dHJpYnV0ZXMgPSBub2RlLmF0dHJpYnV0ZXM7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYXR0cmlidXRlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGF0dHJpYnV0ZSA9IGF0dHJpYnV0ZXNbaV07XG4gICAgICAgICAgICBub2RlQXR0cmlidXRlc1thdHRyaWJ1dGUubm9kZU5hbWVdID0gYXR0cmlidXRlLm5vZGVWYWx1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbm9kZUF0dHJpYnV0ZXM7XG4gICAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBYTUw7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Formats/XML.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Gp.js": +/*!*****************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Gp.js ***! + \*****************************************************/ +/*! exports provided: servicesVersion, servicesDate, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"servicesVersion\", function() { return servicesVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"servicesDate\", function() { return servicesDate; });\n/* harmony import */ var _Services_Services__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Services/Services */ \"./node_modules/geoportal-access-lib/src/Services/Services.js\");\n/* harmony import */ var _Services_DefaultUrlService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Services/DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Services_Alti_Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Services/Alti/Response/model/AltiResponse */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/AltiResponse.js\");\n/* harmony import */ var _Services_Alti_Response_model_Elevation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Services/Alti/Response/model/Elevation */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Elevation.js\");\n/* harmony import */ var _Services_AutoComplete_Response_model_AutoCompleteResponse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Services/AutoComplete/Response/model/AutoCompleteResponse */ \"./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/model/AutoCompleteResponse.js\");\n/* harmony import */ var _Services_AutoComplete_Response_model_SuggestedLocation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Services/AutoComplete/Response/model/SuggestedLocation */ \"./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/model/SuggestedLocation.js\");\n/* harmony import */ var _Services_ProcessIsoCurve_Response_model_ProcessIsoCurveResponse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse */ \"./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse.js\");\n/* harmony import */ var _Services_Route_Response_model_RouteResponse__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Services/Route/Response/model/RouteResponse */ \"./node_modules/geoportal-access-lib/src/Services/Route/Response/model/RouteResponse.js\");\n/* harmony import */ var _Services_Route_Response_model_RouteInstruction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Services/Route/Response/model/RouteInstruction */ \"./node_modules/geoportal-access-lib/src/Services/Route/Response/model/RouteInstruction.js\");\n/* harmony import */ var _Services_Config_Config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Services/Config/Config */ \"./node_modules/geoportal-access-lib/src/Services/Config/Config.js\");\n/* harmony import */ var _Protocols_XHR__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Protocols/XHR */ \"./node_modules/geoportal-access-lib/src/Protocols/XHR.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Utils/Helper */ \"./node_modules/geoportal-access-lib/src/Utils/Helper.js\");\n/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../package.json */ \"./node_modules/geoportal-access-lib/package.json\");\nvar _package_json__WEBPACK_IMPORTED_MODULE_13___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../package.json */ \"./node_modules/geoportal-access-lib/package.json\", 1);\n/**\n* Global variable Gp.\n*\n* @module Gp\n* @alias Gp\n* @description\n*\n* This is the global variable that is exposed in the browser environment.\n* Content is composed of constructor, functions and properties...\n*\n* > {@link Gp.Error Error()}\n* - .TYPE_SRVERR : \"SERVICE_ERROR\"\n* - .TYPE_UNKERR : \"UNKNOWN_ERROR\"\n* - .TYPE_USEERR : \"USAGE_ERROR\"\n*\n* > {@link module:Helper Helper}\n* - .indent()\n* - .normalyzeParameters()\n* - .normalyzeUrl()\n*\n* > {@link module:XHR Protocols.XHR}\n* - .call()\n*\n* > {@link module:Services Services (objects)}\n* - .Alti\n* - {@link Gp.Services.Alti.Elevation .Elevation()}\n* - {@link Gp.Services.AltiResponse .AltiResponse()}\n* - .AutoComplete\n* - {@link Gp.Services.AutoComplete.SuggestedLocation .SuggestedLocation()}\n* - {@link Gp.Services.AutoCompleteResponse .AutoCompleteResponse()}\n* - {@link Gp.Services.Config .Config()}\n* - {@link Gp.Services.DefaultUrl .DefaultUrl()}\n* - {@link Gp.Services.GeocodeResponse .GeocodeResponse()}\n* - {@link Gp.Services.GetConfigResponse .GetConfigResponse()}\n* - {@link Gp.Services.IsoCurveResponse .IsoCurveResponse()}\n* - .Route\n* - {@link Gp.Services.Route.RouteInstruction .RouteInstruction()}\n* - {@link Gp.Services.RouteResponse .RouteResponse()}\n*\n* > Services (factory)\n* - {@link module:Services~autoComplete .autoComplete()}\n* - {@link module:Services~geocode .geocode()}\n* - {@link module:Services~getAltitude .getAltitude()}\n* - {@link module:Services~getConfig .getConfig()}\n* - {@link module:Services~isoCurve .isoCurve()}\n* - {@link module:Services~reverseGeocode .reverseGeocode()}\n* - {@link module:Services~route .route()}\n*\n* > servicesDate : \"YYYY-MM-DD\"\n*\n* > servicesVersion : \"X.X.X\"\n*\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/** Version */\nconst servicesVersion = _package_json__WEBPACK_IMPORTED_MODULE_13__.version;\n/** Publication date */\nconst servicesDate = _package_json__WEBPACK_IMPORTED_MODULE_13__.date;\n\n// on declare les ns dans root global\nvar Gp = {};\n\nGp.servicesVersion = servicesVersion;\nGp.servicesDate = servicesDate;\n\n// Export Protocols\nGp.Protocols = {};\nGp.Protocols.XHR = _Protocols_XHR__WEBPACK_IMPORTED_MODULE_10__[\"default\"];\n// Export services\nGp.Services = _Services_Services__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n// Export DefaultUrls\nGp.Services.DefaultUrl = _Services_DefaultUrlService__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n// Export Alti\nGp.Services.AltiResponse = _Services_Alti_Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\nGp.Services.Alti = {};\nGp.Services.Alti.Elevation = _Services_Alti_Response_model_Elevation__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n// Export Autocomplete\nGp.Services.AutoCompleteResponse = _Services_AutoComplete_Response_model_AutoCompleteResponse__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\nGp.Services.AutoComplete = {};\nGp.Services.AutoComplete.SuggestedLocation = _Services_AutoComplete_Response_model_SuggestedLocation__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\n// Export Config\nGp.Services.Config = _Services_Config_Config__WEBPACK_IMPORTED_MODULE_9__[\"default\"];\n// Export IsoCurve\nGp.Services.IsoCurveResponse = _Services_ProcessIsoCurve_Response_model_ProcessIsoCurveResponse__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\n// Export Route\nGp.Services.RouteResponse = _Services_Route_Response_model_RouteResponse__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\nGp.Services.Route = {};\nGp.Services.Route.RouteInstruction = _Services_Route_Response_model_RouteInstruction__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\n// Export Erreurs et Outils\nGp.Error = _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_11__[\"default\"];\nGp.Helper = _Utils_Helper__WEBPACK_IMPORTED_MODULE_12__[\"default\"];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Gp);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvR3AuanM/NjZhOCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQU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2aWNlcy5Sb3V0ZSA9IHt9O1xuR3AuU2VydmljZXMuUm91dGUuUm91dGVJbnN0cnVjdGlvbiA9IFJvdXRlSW5zdHJ1Y3Rpb247XG4vLyBFeHBvcnQgRXJyZXVycyBldCBPdXRpbHNcbkdwLkVycm9yID0gRXJyb3I7XG5HcC5IZWxwZXIgPSBIZWxwZXI7XG5cbmV4cG9ydCBkZWZhdWx0IEdwO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Gp.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Protocols/JSONP.js": +/*!******************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Protocols/JSONP.js ***! + \******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/**\n * JSONP : Implémentation du protocole JSONP de la plateforme Géoportail\n *\n * @module JSONP\n * @private\n * @alias Gp.Protocols.JSONP\n */\n\n\n// cf. https://github.com/sobstel/jsonp.js\nvar JSONP = {\n\n /**\n * Construction d'un identifiant statique basé sur le timestamp,\n * et qui s'incremente de +1 à chaque appel\n */\n uuid : (function () {\n var id = Math.floor(Date.now());\n return function () {\n return id++;\n };\n })(),\n\n /**\n * Cette fonction réalise l'appel du service fourni via le paramètre \"options.url\"\n * en mettant en œuvre le protocole JSONP.\n *\n * @method call\n * @static\n * @param {Object} options - parametres d'invocation du service en JSONP\n * @param {String} options.url - URL du service à invoquer (indépendamment du protocole JSONP).\n * Cette URL contient déjà les paramètres du service.\n * Si le paramètre dédié à la mise en oeuvre du protocole JSONP (callback=xxx) n'est pas présent, il est rajouté par la fonction ;\n * sa valeur est déterminée en fonction du paramètre callbackName.\n * @param {Number} [options.timeOut = 0] - Nombre de ms au bout duquel on considère que le service n'a pas répondu.\n * Une valeur de 0 pour ce paramètre permet de désactiver la gestion du timeOut.\n * @param {String} [options.callbackSuffix = null] - Suffixe de la fonction de callback à rajouter sur l'URL.\n * Si aucun suffixe n'est spécifié (cas par défaut), on utilisera l'identifiant this.uuid () comme suffixe. Ex: \"callback1458574396582 ()\"\n * @param {String} [options.callbackName = gp.protocol.jsonp] - Valeur du paramètre callback à rajouter sur l'URL.\n * Si l'URL fournie contient déjà le paramètre callback, le paramètre callbackName ne sera pas pris en compte.\n * La fonction de callback est créée dynamiquement par la fonction JSONP ;\n * elle a deux fonctions :\n * elle annule la condition de timeOut\n * puis appelle la fonction fournie par l'utilisateur via le paramètre onResponse.\n * @param {Function} options.onResponse - Nom de la fonction qui sera appelée lors de la réception des résultats du service.\n * Ce paramètre sera ignoré si l'URL contient déjà le paramètre callback.\n * La fonction de rappel appelée sera alors celle ayant pour nom la valeur de ce paramètre.\n * @param {Function} [options.onTimeOut] - Nom de la fonction qui sera appelée en cas de non réponse du service.\n * Le temps au bout duquel on considère que le service n'a pas répondu est déterminé par le paramètre timeOut.\n * @example\n * var options = {\n * url : 'http://localhost/some/test.json&callback=myResults',\n * timeOut : 100,\n * callbackName : 'myResults',\n * callbackSuffix : \"\",\n * onResponse : function (response) {\n * console.log('results : ', response);\n * },\n *\n * };\n * JSONP.call(options);\n */\n call : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"JSONP\");\n logger.trace(\"[JSONP::call ()]\");\n\n // analyse parametres\n\n if (!options) {\n logger.error(\"missing parameter : options !\");\n throw new Error(\"missing parameter : options !\");\n }\n\n if (!options.url) {\n logger.error(\"missing parameter : options.url !\");\n throw new Error(\"missing parameter : options.url !\");\n }\n\n if (!options.timeOut) {\n logger.info(\"setting 'options.timeOut' default value\");\n options.timeOut = 0;\n }\n\n // FIXME si un callback coté client a été mis en place,\n // cette condition sur cette methode n'a pas de sens !?\n if (!options.onResponse) {\n logger.error(\"missing parameter : options.onResponse !\");\n throw new Error(\"missing parameter : options.onResponse !\");\n // FIXME doit on definir un callback interne par defaut !?\n // options.onResponse = function (data) {\n // console.log(\"response callback (inner) : \", data);\n // };\n }\n\n // ID du callback à utiliser : null ou string.\n // si l'utilisateur a spécifié un suffixe pour le callback, on le récupère comme un ID (ex: options.callbackSuffix = \"\")\n // sinon, on utilise un timestamp : this.uuid ()\n var callbackId = (typeof options.callbackSuffix === \"string\") ? options.callbackSuffix : this.uuid();\n\n // on recherche le parametre callback et son nom de fonction dans l'url\n var urlHasCallbackKey = false;\n var urlHasCallbackName = false;\n\n var idx = options.url.indexOf(\"callback=\");\n\n if (idx !== -1) {\n urlHasCallbackKey = true;\n // extraction callbackName de l'url : entre \"callback=\" et \"&\" ou fin de ligne\n var j = options.url.indexOf(\"&\", idx);\n if (j === -1) {\n j = options.url.length;\n }\n\n // on ecrase le parametre options.callbackName s'il avait été défini\n var callbackName = options.url.substring(idx + 9, j);\n\n if (callbackName) {\n urlHasCallbackName = true;\n options.callbackName = callbackName;\n logger.info(\"setting 'options.callbackName' value (\" + options.callbackName + \") from 'options.url' parameter\");\n }\n }\n\n // on ajoute le parametre callback dans l'URL s'il n'existe pas\n if (!urlHasCallbackKey) {\n // gestion des autres param. et \"?\"\n var k = options.url.indexOf(\"?\");\n if (k === -1) {\n // aucun param., ni de '?'\n options.url = options.url + \"?\" + \"callback=\";\n } else if (k === options.url.length) {\n // uniquement le '?'\n options.url = options.url + \"callback=\";\n } else {\n // le '?' et les param. existent\n options.url = options.url + \"&\" + \"callback=\";\n }\n logger.info(\"setting callback default key in 'options.url' : \" + options.url);\n }\n\n // utilisation de la fonction callback coté client ?\n var HasCallbackName = options.callbackName ? true : urlHasCallbackName;\n\n // on ajoute le nom de la fonction callback dans l'URL si elle n'existe pas\n if (!urlHasCallbackName) {\n // fonction callback par defaut\n if (!options.callbackName) {\n logger.info(\"setting 'options.callbackName' default value\");\n options.callbackName = \"callback\"; // ou \"gp.protocol.jsonp\" ?\n // info : si on ne veut pas gerer d'ID dans le callback,\n // options.callbackSuffix = \"\"\n if (callbackId || callbackId === \"\") {\n options.callbackName += callbackId;\n }\n }\n options.url = options.url.replace(\"callback=\", \"callback=\" + options.callbackName);\n logger.info(\"setting callback function name in 'options.url' : \" + options.url);\n }\n\n // timeOut par defaut\n if (!options.onTimeOut) {\n logger.info(\"setting 'options.onTimeOut' default value\");\n /** callback timeout par defaut */\n options.onTimeOut = function (/* error */) {\n console.log(\"TimeOut while invoking url : \" + options.url);\n };\n }\n\n if (!HasCallbackName) {\n var self = this;\n\n // event du timeout\n var onTimeOutTrigger = null;\n\n // declenche le timeout si > à 0 !\n if (options.timeOut > 0) {\n onTimeOutTrigger = window.setTimeout(\n function () {\n /** fonction de reponse du service */\n window[options.callbackName] = function () {};\n options.onTimeOut();\n self._deleteScript(callbackId);\n }, options.timeOut);\n }\n\n // FIXME le nom de la fonction n'accepte pas de namespace !\n // ex. Gp.Function.callback\n /**\n * fonction de reponse du service\n * @param {Object} data - data\n * @private\n */\n window[options.callbackName] = function (data) {\n window.clearTimeout(onTimeOutTrigger);\n options.onResponse(data);\n self._deleteScript(callbackId);\n };\n }\n\n this._createScript(callbackId, options.url);\n },\n\n /**\n * create Script\n * @param {String} callbackId - callback Id\n * @param {String} url - url\n * @private\n */\n _createScript : function (callbackId, url) {\n var scriptu;\n var scripto = document.getElementById(\"results\" + callbackId);\n\n scriptu = document.createElement(\"script\");\n scriptu.setAttribute(\"type\", \"text/javascript\");\n scriptu.setAttribute(\"src\", url);\n scriptu.setAttribute(\"charset\", \"UTF-8\");\n scriptu.setAttribute(\"id\", \"results\" + callbackId);\n scriptu.setAttribute(\"async\", \"true\"); // FIXME async ?\n // head ou body ou autres ?\n var node = document.documentElement || document.getElementsByTagName(\"head\")[0];\n if (scripto === null) {\n node.appendChild(scriptu);\n } else {\n // s'il existe déjà, on le remplace !\n node.replaceChild(scriptu, scripto);\n }\n },\n\n /**\n * delete Script\n * @param {String} callbackId - callback Id\n * @private\n */\n _deleteScript : function (callbackId) {\n var script = document.getElementById(\"results\" + callbackId);\n if (script) {\n var node = script.parentNode || document.documentElement;\n if (!node) {\n return;\n }\n node.removeChild(script);\n }\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (JSONP);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvUHJvdG9jb2xzL0pTT05QLmpzPzNiMTUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQzhDOztBQUU5QztBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7O0FBRUw7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZUFBZSxPQUFPO0FBQ3RCLGVBQWUsT0FBTztBQUN0QjtBQUNBO0FBQ0E7QUFDQSxlQUFlLE9BQU87QUFDdEI7QUFDQSxlQUFlLE9BQU87QUFDdEI7QUFDQSxlQUFlLE9BQU87QUFDdEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsU0FBUztBQUN4QjtBQUNBO0FBQ0EsZUFBZSxTQUFTO0FBQ3hCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGFBQWE7QUFDYjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBcUIsOERBQU07QUFDM0I7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ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ICAgICAgICAgICBvcHRpb25zLmNhbGxiYWNrTmFtZSA9IGNhbGxiYWNrTmFtZTtcbiAgICAgICAgICAgICAgICBsb2dnZXIuaW5mbyhcInNldHRpbmcgJ29wdGlvbnMuY2FsbGJhY2tOYW1lJyB2YWx1ZSAoXCIgKyBvcHRpb25zLmNhbGxiYWNrTmFtZSArIFwiKSBmcm9tICdvcHRpb25zLnVybCcgcGFyYW1ldGVyXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gb24gYWpvdXRlIGxlIHBhcmFtZXRyZSBjYWxsYmFjayBkYW5zIGwnVVJMIHMnaWwgbidleGlzdGUgcGFzXG4gICAgICAgIGlmICghdXJsSGFzQ2FsbGJhY2tLZXkpIHtcbiAgICAgICAgICAgIC8vIGdlc3Rpb24gZGVzIGF1dHJlcyBwYXJhbS4gZXQgXCI/XCJcbiAgICAgICAgICAgIHZhciBrID0gb3B0aW9ucy51cmwuaW5kZXhPZihcIj9cIik7XG4gICAgICAgICAgICBpZiAoayA9PT0gLTEpIHtcbiAgICAgICAgICAgICAgICAvLyBhdWN1biBwYXJhbS4sIG5pIGRlICc/J1xuICAgICAgICAgICAgICAgIG9wdGlvbnMudXJsID0gb3B0aW9ucy51cmwgKyBcIj9cIiArIFwiY2FsbGJhY2s9XCI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGsgPT09IG9wdGlvbnMudXJsLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIC8vIHVuaXF1ZW1lbnQgbGUgJz8nXG4gICAgICAgICAgICAgICAgb3B0aW9ucy51cmwgPSBvcHRpb25zLnVybCArIFwiY2FsbGJhY2s9XCI7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIGxlICc/JyBldCBsZXMgcGFyYW0uIGV4aXN0ZW50XG4gICAgICAgICAgICAgICAgb3B0aW9ucy51cmwgPSBvcHRpb25zLnVybCArIFwiJlwiICsgXCJjYWxsYmFjaz1cI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AgICAgICAgb3B0aW9ucy5jYWxsYmFja05hbWUgKz0gY2FsbGJhY2tJZDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBvcHRpb25zLnVybCA9IG9wdGlvbnMudXJsLnJlcGxhY2UoXCJjYWxsYmFjaz1cIiwgXCJjYWxsYmFjaz1cIiArIG9wdGlvbnMuY2FsbGJhY2tOYW1lKTtcbiAgICAgICAgICAgIGxvZ2dlci5pbmZvKFwic2V0dGluZyBjYWxsYmFjayBmdW5jdGlvbiBuYW1lIGluICdvcHRpb25zLnVybCcgOiBcIiArIG9wdGlvbnMudXJsKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHRpbWVPdXQgcGFyIGRlZmF1dFxuICAgICAgICBpZiAoIW9wdGlvbnMub25UaW1lT3V0KSB7XG4gICAgICAgICAgICBsb2dnZXIuaW5mbyhcInNldHRpbmcgJ29wdGlvbnMub25UaW1lT3V0JyBkZWZhdWx0IHZhbHVlXCIpO1xuICAgICAgICAgICAgLyoqIGNhbGxiYWNrIHRpbWVvdXQgcGFyIGRlZmF1dCAqL1xuICAgICAgICAgICAgb3B0aW9ucy5vblRpbWVPdXQgPSBmdW5jdGlvbiAoLyogZXJyb3IgKi8pIHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIlRpbWVPdXQgd2hpbGUgaW52b2tpbmcgdXJsIDogXCIgKyBvcHRpb25zLnVybCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFIYXNDYWxsYmFja05hbWUpIHtcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcblxuICAgICAgICAgICAgLy8gZXZlbnQgZHUgdGltZW91dFxuICAgICAgICAgICAgdmFyIG9uVGltZU91dFRyaWdnZXIgPSBudWxsO1xuXG4gICAgICAgICAgICAvLyBkZWNsZW5jaGUgbGUgdGltZW91dCBzaSA+IMOgIDAgIVxuICAgICAgICAgICAgaWYgKG9wdGlvbnMudGltZU91dCA+IDApIHtcbiAgICAgICAgICAgICAgICBvblRpbWVPdXRUcmlnZ2VyID0gd2luZG93LnNldFRpbWVvdXQoXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBmb25jdGlvbiBkZSByZXBvbnNlIGR1IHNlcnZpY2UgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvd1tvcHRpb25zLmNhbGxiYWNrTmFtZV0gPSBmdW5jdGlvbiAoKSB7fTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25UaW1lT3V0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9kZWxldGVTY3JpcHQoY2FsbGJhY2tJZCk7XG4gICAgICAgICAgICAgICAgICAgIH0sIG9wdGlvbnMudGltZU91dCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIEZJWE1FIGxlIG5vbSBkZSBsYSBmb25jdGlvbiBuJ2FjY2VwdGUgcGFzIGRlIG5hbWVzcGFjZSAhXG4gICAgICAgICAgICAvLyBleC4gR3AuRnVuY3Rpb24uY2FsbGJhY2tcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgKiBmb25jdGlvbiBkZSByZXBvbnNlIGR1IHNlcnZpY2VcbiAgICAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IGRhdGEgLSBkYXRhXG4gICAgICAgICAgICAqIEBwcml2YXRlXG4gICAgICAgICAgICAqL1xuICAgICAgICAgICAgd2luZG93W29wdGlvbnMuY2FsbGJhY2tOYW1lXSA9IGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgICAgICAgd2luZG93LmNsZWFyVGltZW91dChvblRpbWVPdXRUcmlnZ2VyKTtcbiAgICAgICAgICAgICAgICBvcHRpb25zLm9uUmVzcG9uc2UoZGF0YSk7XG4gICAgICAgICAgICAgICAgc2VsZi5fZGVsZXRlU2NyaXB0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GRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKFwiaGVhZFwiKVswXTtcbiAgICAgICAgaWYgKHNjcmlwdG8gPT09IG51bGwpIHtcbiAgICAgICAgICAgIG5vZGUuYXBwZW5kQ2hpbGQoc2NyaXB0dSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvLyBzJ2lsIGV4aXN0ZSBkw6lqw6AsIG9uIGxlIHJlbXBsYWNlICFcbiAgICAgICAgICAgIG5vZGUucmVwbGFjZUNoaWxkKHNjcmlwdHUsIHNjcmlwdG8pO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICogZGVsZXRlIFNjcmlwdFxuICAgICogQHBhcmFtIHtTdHJpbmd9IGNhbGxiYWNrSWQgLSBjYWxsYmFjayBJZFxuICAgICogQHByaXZhdGVcbiAgICAqL1xuICAgIF9kZWxldGVTY3JpcHQgOiBmdW5jdGlvbiAoY2FsbGJhY2tJZCkge1xuICAgICAgICB2YXIgc2NyaXB0ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoXCJyZXN1bHRzXCIgKyBjYWxsYmFja0lkKTtcbiAgICAgICAgaWYgKHNjcmlwdCkge1xuICAgICAgICAgICAgdmFyIG5vZGUgPSBzY3JpcHQucGFyZW50Tm9kZSB8fCBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQ7XG4gICAgICAgICAgICBpZiAoIW5vZGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBub2RlLnJlbW92ZUNoaWxkKHNjcmlwdCk7XG4gICAgICAgIH1cbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBKU09OUDtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Protocols/JSONP.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Protocols/Protocol.js": +/*!*********************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Protocols/Protocol.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils/Helper */ \"./node_modules/geoportal-access-lib/src/Utils/Helper.js\");\n/* harmony import */ var _XHR__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./XHR */ \"./node_modules/geoportal-access-lib/src/Protocols/XHR.js\");\n/* harmony import */ var _JSONP__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./JSONP */ \"./node_modules/geoportal-access-lib/src/Protocols/JSONP.js\");\n/**\n * Interface de dialogue avec les webservices\n *\n * @module Protocols\n * @private\n * @alias Gp.Protocols\n */\n\n\n\n\nvar Protocol = {\n\n /**\n * Interface unique d\"envoi d\"une requête.\n *\n * @method send\n * @static\n * @param {Object} options - options generales\n * @param {String} options.url - url du service\n * @param {String} options.method - GET, POST, PUT, DELETE\n * @param {String} options.protocol - XHR | JSONP\n * @param {String} options.format - format de la reponse du service : json, xml ou null (brute)...\n * @param {String} options.wrap - encapsuler la reponse du service dans du JSON : true|false (true par defaut sur le protocole JSONP)\n * @param {String} options.callbackSuffix - suffixe de la fonction de callback (JSONP uniquement) (ex: si callbackSuffix=\"\", la fonction s'appellera \"callback\")\n * @param {String} options.timeOut - 0 ms\n * @param {Boolean} options.nocache - true|false\n * @param {Object|String} options.data - content (post) ou param (get)\n * @param {Object|String} options.headers - (post) ex. referer\n * @param {Object|String} options.content - (post) ex. \"application/json\"\n * @param {String} options.scope - this (TODO)\n * @param {Function} options.onResponse - callback\n * @param {Function} options.onFailure - callback\n * @param {Function} options.onTimeOut - callback\n * @param {String} options.proxyUrl - (TODO)\n */\n send : function (options) {\n // INFO\n // \"output\" - param est interne à la classe \"Protocol\" (parametrable via \"wrap\"), et à ajouter à l\"url\n // ce param est independant du service car il est géré par le filtre LUA :\n // ex. json|xml (json par defaut).\n // Ce param. permet d\"encapsuler du XML dans du JSON :\n // {http : {status:200, error:null},xml :\"réponse du service\"}\n // Utile pour les services qui ne repondent que du XML (ex. Geocodage)\n //\n // |-------------------------------------------------|\n // | \\service | | | |\n // | output\\ format| json | xml | remarques |\n // |--------\\------|------|-----|--------------------|\n // | json | json | json| json/xml encapsulé |\n // | xml | json | xml | param inactif |\n // |-------------------------------------------------|\n // ex. le service demande une reponse native au \"format\" json et avec un \"output\" json.\n // on a donc une reponse json encapsulé dans un json : ce qu'on ne souhaite pas !\n // dans ce cas on ne renseigne pas output=json\n\n // INFO\n // \"wrap\" - choix d\"encapsuler ou non les reponses dans du JSON.\n // Par defaut, on encapsule uniquement les reponses sur le protocole JSONP (et qui sont en xml) !\n\n // INFO\n // \"callback\" - param est interne à la classe \"Protocol\" (non parametrable), et à ajouter à l\"url\n // ce param est independant du service car il est géré aussi par le filtre LUA :\n // ex. callback|null\n // Ce param. permet de renvoyer une reponse javascript :\n // callback ({http : {status:200, error:null},xml :\"réponse du service\"})\n // Ce param. est non renseigné par defaut car pour du JSONP, on utilise le\n // le protocol JSONP, et ce dernier implemente déjà le callback !\n\n // settings par defaut\n var settings = options || {\n method : \"GET\",\n // protocol : \"JSONP\",\n protocol : \"XHR\",\n timeOut : 0,\n format : null,\n wrap : true,\n nocache : true,\n output : \"json\",\n callback : null,\n callbackSuffix : null\n };\n\n // on determine l'environnement d'execution : browser ou non ?\n // et on stoppe pour nodeJS... sur un protocole JSONP !\n if (typeof window === \"undefined\" && options.protocol === \"JSONP\") {\n console.log(\"Value (s) for parameter (s) 'protocol=JSONP (instead use XHR)' not supported to NodeJS\");\n return;\n }\n\n if (options.protocol === \"XHR\" || options.format === \"json\") {\n settings.wrap = false;\n } else if (options.protocol === \"JSONP\" && options.format === \"xml\") {\n settings.wrap = true;\n }\n\n settings.callback = null; // FIXME non géré !?\n settings.output = settings.wrap ? \"json\" : null;\n\n // on encapsule les reponses dans un objet JSON\n if (settings.wrap) {\n var params = {};\n params.output = settings.output;\n params.callback = settings.callback;\n delete params.callback; // FIXME non géré !?\n settings.url = _Utils_Helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].normalyzeUrl(options.url, params);\n }\n\n // choix de l\"implementation :\n // XHR ou JSONP\n switch (settings.protocol) {\n case \"XHR\":\n // on normalise l'url (gestion du cache)\n if (options.method === \"GET\" && options.nocache) {\n settings.url = _Utils_Helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].normalyzeUrl(settings.url, {\n t : new Date().getTime()\n });\n }\n // appel du service en XHR\n _XHR__WEBPACK_IMPORTED_MODULE_1__[\"default\"].call(settings);\n break;\n case \"JSONP\":\n\n // on normalise l'url si les params. sont renseignés dans la string|object \"data\"\n if (settings.data) {\n settings.url = _Utils_Helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].normalyzeUrl(settings.url, settings.data);\n }\n\n // appel du service en JSONP\n _JSONP__WEBPACK_IMPORTED_MODULE_2__[\"default\"].call(settings);\n break;\n default:\n throw new Error(\"protocol not supported (XHR|JSONP) !\");\n }\n }\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Protocol);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvUHJvdG9jb2xzL1Byb3RvY29sLmpzPzIyNjIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNxQztBQUNiO0FBQ0k7O0FBRTVCOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxlQUFlLE9BQU87QUFDdEIsZUFBZSxPQUFP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IsXG4gICAgICAgICAgICB0aW1lT3V0IDogMCxcbiAgICAgICAgICAgIGZvcm1hdCA6IG51bGwsXG4gICAgICAgICAgICB3cmFwIDogdHJ1ZSxcbiAgICAgICAgICAgIG5vY2FjaGUgOiB0cnVlLFxuICAgICAgICAgICAgb3V0cHV0IDogXCJqc29uXCIsXG4gICAgICAgICAgICBjYWxsYmFjayA6IG51bGwsXG4gICAgICAgICAgICBjYWxsYmFja1N1ZmZpeCA6IG51bGxcbiAgICAgICAgfTtcblxuICAgICAgICAvLyBvbiBkZXRlcm1pbmUgbCdlbnZpcm9ubmVtZW50IGQnZXhlY3V0aW9uIDogYnJvd3NlciBvdSBub24gP1xuICAgICAgICAvLyBldCBvbiBzdG9wcGUgcG91ciBub2RlSlMuLi4gc3VyIHVuIHByb3RvY29sZSBKU09OUCAhXG4gICAgICAgIGlmICh0eXBlb2Ygd2luZG93ID09PSBcInVuZGVmaW5lZFwiICYmIG9wdGlvbnMucHJvdG9jb2wgPT09IFwiSlNPTlBcIikge1xuICAgICAgICAgICAgY29uc29sZS5sb2coXCJWYWx1ZSAocykgZm9yIHBhcmFtZXRlciAocykgJ3Byb3RvY29sPUpTT05QIChpbnN0ZWFkIHVzZSBYSFIpJyBub3Qgc3VwcG9ydGVkIHRvIE5vZGVKU1wiKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChvcHRpb25zLnByb3RvY29sID09PSBcIlhIUlwiIHx8IG9wdGlvbnMuZm9ybWF0ID09PSBcImpzb25cIikge1xuICAgICAgICAgICAgc2V0dGluZ3Mud3JhcCA9IGZhbHNlO1xuICAgICAgICB9IGVsc2UgaWYgKG9wdGlvbnMucHJvdG9jb2wgPT09IFwiSlNPTlBcIiAmJiBvcHRpb25zLmZvcm1hdCA9PT0gXCJ4bWxcIikge1xuICAgICAgICAgICAgc2V0dGluZ3Mud3JhcCA9IHRydWU7XG4gICAgICAgIH1cblxuICAgICAgICBzZXR0aW5ncy5jYWxsYmFjayA9IG51bGw7IC8vIEZJWE1FIG5vbiBnw6lyw6kgIT9cbiAgICAgICAgc2V0dGluZ3Mub3V0cHV0ID0gc2V0dGluZ3Mud3JhcCA/IFwianNvblwiIDogbnVsbDtcblxuICAgICAgICAvLyBvbiBlbmNhcHN1bGUgbGVzIHJlcG9uc2VzIGRhbnMgdW4gb2JqZXQgSlNPTlxuICAgICAgICBpZiAoc2V0dGluZ3Mud3JhcCkge1xuICAgICAgICAgICAgdmFyIHBhcmFtcyA9IHt9O1xuICAgICAgICAgICAgcGFyYW1zLm91dHB1dCA9IHNldHRpbmdzLm91dHB1dDtcbiAgICAgICAgICAgIHBhcmFtcy5jYWxsYmFjayA9IHNldHRpbmdzLmNhbGxiYWNrO1xuICAgICAgICAgICAgZGVsZXRlIHBhcmFtcy5jYWxsYmFjazsgLy8gRklYTUUgbm9uIGfDqXLDqSAhP1xuICAgICAgICAgICAgc2V0dGluZ3MudXJsID0gSGVscGVyLm5vcm1hbHl6ZVVybChvcHRpb25zLnVybCwgcGFyYW1zKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGNob2l4IGRlIGxcImltcGxlbWVudGF0aW9uIDpcbiAgICAgICAgLy8gWEhSIG91IEpTT05QXG4gICAgICAgIHN3aXRjaCAoc2V0dGluZ3MucHJvdG9jb2wpIHtcbiAgICAgICAgICAgIGNhc2UgXCJYSFJcIjpcbiAgICAgICAgICAgICAgICAvLyBvbiBub3JtYWxpc2UgbCd1cmwgKGdlc3Rpb24gZHUgY2FjaGUpXG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMubWV0aG9kID09PSBcIkdFVFwiICYmIG9wdGlvbnMubm9jYWNoZSkge1xuICAgICAgICAgICAgICAgICAgICBzZXR0aW5ncy51cmwgPSBIZWxwZXIubm9ybWFseXplVXJsKHNldHRpbmdzLnVybCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgdCA6IG5ldyBEYXRlKCkuZ2V0VGltZSgpXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBhcHBlbCBkdSBzZXJ2aWNlIGVuIFhIUlxuICAgICAgICAgICAgICAgIFhIUi5jYWxsKHNldHRpbmdzKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJKU09OUFwiOlxuXG4gICAgICAgICAgICAgICAgLy8gb24gbm9ybWFsaXNlIGwndXJsIHNpIGxlcyBwYXJhbXMuIHNvbnQgcmVuc2VpZ27DqXMgZGFucyBsYSBzdHJpbmd8b2JqZWN0IFwiZGF0YVwiXG4gICAgICAgICAgICAgICAgaWYgKHNldHRpbmdzLmRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgc2V0dGluZ3MudXJsID0gSGVscGVyLm5vcm1hbHl6ZVVybChzZXR0aW5ncy51cmwsIHNldHRpbmdzLmRhdGEpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGFwcGVsIGR1IHNlcnZpY2UgZW4gSlNPTlBcbiAgICAgICAgICAgICAgICBKU09OUC5jYWxsKHNldHRpbmdzKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwicHJvdG9jb2wgbm90IHN1cHBvcnRlZCAoWEhSfEpTT05QKSAhXCIpO1xuICAgICAgICB9XG4gICAgfVxuXG59O1xuXG5leHBvcnQgZGVmYXVsdCBQcm90b2NvbDtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Protocols/Protocol.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Protocols/XHR.js": +/*!****************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Protocols/XHR.js ***! + \****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Utils/Helper */ \"./node_modules/geoportal-access-lib/src/Utils/Helper.js\");\n/* harmony import */ var es6_promise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! es6-promise */ \"./node_modules/es6-promise/dist/es6-promise.js\");\n/* harmony import */ var es6_promise__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(es6_promise__WEBPACK_IMPORTED_MODULE_2__);\n/* global Promise, require, XDomainRequest */\n\n\n\n\n// import __request from \"request\";\n// import __xmldom from \"xmldom\";\n\n/**\n * Ajax Request (use of Promises)\n *\n * @module XHR\n * @alias Gp.Protocols.XHR\n * @see dependance 'es6-promise'\n */\n\n// cf. https://xhr.spec.whatwg.org/\n// cf. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest\n\nvar XHR = {\n\n /**\n * Interface unique d'envoi d'une requête.\n *\n * @method call\n * @static\n * @param {Object} settings - options generales\n * @param {String} settings.url - url du service\n * @param {String} settings.method - GET, POST, PUT, DELETE\n * @param {String} settings.format - format de la reponse du service : json, xml ou null (brute)\n * @param {String} settings.data - content (post) ou param (get)\n * @param {String} settings.proxy - proxy url\n * @param {Object|String} settings.headers - (post) ex. referer\n * @param {Object|String} settings.content - (post) ex. 'application/json'\n * @param {String} settings.timeOut - timeout = 0 par defaut\n * @param {String} settings.scope - this\n * @param {Function} settings.onResponse - callback\n * @param {Function} settings.onFailure - callback\n */\n call : function (settings) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"XHR\");\n logger.trace(\"[XHR::call()]\");\n\n // FIXME\n // To polyfill the global environment\n es6_promise__WEBPACK_IMPORTED_MODULE_2___default.a.polyfill();\n\n // test sur les settings obligatoires\n if (!settings.url) {\n throw new Error(\"missing parameter : url is not defined !\");\n }\n\n if (!settings.method) {\n throw new Error(\"missing parameter : method is not defined !\");\n }\n\n if (!settings.format) {\n settings.format = \"text\"; // reponse brute !\n }\n\n var options = {};\n options.url = settings.url;\n options.data = settings.data ? settings.data : null;\n options.method = settings.method;\n options.timeOut = settings.timeOut || 0;\n options.scope = settings.scope || this;\n options.proxy = settings.proxy || null;\n options.content = settings.content || null;\n options.headers = settings.headers || {\n referer : \"http://localhost\"\n };\n\n // test sur les valeurs de 'settings.method'\n switch (settings.method) {\n case \"DELETE\":\n case \"GET\":\n break;\n case \"PUT\":\n case \"POST\":\n // on force sur ces params spécifiques au mode POST\n options.content = settings.content ? settings.content : \"application/x-www-form-urlencoded\"; // FIXME en attente des services : bascule en \"application/xml\" ou \"application/json\"\n options.headers = settings.headers ? settings.headers : { referer : \"http://localhost\" }; // FIXME parametrable...\n break;\n case \"HEAD\":\n case \"OPTIONS\":\n throw new Error(\"HTTP method not yet supported !\");\n default:\n throw new Error(\"HTTP method unknown !\");\n }\n\n // test sur les valeurs de 'settings.format'\n switch (settings.format) {\n case \"text\":\n this.__call(options)\n .then(function (response) {\n logger.trace(response);\n settings.onResponse.call(this, response);\n })\n .catch(function (error) {\n settings.onFailure.call(this, error);\n });\n break;\n case \"json\":\n this.__callJSON(options)\n .then(function (response) {\n logger.trace(response);\n settings.onResponse.call(this, response);\n })\n .catch(function (error) {\n settings.onFailure.call(this, error);\n });\n break;\n case \"xml\":\n this.__callXML(options)\n .then(function (response) {\n logger.trace(response);\n settings.onResponse.call(this, response);\n })\n .catch(function (error) {\n settings.onFailure.call(this, error);\n });\n break;\n default:\n throw new Error(\"This output Format is not yet supported !\");\n }\n },\n\n /**\n * Requete\n *\n * @method __call\n * @private\n * @param {Object} options - options\n * @return {Object} promise\n */\n __call : function (options) {\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"XHR\");\n logger.trace(\"[XHR::__call()]\");\n\n var promise = new Promise(\n function (resolve, reject) {\n // traitement du corps de la requête\n var corps = (options.method === \"POST\" || options.method === \"PUT\") ? 1 : 0;\n\n // seulement si options.data n'est pas vide (peut être un objet ou une chaine de caractères)\n if (options.data && ((typeof options.data === \"object\" && Object.keys(options.data).length) || (typeof options.data === \"string\" && options.data.length)) && !corps) {\n if (options.scope.CLASSNAME === \"Geocode\" || options.scope.CLASSNAME === \"ReverseGeocode\") {\n options.url = options.url + options.data;\n } else {\n options.url = _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__[\"default\"].normalyzeUrl(options.url, options.data);\n }\n }\n\n logger.trace(\"URL = \", options.url);\n\n var hXHR = null;\n\n // test on env. nodejs or browser\n if (typeof window === \"undefined\") {\n var nodefetch = __webpack_require__(/*! node-fetch */ \"node-fetch\");\n\n var opts = {\n headers : {\n Referer : \"https://localhost\"\n }\n };\n\n if (options.data && typeof options.data === \"string\" && corps) {\n opts = {\n method : options.method,\n body : options.data,\n headers : {\n \"Content-Type\" : options.content,\n Referer : \"https://localhost\"\n }\n };\n }\n\n return nodefetch(options.url, opts)\n .then(function (response) {\n if (response.ok) { // res.status >= 200 && res.status < 300\n resolve(response.text());\n } else {\n var message = \"Errors Occured on Http Request (status : '\" + response.statusText + \"' | url : '\" + response.url + \"')\";\n var status = response.status;\n reject({\n message : message,\n status : status\n });\n }\n })\n .catch(function (e) {\n reject({\n message : e,\n status : -1\n });\n });\n } else {\n if (window.XMLHttpRequest) {\n logger.trace(\"XMLHttpRequest\");\n\n hXHR = new XMLHttpRequest();\n hXHR.open(options.method, options.url, true); // async\n hXHR.overrideMimeType = options.content;\n\n // gestion du timeout\n var onTimeOutTrigger = null;\n if (options.timeOut > 0) {\n // FIXME le timeout interne ne me permet pas de declencher le bon message...\n // hXHR.timeout = options.timeOut;\n logger.trace(\"XHR - TimeOut actif !\");\n /**\n * Description\n *\n * @method onTimeOutTrigger\n * @private\n */\n onTimeOutTrigger = window.setTimeout(\n function () {\n var message = \"TimeOut Occured on Http Request with XMLHttpRequest !\";\n reject({\n message : message,\n status : -1\n });\n }, options.timeOut);\n }\n\n if (corps) {\n // headers, data, content of data\n // cf. https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-xmlhttprequest-setrequestheader\n logger.trace(\"data = \", options.data);\n hXHR.setRequestHeader(\"Content-type\", options.content);\n // FIXME refused to set unsafe header content-length javascript\n // hXHR.setRequestHeader (\"Content-length\", options.data.length);\n // hXHR.setRequestHeader (\"Referer\", options.headers.referer);\n }\n\n /**\n * On Error\n * FIXME ne se declenche pas !?\n *\n * @param {Object} e - Event\n * @method onerror\n * @private\n */\n hXHR.onerror = function (e) {\n console.log(e);\n reject(new Error(\"Errors Occured on Http Request with XMLHttpRequest !\"));\n };\n\n /**\n * On Timeout\n * FIXME ne se declenche pas !?\n *\n * @param {Object} e - Event\n * @method ontimeout\n * @private\n */\n hXHR.ontimeout = function (e) {\n console.log(e);\n reject(new Error(\"TimeOut Occured on Http Request with XMLHttpRequest !\"));\n };\n\n /**\n * Description\n *\n * @method onreadystatechange\n * @private\n */\n hXHR.onreadystatechange = function (e) {\n if (hXHR.readyState === 4) { // DONE\n if (hXHR.status === 200) {\n window.clearTimeout(onTimeOutTrigger);\n resolve(hXHR.response);\n } else {\n var message = \"Errors Occured on Http Request (status : '\" + e.target.statusText + \"' | url : '\" + e.target.responseURL + \"' | response : '\" + e.target.response + \"')\";\n var status = e.target.status;\n reject({\n message : message,\n status : status\n });\n }\n }\n };\n\n // gestion du content data\n var data4xhr = (options.data && corps) ? options.data : null;\n\n hXHR.send(data4xhr);\n } else if (window.XDomainRequest) {\n // worked in Internet Explorer 8–10 only !\n logger.trace(\"XDomainRequest\");\n\n hXHR = new XDomainRequest();\n hXHR.open(options.method, options.url);\n\n hXHR.overrideMimeType = options.content;\n\n if (options.timeOut > 0) {\n hXHR.timeout = options.timeout;\n logger.trace(\"XHR - TimeOut actif !\");\n }\n\n if (corps) {\n // headers, data, content of data\n // cf. https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-xmlhttprequest-setrequestheader\n hXHR.setRequestHeader(\"Content-type\", options.content);\n // FIXME refused to set unsafe header content-length javascript\n // hXHR.setRequestHeader (\"Content-length\", options.data.length);\n // hXHR.setRequestHeader (\"Referer\", options.headers.referer);\n }\n\n /**\n * Description\n *\n * @method onerror\n * @private\n */\n hXHR.onerror = function () {\n reject(new Error(\"Errors Occured on Http Request with XMLHttpRequest !\"));\n };\n\n /**\n * Description\n *\n * @method ontimeout\n * @private\n */\n hXHR.ontimeout = function () {\n reject(new Error(\"TimeOut Occured on Http Request with XMLHttpRequest !\"));\n };\n\n /**\n * On Load\n *\n * @method onload\n * @private\n */\n hXHR.onload = function (e) {\n if (hXHR.status === 200) {\n resolve(hXHR.responseText);\n } else {\n var message = \"Errors Occured on Http Request (status : '\" + e.target.statusText + \"' | url : '\" + e.target.responseURL + \"')\";\n var status = e.target.status;\n reject({\n message : message,\n status : status\n });\n }\n };\n\n var data4xdr = (options.data && corps) ? options.data : null;\n\n hXHR.send(data4xdr);\n } else {\n throw new Error(\"CORS not supported\");\n }\n }\n }\n );\n\n return promise;\n },\n\n /**\n * Requete avec parser JSON\n *\n * @method __callJSON\n * @private\n * @param {Object} options - options\n * @return {Object} promise\n */\n __callJSON : function (options) {\n return this.__call(options)\n .then(JSON.parse)\n .catch(function (error) {\n console.log(\"_callJSON failed on : \", options.url, error);\n // FIXME pas d'exception, laissons le fil se derouler...\n // throw error;\n });\n },\n\n /**\n * Requete avec parser XML\n *\n * @method __callXML\n * @private\n * @param {Object} options - options\n * @return {Object} promise\n */\n __callXML : function (options) {\n return this.__call(options)\n .then(function (response) {\n var xmlDoc;\n\n // test on env. nodejs or browser\n if (typeof window === \"undefined\") {\n var DOMParser = __webpack_require__(/*! xmldom */ \"xmldom\").DOMParser; // __xmldom.DOMParser\n xmlDoc = new DOMParser().parseFromString(response, \"text/xml\");\n } else {\n if (window.DOMParser) {\n var parser = new window.DOMParser();\n xmlDoc = parser.parseFromString(response, \"text/xml\");\n } else { // IE\n xmlDoc = new window.ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async = false;\n xmlDoc.loadXML(response);\n }\n }\n\n return xmlDoc;\n })\n .catch(function (error) {\n console.log(\"__callXML failed on : \", options.url, error);\n // FIXME pas d'exception, laissons le fil se derouler...\n // throw error;\n });\n }\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (XHR);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvUHJvdG9jb2xzL1hIUi5qcz8wYzViIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFFOEM7QUFDVDtBQUNBO0FBQ3JDO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZUFBZSxPQUFPO0FBQ3RCLGVBQWUsT0FBTztBQUN0QixlQUFlLE9BQU87QUFDdEIsZUFBZSxPQUFPO0FBQ3RCLGVBQWUsT0FBTztBQUN0QixlQUFlLE9BQU87QUFDdEIsZUFBZSxjQUFjO0FBQzdCLGVBQWUsY0FBYztBQUM3QixlQUFlLE9BQU87QUFDdEIsZUFBZSxPQUFPO0FBQ3RCLGVBQWUsU0FBUztBQUN4QixlQUFlLFNBQVM7QUFDeEI7QUFDQTtBQUNBO0FBQ0EscUJBQXFCLDhEQUFNO0FBQzNCOztBQUVBO0FBQ0E7QUFDQSxRQUFRLGtE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CB5ZXQgc3VwcG9ydGVkICFcIik7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkhUVFAgbWV0aG9kIHVua25vd24gIVwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHRlc3Qgc3VyIGxlcyB2YWxldXJzIGRlICdzZXR0aW5ncy5mb3JtYXQnXG4gICAgICAgIHN3aXRjaCAoc2V0dGluZ3MuZm9ybWF0KSB7XG4gICAgICAgICAgICBjYXNlIFwidGV4dFwiOlxuICAgICAgICAgICAgICAgIHRoaXMuX19jYWxsKG9wdGlvbnMpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uIChyZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmdzLm9uUmVzcG9uc2UuY2FsbCh0aGlzLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIC5jYXRjaChmdW5jdGlvbiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmdzLm9uRmFpbHVyZS5jYWxsKHRoaXMsIGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwianNvblwiOlxuICAgICAgICAgICAgICAgIHRoaXMuX19jYWxsSlNPTihvcHRpb25zKVxuICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZ2dlci50cmFjZShyZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5ncy5vblJlc3BvbnNlLmNhbGwodGhpcywgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5ncy5vbkZhaWx1cmUuY2FsbCh0aGlzLCBlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInhtbFwiOlxuICAgICAgICAgICAgICAgIHRoaXMuX19jYWxsWE1MKG9wdGlvbnMpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uIChyZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmdzLm9uUmVzcG9uc2UuY2FsbCh0aGlzLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIC5jYXRjaChmdW5jdGlvbiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmdzLm9uRmFpbHVyZS5jYWxsKHRoaXMsIGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlRoaXMgb3V0cHV0IEZvcm1hdCBpcyBub3QgeWV0IHN1cHBvcnRlZCAhXCIpO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFJlcXVldGVcbiAgICAgKlxuICAgICAqIEBtZXRob2QgX19jYWxsXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0gIHtPYmplY3R9IG9wdGlvbnMgLSBvcHRpb25zXG4gICAgICogQHJldHVybiB7T2JqZWN0fSBwcm9taXNlXG4gICAgICovXG4gICAgX19jYWxsIDogZnV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tcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMudXJsID0gSGVscGVyLm5vcm1hbHl6ZVVybChvcHRpb25zLnVybCwgb3B0aW9ucy5kYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGxvZ2dlci50cmFjZShcIlVSTCA9IFwiLCBvcHRpb25zLnVybCk7XG5cbiAgICAgICAgICAgICAgICB2YXIgaFhIUiA9IG51bGw7XG5cbiAgICAgICAgICAgICAgICAvLyB0ZXN0IG9uIGVudi4gbm9kZWpzIG9yIGJyb3dzZXJcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHdpbmRvdyA9PT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbm9kZWZldGNoID0gcmVxdWlyZShcIm5vZGUtZmV0Y2hcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIG9wdHMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlZmVyZXIgOiBcImh0dHBzOi8vbG9jYWxob3N0XCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5kYXRhICYmIHR5cGVvZiBvcHRpb25zLmRhdGEgPT09IFwic3RyaW5nXCIgJiYgY29ycHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdHMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kIDogb3B0aW9ucy5tZXRob2QsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9keSA6IG9wdGlvbnMuZGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIkNvbnRlbnQtVHlwZVwiIDogb3B0aW9ucy5jb250ZW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZWZlcmVyIDogXCJodHRwczovL2xvY2FsaG9zdFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBub2RlZmV0Y2gob3B0aW9ucy51cmwsIG9wdHMpXG4gICAgICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uub2spIHsgLy8gcmVzLnN0YXR1cyA+PSAyMDAgJiYgcmVzLnN0YXR1cyA8IDMwMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHJlc3BvbnNlLnRleHQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1lc3NhZ2UgPSBcIkVycm9ycyBPY2N1cmVkIG9uIEh0dHAgUmVxdWVzdCAoc3RhdHVzIDogJ1wiICsgcmVzcG9uc2Uuc3RhdHVzVGV4dCArIFwiJyB8IHVybCA6ICdcIiArIHJlc3BvbnNlLnVybCArIFwiJylcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN0YXR1cyA9IHJlc3BvbnNlLnN0YXR1cztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgOiBtZXNzYWdlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzIDogc3RhdHVzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3Qoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlIDogZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzIDogLTFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh3aW5kb3cuWE1MSHR0cFJlcXVlc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZ2dlci50cmFjZShcIlhNTEh0dHBSZXF1ZXN0XCIpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBoWEhSID0gbmV3IFhNTEh0dHBSZXF1ZXN0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBoWEhSLm9wZW4ob3B0aW9ucy5tZXRob2QsIG9wdGlvbnMudXJsLCB0cnVlKTsgLy8gYXN5bmNcbiAgICAgICAgICAgICAgICAgICAgICAgIGhYSFIub3ZlcnJpZGVNaW1lVHlwZSA9IG9wdGlvbnMuY29udGVudDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZ2VzdGlvbiBkdSB0aW1lb3V0XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgb25UaW1lT3V0VHJpZ2dlciA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy50aW1lT3V0ID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZJWE1FIGxlIHRpbWVvdXQgaW50ZXJuZSBuZSBtZSBwZXJtZXQgcGFzIGRlIGRlY2xlbmNoZXIgbGUgYm9uIG1lc3NhZ2UuLi5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBoWEhSLnRpbWVvdXQgPSBvcHRpb25zLnRpbWVPdXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiWEhSIC0gVGltZU91dCBhY3RpZiAhXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIERlc2NyaXB0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbWV0aG9kIG9uVGltZU91dFRyaWdnZXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAcHJpdmF0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uVGltZU91dFRyaWdnZXIgPSB3aW5kb3cuc2V0VGltZW91dChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1lc3NhZ2UgPSBcIlRpbWVPdXQgT2NjdXJlZCBvbiBIdHRwIFJlcXVlc3Qgd2l0aCBYTUxIdHRwUmVxdWVzdCAhXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3Qoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgOiBtZXNzYWdlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA6IC0xXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgb3B0aW9ucy50aW1lT3V0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvcnBzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaGVhZGVycywgZGF0YSwgY29udGVudCBvZiBkYXRhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2YuIGh0dHBzOi8vZHZjcy53My5vcmcvaGcveGhyL3Jhdy1maWxlL3RpcC9PdmVydmlldy5odG1sI2RvbS14bWxodHRwcmVxdWVzdC1zZXRyZXF1ZXN0aGVhZGVyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiZGF0YSA9IFwiLCBvcHRpb25zLmRhdGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhYSFIuc2V0UmVxdWVzdEhlYWRlcihcIkNvbnRlbnQtdHlwZVwiLCBvcHRpb25zLmNvbnRlbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZJWE1FIHJlZnVzZWQgdG8gc2V0IHVuc2FmZSBoZWFkZXIgY29udGVudC1sZW5ndGggamF2YXNjcmlwdFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGhYSFIuc2V0UmVxdWVzdEhlYWRlciAoXCJDb250ZW50LWxlbmd0aFwiLCBvcHRpb25zLmRhdGEubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBoWEhSLnNldFJlcXVlc3RIZWFkZXIgKFwiUmVmZXJlclwiLCBvcHRpb25zLmhlYWRlcnMucmVmZXJlcik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICAgICAgICAgICAgICogT24gRXJyb3JcbiAgICAgICAgICAgICAgICAgICAgICAgICAqIEZJWE1FIG5lIHNlIGRlY2xlbmNoZSBwYXMgIT9cbiAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gZSAtIEV2ZW50XG4gICAgICAgICAgICAgICAgICAgICAgICAgKiBAbWV0aG9kIG9uZXJyb3JcbiAgICAgICAgICAgICAgICAgICAgICAgICAqIEBwcml2YXRlXG4gICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgIGhYSFIub25lcnJvciA9IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcihcIkVycm9ycyBPY2N1cmVkIG9uIEh0dHAgUmVxdWVzdCB3aXRoIFhNTEh0dHBSZXF1ZXN0ICFcIikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgICAgICAgICAgICAgKiBPbiBUaW1lb3V0XG4gICAgICAgICAgICAgICAgICAgICAgICAgKiBGSVhNRSBuZSBzZSBkZWNsZW5jaGUgcGFzICE/XG4gICAgICAgICAgICAgICAgICAgICAgICAgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IGUgLSBFdmVudFxuICAgICAgICAgICAgICAgICAgICAgICAgICogQG1ldGhvZCBvbnRpbWVvdXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAqIEBwcml2YXRlXG4gICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgIGhYSFIub250aW1lb3V0ID0gZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QobmV3IEVycm9yKFwiVGltZU91dCBPY2N1cmVkIG9uIEh0dHAgUmVxdWVzdCB3aXRoIFhNTEh0dHBSZXF1ZXN0ICFcIikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgICAgICAgICAgICAgKiBEZXNjcmlwdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAqIEBtZXRob2Qgb25yZWFkeXN0YXRlY2hhbmdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgKiBAcHJpdmF0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICovXG4gICAgICAgICAgICAgICAgICAgICAgICBoWEhSLm9ucmVhZHlzdGF0ZWNoYW5nZSA9IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhYSFIucmVhZHlTdGF0ZSA9PT0gNCkgeyAvLyBET05FXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChoWEhSLnN0YXR1cyA9PT0gMjAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2xlYXJUaW1lb3V0KG9uVGltZU91dFRyaWdnZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShoWEhSLnJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtZXNzYWdlID0gXCJFcnJvcnMgT2NjdXJlZCBvbiBIdHRwIFJlcXVlc3QgKHN0YXR1cyA6ICdcIiArIGUudGFyZ2V0LnN0YXR1c1RleHQgKyBcIicgfCB1cmwgOiAnXCIgKyBlLnRhcmdldC5yZXNwb25zZVVSTCArIFwiJyB8IHJlc3BvbnNlIDogJ1wiICsgZS50YXJnZXQucmVzcG9uc2UgKyBcIicpXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgc3RhdHVzID0gZS50YXJnZXQuc3RhdHVzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlIDogbWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiBzdGF0dXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZ2VzdGlvbiBkdSBjb250ZW50IGRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkYXRhNHhociA9IChvcHRpb25zLmRhdGEgJiYgY29ycHMpID8gb3B0aW9ucy5kYXRhIDogbnVsbDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgaFhIUi5zZW5kKGRhdGE0eGhyKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh3aW5kb3cuWERvbWFpblJlcXVlc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdvcmtlZCBpbiBJbnRlcm5ldCBFeHBsb3JlciA44oCTMTAgb25seSAhXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJYRG9tYWluUmVxdWVzdFwiKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgaFhIUiA9IG5ldyBYRG9tYWluUmVxdWVzdCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaFhIUi5vcGVuKG9wdGlvbnMubWV0aG9kLCBvcHRpb25zLnVybCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGhYSFIub3ZlcnJpZGVNaW1lVHlwZSA9IG9wdGlvbnMuY29udGVudDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMudGltZU91dCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoWEhSLnRpbWVvdXQgPSBvcHRpb25zLnRpbWVvdXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiWEhSIC0gVGltZU91dCBhY3RpZiAhXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29ycHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBoZWFkZXJzLCBkYXRhLCBjb250ZW50IG9mIGRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjZi4gaHR0cHM6Ly9kdmNzLnczLm9yZy9oZy94aHIvcmF3LWZpbGUvdGlwL092ZXJ2aWV3Lmh0bWwjZG9tLXhtbGh0dHByZXF1ZXN0LXNldHJlcXVlc3RoZWFkZXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoWEhSLnNldFJlcXVlc3RIZWFkZXIoXCJDb250ZW50LXR5cGVcIiwgb3B0aW9ucy5jb250ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBGSVhNRSByZWZ1c2VkIHRvIHNldCB1bnNhZmUgaGVhZGVyIGNvbnRlbnQtbGVuZ3RoIGphdmFzY3JpcHRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBoWEhSLnNldFJlcXVlc3RIZWFkZXIgKFwiQ29udGVudC1sZW5ndGhcIiwgb3B0aW9ucy5kYXRhLmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaFhIUi5zZXRSZXF1ZXN0SGVhZGVyIChcIlJlZmVyZXJcIiwgb3B0aW9ucy5oZWFkZXJzLnJlZmVyZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAgICAgICAgICAgICAqIERlc2NyaXB0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICogQG1ldGhvZCBvbmVycm9yXG4gICAgICAgICAgICAgICAgICAgICAgICAgKiBAcHJpdmF0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICovXG4gICAgICAgICAgICAgICAgICAgICAgICBoWEhSLm9uZXJyb3IgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcihcIkVycm9ycyBPY2N1cmVkIG9uIEh0dHAgUmVxdWVzdCB3aXRoIFhNTEh0dHBSZXF1ZXN0ICFcIikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgICAgICAgICAgICAgKiBEZXNjcmlwdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAqIEBtZXRob2Qgb250aW1lb3V0XG4gICAgICAgICAgICAgICAgICAgICAgICAgKiBAcHJpdmF0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICovXG4gICAgICAgICAgICAgICAgICAgICAgICBoWEhSLm9udGltZW91dCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QobmV3IEVycm9yKFwiVGltZU91dCBPY2N1cmVkIG9uIEh0dHAgUmVxdWVzdCB3aXRoIFhNTEh0dHBSZXF1ZXN0ICFcIikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgICAgICAgICAgICAgKiBPbiBMb2FkXG4gICAgICAgICAgICAgICAgICAgICAgICAgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICogQG1ldGhvZCBvbmxvYWRcbiAgICAgICAgICAgICAgICAgICAgICAgICAqIEBwcml2YXRlXG4gICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgIGhYSFIub25sb2FkID0gZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaFhIUi5zdGF0dXMgPT09IDIwMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGhYSFIucmVzcG9uc2VUZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWVzc2FnZSA9IFwiRXJyb3JzIE9jY3VyZWQgb24gSHR0cCBSZXF1ZXN0IChzdGF0dXMgOiAnXCIgKyBlLnRhcmdldC5zdGF0dXNUZXh0ICsgXCInIHwgdXJsIDogJ1wiICsgZS50YXJnZXQucmVzcG9uc2VVUkwgKyBcIicpXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdGF0dXMgPSBlLnRhcmdldC5zdGF0dXM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdCh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlIDogbWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA6IHN0YXR1c1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGF0YTR4ZHIgPSAob3B0aW9ucy5kYXRhICYmIGNvcnBzKSA/IG9wdGlvbnMuZGF0YSA6IG51bGw7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGhYSFIuc2VuZChkYXRhNHhkcik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJDT1JTIG5vdCBzdXBwb3J0ZWRcIik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHByb21pc2U7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFJlcXVldGUgYXZlYyBwYXJzZXIgSlNPTlxuICAgICAqXG4gICAgICogQG1ldGhvZCBfX2NhbGxKU09OXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0gIHtPYmplY3R9IG9wdGlvbnMgLSBvcHRpb25zXG4gICAgICogQHJldHVybiB7T2JqZWN0fSBwcm9taXNlXG4gICAgICovXG4gICAgX19jYWxsSlNPTiA6IGZ1bmN0aW9uIChvcHRpb25zKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9fY2FsbChvcHRpb25zKVxuICAgICAgICAgICAgLnRoZW4oSlNPTi5wYXJzZSlcbiAgICAgICAgICAgIC5jYXRjaChmdW5jdGlvbiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIl9jYWxsSlNPTiBmYWlsZWQgb24gOiBcIiwgb3B0aW9ucy51cmwsIGVycm9yKTtcbiAgICAgICAgICAgICAgICAvLyBGSVhNRSBwYXMgZCdleGNlcHRpb24sIGxhaXNzb25zIGxlIGZpbCBzZSBkZXJvdWxlci4uLlxuICAgICAgICAgICAgICAgIC8vIHRocm93IGVycm9yO1xuICAgICAgICAgICAgfSk7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFJlcXVldGUgYXZlYyBwYXJzZXIgWE1MXG4gICAgICpcbiAgICAgKiBAbWV0aG9kIF9fY2FsbFhNTFxuICAgICAqIEBwcml2YXRlXG4gICAgICogQHBhcmFtICB7T2JqZWN0fSBvcHRpb25zIC0gb3B0aW9uc1xuICAgICAqIEByZXR1cm4ge09iamVjdH0gcHJvbWlzZVxuICAgICAqL1xuICAgIF9fY2FsbFhNTCA6IGZ1bmN0aW9uIChvcHRpb25zKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9fY2FsbChvcHRpb25zKVxuICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgdmFyIHhtbERvYztcblxuICAgICAgICAgICAgICAgIC8vIHRlc3Qgb24gZW52LiBub2RlanMgb3IgYnJvd3NlclxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygd2luZG93ID09PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBET01QYXJzZXIgPSByZXF1aXJlKFwieG1sZG9tXCIpLkRPTVBhcnNlcjsgLy8gX194bWxkb20uRE9NUGFyc2VyXG4gICAgICAgICAgICAgICAgICAgIHhtbERvYyA9IG5ldyBET01QYXJzZXIoKS5wYXJzZUZyb21TdHJpbmcocmVzcG9uc2UsIFwidGV4dC94bWxcIik7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHdpbmRvdy5ET01QYXJzZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZXIgPSBuZXcgd2luZG93LkRPTVBhcnNlcigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgeG1sRG9jID0gcGFyc2VyLnBhcnNlRnJvbVN0cmluZyhyZXNwb25zZSwgXCJ0ZXh0L3htbFwiKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsgLy8gSUVcbiAgICAgICAgICAgICAgICAgICAgICAgIHhtbERvYyA9IG5ldyB3aW5kb3cuQWN0aXZlWE9iamVjdChcIk1pY3Jvc29mdC5YTUxET01cIik7XG4gICAgICAgICAgICAgICAgICAgICAgICB4bWxEb2MuYXN5bmMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHhtbERvYy5sb2FkWE1MKHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB4bWxEb2M7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhdGNoKGZ1bmN0aW9uIChlcnJvcikge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiX19jYWxsWE1MIGZhaWxlZCBvbiA6IFwiLCBvcHRpb25zLnVybCwgZXJyb3IpO1xuICAgICAgICAgICAgICAgIC8vIEZJWE1FIHBhcyBkJ2V4Y2VwdGlvbiwgbGFpc3NvbnMgbGUgZmlsIHNlIGRlcm91bGVyLi4uXG4gICAgICAgICAgICAgICAgLy8gdGhyb3cgZXJyb3I7XG4gICAgICAgICAgICB9KTtcbiAgICB9XG5cbn07XG5cbmV4cG9ydCBkZWZhdWx0IFhIUjtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Protocols/XHR.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Alti/Alti.js": +/*!*********************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Alti/Alti.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Request_AltiRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Request/AltiRequestFactory */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js\");\n/* harmony import */ var _Response_AltiResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Response/AltiResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js\");\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n *\n * Appel du service d'altimétrie du Géoportail\n *\n * @todo gestion du parma. output et callback\n * @todo outputFormat (REST) et format (WPS)\n * @todo La reponse JSON peut encapsuler un XML !\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Alti\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {Array.} options.positions - Tableau ({lon:float,lat:float}) contenant les coordonnées des points (CRS:84)\n * dont on veut connaître les altitudes (ou à partir desquelles on va calculer le profil).\n * Chaque élément du tableau est un objet JavaScript avec deux attributs : lon et lat, qui sont des flottants.\n * Minimum 2 éléments si on souhaite calculer un profil altimétrique (ElevationLine).\n * Maximum 50 éléments.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service alti : 'xml' ou 'json'.\n * Ce paramètre déterminera l'extension '.xml' ou '.json' du service dans le cas de l'API REST,\n * ou la valeur du paramètre 'format' dans le cas de la norme WPS.\n * Nécessaire si serverUrl est renseigné, et qu'on souhaite passer par l'API REST,\n * pour connaître le format dans lequel sera fournie la réponse (pour son traitement).\n * Non nécessaire pour la norme WPS. Par défaut, ce paramètre vaut 'json'.\n *\n * @param {Number} [options.sampling] - Nombre de points à utiliser pour déterminer le tracé d'un profil altimétrique, compris entre 2 et 5000.\n * A spécifier lorsqu'on souhaite accéder à cette fonctionnalité.\n * Dans ce cas, les points fournis en entrée (au minimum de deux) servent à déterminer l'axe planimétrique\n * le long duquel le profil doit être calculé.\n * Si le paramètre sampling n'est pas spécifié ou moins de deux points sont fournis,\n * c'est le service Elevation qui sera interrogé (altitudes simples calculées pour les points fournis).\n * Une valeur de sampling strictement inférieure à 2 déclenchera un échantillonnage avec la valeur par défaut du service (3 points).\n *\n * @param {String} [options.api] - Manière d'accéder au service : 'REST' (via l'API REST) ou 'WPS' (via la norme WPS).\n * Par défaut, on utilise l'API REST.\n *\n * @param {Boolean} [options.zonly] - Permet de ne récupérer que les altitudes en sortie s'il vaut 'true'.\n * Vaut 'false' par défaut.\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * positions : [{lon:, lat:}, {lon:, lat:}],\n * outputFormat : 'json' // json|xml\n * sampling : 3,\n * api : 'REST', // REST|WPS\n * zonly : false // false|true\n * };\n *\n */\nfunction Alti (options) {\n if (!(this instanceof Alti)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Alti\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"Alti\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.Alti\");\n this.logger.trace(\"[Constructeur Alti (options)]\");\n\n // #####################\n // analyse des options\n // #####################\n\n if (!options.positions) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"positions\"));\n }\n\n if (options.positions.length === 0) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"positions\"));\n }\n\n // ajout des options spécifiques au service\n this.options.positions = options.positions;\n\n // format de réponse du service : \"json\" ou \"xml\" (valeur par défaut), en minuscule !\n this.options.outputFormat = (typeof options.outputFormat === \"string\") ? options.outputFormat.toLowerCase() : \"xml\";\n\n // sampling\n this.options.sampling = options.sampling || null;\n\n // type d'api utilisé pour requeter le service, en majuscule !\n this.options.api = (typeof options.api === \"string\") ? options.api.toUpperCase() : \"REST\";\n\n // l'api ne peut être interrogée qu'en GET.\n if (this.options.api === \"REST\") {\n this.options.httpMethod = \"GET\";\n }\n\n // param. zonly\n this.options.zonly = options.zonly || false;\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n // en fonction du type d'api, REST ou WPS, du format de reponse demandé (outputFormat)\n // ainsi que sur le type de service (profil ou elevation)\n if (!this.options.serverUrl) {\n var lstUrlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].Alti.url(\"calcul\");\n var urlFound = null;\n switch (this.options.api) {\n case \"WPS\":\n urlFound = lstUrlByDefault.wps;\n break;\n case \"REST\":\n var key = (options.sampling ? \"profil\" : \"elevation\") + \"-\" + this.options.outputFormat;\n urlFound = lstUrlByDefault[key];\n break;\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_UNKNOWN\", \"api\"));\n }\n\n if (!urlFound) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = urlFound;\n this.logger.trace(\"Server URL by default : \" + this.options.serverUrl);\n }\n\n // gestion du type de service\n // si l'extension de l'url est .json ou .xml, on surcharge le format de sortie (outputFormat)\n var idx = this.options.serverUrl.lastIndexOf(\".\");\n if (idx !== -1) {\n var extension = this.options.serverUrl.substring(idx + 1);\n if (extension && extension.length < 5) { // FIXME extension de moins de 4 car. ...\n this.logger.trace(\"Server Extension URL : \" + extension);\n switch (extension.toLowerCase()) {\n case \"json\":\n case \"xml\":\n this.options.outputFormat = extension.toLowerCase();\n break;\n default:\n throw new Error(\"type of service : unknown or unsupported (json or xml) !\");\n }\n }\n }\n}\n\n/**\n * @lends module:Alti#\n */\nAlti.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/**\n * Constructeur (alias)\n */\nAlti.prototype.constructor = Alti;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAlti.prototype.buildRequest = function (error, success) {\n // utilisation en mode callback\n var options = {\n httpMethod : this.options.httpMethod,\n // callback\n onSuccess : function (result) {\n // sauvegarde de la requete !\n this.request = result;\n success.call(this, this.request);\n },\n onError : error,\n scope : this,\n // spécifique au service :\n positions : this.options.positions,\n outputFormat : this.options.outputFormat,\n sampling : this.options.sampling,\n api : this.options.api,\n zonly : this.options.zonly\n };\n\n _Request_AltiRequestFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build(options);\n};\n\n/**\n * Analyse de la reponse (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAlti.prototype.analyzeResponse = function (error, success) {\n // INFO\n // Factory pour masquer la complexité du retour du service qui renvoie soit\n // - une 'string' qui contient du XML ou JSON natif en mode XHR\n // - un objet JSON qui est natif ou encapsulé\n\n if (this.response) {\n var options = {\n response : this.response,\n outputFormat : this.options.outputFormat, // utile pour parser la string en mode XHR : JSON ou XML !\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n _Response_AltiResponseFactory__WEBPACK_IMPORTED_MODULE_6__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Alti);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9BbHRpLmpzPzJlNDIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQ2lEO0FBQ0g7QUFDVztBQUNaO0FBQ1E7QUFDUztBQUNHOztBQUVqRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGFBQWE7QUFDYjtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBLFdBQVcsZUFBZSwrQkFBK0Isb0JBQW9CO0FBQzdFO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQSxXQUFXLFFBQVE7QUFDbkI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsMENBQTBDO0FBQzFDLHVDQUF1QztBQUN2QztBQUNBLHNCQUFzQixXQUFXLEdBQUcsV0FBVztBQUMvQ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yIGRlZmF1dFxuICAgIC8vIGVuIGZvbmN0aW9uIGR1IHR5cGUgZCdhcGksIFJFU1Qgb3UgV1BTLCBkdSBmb3JtYXQgZGUgcmVwb25zZSBkZW1hbmTDqSAob3V0cHV0Rm9ybWF0KVxuICAgIC8vIGFpbnNpIHF1ZSBzdXIgbGUgdHlwZSBkZSBzZXJ2aWNlIChwcm9maWwgb3UgZWxldmF0aW9uKVxuICAgIGlmICghdGhpcy5vcHRpb25zLnNlcnZlclVybCkge1xuICAgICAgICB2YXIgbHN0VXJsQnlEZWZhdWx0ID0gRGVmYXVsdFVybFNlcnZpY2UuQWx0aS51cmwoXCJjYWxjdWxcIik7XG4gICAgICAgIHZhciB1cmxGb3VuZCA9IG51bGw7XG4gICAgICAgIHN3aXRjaCAodGhpcy5vcHRpb25zLmFwaSkge1xuICAgICAgICAgICAgY2FzZSBcIldQU1wiOlxuICAgICAgICAgICAgICAgIHVybEZvdW5kID0gbHN0VXJsQnlEZWZhdWx0LndwcztcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJSRVNUXCI6XG4gICAgICAgICAgICAgICAgdmFyIGtleSA9IChvcHRpb25zLnNhbXBsaW5nID8gXCJwcm9maWxcIiA6IFwiZWxldmF0aW9uXCIpICsgXCItXCIgKyB0aGlzLm9wdGlvbnMub3V0cHV0Rm9ybWF0O1xuICAgICAgICAgICAgICAgIHVybEZvdW5kID0gbHN0VXJsQnlEZWZhdWx0W2tleV07XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihfLmdldE1lc3NhZ2UoXCJQQVJBTV9VTktOT1dOXCIsIFwiYXBpXCIpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdXJsRm91bmQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlVybCBieSBkZWZhdWx0IG5vdCBmb3VuZCAh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SBlc3QgbmF0aWYgb3UgZW5jYXBzdWzDqVxuXG4gICAgaWYgKHRoaXMucmVzcG9uc2UpIHtcbiAgICAgICAgdmFyIG9wdGlvbnMgPSB7XG4gICAgICAgICAgICByZXNwb25zZSA6IHRoaXMucmVzcG9uc2UsXG4gICAgICAgICAgICBvdXRwdXRGb3JtYXQgOiB0aGlzLm9wdGlvbnMub3V0cHV0Rm9ybWF0LCAvLyB1dGlsZSBwb3VyIHBhcnNlciBsYSBzdHJpbmcgZW4gbW9kZSBYSFIgOiBKU09OIG91IFhNTCAhXG4gICAgICAgICAgICByYXdSZXNwb25zZSA6IHRoaXMub3B0aW9ucy5yYXdSZXNwb25zZSxcbiAgICAgICAgICAgIG9uRXJyb3IgOiBlcnJvcixcbiAgICAgICAgICAgIG9uU3VjY2VzcyA6IHN1Y2Nlc3MsXG4gICAgICAgICAgICBzY29wZSA6IHRoaXNcbiAgICAgICAgfTtcblxuICAgICAgICBBbHRpUmVzcG9uc2VGYWN0b3J5LmJ1aWxkKG9wdGlvbnMpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGVycm9yLmNhbGwodGhpcywgbmV3IEVycm9yU2VydmljZShfLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQWx0aTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Alti.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js": +/*!*******************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js ***! + \*******************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Response/model/AltiResponse */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/AltiResponse.js\");\n/* harmony import */ var _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Response/model/Elevation */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Elevation.js\");\n\n/**\n * Fonction retournant un objet contenant des clés de lecture (readers)\n * qui permettent de parser des réponses XML du service Altimétrique du Géoportail\n * (calcul altimétrique simple ou profil altimétrique d'une courbe),\n * lorsque le paramètre output = xml,\n * afin de récupérer les élévations retournées.\n *\n * @module AltiResponseReader\n * @alias Gp.Services.Alti.Formats.AltiResponseReader\n * @private\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\n\n\n\n/**\n *\n * Objet AltiResponseReader\n *\n * @member {Object} AltiResponseReader\n *\n * @property {Object} AltiResponseReader.READERS - Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} AltiResponseReader.READERS.elevations - Lecture d'un noeud \"elevations\" de la réponse XML\n * du service alti, correspondant logiquement à la racine du document\n * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée)\n *\n * @property {Method} AltiResponseReader.READERS.elevation - ecture d'un noeud \"elevation\" de la réponse xml du service alti.\n * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc)\n *\n * @property {Method} AltiResponseReader.READERS.lat - Lecture d'un noeud \"lat\" de la réponse xml du service alti.\n * (contient une valeur de latitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.lon - Lecture d'un noeud \"lon\" de la réponse xml du service alti.\n * (contient une valeur de longitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.z - Lecture d'un noeud \"z\" de la réponse xml du service alti.\n * (contient une valeur d'altitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.acc - Lecture d'un noeud \"acc\" de la réponse xml du service alti.\n * (contient une valeur de précision, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.exceptionreport - Lecture d'un noeud \"ExceptionReport\" de la réponse xml du service alti.\n *\n * @property {Method} AltiResponseReader.READERS.exception - Lecture d'un noeud \"Exception\" de la réponse xml du service alti.\n *\n * @property {Method} AltiResponseReader.read - Méthode permettant de lancer la lecture d'une réponse XML du service altimétrique,\n * à l'aide des readers de la classe.\n *\n */\nvar AltiResponseReader = {};\n\nAltiResponseReader.READERS = {\n\n /**\n * Lecture d'un noeud \"elevations\" de la réponse XML du service alti, correspondant logiquement à la racine du document\n * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée)\n *\n * @param {DOMElement} root - racine de la réponse XML\n * @static\n * @memberof AltiResponseReader\n * @returns {Object} Retourne un objet de type AltiResponse\n */\n elevations : function (root) {\n // INFO : on passe en paramètre l'objet en entrée elevations, vide, à remplir.\n var altiResponse = new _Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n\n if (root.hasChildNodes()) {\n var children = root.childNodes;\n var child;\n var elevation;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (AltiResponseReader.READERS[child.nodeName]) {\n elevation = AltiResponseReader.READERS[child.nodeName](child);\n altiResponse.elevations.push(elevation);\n }\n }\n }\n\n return altiResponse;\n },\n\n /**\n * Lecture d'un noeud \"elevation\" de la réponse xml du service alti.\n * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc)\n *\n * @param {DOMElement} node - noeud elevation à lire pour récupérer les informations de l'élévation retournée (z [, lon, lat, acc])\n * @return {Array} elevationResponse - format de la réponse en sortie, instance de AltiResponse\n * @static\n * @memberof AltiResponseReader\n */\n elevation : function (node) {\n var elevation = new _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__[\"default\"]();\n\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (AltiResponseReader.READERS[child.nodeName]) {\n // INFO : on passe en paramètre l'objet en entrée elevation, vide, à remplir.\n AltiResponseReader.READERS[child.nodeName](child, elevation);\n }\n }\n }\n return elevation;\n },\n\n /**\n * Lecture d'un noeud \"lat\" de la réponse xml du service alti.\n * (contient une valeur de latitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la latitude\n * @param {Object} elevation - objet dans lequel stocker la latitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n lat : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.lat = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : latitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"lon\" de la réponse xml du service alti.\n * (contient une valeur de longitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la longitude\n * @param {Object} elevation - objet dans lequel stocker la longitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n lon : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.lon = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : longitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"z\" de la réponse xml du service alti.\n * (contient une valeur d'altitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'altitude\n * @param {Object} elevation - objet dans lequel stocker l'altitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n z : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n if (elevation) {\n elevation.z = parseFloat(textNode.nodeValue);\n } else {\n elevation = new _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__[\"default\"]();\n elevation.z = parseFloat(textNode.nodeValue);\n return elevation;\n }\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : altitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"acc\" de la réponse xml du service alti.\n * (contient une valeur de précision, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la précision\n * @param {Object} elevation - objet dans lequel stocker la précision retournée\n * @static\n * @memberof AltiResponseReader\n */\n acc : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.acc = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : précision (acc) attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"ExceptionReport\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} exceptionReport - objet contenant l'exception\n * @static\n * @memberof AltiResponseReader\n */\n exceptionreport : function (node) {\n var response = {};\n\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"Exception\") {\n response.exceptionReport = AltiResponseReader.READERS.exception(child);\n }\n }\n }\n\n return response;\n },\n\n /**\n * Lecture d'un noeud \"Exception\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} exceptionReport - objet contenant l'exception, avec deux attributs :\n * {String} exceptionReport.exceptionCode - qui contient l'identifiant du code de l'exception\n * {String} exceptionReport.exception - qui contient le message de l'exception\n * @static\n * @memberof AltiResponseReader\n */\n exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"exceptionCode\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n },\n\n /**\n * Lecture d'un noeud \"Error\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} error - objet contenant l'exception\n * @static\n */\n error : function (node) {\n var response = {\n error : {}\n };\n // get error code and description\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n var textNode;\n // get error code\n if (child.nodeType === 1 && child.nodeName === \"code\") { // 1 === node.ELEMENT_NODE\n textNode = child.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n response.error.code = textNode.nodeValue;\n }\n }\n // get error description\n if (child.nodeType === 1 && child.nodeName === \"description\") { // 1 === node.ELEMENT_NODE\n textNode = child.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n response.error.description = textNode.nodeValue;\n }\n }\n }\n }\n return response;\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service altimétrique,\n * à l'aide des readers de la classe.\n *\n * @method AltiResponseReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @static\n * @memberof AltiResponseReader\n */\nAltiResponseReader.read = function (root) {\n if (root.nodeName === \"elevations\") {\n var altiResponse = AltiResponseReader.READERS.elevations(root);\n return altiResponse;\n } else if (root.nodeName === \"ExceptionReport\") {\n var exceptionReport = AltiResponseReader.READERS.exceptionreport(root);\n return exceptionReport;\n } else if (root.nodeName === \"error\") {\n var error = AltiResponseReader.READERS.error(root);\n return error;\n } else {\n throw new Error(\"Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.\");\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiResponseReader);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmM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9vdCAtIHJhY2luZSBkZSBsYSByw6lwb25zZSBYTUxcbiAgICAgKiBAc3RhdGljXG4gICAgICogQG1lbWJlcm9mIEFsdGlSZXNwb25zZVJlYWRlclxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldG91cm5lIHVuIG9iamV0IGRlIHR5cGUgQWx0aVJlc3BvbnNlXG4gICAgICovXG4gICAgZWxldmF0aW9ucyA6IGZ1bmN0aW9uIChyb290KSB7XG4gICAgICAgIC8vIElORk8gOiBvbiBwYXNzZSBlbiBwYXJhbcOodHJlIGwnb2JqZXQgZW4gZW50csOpZSBlbGV2YXRpb25zLCB2aWRlLCDDoCByZW1wbGlyLlxuICAgICAgICB2YXIgYWx0aVJlc3BvbnNlID0gbmV3IEFsdGlSZXNwb25zZSgpO1xuXG4gICAgICAgIGlmIChyb290Lmhhc0NoaWxkTm9kZXMoKSkge1xuICAgICAgICAgICAgdmFyIGNoaWxkcmVuID0gcm9vdC5jaGlsZE5vZGVzO1xuICAgICAgICAgICAgdmFyIGNoaWxkO1xuICAgICAgICAgICAgdmFyIGVsZXZhdGlvbjtcblxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGlsZHJlbi5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGNoaWxkID0gY2hpbGRyZW5baV07XG5cbiAgICAgICAgICAgICAgICBpZiAoQWx0aVJlc3BvbnNlUmVhZGVyLlJFQURFUlNbY2hpbGQubm9kZU5hbWVdKSB7XG4gICAgICAgICAgICAgICAgICAgIGVsZXZhdGlvbiA9IEFsdGlSZXNwb25zZVJlYWRlci5SRUFERVJTW2NoaWxkLm5vZGVOYW1lXShjaGlsZCk7XG4gICAgICAgICAgICAgICAgICAgIGFsdGlSZXNwb25zZS5lbGV2YXRpb25zLnB1c2goZWxldmF0aW9uKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gYWx0aVJlc3Bvb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ICAgICAgIH07XG4gICAgICAgIC8vIGdldCBlcnJvciBjb2RlIGFuZCBkZXNjcmlwdGlvblxuICAgICAgICBpZiAobm9kZS5oYXNDaGlsZE5vZGVzKCkpIHtcbiAgICAgICAgICAgIHZhciBjaGlsZHJlbiA9IG5vZGUuY2hpbGROb2RlcztcbiAgICAgICAgICAgIHZhciBjaGlsZDtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgY2hpbGRyZW4ubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBjaGlsZCA9IGNoaWxkcmVuW2ldO1xuICAgICAgICAgICAgICAgIHZhciB0ZXh0Tm9kZTtcbiAgICAgICAgICAgICAgICAvLyBnZXQgZXJyb3IgY29kZVxuICAgICAgICAgICAgICAgIGlmIChjaGlsZC5ub2RlVHlwZSA9PT0gMSAmJiBjaGlsZC5ub2RlTmFtZSA9PT0gXCJjb2RlXCIpIHsgLy8gMSA9PT0gbm9kZS5FTEVNRU5UX05PREVcbiAgICAgICAgICAgICAgICAgICAgdGV4dE5vZGUgPSBjaGlsZC5maXJzdENoaWxkO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGV4dE5vZGUgJiYgdGV4dE5vZGUubm9kZVR5cGUgPT09IDMpIHsgLy8gMyA9PT0gbm9kZS5URVhUX05PREVcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlLmVycm9yLmNvZGUgPSB0ZXh0Tm9kZS5ub2RlVmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gZ2V0IGVycm9yIGRlc2NyaXB0aW9uXG4gICAgICAgICAgICAgICAgaWYgKGNoaWxkLm5vZGVUeXBlID09PSAxICYmIGNoaWxkLm5vZGVOYW1lID09PSBcImRlc2NyaXB0aW9uXCIpIHsgLy8gMSA9PT0gbm9kZS5FTEVNRU5UX05PREVcbiAgICAgICAgICAgICAgICAgICAgdGV4dE5vZGUg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AgICB2YXIgZXhjZXB0aW9uUmVwb3J0ID0gQWx0aVJlc3BvbnNlUmVhZGVyLlJFQURFUlMuZXhjZXB0aW9ucmVwb3J0KHJvb3QpO1xuICAgICAgICByZXR1cm4gZXhjZXB0aW9uUmVwb3J0O1xuICAgIH0gZWxzZSBpZiAocm9vdC5ub2RlTmFtZSA9PT0gXCJlcnJvclwiKSB7XG4gICAgICAgIHZhciBlcnJvciA9IEFsdGlSZXNwb25zZVJlYWRlci5SRUFERVJTLmVycm9yKHJvb3QpO1xuICAgICAgICByZXR1cm4gZXJyb3I7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRXJyZXVyIGxvcnMgZGUgbGEgbGVjdHVyZSBkZSBsYSByw6lwb25zZSA6IGVsbGUgbidlc3QgcGFzIGF1IGZvcm1hdCBhdHRlbmR1LlwiKTtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBBbHRpUmVzcG9uc2VSZWFkZXI7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js": +/*!*******************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js ***! + \*******************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _AltiRequestREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AltiRequestREST */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js\");\n/* harmony import */ var _AltiRequestWPS__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AltiRequestWPS */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js\");\n/**\n * Creation d'une requête en REST ou WPS\n * (Factory)\n *\n * @module AltiRequestFactory\n * @alias Gp.Services.Alti.Request.AltiRequestFactory\n * @private\n */\n\n\n\n\n\nvar AltiRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * httpMethod : 'GET', // GET|POST\n * onSuccess : function (response) {},\n * onError : function (error) {},\n * scope : this,\n * positions : [{lon:, lat:}, {lon:, lat:}],\n * outputFormat : 'json' // json|xml\n * sampling : 3,\n * api : 'REST', // REST|WPS\n * zonly : false // false|true\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"AltiRequestFactory\");\n logger.trace([\"AltiRequestFactory::build()\"]);\n\n var request = null;\n\n // on factorise les options par groupe;\n // - global,\n // - param, les params pour les data inputs\n // - wps, les param du service\n // - callback\n\n var settings = {\n // ajout des valeurs par defaut spécifiques au service\n type : options.sampling ? \"Profil\" : \"Elevation\",\n method : options.httpMethod,\n param : {\n positions : null,\n delimiter : null, // FIXME par defaut, on ne le met pas en place car ça fait planter la requête !?\n indent : null, // par defaut\n crs : null, // par defaut\n format : null, // (only to POST)\n sampling : null, // (only use by Profil)\n zonly : null // (only use by Elevation)\n }\n };\n\n // surcharge des valeurs obligatoires\n settings.param.positions = options.positions;\n settings.param.format = options.outputFormat;\n settings.param.sampling = options.sampling;\n settings.param.zonly = options.zonly;\n\n // gestion des callback\n var bOnError = !!(options.onError !== null && typeof options.onError === \"function\"); // cast variable to boolean\n var bOnSuccess = !!(options.onSuccess !== null && typeof options.onSuccess === \"function\");\n\n var message = null;\n switch (options.api) {\n case \"REST\":\n // FIXME les exceptions ne sont pas 'catchées' sur le constructeur !\n var myReq = new _AltiRequestREST__WEBPACK_IMPORTED_MODULE_2__[\"default\"](settings);\n if (!myReq.processRequestString()) {\n message = \"Error in process request (rest) !\";\n if (bOnError) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__[\"default\"](message));\n return;\n }\n throw new Error(message);\n }\n request = myReq.requestString;\n break;\n case \"WPS\":\n // ajout des valeurs par defaut spécifiques au service WPS\n settings.wps = {\n service : null, // par defaut\n version : null, // par defaut\n identifier : null, // par defaut\n rawdataoutput : null, // par defaut\n request : null // par defaut\n };\n\n request = _AltiRequestWPS__WEBPACK_IMPORTED_MODULE_3__[\"default\"].build(settings);\n if (!request) {\n message = \"Error in process request (wps) !\";\n if (bOnError) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__[\"default\"](message));\n return;\n }\n throw new Error(message);\n }\n break;\n default:\n message = \"Type of API is not supported by service (REST or WPS) !\";\n if (bOnError) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__[\"default\"](message));\n return;\n }\n throw new Error(message);\n }\n\n if (bOnSuccess) {\n options.onSuccess.call(options.scope, request);\n }\n\n return request;\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiRequestFactory);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L0FsdGlSZXF1ZXN0RmFjdG9yeS5qcz9kZDE2Il0sIm5h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XJhbS56b25seSA9IG9wdGlvbnMuem9ubHk7XG5cbiAgICAgICAgLy8gZ2VzdGlvbiBkZXMgY2FsbGJhY2tcbiAgICAgICAgdmFyIGJPbkVycm9yID0gISEob3B0aW9ucy5vbkVycm9yICE9PSBudWxsICYmIHR5cGVvZiBvcHRpb25zLm9uRXJyb3IgPT09IFwiZnVuY3Rpb25cIik7IC8vIGNhc3QgdmFyaWFibGUgdG8gYm9vbGVhblxuICAgICAgICB2YXIgYk9uU3VjY2VzcyA9ICEhKG9wdGlvbnMub25TdWNjZXNzICE9PSBudWxsICYmIHR5cGVvZiBvcHRpb25zLm9uU3VjY2VzcyA9PT0gXCJmdW5jdGlvblwiKTtcblxuICAgICAgICB2YXIgbWVzc2FnZSA9IG51bGw7XG4gICAgICAgIHN3aXRjaCAob3B0aW9ucy5hcGkpIHtcbiAgICAgICAgICAgIGNhc2UgXCJSRVNUXCI6XG4gICAgICAgICAgICAgICAgLy8gRklYTUUgbGVzIGV4Y2VwdGlvbnMgbmUgc29udCBwYXMgJ2NhdGNow6llcycgc3VyIGxlIGNvbnN0cnVjdGV1ciAhXG4gICAgICAgICAgICAgICAgdmFyIG15UmVxID0gbmV3IEFsdGlSZXF1ZXN0UkVTVChzZXR0aW5ncyk7XG4gICAgICAgICAgICAgICAgaWYgKCFteVJlcS5wcm9jZXNzUmVxdWVzdFN0cmluZygpKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBcIkVycm9yIGluIHByb2Nlc3MgcmVxdWVzdCAocmVzdCkgIVwiO1xuICAgICAgICAgICAgICAgICAgICBpZiAoYk9uRXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2UobWVzc2FnZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihtZXNzYWdlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVxdWVzdCA9IG15UmVxLnJlcXVlc3RTdHJpbmc7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwiV1BTXCI6XG4gICAgICAgICAgICAgICAgLy8gYWpvdXQgZGVzIHZhbGV1cnMgcGFyIGRlZmF1dCBzcMOpY2lmaXF1ZXMgYXUgc2VydmljZSBXUFNcbiAgICAgICAgICAgICAgICBzZXR0aW5ncy53cHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIHNlcnZpY2UgOiBudWxsLCAvLyBwYXIgZGVmYXV0XG4gICAgICAgICAgICAgICAgICAgIHZlcnNpb24gOiBudWxsLCAvLyBwYXIgZGVmYXV0XG4gICAgICAgICAgICAgICAgICAgIGlkZW50aWZpZXIgOiBudWxsLCAvLyBwYXIgZGVmYXV0XG4gICAgICAgICAgICAgICAgICAgIHJhd2RhdGFvdXRwdXQgOiBudWxsLCAvLyBwYXIgZGVmYXV0XG4gICAgICAgICAgICAgICAgICAgIHJlcXVlc3QgOiBudWxsIC8vIHBhciBkZWZhdXRcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgcmVxdWVzdCA9IEFsdGlSZXF1ZXN0V1BTLmJ1aWxkKHNldHRpbmdzKTtcbiAgICAgICAgICAgICAgICBpZiAoIXJlcXVlc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IFwiRXJyb3IgaW4gcHJvY2VzcyByZXF1ZXN0ICh3cHMpICFcIjtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGJPbkVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKG1lc3NhZ2UpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IobWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBtZXNzYWdlID0gXCJUeXBlIG9mIEFQSSBpcyBub3Qgc3VwcG9ydGVkIGJ5IHNlcnZpY2UgKFJFU1Qgb3IgV1BTKSAhXCI7XG4gICAgICAgICAgICAgICAgaWYgKGJPbkVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2UobWVzc2FnZSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihtZXNzYWdlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChiT25TdWNjZXNzKSB7XG4gICAgICAgICAgICBvcHRpb25zLm9uU3VjY2Vzcy5jYWxsKG9wdGlvbnMuc2NvcGUsIHJlcXVlc3QpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlcXVlc3Q7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQWx0aVJlcXVlc3RGYWN0b3J5O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js": +/*!****************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js ***! + \****************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _model_AltiElevationRequest__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./model/AltiElevationRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js\");\n/* harmony import */ var _model_AltiProfilRequest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./model/AltiProfilRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js\");\n/* jshint multistr : true */\n\n\n\n\n\n\n/**\n * @classdesc\n * Classe de gestion des requêtes de type REST sur le service altimetrique.\n *\n * @todo Le service Alti n'implemente pas le POST !?\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiRequestREST\n * @param {Object} options - options\n * @param {Object} options.param.positions - tableau de coordonnées lon/lat\n * @param {String} options.param.delimiter - '|'\n * @param {Boolean} options.param.indent - false|true\n * @param {String} options.param.crs - 'CRS:84'\n * @param {String} options.param.sampling - 3\n * @param {Boolean} options.param.zonly - false|true\n * @param {String} options.param.format - \"JSON|XML\"\n * @param {String} options.type - \"Profil|Elevation\"\n * @param {String} options.method - GET|POST\n *\n * @example\n * var options = {\n * type : 'Profil', // Elevation\n * method : 'GET', // par defaut\n * param : {\n * positions : [\n * {lon:'1.11', lat:'1.11'},\n * {lon:'1.10', lat:'1.10'},\n * {lon:'1.12', lat:'1.12'}\n * ],\n * delimiter : \";\", // par defaut\n * indent : true, // par defaut\n * crs : 'EPSG:4326', // par defaut\n * format : 'json', // par defaut (only to POST)\n * sampling : 3 , // par defaut (only use by Profil)\n * zonly : false // par defaut (only use by Elevation)\n * }\n * };\n *\n * var result;\n * try {\n * var obj = new AltiRequestREST (options);\n * if (! obj.processRequestString ()) {\n * throw new Error(\"Request empty !?\")\n * }\n * result = obj.requestString;\n * } catch (e) {\n * // exceptions...\n * }\n * @private\n */\nfunction AltiRequestREST (options) {\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"AltiRequestREST\");\n this.logger.trace(\"[Constructeur AltiRequestREST ()]\");\n\n if (!(this instanceof AltiRequestREST)) {\n throw new TypeError(\"AltiRequestREST constructor cannot be called as a function.\");\n }\n\n this.options = options || {};\n\n // existance des options\n if (!this.options) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n // type de requete : Altitude ou Profil\n // (param. à determiner en fonction des parametres d'entrée)\n if (!this.options.type) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"type (Elevation or Profil)\"));\n }\n\n // construction du modele de requête\n // (test du type d'objet candidat)\n this.DataObject = null;\n switch (this.options.type) {\n case \"Elevation\":\n this.DataObject = new _model_AltiElevationRequest__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.options.param);\n break;\n case \"Profil\":\n this.DataObject = new _model_AltiProfilRequest__WEBPACK_IMPORTED_MODULE_3__[\"default\"](this.options.param);\n break;\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_TYPE\", \"type (Elevation or Profil)\"));\n }\n\n /**\n * methode.\n * Par defaut, \"GET\".\n */\n this.method = this.options.method || \"GET\";\n}\n\nAltiRequestREST.prototype = {\n\n /**\n * request\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : AltiRequestREST,\n\n /**\n * Template de la requête.\n */\n template : {\n get : {\n // FIXME on retire le param 'delimiter' : &delimiter='__DELIMITER__'\n value : \"lon=__LON__&lat=__LAT__&indent=__INDENT__&crs='__CRS__'\",\n input : {\n point : \"&zonly=__ZONLY__\",\n profil : \"&sampling=__SAMPLING__\"\n }\n },\n post : {\n // FIXME on retire le param 'delimiter' : delimiter='__DELIMITER__'\\n\\\n value : \"lon=__LON__\\n\" +\n \"lat=__LAT__\\n\" +\n \"indent=__INDENT__\\n\" +\n \"crs='__CRS__'\\n\",\n input : {\n point : \"zonly=__ZONLY__\",\n profil : \"sampling=__SAMPLING__\"\n }\n }\n },\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out : lon=0.2367,2.1570&lat=48.0551,46.6077&delimiter=,&indent=true&zonly=true&crs='CRS:84'\n * // POST out : Not yet supported method POST !\n * @returns {String}\n */\n processRequestString : function () {\n this.logger.trace(\"AltiRequestREST::processRequestString ()\");\n\n var template = \"\";\n if (this.method === \"POST\") {\n template = this.template.post.value;\n } else if (this.method === \"GET\") {\n template = this.template.get.value;\n }\n\n template = template.replace(/__LON__/g, this.DataObject.getLon());\n template = template.replace(/__LAT__/g, this.DataObject.getLat());\n // FIXME on retire le param 'delimiter'\n // template = template.replace(/__DELIMITER__/g, this.DataObject.delimiter);\n template = template.replace(/__INDENT__/g, this.DataObject.indent);\n template = template.replace(/__CRS__/g, this.DataObject.crs);\n\n // ajout +\n template = template + this.__addDataInputs();\n this.logger.trace(\"traduction tmpl\", template);\n\n // sauvegarde\n this.requestString = template;\n\n return this.requestString;\n },\n\n /**\n * Ajout de parametres spécifiques (ex. zonly)\n *\n * @returns {String}\n */\n __addDataInputs : function () {\n this.logger.trace(\"AltiRequestREST::addDataInput ()\");\n\n var myTemplate;\n if (this.method === \"POST\") {\n myTemplate = this.template.post;\n } else if (this.method === \"GET\") {\n myTemplate = this.template.get;\n } else {\n throw new Error(\"No other HTTP method supported by the service !\");\n }\n\n var tmpl = null;\n if (this.DataObject.CLASSNAME === \"AltiElevationRequest\") {\n tmpl = myTemplate.input.point;\n return tmpl.replace(/__ZONLY__/g, this.DataObject.zonly);\n } else if (this.DataObject.CLASSNAME === \"AltiProfilRequest\") {\n tmpl = myTemplate.input.profil;\n return tmpl.replace(/__SAMPLING__/g, this.DataObject.sampling);\n } else {\n throw new Error(\"No other object supported than elevation or profil !?\");\n }\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiRequestREST);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L0FsdGlSZXF1ZXN0UkVTVC5qcz9kNzQ0Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFFb0Q7QUFDSDtBQUNlO0FBQ047O0FBRTFEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCLFdBQVcsT0FBTztBQUNsQixXQUFXLE9BQU87QUFDbEIsV0FBVyxRQUFRO0FBQ25CLFdBQVcsT0FBTztBQUNsQixXQUFXLE9BQU87QUFDbEIsV0FBVyxRQUFRO0FBQ25CLFdBQVcsT0FBTztBQUNsQixXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esc0JBQXNCLHVCQUF1QjtBQUM3QyxzQkFBc0IsdUJBQXVCO0FBQzdDLHNCQUFzQjtBQUN0QjtBQUNBLCtCQUErQjtBQUMvQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7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AgICAgIHZhbHVlIDogXCJsb249X19MT05fXyZsYXQ9X19MQVRfXyZpbmRlbnQ9X19JTkRFTlRfXyZjcnM9J19fQ1JTX18nXCIsXG4gICAgICAgICAgICBpbnB1dCA6IHtcbiAgICAgICAgICAgICAgICBwb2ludCA6IFwiJnpvbmx5PV9fWk9OTFlfX1wiLFxuICAgICAgICAgICAgICAgIHByb2ZpbCA6IFwiJnNhbXBsaW5nPV9fU0FNUExJTkdfX1wiXG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHBvc3QgOiB7XG4gICAgICAgICAgICAvLyBGSVhNRSBvbiByZXRpcmUgbGUgcGFyYW0gJ2RlbGltaXRlcicgOiBkZWxpbWl0ZXI9J19fREVMSU1JVEVSX18nXFxuXFxcbiAgICAgICAgICAgIHZhbHVlIDogXCJsb249X19MT05fX1xcblwiICtcbiAgICAgICAgICAgICAgICBcImxhdD1fX0xBVF9fXFxuXCIgK1xuICAgICAgICAgICAgICAgIFwiaW5kZW50PV9fSU5ERU5UX19cXG5cIiArXG4gICAgICAgICAgICAgICAgXCJjcnM9J19fQ1JTX18nXFxuXCIsXG4gICAgICAgICAgICBpbnB1dCA6IHtcbiAgICAgICAgICAgICAgICBwb2ludCA6IFwiem9ubHk9X19aT05MWV9fXCIsXG4gICAgICAgICAgICAgICAgcHJvZmlsIDogXCJzYW1wbGluZz1fX1NBTVBMSU5HX19cIlxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIENvbnN0cnVjdGlvbiBkZSBsYSByZXF1w6p0ZS5cbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogLy8gR0VUICBvdXQgOiBsb249MC4yMzY3LDIuMTU3MCZsYXQ9NDguMDU1MSw0Ni42MDc3JmRlbGltaXRlcj0sJmluZGVudD10cnVlJnpvbmx5PXRydWUmY3JzPSdDUlM6ODQnXG4gICAgICogLy8gUE9TVCBvdXQgOiBOb3QgeWV0IHN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uICAgICAgICBpZiAodGhpcy5EYXRhT2JqZWN0LkNMQVNTTkFNRSA9PT0gXCJBbHRpRWxldmF0aW9uUmVxdWVzdFwiKSB7XG4gICAgICAgICAgICB0bXBsID0gbXlUZW1wbGF0ZS5pbnB1dC5wb2ludDtcbiAgICAgICAgICAgIHJldHVybiB0bXBsLnJlcGxhY2UoL19fWk9OTFlfXy9nLCB0aGlzLkRhdGFPYmplY3Quem9ubHkpO1xuICAgICAgICB9IGVsc2UgaWYgKHRoaXMuRGF0YU9iamVjdC5DTEFTU05BTUUgPT09IFwiQWx0aVByb2ZpbFJlcXVlc3RcIikge1xuICAgICAgICAgICAgdG1wbCA9IG15VGVtcGxhdGUuaW5wdXQucHJvZmlsO1xuICAgICAgICAgICAgcmV0dXJuIHRtcGwucmVwbGFjZSgvX19TQU1QTElOR19fL2csIHRoaXMuRGF0YU9iamVjdC5zYW1wbGluZyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJObyBvdGhlciBvYmplY3Qgc3VwcG9ydGVkIHRoYW4gZWxldmF0aW9uIG9yIHByb2ZpbCAhP1wiKTtcbiAgICAgICAgfVxuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEFsdGlSZXF1ZXN0UkVTVDtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js": +/*!***************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js ***! + \***************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Formats_WPS__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Formats/WPS */ \"./node_modules/geoportal-access-lib/src/Formats/WPS.js\");\n/* harmony import */ var _model_AltiElevationRequest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./model/AltiElevationRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js\");\n/* harmony import */ var _model_AltiProfilRequest__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./model/AltiProfilRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js\");\n/**\n * Classe d'interface des requêtes de type WPS sur le service altimetrique.\n * (Factory)\n *\n * @module Gp.Services.Alti.Request.AltiRequestWPS\n * @alias Gp.Services.Alti.Request.AltiRequestWPS\n * @private\n */\n\n\n\n\n\n\nvar AltiRequestWPS = {\n\n /**\n * Interface unique de construction de la requête.\n *\n * @method build\n * @param {Object} options - options\n * @param {Object} options.param.positions - tableau de coordonnées lon/lat\n * @param {String} options.param.delimiter - '|'\n * @param {Boolean} options.param.indent - false|true\n * @param {String} options.param.crs - 'CRS:84'\n * @param {String} options.param.sampling - 3\n * @param {Boolean} options.param.zonly - false|true\n * @param {String} options.param.format - \"JSON|XML\" (only to POST)\n * @param {String} options.wps.service - \"WPS\"\n * @param {String} options.wps.version - \"1.0.0\"\n * @param {String} options.wps.identifier - \"gs:WPSElevation|gs:WPSLineElevation\"\n * @param {String} options.wps.rawdataoutput - \"result\"\n * @param {String} options.wps.request - \"Execute\"\n * @param {String} options.type - \"Profil|Elevation\"\n * @param {String} options.method - GET|POST\n * @example\n * var options = {\n * type : 'Profil', // Elevation\n * method : 'GET', // par defaut\n * param : {\n * positions : [\n * {lon:'1.11', lat:'1.11'},\n * {lon:'1.10', lat:'1.10'},\n * {lon:'1.12', lat:'1.12'}\n * ],\n * delimiter : \";\", // par defaut\n * indent : true, // par defaut\n * crs : 'EPSG:4326', // par defaut\n * format : 'json', // par defaut (only to POST)\n * sampling : 3 , // par defaut (only use by Profil)\n * zonly : false, // par defaut (only use by Elevation)\n * },\n * wps : {\n * service : 'WPS', // par defaut\n * version : '1.0.0', // par defaut\n * identifier : 'gs:WPS', // par defaut, Elevation = gs:WPSElevation, Profil = gs:WPSLineElevation\n * rawdataoutput : 'result',// par defaut\n * request : 'Execute' // par defaut\n * }\n * };\n */\n build : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"AltiRequestWPS\");\n logger.trace([\"AltiRequestWPS::build()\"]);\n\n // existance des options\n if (!options) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n // type de requete : Altitude ou Profil\n // (param. à determiner en fonction des parametres d'entrée)\n if (!options.type) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"type (Elevation or Profil)\"));\n }\n\n // construction du modele de requête\n // (test du type d'objet candidat)\n var DataObject = null;\n switch (options.type) {\n case \"Elevation\":\n // surcharge\n options.wps.identifier = \"gs:WPSElevation\";\n DataObject = new _model_AltiElevationRequest__WEBPACK_IMPORTED_MODULE_3__[\"default\"](options.param);\n break;\n case \"Profil\":\n // surcharge\n options.wps.identifier = \"gs:WPSLineElevation\";\n DataObject = new _model_AltiProfilRequest__WEBPACK_IMPORTED_MODULE_4__[\"default\"](options.param);\n break;\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_TYPE\", \"type (Elevation or Profil)\"));\n }\n\n // construction de la requête WPS\n var settings = {\n data : DataObject,\n method : options.method,\n param : options.wps\n };\n\n var rqstWPS = new _Formats_WPS__WEBPACK_IMPORTED_MODULE_2__[\"default\"](settings);\n\n if (!rqstWPS.processRequestString()) {\n throw new Error(\"Enable to process request !\");\n }\n\n return rqstWPS.requestString;\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiRequestWPS);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L0FsdGlSZXF1ZXN0V1BTLmpzPzQzNzAiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNvRDtBQUNIO0FBQ1Y7QUFDeUI7QUFDTjs7QUFFMUQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQSxlQUFlLE9BQU87QUFDdEIsZUFBZSxPQUFPO0FBQ3RCLGVBQWUsT0FBTztBQUN0QixlQUFlLFFBQVE7QUFDdkIsZUFBZSxPQUFPO0FBQ3RCLGVBQWUsT0FBTztBQUN0QixlQUFlLFFBQVE7QUFDdkIsZUFBZSxPQUFPO0FBQ3RCLGVBQWUsT0FBTztBQUN0QixlQUFlLE9BQU87QUFDdEIsZUFBZSxPQUFPO0FBQ3RCLGVBQWUsT0FBTztBQUN0QixlQUFlLE9BQU87QUFDdEIsZUFBZSxPQUFPO0FBQ3RCLGVBQWUsT0FBTztBQUN0QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwwQkFBMEIsdUJBQXVCO0F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gKiAgICAgICAgICAgICAgICAgICB7bG9uOicxLjEwJywgbGF0OicxLjEwJ30sXG4gICAgICogICAgICAgICAgICAgICAgICAge2xvbjonMS4xMicsIGxhdDonMS4xMid9XG4gICAgICogICAgICAgICAgICAgICBdLFxuICAgICAqICAgICAgICAgICAgICAgZGVsaW1pdGVyIDogXCI7XCIsICAgICAgICAgLy8gcGFyIGRlZmF1dFxuICAgICAqICAgICAgICAgICAgICAgaW5kZW50ICAgIDogdHJ1ZSwgICAgICAgIC8vIHBhciBkZWZhdXRcbiAgICAgKiAgICAgICAgICAgICAgIGNycyAgICAgICA6ICdFUFNHOjQzMjYnLCAvLyBwYXIgZGVmYXV0XG4gICAgICogICAgICAgICAgICAgICBmb3JtYXQgICAgOiAnanNvbicsICAgICAgLy8gcGFyIGRlZmF1dCAob25seSB0byBQT1NUKVxuICAgICAqICAgICAgICAgICAgICAgc2FtcGxpbmcgIDogMyAsICAgICAgICAgIC8vIHBhciBkZWZhdXQgKG9ubHkgdXNlIGJ5IFByb2ZpbClcbiAgICAgKiAgICAgICAgICAgICAgIHpvbmx5ICAgICA6IGZhbHNlLCAgICAgICAvLyBwYXIgZGVmYXV0IChvbmx5IHVzZSBieSBFbGV2YXRpb24pXG4gICAgICogICAgICAgICAgIH0sXG4gICAgICogICAgICAgICAgIHdwcyA6IHtcbiAgICAgKiAgICAgICAgICAgICAgICAgc2VydmljZSA6ICdXUFMnLCAgICAgICAgIC8vIHBhciBkZWZhdXRcbiAgICAgKiAgICAgICAgICAgICAgICAgdmVyc2lvbiA6ICcxLjAuMCcsICAgICAgIC8vIHBhciBkZWZhdXRcbiAgICAgKiAgICAgICAgICAgICAgICAgaWRlbnRpZmllciA6ICdnczpXUFMnLCAgIC8vIHBhciBkZWZhdXQsIEVsZXZhdGlvbiA9IGdzOldQU0VsZXZhdGlvbiwgUHJvZmlsID0gZ3M6V1BTTGluZUVsZXZhdGlvblxuICAgICAqICAgICAgICAgICAgICAgICByYXdkYXRhb3V0cHV0I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xsO1xuICAgICAgICBzd2l0Y2ggKG9wdGlvbnMudHlwZSkge1xuICAgICAgICAgICAgY2FzZSBcIkVsZXZhdGlvblwiOlxuICAgICAgICAgICAgICAgIC8vIHN1cmNoYXJnZVxuICAgICAgICAgICAgICAgIG9wdGlvbnMud3BzLmlkZW50aWZpZXIgPSBcImdzOldQU0VsZXZhdGlvblwiO1xuICAgICAgICAgICAgICAgIERhdGFPYmplY3QgPSBuZXcgQWx0aUVsZXZhdGlvblJlcXVlc3Qob3B0aW9ucy5wYXJhbSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwiUHJvZmlsXCI6XG4gICAgICAgICAgICAgICAgLy8gc3VyY2hhcmdlXG4gICAgICAgICAgICAgICAgb3B0aW9ucy53cHMuaWRlbnRpZmllciA9IFwiZ3M6V1BTTGluZUVsZXZhdGlvblwiO1xuICAgICAgICAgICAgICAgIERhdGFPYmplY3QgPSBuZXcgQWx0aVByb2ZpbFJlcXVlc3Qob3B0aW9ucy5wYXJhbSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihfLmdldE1lc3NhZ2UoXCJQQVJBTV9UWVBFXCIsIFwidHlwZSAoRWxldmF0aW9uIG9yIFByb2ZpbClcIikpO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gY29uc3RydWN0aW9uIGRlIGxhIHJlcXXDqnRlIFdQU1xuICAgICAgICB2YXIgc2V0dGluZ3MgPSB7XG4gICAgICAgICAgICBkYXRhIDogRGF0YU9iamVjdCxcbiAgICAgICAgICAgIG1ldGhvZCA6IG9wdGlvbnMubWV0aG9kLFxuICAgICAgICAgICAgcGFyYW0gOiBvcHRpb25zLndwc1xuICAgICAgICB9O1xuXG4gICAgICAgIHZhciBycXN0V1BTID0gbmV3IFdQUyhzZXR0aW5ncyk7XG5cbiAgICAgICAgaWYgKCFycXN0V1BTLnByb2Nlc3NSZXF1ZXN0U3RyaW5nKCkpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkVuYWJsZSB0byBwcm9jZXNzIHJlcXVlc3QgIVwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBycXN0V1BTLnJlcXVlc3RTdHJpbmc7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQWx0aVJlcXVlc3RXUFM7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js": +/*!***************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js ***! + \***************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _AltiRequest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AltiRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js\");\n\n\n\n\n/**\n * @classdesc\n *\n * Classe de gestion des param. des requêtes de type POINT du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiElevationRequest\n * @param {Object} options - options\n * @param {Boolean} options.zonly - false|true\n *\n * @private\n */\nfunction AltiElevationRequest (options) {\n if (!(this instanceof AltiElevationRequest)) {\n throw new TypeError(\"AltiElevationRequest constructor cannot be called as a function.\");\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"AltiElevationRequest\";\n\n // appel du constructeur par heritage\n _AltiRequest__WEBPACK_IMPORTED_MODULE_1__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur AltiElevationRequest ()]\");\n\n /**\n * Z uniquement.\n * true|false\n */\n this.zonly = this.options.zonly || false; // test des options héritées !\n}\n\n/**\n * @lends module:AltiElevationRequest#\n */\n\nAltiElevationRequest.prototype = Object.create(_AltiRequest__WEBPACK_IMPORTED_MODULE_1__[\"default\"].prototype, {\n\n /**\n * Setter/getter pour \"zonly\"\n */\n zonly : {\n /** getter */\n get : function () {\n return this._zonly;\n },\n /** setter */\n set : function (z) {\n this._zonly = z;\n }\n }\n\n});\n\n/**\n * Constructeur (alias)\n */\nAltiElevationRequest.prototype.constructor = AltiElevationRequest;\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Array}\n */\nAltiElevationRequest.prototype.getData = function () {\n // par glop..., appel de AltiRequest::getData () !\n var map = [];\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n // map.push({k : \"delimiter\", v : this.delimiter}); // FIXME on retire le param \"delimiter\"\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"zonly\",\n v : this.zonly\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiElevationRequest);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L21vZGVsL0FsdGlFbGV2YXRpb25SZXF1ZXN0LmpzPzNkM2YiXSwibmFtZXMiOltdLCJt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AqL1xuQWx0aUVsZXZhdGlvblJlcXVlc3QucHJvdG90eXBlLmdldERhdGEgPSBmdW5jdGlvbiAoKSB7XG4gICAgLy8gcGFyIGdsb3AuLi4sIGFwcGVsIGRlIEFsdGlSZXF1ZXN0OjpnZXREYXRhICgpICFcbiAgICB2YXIgbWFwID0gW107XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJsb25cIixcbiAgICAgICAgdiA6IHRoaXMuZ2V0TG9uKClcbiAgICB9KTtcbiAgICBtYXAucHVzaCh7XG4gICAgICAgIGsgOiBcImxhdFwiLFxuICAgICAgICB2IDogdGhpcy5nZXRMYXQoKVxuICAgIH0pO1xuICAgIC8vIG1hcC5wdXNoKHtrIDogXCJkZWxpbWl0ZXJcIiwgdiA6IHRoaXMuZGVsaW1pdGVyfSk7IC8vIEZJWE1FIG9uIHJldGlyZSBsZSBwYXJhbSBcImRlbGltaXRlclwiXG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJpbmRlbnRcIixcbiAgICAgICAgdiA6IHRoaXMuaW5kZW50XG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJjcnNcIixcbiAgICAgICAgdiA6IHRoaXMuY3JzXG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJ6b25seVwiLFxuICAgICAgICB2IDogdGhpcy56b25seVxuICAgIH0pO1xuICAgIG1hcC5wdXNoKHtcbiAgICAgICAgayA6IFwiZm9ybWF0XCIsXG4gICAgICAgIHYgOiB0aGlzLmZvcm1hdFxuICAgIH0pO1xuXG4gICAgcmV0dXJuIG1hcDtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IEFsdGlFbGV2YXRpb25SZXF1ZXN0O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js": +/*!************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js ***! + \************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _AltiRequest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AltiRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js\");\n\n\n\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes de type PROFIL du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiProfilRequest\n * @param {Object} options - options\n * @param {String} options.sampling - 3\n *\n * @private\n */\nfunction AltiProfilRequest (options) {\n if (!(this instanceof AltiProfilRequest)) {\n throw new TypeError(\"AltiProfilRequest constructor cannot be called as a function.\");\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"AltiProfilRequest\";\n\n // appel du constructeur par heritage\n _AltiRequest__WEBPACK_IMPORTED_MODULE_1__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur AltiProfilRequest ()]\");\n\n /**\n * Sampling\n * Par defaut, 3\n */\n this.sampling = this.options.sampling || 3; // test des options héritées !\n}\n\n/**\n * @lends module:AltiProfilRequest#\n */\n\nAltiProfilRequest.prototype = Object.create(_AltiRequest__WEBPACK_IMPORTED_MODULE_1__[\"default\"].prototype, {\n\n /**\n * Setter/getter pour \"sampling\"\n */\n sampling : {\n /** getter */\n get : function () {\n return this._sampling;\n },\n /** setter */\n set : function (value) {\n this._sampling = value;\n }\n }\n});\n\n/**\n * Constructeur (alias)\n */\nAltiProfilRequest.prototype.constructor = AltiProfilRequest;\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]}\n */\nAltiProfilRequest.prototype.getData = function () {\n // par glop..., appel de AltiRequest::getData () !\n var map = [];\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n // map.push({k : \"delimiter\", v : this.delimiter}); // FIXME on retire le param \"delimiter\"\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"sampling\",\n v : this.sampling\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiProfilRequest);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L21vZGVsL0FsdGlQcm9maWxSZXF1ZXN0LmpzP2FmZjkiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUN1RDtBQUNmOztBQUV4QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsSUFBSSxvREFBVzs7QUFFZixrQkFBa0IsOERBQU07QUFDeEI7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQSwrQ0FBK0M7QUFDL0M7O0FBRUE7QUFDQTtBQUNBOztBQUVBLDRDQUE0QyxvREFBVzs7QUFFdkQ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Ghpcy5kZWxpbWl0ZXJ9KTsgLy8gRklYTUUgb24gcmV0aXJlIGxlIHBhcmFtIFwiZGVsaW1pdGVyXCJcbiAgICBtYXAucHVzaCh7XG4gICAgICAgIGsgOiBcImluZGVudFwiLFxuICAgICAgICB2IDogdGhpcy5pbmRlbnRcbiAgICB9KTtcbiAgICBtYXAucHVzaCh7XG4gICAgICAgIGsgOiBcImNyc1wiLFxuICAgICAgICB2IDogdGhpcy5jcnNcbiAgICB9KTtcbiAgICBtYXAucHVzaCh7XG4gICAgICAgIGsgOiBcInNhbXBsaW5nXCIsXG4gICAgICAgIHYgOiB0aGlzLnNhbXBsaW5nXG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJmb3JtYXRcIixcbiAgICAgICAgdiA6IHRoaXMuZm9ybWF0XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbWFwO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQWx0aVByb2ZpbFJlcXVlc3Q7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js": +/*!******************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js ***! + \******************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n\n\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiRequest\n * @param {Object} options - options\n * @param {Object} options.positions - tableau de coordonnées lon/lat\n * @param {String} options.delimiter - \"|\"\n * @param {Boolean} options.indent - false|true\n * @param {String} options.crs - \"CRS:84\"\n * @param {String} options.format - \"JSON|XML\"\n *\n * @private\n */\nfunction AltiRequest (options) {\n if (!(this instanceof AltiRequest)) {\n throw new TypeError(\"AltiRequest constructor cannot be called as a function.\");\n }\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur AltiRequest ()]\");\n\n /**\n * Options en paramêtres du constructeur.\n */\n this.options = options || {};\n\n /**\n * Liste des coordonnées.\n * @example\n * var c = [{lon : \"\", lat : \"\"}, {lon : \"\", lat : \"\"}];\n */\n this.positions = this.options.positions || [];\n\n /**\n * Caractère de séparation.\n * Par defaut, \"|\".\n */\n this.delimiter = this.options.delimiter || \"|\";\n\n /**\n * Indentation.\n * true|false\n */\n this.indent = this.options.indent || false;\n\n /**\n * Projection.\n * Par defaut, CRS:84.\n */\n this.crs = this.options.crs || \"CRS:84\";\n\n /**\n * format de sortie.\n * Par defaut, \"json\".\n */\n this.format = this.options.format || \"json\";\n}\n\n/**\n * CLASSNAME\n */\nAltiRequest.CLASSNAME = \"AltiRequest\";\n\nAltiRequest.prototype = {\n\n /**\n * @lends module:AltiRequest#\n */\n\n /**\n * Constructeur (alias)\n */\n constructor : AltiRequest,\n\n /**\n * Ajout d\"une liste de coordonnées.\n *\n * @param {Object[]} lstPosition - liste de positions\n * @example\n * obj.setPositions ([{lon : \"0.15\", lat : \"0.15\"}, {lon : \"1.15\", lat : \"1.15\"}]);\n */\n setPositions : function (lstPosition) {\n var positions = [];\n for (var i = 0; i < lstPosition.length; i++) {\n var o = lstPosition[i];\n if (o.lon && o.lat) {\n positions.push(o);\n }\n }\n\n this.positions = positions;\n },\n\n /**\n * Liste des coordonnées.\n *\n * @param {Int} pos - position\n * @returns {positions}\n * @example\n * obj.getPositions (); // [{lon : \"\", lat : \"\"}, {lon : \"\", lat : \"\"}]\n * obj.getPositions (0); // [{lon : \"\", lat : \"\"}]\n */\n getPositions : function (pos) {\n // FIXME test if not a number !?\n if (!pos) {\n return this.positions;\n }\n\n var index = this.positions.length - 1;\n if (pos > index || pos < index) {\n this.logger.warn(\"index out of range !\");\n return this.positions;\n }\n\n return this.positions[pos];\n },\n\n /**\n * Ajout d\"une liste de coordonnées.\n *\n * @param {Object[]} lstPosition - liste de positions\n * @example\n * obj.addPositions ([{lon : \"0.15\", lat : \"0.15\"}, {lon : \"1.15\", lat : \"1.15\"}]);\n */\n addPositions : function (lstPosition) {\n for (var i = 0; i < lstPosition.length; i++) {\n var o = lstPosition[i];\n if (o.lon && o.lat) {\n this.positions.push(lstPosition[i]);\n }\n }\n },\n\n /**\n * Retourne la liste des longitudes avec un caractère de séparation.\n *\n * @returns {String} - une liste de longitudes\n * @example\n * // out : 0.2367|2.1570|43.789|...\n */\n getLon : function () {\n var lstLon = [];\n for (var i = 0; i < this.positions.length; i++) {\n lstLon.push(this.positions[i].lon);\n }\n this.logger.trace(lstLon);\n return lstLon.join(this.delimiter);\n },\n\n /**\n * Retourne la liste des lattitudes avec un caractère de séparation.\n *\n * @returns {String} - une liste de lattitudes\n * @example\n * // out : 0.2367|2.1570|43.789|...\n */\n getLat : function () {\n var lstLat = [];\n for (var i = 0; i < this.positions.length; i++) {\n lstLat.push(this.positions[i].lat);\n }\n this.logger.trace(lstLat);\n return lstLat.join(this.delimiter);\n }\n\n};\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]}\n */\nAltiRequest.prototype.getData = function () {\n var map = [];\n\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n map.push({\n k : \"delimiter\",\n v : this.delimiter\n });\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (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4gICAgICAgICAgICAgICAgcG9zaXRpb25zLnB1c2gobyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnBvc2l0aW9ucyA9IHBvc2l0aW9ucztcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogTGlzdGUgZGVzIGNvb3Jkb25uw6llcy5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7SW50fSBwb3MgLSBwb3NpdGlvblxuICAgICAqIEByZXR1cm5zIHtwb3NpdGlvbnN9XG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBvYmouZ2V0UG9zaXRpb25zICgpOyAgLy8gW3tsb24gOiBcIlwiLCBsYXQgOiBcIlwifSwge2xvbiA6IFwiXCIsIGxhdCA6IFwiXCJ9XVxuICAgICAqIG9iai5nZXRQb3NpdGlvbnMgKDApOyAvLyBbe2xvbiA6IFwiXCIsIGxhdCA6IFwiXCJ9XVxuICAgICAqL1xuICAgIGdldFBvc2l0aW9ucyA6IGZ1bmN0aW9uIChwb3MpIHtcbiAgICAgICAgLy8gRklYTUUgdGVzdCBpZiBub3QgYSBudW1iZXIgIT9cbiAgICAgICAgaWYgKCFwb3MpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnBvc2l0aW9ucztcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBpbmRleCA9IHRoaXMucG9zaXRpb25zLmxlbmd0aCAtIDE7XG4gICAgICAgIGlmIChwb3MgPiBpbmRleCB8fCBwb3MgPCBpbmRleCkge1xuICAgICAgICAgICAgdGhpcy5sb2dnZXIud2FybihcImluZGV4IG91dCBvZiByYW5nZSAhXCIpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMucG9zaXRpb25zO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRoaXMucG9zaXRpb25zW3Bvc107XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIEFqb3V0IGRcInVuZSBsaXN0ZSBkZSBjb29yZG9ubsOpZXMuXG4gICAg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dldExhdCgpXG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJkZWxpbWl0ZXJcIixcbiAgICAgICAgdiA6IHRoaXMuZGVsaW1pdGVyXG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJpbmRlbnRcIixcbiAgICAgICAgdiA6IHRoaXMuaW5kZW50XG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJjcnNcIixcbiAgICAgICAgdiA6IHRoaXMuY3JzXG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJmb3JtYXRcIixcbiAgICAgICAgdiA6IHRoaXMuZm9ybWF0XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbWFwO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQWx0aVJlcXVlc3Q7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js": +/*!*********************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js ***! + \*********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _Formats_XML__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Formats/XML */ \"./node_modules/geoportal-access-lib/src/Formats/XML.js\");\n/* harmony import */ var _Formats_AltiResponseReader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Formats/AltiResponseReader */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js\");\n/* harmony import */ var _model_AltiResponse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./model/AltiResponse */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/AltiResponse.js\");\n/* harmony import */ var _model_Elevation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./model/Elevation */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Elevation.js\");\n/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module AltiResponseFactory\n * @private\n * @alias Gp.Services.Alti.Response.AltiResponseFactory\n */\n\n\n\n\n\n\n\n\nvar AltiResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"AltiResponseFactory\");\n logger.trace([\"AltiResponseFactory::build()\"]);\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n switch (options.outputFormat) {\n case \"xml\":\n logger.trace(\"analyze response : xml\");\n\n try {\n var p = new _Formats_XML__WEBPACK_IMPORTED_MODULE_3__[\"default\"]({\n reader : _Formats_AltiResponseReader__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n });\n\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION_2\"));\n }\n } catch (e) {\n var message = e.message;\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", message),\n status : 200,\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR\n }));\n return;\n }\n\n break;\n\n case \"json\":\n logger.trace(\"analyze response : json\");\n logger.trace(\"analyze response : \", typeof options.response);\n\n var JSONResponse = null;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // le service renvoie t il une erreur ?\n if (JSONResponse && JSONResponse.error) {\n // ex. {\"error\": {\"code\": \"BAD_PARAMETER\",\"description\": \"The values () cannot be parsed as a valid longitude (double value such as -180 < lat < 180).\"}}\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", JSONResponse.error.description),\n status : 200,\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR\n }));\n return;\n }\n\n // analyse de la reponse\n if (JSONResponse) {\n var elevations = JSONResponse.elevations;\n var altiResponse = new _model_AltiResponse__WEBPACK_IMPORTED_MODULE_5__[\"default\"]();\n var elevation;\n if (Array.isArray(elevations) && elevations.length) {\n for (var i = 0; i < elevations.length; i++) {\n elevation = new _model_Elevation__WEBPACK_IMPORTED_MODULE_6__[\"default\"]();\n\n if (typeof elevations[i] === \"object\") {\n // elevations[i] est un objet elevation\n if (elevations[i].lon) {\n elevation.lon = elevations[i].lon;\n }\n if (elevations[i].lat) {\n elevation.lat = elevations[i].lat;\n }\n if (elevations[i].z) {\n elevation.z = elevations[i].z;\n }\n if (elevations[i].acc) {\n elevation.acc = elevations[i].acc;\n }\n } else if (typeof elevations[i] === \"number\") {\n // elevations[i] est un nombre, dans le cas de zonly=true notamment\n elevation.z = elevations[i];\n }\n\n if (Array.isArray(altiResponse.elevations)) {\n altiResponse.elevations.push(elevation);\n }\n }\n }\n data = altiResponse;\n }\n\n if (!data) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_ANALYSE_2\"),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n break;\n\n default:\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_FORMAT_2\"),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data.exceptionReport) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR,\n status : 200\n }));\n return;\n } else if (data.error) {\n var errorMess = data.error.description;\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", errorMess),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiResponseFactory);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXNwb25zZS9BbHRpUmVzcG9uc2VGYWN0b3J5LmpzP2QwZWYiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDb0Q7QUFDQTtBQUNRO0FBQ3JCO0FBQ3dCO0FBQ2Y7QUFDTjs7QUFFMUM7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsT0FBTztBQUN0QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EscUJBQXFCLDhEQUFNO0FBQzNCOztBQUVBOztBQ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dGlSZXNwb25zZUZhY3RvcnlcIik7XG4gICAgICAgIGxvZ2dlci50cmFjZShbXCJBbHRpUmVzcG9uc2VGYWN0b3J5OjpidWlsZCgpXCJdKTtcblxuICAgICAgICB2YXIgZGF0YSA9IG51bGw7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMucmVzcG9uc2UpIHtcbiAgICAgICAgICAgIGlmIChvcHRpb25zLnJhd1Jlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiYW5hbHl6ZSByZXNwb25zZSA6IHJhd1wiKTtcbiAgICAgICAgICAgICAgICBkYXRhID0gb3B0aW9ucy5yZXNwb25zZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChvcHRpb25zLm91dHB1dEZvcm1hdCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIFwieG1sXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJhbmFseXplIHJlc3BvbnNlIDogeG1sXCIpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwID0gbmV3IFhNTCh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRlciA6IEFsdGlSZXNwb25zZVJlYWRlclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLnJlc3BvbnNlID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuc2V0WE1MU3RyaW5nKG9wdGlvbnMucmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuc2V0WE1MRG9jKG9wdGlvbnMucmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEgPSBwLnBhcnNlKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRVhDRVBUSU9OXzJcIikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWVzc2FnZSA9IGUubWVzc2FnZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA6IE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRVhDRVBUSU9OXCIsIG1lc3NhZ2UpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAyMDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBFcnJvclNlcnZpY2UuVFlQRV9TUlZFUlJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICBjYXNlIFwianNvblwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiYW5hbHl6ZSByZXNwb25zZSA6IGpzb25cIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJhbmFseXplIHJlc3BvbnNlIDogXCIsIHR5cGVvZiBvcHRpb25zLnJlc3BvbnNlKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIEpTT05SZXNwb25zZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMucmVzcG9uc2UgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBKU09OUmVzcG9uc2UgPSBKU09OLnBhcnNlKG9wdGlvbnMucmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBKU09OUmVzcG9uc2UgPSBvcHRpb25zLnJlc3BvbnNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsZSBzZXJ2aWNlIHJlbnZvaWUgdCBpbCB1bmUgZXJyZXVyID9cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChKU09OUmVzcG9uc2UgJiYgSlNPTlJlc3BvbnNlLmVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXguIHtcImVycm9yXCI6IHtcImNvZGVcIjogXCJCQURfUEFSQU1FVEVSXCIsXCJkZXNjcmlwdGlvblwiOiBcIlRoZSB2YWx1ZXMgKCkgY2Fubm90IGJlIHBhcnNlZCBhcyBhIHZhbGlkIGxvbmdpdHVkZSAoZG91YmxlIHZhbHVlIHN1Y2ggYXMgLTE4MCA8IGxhdCA8IDE4MCkuXCJ9fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2Uoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlIDogTVJlcy5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FWENFUFRJT05cIiwgSlNPTlJlc3BvbnNlLmVycm9yLmRlc2NyaXB0aW9uKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzIDogMjAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogRXJyb3JTZXJ2aWNlLlRZUEVfU1JWRVJSXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYW5hbHlzZSBkZSBsYSByZXBvbnNlXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoSlNPTlJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVsZXZhdGlvbnMgPSBKU09OUmVzcG9uc2UuZWxldmF0aW9ucztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYWx0aVJlc3BvbnNlID0gbmV3IEFsdGlSZXNwb25zZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBlbGV2YXRpb247XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoZWxldmF0aW9ucykgJiYgZWxldmF0aW9ucy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBlbGV2YXRpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24gPSBuZXcgRWxldmF0aW9uKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZWxldmF0aW9uc1tpXSA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGVsZXZhdGlvbnNbaV0gZXN0IHVuIG9iamV0IGVsZXZhdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLmxvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24ubG9uID0gZWxldmF0aW9uc1tpXS5sb247XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLmxhdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24ubGF0ID0gZWxldmF0aW9uc1tpXS5sYXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLnopIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxldmF0aW9uLnogPSBlbGV2YXRpb25zW2ldLno7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLmFjYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24uYWNjID0gZWxldmF0aW9uc1tpXS5hY2M7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgZWxldmF0aW9uc1tpXSA9PT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGVsZXZhdGlvbnNbaV0gZXN0IHVuIG5vbWJyZSwgZGFucyBsZSBjYXMgZGUgem9ubHk9dHJ1ZSBub3RhbW1lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24ueiA9IGVsZXZhdGlvbnNbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGFsdGlSZXNwb25zZS5lbGV2YXRpb25zKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdGlSZXNwb25zZS5lbGV2YXRpb25zLnB1c2goZWxldmF0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhID0gYWx0aVJlc3BvbnNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA6IE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfQU5BTFlTRV8yXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogRXJyb3JTZXJ2aWNlLlRZUEVfVU5LRVJSLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAtMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA6IE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRk9STUFUXzJcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IEVycm9yU2VydmljZS5UWVBFX1VOS0VSUixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAtMVxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIFNpIGxhIHLDqXBvbnNlIGNvbnRlbmFpdCB1bmUgZXhjZXB0aW9uIHJlbnZvecOpZSBwYXIgbGUgc2VydmljZVxuICAgICAgICAgICAgICAgIGlmIChkYXRhLmV4Y2VwdGlvblJlcG9ydCkge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgOiBNUmVzLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VYQ0VQVElPTlwiLCBkYXRhLmV4Y2VwdGlvblJlcG9ydCksXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogRXJyb3JTZXJ2aWNlLlRZUEVfU1JWRVJSLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzIDogMjAwXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZGF0YS5lcnJvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgZXJyb3JNZXNzID0gZGF0YS5lcnJvci5kZXNjcmlwdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlIDogTVJlcy5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FWENFUFRJT05cIiwgZXJyb3JNZXNzKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBFcnJvclNlcnZpY2UuVFlQRV9TUlZFUlIsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAyMDBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZShNUmVzLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBvcHRpb25zLm9uU3VjY2Vzcy5jYWxsKG9wdGlvbnMuc2NvcGUsIGRhdGEpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEFsdGlSZXNwb25zZUZhY3Rvcnk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/AltiResponse.js": +/*!********************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/AltiResponse.js ***! + \********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Response object for {@link module:Services~getAltitude Gp.Services.getAltitude ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Array.} elevations - Elevations array.\n *\n * @namespace\n * @alias Gp.Services.AltiResponse\n */\nfunction AltiResponse () {\n if (!(this instanceof AltiResponse)) {\n throw new TypeError(\"AltiResponse constructor cannot be called as a function.\");\n }\n\n this.elevations = [];\n}\n\nAltiResponse.prototype = {\n\n constructor : AltiResponse\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiResponse);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXNwb25zZS9tb2RlbC9BbHRpUmVzcG9uc2UuanM/NmY2MSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0Esd0JBQXdCLDZEQUE2RDtBQUNyRjtBQUNBLGNBQWMsbUNBQW1DO0FBQ2pEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFZSwyRUFBWSxFQUFDIiwiZmlsZSI6Ii4vbm9kZV9tb2R1bGVzL2dlb3BvcnRhbC1hY2Nlc3MtbGliL3NyYy9TZXJ2aWNlcy9BbHRpL1Jlc3BvbnNlL21vZGVsL0FsdGlSZXNwb25zZS5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogUmVzcG9uc2Ugb2JqZWN0IGZvciB7QGxpbmsgbW9kdWxlOlNlcnZpY2VzfmdldEFsdGl0dWRlIEdwLlNlcnZpY2VzLmdldEFsdGl0dWRlICgpfSBpbnZvY2F0aW9uIHdoZW4gc3VjY2Vzc2Z1bC4gUmVjZWl2ZWQgYXMgdGhlIGFyZ3VtZW50IG9mIG9uU3VjY2VzcyBjYWxsYmFjayBmdW5jdGlvbi5cbiAqXG4gKiBAcHJvcGVydHkge0FycmF5LjxHcC5TZXJ2aWNlcy5BbHRpLkVsZXZhdGlvbj59IGVsZXZhdGlvbnMgLSBFbGV2YXRpb25zIGFycmF5LlxuICpcbiAqIEBuYW1lc3BhY2VcbiAqIEBhbGlhcyBHcC5TZXJ2aWNlcy5BbHRpUmVzcG9uc2VcbiAqL1xuZnVuY3Rpb24gQWx0aVJlc3BvbnNlICgpIHtcbiAgICBpZiAoISh0aGlzIGluc3RhbmNlb2YgQWx0aVJlc3BvbnNlKSkge1xuICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiQWx0aVJlc3BvbnNlIGNvbnN0cnVjdG9yIGNhbm5vdCBiZSBjYWxsZWQgYXMgYSBmdW5jdGlvbi5cIik7XG4gICAgfVxuXG4gICAgdGhpcy5lbGV2YXRpb25zID0gW107XG59XG5cbkFsdGlSZXNwb25zZS5wcm90b3R5cGUgPSB7XG5cbiAgICBjb25zdHJ1Y3RvciA6IEFsdGlSZXNwb25zZVxuXG59O1xuXG5leHBvcnQgZGVmYXVsdCBBbHRpUmVzcG9uc2U7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/AltiResponse.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Elevation.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Elevation.js ***! + \*****************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Single elevation object returned by underlying web service. Contains at least, one elevation (z). May also contain point coordinates and elevation accuracy if \"zonly\" parameter wasn't set to true.\n *\n * @property {Float} lat - Point latitude. (only if zonly=false)\n * @property {Float} lon - Point longitude. (only if zonly=false)\n * @property {Float} z - Point elevation.\n * @property {Float} acc - Accuracy of elevation for this point. (only if zonly=false)\n *\n * @namespace\n * @alias Gp.Services.Alti.Elevation\n */\nfunction Elevation () {\n if (!(this instanceof Elevation)) {\n throw new TypeError(\"Elevation constructor cannot be called as a function.\");\n }\n\n this.z = null;\n}\n\nElevation.prototype = {\n\n constructor : Elevation\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Elevation);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXNwb25zZS9tb2RlbC9FbGV2YXRpb24uanM/YzY2OSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUNBO0FBQ0E7QUFDQTtBQUNBLGNBQWMsTUFBTTtBQUNwQixjQUFjLE1BQU07QUFDcEIsY0FBYyxNQUFNO0FBQ3BCLGNBQWMsTUFBTTtBQUNwQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRWUsd0VBQVMsRUFBQyIsImZpbGUiOiIuL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXNwb25zZS9tb2RlbC9FbGV2YXRpb24uanMuanMiLCJzb3VyY2VzQ29udGVudC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ldmF0aW9uO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Elevation.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js": +/*!*************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js ***! + \*************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _Response_AutoCompleteResponseFactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Response/AutoCompleteResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js\");\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Utils/Helper */ \"./node_modules/geoportal-access-lib/src/Utils/Helper.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service d'autocomplétion du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.AutoComplete\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.text - La chaîne de caractère à compléter.\n * Cette chaîne n'est pas \"URL encodée\".\n * C'est l'API qui s'occupe de l'encoder pour l'inclure dans la requête.\n *\n * @param {Array.} [options.type = [\"StreetAddress\"]] - Type de l'objet recherché.\n * Le service d'autocomplétion du Géoportail permet de rechercher des toponymes 'PositionOfInterest' et/ou des adresses postales 'StreetAddress'.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, type = ['StreetAddress'].\n *\n * @param {String} [options.territory] - Limitation de la zone de recherche de localisants.\n * Le service d'autocomplétion du Géoportail permet de limiter la recherche à la métropole et la Corse : options.territory = 'METROPOLE',\n * DOMS TOMS : options.territory = 'DOMTOM', ou à un département : options.territory = '31'\n * Pas de valeur par défaut.\n * La valeur par défaut est donc celle du service.\n * Le service d'autocomplétion du Géoportail renvoie toutes les informations quand aucun territoire n'est spécifié.\n *\n * @param {Number} [options.maximumResponses = 10] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut.\n * La valeur par défaut sera donc celle du service : 10.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * text : \"\",\n * type : \"StreetAddress\",\n * territory : 'METROPOLE',\n * maximumResponses : 10\n * };\n */\nfunction AutoComplete (options_) {\n if (!(this instanceof AutoComplete)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"AutoComplete\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"AutoComplete\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getLogger(\"Gp.Services.AutoComplete\");\n this.logger.trace(\"[Constructeur AutoComplete (options)]\");\n\n var options = this.patchOptionConvertor(options_);\n options.serverUrl = options.serverUrl || \"https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/completion\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_0__[\"default\"].apply(this, arguments);\n\n if (!options.text) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getMessage(\"PARAM_MISSING\", \"text\"));\n }\n\n // ajout des options spécifiques au service\n this.options.text = options.text;\n\n // on definit des parametres par defaut\n if (!options.type) {\n options.type = [\"StreetAddress,PositionOfInterest\"];\n }\n\n this.options.type = options.type;\n this.options.territory = options.territory || \"\";\n this.options.maximumResponses = options.maximumResponses || 10;\n\n // INFO\n // le service ne repond pas en mode POST (405 Method Not Allowed)\n if (this.options.protocol === \"XHR\" && this.options.httpMethod === \"POST\") {\n this.logger.warn(\"Le service ne gére pas le mode d'interrogation en POST, on bascule sur du GET !\");\n this.options.httpMethod = \"GET\"; // on surcharge !\n }\n\n // attributs d'instances\n\n /**\n * Format forcé de la réponse du service : \"json\"\n * sauf si l'on souhaite une reponse brute (options.rawResponse)\n */\n this.options.outputFormat = (this.options.rawResponse) ? \"\" : \"json\";\n}\n\n/**\n * @lends module:AutoComplete#\n */\n\nAutoComplete.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nAutoComplete.prototype.constructor = AutoComplete;\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Object} options_ - options du service\n * @return {Object} - options\n */\nAutoComplete.prototype.patchOptionConvertor = function (options_) {\n const options = options_;\n\n if (options.filterOptions) {\n this.logger.warn(\"The parameter 'filterOptions' is deprecated\");\n\n if (options.filterOptions.type) {\n this.logger.warn(\"The parameter 'filterOptions.type' is deprecated\");\n if (!options.type) {\n options.type = options.filterOptions.type;\n }\n }\n\n if (options.filterOptions.territory) {\n this.logger.warn(\"The parameter 'filterOptions.territory' is deprecated\");\n if (!options.terr) {\n options.terr = options.filterOptions.territory;\n }\n }\n\n delete options.filterOptions;\n }\n\n return options;\n};\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAutoComplete.prototype.buildRequest = function (error, success) {\n // ex.\n // http://wxs.ign.fr/CLEF/ols/apis/completion?\n // text=Brie-Comt&\n // type=StreetAddress,PositionOfInterest&\n // territory=METROPOLE&\n // maximumResponses=10\n\n // traitement des param KPV sous forme de tableau\n var territory = \"\";\n if (this.options.territory) {\n territory = this.options.territory;\n }\n\n var type = \"\";\n if (this.options.type) {\n type = this.options.type.join(\",\");\n }\n\n // normalisation de la requete avec param KPV\n this.request = _Utils_Helper__WEBPACK_IMPORTED_MODULE_4__[\"default\"].normalyzeParameters({\n text : encodeURIComponent(this.options.text),\n type : type,\n terr : territory,\n maximumResponses : this.options.maximumResponses\n });\n\n (!this.request)\n ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_5__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback de succès de l'analyse de la réponse\n */\nAutoComplete.prototype.analyzeResponse = function (error, success) {\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onSuccess : success,\n onError : error,\n scope : this\n };\n\n _Response_AutoCompleteResponseFactory__WEBPACK_IMPORTED_MODULE_1__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_5__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AutoComplete);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQXV0b0NvbXBsZXRlL0F1dG9Db21wbGV0ZS5qcz84MmRjIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQTZDO0FBQ29DO0FBQ2hDO0FBQ0Y7QUFDUDtBQUNpQjs7QUFFekQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxhQUFhO0FBQ2I7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQSxXQUFXLGVBQWU7QUFDMUI7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwwQ0FBMEM7QUFDMUMsdUNBQXVDO0FBQ3ZDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDRCQUE0QixnRUFBRTtBQUM5Qjs7QUFFQTtBQUNBO0F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Y2sgZGVzIGVycmV1cnNcbiAqIEBwYXJhbSB7RnVuY3Rpb259IHN1Y2Nlc3MgLSBjYWxsYmFjayBkZSBzdWNjw6hzIGRlIGwnYW5hbHlzZSBkZSBsYSByw6lwb25zZVxuICovXG5BdXRvQ29tcGxldGUucHJvdG90eXBlLmFuYWx5emVSZXNwb25zZSA9IGZ1bmN0aW9uIChlcnJvciwgc3VjY2Vzcykge1xuICAgIGlmICh0aGlzLnJlc3BvbnNlKSB7XG4gICAgICAgIHZhciBvcHRpb25zID0ge1xuICAgICAgICAgICAgcmVzcG9uc2UgOiB0aGlzLnJlc3BvbnNlLFxuICAgICAgICAgICAgcmF3UmVzcG9uc2UgOiB0aGlzLm9wdGlvbnMucmF3UmVzcG9uc2UsXG4gICAgICAgICAgICBvblN1Y2Nlc3MgOiBzdWNjZXNzLFxuICAgICAgICAgICAgb25FcnJvciA6IGVycm9yLFxuICAgICAgICAgICAgc2NvcGUgOiB0aGlzXG4gICAgICAgIH07XG5cbiAgICAgICAgQXV0b0NvbXBsZXRlUmVzcG9uc2VGYWN0b3J5LmJ1aWxkKG9wdGlvbnMpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGVycm9yLmNhbGwodGhpcywgbmV3IEVycm9yU2VydmljZShNUi5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FTVBUWVwiKSkpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEF1dG9Db21wbGV0ZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js": +/*!*************************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js ***! + \*************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _model_AutoCompleteResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./model/AutoCompleteResponse */ \"./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/model/AutoCompleteResponse.js\");\n/* harmony import */ var _model_SuggestedLocation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./model/SuggestedLocation */ \"./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/model/SuggestedLocation.js\");\n/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module AutoCompleteResponseFactory\n * @private\n * @alias Gp.Services.AutoComplete.Response.AutoCompleteResponseFactory\n */\n\n\n\n\n\n\nvar AutoCompleteResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"AutoCompleteResponseFactory\");\n logger.trace([\"AutoCompleteResponseFactory::build()\"]);\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n var JSONResponse = null;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // analyse de la réponse\n if (JSONResponse) {\n // le service renvoie t il une erreur ?\n if (JSONResponse.error) {\n // ex. ?\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", JSONResponse.error.description),\n status : JSONResponse.error.code,\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR\n }));\n return;\n }\n\n // création de l'objet réponse\n data = new _model_AutoCompleteResponse__WEBPACK_IMPORTED_MODULE_3__[\"default\"]();\n\n // boucle sur les résultats de l'autocomplétion\n if (JSONResponse.results && Array.isArray(JSONResponse.results)) {\n var suggestedLocation = null;\n\n for (var i = 0; i < JSONResponse.results.length; i++) {\n var result = JSONResponse.results[i];\n suggestedLocation = new _model_SuggestedLocation__WEBPACK_IMPORTED_MODULE_4__[\"default\"]();\n\n if (result) {\n if (result.country === \"StreetAddress\") {\n suggestedLocation.street = result.street;\n suggestedLocation.type = \"StreetAddress\";\n } else if (result.country === \"PositionOfInterest\") {\n suggestedLocation.poi = result.street;\n suggestedLocation.kind = result.kind;\n suggestedLocation.type = \"PositionOfInterest\";\n }\n\n if (suggestedLocation.position) {\n suggestedLocation.position.x = result.x;\n suggestedLocation.position.y = result.y;\n }\n\n suggestedLocation.commune = result.city;\n suggestedLocation.fullText = result.fulltext;\n suggestedLocation.postalCode = result.zipcode;\n suggestedLocation.classification = result.classification;\n }\n // Ajout du résultat au tableau reverseGeocodedLocations de geocodedLocation\n data.suggestedLocations.push(suggestedLocation);\n }\n } else {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_FORMAT_3\")));\n return;\n }\n\n if (!data.suggestedLocations.length) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_FORMAT_3\")));\n return;\n }\n }\n\n if (!data) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_ANALYSE_2\"),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data.exceptionReport) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n // si la réponse (xmlString) est vide, on appelle le callback d'erreur\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n // si tout s'est bien passé, on appelle le callback de succès\n options.onSuccess.call(options.scope, data);\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AutoCompleteResponseFactory);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3Vy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0b0NvbXBsZXRlUmVzcG9uc2VGYWN0b3J5XCIpO1xuICAgICAgICBsb2dnZXIudHJhY2UoW1wiQXV0b0NvbXBsZXRlUmVzcG9uc2VGYWN0b3J5OjpidWlsZCgpXCJdKTtcblxuICAgICAgICB2YXIgZGF0YSA9IG51bGw7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMucmVzcG9uc2UpIHtcbiAgICAgICAgICAgIGlmIChvcHRpb25zLnJhd1Jlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiYW5hbHl6ZSByZXNwb25zZSA6IHJhd1wiKTtcbiAgICAgICAgICAgICAgICBkYXRhID0gb3B0aW9ucy5yZXNwb25zZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIEpTT05SZXNwb25zZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLnJlc3BvbnNlID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgIEpTT05SZXNwb25zZSA9IEpTT04ucGFyc2Uob3B0aW9ucy5yZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgSlNPTlJlc3BvbnNlID0gb3B0aW9ucy5yZXNwb25zZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBhbmFseXNlIGRlIGxhIHLDqXBvbnNlXG4gICAgICAgICAgICAgICAgaWYgKEpTT05SZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBsZSBzZXJ2aWNlIHJlbnZvaWUgdCBpbCB1bmUgZXJyZXVyID9cbiAgICAgICAgICAgICAgICAgICAgaWYgKEpTT05SZXNwb25zZS5lcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXguID9cbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2Uoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgOiBNUmVzLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VYQ0VQVElPTlwiLCBKU09OUmVzcG9uc2UuZXJyb3IuZGVzY3JpcHRpb24pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA6IEpTT05SZXNwb25zZS5lcnJvci5jb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBFcnJvclNlcnZpY2UuVFlQRV9TUlZFUlJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIGNyw6lhdGlvbiBkZSBsJ29iamV0IHLDqXBvbnNlXG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBuZXcgQXV0b0NvbXBsZXRlUmVzcG9uc2UoKTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBib3VjbGUgc3VyIGxlcyByw6lzdWx0YXRzIGRlIGwnYXV0b2NvbXBsw6l0aW9uXG4gICAgICAgICAgICAgICAgICAgIGlmIChKU09OUmVzcG9uc2UucmVzdWx0cyAmJiBBcnJheS5pc0FycmF5KEpTT05SZXNwb25zZS5yZXN1bHRzKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN1Z2dlc3RlZExvY2F0aW9uID0gbnVsbDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBKU09OUmVzcG9uc2UucmVzdWx0cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZXN1bHQgPSBKU09OUmVzcG9uc2UucmVzdWx0c1tpXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWdnZXN0ZWRMb2NhdGlvbiA9IG5ldyBTdWdnZXN0ZWRMb2NhdGlvbigpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0LmNvdW50cnkgPT09IFwiU3RyZWV0QWRkcmVzc1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWdnZXN0ZWRMb2NhdGlvbi5zdHJlZXQgPSByZXN1bHQuc3RyZWV0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VnZ2VzdGVkTG9jYXRpb24udHlwZSA9IFwiU3RyZWV0QWRkcmVzc1wiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlc3VsdC5jb3VudHJ5ID09PSBcIlBvc2l0aW9uT2ZJbnRlcmVzdFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWdnZXN0ZWRMb2NhdGlvbi5wb2kgPSByZXN1bHQuc3RyZWV0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VnZ2VzdGVkTG9jYXRpb24ua2luZCA9IHJlc3VsdC5raW5kO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VnZ2VzdGVkTG9jYXRpb24udHlwZSA9IFwiUG9zaXRpb25PZkludGVyZXN0XCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3VnZ2VzdGVkTG9jYXRpb24ucG9zaXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Z2dlc3RlZExvY2F0aW9uLnBvc2l0aW9uLnggPSByZXN1bHQueDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Z2dlc3RlZExvY2F0aW9uLnBvc2l0aW9uLnkgPSByZXN1bHQueTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Z2dlc3RlZExvY2F0aW9uLmNvbW11bmUgPSByZXN1bHQuY2l0eTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VnZ2VzdGVkTG9jYXRpb24uZnVsbFRleHQgPSByZXN1bHQuZnVsbHRleHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Z2dlc3RlZExvY2F0aW9uLnBvc3RhbENvZGUgPSByZXN1bHQuemlwY29kZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VnZ2VzdGVkTG9jYXRpb24uY2xhc3NpZmljYXRpb24gPSByZXN1bHQuY2xhc3NpZmljYXRpb247XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFqb3V0IGR1IHLDqXN1bHRhdCBhdSB0YWJsZWF1IHJldmVyc2VHZW9jb2RlZExvY2F0aW9ucyBkZSBnZW9jb2RlZExvY2F0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5zdWdnZXN0ZWRMb2NhdGlvbnMucHVzaChzdWdnZXN0ZWRMb2NhdGlvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRk9STUFUXzNcIikpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICghZGF0YS5zdWdnZXN0ZWRMb2NhdGlvbnMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRk9STUFUXzNcIikpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgOiBNUmVzLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0FOQUxZU0VfMlwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBFcnJvclNlcnZpY2UuVFlQRV9VTktFUlIsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAtMVxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBTaSBsYSByw6lwb25zZSBjb250ZW5haXQgdW5lIGV4Y2VwdGlvbiByZW52b3nDqWUgcGFyIGxlIHNlcnZpY2VcbiAgICAgICAgICAgICAgICBpZiAoZGF0YS5leGNlcHRpb25SZXBvcnQpIHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlIDogTVJlcy5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FWENFUFRJT05cIiwgZGF0YS5leGNlcHRpb25SZXBvcnQpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IEVycm9yU2VydmljZS5UWVBFX1NSVkVSUixcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA6IDIwMFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvLyBzaSBsYSByw6lwb25zZSAoeG1sU3RyaW5nKSBlc3QgdmlkZSwgb24gYXBwZWxsZSBsZSBjYWxsYmFjayBkJ2VycmV1clxuICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZShNUmVzLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBzaSB0b3V0IHMnZXN0IGJpZW4gcGFzc8OpLCBvbiBhcHBlbGxlIGxlIGNhbGxiYWNrIGRlIHN1Y2PDqHNcbiAgICAgICAgb3B0aW9ucy5vblN1Y2Nlc3MuY2FsbChvcHRpb25zLnNjb3BlLCBkYXRhKTtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBBdXRvQ29tcGxldGVSZXNwb25zZUZhY3Rvcnk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/model/AutoCompleteResponse.js": +/*!************************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/model/AutoCompleteResponse.js ***! + \************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Response object for {@link module:Services~autoComplete Gp.Services.autoComplete ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Array.} suggestedLocations - SuggestedLocations array.\n *\n * @namespace\n * @alias Gp.Services.AutoCompleteResponse\n */\nfunction AutoCompleteResponse () {\n if (!(this instanceof AutoCompleteResponse)) {\n throw new TypeError(\"AutoCompleteResponse constructor cannot be called as a function.\");\n }\n\n this.suggestedLocations = [];\n}\n\nAutoCompleteResponse.prototype = {\n\n constructor : AutoCompleteResponse\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AutoCompleteResponse);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQXV0b0NvbXBsZXRlL1Jlc3BvbnNlL21vZGVsL0F1dG9Db21wbGV0ZVJlc3BvbnNlLmpzPzA3ZjUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUNBLHdCQUF3QiwrREFBK0Q7QUFDdkY7QUFDQSxjQUFjLG1EQUFtRDtBQUNqRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRWUsbUZBQW9CLEVBQUMiLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZ2VvcG9ydGFsLWFjY2Vzcy1saWIvc3JjL1NlcnZpY2VzL0F1dG9Db21wbGV0ZS9SZXNwb25zZS9tb2RlbC9BdXRvQ29tcGxldGVSZXNwb25zZS5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogUmVzcG9uc2Ugb2JqZWN0IGZvciB7QGxpbmsgbW9kdWxlOlNlcnZpY2VzfmF1dG9Db21wbGV0ZSBHcC5TZXJ2aWNlcy5hdXRvQ29tcGxldGUgKCl9IGludm9jYXRpb24gd2hlbiBzdWNjZXNzZnVsLiBSZWNlaXZlZCBhcyB0aGUgYXJndW1lbnQgb2Ygb25TdWNjZXNzIGNhbGxiYWNrIGZ1bmN0aW9uLlxuICpcbiAqIEBwcm9wZXJ0eSB7QXJyYXkuPEdwLlNlcnZpY2VzLkF1dG9Db21wbGV0ZS5TdWdnZXN0ZWRMb2NhdGlvbj59IHN1Z2dlc3RlZExvY2F0aW9ucyAtIFN1Z2dlc3RlZExvY2F0aW9ucyBhcnJheS5cbiAqXG4gKiBAbmFtZXNwYWNlXG4gKiBAYWxpYXMgR3AuU2VydmljZXMuQXV0b0NvbXBsZXRlUmVzcG9uc2VcbiAqL1xuZnVuY3Rpb24gQXV0b0NvbXBsZXRlUmVzcG9uc2UgKCkge1xuICAgIGlmICghKHRoaXMgaW5zdGFuY2VvZiBBdXRvQ29tcGxldGVSZXNwb25zZSkpIHtcbiAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIkF1dG9Db21wbGV0ZVJlc3BvbnNlIGNvbnN0cnVjdG9yIGNhbm5vdCBiZSBjYWxsZWQgYXMgYSBmdW5jdGlvbi5cIik7XG4gICAgfVxuXG4gICAgdGhpcy5zdWdnZXN0ZWRMb2NhdGlvbnMgPSBbXTtcbn1cblxuQXV0b0NvbXBsZXRlUmVzcG9uc2UucHJvdG90eXBlID0ge1xuXG4gICAgY29uc3RydWN0b3IgOiBBdXRvQ29tcGxldGVSZXNwb25zZVxuXG59O1xuXG5leHBvcnQgZGVmYXVsdCBBdXRvQ29tcGxldGVSZXNwb25zZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/model/AutoCompleteResponse.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/model/SuggestedLocation.js": +/*!*********************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/model/SuggestedLocation.js ***! + \*********************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Single SuggestedLocation Object returned by underlying web service.\n * Each suggested location represents a street address (\"StreetAddress\") or a place name (\"PositionOfInterest\").\n *\n * @property {String} type - Suggested location type : \"StreetAddress\" ou \"PositionOfInterest\"\n * @property {Gp.Point} position - Position of the suggested location given in requested coordinates system.\n * @property {String} commune - Suggested municipality\n * @property {String} fullText - Full text representation of the suggested location.\n * @property {String} postalCode - Suggested location postcode\n * @property {Integer} classification - Number used to classify the importance of the place where is the suggested location from 1 (most important) to 7 (less important).\n * @property {String} street - Street name of the suggested location (\"StreetAddress\" only).\n * @property {String} kind - Nature of the suggested location : \"prefecture\", \"monument\", \"commune\", ... for instance (\"PositionOfInterest\" only).\n *\n * @namespace\n * @alias Gp.Services.AutoComplete.SuggestedLocation\n */\nfunction SuggestedLocation () {\n if (!(this instanceof SuggestedLocation)) {\n throw new TypeError(\"SuggestedLocation constructor cannot be called as a function.\");\n }\n\n /* REPONSE :\n {\n \"status\" : \"OK\",\n \"results\" : [\n {\n \"country\":\"PositionOfInterest\",\n \"x\":-1.559185,\n \"y\":47.952603,\n \"city\":\"Brie\",\n \"zipcode\":\"35150\",\n \"street\":\"corbe\",\n \"kind\":\"Lieu-dit habité\",\n \"fulltext\":\"corbe, 35150 Brie\",\n \"classification\":6\n },\n {\n \"country\":\"StreetAddress\",\n \"x\":1.538295,\n \"y\":43.19646,\n \"city\":\"Brie\",\n \"zipcode\":\"09700\",\n \"street\":\"courreste\",\n \"kind\":\"\",\n \"fulltext\":\"courreste, 09700 Brie\",\n \"classification\":7\n }\n ]\n }\n */\n\n /* REPONSE EN ERREUR\n {\n status : \"ERROR\",\n results : [ ]\n }\n */\n\n /**\n * Suggested location type : \"StreetAddress\" ou \"PositionOfInterest\"\n * @type {String}\n */\n this.type = null;\n\n /**\n * Position of the suggested location given in requested coordinates system.\n * @type {Gp.Point}\n */\n this.position = {\n x : null,\n y : null\n };\n\n /**\n * Suggested municipality\n * @type {String}\n */\n this.commune = null;\n\n /**\n * Full text representation of the suggested location.\n * @type {String}\n */\n this.fullText = null;\n\n /**\n * Suggested location postcode\n * @type {Number}\n */\n this.postalCode = null;\n\n /**\n * Number used to classify the importance of the place where is the suggested location from 1 (most important) to 7 (less important).\n * @type {Integer}\n */\n this.classification = null;\n\n /**\n * Street name of the suggested location (\"StreetAddress\" only).\n * @type {String}\n */\n this.street = null;\n\n /**\n * Place name of the suggested location (\"PositionOfInterest\" only).\n * @type {String}\n */\n this.poi = null;\n\n /**\n * Nature of the suggested location : \"prefecture\", \"monument\", \"commune\", ... for instance (\"PositionOfInterest\" only).\n * @type {String}\n */\n this.kind = null;\n}\n\nSuggestedLocation.prototype = {\n\n constructor : SuggestedLocation\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SuggestedLocation);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQXV0b0NvbXBsZXRlL1Jlc3BvbnNlL21vZGVsL1N1Z2dlc3RlZExvY2F0aW9uLmpzP2FjZjIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGNBQWMsT0FBTztBQUNyQixjQUFjLFNBQVM7QUFDdkIsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixjQUFjLE9BQU87QUFDckIsY0FBYyxRQUFRO0F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b3JiZVwiLFxuICAgICAgICAgICAgICAgICBcImtpbmRcIjpcIkxpZXUtZGl0IGhhYml0w6lcIixcbiAgICAgICAgICAgICAgICAgXCJmdWxsdGV4dFwiOlwiY29yYmUsIDM1MTUwIEJyaWVcIixcbiAgICAgICAgICAgICAgICAgXCJjbGFzc2lmaWNhdGlvblwiOjZcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICBcImNvdW50cnlcIjpcIlN0cmVldEFkZHJlc3NcIixcbiAgICAgICAgICAgICAgICAgXCJ4XCI6MS41MzgyOTUsXG4gICAgICAgICAgICAgICAgIFwieVwiOjQzLjE5NjQ2LFxuICAgICAgICAgICAgICAgICBcImNpdHlcIjpcIkJyaWVcIixcbiAgICAgICAgICAgICAgICAgXCJ6aXBjb2RlXCI6XCIwOTcwMFwiLFxuICAgICAgICAgICAgICAgICBcInN0cmVldFwiOlwiY291cnJlc3RlXCIsXG4gICAgICAgICAgICAgICAgIFwia2luZFwiOlwiXCIsXG4gICAgICAgICAgICAgICAgIFwiZnVsbHRleHRcIjpcImNvdXJyZXN0ZSwgMDk3MDAgQnJpZVwiLFxuICAgICAgICAgICAgICAgICBcImNsYXNzaWZpY2F0aW9uXCI6N1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgIF1cbiAgICAgICAgfVxuICAgICovXG5cbiAgICAvKiBSRVBPTlNFIEVOIEVSUkVVUlxuICAgICAgICB7XG4gICAgICAgICAgICBzdGF0dXMgOiBcIkVSUk9SXCIsXG4gICAgICAgICAgICByZXN1bHRzIDogWyBdXG4gICAgICAgIH1cbiAgICAqL1xuXG4gICAgLyoqXG4gICAgICogU3VnZ2VzdGVkIGxvY2F0aW9uIHR5cGUgOiBcIlN0cmVldEFkZHJlc3NcIiBvdSBcIlBvc2l0aW9uT2ZJbnRlcmVzdFwiXG4gICAgICogQHR5cGUge1N0cmluZ31cbiAgICAgKi9cbiAgICB0aGlzLnR5cGUgPSBudWxsO1xuXG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cIiBvbmx5KS5cbiAgICAgKiBAdHlwZSB7U3RyaW5nfVxuICAgICAqL1xuICAgIHRoaXMuc3RyZWV0ID0gbnVsbDtcblxuICAgIC8qKlxuICAgICAqIFBsYWNlIG5hbWUgb2YgdGhlIHN1Z2dlc3RlZCBsb2NhdGlvbiAoXCJQb3NpdGlvbk9mSW50ZXJlc3RcIiBvbmx5KS5cbiAgICAgKiBAdHlwZSB7U3RyaW5nfVxuICAgICAqL1xuICAgIHRoaXMucG9pID0gbnVsbDtcblxuICAgIC8qKlxuICAgICAqIE5hdHVyZSBvZiB0aGUgc3VnZ2VzdGVkIGxvY2F0aW9uIDogXCJwcmVmZWN0dXJlXCIsIFwibW9udW1lbnRcIiwgXCJjb21tdW5lXCIsIC4uLiBmb3IgaW5zdGFuY2UgKFwiUG9zaXRpb25PZkludGVyZXN0XCIgb25seSkuXG4gICAgICogQHR5cGUge1N0cmluZ31cbiAgICAgKi9cbiAgICB0aGlzLmtpbmQgPSBudWxsO1xufVxuXG5TdWdnZXN0ZWRMb2NhdGlvbi5wcm90b3R5cGUgPSB7XG5cbiAgICBjb25zdHJ1Y3RvciA6IFN1Z2dlc3RlZExvY2F0aW9uXG59O1xuXG5leHBvcnQgZGVmYXVsdCBTdWdnZXN0ZWRMb2NhdGlvbjtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/model/SuggestedLocation.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/CommonService.js": +/*!*************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/CommonService.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Utils/Helper */ \"./node_modules/geoportal-access-lib/src/Utils/Helper.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Protocols_Protocol__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Protocols/Protocol */ \"./node_modules/geoportal-access-lib/src/Protocols/Protocol.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../package.json */ \"./node_modules/geoportal-access-lib/package.json\");\nvar _package_json__WEBPACK_IMPORTED_MODULE_6___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../../package.json */ \"./node_modules/geoportal-access-lib/package.json\", 1);\n\n\n\n\n\n\n// package.json (extract version)\n\n\n/**\n * @classdesc\n * Composant Service\n *\n * @constructor\n * @alias Gp.Services.CommonService\n * @param {Object} options - options communes à tous les services\n *\n * @param {String} [options.serverUrl] - URL d'accès au service. Par défaut \"https://wxs.ign.fr/calcul/geoportail/SERVICE/\".\n * Permet de forcer l'utilisation d'un service équivalent déployé derrière une éventuelle autre URL d'accès.\n * Si ce paramètre est renseigné alors, le paramètre par défaut est ignoré.\n *\n * @param {String} [options.protocol] - Le protocole à utiliser pour récupérer les informations du service :\n * peut valoir 'JSONP' ou 'XHR'.\n * Par défaut, c'est le protocole XHR qui sera utilisé.\n * Attention, le protocole JSONP n'est pas valide dans un environnement NodeJS (Utilisation du mode XHR).\n *\n * @param {Boolean} [options.ssl] - Indique si l'on souhaite intérroger les services en https.\n * Ce paramètre ne fonctionne que pour une utilisation hors navigateur (ex. NodeJS).\n * Sur un navigateur, le protocole est automatiquement extrait de l'url du site...\n * Par défaut, on utilise le protocole http (ssl=false).\n *\n * @param {String} [options.proxyURL] - Le proxy à utiliser pour pallier au problème de cross-domain dans le cas d'une requête XHR.\n * Utile si le paramètre 'protocol' vaut 'XHR', il ne sera pas pris en compte si protocol vaut JSONP.\n *\n * @param {String} [options.callbackSuffix] - Suffixe de la fonction de callback à utiliser, dans le cas du protocole JSONP.\n * Par défaut, la fonction de callback portera un nom du type \"callback\"+ID, où ID est soit un identifiant unique généré à chaque requête,\n * soit le paramètre callbackSuffix s'il est spécifié. Par exemple, si callbackSuffix=\"_2\", la fonction sera \"callback_2 ()\".\n * Utile pour utiliser une réponse déjà encapsulée dans une fonction de callback, dont le nom est connu\n * Utile seulement si le paramètre 'protocol' vaut 'JSONP', il ne sera pas pris en compte si protocol vaut 'XHR'.\n *\n * @param {String} [options.httpMethod] - La méthode HTTP\n * à utiliser dans le cas d'une requête XHR : peut valoir 'GET' ou 'POST'.\n * Non pris en compte si 'protocol' vaut JSONP qui fonctionne obligatoirement en GET.\n * Par défaut, c'est la méthode GET qui est utilisée.\n *\n * @param {String} [options.contentType] - Content-Type de la requete\n * à utiliser dans le cas d'une requête XHR en mode POST.\n * Non pris en compte si 'protocol' vaut JSONP et/ou la méthode HTTP vaut GET.\n * Par défaut, c'est la méthode GET qui est utilisée donc on n'utilise pas de Content-Type.\n *\n * @param {Number} [options.timeOut] - Délai d'attente maximal (en ms) de la réponse du service (à partir de l'envoi de la requête).\n * Par défaut, aucun timeOut n'est pris en compte (timeoutDelay= 0).\n *\n * @param {Boolean} [options.rawResponse] - Indique si l'on souhaite que la réponse du service ne soit pas parsée par l'API avant d'être restituée.\n * (Cf. paramètre « onSuccess » pour plus de détails).\n *\n * @param {Function} [options.onSuccess] - Fonction appelée lorsque le service répond correctement à la requête\n * (code HTTP 200, sans message d'erreur).\n * Cette fonction prend en paramètre la réponse du service,\n * soit sous la forme d'un Object Javascript formaté par le parseur dédié à la syntaxe du service (comportement par défaut) ;\n * soit brute au format String non prétraité si le paramètre « rawResponse » a été précisé avec la valeur « true ».\n *\n * @param {Function} [options.onFailure] - Fonction appelée lorsque le service ne répond pas correctement\n * (code HTTP de retour différent de 200 ou pas de réponse).\n *\n * @param {Function} [options.onBeforeParse] - Fonction appelée avant le parsing de la réponse\n * Permet de modifier la réponse avant parsing et la fonction doit retourner une String.\n * Cette fonction prend en paramètre la réponse telle que renvoyée par le service\n * (cad au format json ou xml).\n * Pour le JSONP, si le paramètre \"rawResponse\" a été précisé avec la valeur \"true\",\n * la fonction prend en paramètre un Object JavaScript contenant la réponse XML.\n *\n * @example\n * var options = {\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * ssl : false,\n * proxyURL : null,\n * callbackName : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * onBeforeParse : function (rawResponse) {}\n * };\n */\nfunction CommonService (options) {\n if (!(this instanceof CommonService)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\"));\n }\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"CommonService\");\n this.logger.trace(\"[Constructeur CommonService (options)]\");\n\n // #####################\n // récupération des options par défaut pour les paramètres optionnels\n // #####################\n\n /**\n * Options du service\n * @type {Object}\n */\n this.options = {\n // protocol : \"JSONP\",\n protocol : \"XHR\",\n ssl : true,\n proxyURL : \"\",\n // callbackName : \"\",\n callbackSuffix : null,\n httpMethod : \"GET\",\n timeOut : 0,\n rawResponse : false,\n scope : this,\n /**\n * callback par defaut pour la reponse\n * @param {Object} response - response\n * @private\n */\n onSuccess : function (response) {\n console.log(\"onSuccess - la reponse est la suivante : \", response);\n },\n /**\n * callback par defaut pour les erreurs\n * @param {Object} error - error\n * @private\n */\n onFailure : function (error) {\n if (error.status === 200 || !error.status) {\n console.log(\"onFailure : \", error.message);\n } else {\n console.log(\"onFailure - Erreur (\", error.status, \") : \", error.message);\n }\n }\n };\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n\n // #####################\n // analyse des options\n // #####################\n\n // modification de la fonction de callback onSuccess dans le cas où la réponse brute est demandée\n if (this.options.rawResponse && !this.options.onSuccess) {\n /**\n * callback par defaut pour la reponse\n * @param {Object} response - response\n * @private\n */\n this.options.onSuccess = function (response) {\n console.log(\"onSuccess - la réponse brute du service est la suivante : \", response);\n };\n }\n\n // gestion du callback onSuccess\n var bOnSuccess = !!(this.options.onSuccess !== null && typeof this.options.onSuccess === \"function\");\n if (!bOnSuccess) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_MISSING\", \"onSuccess()\"));\n }\n\n // gestion de l'url du service par defaut\n if (!this.options.serverUrl) {\n // INFO\n // gestion de l'url du service par defaut pour les services qui ne possèdent qu'une seul url par defaut\n // les cas particuliers des services avec plusieurs urls (ex. Alti) devront être traité dans la classe du composant\n // donc si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n _DefaultUrlService__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ssl = this.options.ssl;\n var urlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_5__[\"default\"][this.CLASSNAME].url(\"calcul\");\n if (typeof urlByDefault === \"string\") {\n this.options.serverUrl = urlByDefault;\n } else {\n this.logger.trace(\"URL par defaut à determiner au niveau du composant...\");\n }\n }\n\n // FIXME nettoyage des KVP dans l'url du service\n // if (this.options.serverUrl) {\n // // INFO\n // // si l'url est renseignée, il faut la nettoyer de tous ses KVP\n // // ex. on ne veut pas de params. 'callback' ou 'output' car ceci declencherait\n // // des opérations d'encapsulations des reponses légèrement farfelues ...\n // var urlsource = this.options.serverUrl;\n // var urlparts = urlsource.split(\"?\");\n // this.options.serverUrl = urlparts[0];\n // }\n\n // gestion de la methode HTTP\n this.options.httpMethod = (typeof options.httpMethod === \"string\") ? options.httpMethod.toUpperCase() : \"GET\";\n\n switch (this.options.httpMethod) {\n case \"POST\":\n case \"GET\":\n break;\n case \"PUT\":\n case \"DELETE\":\n case \"HEAD\":\n case \"OPTIONS\":\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_NOT_SUPPORT\", \"httpMethod\"));\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_UNKNOWN\", \"httpMethod\"));\n }\n\n // gestion du protocole\n // this.options.protocol = (typeof options.protocol === \"string\" ) ? options.protocol.toUpperCase() : \"JSONP\";\n this.options.protocol = (typeof options.protocol === \"string\") ? options.protocol.toUpperCase() : \"XHR\";\n\n switch (this.options.protocol) {\n case \"JSONP\":\n case \"XHR\":\n break;\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_UNKNOWN\", \"protocol\"));\n }\n\n // on determine l'environnement d'execution : browser ou non ?\n // et on lance une exception sur l'utilisation du protocole JSONP pour nodeJS...\n if (typeof window === \"undefined\" && this.options.protocol === \"JSONP\") {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_NOT_SUPPORT_NODEJS\", \"protocol=JSONP (instead use XHR)\"));\n }\n\n // le protocole JSONP ne fonctionne qu'en GET.\n if (this.options.protocol === \"JSONP\") {\n this.options.httpMethod = \"GET\";\n }\n\n // gestion du cache\n this.options.nocache = options.nocache || false;\n\n // #####################\n // attributs d'instances\n // #####################\n\n /**\n * Format de réponse du service\n */\n this.options.outputFormat = null;\n /**\n * Requête envoyée au service\n */\n this.request = null;\n /**\n * Reponse du service\n */\n this.response = null;\n}\n\n/**\n * @lends module:CommonService\n */\nCommonService.prototype = {\n\n /*\n * Constructeur (alias)\n */\n constructor : CommonService,\n\n /**\n * Appel du service Géoportail\n */\n call : function () {\n /* jshint validthis : true */\n this.logger.trace(\"CommonService::call ()\");\n\n var context = this;\n /** fonction d'execution */\n function run () {\n this.logger.trace(\"CommonService::run ()\");\n this.buildRequest.call(context, onError, onBuildRequest);\n }\n\n run.call(context);\n\n // callback de fin de construction de la requête\n function onBuildRequest (result) {\n this.logger.trace(\"CommonService::onBuildRequest : \", result);\n this.callService.call(context, onError, onCallService);\n }\n\n // callback de fin d'appel au service\n function onCallService (result) {\n this.logger.trace(\"CommonService::onCallService : \", result);\n this.analyzeResponse.call(context, onError, onAnalyzeResponse);\n }\n\n // callback de fin de lecture de la reponse\n function onAnalyzeResponse (result) {\n this.logger.trace(\"CommonService::onAnalyzeResponse : \", result);\n if (result) {\n this.options.onSuccess.call(this, result);\n } else {\n return onError.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"Analyse de la reponse en échec !?\"));\n }\n }\n\n // callback de gestion des erreurs : renvoit un objet de type ErrorService\n function onError (error) {\n this.logger.trace(\"CommonService::onError()\");\n // error : l'objet est du type ErrorService ou Error\n var e = error;\n if (!(e instanceof _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"])) {\n e = new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](error.message);\n }\n this.options.onFailure.call(this, e);\n }\n },\n\n /**\n * Création de la requête\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n buildRequest : function (error, success) {\n // INFO\n this.logger.error(\"overwritten method !\");\n // retourne l'objet 'this.request'\n if (error) {\n error.call(this, \"This method must be overwritten !\");\n }\n success.call(this, \"This method must be overwritten !\");\n },\n\n /**\n * Appel du service\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n callService : function (error, success) {\n // INFO\n // retourne l'objet 'this.response'\n\n // NOTES\n // Pour le mode XHR, on recupère une reponse sous forme d'un json ou xml (#document).\n // Pour le mode JSONP, on a toujours un objet JSON mais sous 2 formes :\n // - natif\n // - XML encapsulé :\n // {http : {status:200, error:null},xml :'réponse du service'}\n // {http : {status:400, error:'reponse du service'},xml :null}\n // En XHR, la reponse est directement sauvegardée dans 'this.response'.\n // Par contre, en JSONP, on doit analyser la reponse (status ou non vide),\n // et ne renvoyer que le contenu (xml ou l'objet)\n\n // gestion de la proxification du service\n var strUrlProxified = null;\n var strData = this.request;\n\n // a t on mis en place un proxy ?\n // la proxyfication est valable uniquement en mode XHR !\n var bUrlProxified = !!(this.options.proxyURL && this.options.protocol === \"XHR\");\n\n // rajout de l'option gpbibaccess\n // INFO : acces au numero de version de package.conf aprés compilation !\n if (this.CLASSNAME !== \"Geocode\" && this.CLASSNAME !== \"ReverseGeocode\" && this.CLASSNAME !== \"AutoComplete\") {\n this.options.serverUrl = _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__[\"default\"].normalyzeUrl(this.options.serverUrl, {\n \"gp-access-lib\" : _package_json__WEBPACK_IMPORTED_MODULE_6__.version\n }, false);\n }\n\n // si le proxy est renseigné, on proxifie l'url du service\n if (bUrlProxified) {\n if (this.options.httpMethod === \"GET\") {\n strUrlProxified = this.options.proxyURL + _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__[\"default\"].normalyzeUrl(this.options.serverUrl, this.request, true);\n strData = null;\n }\n\n if (this.options.httpMethod === \"POST\") {\n strUrlProxified = this.options.proxyURL + _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__[\"default\"].normalyzeUrl(this.options.serverUrl, null, true);\n strData = this.request;\n }\n }\n\n // contexte du composant spécifique !\n var self = this;\n\n var options = {\n url : strUrlProxified || this.options.serverUrl,\n method : this.options.httpMethod,\n protocol : this.options.protocol,\n timeOut : this.options.timeOut || 0,\n format : this.options.outputFormat, // ceci declenche le parsing de la reponse du service, mais on souhaite toujours une reponse brute (string) !\n nocache : this.options.nocache || false, // ceci permet d'ajouter un timestamp dans la requête\n wrap : this.options.protocol !== \"XHR\", // ceci declenche l'encapsulation de la reponse XML du service dans du JSON, mais pas en mode XHR !\n callbackSuffix : this.options.callbackSuffix,\n // callbackName : this.options.callbackName || null,\n data : strData,\n headers : null, // TODO...\n content : this.options.contentType || \"application/xml\",\n scope : this.options.scope || this,\n // callback de reponse\n onResponse : function (response) {\n self.logger.trace(\"callService::onResponse()\");\n\n // le contenu de la reponse à renvoyer !\n var content = null;\n\n // XHR : on renvoie toujours la reponse brute du service (json ou xml)\n // au parser du composant...\n if (self.options.protocol === \"XHR\") {\n self.logger.trace(\"Response XHR\", response);\n content = response; // par defaut, la reponse du service !\n }\n\n // JSONP : on pre-analyse la reponse brute du service (encapsuler ou pas)\n // avant de l'envoyer au parser du composant...\n if (self.options.protocol === \"JSONP\") {\n self.logger.trace(\"Response JSON\", response);\n if (response) {\n if (response.http) {\n // reponse encapsulée :\n // ex. reponse du service en xml\n // > {http : {status:200, error:null},xml :'réponse du service'}\n if (response.http.status !== 200) {\n error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n status : response.http.status,\n message : response.http.error,\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].TYPE_SRVERR\n }));\n return;\n } else {\n content = response.xml; // par defaut !\n if (self.options.rawResponse) {\n content = response;\n }\n }\n } else {\n // reponse non encapsulée :\n // ex. reponse du service en json ou xml\n content = response;\n }\n } else {\n error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"Le contenu de la reponse est vide !?\"));\n return;\n }\n }\n\n // si on souhaite parser la reponse du service\n if (typeof self.options.onBeforeParse === \"function\") {\n var newResponse = self.options.onBeforeParse(content);\n if (typeof newResponse === \"string\") {\n // la reponse parsée par l'utilisateur est retournée sous\n // forme de string !\n content = newResponse;\n }\n }\n // sauvegarde de la reponse dans l'objet parent (CommonService)\n self.response = content;\n // on renvoie la reponse...\n success.call(self, content);\n },\n // callback des erreurs\n onFailure : function (e) {\n self.logger.trace(\"callService::onFailure()\");\n // on est forcement sur une erreur levée par un service !\n e.type = _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].TYPE_SRVERR;\n error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](e));\n },\n // callback de timeOut\n onTimeOut : function () {\n self.logger.trace(\"callService::onTimeOut()\");\n error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"TimeOut!\"));\n }\n };\n\n _Protocols_Protocol__WEBPACK_IMPORTED_MODULE_3__[\"default\"].send(options);\n },\n\n /**\n * Analyse de la réponse\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n analyzeResponse : function (error, success) {\n // INFO\n this.logger.error(\"overwritten method !\");\n // retourne l'objet spécifique au type de composant (json)\n if (error) {\n error.call(this, \"This method must be overwritten !\");\n }\n success.call(this, \"This method must be overwritten !\");\n }\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (CommonService);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQ29tbW9uU2VydmljZS5qcz8xYjIyIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUE4QztBQUNUO0FBQ007QUFDRTtBQUNTO0FBQ0Y7QUFDcEQ7QUFDcUM7O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oanNvbiBvdSB4bWwpXG4gICAgICAgICAgICAgICAgLy8gYXUgcGFyc2VyIGR1IGNvbXBvc2FudC4uLlxuICAgICAgICAgICAgICAgIGlmIChzZWxmLm9wdGlvbnMucHJvdG9jb2wgPT09IFwiWEhSXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5sb2dnZXIudHJhY2UoXCJSZXNwb25zZSBYSFJcIiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICBjb250ZW50ID0gcmVzcG9uc2U7IC8vIHBhciBkZWZhdXQsIGxhIHJlcG9uc2UgZHUgc2VydmljZSAgIVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEpTT05QIDogb24gcHJlLWFuYWx5c2UgbGEgcmVwb25zZSBicnV0ZSBkdSBzZXJ2aWNlIChlbmNhcHN1bGVyIG91IHBhcylcbiAgICAgICAgICAgICAgICAvLyBhdmFudCBkZSBsJ2Vudm95ZXIgYXUgcGFyc2VyIGR1IGNvbXBvc2FudC4uLlxuICAgICAgICAgICAgICAgIGlmIChzZWxmLm9wdGlvbnMucHJvdG9jb2wgPT09IFwiSlNPTlBcIikge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmxvZ2dlci50cmFjZShcIlJlc3BvbnNlIEpTT05cIiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5odHRwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVwb25zZSBlbmNhcHN1bMOpZSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXguIHJlcG9uc2UgZHUgc2VydmljZSBlbiB4bWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyA+IHtodHRwIDoge3N0YXR1czoyMDAsIGVycm9yOm51bGx9LHhtbCA6J3LDqXBvbnNlIGR1IHNlcnZpY2UnfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5odHRwLnN0YXR1cyAhPT0gMjAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yLmNhbGwoc2VsZiwgbmV3IEVycm9yU2VydmljZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiByZXNwb25zZS5odHRwLnN0YXR1cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgOiByZXNwb25zZS5odHRwLmVycm9yLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IEVycm9yU2VydmljZS5UWVBFX1NSVkVSUlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ID0gcmVzcG9uc2UueG1sOyAvLyBwYXIgZGVmYXV0ICFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYub3B0aW9ucy5yYXdSZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudCA9IHJlc3BvbnNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZXBvbnNlIG5vbiBlbmNhcHN1bMOpZSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXguIHJlcG9uc2UgZHUgc2VydmljZSBlbiBqc29uIG91IHhtbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgPSByZXNwb25zZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yLmNhbGwoc2VsZiwgbmV3IEVycm9yU2VydmljZShcIkxlIGNvbnRlbnUgZGUgbGEgcmVwb25zZSBlc3QgdmlkZSAhP1wiKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBzaSBvbiBzb3VoYWl0ZSBwYXJzZXIgbGEgcmVwb25zZSBkdSBzZXJ2aWNlXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzZWxmLm9wdGlvbnMub25CZWZvcmVQYXJzZSA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBuZXdSZXNwb25zZSA9IHNlbGYub3B0aW9ucy5vbkJlZm9yZVBhcnNlKGNvbnRlbnQpO1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG5ld1Jlc3BvbnNlID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsYSByZXBvbnNlIHBhcnPDqWUgcGFyIGwndXRpbGlzYXRldXIgZXN0IHJldG91cm7DqWUgc291c1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZm9ybWUgZGUgc3RyaW5nICFcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgPSBuZXdSZXNwb25zZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBzYXV2ZWdhcmRlIGRlIGxhIHJlcG9uc2UgZGFucyBsJ29iamV0IHBhcmVudCAoQ29tbW9uU2VydmljZSlcbiAgICAgICAgICAgICAgICBzZWxmLnJlc3BvbnNlID0gY29udGVudDtcbiAgICAgICAgICAgICAgICAvLyBvbiByZW52b2llIGxhIHJlcG9uc2UuLi5cbiAgICAgICAgICAgICAgICBzdWNjZXNzLmNhbGwoc2VsZiwgY29udGVudCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gY2FsbGJhY2sgZGVzIGVycmV1cnNcbiAgICAgICAgICAgIG9uRmFpbHVyZSA6IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5sb2dnZXIudHJhY2UoXCJjYWxsU2VydmljZTo6b25GYWlsdXJlKClcIik7XG4gICAgICAgICAgICAgICAgLy8gb24gZXN0IGZvcmNlbWVudCBzdXIgdW5lIGVycmV1ciBsZXbDqWUgcGFyIHVuIHNlcnZpY2UgIVxuICAgICAgICAgICAgICAgIGUudHlwZSA9IEVycm9yU2VydmljZS5UWVBFX1NSVkVSUjtcbiAgICAgICAgICAgICAgICBlcnJvci5jYWxsKHNlbGYsIG5ldyBFcnJvclNlcnZpY2UoZSkpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGNhbGxiYWNrIGRlIHRpbWVPdXRcbiAgICAgICAgICAgIG9uVGltZU91dCA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBzZWxmLmxvZ2dlci50cmFjZShcImNhbGxTZXJ2aWNlOjpvblRpbWVPdXQoKVwiKTtcbiAgICAgICAgICAgICAgICBlcnJvci5jYWxsKHNlbGYsIG5ldyBFcnJvclNlcnZpY2UoXCJUaW1lT3V0IVwiKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgUHJvdG9jb2wuc2VuZChvcHRpb25zKTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogQW5hbHlzZSBkZSBsYSByw6lwb25zZVxuICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGVycm9yIC0gY2FsbGJhY2tcbiAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBzdWNjZXNzIC0gY2FsbGJhY2tcbiAgICAgKi9cbiAgICBhbmFseXplUmVzcG9uc2UgOiBmdW5jdGlvbiAoZXJyb3IsIHN1Y2Nlc3MpIHtcbiAgICAgICAgLy8gSU5GT1xuICAgICAgICB0aGlzLmxvZ2dlci5lcnJvcihcIm92ZXJ3cml0dGVuIG1ldGhvZCAhXCIpO1xuICAgICAgICAvLyByZXRvdXJuZSBsJ29iamV0IHNww6ljaWZpcXVlIGF1IHR5cGUgZGUgY29tcG9zYW50IChqc29uKVxuICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgIGVycm9yLmNhbGwodGhpcywgXCJUaGlzIG1ldGhvZCBtdXN0IGJlIG92ZXJ3cml0dGVuICFcIik7XG4gICAgICAgIH1cbiAgICAgICAgc3VjY2Vzcy5jYWxsKHRoaXMsIFwiVGhpcyBtZXRob2QgbXVzdCBiZSBvdmVyd3JpdHRlbiAhXCIpO1xuICAgIH1cblxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29tbW9uU2VydmljZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/CommonService.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Config/Config.js": +/*!*************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Config/Config.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _ConfigInterface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConfigInterface */ \"./node_modules/geoportal-access-lib/src/Services/Config/ConfigInterface.js\");\n\n\n\n\n\n\n/**\n * @classdesc\n *\n * Recupération de la configuration de clés Géoportail sous forme de JSON\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Config\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n * @param {Sting} options.apiKey - clé(s) dont on veut obtenir la configuration. Si plusieurs clés, séparer chacune par une virgule\n * @param {Boolean} [options.sync=false] - force le mode synchrone\n * @param {String} options.customConfigFile - chemin vers un fichier de configuration personnalisé. Surcharge le paramètre apiKey.\n *\n * @example\n * var options = {\n * apiKey : \"cartes,ortho\",\n * sync : false,\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * };\n *\n */\nfunction Config (options) {\n if (!(this instanceof Config)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Config\"));\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"Config\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Config\");\n this.logger.trace(\"[Constructeur Config (options)]\");\n\n // #####################\n // analyse des options\n // #####################\n\n // gestion du callback onSuccess\n var bOnSuccess = !!(options.onSuccess !== null && typeof options.onSuccess === \"function\");\n if (!bOnSuccess) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"onSuccess()\"));\n }\n if (!options.apiKey && !options.customConfigFile) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"apiKey\", \"customConfigFile\"));\n }\n this.options = {};\n this.options.onSuccess = options.onSuccess;\n this.options.onFailure = options.onFailure;\n\n // mode sync\n this.options.sync = options.sync || false;\n\n // gestion d'un tableau d'url des fichiers de configuration\n this.options.listConfigUrls = (options.customConfigFile)\n ? [options.customConfigFile]\n : !Array.isArray(options.apiKey)\n ? _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Config.url(options.apiKey.split(\",\"))\n : _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Config.url(options.apiKey);\n}\n\n/**\n * @lends module:Config#\n */\nConfig.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/**\n * Constructeur (alias)\n */\nConfig.prototype.constructor = Config;\n\n/**\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.buildRequest = function (error, success) {\n // liste des urls des fichiers de configuration en JSON\n this.listConfigUrls = this.options.listConfigUrls;\n\n if (!this.listConfigUrls) {\n error.call(this, new Error(\"url by default not found !\"));\n return;\n }\n\n // INFO :\n // il n'y a pas de construction de requête,\n // on passe directement à l'appel des requêtes\n success.call(this, this.listConfigUrls);\n};\n\n/**\n * Récupération des configuration\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.callService = function (error, success) {\n if (this.options.sync) {\n __callServiceSync.call(this, error, success);\n } else {\n __callService.call(this, error, success);\n }\n};\n\n/**\n * Requêtes en mode asynchrone\n *\n * @param {*} error\n * @param {*} success\n * @private\n */\nvar __callService = function (error, success) {\n // liste des resultats au format JSON\n this.listConfigResults = [];\n\n // test on env. nodejs or browser\n let Fetch = null;\n if (typeof window === \"undefined\") {\n var nodefetch = __webpack_require__(/*! node-fetch */ \"node-fetch\");\n Fetch = nodefetch;\n } else {\n Fetch = window.fetch;\n }\n\n // the factory of fetch !\n var fetchFactory = (url) => {\n return Fetch(url, { credentials : \"same-origin\" })\n .then((response) => {\n if (response.ok) {\n return response.json()\n .then((json) => {\n // TODO :\n // tester le contenu !\n return json;\n })\n .catch((error) => {\n throw new Error(\"Exception Json : \" + error);\n });\n } else {\n throw new Error(\"Exception HTTP : \" + response.status + \" (status code) !\");\n }\n })\n .catch((error) => {\n return new Promise((resolve, reject) => {\n // eslint-disable-line no-unused-vars\n reject(error);\n });\n });\n };\n\n // construction des promises fetch\n var promises = [];\n for (let index = 0; index < this.listConfigUrls.length; index++) {\n const url = this.listConfigUrls[index];\n promises.push(fetchFactory(url));\n }\n\n Promise.all(promises)\n .then((results) => {\n if (!results) {\n throw new Error(\"results config empty !?\");\n }\n results.forEach((result) => {\n // TODO :\n // verification des resultats\n this.listConfigResults.push(result);\n });\n })\n .then(() => {\n success.call(this, this.listConfigResults);\n })\n .catch((e) => {\n // TODO :\n // construction d'un message\n error.call(this, e);\n });\n};\n\n/**\n * Requêtes en mode synchrone\n *\n * @param {*} error\n * @param {*} success\n * @private\n */\nvar __callServiceSync = function (error, success) {\n // liste des resultats au format JSON\n this.listConfigResults = [];\n\n // FIXME :\n // boucle synchrone !\n for (var i = 0; i < this.listConfigUrls.length; i++) {\n const url = this.listConfigUrls[i];\n // TODO :\n // prévoir le CORS, headers, ...\n const request = new XMLHttpRequest();\n request.open(\"GET\", url, false);\n request.send(null);\n if (request.status === 200) {\n // TODO :\n // tester la reponse !\n var response = JSON.parse(request.responseText);\n this.listConfigResults.push(response);\n }\n }\n // callback\n if (this.listConfigResults.length !== 0) {\n success.call(this, this.listConfigResults);\n } else {\n error.call(this, new Error(\"...\"));\n }\n};\n\n/**\n * Analyse et mise en forme de la réponse en fusionnant les configurations\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.analyzeResponse = function (error, success) {\n // fonction de merge des objects JSON\n var mergeConfig = function (objects) {\n // objet fusion des couches\n var allLayersConfig = {};\n // objet fusion des clés\n var allKeysConfig = {};\n // objet fusion des TMS\n var allTMSConfig = {};\n\n // on fusionne les résultat\n for (var i = 0; i < objects.length; i++) {\n if (!objects[i].generalOptions || !objects[i].layers) {\n return;\n }\n allKeysConfig = {\n ...allKeysConfig,\n ...objects[i].generalOptions.apiKeys\n };\n allLayersConfig = {\n ...allLayersConfig,\n ...objects[i].layers\n };\n allTMSConfig = {\n ...allTMSConfig,\n ...objects[i].tileMatrixSets\n };\n }\n\n var mergedConfig = {\n generalOptions : {\n apiKeys : allKeysConfig\n },\n layers : allLayersConfig,\n tileMatrixSets : allTMSConfig\n };\n return mergedConfig;\n };\n\n // fusion des configurations JSON\n var ConfigJSON = mergeConfig(this.listConfigResults);\n if (!ConfigJSON) {\n error.call(this, new Error(\"configuration structure not conforme !\"));\n return;\n }\n\n // creation des interfaces\n var IConfig = new _ConfigInterface__WEBPACK_IMPORTED_MODULE_4__[\"default\"]();\n // ajout des interfaces avec la configuration JSON\n Object.assign(IConfig, ConfigJSON);\n\n // définition de la variable globale Gp.Config\n var scope = typeof window !== \"undefined\" ? window : {};\n if (!scope.Gp) {\n scope.Gp = {};\n }\n\n // enregistrement\n if (scope.Gp.Config) {\n Object.assign(scope.Gp.Config, IConfig);\n // dans le doute..., ceinture et bretelles !\n for (var property in IConfig) {\n scope.Gp.Config[property] = IConfig[property];\n }\n } else {\n scope.Gp.Config = IConfig;\n }\n\n // INFO :\n // il n'y a pas d'analyse des résultats,\n // on passe directement à l'appel de la callback utilisateur\n success.call(this, scope.Gp.Config);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Config);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXN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yZWRlbnRpYWxzIDogXCJzYW1lLW9yaWdpblwiIH0pXG4gICAgICAgICAgICAudGhlbigocmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uub2spIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmpzb24oKVxuICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4oKGpzb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPIDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB0ZXN0ZXIgbGUgY29udGVudSAhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGpzb247XG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgLmNhdGNoKChlcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkV4Y2VwdGlvbiBKc29uIDogXCIgKyBlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJFeGNlcHRpb24gSFRUUCA6IFwiICsgcmVzcG9uc2Uuc3RhdHVzICsgXCIgKHN0YXR1cyBjb2RlKSAhXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2F0Y2goKGVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby11bnVzZWQtdmFyc1xuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgfTtcblxuICAgIC8vIGNvbnN0cnVjdGlvbiBkZXMgcHJvbWlzZXMgZmV0Y2hcbiAgICB2YXIgcHJvbWlzZXMgPSBbXTtcbiAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgdGhpcy5saXN0Q29uZmlnVXJscy5sZW5ndGg7IGluZGV4KyspIHtcbiAgICAgICAgY29uc3QgdXJsID0gdGhpcy5saXN0Q29uZmlnVXJsc1tpbmRleF07XG4gICAgICAgIHByb21pc2VzLnB1c2goZmV0Y2hGYWN0b3J5KHVybCkpO1xuICAgIH1cblxuICAgIFByb21pc2UuYWxsKHByb21pc2VzKVxuICAgICAgICAudGhlbigocmVzdWx0cykgPT4ge1xuICAgICAgICAgICAgaWYgKCFyZXN1bHRzKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwicmVzdWx0cyBjb25maWcgZW1wdHkgIT9cIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXN1bHRzLmZvckVhY2goKHJlc3VsdCkgPT4ge1xuICAgICAgICAgICAgICAgIC8vIFRPRE8gOlxuICAgICAgICAgICAgICAgIC8vIHZlcmlmaWNhdGlvbiBkZXMgcmVzdWx0YXRzXG4gICAgICAgICAgICAgICAgdGhpcy5saXN0Q29uZmlnUmVzdWx0cy5wdXNoKHJlc3VsdCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSlcbiAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgc3VjY2Vzcy5jYWxsKHRoaXMsIHRoaXMubGlzdENvbmZpZ1Jlc3VsdHMpO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goKGUpID0+IHtcbiAgICAgICAgICAgIC8vIFRPRE8gOlxuICAgICAgICAgICAgLy8gY29uc3RydWN0aW9uIGQndW4gbWVzc2FnZVxuICAgICAgICAgICAgZXJyb3IuY2FsbCh0aGlzLCBlKTtcbiAgICAgICAgfSk7XG59O1xuXG4vKipcbiAqIFJlcXX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0c1tpXS5nZW5lcmFsT3B0aW9ucyB8fCAhb2JqZWN0c1tpXS5sYXllcnMpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBhbGxLZXlzQ29uZmlnID0ge1xuICAgICAgICAgICAgICAgIC4uLmFsbEtleXNDb25maWcsXG4gICAgICAgICAgICAgICAgLi4ub2JqZWN0c1tpXS5nZW5lcmFsT3B0aW9ucy5hcGlLZXlzXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgYWxsTGF5ZXJzQ29uZmlnID0ge1xuICAgICAgICAgICAgICAgIC4uLmFsbExheWVyc0NvbmZpZyxcbiAgICAgICAgICAgICAgICAuLi5vYmplY3RzW2ldLmxheWVyc1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGFsbFRNU0NvbmZpZyA9IHtcbiAgICAgICAgICAgICAgICAuLi5hbGxUTVNDb25maWcsXG4gICAgICAgICAgICAgICAgLi4ub2JqZWN0c1tpXS50aWxlTWF0cml4U2V0c1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBtZXJnZWRDb25maWcgPSB7XG4gICAgICAgICAgICBnZW5lcmFsT3B0aW9ucyA6IHtcbiAgICAgICAgICAgICAgICBhcGlLZXlzIDogYWxsS2V5c0NvbmZpZ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGxheWVycyA6IGFsbExheWVyc0NvbmZpZyxcbiAgICAgICAgICAgIHRpbGVNYXRyaXhTZXRzIDogYWxsVE1TQ29uZmlnXG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBtZXJnZWRDb25maWc7XG4gICAgfTtcblxuICAgIC8vIGZ1c2lvbiBkZXMgY29uZmlndXJhdGlvbnMgSlNPTlxuICAgIHZhciBDb25maWdKU09OID0gbWVyZ2VDb25maWcodGhpcy5saXN0Q29uZmlnUmVzdWx0cyk7XG4gICAgaWYgKCFDb25maWdKU09OKSB7XG4gICAgICAgIGV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0YXRzLFxuICAgIC8vIG9uIHBhc3NlIGRpcmVjdGVtZW50IMOgIGwnYXBwZWwgZGUgbGEgY2FsbGJhY2sgdXRpbGlzYXRldXJcbiAgICBzdWNjZXNzLmNhbGwodGhpcywgc2NvcGUuR3AuQ29uZmlnKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IENvbmZpZztcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Config/Config.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Config/ConfigInterface.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Config/ConfigInterface.js ***! + \**********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Response object for {@link module:Services~getConfig Gp.Services.getConfig ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Object} generalOptions - General properties for default map configuration resources.\n * @property {Object} generalOptions.apiKeys - Object that associates apiKey (s) with an array of resources IDs availables with that key.\n * @property {String} generalOptions.title - Underlying web service Title.\n * @property {String} generalOptions.defaultGMLGFIStyle - XSL URL used by default to translate an XML GetFeatureInfo response into an HTML array.\n * @property {String} generalOptions.theme - default theme (FIXME : for what ?)\n * @property {Array.} generalOptions.wgs84Resolutions - geographical resolutions Array for each [zoom level of the Geoportal platform]{@link http://api.ign.fr/tech-docs-js/webmaster/layers.html#Geoportal_resolutions} from 0 to 21. Expressed in degrees/pixel.\n * @property {Object} layers - Associative array mapping resources availables IDs (keys) with their properties (values given as {@link Gp.Services.Config.Layer}).\n * @property {Object} tileMatrixSets - Associative Array mapping TileMatrixSets IDs (keys) availables with their properties (values given as {@link Gp.Services.Config.TileMatrixSet}).\n *\n * @namespace\n * @alias Gp.Services.GetConfigInterface\n */\nfunction ConfigInterface () {\n if (!(this instanceof ConfigInterface)) {\n throw new TypeError(\"ConfigInterface constructor cannot be called as a function.\");\n }\n\n this.generalOptions = {\n apiKeys : {},\n title : null,\n defaultGMLGFIStyle : null,\n theme : null,\n wgs84Resolutions : []\n };\n\n this.layers = {};\n\n this.tileMatrixSets = {};\n}\n\nConfigInterface.prototype = {\n\n /*\n * Constructor (alias)\n */\n constructor : ConfigInterface,\n\n /**\n * Check if config is loaded for a given key\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Boolean} isKeyConfLoaded - true if config of the key is already loaded, false otherwise\n */\n isKeyConfLoaded : function (apiKey) {\n if (!apiKey) {\n return;\n }\n if (this.generalOptions.apiKeys[apiKey]) {\n return true;\n }\n return false;\n },\n\n /**\n * Returns an array of Geoportal layers identifiers, corresponding to an API contract key.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Array} apiKeys - Array of geoportal layers identifiers\n */\n getLayersId : function (apiKey) {\n return this.generalOptions.apiKeys[apiKey];\n },\n\n /**\n * Returns the id of a Geoportal layer with its name and its service.\n *\n * @param {String} layerName - name of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS\")\n * @param {String} service - name of the service (ex. \"WMS\" ou \"WMTS\")\n * @returns {String} Id of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS\")\n */\n getLayerId : function (layerName, service) {\n if (!layerName || !service) {\n return;\n }\n var layerId = null;\n\n // layer\n // key : [layerName]$[contexte]:OGC:[service]\n // ex : \"ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS\"\n\n // service\n // key : [layerName]$[contexte];[service]\n // ex : PositionOfInterest$OGC:OPENLS;ReverseGeocode\n\n if (this.layers) {\n var layers = this.layers;\n for (var key in layers) {\n if (layers.hasOwnProperty(key)) {\n var parts = key.split(\"$\");\n if (layerName === parts[0]) {\n if (parts[1]) {\n var servicePartsLayer = parts[1].split(\":\");\n var servicePartsService = parts[1].split(\";\");\n\n if (servicePartsService[1] === service.toUpperCase()) {\n layerId = key;\n break;\n }\n if (servicePartsLayer[2] === service.toUpperCase()) {\n layerId = key;\n break;\n }\n }\n }\n }\n }\n }\n if (!layerId) {\n return;\n }\n return layerId;\n },\n\n /**\n * Returns an associative array of Geoportal layers configurations, corresponding to an API contract key.\n * If no key is specified, all layers from configuration are returned.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Object} layers - Object which properties are layers identifiers.\n */\n getLayersConf : function (apiKey) {\n var layers = {};\n var layersIdArray = this.getLayersId(apiKey);\n if (layersIdArray) {\n for (var i = 0; i < layersIdArray.length; i++) {\n var lyrId = layersIdArray[i];\n layers[lyrId] = this.layers[lyrId];\n }\n }\n return layers;\n },\n\n /**\n * Returns a geoportal layer configuration, given its identifier\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @return {Object} layer - Layer configuration\n */\n getLayerConf : function (layerId) {\n if (!this.layers) {\n return;\n }\n return this.layers[layerId];\n },\n\n /**\n * Get all parameters needed to display a WMS or WMTS layer given its name, its service and its key\n *\n * @param {String} layerName - name of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS\")\n * @param {String} service - name of the service (ex. \"WMS\" ou \"WMTS\")\n * @param {String} [apiKey] - Contract API key\n * @returns {Object} params - params of the service (WMS or WMTS) for the given layer\n * @returns {String} params.url - Url of the service to reach to display the layer\n * @returns {String} params.version - Version of the service\n * @returns {String} params.styles - Default style of the layer\n * @returns {String} params.format - Default format of the layer\n * @returns {String} params.projection - Default projection of the layer\n * @returns {Number} params.minScale - Min scale denominator of the layer\n * @returns {Number} params.maxScale - Max scale denominator of the layer\n * @returns {Gp.BBox} params.extent - Extent of the layer, in the projection of the layer\n * @returns {Array} params.legends - Array of legends associated to the layer\n * @returns {Array} params.title - Name of the layer, readable by a human\n * @returns {Array} params.description - Description of the layer\n * @returns {String} params.[TMSLink] - Id of the Tile Matrix Set (TMS), in the case of WMTS layer\n * @returns {Gp.Point} params.[matrixOrigin] - Originof the tile matrix (top left corner), in the case of WMTS layer\n * @returns {Array} params.[nativeResolutions] - Array with the resolution of each level of the tile matrix set, in the case of WMTS layer\n * @returns {Array} params.[matrixIds] - Array with the ID of each level of the tile matrix set, in the case of WMTS layer\n */\n getLayerParams : function (layerName, service) {\n var params = {};\n\n if ((service === \"WMS\" || Object.keys(this.tileMatrixSets).length !== 0) && Object.keys(this.layers).length !== 0) {\n // get the layerId of the layer\n var layerId = this.getLayerId(layerName, service);\n\n if (layerId) {\n // get the layer Conf Object\n var layerConf = this.getLayerConf(layerId);\n\n var keys = this.getLayerKey(layerId);\n if (keys.length === 0) {\n return;\n }\n\n // get services params\n for (var i = 0; i < keys.length; i++) {\n // only one serverUrl is saved in Gp.Config : with multiKeys, we have to retrieve the key used in the serverUrl property\n if (layerConf.serviceParams.serverUrl[keys[i]]) {\n params.url = layerConf.serviceParams.serverUrl[keys[i]];\n }\n }\n\n const wmsTypeRegex = /\\/v\\//;\n // WMS vector style always empty (not in getCap)\n if (wmsTypeRegex.test(params.url)) {\n params.styles = \" \";\n } else {\n // WMS raster style is defined in getCap\n params.styles = layerConf.styles[0].name;\n }\n\n params.version = layerConf.serviceParams.version;\n params.format = layerConf.formats[0].name;\n params.projection = layerConf.defaultProjection;\n\n // get layer info and constraints\n params.minScale = layerConf.globalConstraint.minScaleDenominator;\n params.maxScale = layerConf.globalConstraint.maxScaleDenominator;\n params.extent = layerConf.globalConstraint.bbox;\n params.legends = layerConf.legends;\n params.title = layerConf.title;\n params.description = layerConf.description;\n\n if (service === \"WMS\") {\n params.metadata = layerConf.metadata;\n }\n\n // Informations non disponibles avec les getCap\n // params.metadata = layerConf.getMetadata();\n // params.originators = layerConf.getOriginators();\n // params.quicklookUrl = layerConf.getQuicklookUrl();\n\n // WMTS : get the tileMatrixSetLimits\n if (layerConf.wmtsOptions) {\n params.tileMatrixSetLimits = layerConf.wmtsOptions.tileMatrixSetLimits;\n var TMSLink = layerConf.wmtsOptions.tileMatrixSetLink;\n if (TMSLink) {\n params.TMSLink = TMSLink;\n var tmsConf = this.getTMSConf(TMSLink);\n // Get matrix origin : Gp.Point = Object{x:Float, y:Float}\n // params.matrixOrigin = tmsConf.getTopLeftCorner();\n params.matrixIds = Object.keys(tmsConf.tileMatrices);\n params.tileMatrices = tmsConf.tileMatrices;\n // by default, pseudo mercator resolutions\n params.nativeResolutions = tmsConf.nativeResolutions || this.getTMSConf(\"PM\").nativeResolutions;\n }\n }\n }\n }\n return params;\n },\n\n /**\n * Get the contract key(s) associated to a given layer.\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @return {Array} layerKey - array of key(s) associated to the given layer\n */\n getLayerKey : function (layerId) {\n var layerKey = [];\n if (this.generalOptions && this.generalOptions.apiKeys && Object.keys(this.generalOptions.apiKeys).length !== 0) {\n var resourcesByKey = this.generalOptions.apiKeys;\n for (var key in resourcesByKey) {\n var resourcesArray = resourcesByKey[key];\n resourcesArray.forEach(function (arrayLayerId) {\n if (arrayLayerId === layerId) {\n layerKey.push(key);\n }\n });\n }\n }\n return layerKey;\n },\n\n /**\n * Returns an associative array of Tile Matrix Sets configurations.\n *\n * @return {Object} tileMatrixSets - Object which properties are TMS identifiers\n *\n */\n getTileMatrixSets : function () {\n return this.tileMatrixSets;\n },\n\n /**\n * Returns a Tile Matrix Sets configuration, given its identifier.\n *\n * @param {String} tmsID - Tile Matrix Set identifier (e.g. : \"PM\")\n * @return {Object} tileMatrixSet - Tile Matrix Set configuration\n */\n getTMSConf : function (tmsID) {\n if (!this.tileMatrixSets) {\n return;\n }\n return this.tileMatrixSets[tmsID];\n },\n\n /**\n * Get global constraints for a given Layer : extent, minScale, maxScale, projection\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @returns {Object} params - layer constraints\n * @returns {String} params.projection - default layer projection\n * @returns {Number} params.minScale - layer min scale denominator\n * @returns {Number} params.maxScale - layer max scale denominator\n * @returns {Gp.BBox} params.extent - layer extent expressed in the layer projection\n */\n getGlobalConstraints : function (layerId) {\n var params = {};\n\n if (layerId) {\n // get layer configuration object\n var layerConf = this.getLayerConf(layerId);\n params.projection = layerConf.defaultProjection;\n params.minScale = layerConf.globalConstraint.minScaleDenominator;\n params.maxScale = layerConf.globalConstraint.maxScaleDenominator;\n params.extent = layerConf.globalConstraint.bbox;\n }\n\n return params;\n }\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ConfigInterface);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQ29uZmlnL0NvbmZpZ0ludGVyZmFjZS5qcz83NDM1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0E7QUFDQSx3QkFBd0IseURBQXlEO0FBQ2pGO0FBQ0EsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixjQUFjLE9BQU87QUFDckIsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixjQUFjLGNBQWMsa0hBQWtILGlGQUFpRjtBQUMvTixjQUFjLE9BQU8sNEdBQTRHLCtCQUErQjtBQUNoSyxjQUFjLE9BQU8seUhBQXlILHVDQUF1QztBQUNyTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0Esb0JBQW9CO0FBQ3BCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFD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1BFTkxTO1JldmVyc2VHZW9jb2RlXG5cbiAgICAgICAgaWYgKHRoaXMubGF5ZXJzKSB7XG4gICAgICAgICAgICB2YXIgbGF5ZXJzID0gdGhpcy5sYXllcnM7XG4gICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gbGF5ZXJzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxheWVycy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJ0cyA9IGtleS5zcGxpdChcIiRcIik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChsYXllck5hbWUgPT09IHBhcnRzWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFydHNbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgc2VydmljZVBhcnRzTGF5ZXIgPSBwYXJ0c1sxXS5zcGxpdChcIjpcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNlcnZpY2VQYXJ0c1NlcnZpY2UgPSBwYXJ0c1sxXS5zcGxpdChcIjtcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VydmljZVBhcnRzU2VydmljZVsxXSA9PT0gc2VydmljZS50b1VwcGVyQ2FzZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVySWQgPSBrZXk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VydmljZVBhcnRzTGF5ZXJbMl0gPT09IHNlcnZpY2UudG9VcHBlckNhc2UoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXllcklkID0ga2V5O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFsYXllcklkKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGxheWVySWQ7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgYW4gYXNzb2NpYXRpdmUgYXJyYXkgb2YgR2VvcG9ydGFsIGxheWVycyBjb25maWd1cmF0aW9ucywgY29ycmVzcG9uZGluZyB0byBhbiBBUEkgY29udHJhY3Qga2V5LlxuICAgICAqIElmIG5vIGtleSBpcyBzcGVjaWZpZWQsIGFsbCBsYXllcnMgZnJvbSBjb25maWd1cmF0aW9uIGFyZSByZXR1cm5lZC5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBhcGlLZXkgLSBBY2Nlc3Mga2V5IHRvIEdlb3BvcnRhbCBwbGF0Zm9ybVxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IGxheWVycyAtIE9iamVjdCB3aGljaCBwcm9wZXJ0aWVzIGFyZSBsYXllcnMgaWRlbnRpZmllcnMuXG4gICAgICovXG4gICAgZ2V0TGF5ZXJzQ29uZiA6IGZ1bmN0aW9uIChhcGlLZXkpIHtcbiAgICAgICAgdmFyIGxheWVycyA9IHt9O1xuICAgICAgICB2YXIgbGF5ZXJzSWRBcnJheSA9IHRoaXMuZ2V0TGF5ZXJzSWQoYXBpS2V5KTtcbiAgICAgICAgaWYgKGxheWVyc0lkQXJyYXkpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGF5ZXJzSWRBcnJheS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHZhciBseXJJZCA9IGxheWVyc0lkQXJyYXlbaV07XG4gICAgICAgICAgICAgICAgbGF5ZXJzW2x5cklkXSA9IHRoaXMubGF5ZXJ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eFNldHMpLmxlbmd0aCAhPT0gMCkgJiYgT2JqZWN0LmtleXModGhpcy5sYXllcnMpLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgLy8gZ2V0IHRoZSBsYXllcklkIG9mIHRoZSBsYXllclxuICAgICAgICAgICAgdmFyIGxheWVySWQgPSB0aGlzLmdldExheWVySWQobGF5ZXJOYW1lLCBzZXJ2aWNlKTtcblxuICAgICAgICAgICAgaWYgKGxheWVySWQpIHtcbiAgICAgICAgICAgICAgICAvLyBnZXQgdGhlIGxheWVyIENvbmYgT2JqZWN0XG4gICAgICAgICAgICAgICAgdmFyIGxheWVyQ29uZiA9IHRoaXMuZ2V0TGF5ZXJDb25mKGxheWVySWQpO1xuXG4gICAgICAgICAgICAgICAgdmFyIGtleXMgPSB0aGlzLmdldExheWVyS2V5KGxheWVySWQpO1xuICAgICAgICAgICAgICAgIGlmIChrZXlzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZ2V0IHNlcnZpY2VzIHBhcmFtc1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwga2V5cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbmx5IG9uZSBzZXJ2ZXJVcmwgaXMgc2F2ZWQgaW4gR3AuQ29uZmlnIDogd2l0aCBtdWx0aUtleXMsIHdlIGhhdmUgdG8gcmV0cmlldmUgdGhlIGtleSB1c2VkIGluIHRoZSBzZXJ2ZXJVcmwgcHJvcGVydHlcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnNlcnZlclVybFtrZXlzW2ldXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnVybCA9IGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnNlcnZlclVybFtrZXlzW2ldXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IHdtc1R5cGVSZWdleCA9IC9cXC92XFwvLztcbiAgICAgICAgICAgICAgICAvLyBXTVMgdmVjdG9yIHN0eWxlIGFsd2F5cyBlbXB0eSAobm90IGluIGdldENhcClcbiAgICAgICAgICAgICAgICBpZiAod21zVHlwZVJlZ2V4LnRlc3QocGFyYW1zLnVybCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnN0eWxlcyA9IFwiIFwiO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFdNUyByYXN0ZXIgc3R5bGUgaXMgZGVmaW5lZCBpbiBnZXRDYXBcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnN0eWxlcyA9IGxheWVyQ29uZi5zdHlsZXNbMF0ubmFtZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBwYXJhbXMudmVyc2lvbiA9IGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnZlcnNpb247XG4gICAgICAgICAgICAgICAgcGFyYW1zLmZvcm1hdCA9IGxheWVyQ29uZi5mb3JtYXRzWzBdLm5hbWU7XG4gICAgICAgICAgICAgICAgcGFyYW1zLnByb2plY3Rpb24gPSBsYXllckNvbmYuZGVmYXVsdFByb2plY3Rpb247XG5cbiAgICAgICAgICAgICAgICAvLyBnZXQgbGF5ZXIgaW5mbyBhbmQgY29uc3RyYWludHNcbiAgICAgICAgICAgICAgICBwYXJhbXMubWluU2NhbGUgPSBsYXllckNvbmYuZ2xvYmFsQ29uc3RyYWludC5taW5TY2FsZURlbm9taW5hdG9yO1xuICAgICAgICAgICAgICAgIHBhcmFtcy5tYXhTY2FsZSA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50Lm1heFNjYWxlRGVub21pbmF0b3I7XG4gICAgICAgICAgICAgICAgcGFyYW1zLmV4dGVudCA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50LmJib3g7XG4gICAgICAgICAgICAgICAgcGFyYW1zLmxlZ2VuZHMgPSBsYXllckNvbmYubGVnZW5kcztcbiAgICAgICAgICAgICAgICBwYXJhbXMudGl0bGUgPSBsYXllckNvbmYudGl0bGU7XG4gICAgICAgICAgICAgICAgcGFyYW1zLmRlc2NyaXB0aW9uID0gbGF5ZXJDb25mLmRlc2NyaXB0aW9uO1xuXG4gICAgICAgICAgICAgICAgaWYgKHNlcnZpY2UgPT09IFwiV01TXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLm1ldGFkYXRhID0gbGF5ZXJDb25mLm1ldGFkYXRhO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEluZm9ybWF0aW9ucyAgbm9uIGRpc3BvbmlibGVzIGF2ZWMgbGVzIGdldENhcFxuICAgICAgICAgICAgICAgIC8vIHBhcmFtcy5tZXRhZGF0YSA9IGxheWVyQ29uZi5nZXRNZXRhZGF0YSgpO1xuICAgICAgICAgICAgICAgIC8vIHBhcmFtcy5vcmlnaW5hdG9ycyA9IGxheWVyQ29uZi5nZXRPcmlnaW5hdG9ycygpO1xuICAgICAgICAgICAgICAgIC8vIHBhcmFtcy5xdWlja2xvb2tVcmwgPSBsYXllckNvbmYuZ2V0UXVpY2tsb29rVXJsKCk7XG5cbiAgICAgICAgICAgICAgICAvLyBXTVRTIDogZ2V0IHRoZSB0aWxlTWF0cml4U2V0TGltaXRzXG4gICAgICAgICAgICAgICAgaWYgKGxheWVyQ29uZi53bXRzT3B0aW9ucykge1xuICAgICAgICAgICAgICAgICAgICBwYXJhbXMudGlsZU1hdHJpeFNldExpbWl0cyA9IGxheWVyQ29uZi53bXRzT3B0aW9ucy50aWxlTWF0cml4U2V0TGltaXRzO1xuICAgICAgICAgICAgICAgICAgICB2YXIgVE1TTGluayA9IGxheWVyQ29uZi53bXRzT3B0aW9ucy50aWxlTWF0cml4U2V0TGluaztcbiAgICAgICAgICAgICAgICAgICAgaWYgKFRNU0xpbmspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5UTVNMaW5rID0gVE1TTGluaztcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0bXNDb25mID0gdGhpcy5nZXRUTVNDb25mKFRNU0xpbmspO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gR2V0IG1hdHJpeCBvcmlnaW4gOiBHcC5Qb2ludCA9IE9iamVjdHt4OkZsb2F0LCB5OkZsb2F0fVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcGFyYW1zLm1hdHJpeE9yaWdpbiA9IHRtc0NvbmYuZ2V0VG9wTGVmdENvcm5lcigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLm1hdHJpeElkcyA9IE9iamVjdC5rZXlzKHRtc0NvbmYudGlsZU1hdHJpY2VzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy50aWxlTWF0cmljZXMgPSB0bXNDb25mLnRpbGVNYXRyaWNlcztcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGJ5IGRlZmF1bHQsIHBzZXVkbyBtZXJjYXRvciByZXNvbHV0aW9uc1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLm5hdGl2ZVJlc29sdXRpb25zID0gdG1zQ29uZi5uYXRpdmVSZXNvbHV0aW9ucyB8fCB0aGlzLmdldFRNU0NvbmYoXCJQTVwiKS5uYXRpdmVSZXNvbHV0aW9ucztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcGFyYW1zO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBHZXQgdGhlIGNvbnRyYWN0IGtleShzKSBhc3NvY2lhdGVkIHRvIGEgZ2l2ZW4gbGF5ZXIuXG4gICAgICpcbiAgICAgKiBAcGFy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RyYWludC5tYXhTY2FsZURlbm9taW5hdG9yO1xuICAgICAgICAgICAgcGFyYW1zLmV4dGVudCA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50LmJib3g7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcGFyYW1zO1xuICAgIH1cblxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29uZmlnSW50ZXJmYWNlO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Config/ConfigInterface.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js ***! + \*****************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n// cette classe contient les URLs par defaut des services.\n// DefaultUrlService.Alti.url(key)[elevation-json]\n// DefaultUrlService.Alti.url(key)[elevation-xml]\n// DefaultUrlService.Alti.url(key)[profil-json]\n// DefaultUrlService.Alti.url(key)[profil-xml]\n// DefaultUrlService.Alti.url(key)[wps]\n// DefaultUrlService.ProcessIsoCurve.url(key)\n// DefaultUrlService.AutoComplete.url(key)\n// DefaultUrlService.ReverseGeocode.url(key)\n// DefaultUrlService.Geocode.url(key)\n// DefaultUrlService.Route.url(key)\n\n// Example :\n//\n// DefaultUrlService.Alti.url('alti')[elevation-json]\n// output {String} -> http://wxs.ign.fr/calcul/alti/rest/elevation.json\n//\n// DefaultUrlService.Alti.url('calcul')\n// output {Object|String}\n// -> http://wxs.ign.fr/calcul/alti/rest/elevation.json\n// -> http://wxs.ign.fr/calcul/alti/rest/elevation.xml\n// -> http://wxs.ign.fr/calcul/alti/rest/elevationLine.json\n// -> http://wxs.ign.fr/calcul/alti/rest/elevationLine.xml\n// -> http://wxs.ign.fr/calcul/alti/wps\n//\n// ssl by default.\n//\n// Force to not do ssl :\n// DefaultUrlService.ssl = false;\n//\n// DefaultUrlService.AutoComplete.url('calcul')\n// output {Object|String}\n// -> https://wxs.ign.fr/calcul/ols/apis/completion\n\n// constantes internes\nvar HOSTNAME = \"wxs.ign.fr\";\n\n/**\n * Default Geoportal web services URLs access.\n *\n * @namespace\n * @alias Gp.Services.DefaultUrl\n */\nvar DefaultUrlService = {\n\n /** if set true, require the use of https protocol */\n ssl : true,\n\n /**\n * base url of services (ssl protocol management)\n * @param {String} key - key\n * @param {String} path - path\n * @returns {String} url\n */\n url : function (key, path) {\n // comportement par défaut => https\n // sinon, il est fixé par l'option 'ssl' (false => http)\n var _protocol;\n if (DefaultUrlService.ssl === false) {\n _protocol = \"http://\";\n } else {\n _protocol = \"https://\";\n }\n\n return _protocol + HOSTNAME.concat(\"/\", key, path);\n },\n\n /**\n * Elevation web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns elevation service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols (\"elevation-json\", \"elevation-xml\", \"profil-json\" or \"profil-xml\").\n */\n Alti : {\n _key : {\n // rest\n \"elevation-json\" : \"/alti/rest/elevation.json\",\n \"elevation-xml\" : \"/alti/rest/elevation.xml\",\n \"profil-json\" : \"/alti/rest/elevationLine.json\",\n \"profil-xml\" : \"/alti/rest/elevationLine.xml\",\n // other\n wps : \"/alti/wps\"\n },\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return {\n // rest\n \"elevation-json\" : DefaultUrlService.url(key, this._key[\"elevation-json\"]),\n \"elevation-xml\" : DefaultUrlService.url(key, this._key[\"elevation-xml\"]),\n \"profil-json\" : DefaultUrlService.url(key, this._key[\"profil-json\"]),\n \"profil-xml\" : DefaultUrlService.url(key, this._key[\"profil-xml\"]),\n // other\n wps : DefaultUrlService.url(key, this._key[\"wps\"])\n };\n }\n },\n /**\n * IsoCurve web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns isocurve service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols (\"iso-json\" or \"iso-xml\").\n */\n ProcessIsoCurve : {\n _key : \"/geoportail/isochrone/rest/1.0.0/isochrone\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Config web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns config service default urls with or without geoportal access key given as a parameter.\n */\n Config : {\n _key : \"https://raw.githubusercontent.com/IGNF/geoportal-configuration/main/dist/\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n // key must be an array of one or several keys\n if (!Array.isArray(key)) {\n key = key.split(\",\");\n }\n // not homogeneous with others geoportal services URLs\n var url = [];\n for (var i = 0; i < key.length; i++) {\n url[i] = this._key + key[i] + \"Config.json\";\n }\n return url;\n }\n },\n /**\n * Autocompletion web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns autocomplete service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n AutoComplete : {\n _key : \"/ols/apis/completion\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Reverse geocoding web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns reverse geocoding service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n ReverseGeocode : {\n _key : \"/geoportail/ols\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Geocoding web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns geocoding service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n Geocode : {\n _key : \"/geoportail/ols\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Routing web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns routing service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols.\n */\n Route : {\n _key : \"/geoportail/itineraire/rest/1.0.0/route\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (DefaultUrlService);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvRGVmYXVsdFVybFNlcnZpY2UuanM/MzE5NCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsWUFBWSxPQUFPO0FBQ25CO0FBQ0E7QUFDQSxXQUFXO0FBQ1g7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVztBQUNYOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixnQkFBZ0IsT0FBTztBQUN2QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBOztBQUVBO0FBQ0EsS0FBSzs7QUFFTDtBQUNBO0FBQ0E7QUFDQSxnQkFBZ0I7QUFDaEIsa0JBQWtCLFNBQVM7QUFDM0I7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO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cIlxuICAgICAgICB9LFxuICAgICAgICAvKipcbiAgICAgICAgKiB1cmxcbiAgICAgICAgKiBAcGFyYW0ge1N0cmluZ30ga2V5IC0ga2V5XG4gICAgICAgICogQHJldHVybnMge1N0cmluZ30gdXJsXG4gICAgICAgICovXG4gICAgICAgIHVybCA6IGZ1bmN0aW9uIChrZXkpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgLy8gcmVzdFxuICAgICAgICAgICAgICAgIFwiZWxldmF0aW9uLWpzb25cIiA6IERlZmF1bHRVcmxTZXJ2aWNlLnVybChrZXksIHRoaXMuX2tleVtcImVsZXZhdGlvbi1qc29uXCJdKSxcbiAgICAgICAgICAgICAgICBcImVsZXZhdGlvbi14bWxcIiA6IERlZmF1bHRVcmxTZXJ2aWNlLnVybChrZXksIHRoaXMuX2tleVtcImVsZXZhdGlvbi14bWxcIl0pLFxuICAgICAgICAgICAgICAgIFwicHJvZmlsLWpzb25cIiA6IERlZmF1bHRVcmxTZXJ2aWNlLnVybChrZXksIHRoaXMuX2tleVtcInByb2ZpbC1qc29uXCJdKSxcbiAgICAgICAgICAgICAgICBcInByb2ZpbC14bWxcIiA6IERlZmF1bHRVcmxTZXJ2aWNlLnVybChrZXksIHRoaXMuX2tleVtcInByb2ZpbC14bWxcIl0pLFxuICAgICAgICAgICAgICAgIC8vIG90aGVyXG4gICAgICAgICAgICAgICAgd3BzIDogRGVmYXVsdFVybFNlcnZpY2UudXJsKGtleSwgdGhpcy5fa2V5W1wid3BzXCJdKVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgLyoqXG4gICAgICogSXNvQ3VydmUgd2ViIHNlcnZpY2UgYWNjZXNzXG4gICAgICpcbiAgICAgKiBAbWVtYmVyIHtPYmplY3R9XG4gICAgICogQHByb3BlcnR5IHtGdW5jdGlvbn0gdXJsIChrZXkpIC0gUmV0dXJucyBpc29jdXJ2ZSBzZXJ2aWNlIGRlZmF1bHQgdXJ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AgICAgIC8qKlxuICAgICAgICAqIHVybFxuICAgICAgICAqIEBwYXJhbSB7U3RyaW5nfSBrZXkgLSBrZXlcbiAgICAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSB1cmxcbiAgICAgICAgKi9cbiAgICAgICAgdXJsIDogZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgLy8ga2V5IG11c3QgYmUgYW4gYXJyYXkgb2Ygb25lIG9yIHNldmVyYWwga2V5c1xuICAgICAgICAgICAgaWYgKCFBcnJheS5pc0FycmF5KGtleSkpIHtcbiAgICAgICAgICAgICAgICBrZXkgPSBrZXkuc3BsaXQoXCIsXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gbm90IGhvbW9nZW5lb3VzIHdpdGggb3RoZXJzIGdlb3BvcnRhbCBzZXJ2aWNlcyBVUkxzXG4gICAgICAgICAgICB2YXIgdXJsID0gW107XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGtleS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHVybFtpXSA9IHRoaXMuX2tleSArIGtleVtpXSArIFwiQ29uZmlnLmpzb25cIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB1cmw7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIC8qKlxuICAgICAqIEF1dG9jb21wbGV0aW9uIHdlYiBzZXJ2aWNlIGFjY2Vzc1xuICAgICAqXG4gICAgICogQG1lbWJlciB7T2JqZWN0fVxuICAgICAqIEBwcm9wZXJ0eSB7RnVuY3Rpb259IHVybCAoa2V5KSAtIFJldHVybnMgYXV0b2NvbXBsZXRlIHNlcnZpY2UgZGVmYXVsdCB1cmxzIHdpdGggb3Igd2l0aG91dCBnZW9wb3J0YWwgYWNjZXNzIGtleSBnaXZlbiBhcyBhIHBhcmFtZXRlci4gVGhlIHJlc3VsdCBpcyBhIFN0cmluZy5cbiAgICAgKi9cbiAgICBBdXRvQ29tcGxldGUgOiB7XG4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BvcnRhaWwvaXRpbmVyYWlyZS9yZXN0LzEuMC4wL3JvdXRlXCIsXG4gICAgICAgIC8qKlxuICAgICAgICAqIHVybFxuICAgICAgICAqIEBwYXJhbSB7U3RyaW5nfSBrZXkgLSBrZXlcbiAgICAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSB1cmxcbiAgICAgICAgKi9cbiAgICAgICAgdXJsIDogZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgcmV0dXJuIERlZmF1bHRVcmxTZXJ2aWNlLnVybChrZXksIHRoaXMuX2tleSk7XG4gICAgICAgIH1cbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBEZWZhdWx0VXJsU2VydmljZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Geocode/Formats/GeocodeResponseParser.js": +/*!*************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Geocode/Formats/GeocodeResponseParser.js ***! + \*************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _Response_model_GeocodeResponse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Response/model/GeocodeResponse */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Response/model/GeocodeResponse.js\");\n/* harmony import */ var _Response_model_GeocodedLocation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Response/model/GeocodedLocation */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Response/model/GeocodedLocation.js\");\n// import Logger from \"../../../Utils/LoggerByDefault\";\n\n\n\n\n\n/**\n * Fonction retournant un objet contenant des clés de lecture (readers)\n * qui permettent de parser des réponses XML du service de géocodage direct du Géoportail\n * afin de récupérer les résultats retournés.\n * @module GeocodeResponseParser\n * @alias Gp.Services.Geocode.Formats.GeocodeResponseParser\n * @private\n */\n\n/**\n * @classdesc\n *\n * Classe permettant de parser une réponse GeoJSON\n *\n * @constructor\n * @alias Gp.Formats.GeocodeResponseParser\n *\n * @private\n */\nfunction GeocodeResponseParser () {\n if (!(this instanceof GeocodeResponseParser)) {\n throw new TypeError(\"GeocodeResponseParser constructor cannot be called as a function.\");\n }\n}\n\nGeocodeResponseParser.prototype = {\n\n /**\n * @lends module:GeocodeResponseParser\n */\n\n /*\n * Constructeur (alias)\n */\n constructor : GeocodeResponseParser,\n\n /**\n * Méthode permettant de lancer la lecture d'une réponse GeoJSON,\n *\n * @param {String} json - réponse au format GeoJSON\n * @return {Object} geocodeResponse|exceptionReport : l'objet contenant les informations de la réponse GeoJSON,\n * sous la forme d'un objet GeocodeResponse, ou un objet littéral exceptionReport si le service a renvoyé une exception.\n */\n parse : function (json) {\n var geocodeResponse = new _Response_model_GeocodeResponse__WEBPACK_IMPORTED_MODULE_2__[\"default\"]();\n\n const obj = JSON.parse(json);\n\n if (obj.type === \"FeatureCollection\") {\n for (var i = 0; i < obj.features.length; ++i) {\n _parseFeature(obj.features[i], geocodeResponse);\n }\n } else if (obj.type === \"Feature\") {\n _parseFeature(obj, geocodeResponse);\n } else if (obj.type === \"SERVICE_ERROR\") {\n return _parseError(obj);\n } else {\n var mess = _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getMessage(\"SERVICE_RESPONSE_ANALYSE\", obj.type);\n throw new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__[\"default\"]({\n message : mess,\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__[\"default\"].TYPE_UNKERR,\n status : 200\n });\n }\n\n return geocodeResponse;\n }\n};\n\n/**\n * Méthode permettant de parser un feature\n *\n * @private\n *\n * @param {Object} feature\n * @param {Object} geocodeResponse\n *\n * @memberof GeocodeResponseParser\n * @return {Object} objet GeocodedLocation\n */\nfunction _parseFeature (feature, geocodeResponse) {\n var location = new _Response_model_GeocodedLocation__WEBPACK_IMPORTED_MODULE_3__[\"default\"]();\n if (feature.geometry && feature.geometry.type === \"Point\") {\n location.position = {\n lon : feature.geometry.coordinates[0],\n lat : feature.geometry.coordinates[1]\n };\n }\n if (feature.properties) {\n for (var prop in feature.properties) {\n if (prop === \"_score\") {\n location.accuracy = feature.properties[prop];\n } else if (prop === \"_type\") {\n if (feature.properties[prop] === \"address\") {\n location.type = \"StreetAddress\";\n } else if (feature.properties[prop] === \"poi\") {\n location.type = \"PositionOfInterest\";\n } else if (feature.properties[prop] === \"parcel\") {\n location.type = \"CadastralParcel\";\n }\n } else {\n location.placeAttributes[prop] = feature.properties[prop];\n }\n }\n if (feature.properties._type === \"address\") {\n location.matchType = feature.properties.number !== undefined && feature.properties.number !== null ? \"street number\" : \"street\";\n }\n }\n geocodeResponse.locations.push(location);\n}\n\n/**\n * Méthode permettant de parser une erreur\n *\n * @private\n *\n * @param {Object} error\n *\n * @memberof GeocodeResponseParser\n * @return {Object}\n */\nfunction _parseError (error) {\n return {\n exceptionReport : error\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (GeocodeResponseParser);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9Gb3JtYXRzL0dlb2NvZGVSZXNwb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ICAgaWYgKGZlYXR1cmUucHJvcGVydGllcykge1xuICAgICAgICBmb3IgKHZhciBwcm9wIGluIGZlYXR1cmUucHJvcGVydGllcykge1xuICAgICAgICAgICAgaWYgKHByb3AgPT09IFwiX3Njb3JlXCIpIHtcbiAgICAgICAgICAgICAgICBsb2NhdGlvbi5hY2N1cmFjeSA9IGZlYXR1cmUucHJvcGVydGllc1twcm9wXTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocHJvcCA9PT0gXCJfdHlwZVwiKSB7XG4gICAgICAgICAgICAgICAgaWYgKGZlYXR1cmUucHJvcGVydGllc1twcm9wXSA9PT0gXCJhZGRyZXNzXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24udHlwZSA9IFwiU3RyZWV0QWRkcmVzc1wiO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZmVhdHVyZS5wcm9wZXJ0aWVzW3Byb3BdID09PSBcInBvaVwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLnR5cGUgPSBcIlBvc2l0aW9uT2ZJbnRlcmVzdFwiO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZmVhdHVyZS5wcm9wZXJ0aWVzW3Byb3BdID09PSBcInBhcmNlbFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLnR5cGUgPSBcIkNhZGFzdHJhbFBhcmNlbFwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbG9jYXRpb24ucGxhY2VBdHRyaWJ1dGVzW3Byb3BdID0gZmVhdHVyZS5wcm9wZXJ0aWVzW3Byb3BdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChmZWF0dXJlLnByb3BlcnRpZXMuX3R5cGUgPT09IFwiYWRkcmVzc1wiKSB7XG4gICAgICAgICAgICBsb2NhdGlvbi5tYXRjaFR5cGUgPSBmZWF0dXJlLnByb3BlcnRpZXMubnVtYmVyICE9PSB1bmRlZmluZWQgJiYgZmVhdHVyZS5wcm9wZXJ0aWVzLm51bWJlciAhPT0gbnVsbCA/IFwic3RyZWV0IG51bWJlclwiIDogXCJzdHJlZXRcIjtcbiAgICAgICAgfVxuICAgIH1cbiAgICBnZW9jb2RlUmVzcG9uc2UubG9jYXRpb25zLnB1c2gobG9jYXRpb24pO1xufVxuXG4vKipcbiAqIE3DqXRob2RlIHBlcm1ldHRhbnQgZGUgcGFyc2VyIHVuZSBlcnJldXJcbiAqXG4gKiBAcHJpdmF0ZVxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBlcnJvclxuICpcbiAqIEBtZW1iZXJvZiBHZW9jb2RlUmVzcG9uc2VQYXJzZXJcbiAqIEByZXR1cm4ge09iamVjdH1cbiAqL1xuZnVuY3Rpb24gX3BhcnNlRXJyb3IgKGVycm9yKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgZXhjZXB0aW9uUmVwb3J0IDogZXJyb3JcbiAgICB9O1xufVxuXG5leHBvcnQgZGVmYXVsdCBHZW9jb2RlUmVzcG9uc2VQYXJzZXI7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/Formats/GeocodeResponseParser.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Geocode/Geocode.js": +/*!***************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Geocode/Geocode.js ***! + \***************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Request/GeocodeRequestFactory */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestFactory.js\");\n/* harmony import */ var _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Response/GeocodeResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Response/GeocodeResponseFactory.js\");\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service de géocodage direct du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n *\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Geocode\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String|Object} options.query - Nom de l'adresse, du toponyme, de l'unité administrative ou de la parcelle cadastrale recherchée.\n *\n * @param {Object} [options.filters] - Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {String} [options.filters.[prop]] - Critère supplémentaire pour filtrer la recherche sous la forme\n * d'un couple clé/valeur à définir selon les possibilités du serveur ajouté à la requête.\n * Le service de géocodage du Géoportail permet de filtrer les adresses postales avec les propriétés :\n * \"postalCode\", \"inseeCode\", \"city\".\n * Il permet également de filtrer les toponymes avec les propriétés :\n * \"postalCode\", \"inseeCode\", \"type\".\n * Enfin, il permet de filtrer les parcelles cadastrales avec les propriétés :\n * \"codeDepartement\", \"codeCommune\", \"nomCommune\", \"codeCommuneAbs\", \"codeArrondissement\", \"section\", \"numero\", \"feuille\".\n *\n * @param {String} [options.index = \"StreetAddress\"] - Type de l'objet recherché.\n * Le service de géocodage du Géoportail permet de rechercher des 'PositionOfInterest' pour des toponymes, des 'StreetAddress'\n * pour des adresses postales ou des 'CadastralParcel' pour des parcelles cadastrales.\n * L'index 'location' regroupe les indexes 'StreetAddress' et 'PositionOfInterest'.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, index = 'StreetAddress'.\n *\n * @param {Object} options.position - Position du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs.\n * @param {Float} options.position.lon - Longitude du point de référence pour le calcul de proximité.\n * @param {Float} options.position.lat - Latitude du point de référence pour le calcul de proximité.\n *\n * @param {Number} [options.maximumResponses] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut.\n * Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 20.\n *\n * @param {Boolean} [options.returnTrueGeometry = false] - Booléen indiquant si l'on souhaite récupérer la géométrie vraie des objects géolocalisés.\n * false par défaut.\n *\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * proxyURL : null,\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * position : {lon:, lat:},\n * index : 'StreetAddress',\n * query : '10 rue du pont Machin-ville'\n * (...)\n * };\n */\nfunction Geocode (options_) {\n if (!(this instanceof Geocode)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Geocode\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"Geocode\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.Geocode\");\n this.logger.trace(\"[Constructeur Geocode (options)]\");\n\n var options = this.patchOptionConvertor(options_);\n options.serverUrl = options.serverUrl || \"https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/search\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, [options]);\n\n if (!options.hasOwnProperty(\"query\")) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"query\"));\n }\n\n // ajout des options spécifiques au service\n this.options.query = options.query;\n\n // on definit l'index par defaut\n if (!options.index) {\n this.options.index = options.index = \"StreetAddress\";\n }\n\n if (options.filters) {\n var filter = Object.keys(options.filters);\n for (var i = 0; i < filter.length; i++) {\n var key = filter[i];\n // on supprime les filtres vides\n if (typeof options.filters[key] === \"undefined\" ||\n (typeof options.filters[key] === \"object\" && Object.keys(options.filters[key]).length === 0) ||\n (typeof options.filters[key] === \"string\" && options.filters[key].length === 0) ||\n (Array.isArray(options.filters[key]) && options.filters[key].length === 0)\n ) {\n delete this.options.filters[key];\n }\n }\n }\n\n this.options.index = options.index || \"StreetAddress\";\n this.options.maximumResponses = options.maximumResponses || 20;\n}\n\n/**\n * @lends module:Geocode#\n */\nGeocode.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nGeocode.prototype.constructor = Geocode;\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Object} options_ - options du service\n * @return {Object} - options\n */\nGeocode.prototype.patchOptionConvertor = function (options_) {\n const options = options_;\n\n if (options.hasOwnProperty(\"location\")) {\n this.logger.warn(\"The parameter 'location' is deprecated\");\n\n if (!options.query) {\n options.query = options.location;\n }\n delete options.location;\n }\n\n if (options.filterOptions) {\n this.logger.warn(\"The parameter 'filterOptions' is deprecated\");\n\n if (!options.filters) {\n options.filters = options.filterOptions;\n\n if (options.filters.type) {\n this.logger.warn(\"The parameter 'filterOptions.type' is deprecated\");\n if (!options.index) {\n if (Array.isArray(options.filters.type) && options.filters.type.length > 0) {\n options.index = options.filters.type[0];\n } else {\n options.index = options.filters.type;\n }\n }\n delete options.filters.type;\n }\n\n if (options.filters.bbox) {\n this.logger.warn(\"The parameter 'filterOptions.bbox' is deprecated\");\n delete options.filters.bbox;\n }\n }\n delete options.filterOptions;\n }\n\n if (options.position) {\n if (options.position.x) {\n this.logger.warn(\"The parameter 'position.x' is deprecated\");\n\n if (!options.position.lon) {\n options.position.lon = options.position.x;\n }\n delete options.position.x;\n }\n\n if (options.position.y) {\n this.logger.warn(\"The parameter 'position.y' is deprecated\");\n\n if (!options.position.lat) {\n options.position.lat = options.position.y;\n }\n delete options.position.y;\n }\n }\n\n if (options.returnFreeForm) {\n this.logger.warn(\"The parameter 'returnFreeForm' is deprecated\");\n delete options.returnFreeForm;\n }\n\n if (options.srs) {\n this.logger.warn(\"The parameter 'srs' is deprecated\");\n delete options.srs;\n }\n\n return options;\n};\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nGeocode.prototype.buildRequest = function (error, success) {\n var options = {\n httpMethod : this.options.httpMethod,\n // options specifiques du service\n geocodeMethod : \"search\",\n query : this.options.query,\n index : this.options.index,\n returnTrueGeometry : this.options.returnTrueGeometry,\n position : this.options.position,\n maxResp : this.options.maximumResponses,\n filters : this.options.filters\n };\n\n this.request = _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__[\"default\"].build(options);\n\n // on teste si la requete a bien été construite !\n (!this.request)\n ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * Analyse de la reponse (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nGeocode.prototype.analyzeResponse = function (error, success) {\n /* INFO :\n Etape 1 : Création de la requête (URL)\n -> stockage de la requête dans this.request\n Etape 2 : Envoi de la requête\n -> appel du protocol XHR, et envoi (par ex send ())\n -> récupération de la réponse JSON dans la fonction onSuccess () (this.response)\n -> si code HTTP 200 et pas de message d'erreur : etape 3\n -> si code HTTP != 200 : lancement de la fonction de callback onFailure avec le message d'erreur\n Etape 3 : Analyse de la réponse JSON (si rawResponse === false )\n -> appel du parser pour récupérer le document\n Etape 4 : Lancement de la fonction de callback onSuccess avec la réponse :\n -> JSON (si rawResponse === true)\n -> ou geocodedLocations\n */\n\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Geocode);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9HZW9jb2RlLmpzP2Q1NWQiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBaUQ7QUFDSDtBQUNXO0FBQ1o7QUFDdUI7QUFDRzs7QUFFdkU7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFD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5cbiAgICBpZiAob3B0aW9ucy5maWx0ZXJPcHRpb25zKSB7XG4gICAgICAgIHRoaXMubG9nZ2VyLndhcm4oXCJUaGUgcGFyYW1ldGVyICdmaWx0ZXJPcHRpb25zJyBpcyBkZXByZWNhdGVkXCIpO1xuXG4gICAgICAgIGlmICghb3B0aW9ucy5maWx0ZXJzKSB7XG4gICAgICAgICAgICBvcHRpb25zLmZpbHRlcnMgPSBvcHRpb25zLmZpbHRlck9wdGlvbnM7XG5cbiAgICAgICAgICAgIGlmIChvcHRpb25zLmZpbHRlcnMudHlwZSkge1xuICAgICAgICAgICAgICAgIHRoaXMubG9nZ2VyLndhcm4oXCJUaGUgcGFyYW1ldGVyICdmaWx0ZXJPcHRpb25zLnR5cGUnIGlzIGRlcHJlY2F0ZWRcIik7XG4gICAgICAgICAgICAgICAgaWYgKCFvcHRpb25zLmluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KG9wdGlvbnMuZmlsdGVycy50eXBlKSAmJiBvcHRpb25zLmZpbHRlcnMudHlwZS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmluZGV4ID0gb3B0aW9ucy5maWx0ZXJzLnR5cGVbMF07XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmluZGV4ID0gb3B0aW9ucy5maWx0ZXJzLnR5cGU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZGVsZXRlIG9wdGlvbnMuZmlsdGVycy50eXBlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAob3B0aW9ucy5maWx0ZXJzLmJib3gpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmxvZ2dlci53YXJuKFwiVGhlIHBhcmFtZXRlciAnZmlsdGVyT3B0aW9ucy5iYm94JyBpcyBkZXByZWNh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SB7XG4gICAgICAgIGVycm9yLmNhbGwodGhpcywgbmV3IEVycm9yU2VydmljZShfLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgR2VvY29kZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/Geocode.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestFactory.js": +/*!*************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestFactory.js ***! + \*************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _GeocodeRequestREST__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeocodeRequestREST */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestREST.js\");\n\n\n\n/**\n * Creation d'une requête\n * (Factory)\n *\n * @module GeocodeRequestFactory\n * @alias Gp.Services.Geocode.Request.GeocodeRequestFactory\n * @private\n */\nvar GeocodeRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Geocode\n *\n * @example\n * var options = {\n * // options specifiques du service\n * geocodeMethod:\n * query:\n * filters:\n * maximumResponses:\n * };\n * var result = GeocodeRequestFactory.build(options);\n * if (!result) {\n * // error...\n * }\n * @returns {String} request\n */\n build : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"GeocodeRequestFactory\");\n logger.trace([\"GeocodeRequestFactory::build()\"]);\n\n var settings = options || {};\n\n var myReq = new _GeocodeRequestREST__WEBPACK_IMPORTED_MODULE_1__[\"default\"](settings);\n if (!myReq.processRequestString()) {\n throw new Error(\"Error process request (rest) !\");\n }\n var request = myReq.requestString;\n\n logger.trace(request);\n\n return request;\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (GeocodeRequestFactory);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9SZXF1ZXN0L0dlb2NvZGVSZXF1ZXN0RmFjdG9yeS5qcz8xNTMzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFvRDtBQUNFOztBQUV0RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsT0FBTztBQUN0QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGlCQUFpQixPQUFPO0FBQ3hCO0FBQ0E7QUFDQTtBQUNBLHFCQUFxQiw4REFBTTtBQUMzQjs7QUFFQTs7QUFFQSx3QkFBd0IsMkRBQWtCO0FBQzFDO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFZSxvRkFBcUIsRUFBQyIsImZpbGUiOiIuL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9SZXF1ZXN0L0dlb2NvZGVSZXF1ZXN0R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vci4uLlxuICAgICAqICAgfVxuICAgICAqIEByZXR1cm5zIHtTdHJpbmd9IHJlcXVlc3RcbiAgICAgKi9cbiAgICBidWlsZCA6IGZ1bmN0aW9uIChvcHRpb25zKSB7XG4gICAgICAgIC8vIGxvZ2dlclxuICAgICAgICB2YXIgbG9nZ2VyID0gTG9nZ2VyLmdldExvZ2dlcihcIkdlb2NvZGVSZXF1ZXN0RmFjdG9yeVwiKTtcbiAgICAgICAgbG9nZ2VyLnRyYWNlKFtcIkdlb2NvZGVSZXF1ZXN0RmFjdG9yeTo6YnVpbGQoKVwiXSk7XG5cbiAgICAgICAgdmFyIHNldHRpbmdzID0gb3B0aW9ucyB8fCB7fTtcblxuICAgICAgICB2YXIgbXlSZXEgPSBuZXcgR2VvY29kZVJlcXVlc3RSRVNUKHNldHRpbmdzKTtcbiAgICAgICAgaWYgKCFteVJlcS5wcm9jZXNzUmVxdWVzdFN0cmluZygpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJFcnJvciBwcm9jZXNzIHJlcXVlc3QgKHJlc3QpICFcIik7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHJlcXVlc3QgPSBteVJlcS5yZXF1ZXN0U3RyaW5nO1xuXG4gICAgICAgIGxvZ2dlci50cmFjZShyZXF1ZXN0KTtcblxuICAgICAgICByZXR1cm4gcmVxdWVzdDtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBHZW9jb2RlUmVxdWVzdEZhY3Rvcnk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestFactory.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestREST.js": +/*!**********************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestREST.js ***! + \**********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _model_GeocodeParamREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./model/GeocodeParamREST */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Request/model/GeocodeParamREST.js\");\n\n\n\n\n\n/**\n * @classdesc\n * Classe de gestion des requêtes de type REST sur le service de calcul d'itineraire\n * (uniquement en GET)\n *\n * @constructor\n * @alias Gp.Services.Geocode.Request.GeocodeRequestREST\n * @param {Object} options - options definies dans le composant Route\n *\n * @example\n * var options = {\n * (...)\n * };\n *\n * @private\n */\nfunction GeocodeRequestREST (options) {\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"GeocodeRequestREST\");\n this.logger.trace(\"[Constructeur GeocodeRequestREST ()]\");\n\n if (!(this instanceof GeocodeRequestREST)) {\n throw new TypeError(\"GeocodeRequestREST constructor cannot be called as a function.\");\n }\n\n // existance des options\n if (!options) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n /** liste des options */\n this.settings = options;\n}\n\nGeocodeRequestREST.prototype = {\n\n /**\n * @lends module:GeocodeRequestREST#\n */\n\n /**\n * request\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : GeocodeRequestREST,\n\n /**\n * Construction de la requête.\n *\n * @returns {String} request\n */\n processRequestString : function () {\n var request = \"\";\n\n // Mapping des options avec le service de l'API REST\n const oParams = new _model_GeocodeParamREST__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.settings);\n\n const params = oParams.getParams();\n for (var i = 0; i < params.length; i++) {\n var o = params[i];\n if (request) {\n request += \"&\";\n }\n request += o.k + \"=\" + o.v;\n }\n\n if (!this.settings.geocodeMethod || (this.settings.geocodeMethod !== \"search\" && this.settings.geocodeMethod !== \"reverse\")) {\n throw new Error(\"Error geocodeMethod not valid\");\n }\n\n this.requestString = \"?\" + request;\n this.logger.trace(this.requestString);\n\n return this.requestString;\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (GeocodeRequestREST);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9SZXF1ZXN0L0dlb2NvZGVSZXF1ZXN0UkVTVC5qcz8yZTM5Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQ29EO0FBQ0g7QUFDTzs7QUFFeEQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esa0JBQWtCLDhEQUFNO0FBQ3hCOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0Esd0JBQXdCLGdFQUFDO0FBQ3pCOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLGNBQWM7QUFDZDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLGlCQUFpQixPQUFPO0FBQ3h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P1wiICsgcmVxdWVzdDtcbiAgICAgICAgdGhpcy5sb2dnZXIudHJhY2UodGhpcy5yZXF1ZXN0U3RyaW5nKTtcblxuICAgICAgICByZXR1cm4gdGhpcy5yZXF1ZXN0U3RyaW5nO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEdlb2NvZGVSZXF1ZXN0UkVTVDtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestREST.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Geocode/Request/model/GeocodeParamREST.js": +/*!**************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Geocode/Request/model/GeocodeParamREST.js ***! + \**************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n\n\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes du service de calcul d'itineraire (REST).\n * Permet le mapping avec les options du service.\n * @constructor\n * @alias Gp.Services.Route.Request.RouteParamREST\n * @param {Object} options - options\n *\n * @private\n */\nfunction GeocodeParamREST (options) {\n if (!(this instanceof GeocodeParamREST)) {\n throw new TypeError(\"GeocodeParamREST constructor cannot be called as a function.\");\n }\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur GeocodeParamREST ()]\");\n\n /**\n * Options en paramêtres du constructeur.\n */\n this.options = options || {};\n\n // methode de geocodage\n if (!this.options.geocodeMethod || (this.options.geocodeMethod !== \"search\" && this.options.geocodeMethod !== \"reverse\")) {\n throw new Error(\"Error geocodeMethod not valid\");\n }\n this.geocodeMethod = this.options.geocodeMethod;\n\n // mapping des options avec l'API REST\n this.query = (typeof this.options !== \"undefined\") ? this.options.query : null;\n\n this.searchGeometry = this.options.searchGeometry || null;\n\n this.index = this.options.index || null;\n\n this.lon = this.options.position && this.options.position.lon ? this.options.position.lon : null;\n\n this.lat = this.options.position && this.options.position.lat ? this.options.position.lat : null;\n\n this.maxResp = this.options.maxResp || null;\n\n this.returnTrueGeometry = this.options.returnTrueGeometry || null;\n\n this.filters = this.options.filters || {};\n}\n\n/**\n * CLASSNAME\n */\nGeocodeParamREST.CLASSNAME = \"GeocodeParamREST\";\n\nGeocodeParamREST.prototype = {\n\n /**\n * @lends module:GeocodeParamREST#\n */\n\n /**\n * Constructeur (alias)\n */\n constructor : GeocodeParamREST,\n\n /**\n * Retourne les filtres\n * @returns {String} les filtres\n */\n getFilters : function () {\n var filters = {};\n for (var prop in this.filters) {\n if (this.filters.hasOwnProperty(prop)) {\n filters[prop] = this.filters[prop];\n }\n }\n return filters;\n },\n\n /**\n * Retourne l'index\n * @returns {String} l'index\n */\n getIndex : function () {\n if (this.index === undefined) {\n return null;\n }\n if (this.index === \"StreetAddress\") {\n return \"address\";\n } else if (this.index === \"CadastralParcel\") {\n return \"parcel\";\n } else if (this.index === \"PositionOfInterest\") {\n return \"poi\";\n } else if (this.index === \"location\") {\n return \"location\";\n }\n return this.index;\n },\n\n /**\n * Retourne la géométrie de recherche\n * @returns {String} la géométrie de recherche au format json\n */\n getSearchGeometry : function () {\n return JSON.stringify(this.searchGeometry);\n }\n};\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Array} liste de paramêtres\n */\nGeocodeParamREST.prototype.getParams = function () {\n var map = [];\n\n if (this.geocodeMethod === \"search\") {\n map.push({\n k : \"q\",\n v : this.query\n });\n }\n\n if (this.index) {\n map.push({\n k : \"index\",\n v : this.getIndex()\n });\n }\n\n if (this.geocodeMethod === \"reverse\" && this.searchGeometry) {\n map.push({\n k : \"searchgeom\",\n v : this.getSearchGeometry()\n });\n }\n\n if (this.lon && this.lat) {\n map.push({\n k : \"lon\",\n v : this.lon\n });\n map.push({\n k : \"lat\",\n v : this.lat\n });\n }\n\n if (this.maxResp) {\n map.push({\n k : \"limit\",\n v : this.maxResp\n });\n }\n\n if (this.returnTrueGeometry) {\n map.push({\n k : \"returntruegeometry\",\n v : this.returnTrueGeometry\n });\n }\n\n const filters = this.getFilters();\n for (var key in filters) {\n map.push({\n k : key,\n v : filters[key]\n });\n }\n\n return map;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (GeocodeParamREST);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9SZXF1ZXN0L21vZGVsL0dlb2NvZGVQYXJhbVJFU1QuanM/MjUyMyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDdUQ7O0FBRXZEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxrQkFBa0IsOERBQU07QUFDeEI7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxpQkFBaUIsT0FBTztBQUN4QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQ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gICAgIGsgOiBcInFcIixcbiAgICAgICAgICAgIHYgOiB0aGlzLnF1ZXJ5XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGlmICh0aGlzLmluZGV4KSB7XG4gICAgICAgIG1hcC5wdXNoKHtcbiAgICAgICAgICAgIGsgOiBcImluZGV4XCIsXG4gICAgICAgICAgICB2IDogdGhpcy5nZXRJbmRleCgpXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGlmICh0aGlzLmdlb2NvZGVNZXRob2QgPT09IFwicmV2ZXJzZVwiICYmIHRoaXMuc2VhcmNoR2VvbWV0cnkpIHtcbiAgICAgICAgbWFwLnB1c2goe1xuICAgICAgICAgICAgayA6IFwic2VhcmNoZ2VvbVwiLFxuICAgICAgICAgICAgdiA6IHRoaXMuZ2V0U2VhcmNoR2VvbWV0cnkoKVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBpZiAodGhpcy5sb24gJiYgdGhpcy5sYXQpIHtcbiAgICAgICAgbWFwLnB1c2goe1xuICAgICAgICAgICAgayA6IFwibG9uXCIsXG4gICAgICAgICAgICB2IDogdGhpcy5sb25cbiAgICAgICAgfSk7XG4gICAgICAgIG1hcC5wdXNoKHtcbiAgICAgICAgICAgIGsgOiBcImxhdFwiLFxuICAgICAgICAgICAgdiA6IHRoaXMubGF0XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGlmICh0aGlzLm1heFJlc3ApIHtcbiAgICAgICAgbWFwLnB1c2goe1xuICAgICAgICAgICAgayA6IFwibGltaXRcIixcbiAgICAgICAgICAgIHYgOiB0aGlzLm1heFJlc3BcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMucmV0dXJuVHJ1ZUdlb21ldHJ5KSB7XG4gICAgICAgIG1hcC5wdXNoKHtcbiAgICAgICAgICAgIGsgOiBcInJldHVybnRydWVnZW9tZXRyeVwiLFxuICAgICAgICAgICAgdiA6IHRoaXMucmV0dXJuVHJ1ZUdlb21ldHJ5XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGNvbnN0IGZpbHRlcnMgPSB0aGlzLmdldEZpbHRlcnMoKTtcbiAgICBmb3IgKHZhciBrZXkgaW4gZmlsdGVycykge1xuICAgICAgICBtYXAucHVzaCh7XG4gICAgICAgICAgICBrIDoga2V5LFxuICAgICAgICAgICAgdiA6IGZpbHRlcnNba2V5XVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICByZXR1cm4gbWFwO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgR2VvY29kZVBhcmFtUkVTVDtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/Request/model/GeocodeParamREST.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Geocode/Response/GeocodeResponseFactory.js": +/*!***************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Geocode/Response/GeocodeResponseFactory.js ***! + \***************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Formats_GeocodeResponseParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Formats/GeocodeResponseParser */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Formats/GeocodeResponseParser.js\");\n/**\n * Factory pour générer une reponse JSON à partir d'un XML\n * (Factory)\n *\n * @module GeocodeResponseFactory\n * @alias Gp.Services.Geocode.Response.GeocodeResponseFactory\n * @private\n */\n// import Logger from \"../../../Utils/LoggerByDefault\";\n\n\n\n\nvar GeocodeReponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Geocode\n *\n * @example\n * var options = {\n * response :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // data de type GeocodeResponse\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n data = options.response;\n } else {\n try {\n const parser = new _Formats_GeocodeResponseParser__WEBPACK_IMPORTED_MODULE_2__[\"default\"]();\n data = parser.parse(options.response);\n\n if (!data) {\n throw new Error(\"L'analyse de la réponse du service !?\");\n }\n } catch (e) {\n var message = e.message;\n if (typeof options.response === \"string\") {\n message += \"('\" + options.response + \"')\";\n } else {\n message += \"('\" + options.response.documentElement.innerHTML + \"')\";\n }\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_ANALYSE\", message),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__[\"default\"].TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data.exceptionReport) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__[\"default\"].TYPE_SRVERR,\n status : 200 // FIXME : 200 ?\n }));\n return;\n }\n }\n } else {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\"),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__[\"default\"].TYPE_SRVERR,\n status : -1 // FIXME : status response\n }));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (GeocodeReponseFactory);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9SZXNwb25zZS9HZW9jb2RlUmVzcG9uc2VGYWN0b3J5LmpzPzliN2IiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDNEQ7QUFDUjtBQUNpQjs7QUFFckU7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsT0FBTztBQUN0QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLGFBQWE7QUFDYjtBQUNBLHVDQUF1QyxzRUFBcUI7QUFDNUQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsaUJBQWlCO0FBQ2pCO0FBQ0E7QUFDQTtBQUNBLHFCQUFxQjtBQUNyQjtBQUNBO0FBQ0EsNERBQTRELGdFQUFZO0FBQ3hFLGtDQUFrQyxnRUFBSTtBQUN0QywrQkFBK0IsZ0VBQVk7QUFDM0M7QUFDQSxxQkFBcUI7QUFDckI7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsNERBQTRELGdFQUFZO0FBQ3hFLGtDQUFrQ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YWN0b3J5ID0ge1xuXG4gICAgLyoqXG4gICAgICogaW50ZXJmYWNlIHVuaXF1ZVxuICAgICAqXG4gICAgICogQG1ldGhvZCBidWlsZFxuICAgICAqIEBzdGF0aWNcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb3B0aW9ucyAtIG9wdGlvbnMgZGVmaW5pZXMgZGFucyBsZSBjb21wb3NhbnQgR2VvY29kZVxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiAgIHZhciBvcHRpb25zID0ge1xuICAgICAqICAgICAgcmVzcG9uc2UgOlxuICAgICAqICAgICAgcmF3UmVzcG9uc2UgOlxuICAgICAqICAgICAgc2NvcGUgOlxuICAgICAqICAgICAgb25TdWNjZXNzIDpcbiAgICAgKiAgICAgIG9uRXJyb3IgOlxuICAgICAqICAgfTtcbiAgICAgKlxuICAgICAqL1xuICAgIGJ1aWxkIDogZnVuY3Rpb24gKG9wdGlvbnMpIHtcbiAgICAgICAgLy8gZGF0YSBkZSB0eXBlIEdlb2NvZGVSZXNwb25zZVxuICAgICAgICB2YXIgZGF0YSA9IG51bGw7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMucmVzcG9uc2UpIHtcbiAgICAgICAgICAgIGlmIChvcHRpb25zLnJhd1Jlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgZGF0YSA9IG9wdGlvbnMucmVzcG9uc2U7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhcnNlciA9IG5ldyBHZW9jb2RlUmVzcG9uc2VQYXJzZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IHBhcnNlci5wYXJzZShvcHRpb25zLnJlc3BvbnNlKTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkwnYW5hbHlzZSBkZSBsYSByw6lwb25zZSBkdSBzZXJ2aWNlICE/XCIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbWVzc2FnZSA9IGUubWVzc2FnZTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLnJlc3BvbnNlID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlICs9IFwiKCdcIiArIG9wdGlvbnMucmVzcG9uc2UgKyBcIicpXCI7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlICs9IFwiKCdcIiArIG9wdGlvbnMucmVzcG9uc2UuZG9jdW1lbnRFbGVtZW50LmlubmVySFRNTCArIFwiJylcIjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgOiBNUmVzLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0FOQUxZU0VcIiwgbWVzc2FnZSksXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogRXJyb3JTZXJ2aWNlLlRZUEVfVU5LRVJSLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzIDogLTFcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gU2kgbGEgcsOpcG9uc2UgY29udGVuYWl0IHVuZSBleGNlcHRpb24gcmVudm95w6llIHBhciBsZSBzZXJ2aWNlXG4gICAgICAgICAgICAgICAgaWYgKGRhdGEuZXhjZXB0aW9uUmVwb3J0KSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2Uoe1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA6IE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRVhDRVBUSU9OXCIsIGRhdGEuZXhjZXB0aW9uUmVwb3J0KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBFcnJvclNlcnZpY2UuVFlQRV9TUlZFUlIsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAyMDAgLy8gRklYTUUgOiAyMDAgP1xuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKHtcbiAgICAgICAgICAgICAgICBtZXNzYWdlIDogTVJlcy5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FTVBUWVwiKSxcbiAgICAgICAgICAgICAgICB0eXBlIDogRXJyb3JTZXJ2aWNlLlRZUEVfU1JWRVJSLFxuICAgICAgICAgICAgICAgIHN0YXR1cyA6IC0xIC8vIEZJWE1FIDogc3RhdHVzIHJlc3BvbnNlXG4gICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBvcHRpb25zLm9uU3VjY2Vzcy5jYWxsKG9wdGlvbnMuc2NvcGUsIGRhdGEpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEdlb2NvZGVSZXBvbnNlRmFjdG9yeTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/Response/GeocodeResponseFactory.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Geocode/Response/model/GeocodeResponse.js": +/*!**************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Geocode/Response/model/GeocodeResponse.js ***! + \**************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Response object for {@link module:Services~geocode Gp.Services.geocode ()} or {@link module:Services~reverseGeocode Gp.Services.reverseGeocode ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Array.} locations - locations array.\n *\n * @namespace\n * @alias Gp.Services.GeocodeResponse\n */\nfunction GeocodeResponse () {\n if (!(this instanceof GeocodeResponse)) {\n throw new TypeError(\"GeocodeResponse constructor cannot be called as a function.\");\n }\n\n this.locations = [];\n}\n\nGeocodeResponse.prototype = {\n\n constructor : GeocodeResponse\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (GeocodeResponse);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9SZXNwb25zZS9tb2RlbC9HZW9jb2RlUmVzcG9uc2UuanM/ZWE0NSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUNBO0FBQ0Esd0JBQXdCLHFEQUFxRCxLQUFLLG1FQUFtRTtBQUNySjtBQUNBLGNBQWMsNkNBQTZDO0FBQzNEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFZSw4RUFBZSxFQUFDIiwiZm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2VcblxufTtcblxuZXhwb3J0IGRlZmF1bHQgR2VvY29kZVJlc3BvbnNlO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/Response/model/GeocodeResponse.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Geocode/Response/model/GeocodedLocation.js": +/*!***************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Geocode/Response/model/GeocodedLocation.js ***! + \***************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Single location object returned by the underlying geocoding web service.\n *\n * @property {Gp.Point} position - Position of the location given in the requested coordinates system.\n * @property {String} type - location type \"StreetAddress\" (for an address), \"PositionOfInterest\" (for a place name) or \"CadastralParcel\" (for cadastral parcel).\n * @property {String} matchType - how geocoding is performed : \"street number\" (exact address), \"street enhanced\" (street number calculated by interpolation), \"street\" (only the street), \"city\" (only the city).\n * @property {Float} accuracy - Accuracy of the response towards the requested location between 0 (unaccurate) and 1 (exact match).\n * @property {Object} placeAttributes - Associative array matching the following attributes with their values given by the underlying web service :\n *\n * *Common attributes : *\n *\n * - **trueGeometry** - the 'real life' geometry if different from 'Point' type.\n *\n * *if type === \"StreetAddress\" :*\n *\n * - **number** - Street number.\n * - **postalCode** - PostCode\n * - **street** - Street name\n * - **city** - City\n * - **houseNumberInfos** - additional street number information\n * - **inseeCode** - INSEE Code\n *\n *\n * *if type === \"PositionOfInterest\" :*\n *\n * - **type** - Place name type\n * - **postalCode** - PostCode\n * - **toponyme** - Toponyme\n * - **extraFields** - additional place name properties\n * - **inseeCode** - INSEE Code\n *\n *\n * *si type = \"CadastralParcel\" :*\n *\n * - **codeCommuneAbs** - when a parcel comes from a city that was absorbed by another, code of that old city. \"000\" otherwise.\n * - **codeArrondissement** - arrondissement\n * - **identifiant** - cadastral parcel code\n * - **feuille** - Parcel Sheet (eg. \"1\").\n * - **numero** - Parcel Number (eg. \"0041\")\n * - **section** - Parcel Section (eg. \"0D\").\n * - **nomCommune** - Parcel municipality name.\n * - **codeCommune** - Parcel municipality.\n * - **codeDepartement** - Parcel Department.\n *\n * @namespace\n * @alias Gp.Services.Geocode.GeocodedLocation\n */\nfunction GeocodedLocation () {\n if (!(this instanceof GeocodedLocation)) {\n throw new TypeError(\"GeocodedLocation constructor cannot be called as a function.\");\n }\n\n this.position = null;\n\n this.matchType = null;\n\n this.placeAttributes = {};\n\n this.type = null;\n\n this.accuracy = null;\n\n /**\n * Nom de la classe : \"GeocodedLocation\"\n * @type {String}\n */\n this.CLASSNAME = \"GeocodedLocation\";\n}\n\nGeocodedLocation.prototype = {\n\n constructor : GeocodedLocation\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (GeocodedLocation);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9SZXNwb25zZS9tb2RlbC9HZW9jb2RlZExvY2F0aW9uLmpzPzc2ZDEiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQTtBQUNBO0FBQ0E7QUFDQSxjQUFjLFNBQVM7QUFDdkIsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixjQUFjLE1BQU07QUFDcEIsY0FBYyxPQUFPO0FBQ3JCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQT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2RlLkdlb2NvZGVkTG9jYXRpb25cbiAqL1xuZnVuY3Rpb24gR2VvY29kZWRMb2NhdGlvbiAoKSB7XG4gICAgaWYgKCEodGhpcyBpbnN0YW5jZW9mIEdlb2NvZGVkTG9jYXRpb24pKSB7XG4gICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJHZW9jb2RlZExvY2F0aW9uIGNvbnN0cnVjdG9yIGNhbm5vdCBiZSBjYWxsZWQgYXMgYSBmdW5jdGlvbi5cIik7XG4gICAgfVxuXG4gICAgdGhpcy5wb3NpdGlvbiA9IG51bGw7XG5cbiAgICB0aGlzLm1hdGNoVHlwZSA9IG51bGw7XG5cbiAgICB0aGlzLnBsYWNlQXR0cmlidXRlcyA9IHt9O1xuXG4gICAgdGhpcy50eXBlID0gbnVsbDtcblxuICAgIHRoaXMuYWNjdXJhY3kgPSBudWxsO1xuXG4gICAgLyoqXG4gICAgICogTm9tIGRlIGxhIGNsYXNzZSA6IFwiR2VvY29kZWRMb2NhdGlvblwiXG4gICAgICogQHR5cGUge1N0cmluZ31cbiAgICAgKi9cbiAgICB0aGlzLkNMQVNTTkFNRSA9IFwiR2VvY29kZWRMb2NhdGlvblwiO1xufVxuXG5HZW9jb2RlZExvY2F0aW9uLnByb3RvdHlwZSA9IHtcblxuICAgIGNvbnN0cnVjdG9yIDogR2VvY29kZWRMb2NhdGlvblxuXG59O1xuXG5leHBvcnQgZGVmYXVsdCBHZW9jb2RlZExvY2F0aW9uO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/Response/model/GeocodedLocation.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js ***! + \**********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Request/GeocodeRequestFactory */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestFactory.js\");\n/* harmony import */ var _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Response/GeocodeResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Response/GeocodeResponseFactory.js\");\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service de géocodage inverse du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.ReverseGeocode\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {Object} options.position - Position du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs.\n * @param {Float} options.position.lon - Longitude du point de référence pour le calcul de proximité.\n * @param {Float} options.position.lat - Latitude du point de référence pour le calcul de proximité.\n *\n * @param {Object} [options.filters] - Les propriétés possibles de cet objet.\n * @param {String} [options.filters.[proprietes du filtre]] - Critère supplémentaire pour filtrer la recherche sous la forme\n * d'un couple clé/valeur à définir selon les possibilités du serveur ajouté à la requête.\n * Le service de géocodage du Géoportail permet de filtrer les adresses postales avec les propriétés :\n * \"postalCode\", \"inseeCode\", \"city\".\n * Il permet également de filtrer les toponymes avec les propriétés :\n * \"postalCode\", \"inseeCode\", \"type\".\n * Enfin, il permet de filtrer les parcelles cadastrales avec les propriétés :\n * \"codeDepartement\", \"codeCommune\", \"nomCommune\", \"codeCommuneAbs\", \"codeArrondissement\", \"section\", \"numero\", \"feuille\".\n *\n * @param {Object} [options.searchGeometry] - Emprise dans laquelle on souhaite effectuer la recherche.\n * Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {String} options.searchGeometry.type - Type de géometrie (Point|Circle|Linestring|Polygon)\n * @param {Array.|Array.Array.} options.searchGeometry.coordinates - Coordonnées des points constituant la géométrie.\n * @param {Float} options.searchGeometry.radius - Rayon. Paramètre applicable uniquement pour le type 'Circle'.\n *\n * @param {String} [options.index = \"StreetAddress\"] - Type de l'objet recherché.\n * Le service de géocodage du Géoportail permet de rechercher des 'PositionOfInterest' pour des toponymes, des 'StreetAddress'\n * pour des adresses postales ou des 'CadastralParcel' pour des parcelles cadastrales. L'index 'location' permet une recherche\n * multi-indexes en regroupant les indexes 'PositionOfInterest' et 'StreetAddress'.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, index = 'StreetAddress'.\n *\n * @param {Number} [options.maximumResponses] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 20s.\n *\n * @param {Boolean} [options.returnTrueGeometry] - Booléen indiquant si l'on souhaite récupérer la géométrie vraie des objects géolocalisés.\n * false par défaut.\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * proxyURL : null,\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * index : 'StreetAddress',\n * searchGeometry : {\n * type : Circle,\n * coordinates : [48, 2],\n * radius : 100\n * },\n * position : {lon:2 , lat:48.5},\n * maximumResponses : 25,\n * };\n *\n */\nfunction ReverseGeocode (options_) {\n if (!(this instanceof ReverseGeocode)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"ReverseGeocode\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"ReverseGeocode\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.ReverseGeocode\");\n this.logger.trace(\"[Constructeur ReverseGeocode (options)]\");\n\n var options = this.patchOptionConvertor(options_);\n options.serverUrl = options.serverUrl || \"https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/reverse\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, [options]);\n\n if (!options.searchGeometry) {\n if (!options.position) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"searchGeometry\"));\n }\n } else {\n this.options.searchGeometry = options.searchGeometry;\n }\n\n // on definit l'index par defaut\n if (!options.index) {\n this.options.index = options.index = \"StreetAddress\";\n }\n\n if (options.filters) {\n var filter = Object.keys(options.filters);\n for (var i = 0; i < filter.length; i++) {\n var key = filter[i];\n // on supprime les filtres vides\n if (typeof options.filters[key] === \"undefined\" ||\n (typeof options.filters[key] === \"object\" && Object.keys(options.filters[key]).length === 0) ||\n (typeof options.filters[key] === \"string\" && options.filters[key].length === 0) ||\n (Array.isArray(options.filters[key]) && options.filters[key].length === 0)\n ) {\n delete this.options.filters[key];\n }\n }\n }\n\n this.options.position = options.position;\n this.options.index = options.index || \"StreetAddress\";\n this.options.maximumResponses = options.maximumResponses || 20;\n}\n\n/**\n * @lends module:ReverseGeocode#\n */\nReverseGeocode.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nReverseGeocode.prototype.constructor = ReverseGeocode;\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Object} options_ - options du service\n * @return {Object} - options\n */\nReverseGeocode.prototype.patchOptionConvertor = function (options_) {\n var options = options_;\n\n if (options.filterOptions) {\n this.logger.warn(\"The parameter 'filterOptions' is deprecated\");\n\n if (options.filterOptions.type) {\n this.logger.warn(\"The parameter 'filterOptions.type' is deprecated\");\n if (!options.index) {\n if (Array.isArray(options.filterOptions.type) && options.filterOptions.type.length > 0) {\n options.index = options.filterOptions.type[0];\n } else {\n options.index = options.filterOptions.type;\n }\n }\n delete options.filterOptions.type;\n }\n\n if (options.filterOptions.bbox) {\n this.logger.warn(\"The parameter 'filterOptions.bbox' is deprecated\");\n if (!options.searchGeometry) {\n // convertir la geometrie\n options.searchGeometry = this.bbox2Json(options.filterOptions.bbox);\n }\n delete options.filterOptions.bbox;\n }\n\n if (options.filterOptions.circle) {\n this.logger.warn(\"The parameter 'filterOptions.circle' is deprecated\");\n if (!options.searchGeometry) {\n // convertir la geometrie\n options.searchGeometry = this.circle2Json(options.filterOptions.circle);\n }\n delete options.filterOptions.circle;\n }\n\n if (options.filterOptions.polygon) {\n this.logger.warn(\"The parameter 'filterOptions.polygon' is deprecated\");\n if (!options.searchGeometry) {\n // convertir la geometrie\n options.searchGeometry = this.polygon2Json(options.filterOptions.polygon);\n }\n delete options.filterOptions.polygon;\n }\n\n if (!options.filters && Object.keys(options.filterOptions).length > 0) {\n options.filters = options.filterOptions;\n }\n\n delete options.filterOptions;\n }\n\n if (options.position) {\n if (options.position.x) {\n this.logger.warn(\"The parameter 'position.x' is deprecated\");\n\n if (!options.position.lon) {\n options.position.lon = options.position.x;\n }\n delete options.position.x;\n }\n\n if (options.position.y) {\n this.logger.warn(\"The parameter 'position.y' is deprecated\");\n\n if (!options.position.lat) {\n options.position.lat = options.position.y;\n }\n delete options.position.y;\n }\n }\n\n if (options.srs) {\n this.logger.warn(\"The parameter 'srs' is deprecated\");\n delete options.srs;\n }\n\n return options;\n};\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nReverseGeocode.prototype.buildRequest = function (error, success) {\n var options = {\n httpMethod : this.options.httpMethod,\n // options specifiques du service\n geocodeMethod : \"reverse\",\n searchGeometry : this.options.searchGeometry,\n index : this.options.index,\n position : this.options.position,\n returnTrueGeometry : this.options.returnTrueGeometry,\n maxResp : this.options.maximumResponses,\n filters : this.options.filters\n };\n\n this.request = _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__[\"default\"].build(options);\n\n // on teste si la requete a bien été construite !\n (!this.request)\n ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nReverseGeocode.prototype.analyzeResponse = function (error, success) {\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Array} bbox - bbox\n * @return {Object} - geometrie au format json\n */\nReverseGeocode.prototype.bbox2Json = function (bbox) {\n return {\n type : \"Polygon\",\n coordinates : [[\n [bbox.left, bbox.top],\n [bbox.right, bbox.top],\n [bbox.right, bbox.bottom],\n [bbox.left, bbox.bottom],\n [bbox.left, bbox.top]\n ]]\n };\n};\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Object} circle - circle\n * @return {Object} - geometrie au format json\n */\nReverseGeocode.prototype.circle2Json = function (circle) {\n return {\n type : \"Circle\",\n radius : circle.radius,\n coordinates : [circle.x, circle.y]\n };\n};\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Array} polygon - polygon\n * @return {Object} - geometrie au format json\n */\nReverseGeocode.prototype.polygon2Json = function (polygon) {\n var jsonGeom = {\n type : \"Polygon\",\n coordinates : [[]]\n };\n\n for (var i = 0; i < polygon.length; ++i) {\n jsonGeom.coordinates[0].push([polygon[i].x, polygon[i].y]);\n }\n\n return jsonGeom;\n};\n\n/**\n * Codes EPSG géographiques (lat/lon). Utiles car les coordonnées doivent être inversées.\n */\nReverseGeocode.geoEPSG = [\"EPSG:4326\"];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ReverseGeocode);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9SZXZlcnNlR2VvY29kZS5qcz9iZGFlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQWlEO0FBQ0g7QUFDVztBQUNaO0FBQ3VCO0FBQ0c7O0FBRXZFO0FBQ0E7QUFDQTtBQUNBO0FB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SBpbnZlcnPDqWVzLlxuICovXG5SZXZlcnNlR2VvY29kZS5nZW9FUFNHID0gW1wiRVBTRzo0MzI2XCJdO1xuXG5leHBvcnQgZGVmYXVsdCBSZXZlcnNlR2VvY29kZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js": +/*!*******************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js ***! + \*******************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Request_ProcessIsoCurveRequest__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Request/ProcessIsoCurveRequest */ \"./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js\");\n/* harmony import */ var _Response_ProcessIsoCurveResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Response/ProcessIsoCurveResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js\");\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service d'isochrone/distance du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.ProcessIsoCurve\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.resource - La ressource utilisée pour le calcul. Ce paramètre devrait être obligatoire car il l'est dans l'appel au service. Mais il ne l'est pas pour des raisons de rétrocompatibilité.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service iso : 'json' uniquement et par défaut.\n *\n * @param {Object} options.position - Point de départ du calcul.\n * Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.position.x - Abcisse du point de départ du calcul d'isochrone/distance.\n * @param {Float} options.position.y - Ordonnée du point de départ du calcul d'isochrone/distance.\n *\n * @param {String} options.srs - Projection.\n * Système de coordonnées dans lequel les coordonnées du point « location » sont exprimées et\n * dans lequel la géométrie de la courbe résultante sera exprimée.\n * Par défaut, le système de coordonnées utilisé sera « EPSG:4326 ».\n *\n * @param {String} [options.graph = \"voiture\"] - Nom du graphe à utiliser pour le calcul (« Pieton » ou « Voiture »).\n * La valeur par défaut est : «voiture»\n *\n * @param {Array.} [options.exclusions] - DEPRECATED: Ce paramètre est conservé pour une rétrocompatibilité de l'api. Le nouveau paramètre à utiliser est options.constraints.\n * Critères d'exclusions à appliquer pour le calcul.\n * On précise ici le type de tronçons que l'on ne veut pas que l'isochrone/distance emprunte\n * (valeurs possibles : « toll » (éviter les péages), « bridge », « tunnel »).\n *\n * @param {Object[]} [options.constraints] - Critères de contraintes à appliquer sur un itinéraire. Les valeurs disponibles dépendent de la ressource utilisée. Il est donc utile de regarder le getCapabilities.\n * @param {String} [options.constraints.constraintType] - Type de la contrainte. Généralement \"banned\".\n * @param {String} [options.constraints.key] - Clé de la contrainte. Généralement \"wayType\".\n * @param {String} [options.constraints.operator] - Opérateur de la contrainte. Généralement \"=\".\n * @param {String} [options.constraints.value] - Valeur de la contrainte. Généralement \"autoroute\".\n *\n * @param {String} [options.method = \"time\"] - Méthode utilisée pour le calcul de la courbe iso.\n * Les valeurs possible sont \"time\" pour un calcul d'isochrone, \"distance\" pour un calcul d'isodistance.\n * Pas de valeur spécifié équivaut à un calcul d'isochrone.\n *\n * @param {String} [options.distanceUnit = \"m\"] - Indique si la distance doit être exprimée en km ou m dans la réponse (\"m\" or \"km\").\n *\n * @param {String} [options.timeUnit = \"second\"] - Indique si la durée doit être exprimée en seconde, minute ou heure dans la réponse (\"standard\", \"second\", \"minute\", \"hour\"). Il peut-être formatté hh:mm::ss avec la valeur standard.\n *\n * @param {Float} options.time - Durée maximum (exprimée en secondes) à utiliser pour le calcul de la courbe à partir du ou jusqu'au point « location ».\n * Ce paramètre doit être renseigné si l'option \"méthod\" a la valeur \"time\".\n * Si l'option method n'est pas renseignée, ce paramètre doit être renseigné.\n *\n * @param {Float} options.distance - Distance maximum (exprimée en metres) à utiliser pour le calcul de la courbe à partir du ou j'usqu'au point « location ».\n * Ce paramètre doit être renseigné si l'option \"méthod\" a la valeur \"DISTANCE\".\n * Si l'option \"method\" n'est pas renseignée, ce paramètre sera ignoré.\n *\n * @param {Boolean} [options.reverse = false] - Indique si la géométrie résultante doit être lissée (« true ») pour ne pas avoir d'effet d'escalier.\n * Par défaut, la valeur « false » est appliquée.\n *\n * @param {Boolean} [options.smoothing = false] - Indique si la géométrie résultante doit être lissée (« true ») pour ne pas avoir d'effet d'escalier.\n * Par défaut, la valeur « false » est appliquée.\n *\n * @param {Boolean} [options.holes = false] - Indique si la géométrie résultante (surface) doit être retournée avec des trous (« true »).\n * Par défaut, la valeur « false » est appliquée.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * position : {\n * x : 2.3242664298058053,\n * y : 48.86118017324745\n * },\n * distance : 200,\n * [time : ]\n * method : \"distance\",\n * graph : \"voiture\",\n * reverse : false\n * };\n */\n\nfunction ProcessIsoCurve (options) {\n if (!(this instanceof ProcessIsoCurve)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"ProcessIsoCurve\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"ProcessIsoCurve\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.ProcessIsoCurve\");\n this.logger.trace(\"[Constructeur ProcessIsoCurve (options)]\");\n\n if (!options.position) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"position\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.position.x === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"position.x\"));\n }\n\n if (options.position.y === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"position.y\"));\n }\n\n if (!options.time && !options.distance) {\n throw new Error(\"Parameter (s) 'distance' missing. Parameter time to calculate an isochrone, parameter distance for an isodistance\");\n }\n\n // si on a que le paramètre \"distance\" en entrée, on calcule une isodistance.\n // Le paramètre \"méthode\" doit pour avoir une réponse du service, être passé à \"distance\"\n if (!options.time && options.distance) {\n this.options.method = \"distance\";\n // on supprime l'éventuel attribut time, résidu d'un appel antérieur\n if (this.options.time) {\n delete this.options.time;\n }\n }\n\n // si on a que le paramètre \"time\" en entrée, on calcule une isochrone.\n // Le paramètre \"méthode\" doit pour avoir une réponse du service, être passé à \"time\"\n if (options.time && !options.distance) {\n this.options.method = \"time\";\n // on supprime l'éventuel attribut time, résidu d'un appel antérieur\n if (this.options.distance) {\n delete this.options.distance;\n }\n }\n\n // au cas où on a ni l'un, ni l'autre...\n this.options.method = this.options.method || \"time\";\n\n // options par defaut du service\n // TODO: modifier la ressource lors de la mise en production du service\n this.options.resource = options.resource || \"bdtopo-iso\";\n this.options.exclusions = options.exclusions || [];\n this.options.reverse = options.reverse || false;\n this.options.srs = options.srs || \"EPSG:4326\";\n this.options.distanceUnit = options.distanceUnit || \"m\";\n this.options.timeUnit = options.timeUnit || \"second\";\n\n // options depreciees\n if (options.smoothing) {\n this.logger.warn(\"options.smoothing is DEPRECATED\");\n }\n this.options.smoothing = false;\n if (options.holes) {\n this.logger.warn(\"options.holes is DEPRECATED\");\n }\n this.options.holes = false;\n\n // Gestion du graphe\n if (options.graph) {\n if (options.graph === \"Voiture\") {\n this.options.graph = \"car\";\n }\n if (options.graph === \"Pieton\") {\n this.options.graph = \"pedestrian\";\n }\n } else {\n this.options.graph = \"car\";\n }\n\n // Gestions des contraintes\n this.options.constraints = [];\n if (options.constraints) {\n if (Array.isArray(options.constraints)) {\n for (var k = 0; k < options.constraints.length; k++) {\n this.options.constraints.push(options.constraints[k]);\n }\n } else {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_TYPE\", \"constraints\"));\n }\n }\n\n // Gestion de l'ancien paramètre exclusions\n var constraintTunnel = {};\n var constraintPont = {};\n var constraintAutoroute = {};\n if (options.exclusions) {\n if (options.exclusions.length !== 0) {\n this.logger.warn(\"options.exclusions is DEPRECATED !!\");\n for (var c = 0; c < options.exclusions.length; c++) {\n if (typeof options.exclusions[c] === \"string\") {\n options.exclusions[c] = options.exclusions[c].toLowerCase();\n } else {\n // on ne crée pas une erreur pour rétro-compatibilité avec les anciennes versions\n continue;\n }\n if (options.exclusions[c] === \"toll\") {\n constraintAutoroute.constraintType = \"banned\";\n constraintAutoroute.key = \"wayType\";\n constraintAutoroute.operator = \"=\";\n constraintAutoroute.value = \"autoroute\";\n this.options.constraints.push(constraintAutoroute);\n }\n if (options.exclusions[c] === \"tunnel\") {\n constraintTunnel.constraintType = \"banned\";\n constraintTunnel.key = \"wayType\";\n constraintTunnel.operator = \"=\";\n constraintTunnel.value = \"tunnel\";\n this.options.constraints.push(constraintTunnel);\n }\n if (options.exclusions[c] === \"bridge\") {\n constraintPont.constraintType = \"banned\";\n constraintPont.key = \"wayType\";\n constraintPont.operator = \"=\";\n constraintPont.value = \"pont\";\n this.options.constraints.push(constraintPont);\n }\n }\n }\n }\n\n // on passe l'option outputFormat en minuscules afin d'éviter des exceptions.\n this.options.outputFormat = (typeof options.outputFormat === \"string\") ? options.outputFormat.toLowerCase() : \"json\";\n if (options.outputFormat && options.outputFormat !== \"json\") {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_NOT_SUPPORT\", \"outputFormat\"));\n }\n this.options.outputFormat = \"json\";\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n if (!this.options.serverUrl) {\n var urlFound = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].ProcessIsoCurve.url(\"calcul\");\n if (!urlFound) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = urlFound;\n this.logger.trace(\"Serveur URL par defaut : \" + this.options.serverUrl);\n }\n}\n\n/**\n * @lends module:ProcessIsoCurve#\n */\nProcessIsoCurve.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nProcessIsoCurve.prototype.constructor = ProcessIsoCurve;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nProcessIsoCurve.prototype.buildRequest = function (error, success) {\n try {\n var oIsoCurve = new _Request_ProcessIsoCurveRequest__WEBPACK_IMPORTED_MODULE_5__[\"default\"](this.options);\n if (!oIsoCurve.processRequestString()) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\"));\n }\n\n this.request = oIsoCurve.requestString;\n } catch (e) {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](e.message));\n return;\n }\n\n success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} onError - callback des erreurs\n * @param {Function} onSuccess - callback de succès de l'analyse de la réponse\n */\nProcessIsoCurve.prototype.analyzeResponse = function (onError, onSuccess) {\n if (this.response) {\n var options = {\n response : this.response,\n outputFormat : this.options.outputFormat,\n rawResponse : this.options.rawResponse,\n onSuccess : onSuccess,\n onError : onError,\n scope : this\n };\n\n _Response_ProcessIsoCurveResponseFactory__WEBPACK_IMPORTED_MODULE_6__[\"default\"].build(options);\n } else {\n onError.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ProcessIsoCurve);\n//# sourceURL=[module]\n//# sourceMappingURL=data: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2VyLndhcm4oXCJvcHRpb25zLnNtb290aGluZyBpcyBERVBSRUNBVEVEXCIpO1xuICAgIH1cbiAgICB0aGlzLm9wdGlvbnMuc21vb3RoaW5nID0gZmFsc2U7XG4gICAgaWYgKG9wdGlvbnMuaG9sZXMpIHtcbiAgICAgICAgdGhpcy5sb2dnZXIud2FybihcIm9wdGlvbnMuaG9sZXMgaXMgREVQUkVDQVRFRFwiKTtcbiAgICB9XG4gICAgdGhpcy5vcHRpb25zLmhvbGVzID0gZmFsc2U7XG5cbiAgICAvLyBHZXN0aW9uIGR1IGdyYXBoZVxuICAgIGlmIChvcHRpb25zLmdyYXBoKSB7XG4gICAgICAgIGlmIChvcHRpb25zLmdyYXBoID09PSBcIlZvaXR1cmVcIikge1xuICAgICAgICAgICAgdGhpcy5vcHRpb25zLmdyYXBoID0gXCJjYXJcIjtcbiAgICAgICAgfVxuICAgICAgICBpZiAob3B0aW9ucy5ncmFwaCA9PT0gXCJQaWV0b25cIikge1xuICAgICAgICAgICAgdGhpcy5vcHRpb25zLmdyYXBoID0gXCJwZWRlc3RyaWFuXCI7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLm9wdGlvbnMuZ3JhcGggPSBcImNhclwiO1xuICAgIH1cblxuICAgIC8vIEdlc3Rpb25zIGRlcyBjb250cmFpbnRlc1xuICAgIHRoaXMub3B0aW9ucy5jb25zdHJhaW50cyA9IFtdO1xuICAgIGlmIChvcHRpb25zLmNvbnN0cmFpbnRzKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KG9wdGlvbnMuY29uc3RyYWludHMpKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IG9wdGlvbnMuY29uc3RyYWludHMubGVuZ3RoOyBrKyspIHtcbiAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMuY29uc3RyYWludHMucHVzaChvcHRpb25zLmNvbnN0cmFpbnRzW2tdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihfLmdldE1lc3NhZ2UoXCJQQVJBTV9UWVBFXCIsIFwiY29uc3RyYWludHNcIikpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gR2VzdGlvbiBkZSBsJ2FuY2llbiBwYXJhbcOodHJlIGV4Y2x1c2lvbnNcbiAgICB2YXIgY29uc3RyYWludFR1bm5lbCA9IHt9O1xuICAgIHZhciBjb25zdHJhaW50UG9udCA9IHt9O1xuICAgIHZhciBjb25zdHJhaW50QXV0b3JvdXRlID0ge307XG4gICAgaWYgKG9wdGlvbnMuZXhjbHVzaW9ucykge1xuICAgICAgICBpZiAob3B0aW9ucy5leGNsdXNpb25zLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgdGhpcy5sb2dnZXIud2FybihcIm9wdGlvbnMuZXhjbHVzaW9ucyBpcyBERVBSRUNBVEVEICEhXCIpO1xuICAgICAgICAgICAgZm9yICh2YXIgYyA9IDA7IGMgPCBvcHRpb25zLmV4Y2x1c2lvbnMubGVuZ3RoOyBjKyspIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmV4Y2x1c2lvbnNbY10gPSBvcHRpb25zLmV4Y2x1c2lvbnNbY10udG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbiBuZSBjcsOpZSBwYXMgdW5lIGVycmV1ciBwb3VyIHLDqXRyby1jb21wYXRpYmlsaXTDqSBhdmVjIGxlcyBhbmNpZW5uZXMgdmVyc2lvbnNcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmV4Y2x1c2lvbnNbY10gPT09IFwidG9sbFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRBdXRvcm91dGUuY29uc3RyYWludFR5cGUgPSBcImJhbm5lZFwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50QXV0b3JvdXRlLmtleSA9IFwid2F5VHlwZVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50QXV0b3JvdXRlLm9wZXJhdG9yID0gXCI9XCI7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRBdXRvcm91dGUudmFsdWUgPSBcImF1dG9yb3V0ZVwiO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMuY29uc3RyYWludHMucHVzaChjb25zdHJhaW50QXV0b3JvdXRlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9PT0gXCJ0dW5uZWxcIikge1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50VHVubmVsLmNvbnN0cmFpbnRUeXBlID0gXCJiYW5uZWRcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFR1bm5lbC5rZXkgPSBcIndheVR5cGVcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFR1bm5lbC5vcGVyYXRvciA9IFwiPVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50VHVubmVsLnZhbHVlID0gXCJ0dW5uZWxcIjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLmNvbnN0cmFpbnRzLnB1c2goY29uc3RyYWludFR1bm5lbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmV4Y2x1c2lvbnNbY10gPT09IFwiYnJpZGdlXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFBvbnQuY29uc3RyYWludFR5cGUgPSBcImJhbm5lZFwiO1xuICA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QsXG4gICAgICAgICAgICByYXdSZXNwb25zZSA6IHRoaXMub3B0aW9ucy5yYXdSZXNwb25zZSxcbiAgICAgICAgICAgIG9uU3VjY2VzcyA6IG9uU3VjY2VzcyxcbiAgICAgICAgICAgIG9uRXJyb3IgOiBvbkVycm9yLFxuICAgICAgICAgICAgc2NvcGUgOiB0aGlzXG4gICAgICAgIH07XG5cbiAgICAgICAgUHJvY2Vzc0lzb0N1cnZlUmVzcG9uc2VGYWN0b3J5LmJ1aWxkKG9wdGlvbnMpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIG9uRXJyb3IuY2FsbCh0aGlzLCBuZXcgRXJyb3JTZXJ2aWNlKF8uZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRU1QVFlcIikpKTtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBQcm9jZXNzSXNvQ3VydmU7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js": +/*!**********************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js ***! + \**********************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _model_ProcessIsoCurveParam__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./model/ProcessIsoCurveParam */ \"./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js\");\n\n\n\n\n\n/**\n * @classdesc\n * Classe de gestion des requêtes sur le service de calcul d'isoschrone/isodistance.\n * Les requêtes peuvent être en mode GET ou POST,\n * et le format de sorti est en JSON.\n *\n * @constructor\n * @alias Gp.Services.ProcessIsoCurve.Request.ProcessIsoCurveRequest\n * @param {Object} options - options\n *\n * @example\n * var options = {\n * httpMethod : 'GET', // GET|POST\n * // spécifique au service\n * position : {\n * x : 2.3242664298058053,\n * y : 48.86118017324745\n * },\n * graph : \"car\",\n * method : 'time',\n * time : 1000, //distance : 200\n * reverse : false,\n * srs : 'EPSG:4326'\n * };\n *\n * try {\n *\n * var oIsoCurve = new ProcessIsoCurveRequest (options);\n * if (!oIsoCurve.processRequestString ()) {\n * // error\n * }\n *\n * var request = oIsoCurve.requestString;\n *\n * } catch (e) {\n * // error\n * }\n * @private\n */\nfunction ProcessIsoCurveRequest (options) {\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"ProcessIsoCurveRequest\");\n this.logger.trace(\"[Constructeur ProcessIsoCurveRequest ()]\");\n\n if (!(this instanceof ProcessIsoCurveRequest)) {\n throw new TypeError(\"ProcessIsoCurveRequest constructor cannot be called as a function.\");\n }\n\n // existance des options\n if (!options) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n /**\n * Liste des options\n */\n this.settings = options;\n\n /**\n * Mode HTPP.\n * Par defaut, \"GET\".\n * @type {String}\n */\n this.mode = this.settings.httpMethod || \"GET\";\n}\n\nProcessIsoCurveRequest.prototype = {\n\n /**\n * @lends module:ProcessIsoCurveRequest#\n */\n\n /**\n * Requête\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : ProcessIsoCurveRequest,\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out :\n * // (http://wxs.ign.fr/KEY/isochrone?)\n * // resource=&\n * // point=&\n * // costValue=&\n * // costType=&\n * // profile=&\n * // constraints=&\n * // direction=&\n * // crs=\n *\n * // POST out :\n * {\n * resource: \"bduni-idf-pgr\",\n * point: \"2.337306,48.849319\",\n * costValue: 100,\n * costType: \"time\",\n * profile: \"car\",\n * constraints: [{\n * constraintType: \"banned\",\n * key: \"ways_type\",\n * operator: \"=\",\n * value: \"autoroute\"\n * }]\n * }\n *\n * @returns {String} request\n */\n processRequestString : function () {\n var request = \"\";\n var i = 0;\n\n switch (this.mode) {\n case \"GET\":\n this.logger.trace(\"Process GET Request\");\n\n // Mapping des options avec le service de l'API REST\n var oParams = new _model_ProcessIsoCurveParam__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.settings);\n var params = oParams.getParams();\n\n for (i = 0; i < params.length; i++) {\n var o = params[i];\n if (request) {\n request += \"&\";\n }\n request += o.k + \"=\" + o.v;\n }\n\n break;\n\n case \"POST\":\n this.logger.trace(\"Process POST Request\");\n // creation du JSON\n var postRequest = {};\n\n postRequest.resource = this.settings.resource;\n\n postRequest.point = this.settings.position.x + \",\" + this.settings.position.y;\n\n if (this.settings.method === \"distance\") {\n postRequest.costType = \"distance\";\n postRequest.costValue = this.settings.distance;\n } else {\n postRequest.costType = \"time\";\n postRequest.costValue = this.settings.time;\n }\n\n postRequest.profile = this.settings.graph;\n\n if (this.settings.reverse) {\n postRequest.direction = \"arrival\";\n } else {\n postRequest.direction = \"departure\";\n }\n\n postRequest.constraints = this.settings.constraints;\n\n postRequest.distanceUnit = this.settings.distanceUnit;\n\n postRequest.timeUnit = this.settings.timeUnit;\n\n postRequest.crs = this.settings.srs;\n\n // conversion en chaîne de caractères\n request = JSON.stringify(postRequest);\n break;\n\n default:\n this.logger.error(\"No other HTTP method supported by the service !\");\n }\n\n this.logger.trace(request);\n this.requestString = request;\n\n return this.requestString;\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ProcessIsoCurveRequest);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvUHJvY2Vzc0lzb0N1cnZlL1JlcXVlc3QvUHJvY2Vzc0lzb0N1cnZlUmVxdWVzdC5qcz9iMzc3Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQ29EO0FBQ0g7QUFDZTs7QUFFaEU7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBSTtBQUNKO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrQkFBa0IsOERBQU07QUFDeEI7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx3QkFBd0IsZ0VBQUM7QUFDekI7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsY0FBYztBQUNkO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLGNBQWM7QUFDZDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNB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IDEwMCxcbiAgICAgKiAgY29zdFR5cGU6IFwidGltZVwiLFxuICAgICAqICBwcm9maWxlOiBcImNhclwiLFxuICAgICAqICBjb25zdHJhaW50czogW3tcbiAgICAgKiAgICAgIGNvbnN0cmFpbnRUeXBlOiBcImJhbm5lZFwiLFxuICAgICAqICAgICAga2V5OiBcIndheXNfdHlwZVwiLFxuICAgICAqICAgICAgb3BlcmF0b3I6IFwiPVwiLFxuICAgICAqICAgICAgdmFsdWU6IFwiYXV0b3JvdXRlXCJcbiAgICAgKiAgfV1cbiAgICAgKiB9XG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSByZXF1ZXN0XG4gICAgICovXG4gICAgcHJvY2Vzc1JlcXVlc3RTdHJpbmcgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciByZXF1ZXN0ID0gXCJcIjtcbiAgICAgICAgdmFyIGkgPSAwO1xuXG4gICAgICAgIHN3aXRjaCAodGhpcy5tb2RlKSB7XG4gICAgICAgICAgICBjYXNlIFwiR0VUXCI6XG4gICAgICAgICAgICAgICAgdGhpcy5sb2dnZXIudHJhY2UoXCJQcm9jZXNzIEdFVCBSZXF1ZXN0XCIpO1xuXG4gICAgICAgICAgICAgICAgLy8gTWFwcGluZyBkZXMgb3B0aW9ucyBhdmVjIGxlIHNlcnZpY2UgZGUgbCdBUEkgUkVTVFxuICAgICAgICAgICAgICAgIHZhciBvUGFyYW1zID0gbmV3IFByb2Nlc3NJc29DdXJ2ZVBhcmFtKHRoaXMuc2V0dGluZ3MpO1xuICAgICAgICAgICAgICAgIHZhciBwYXJhbXMgPSBvUGFyYW1zLmdldFBhcmFtcygpO1xuXG4gICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IHBhcmFtcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbyA9IHBhcmFtc1tpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlcXVlc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVlc3QgKz0gXCImXCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdCArPSBvLmsgKyBcIj1cIiArIG8udjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBcIlBPU1RcIjpcbiAgICAgICAgICAgICAgICB0aGlzLmxvZ2dlci50cmFjZShcIlByb2Nlc3MgUE9TVCBSZXF1ZXN0XCIpO1xuICAgICAgICAgICAgICAgIC8vIGNyZWF0aW9uIGR1IEpTT05cbiAgICAgICAgICAgICAgICB2YXIgcG9zdFJlcXVlc3QgPSB7fTtcblxuICAgICAgICAgICAgICAgIHBvc3RSZXF1ZXN0LnJlc291cmNlID0gdGhpcy5zZXR0aW5ncy5yZXNvdXJjZTtcblxuICAgICAgICAgICAgICAgIHBvc3RSZXF1ZXN0LnBvaW50ID0gdGhpcy5zZXR0aW5ncy5wb3NpdGlvbi54ICsgXCIsXCIgKyB0aGlzLnNldHRpbmdzLnBvc2l0aW9uLnk7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zZXR0aW5ncy5tZXRob2QgPT09IFwiZGlzdGFuY2VcIikge1xuICAgICAgICAgICAgICAgICAgICBwb3N0UmVxdWVzdC5jb3N0VHlwZSA9IFwiZGlzdGFuY2VcIjtcbiAgICAgICAgICAgICAgICAgICAgcG9zdFJlcXVlc3QuY29zdFZhbHVlID0gdGhpcy5zZXR0aW5ncy5kaXN0YW5jZTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBwb3N0UmVxdWVzdC5jb3N0VHlwZSA9IFwidGltZVwiO1xuICAgICAgICAgICAgICAgICAgICBwb3N0UmVxdWVzdC5jb3N0VmFsdWUgPSB0aGlzLnNldHRpbmdzLnRpbWU7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcG9zd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JlcXVlc3RTdHJpbmcgPSByZXF1ZXN0O1xuXG4gICAgICAgIHJldHVybiB0aGlzLnJlcXVlc3RTdHJpbmc7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgUHJvY2Vzc0lzb0N1cnZlUmVxdWVzdDtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js": +/*!**************************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js ***! + \**************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n\n\n\n/**\n * @classdesc\n *\n * Classe de gestion des param. des requêtes du service de calcul des iso.\n * Permet le mapping avec les options du service.\n *\n * @constructor\n * @alias Gp.Services.ProcessIsoCurve.Request.ProcessIsoCurveParam\n * @param {Object} options - options\n * @private\n *\n */\nfunction ProcessIsoCurveParam (options) {\n if (!(this instanceof ProcessIsoCurveParam)) {\n throw new TypeError(\"ProcessIsoCurveParam constructor cannot be called as a function.\");\n }\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur ProcessIsoCurveParam ()]\");\n\n /**\n * Options en paramêtres du constructeur.\n */\n this.options = options || {};\n\n // mapping des options avec l'API REST\n\n /** Identifiant de l’isochrone */\n this.id = this.options.id;\n\n /** Resource */\n this.resource = this.options.resource;\n\n /** Coordonnées de départ (ou arrivée si le reverse est à true). */\n this.point = this.options.position;\n\n /** projection (code EPSG comme epsg:4326 ou wgs84) */\n this.crs = this.options.srs;\n\n /**\n * Profil de véhicule à utiliser pour le calcul.\n * Voiture ou Pieton\n */\n this.profile = this.options.graph;\n\n /** Liste des règles de restrictions à utiliser */\n this.constraints = this.options.constraints;\n\n this.reverse = this.options.reverse;\n\n this.timeUnit = this.options.timeUnit;\n\n this.distanceUnit = this.options.distanceUnit;\n\n /**\n * \"time\" pour isochrone ou \"distance\" for isodistance.\n * Par defaut, time...\n */\n if (this.options.method === \"distance\") {\n this.costType = \"distance\";\n this.costValue = this.options.distance;\n } else {\n this.costType = \"time\";\n this.costValue = this.options.time;\n }\n}\n\n/**\n * CLASSNAME\n */\nProcessIsoCurveParam.CLASSNAME = \"ProcessIsoCurveParam\";\n\nProcessIsoCurveParam.prototype = {\n\n /**\n * @lends module:ProcessIsoCurveParam#\n */\n\n /**\n * Constructeur (alias)\n */\n constructor : ProcessIsoCurveParam,\n\n /**\n * Retourne le point\n * @returns {String} x,y\n */\n getLocation : function () {\n return this.point.x + \",\" + this.point.y;\n },\n\n /**\n * Retourne l'unité de la distance\n * @returns {String}\n */\n getDistanceUnit : function () {\n if (this.distanceUnit === \"m\") {\n return \"meter\";\n }\n if (this.distanceUnit === \"km\") {\n return \"kilometer\";\n }\n return \"\";\n },\n\n /**\n * Retourne la liste des contraintes\n * @returns {String}\n */\n getConstraints : function () {\n var constraintArray = [];\n\n if (this.constraints.length !== 0) {\n for (var k = 0; k < this.constraints.length; k++) {\n constraintArray.push(JSON.stringify(this.constraints[k]));\n }\n }\n return constraintArray.join(\"|\");\n },\n\n /**\n * Retourne la direction\n * @returns {String}\n */\n getDirection : function () {\n if (this.reverse) {\n return \"arrival\";\n } else {\n return \"departure\";\n }\n }\n};\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]} KVP\n */\nProcessIsoCurveParam.prototype.getParams = function () {\n var map = [];\n\n map.push({\n k : \"resource\",\n v : this.resource\n });\n\n map.push({\n k : \"point\",\n v : this.getLocation()\n });\n\n map.push({\n k : \"direction\",\n v : this.getDirection()\n });\n\n map.push({\n k : \"costType\",\n v : this.costType\n });\n\n map.push({\n k : \"costValue\",\n v : this.costValue\n });\n\n map.push({\n k : \"profile\",\n v : this.profile\n });\n\n map.push({\n k : \"timeUnit\",\n v : this.timeUnit\n });\n\n map.push({\n k : \"distanceUnit\",\n v : this.getDistanceUnit()\n });\n\n if (this.crs) {\n map.push({\n k : \"crs\",\n v : this.crs\n });\n }\n\n if (this.constraints) {\n map.push({\n k : \"constraints\",\n v : this.getConstraints()\n });\n }\n\n return map;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ProcessIsoCurveParam);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvUHJvY2Vzc0lzb0N1cnZlL1JlcXVlc3QvbW9kZWwvUHJvY2Vzc0lzb0N1cnZlUGFyYW0uanM/MjU4YiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDdUQ7O0FBRXZEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsa0JBQWtCLDhEQUFNO0FBQ3hCOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUN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IHtTdHJpbmd9IHgseVxuICAgICAqL1xuICAgIGdldExvY2F0aW9uIDogZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5wb2ludC54ICsgXCIsXCIgKyB0aGlzLnBvaW50Lnk7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFJldG91cm5lIGwndW5pdMOpIGRlIGxhIGRpc3RhbmNlXG4gICAgICogQHJldHVybnMge1N0cmluZ31cbiAgICAgKi9cbiAgICBnZXREaXN0YW5jZVVuaXQgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICh0aGlzLmRpc3RhbmNlVW5pdCA9PT0gXCJtXCIpIHtcbiAgICAgICAgICAgIHJldHVybiBcIm1ldGVyXCI7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuZGlzdGFuY2VVbml0ID09PSBcImttXCIpIHtcbiAgICAgICAgICAgIHJldHVybiBcImtpbG9tZXRlclwiO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBcIlwiO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBSZXRvdXJuZSBsYSBsaXN0ZSBkZXMgY29udHJhaW50ZXNcbiAgICAgKiBAcmV0dXJucyB7U3RyaW5nfVxuICAgICAqL1xuICAgIGdldENvbnN0cmFpbnRzIDogZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgY29uc3RyYWludEFycmF5ID0gW107XG5cbiAgICAgICAgaWYgKHRoaXMuY29uc3RyYWludHMubGVuZ3RoICE9PSAwKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IHRoaXMuY29uc3RyYWludHMubGVuZ3RoOyBrKyspIHtcbiAgICAgICAgICAgICAgICBjb25zdHJhaW50QXJyYXkucHVzaChKU09OLnN0cmluZ2lmeSh0aGlzLmNvbnN0cmFpbnRzW2tdKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGNvbnN0cmFpbnRBcnJheS5qb2luKF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ICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJwcm9maWxlXCIsXG4gICAgICAgIHYgOiB0aGlzLnByb2ZpbGVcbiAgICB9KTtcblxuICAgIG1hcC5wdXNoKHtcbiAgICAgICAgayA6IFwidGltZVVuaXRcIixcbiAgICAgICAgdiA6IHRoaXMudGltZVVuaXRcbiAgICB9KTtcblxuICAgIG1hcC5wdXNoKHtcbiAgICAgICAgayA6IFwiZGlzdGFuY2VVbml0XCIsXG4gICAgICAgIHYgOiB0aGlzLmdldERpc3RhbmNlVW5pdCgpXG4gICAgfSk7XG5cbiAgICBpZiAodGhpcy5jcnMpIHtcbiAgICAgICAgbWFwLnB1c2goe1xuICAgICAgICAgICAgayA6IFwiY3JzXCIsXG4gICAgICAgICAgICB2IDogdGhpcy5jcnNcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuY29uc3RyYWludHMpIHtcbiAgICAgICAgbWFwLnB1c2goe1xuICAgICAgICAgICAgayA6IFwiY29uc3RyYWludHNcIixcbiAgICAgICAgICAgIHYgOiB0aGlzLmdldENvbnN0cmFpbnRzKClcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIG1hcDtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IFByb2Nlc3NJc29DdXJ2ZVBhcmFtO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/model/ProcessIsoCurveParam.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js": +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js ***! + \*******************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _model_ProcessIsoCurveResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./model/ProcessIsoCurveResponse */ \"./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse.js\");\n\n\n\n\n\n/**\n * Factory pour générer une reponse JSON à partir d'un JSON\n * (Factory)\n *\n * @module ProcessIsoCurveResponseFactory\n * @alias Gp.Services.ProcessIsoCurve.Response.ProcessIsoCurveResponseFactory\n * @private\n */\nvar ProcessIsoCurveResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant ProcessIsoCurve\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"ProcessIsoCurveResponseFactory\");\n logger.trace([\"ProcessIsoCurveResponseFactory::build()\"]);\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n logger.trace(\"analyze response : json\");\n\n var JSONResponse;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // analyse de la reponse\n // création de l'objet de réponse\n data = new _model_ProcessIsoCurveResponse__WEBPACK_IMPORTED_MODULE_3__[\"default\"]();\n\n // remplissage de l'objet créé avec les attribtuts de la réponse du service\n if (JSONResponse) {\n if (JSONResponse.costType === \"distance\") {\n data.time = \"\";\n data.distance = JSONResponse.costValue;\n } else {\n data.time = JSONResponse.costValue;\n data.distance = \"\";\n }\n\n data.message = \"\";\n data.id = \"\";\n data.srs = JSONResponse.crs;\n data.geometry = JSONResponse.geometry;\n var coords = JSONResponse.point.split(\",\");\n if (data.location) {\n data.location.x = coords[0];\n data.location.y = coords[1];\n }\n } else {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_ANALYSE\", options.response)));\n return;\n }\n\n // info : en cas de problèmes de droits (clé invalide ou autre), la réponse est au format XML !!\n // ex. Key does not exist or has expired\n // mais le statut est 403, l'erreur est donc remontée plus tôt.\n if (data.exceptionReport) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n // si la réponse est vide, on appelle le callback d'erreur\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n // si tout s'est bien passé, on appelle le callback de succès\n options.onSuccess.call(options.scope, data);\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ProcessIsoCurveResponseFactory);\n//# source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B9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGxvZ2dlci50cmFjZShcImFuYWx5emUgcmVzcG9uc2UgOiBqc29uXCIpO1xuXG4gICAgICAgICAgICAgICAgdmFyIEpTT05SZXNwb25zZTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMucmVzcG9uc2UgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgSlNPTlJlc3BvbnNlID0gSlNPTi5wYXJzZShvcHRpb25zLnJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBKU09OUmVzcG9uc2UgPSBvcHRpb25zLnJlc3BvbnNlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGFuYWx5c2UgZGUgbGEgcmVwb25zZVxuICAgICAgICAgICAgICAgIC8vIGNyw6lhdGlvbiBkZSBsJ29iamV0IGRlIHLDqXBvbnNlXG4gICAgICAgICAgICAgICAgZGF0YSA9IG5ldyBQcm9jZXNzSXNvQ3VydmVSZXNwb25zZSgpO1xuXG4gICAgICAgICAgICAgICAgLy8gcmVtcGxpc3NhZ2UgZGUgbCdvYmpldCBjcsOpw6kgYXZlYyBsZXMgYXR0cmlidHV0cyBkZSBsYSByw6lwb25zZSBkdSBzZXJ2aWNlXG4gICAgICAgICAgICAgICAgaWYgKEpTT05SZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoSlNPTlJlc3BvbnNlLmNvc3RUeXBlID09PSBcImRpc3RhbmNlXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEudGltZSA9IFwiXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmRpc3RhbmNlID0gSlNPTlJlc3BvbnNlLmNvc3RWYWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEudGltZSA9IEpTT05SZXNwb25zZS5jb3N0VmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmRpc3RhbmNlID0gXCJcIjtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGRhdGEubWVzc2FnZSA9IFwiXCI7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEuaWQgPSBcIlwiO1xuICAgICAgICAgICAgICAgICAgICBkYXRhLnNycyA9IEpTT05SZXNwb25zZS5jcnM7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEuZ2VvbWV0cnkgPSBKU09OUmVzcG9uc2UuZ2VvbWV0cnk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb29yZHMgPSBKU09OUmVzcG9uc2UucG9pbnQuc3BsaXQoXCIsXCIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YS5sb2NhdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5sb2NhdGlvbi54ID0gY29vcmRzWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5sb2NhdGlvbi55ID0gY29vcmRzWzFdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZShNUmVzLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0FOQUxZU0VcIiwgb3B0aW9ucy5yZXNwb25zZSkpKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGluZm8gOiBlbiBjYXMgZGUgcHJvYmzDqG1lcyBkZSBkcm9pdHMgKGNsw6kgaW52YWxpZGUgb3UgYXV0cmUpLCBsYSByw6lwb25zZSBlc3QgYXUgZm9ybWF0IFhNTCAhIVxuICAgICAgICAgICA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fRU1QVFlcIikpKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHNpIHRvdXQgcydlc3QgYmllbiBwYXNzw6ksIG9uIGFwcGVsbGUgbGUgY2FsbGJhY2sgZGUgc3VjY8Ooc1xuICAgICAgICBvcHRpb25zLm9uU3VjY2Vzcy5jYWxsKG9wdGlvbnMuc2NvcGUsIGRhdGEpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IFByb2Nlc3NJc29DdXJ2ZVJlc3BvbnNlRmFjdG9yeTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse.js": +/*!******************************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse.js ***! + \******************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Response object for {@link module:Services~isoCurve Gp.Services.isoCurve ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Float} distance - distance (expressed in meters) used for the request.\n * @property {Float} time - time (expressed in seconds) used for the request.\n * @property {Object} geometry - Geometry (expressed in [GeoJSON]{@link http://geojson.org/}) of the isocurve.\n * @property {String} id - request id (used by underlying webservice).\n * @property {Gp.Point} location - Position of the start or end point used for the request (expressed in \"srs\" coordinates system).\n * @property {String} message - message\n * @property {String} srs - Identifier of the coordinates system used for the isocurve.\n *\n * @namespace\n * @alias Gp.Services.IsoCurveResponse\n *\n */\nfunction ProcessIsoCurveResponse () {\n if (!(this instanceof ProcessIsoCurveResponse)) {\n throw new TypeError(\"ProcessIsoCurveResponse constructor cannot be called as a function.\");\n }\n\n this.message = null;\n\n this.id = null;\n\n this.location = {};\n this.location.x = null;\n this.location.y = null;\n\n this.srs = null;\n\n this.geometry = null;\n\n this.time = null;\n\n this.distance = null;\n}\n\nProcessIsoCurveResponse.prototype = {\n\n constructor : ProcessIsoCurveResponse\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ProcessIsoCurveResponse);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvUHJvY2Vzc0lzb0N1cnZlL1Jlc3BvbnNlL21vZGVsL1Byb2Nlc3NJc29DdXJ2ZVJlc3BvbnNlLmpzP2Q5OTQiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQTtBQUNBLHdCQUF3Qix1REFBdUQ7QUFDL0U7QUFDQSxjQUFjLE1BQU07QUFDcEIsY0FBYyxNQUFNO0FBQ3BCLGNBQWMsT0FBTyw2Q0FBNkMsMEJBQTBCO0FBQzVGLGNBQWMsT0FBTztBQUNyQixjQUFjLFNBQVM7QUFDdkIsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRWUsc0ZBQXVCLEVBQUMiLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZ2VvcG9ydGFsLWFjY2Vzcy1saWIvc3JjL1NlcnZpY2VzL1Byb2Nlc3NJc29DdXJ2ZS9SZXNwb25zZS9tb2RlbC9Qcm9jZXNzSXNvQ3VydmVSZXNwb25zZS5q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b3IgdGhlIGlzb2N1cnZlLlxuICpcbiAqIEBuYW1lc3BhY2VcbiAqIEBhbGlhcyBHcC5TZXJ2aWNlcy5Jc29DdXJ2ZVJlc3BvbnNlXG4gKlxuICovXG5mdW5jdGlvbiBQcm9jZXNzSXNvQ3VydmVSZXNwb25zZSAoKSB7XG4gICAgaWYgKCEodGhpcyBpbnN0YW5jZW9mIFByb2Nlc3NJc29DdXJ2ZVJlc3BvbnNlKSkge1xuICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiUHJvY2Vzc0lzb0N1cnZlUmVzcG9uc2UgY29uc3RydWN0b3IgY2Fubm90IGJlIGNhbGxlZCBhcyBhIGZ1bmN0aW9uLlwiKTtcbiAgICB9XG5cbiAgICB0aGlzLm1lc3NhZ2UgPSBudWxsO1xuXG4gICAgdGhpcy5pZCA9IG51bGw7XG5cbiAgICB0aGlzLmxvY2F0aW9uID0ge307XG4gICAgdGhpcy5sb2NhdGlvbi54ID0gbnVsbDtcbiAgICB0aGlzLmxvY2F0aW9uLnkgPSBudWxsO1xuXG4gICAgdGhpcy5zcnMgPSBudWxsO1xuXG4gICAgdGhpcy5nZW9tZXRyeSA9IG51bGw7XG5cbiAgICB0aGlzLnRpbWUgPSBudWxsO1xuXG4gICAgdGhpcy5kaXN0YW5jZSA9IG51bGw7XG59XG5cblByb2Nlc3NJc29DdXJ2ZVJlc3BvbnNlLnByb3RvdHlwZSA9IHtcblxuICAgIGNvbnN0cnVjdG9yIDogUHJvY2Vzc0lzb0N1cnZlUmVzcG9uc2VcblxufTtcblxuZXhwb3J0IGRlZmF1bHQgUHJvY2Vzc0lzb0N1cnZlUmVzcG9uc2U7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/model/ProcessIsoCurveResponse.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js": +/*!*********************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js ***! + \*********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _RouteRequestREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RouteRequestREST */ \"./node_modules/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js\");\n\n\n\n\n/**\n * Creation d'une requête REST en mode POST ou GET\n * (Factory)\n *\n * @module RouteRequestFactory\n * @alias Gp.Services.Route.Request.RouteRequestFactory\n * @private\n */\nvar RouteRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Route\n *\n * @example\n * // utilisation avec les callback\n * var options = {\n * (...)\n * onSuccess : function (response) {},\n * onError : function (error) {},\n * // spécifique au service\n * startPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * endPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * provideBbox : false,\n * exclusions : [\"bridge\", \"tunnel\", \"toll\"],\n * distanceUnit : \"km\",\n * graph : \"Voiture\",\n * geometryInInstructions : false,\n * routePreference : \"fastest\"\n * };\n * RouteRequestFactory.build(options);\n *\n * // utilisation sans callback\n * var options = {...};\n * try {\n * var result = RouteRequestFactory.build(options);\n * if (! result) { throw new Error(\"...\"):}\n * } catch (e) {\n * // todo\n * }\n * @returns {String} request\n */\n build : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"RouteRequestFactory\");\n logger.trace([\"RouteRequestFactory::build()\"]);\n\n var request = null;\n\n var settings = options || {};\n\n // gestion des callback\n var bOnError = !!(options.onError !== null && typeof options.onError === \"function\");\n\n var message = null;\n\n // FIXME les exceptions ne sont pas 'catchées' sur le constructeur !\n var myReq = new _RouteRequestREST__WEBPACK_IMPORTED_MODULE_2__[\"default\"](settings);\n if (!myReq.processRequestString()) {\n message = \"Error process request (rest) !\";\n if (bOnError) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__[\"default\"](message));\n return;\n }\n throw new Error(message);\n }\n request = myReq.requestString;\n\n return request;\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RouteRequestFactory);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvUm91dGUvUmVxdWVzdC9Sb3V0ZVJlcXVlc3RGYWN0b3J5LmpzPzFlZDUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBb0Q7QUFDUTtBQUNWOztBQUVsRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsT0FBTztBQUN0QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsOENBQThDO0FBQzlDLHlDQUF5QztBQUN6QztBQUNBO0FBQ0E7QUFDQTtBQUNBLGFBQWE7QUFDYjtBQUNBO0FBQ0E7QUFDQSxhQUFhO0FBQ2I7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQ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5cbiAgICAvKipcbiAgICAgKiBpbnRlcmZhY2UgdW5pcXVlXG4gICAgICpcbiAgICAgKiBAbWV0aG9kIGJ1aWxkXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvcHRpb25zIC0gb3B0aW9ucyBkZWZpbmllcyBkYW5zIGxlIGNvbXBvc2FudCBSb3V0ZVxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiAgIC8vIHV0aWxpc2F0aW9uIGF2ZWMgbGVzIGNhbGxiYWNrXG4gICAgICogICB2YXIgb3B0aW9ucyA9IHtcbiAgICAgKiAgICAgICguLi4pXG4gICAgICogICAgICBvblN1Y2Nlc3MgOiBmdW5jdGlvbiAocmVzcG9uc2UpIHt9LFxuICAgICAqICAgICAgb25FcnJvciA6IGZ1bmN0aW9uIChlcnJvcikge30sXG4gICAgICogICAgICAvLyBzcMOpY2lmaXF1ZSBhdSBzZXJ2aWNlXG4gICAgICogICAgICBzdGFydFBvaW50IDoge1xuICAgICAqICAgICAgICAgIHggOiA0Mi4xMTIxLFxuICAgICAqICAgICAgICAgIHkgOiAxLjU1NTdcbiAgICAgKiAgICAgIH0sXG4gICAgICogICAgICBlbmRQb2ludCA6IHtcbiAgICAgKiAgICAgICAgICB4IDogNDIuMTEyMSxcbiAgICAgKiAgICAgICAgICB5IDogMS41NTU3XG4gICAgICogICAgICB9LFxuICAgICAqICAgICAgcHJvdmlkZUJib3ggOiBmYWxzZSxcbiAgICAgKiAgICAgIGV4Y2x1c2lvbnMgOiBbXCJicmlkZ2VcIiwgXCJ0dW5uZWxcIiwgXCJ0b2xsXCJdLFxuICAgICAqICAgICAgZGlzdGFuY2VVbml0IDogXCJrbVwiLFxuICAgICAqICAgICAgZ3JhcGggOiBcIlZvaXR1cmVcIixcbiAgICAgKiAgICAgIGdlb21ldHJ5SW5JbnN0cnVjdGlvbnMgOiBmYWxzZSxcbiAgICAgKiAgICAgIHJvdXRlUHJlZmVyZW5jZSA6I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MgJ2NhdGNow6llcycgc3VyIGxlIGNvbnN0cnVjdGV1ciAhXG4gICAgICAgIHZhciBteVJlcSA9IG5ldyBSb3V0ZVJlcXVlc3RSRVNUKHNldHRpbmdzKTtcbiAgICAgICAgaWYgKCFteVJlcS5wcm9jZXNzUmVxdWVzdFN0cmluZygpKSB7XG4gICAgICAgICAgICBtZXNzYWdlID0gXCJFcnJvciBwcm9jZXNzIHJlcXVlc3QgKHJlc3QpICFcIjtcbiAgICAgICAgICAgIGlmIChiT25FcnJvcikge1xuICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2UobWVzc2FnZSkpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihtZXNzYWdlKTtcbiAgICAgICAgfVxuICAgICAgICByZXF1ZXN0ID0gbXlSZXEucmVxdWVzdFN0cmluZztcblxuICAgICAgICByZXR1cm4gcmVxdWVzdDtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBSb3V0ZVJlcXVlc3RGYWN0b3J5O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js": +/*!******************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js ***! + \******************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _model_RouteParamREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./model/RouteParamREST */ \"./node_modules/geoportal-access-lib/src/Services/Route/Request/model/RouteParamREST.js\");\n\n\n\n\n\n/**\n * @classdesc\n * Classe de gestion des requêtes de type REST sur le service de calcul d'itineraire\n * (uniquement en GET)\n *\n * @constructor\n * @alias Gp.Services.Route.Request.RouteRequestREST\n * @param {Object} options - options definies dans le composant Route\n *\n * @example\n * var options = {\n * (...)\n * };\n *\n * @private\n */\nfunction RouteRequestREST (options) {\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"RouteRequestREST\");\n this.logger.trace(\"[Constructeur RouteRequestREST ()]\");\n\n if (!(this instanceof RouteRequestREST)) {\n throw new TypeError(\"RouteRequestREST constructor cannot be called as a function.\");\n }\n\n // existance des options\n if (!options) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n /** liste des options */\n this.settings = options;\n}\n\nRouteRequestREST.prototype = {\n\n /**\n * @lends module:RouteRequestREST#\n */\n\n /**\n * request\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : RouteRequestREST,\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out : origin=2.416907353809513,48.8465772142297&destination=2.4248037771493673,48.84591353161838\n * // POST out : Not yet supported method POST !\n * @returns {String} request\n */\n processRequestString : function () {\n // INFO\n // construction simple sans template...,\n // mais en attendant que les services soient fixés, on taggue ce composant en mode PROTOTYPE !\n this.logger.warn(\" PROTOTYPE !\");\n\n // Mapping des options avec le service de l'API REST\n var oParams = new _model_RouteParamREST__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.settings);\n var params = oParams.getParams();\n\n var request = \"\";\n for (var i = 0; i < params.length; i++) {\n var o = params[i];\n if (request) {\n request += \"&\";\n }\n request += o.k + \"=\" + o.v;\n }\n\n // Exemple :\n // http://wxs.ign.fr/KEY/itineraire/rest/route.json?\n // origin=&\n // destination=&\n // waypoints=&\n // method=DISTANCE&\n // graph=Pieton&\n // graphName=Pieton&\n // exclusions=&\n // tolerance=10&\n // srs=\n\n this.logger.trace(request);\n this.requestString = request;\n\n return this.requestString;\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RouteRequestREST);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvUm91dGUvUmVxdWVzdC9Sb3V0ZVJlcXVlc3RSRVNULmpzPzlmYzEiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFDb0Q7QUFDSDtBQUNHOztBQUVwRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrQkFBa0IsOERBQU07QUFDeEI7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx3QkFBd0IsZ0VBQUM7QUFDekI7O0FBRUE7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsY0FBYztBQUNkO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWlCLE9BQU87QUFDeEI7QUFDQTtBQUNBO0FBQ0E7Q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hciBvID0gcGFyYW1zW2ldO1xuICAgICAgICAgICAgaWYgKHJlcXVlc3QpIHtcbiAgICAgICAgICAgICAgICByZXF1ZXN0ICs9IFwiJlwiO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVxdWVzdCArPSBvLmsgKyBcIj1cIiArIG8udjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEV4ZW1wbGUgOlxuICAgICAgICAvLyAgaHR0cDovL3d4cy5pZ24uZnIvS0VZL2l0aW5lcmFpcmUvcmVzdC9yb3V0ZS5qc29uP1xuICAgICAgICAvLyAgb3JpZ2luPSZcbiAgICAgICAgLy8gIGRlc3RpbmF0aW9uPSZcbiAgICAgICAgLy8gIHdheXBvaW50cz0mXG4gICAgICAgIC8vICBtZXRob2Q9RElTVEFOQ0UmXG4gICAgICAgIC8vICBncmFwaD1QaWV0b24mXG4gICAgICAgIC8vICBncmFwaE5hbWU9UGlldG9uJlxuICAgICAgICAvLyAgZXhjbHVzaW9ucz0mXG4gICAgICAgIC8vICB0b2xlcmFuY2U9MTAmXG4gICAgICAgIC8vICBzcnM9XG5cbiAgICAgICAgdGhpcy5sb2dnZXIudHJhY2UocmVxdWVzdCk7XG4gICAgICAgIHRoaXMucmVxdWVzdFN0cmluZyA9IHJlcXVlc3Q7XG5cbiAgICAgICAgcmV0dXJuIHRoaXMucmVxdWVzdFN0cmluZztcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBSb3V0ZVJlcXVlc3RSRVNUO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Route/Request/RouteRequestREST.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Route/Request/model/RouteParamREST.js": +/*!**********************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Route/Request/model/RouteParamREST.js ***! + \**********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n\n\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes du service de calcul d'itineraire (REST).\n * Permet le mapping avec les options du service.\n * @constructor\n * @alias Gp.Services.Route.Request.RouteParamREST\n * @param {Object} options - options\n *\n * @private\n */\nfunction RouteParamREST (options) {\n if (!(this instanceof RouteParamREST)) {\n throw new TypeError(\"RouteParamREST constructor cannot be called as a function.\");\n }\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur RouteParamREST ()]\");\n /**\n * Options en paramêtres du constructeur.\n */\n this.options = options || {};\n\n // mapping des options avec l'API REST\n\n /** Ressource utilisée */\n this.resource = this.options.resource;\n\n /** Coordonnées du point de départ. */\n this.start = this.options.startPoint.x + \",\" + this.options.startPoint.y;\n\n /** Coordonnées du point d’arrivée. */\n this.end = this.options.endPoint.x + \",\" + this.options.endPoint.y;\n\n /** Coordonnées des étapes point de départ. */\n this.intermediates = this.options.viaPoints;\n\n /** Nom du profile à utiliser */\n this.profile = this.options.graph;\n\n /** projection (code EPSG comme epsg:4326 ou wgs84) */\n this.crs = this.options.srs;\n\n /** Liste des contraintes */\n this.constraints = this.options.constraints;\n\n /** Nom de l'optimisation à utiliser */\n this.optimization = this.options.routePreference;\n\n /** Format de sortie (résumé de l’itinéraire) */\n this.getSteps = (this.options.geometryInInstructions) ? \"true\" : \"false\";\n\n /** Unité des distances */\n this.distanceUnit = this.options.distanceUnit;\n\n /** Unité des durées */\n this.timeUnit = this.options.timeUnit;\n\n /** Attributs des voies */\n this.waysAttributes = this.options.waysAttributes;\n}\n\n/**\n * CLASSNAME\n */\nRouteParamREST.CLASSNAME = \"RouteParamREST\";\n\nRouteParamREST.prototype = {\n\n /**\n * @lends module:RouteParamREST#\n */\n\n /**\n * Constructeur (alias)\n */\n constructor : RouteParamREST,\n\n /**\n * Retourne une liste de points\n * @returns {String} une liste de points (sep '|')\n */\n getIntermediates : function () {\n var array = [];\n if (this.intermediates.length !== 0) {\n for (var i = 0; i < this.intermediates.length; i++) {\n var obj = this.intermediates[i];\n array.push(obj.x + \",\" + obj.y);\n }\n }\n\n return array.join(\"|\");\n },\n\n /**\n * Retourne une liste d'attributs\n * @returns {String} une liste d'attributs (sep '|')\n */\n getWaysAttributes : function () {\n return this.waysAttributes.join(\"|\");\n },\n\n /**\n * Retourne un profile\n * @returns {String} profile\n */\n getProfile : function () {\n return this.profile;\n },\n\n /**\n * Retourne un distanceUnit\n * @returns {String} distanceUnit\n */\n getDistanceUnit : function () {\n if (this.distanceUnit === \"m\") {\n return \"meter\";\n }\n if (this.distanceUnit === \"km\") {\n return \"kilometer\";\n }\n return \"\";\n },\n\n /**\n * Retourne une optimisation\n * @returns {String} optimization\n */\n getOptimization : function () {\n if (this.optimization) {\n return this.optimization;\n } else {\n return \"\";\n }\n },\n\n /**\n * Retourne la liste des constraints\n * @returns {String} une liste des constraints (sep '|')\n */\n getConstraints : function () {\n var constraintArray = [];\n\n if (this.constraints.length !== 0) {\n for (var k = 0; k < this.constraints.length; k++) {\n constraintArray.push(JSON.stringify(this.constraints[k]));\n }\n }\n return constraintArray.join(\"|\");\n }\n};\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Array} liste de paramêtres\n */\nRouteParamREST.prototype.getParams = function () {\n var map = [];\n\n map.push({\n k : \"resource\",\n v : this.resource\n });\n\n map.push({\n k : \"start\",\n v : this.start\n });\n\n map.push({\n k : \"end\",\n v : this.end\n });\n\n map.push({\n k : \"geometryFormat\",\n v : \"geojson\"\n });\n\n if (this.optimization) {\n map.push({\n k : \"optimization\",\n v : this.getOptimization()\n });\n }\n\n if (this.intermediates) {\n map.push({\n k : \"intermediates\",\n v : this.getIntermediates()\n });\n }\n\n if (this.profile) {\n map.push({\n k : \"profile\",\n v : this.getProfile()\n });\n }\n\n if (this.constraints) {\n map.push({\n k : \"constraints\",\n v : this.getConstraints()\n });\n }\n\n if (this.crs) {\n map.push({\n k : \"crs\",\n v : this.crs\n });\n }\n\n if (this.distanceUnit) {\n map.push({\n k : \"distanceUnit\",\n v : this.getDistanceUnit()\n });\n }\n\n if (this.timeUnit) {\n map.push({\n k : \"timeUnit\",\n v : this.timeUnit\n });\n }\n\n if (this.waysAttributes) {\n map.push({\n k : \"waysAttributes\",\n v : this.getWaysAttributes()\n });\n }\n\n return map;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RouteParamREST);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvUm91dGUvUmVxdWVzdC9tb2RlbC9Sb3V0ZVBhcmFtUkVTVC5qcz9jYjhkIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUN1RDs7QUFFdkQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLGtCQUFrQiw4REFBTTtBQUN4QjtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBR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gfSxcblxuICAgIC8qKlxuICAgICAqIFJldG91cm5lIHVuIHByb2ZpbGVcbiAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSBwcm9maWxlXG4gICAgICovXG4gICAgZ2V0UHJvZmlsZSA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMucHJvZmlsZTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogUmV0b3VybmUgdW4gZGlzdGFuY2VVbml0XG4gICAgICogQHJldHVybnMge1N0cmluZ30gZGlzdGFuY2VVbml0XG4gICAgICovXG4gICAgZ2V0RGlzdGFuY2VVbml0IDogZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAodGhpcy5kaXN0YW5jZVVuaXQgPT09IFwibVwiKSB7XG4gICAgICAgICAgICByZXR1cm4gXCJtZXRlclwiO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzLmRpc3RhbmNlVW5pdCA9PT0gXCJrbVwiKSB7XG4gICAgICAgICAgICByZXR1cm4gXCJraWxvbWV0ZXJcIjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gXCJcIjtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogUmV0b3VybmUgdW5lIG9wdGltaXNhdGlvblxuICAgICAqIEByZXR1cm5zIHtTdHJpbmd9IG9wdGltaXphdGlvblxuICAgICAqL1xuICAgIGdldE9wdGltaXphdGlvbiA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgaWYgKHRoaXMub3B0aW1pemF0aW9uKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5vcHRpbWl6YXRpb247XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gXCJcIjtcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBSZXRvdXJuZSBsYSBsaXN0ZSBkZXMgY29uc3RyYWludHNcbiAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSB1bmUgbGlzdGUgZGVzIGNvbnN0cmFpbnRzIChzZXAgJ3wnKVxuICAgICAqL1xuICAgIGdldENvbnN0cmFpbnRzIDogZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgY29uc3RyYWludEFycmF5ID0gW107XG5cbiAgICAgICAgaWYgKHRoaXMuY29uc3RyYWludHMubGVuZ3RoICE9PSAwKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IHRoaXMuY29uc3RyYWludHMubGVuZ3RoOyBrKyspIHtcbiAgICAgICAgICAgICAgICBjb25zdHJhaW50QXJyYXkucHVzaChKU09OLnN0cmluZ2lmeSh0aGlzLmNvbnN0cmFpbnRzW2tdKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGNvbnN0cmFpbnRBcnJheS5qb2luKFwifFwiKTtcbiAgICB9XG59O1xuXG4vKipcbiAqIFRhYmxlYXUgZGUgY2xlZnMvdmFsZXVycyBwb3VyIHBhcmFtLlxuICpcbiAqIEByZXR1cm5zIHtBcnJheX0gbGlzdGUgZGUgcGFyYW3DqnRyZXNcbiAqL1xuUm91dGVQYXJhbVJFU1QucHJvdG90eXBlLmdldFBhcmFtcyA9IGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgbWFwID0gW107XG5cbiAgICBtYXAucHVzaCh7XG4gICAgICAgIGsgOiBcInJlc291cmNlXCIsXG4gICAgICAgIHYgOiB0aGlzLnJlc291cmNlXG4gICAgfSk7XG5cbiAgICBtYXAucHVzaCh7XG4gICAgICAgIGsgOiBcInN0YXJ0XCIsXG4gICAgICAgIHYgOiB0aGlzLnN0YXJ0XG4gICAgfSk7XG5cbiAgICBtYXAucHVzaCh7XG4gICAgICAgIGsgOiBcImVuZFwiLFxuICAgICAgICB2IDogdGhpcy5lbmRcbiAgICB9KTtcblxuICAgIG1hcC5wdXNoKHtcbiAgICAgICAgayA6IFwiZ2VvbWV0cnlGb3JtYXRcIixcbiAgICAgICAgdiA6IFwiZ2VvanNvblwiXG4gICAgfSk7XG5cbiAgICBpZiAodGhpcy5vcHRpbWl6YXRpb24pIHtcbiAgICAgICAgbWFwLnB1c2goe1xuICAgICAgICAgICAgayA6IFwib3B0aW1pemF0aW9uXCIsXG4gICAgICAgICAgICB2IDogdGhpcy5nZXRPcHRpbWl6YXRpb24oKVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBpZiAodGhpcy5pbnRlcm1lZGlhdGVzKSB7XG4gICAgICAgIG1hcC5wdXNoKHtcbiAgICAgICAgICAgIGsgOiBcImludGVybWVkaWF0ZXNcIixcbiAgICAgICAgICAgIHYgOiB0aGlzLmdldEludGVybWVkaWF0ZXMoKVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBpZiAodGhpcy5wcm9maWxlKSB7XG4gICAgICAgIG1hcC5wdXNoKHtcbiAgICAgICAgICAgIGsgOiBcInByb2ZpbGVcIixcbiAgICAgICAgICAgIHYgOiB0aGlzLmdldFByb2ZpbGUoKVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBpZiAodGhpcy5jb25zdHJhaW50cykge1xuICAgICAgICBtYXAucHVzaCh7XG4gICAgICAgICAgICBrIDogXCJjb25zdHJhaW50c1wiLFxuICAgICAgICAgICAgdiA6IHRoaXMuZ2V0Q29uc3RyYWludHMoKVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBpZiAodGhpcy5jcnMpIHtcbiAgICAgICAgbWFwLnB1c2goe1xuICAgICAgICAgICAgayA6IFwiY3JzXCIsXG4gICAgICAgICAgICB2IDogdGhpcy5jcnNcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuZGlzdGFuY2VVbml0KSB7XG4gICAgICAgIG1hcC5wdXNoKHtcbiAgICAgICAgICAgIGsgOiBcImRpc3RhbmNlVW5pdFwiLFxuICAgICAgICAgICAgdiA6IHRoaXMuZ2V0RGlzdGFuY2VVbml0KClcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMudGltZVVuaXQpIHtcbiAgICAgICAgbWFwLnB1c2goe1xuICAgICAgICAgICAgayA6IFwidGltZVVuaXRcIixcbiAgICAgICAgICAgIHYgOiB0aGlzLnRpbWVVbml0XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGlmICh0aGlzLndheXNBdHRyaWJ1dGVzKSB7XG4gICAgICAgIG1hcC5wdXNoKHtcbiAgICAgICAgICAgIGsgOiBcIndheXNBdHRyaWJ1dGVzXCIsXG4gICAgICAgICAgICB2IDogdGhpcy5nZXRXYXlzQXR0cmlidXRlcygpXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHJldHVybiBtYXA7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBSb3V0ZVBhcmFtUkVTVDtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Route/Request/model/RouteParamREST.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js": +/*!***********************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js ***! + \***********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _model_RouteResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./model/RouteResponse */ \"./node_modules/geoportal-access-lib/src/Services/Route/Response/model/RouteResponse.js\");\n/* harmony import */ var _model_RouteInstruction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./model/RouteInstruction */ \"./node_modules/geoportal-access-lib/src/Services/Route/Response/model/RouteInstruction.js\");\n\n\n\n\n\n\n/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module RouteResponseFactory\n * @alias Gp.Services.Route.Response.RouteResponseFactory\n * @private\n */\nvar RouteResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Route\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"RouteResponseFactory\");\n logger.trace(\"RouteResponseFactory::build()\");\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n logger.trace(\"analyze response : json\");\n\n var JSONResponse;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // construction de l'objet réponse JSON\n if (JSONResponse) {\n // le service renvoie t il une erreur ?\n if (JSONResponse.message) {\n // ex. {\"message\":\"message not null\", \"status\":\"ERROR\"}\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", JSONResponse.message)));\n return;\n }\n var legs = [];\n var legSteps = [];\n var steps = [];\n\n data = new _model_RouteResponse__WEBPACK_IMPORTED_MODULE_3__[\"default\"]();\n\n if (data.hasOwnProperty(\"totalTime\")) {\n data.totalTime = parseFloat(JSONResponse.duration);\n }\n if (data.hasOwnProperty(\"totalDistance\")) {\n data.totalDistance = parseFloat(JSONResponse.distance);\n }\n\n if (data.hasOwnProperty(\"bbox\")) {\n data.bbox.left = parseFloat(JSONResponse.bbox[0]);\n data.bbox.bottom = parseFloat(JSONResponse.bbox[1]);\n data.bbox.right = parseFloat(JSONResponse.bbox[2]);\n data.bbox.top = parseFloat(JSONResponse.bbox[3]);\n }\n\n if (data.hasOwnProperty(\"routeGeometry\") && !options.geometryInInstructions) {\n data.routeGeometry = JSONResponse.geometry;\n }\n\n if (data.hasOwnProperty(\"routeInstructions\") && options.geometryInInstructions) {\n var legList = JSONResponse.portions;\n var i;\n if (Array.isArray(legList) && legList.length) {\n for (i = 0; i < legList.length; i++) {\n legs.push(legList[i]);\n }\n }\n if (legs.length) {\n for (i = 0; i < legs.length; i++) {\n legSteps.push(legs[i].steps);\n }\n }\n if (legSteps.length) {\n for (i = 0; i < legSteps.length; i++) {\n steps = steps.concat(legSteps[i]);\n }\n }\n\n steps.forEach(function (step) {\n data.routeInstructions.push(new _model_RouteInstruction__WEBPACK_IMPORTED_MODULE_4__[\"default\"]());\n data.routeInstructions[data.routeInstructions.length - 1].duration = step.duration;\n data.routeInstructions[data.routeInstructions.length - 1].distance = step.distance;\n data.routeInstructions[data.routeInstructions.length - 1].code = \"\";\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"\";\n data.routeInstructions[data.routeInstructions.length - 1].geometry = step.geometry;\n\n // on ne souhaite pas de ce type de valeur...\n if (step.name === \"Valeur non renseignée\") {\n step.name = \"\";\n }\n\n switch (step.instruction.type) {\n case \"turn\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Tourner\";\n break;\n case \"new name\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Continuer tout droit\";\n break;\n case \"depart\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Départ\";\n break;\n case \"arrive\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Arrivée\";\n break;\n case \"merge\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Rejoindre\";\n break;\n case \"ramp\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Prendre la bretelle\";\n break;\n case \"on ramp\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Prendre la bretelle\";\n break;\n case \"off ramp\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Prendre la sortie\";\n break;\n case \"fork\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Sur la bifurcation, prendre\";\n break;\n case \"end of road\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"À la fin de la route, prendre\";\n break;\n case \"use lane\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Utiliser la file\";\n break;\n case \"continue\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Continuer\";\n break;\n case \"roundabout\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Au rond-point\";\n break;\n case \"rotary\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Au rond-point\";\n break;\n case \"roundabout turn\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"Au rond point, tourner\";\n break;\n case \"notification\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"\";\n break;\n default:\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \"?\" + step.instruction.type + \"?\";\n break;\n }\n\n if (step.instruction.modifier) {\n switch (step.instruction.modifier) {\n case \"uturn\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Faire demi-tour\";\n break;\n case \"sharp right\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \" complètement à droite\";\n break;\n case \"right\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \" à droite\";\n break;\n case \"slight right\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \" légèrement à droite\";\n break;\n case \"straight\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction = \"Continuer tout droit\";\n break;\n case \"slight left\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \" lègèrement à gauche\";\n break;\n case \"left\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \" à gauche\";\n break;\n case \"sharp left\":\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \" complètement à gauche\";\n break;\n default:\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \" ?\" + step.instruction.modifier + \"?\";\n break;\n }\n }\n\n if (step.instruction.exit) {\n data.routeInstructions[data.routeInstructions.length - 1].instruction += `${step.instruction.exit}e sortie`;\n }\n\n if (step.attributes.name) {\n if (step.attributes.name.nom_1_droite || step.attributes.name.toponyme) {\n data.routeInstructions[data.routeInstructions.length - 1].instruction += \" sur\";\n }\n\n if (step.attributes.name.nom_1_droite) {\n data.routeInstructions[data.routeInstructions.length - 1].instruction += ` ${step.attributes.name.nom_1_droite}`;\n }\n\n if (step.attributes.name.toponyme) {\n data.routeInstructions[data.routeInstructions.length - 1].instruction += ` ${step.attributes.name.toponyme}`;\n }\n }\n });\n }\n }\n\n if (!data) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_ANALYSE\", \"json\")));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data.exceptionReport) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION_2\")));\n return;\n }\n }\n } else {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RouteResponseFactory);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvUm91dGUvUmVzcG9uc2UvUm91dGVSZXNwb25zZUZhY3RvcnkuanM/OWY1MyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBb0Q7QUFDQTtBQUNRO0FBQ1Y7QUFDTTs7QUFFeEQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxlQUFlLE9BQU87QUFDdEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHFCQUFxQiw4REFBTTtBQUMzQjs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGFBQWE7QUFDYjs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxpQkFBaUI7QUFDakI7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGdDQUFnQztBQUNoQyxnRUFBZ0UsZ0VBQVksQ0FBQyxnRUFBSTtBQUNqRjtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLCtCQUErQiw0REFBYTs7QUFFNUM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1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Y3RvcnlcbiAqIEBwcml2YXRlXG4gKi9cbnZhciBSb3V0ZVJlc3BvbnNlRmFjdG9yeSA9IHtcblxuICAgIC8qKlxuICAgICAqIGludGVyZmFjZSB1bmlxdWVcbiAgICAgKlxuICAgICAqIEBtZXRob2QgYnVpbGRcbiAgICAgKiBAc3RhdGljXG4gICAgICogQHBhcmFtIHtPYmplY3R9IG9wdGlvbnMgLSBvcHRpb25zIGRlZmluaWVzIGRhbnMgbGUgY29tcG9zYW50IFJvdXRlXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqICAgdmFyIG9wdGlvbnMgPSB7XG4gICAgICogICAgICByZXNwb25zZSA6XG4gICAgICogICAgICBvdXRwdXRGb3JtYXQgOlxuICAgICAqICAgICAgcmF3UmVzcG9uc2UgOlxuICAgICAqICAgICAgc2NvcGUgOlxuICAgICAqICAgICAgb25TdWNjZXNzIDpcbiAgICAgKiAgICAgIG9uRXJyb3IgOlxuICAgICAqICAgfTtcbiAgICAgKlxuICAgICAqL1xuICAgIGJ1aWxkIDogZnVuY3Rpb24gKG9wdGlvbnMpIHtcbiAgICAgICAgLy8gbG9nZ2VyXG4gICAgICAgIHZhciBsb2dnZXIgPSBMb2dnZXIuZ2V0TG9nZ2VyKFwiUm91dGVSZXNwb25zZUZhY3RvcnlcIik7XG4gICAgICAgIGxvZ2dlci50cmFjZShcIlJvdXRlUmVzcG9uc2VGYWN0b3J5OjpidWlsZCgpXCIpO1xuXG4gICAgICAgIHZhciBkYXRhID0gbnVsbDtcblxuICAgICAgICBpZiAob3B0aW9ucy5yZXNwb25zZSkge1xuICAgICAgICAgICAgaWYgKG9wdGlvbnMucmF3UmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJhbmFseXplIHJlc3BvbnNlIDogcmF3XCIpO1xuICAgICAgICAgICAgICAgIGRhdGEgPSBvcHRpb25zLnJlc3BvbnNlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJhbmFseXplIHJlc3BvbnNlIDoganNvblwiKTtcblxuICAgICAgICAgICAgICAgIHZhciBKU09OUmVzcG9uc2U7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLnJlc3BvbnNlID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgIEpTT05SZXNwb25zZSA9IEpTT04ucGFyc2Uob3B0aW9ucy5yZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgSlNPTlJlc3BvbnNlID0gb3B0aW9ucy5yZXNwb25zZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBjb25zdHJ1Y3Rpb24gZGUgbCdvYmpldCByw6lwb25zZSBKU09OXG4gICAgICAgICAgICAgICAgaWYgKEpTT05SZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBsZSBzZXJ2aWNlIHJlbnZvaWUgdCBpbCB1bmUgZXJyZXVyID9cbiAgICAgICAgICAgICAgICAgICAgaWYgKEpTT05SZXNwb25zZS5tZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBleC4ge1wibWVzc2FnZVwiOlwibWVzc2FnZSBub3QgbnVsbFwiLCBcInN0YXR1c1wiOlwiRVJST1JcIn1cbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2UoTVJlcy5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FWENFUFRJT05cIiwgSlNPTlJlc3BvbnNlLm1lc3NhZ2UpKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdmFyIGxlZ3MgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxlZ1N0ZXBzID0gW107XG4gICAgICAgICAgICAgICAgICAgIHZhciBzdGVwcyA9IFtdO1xuXG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBuZXcgUm91dGVSZXNwb25zZSgpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLmhhc093blByb3BlcnR5KFwidG90YWxUaW1lXCIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnRvdGFsVGltZSA9IHBhcnNlRmxvYXQoSlNPTlJlc3BvbnNlLmR1cmF0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YS5oYXNPd25Qcm9wZXJ0eShcInRvdGFsRGlzdGFuY2VcIikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEudG90YWxEaXN0YW5jZSA9IHBhcnNlRmxvYXQoSlNPTlJlc3BvbnNlLmRpc3RhbmNlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLmhhc093blByb3BlcnR5KFwiYmJveFwiKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5iYm94LmxlZnQgPSBwYXJzZUZsb2F0KEpTT05SZXNwb25zZS5iYm94WzBdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuYmJveC5ib3R0b20gPSBwYXJzZUZsb2F0KEpTT05SZXNwb25zZS5iYm94WzFdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuYmJveC5yaWdodCA9IHBhcnNlRmxvYXQoSlNPTlJlc3BvbnNlLmJib3hbMl0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5iYm94LnRvcCA9IHBhcnNlRmxvYXQoSlNPTlJlc3BvbnNlLmJib3hbM10pO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEuaGFzT3duUHJvcGVydHkoXCJyb3V0ZUdlb21ldHJ5XCIpICYmICFvcHRpb25zLmdlb21ldHJ5SW5JbnN0cnVjdGlvbnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucm91dGVHZW9tZXRyeSA9IEpTT05SZXNwb25zZS5nZW9tZXRyeTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLmhhc093blByb3BlcnR5KFwicm91dGVJbnN0cnVjdGlvbnNcIikgJiYgb3B0aW9ucy5nZW9tZXRyeUluSW5zdHJ1Y3Rpb25zKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGVnTGlzdCA9IEpTT05SZXNwb25zZS5wb3J0aW9ucztcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkobGVnTGlzdCkgJiYgbGVnTGlzdC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVnTGlzdC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWdzLnB1c2gobGVnTGlzdFtpXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxlZ3MubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGxlZ3MubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVnU3RlcHMucHVzaChsZWdzW2ldLnN0ZXBzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobGVnU3RlcHMubG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c3RydWN0aW9ucy5sZW5ndGggLSAxXS5nZW9tZXRyeSA9IHN0ZXAuZ2VvbWV0cnk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBvbiBuZSBzb3VoYWl0ZSBwYXMgZGUgY2UgdHlwZSBkZSB2YWxldXIuLi5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RlcC5uYW1lID09PSBcIlZhbGV1ciBub24gcmVuc2VpZ27DqWVcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGVwLm5hbWUgPSBcIlwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoc3RlcC5pbnN0cnVjdGlvbi50eXBlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJ0dXJuXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zW2RhdGEucm91dGVJbnN0cnVjdGlvbnMubGVuZ3RoIC0gMV0uaW5zdHJ1Y3Rpb24gKz0gXCJUb3VybmVyXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcIm5ldyBuYW1lXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zW2RhdGEucm91dGVJbnN0cnVjdGlvbnMubGVuZ3RoIC0gMV0uaW5zdHJ1Y3Rpb24gKz0gXCJDb250aW51ZXIgdG91dCBkcm9pdFwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJkZXBhcnRcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucm91dGVJbnN0cnVjdGlvbnNbZGF0YS5yb3V0ZUluc3RydWN0aW9ucy5sZW5ndGggLSAxXS5pbnN0cnVjdGlvbiArPSBcIkTDqXBhcnRcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwiYXJyaXZlXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zW2RhdGEucm91dGVJbnN0cnVjdGlvbnMubGVuZ3RoIC0gMV0uaW5zdHJ1Y3Rpb24gKz0gXCJBcnJpdsOpZVwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJtZXJnZVwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5yb3V0ZUluc3RydWN0aW9uc1tkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zLmxlbmd0aCAtIDFdLmluc3RydWN0aW9uICs9IFwiUmVqb2luZHJlXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInJhbXBcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucm91dGVJbnN0cnVjdGlvbnNbZGF0YS5yb3V0ZUluc3RydWN0aW9ucy5sZW5ndGggLSAxXS5pbnN0cnVjdGlvbiArPSBcIlByZW5kcmUgbGEgYnJldGVsbGVcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwib24gcmFtcFwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5yb3V0ZUluc3RydWN0aW9uc1tkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zLmxlbmd0aCAtIDFdLmluc3RydWN0aW9uICs9IFwiUHJlbmRyZSBsYSBicmV0ZWxsZVwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJvZmYgcmFtcFwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5yb3V0ZUluc3RydWN0aW9uc1tkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zLmxlbmd0aCAtIDFdLmluc3RydWN0aW9uICs9IFwiUHJlbmRyZSBsYSBzb3J0aWVcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwiZm9ya1wiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5yb3V0ZUluc3RydWN0aW9uc1tkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zLmxlbmd0aCAtIDFdLmluc3RydWN0aW9uICs9IFwiU3VyIGxhIGJpZnVyY2F0aW9uLCBwcmVuZHJlXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcImVuZCBvZiByb2FkXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zW2RhdGEucm91dGVJbnN0cnVjdGlvbnMubGVuZ3RoIC0gMV0uaW5zdHJ1Y3Rpb24gKz0gXCLDgCBsYSBmaW4gZGUgbGEgcm91dGUsIHByZW5kcmVcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwidXNlIGxhbmVcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucm91dGVJbnN0cnVjdGlvbnNbZGF0YS5yb3V0ZUluc3RydWN0aW9ucy5sZW5ndGggLSAxXS5pbnN0cnVjdGlvbiArPSBcIlV0aWxpc2VyIGxhIGZpbGVcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwiY29udGludWVcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucm91dGVJbnN0cnVjdGlvbnNbZGF0YS5yb3V0ZUluc3RydWN0aW9ucy5sZW5ndGggLSAxXS5pbnN0cnVjdGlvbiArPSBcIkNvbnRpbnVlclwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJyb3VuZGFib3V0XCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zW2RhdGEucm91dGVJbnN0cnVjdGlvbnMubGVuZ3RoIC0gMV0uaW5zdHJ1Y3Rpb24gKz0gXCJBdSByb25kLXBvaW50XCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInJvdGFyeVwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5yb3V0ZUluc3RydWN0aW9uc1tkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zLmxlbmd0aCAtIDFdLmluc3RydWN0aW9uICs9IFwiQXUgcm9uZC1wb2ludFwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJyb3VuZGFib3V0IHR1cm5cIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucm91dGVJbnN0cnVjdGlvbnNbZGF0YS5yb3V0ZUluc3RydWN0aW9ucy5sZW5ndGggLSAxXS5pbnN0cnVjdGlvbiArPSBcIkF1IHJvbmQgcG9pbnQsIHRvdXJuZXJcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwibm90aWZpY2F0aW9uXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zW2RhdGEucm91dGVJbnN0cnVjdGlvbnMubGVuZ3RoIC0gMV0uaW5zdHJ1Y3Rpb24gKz0gXCJcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5yb3V0ZUluc3RydWN0aW9uc1tkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zLmxlbmd0aCAtIDFdLmluc3RydWN0aW9uICs9IFwiP1wiICsgc3RlcC5pbnN0cnVjdGlvbi50eXBlICsgXCI/XCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RlcC5pbnN0cnVjdGlvbi5tb2RpZmllcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKHN0ZXAuaW5zdHJ1Y3Rpb24ubW9kaWZpZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJ1dHVyblwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucm91dGVJbnN0cnVjdGlvbnNbZGF0YS5yb3V0ZUluc3RydWN0aW9ucy5sZW5ndGggLSAxXS5pbnN0cnVjdGlvbiA9IFwiRmFpcmUgZGVtaS10b3VyXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwic2hhcnAgcmlnaHRcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zW2RhdGEucm91dGVJbnN0cnVjdGlvbnMubGVuZ3RoIC0gMV0uaW5zdHJ1Y3Rpb24gKz0gXCIgY29tcGzDqHRlbWVudCDDoCBkcm9pdGVcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJyaWdodFwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucm91dGVJbnN0cnVjdGlvbnNbZGF0YS5yb3V0ZUluc3RydWN0aW9ucy5sZW5ndGggLSAxXS5pbnN0cnVjdGlvbiArPSBcIiDDoCBkcm9pdGVcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJzbGlnaHQgcmlnaHRcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zW2RhdGEucm91dGVJbnN0cnVjdGlvbnMubGVuZ3RoIC0gMV0uaW5zdHJ1Y3Rpb24gKz0gXCIgbMOpZ8OocmVtZW50IMOgIGRyb2l0ZVwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInN0cmFpZ2h0XCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5yb3V0ZUluc3RydWN0aW9uc1tkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zLmxlbmd0aCAtIDFdLmluc3RydWN0aW9uID0gXCJDb250aW51ZXIgdG91dCBkcm9pdFwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInNsaWdodCBsZWZ0XCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5yb3V0ZUluc3RydWN0aW9uc1tkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zLmxlbmd0aCAtIDFdLmluc3RydWN0aW9uICs9IFwiIGzDqGfDqHJlbWVudCDDoCBnYXVjaGVcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJsZWZ0XCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5yb3V0ZUluc3RydWN0aW9uc1tkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zLmxlbmd0aCAtIDFdLmluc3RydWN0aW9uICs9IFwiIMOgIGdhdWNoZVwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInNoYXJwIGxlZnRcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zW2RhdGEucm91dGVJbnN0cnVjdGlvbnMubGVuZ3RoIC0gMV0uaW5zdHJ1Y3Rpb24gKz0gXCIgY29tcGzDqHRlbWVudCDDoCBnYXVjaGVcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5yb3V0ZUluc3RydWN0aW9uc1tkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zLmxlbmd0aCAtIDFdLmluc3RydWN0aW9uICs9IFwiID9cIiArIHN0ZXAuaW5zdHJ1Y3Rpb24ubW9kaWZpZXIgKyBcIj9cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGVwLmluc3RydWN0aW9uLmV4aXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5yb3V0ZUluc3RydWN0aW9uc1tkYXRhLnJvdXRlSW5zdHJ1Y3Rpb25zLmxlbmd0aCAtIDFdLmluc3RydWN0aW9uICs9IGAke3N0ZXAuaW5zdHJ1Y3Rpb24uZXhpdH1lIHNvcnRpZWA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0ZXAuYXR0cmlidXRlcy5uYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGVwLmF0dHJpYnV0ZXMubmFtZS5ub21fMV9kcm9pdGUgfHwgc3RlcC5hdHRyaWJ1dGVzLm5hbWUudG9wb255bWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucm91dGVJbnN0cnVjdGlvbnNbZGF0YS5yb3V0ZUluc3RydWN0aW9ucy5sZW5ndGggLSAxXS5pbnN0cnVjdGlvbiArPSBcIiBzdXJcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGVwLmF0dHJpYnV0ZXMubmFtZS5ub21fMV9kcm9pdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucm91dGVJbnN0cnVjdGlvbnNbZGF0YS5yb3V0ZUluc3RydWN0aW9ucy5sZW5ndGggLSAxXS5pbnN0cnVjdGlvbiArPSBgICR7c3RlcC5hdHRyaWJ1dGVzLm5hbWUubm9tXzFfZHJvaXRlfWA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RlcC5hdHRyaWJ1dGVzLm5hbWUudG9wb255bWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucm91dGVJbnN0cnVjdGlvbnNbZGF0YS5yb3V0ZUluc3RydWN0aW9ucy5sZW5ndGggLSAxXS5pbnN0cnVjdGlvbiArPSBgICR7c3RlcC5hdHRyaWJ1dGVzLm5hbWUudG9wb255bWV9YDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKCFkYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2UoTVJlcy5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9BTkFMWVNFXCIsIFwianNvblwiKSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gU2kgbGEgcsOpcG9uc2UgY29udGVuYWl0IHVuZSBleGNlcHRpb24gcmVudm95w6llIHBhciBsZSBzZXJ2aWNlXG4gICAgICAgICAgICAgICAgaWYgKGRhdGEuZXhjZXB0aW9uUmVwb3J0KSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2UoTVJlcy5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FWENFUFRJT05fMlwiKSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZShNUmVzLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBvcHRpb25zLm9uU3VjY2Vzcy5jYWxsKG9wdGlvbnMuc2NvcGUsIGRhdGEpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IFJvdXRlUmVzcG9uc2VGYWN0b3J5O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Route/Response/model/RouteInstruction.js": +/*!*************************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Route/Response/model/RouteInstruction.js ***! + \*************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Single Route Instruction object.\n *\n * @property {String} code - Instruction code :\n *\n * - \"F\" : Straight forward\n * - \"B\" : U-turn\n * - \"L\" : turn left\n * - \"R\" : turn right\n * - \"BL\" : turn left strongly\n * - \"BR\" : turn right strongly\n * - \"FL\" : turn lightly to the left\n * - \"FR\" : turn lightly to the right\n * - \"round_about_entry\" : round about entry\n * - \"round_about_exit\" : round about exit\n *\n * @property {String} instruction - Instruction text : translated code + street name\n * @property {Object} geometry - Geometry (expressed in [GeoJSON]{@link http://geojson.org/}) of the street.\n * @property {Float} distance - Length of the instruction. Expressed in km or m, depending on distanceUnit parameter.\n * @property {Float} duration - Instruction duration in seconds.\n *\n * @namespace\n * @alias Gp.Services.Route.RouteInstruction\n */\nfunction RouteInstruction () {\n if (!(this instanceof RouteInstruction)) {\n throw new TypeError(\"RouteInstruction constructor cannot be called as a function.\");\n }\n\n this.duration = null;\n\n this.distance = null;\n\n this.code = null;\n\n this.instruction = null;\n\n this.geometry = null; // FIXME can be null if option 'geometryInInstructions' is false !\n}\n\nRouteInstruction.prototype = {\n\n constructor : RouteInstruction\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RouteInstruction);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvUm91dGUvUmVzcG9uc2UvbW9kZWwvUm91dGVJbnN0cnVjdGlvbi5qcz9mNmRkIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0E7QUFDQTtBQUNBO0FBQ0EsY0FBYyxPQUFPO0FBQ3JCO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Lmdlb21ldHJ5ID0gbnVsbDsgLy8gRklYTUUgY2FuIGJlIG51bGwgaWYgb3B0aW9uICdnZW9tZXRyeUluSW5zdHJ1Y3Rpb25zJyBpcyBmYWxzZSAhXG59XG5cblJvdXRlSW5zdHJ1Y3Rpb24ucHJvdG90eXBlID0ge1xuXG4gICAgY29uc3RydWN0b3IgOiBSb3V0ZUluc3RydWN0aW9uXG5cbn07XG5cbmV4cG9ydCBkZWZhdWx0IFJvdXRlSW5zdHJ1Y3Rpb247XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Route/Response/model/RouteInstruction.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Route/Response/model/RouteResponse.js": +/*!**********************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Route/Response/model/RouteResponse.js ***! + \**********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Response object for {@link module:Services~route Gp.Services.route ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Gp.BBox} bbox - Bounding Box of the route. Given when provideBBox parameter is used in function call.\n * @property {Object} routeGeometry - Geometry (expressed in [GeoJSON]{@link http://geojson.org/}) of the route.\n * @property {Array.} routeInstructions - Instructions of the route.\n * @property {String} totalDistance - Length of the route. If distanceUnit parameter was set to \"km\" (default), totalDistance is a string containing the total distance expressed in kilometers, followed by \" Km\" (e.g. : \"19.6 Km\"). If distanceUnit parameter was set to \"m\", totalDistance is a string containing the total distance expressed in meters (e.g. : \"19599.14\").\n * @property {Float} totalTime - Route duration in seconds.\n *\n * @namespace\n * @alias Gp.Services.RouteResponse\n */\nfunction RouteResponse () {\n if (!(this instanceof RouteResponse)) {\n throw new TypeError(\"RouteResponse constructor cannot be called as a function.\");\n }\n\n this.totalTime = null;\n\n this.totalDistance = null;\n\n this.bbox = {\n left : null,\n right : null,\n top : null,\n bottom : null\n };\n\n this.routeGeometry = null; // FIXME can be null if option 'geometryInInstructions' is true !\n\n this.routeInstructions = [];\n}\n\nRouteResponse.prototype = {\n\n constructor : RouteResponse\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RouteResponse);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvUm91dGUvUmVzcG9uc2UvbW9kZWwvUm91dGVSZXNwb25zZS5qcz8yNjYyIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFDQSx3QkFBd0IsaURBQWlEO0FBQ3pFO0FBQ0EsY0FBYyxRQUFRO0FBQ3RCLGNBQWMsT0FBTyxrREFBa0QsMEJBQTBCO0FBQ2pHLGNBQWMsMkNBQTJDO0FBQ3pELGNBQWMsT0FBTztBQUNyQixjQUFjLE1BQU07QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsOEJBQThCOztBQUU5QjtBQUNBOztBQUVBOztBQUVBOztBQUVBOztBQUVlLDRFQUFhLEVBQUMiLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZ2VvcG9ydGFsLWFjY2Vzcy1saWIvc3JjL1NlcnZpY2VzL1JvdXRlL1Jlc3BvbnNlL21vZGVsL1JvdXRlUmVzcG9uc2UuanMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFJlc3BvbnNlIG9iamVjdCBmb3Ige0BsaW5rIG1vZHVsZTpTZXJ2aWNlc35yb3V0ZSBHcC5TZXJ2aWNlcy5yb3V0ZSAoKX0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S4xNFwiKS5cbiAqIEBwcm9wZXJ0eSB7RmxvYXR9IHRvdGFsVGltZSAtIFJvdXRlIGR1cmF0aW9uIGluIHNlY29uZHMuXG4gKlxuICogQG5hbWVzcGFjZVxuICogQGFsaWFzIEdwLlNlcnZpY2VzLlJvdXRlUmVzcG9uc2VcbiAqL1xuZnVuY3Rpb24gUm91dGVSZXNwb25zZSAoKSB7XG4gICAgaWYgKCEodGhpcyBpbnN0YW5jZW9mIFJvdXRlUmVzcG9uc2UpKSB7XG4gICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJSb3V0ZVJlc3BvbnNlIGNvbnN0cnVjdG9yIGNhbm5vdCBiZSBjYWxsZWQgYXMgYSBmdW5jdGlvbi5cIik7XG4gICAgfVxuXG4gICAgdGhpcy50b3RhbFRpbWUgPSBudWxsO1xuXG4gICAgdGhpcy50b3RhbERpc3RhbmNlID0gbnVsbDtcblxuICAgIHRoaXMuYmJveCA9IHtcbiAgICAgICAgbGVmdCA6IG51bGwsXG4gICAgICAgIHJpZ2h0IDogbnVsbCxcbiAgICAgICAgdG9wIDogbnVsbCxcbiAgICAgICAgYm90dG9tIDogbnVsbFxuICAgIH07XG5cbiAgICB0aGlzLnJvdXRlR2VvbWV0cnkgPSBudWxsOyAvLyBGSVhNRSBjYW4gYmUgbnVsbCBpZiBvcHRpb24gJ2dlb21ldHJ5SW5JbnN0cnVjdGlvbnMnIGlzIHRydWUgIVxuXG4gICAgdGhpcy5yb3V0ZUluc3RydWN0aW9ucyA9IFtdO1xufVxuXG5Sb3V0ZVJlc3BvbnNlLnByb3RvdHlwZSA9IHtcblxuICAgIGNvbnN0cnVjdG9yIDogUm91dGVSZXNwb25zZVxuXG59O1xuXG5leHBvcnQgZGVmYXVsdCBSb3V0ZVJlc3BvbnNlO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Route/Response/model/RouteResponse.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Route/Route.js": +/*!***********************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Route/Route.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Request_RouteRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Request/RouteRequestFactory */ \"./node_modules/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js\");\n/* harmony import */ var _Response_RouteResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Response/RouteResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js\");\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service d'itinéraire du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n *\n * @alias Gp.Services.Route\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.resource - La ressource utilisée pour le calcul. Ce paramètre devrait être obligatoire car il l'est dans l'appel au service. Mais il ne l'est pas pour des raisons de rétrocompatibilité.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service itineraire : 'json' uniquement et par défaut.\n *\n * @param {String} [options.routePreference = \"fastest\"] - Mode de calcul à utiliser :\n * - le plus rapide « fastest »\n * - le plus court « shortest »\n * Par défaut : « fastest ».\n *\n * @param {Object} options.startPoint - Point de départ du calcul. Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.startPoint.x - Abcisse du point de départ du calcul d'itinéraire.\n * @param {Float} options.startPoint.y - Ordonnée du point de départ du calcul d'itinéraire.\n *\n * @param {Object} options.endPoint - Point d'arrivée du calcul. Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.endPoint.x - Abcisse du point d'arrivée du calcul d'itinéraire.\n * @param {Float} options.endPoint.y - Ordonnée du point d'arrivée du calcul d'itinéraire.\n *\n * @param {Object[]} [options.viaPoints] - Liste de point ({x:Float,y:Float}) intermédaires que l'itinéraire doit emprunter dans l'ordre du tableau.\n * Coordonnées exprimées en longitudes, latitudes (EPSG:4326) :{x:float, y:float}\n *\n * @param {String} [options.graph = \"voiture\"] - Type de graphe utilisé : \"Voiture\" ou \"Pieton\".\n * Détermine le profil de vitesses utilisé pour le calcul ainsi que les tronçons autorisés ou non.\n * Par défaut, c'est la valeur \"Voiture\" qui sera utilisée.\n *\n * @param {String[]} [options.exclusions] - DEPRECATED: Critères d'exclusions à appliquer pour le calcul. (correspond au paramètre \"avoidFeature\" d'OpenLS)\n * On précise ici le type de tronçons que l'on ne veut pas que l'itinéraire emprunte\n * (valeurs possibles : « toll » (éviter les péages), « bridge », « tunnel »).\n * Ce paramètre est conservé pour une rétrocompatibilité de l'api. Le nouveau paramètre à utiliser est options.constraints\n *\n * @param {Object[]} [options.constraints] - Critères de contraintes à appliquer sur un itinéraire. Les valeurs disponibles dépendent de la ressource utilisée. Il est donc utile de regarder le getCapabilities.\n * @param {String} [options.constraints.constraintType] - Type de la contrainte. Généralement \"banned\".\n * @param {String} [options.constraints.key] - Clé de la contrainte. Généralement \"wayType\".\n * @param {String} [options.constraints.operator] - Opérateur de la contrainte. Généralement \"=\".\n * @param {String} [options.constraints.value] - Valeur de la contrainte. Généralement \"autoroute\".\n *\n * @param {Boolean} [options.geometryInInstructions = false] - Indique si la géométrie de l'itinéraire doit être reprise morceau par morceau dans les instructions.\n * (correspond au paramètre \"provideGeometry\" d'OpenLS) Par défaut : false.\n *\n * @param {Boolean} [options.provideBbox = true] - Indique si les instructions doivent être localisées par une bbox dans la réponse.\n * Par défaut : true.\n *\n * @param {String} [options.distanceUnit = \"m\"] - Indique si la distance doit être exprimée en km ou m dans la réponse.\n * Par défaut : m.\n * @param {String} [options.timeUnit = \"second\"] - Indique si la durée doit être exprimée en seconde, minute ou heure dans la réponse. Il peut-être formatté hh:mm::ss avec la valeur standard.\n * Les valeurs possibles sont \"standard\", \"second\", \"minute\" ou \"hour\".\n * Par défaut : \"standard\".\n *\n * @param {String} [options.srs] - Système de coordonnées dans lequel les paramètres géographiques en entrée et la réponse du service sont exprimés.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 'EPSG:4326'.\n *\n * @param {String[]} [options.waysAttributes] - Nom des attributs des voies. Les valeurs disponibles dépendent de la ressource utilisée. Il est donc utile de regarder le getCapabilities.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'XHR',\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * resource : 'bdtopo'\n * outputFormat : 'json',\n * startPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * endPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * provideBbox : true,\n * exclusions : [\"Bridge\", \"Tunnel\", \"Toll\"],\n * distanceUnit : \"km\",\n * graph : \"Voiture\",\n * geometryInInstructions : true,\n * routePreference : \"fastest\"\n * };\n *\n */\nfunction Route (options) {\n if (!(this instanceof Route)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Route\"));\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"Route\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.Route\");\n this.logger.trace(\"[Constructeur Route (options)]\");\n\n if (!options.startPoint) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"startPoint\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.startPoint.x === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"startPoint.x\"));\n }\n\n if (options.startPoint.y === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"startPoint.y\"));\n }\n\n if (!options.endPoint) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"endPoint\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.endPoint.x === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"endPoint.x\"));\n }\n\n if (options.endPoint.y === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"endPoint.y\"));\n }\n\n // options par defaut\n\n // on passe l'option outputFormat en minuscules afin d'éviter des exceptions.\n if (options.outputFormat && options.outputFormat !== \"json\") {\n this.logger.warn(\"options.outputFormat could only be json\");\n }\n this.options.outputFormat = \"json\";\n\n this.options.resource = options.resource || \"bdtopo-osrm\";\n this.options.startPoint = options.startPoint;\n this.options.endPoint = options.endPoint;\n this.options.viaPoints = options.viaPoints || [];\n this.options.routePreference = options.routePreference || \"fastest\";\n /** Gestion des anciennes valeurs de graph */\n if (options.graph) {\n if (options.graph === \"Voiture\") {\n this.options.graph = \"car\";\n }\n if (options.graph === \"Pieton\") {\n this.options.graph = \"pedestrian\";\n }\n } else {\n this.options.graph = \"car\";\n }\n this.options.constraints = [];\n if (options.constraints) {\n if (Array.isArray(options.constraints)) {\n for (var k = 0; k < options.constraints.length; k++) {\n this.options.constraints.push(options.constraints[k]);\n }\n } else {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_TYPE\", \"constraints\"));\n }\n }\n\n /** Gestion de l'ancien paramètre exclusion */\n var constraintTunnel = {};\n var constraintPont = {};\n var constraintAutoroute = {};\n if (options.exclusions) {\n if (options.exclusions.length !== 0) {\n this.logger.warn(\"options.exclusions is DEPRECATED !!\");\n for (var c = 0; c < options.exclusions.length; c++) {\n if (typeof options.exclusions[c] === \"string\") {\n options.exclusions[c] = options.exclusions[c].toLowerCase();\n } else {\n // on ne crée pas une erreur pour rétro-compatibilité avec les anciennes versions\n continue;\n }\n if (options.exclusions[c] === \"toll\") {\n constraintAutoroute.constraintType = \"banned\";\n constraintAutoroute.key = \"wayType\";\n constraintAutoroute.operator = \"=\";\n constraintAutoroute.value = \"autoroute\";\n this.options.constraints.push(constraintAutoroute);\n }\n if (options.exclusions[c] === \"tunnel\") {\n constraintTunnel.constraintType = \"banned\";\n constraintTunnel.key = \"wayType\";\n constraintTunnel.operator = \"=\";\n constraintTunnel.value = \"tunnel\";\n this.options.constraints.push(constraintTunnel);\n }\n if (options.exclusions[c] === \"bridge\") {\n constraintPont.constraintType = \"banned\";\n constraintPont.key = \"wayType\";\n constraintPont.operator = \"=\";\n constraintPont.value = \"pont\";\n this.options.constraints.push(constraintPont);\n }\n }\n }\n }\n\n this.options.geometryInInstructions = options.geometryInInstructions || false;\n this.options.provideBbox = options.provideBbox || true;\n this.options.distanceUnit = options.distanceUnit || \"m\";\n this.options.timeUnit = options.timeUnit || \"second\";\n this.options.expectedStartTime = null; // FIXME not yet implemented !\n this.options.srs = options.srs || \"EPSG:4326\";\n this.options.waysAttributes = options.waysAttributes || [];\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n if (!this.options.serverUrl) {\n var UrlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].Route.url(\"calcul\");\n if (!UrlByDefault) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = UrlByDefault;\n this.logger.trace(\"Serveur URL par defaut : \" + this.options.serverUrl);\n }\n}\n\n/**\n * @lends module:Route#\n */\nRoute.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nRoute.prototype.constructor = Route;\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nRoute.prototype.buildRequest = function (error, success) {\n var options = {\n // spécifique au service\n resource : this.options.resource,\n startPoint : this.options.startPoint,\n endPoint : this.options.endPoint,\n viaPoints : this.options.viaPoints,\n provideBbox : this.options.provideBbox,\n constraints : this.options.constraints,\n distanceUnit : this.options.distanceUnit,\n timeUnit : this.options.timeUnit,\n graph : this.options.graph,\n geometryInInstructions : this.options.geometryInInstructions,\n routePreference : this.options.routePreference,\n srs : this.options.srs,\n waysAttributes : this.options.waysAttributes\n };\n\n this.request = _Request_RouteRequestFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build(options);\n\n // on teste si la requete a bien été construite !\n if (!this.request) {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\")));\n } else {\n success.call(this, this.request);\n }\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nRoute.prototype.analyzeResponse = function (error, success) {\n // INFO\n // Factory pour masquer la complexité du retour du service\n\n if (this.response) {\n var options = {\n distanceUnit : this.options.distanceUnit,\n timeUnit : this.options.timeUnit,\n response : this.response,\n outputFormat : this.options.outputFormat, // utile pour parser la string en mode XHR : JSON ou XML !\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this,\n geometryInInstructions : this.options.geometryInInstructions\n };\n\n _Response_RouteResponseFactory__WEBPACK_IMPORTED_MODULE_6__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Route);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvUm91dGUvUm91dGUuanM/ZjE5YyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFDaUQ7QUFDSDtBQUNX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GFuY2llbm5lcyB2YWxldXJzIGRlIGdyYXBoICovXG4gICAgaWYgKG9wdGlvbnMuZ3JhcGgpIHtcbiAgICAgICAgaWYgKG9wdGlvbnMuZ3JhcGggPT09IFwiVm9pdHVyZVwiKSB7XG4gICAgICAgICAgICB0aGlzLm9wdGlvbnMuZ3JhcGggPSBcImNhclwiO1xuICAgICAgICB9XG4gICAgICAgIGlmIChvcHRpb25zLmdyYXBoID09PSBcIlBpZXRvblwiKSB7XG4gICAgICAgICAgICB0aGlzLm9wdGlvbnMuZ3JhcGggPSBcInBlZGVzdHJpYW5cIjtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMub3B0aW9ucy5ncmFwaCA9IFwiY2FyXCI7XG4gICAgfVxuICAgIHRoaXMub3B0aW9ucy5jb25zdHJhaW50cyA9IFtdO1xuICAgIGlmIChvcHRpb25zLmNvbnN0cmFpbnRzKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KG9wdGlvbnMuY29uc3RyYWludHMpKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IG9wdGlvbnMuY29uc3RyYWludHMubGVuZ3RoOyBrKyspIHtcbiAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMuY29uc3RyYWludHMucHVzaChvcHRpb25zLmNvbnN0cmFpbnRzW2tdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihfLmdldE1lc3NhZ2UoXCJQQVJBTV9UWVBFXCIsIFwiY29uc3RyYWludHNcIikpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqIEdlc3Rpb24gZGUgbCdhbmNpZW4gcGFyYW3DqHRyZSBleGNsdXNpb24gKi9cbiAgICB2YXIgY29uc3RyYWludFR1bm5lbCA9IHt9O1xuICAgIHZhciBjb25zdHJhaW50UG9udCA9IHt9O1xuICAgIHZhciBjb25zdHJhaW50QXV0b3JvdXRlID0ge307XG4gICAgaWYgKG9wdGlvbnMuZXhjbHVzaW9ucykge1xuICAgICAgICBpZiAob3B0aW9ucy5leGNsdXNpb25zLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgdGhpcy5sb2dnZXIud2FybihcIm9wdGlvbnMuZXhjbHVzaW9ucyBpcyBERVBSRUNBVEVEICEhXCIpO1xuICAgICAgICAgICAgZm9yICh2YXIgYyA9IDA7IGMgPCBvcHRpb25zLmV4Y2x1c2lvbnMubGVuZ3RoOyBjKyspIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmV4Y2x1c2lvbnNbY10gPSBvcHRpb25zLmV4Y2x1c2lvbnNbY10udG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbiBuZSBjcsOpZSBwYXMgdW5lIGVycmV1ciBwb3VyIHLDqXRyby1jb21wYXRpYmlsaXTDqSBhdmVjIGxlcyBhbmNpZW5uZXMgdmVyc2lvbnNcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmV4Y2x1c2lvbnNbY10gPT09IFwidG9sbFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRBdXRvcm91dGUuY29uc3RyYWludFR5cGUgPSBcImJhbm5lZFwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50QXV0b3JvdXRlLmtleSA9IFwid2F5VHlwZVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50QXV0b3JvdXRlLm9wZXJhdG9yID0gXCI9XCI7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRBdXRvcm91dGUudmFsdWUgPSBcImF1dG9yb3V0ZVwiO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMuY29uc3RyYWludHMucHVzaChjb25zdHJhaW50QXV0b3JvdXRlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9PT0gXCJ0dW5uZWxcIikge1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50VHVubmVsLmNvbnN0cmFpbnRUeXBlID0gXCJiYW5uZWRcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFR1bm5lbC5rZXkgPSBcIndheVR5cGVcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFR1bm5lbC5vcGVyYXRvciA9IFwiPVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50VHVubmVsLnZhbHVlID0gXCJ0dW5uZWxcIjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLmNvbnN0cmFpbnRzLnB1c2goY29uc3RyYWludFR1bm5lbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmV4Y2x1c2lvbnNbY10gPT09IFwiYnJpZGdlXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFBvbnQuY29uc3RyYWludFR5cGUgPSBcImJhbm5lZFwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50UG9udC5rZXkgPSBcIndheVR5cGVcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFBvbnQub3BlcmF0b3IgPSBcIj1cIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFBvbnQudmFsdWUgPSBcInBvbnRcIjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLmNvbnN0cmFpbnRzLnB1c2goY29uc3RyYWludFBvbnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cb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ICAgICAgIGVycm9yLmNhbGwodGhpcywgbmV3IEVycm9yU2VydmljZShfLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgUm91dGU7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Route/Route.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Services/Services.js": +/*!********************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Services.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Config_Config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Config/Config */ \"./node_modules/geoportal-access-lib/src/Services/Config/Config.js\");\n/* harmony import */ var _Alti_Alti__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Alti/Alti */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Alti.js\");\n/* harmony import */ var _Geocode_Geocode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Geocode/Geocode */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Geocode.js\");\n/* harmony import */ var _Geocode_ReverseGeocode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Geocode/ReverseGeocode */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js\");\n/* harmony import */ var _AutoComplete_AutoComplete__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AutoComplete/AutoComplete */ \"./node_modules/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js\");\n/* harmony import */ var _Route_Route__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Route/Route */ \"./node_modules/geoportal-access-lib/src/Services/Route/Route.js\");\n/* harmony import */ var _ProcessIsoCurve_ProcessIsoCurve__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ProcessIsoCurve/ProcessIsoCurve */ \"./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js\");\n/* eslint no-unused-vars: [\"error\", { \"varsIgnorePattern\": \"point|circle|bbox\" }] */\n\n/**\n* Geoportal web services invocation namespace.\n*\n* @module Services\n* @alias Gp.Services\n*/\n\n\n\n\n\n\n\n\nvar Services = {\n /**\n * Access to Geoportal resources metadata availables with one ore several keys\n *\n * @method getConfig\n * @param {Object} options - Options for function call.\n * @param {String} [options.apiKey] - Access key(s) (\",\" as separator, no spaces) to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}\n * @param {String} [options.customConfigFile] - path to a local config file. Overload the apiKey parameter\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GetConfigResponse} object as a parameter except if \"rawResponse\" parameter is set to true : a String will be returned.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n */\n getConfig : function (options) {\n var configService = new _Config_Config__WEBPACK_IMPORTED_MODULE_0__[\"default\"](options);\n configService.call();\n },\n /**\n * Getting elevations in or along of one or several points on french territories using the [elevation services of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/alti.html}.
    \n * Two use cases are availables :
    \n * 1. getting elevations of the given points : don't use the options.sampling parameter ;
    \n * 2. getting a regular set of elevations along the given points : use the options.sampling parameter.\n *\n * @method getAltitude\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {Array.} options.positions - Array of positions ({lon:float, lat:float}) expressed in CRS:84 coordinates system, where to get elevations. 50 positions maximum may be given. 2 positions minimum are required if you use the options.sampling parameter.\n * @param {Number} [options.sampling] - Number of points to use (between 2 and 5000) in order to compute an elevation path. The points given with the options.positions parameter are used to fix the planimetric path along which the elevations will be computed.
    \n * If not used, only elevations of these positions will be returned.\n * @param {Boolean} [options.zonly=false] - Set this parameter to true if you only want to have elevations returned without corresponding coordinates.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.AltiResponse} object as a parameter, except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/alti/rest/elevation.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n * @param {String} [options.api='REST'] - What API to use for interacting with underlying web service : 'REST' or 'WPS'. Only use if you know what you are doing.\n * @param {String} [options.outputFormat='xml'] - Output format for underlying web service response : 'xml' or 'json'. Only use if you know what you are doing.\n */\n getAltitude : function (options) {\n var altiService = new _Alti_Alti__WEBPACK_IMPORTED_MODULE_1__[\"default\"](options);\n altiService.call();\n },\n /**\n * Getting positon of a geographic identifier (places names, address, cadastral parcel, other...) using the [geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage.html}.\n *\n * @example\n * Gp.Services.geocode ({\n * apiKey : \"carte\",\n * location : \"73 avenue de Paris, Saint-Mandé\",\n * // traitement des resultats\n * onSuccess : function (result) {\n * console.log(\"found (x:\"+result.position.x+\", y:\"+result.position.y+\")\") ;\n * }\n * }) ;\n *\n *\n * @method geocode\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} [options.index=\"StreetAddress\"] - Geographical identifier type to search. Values currently availables are : \"PositionOfInterest\" for place names, \"StreetAddress\" for address search, \"CadastralParcel\" for Cadastral parcels search, \"location\" for a multi-index search on \"StreetAddress\" and \"PositionOfInterest\". Default is \"StreetAddress\".\n * @param {String} options.query - Geographic identifier to locate.\n * @param {Object} [options.filters] - Additional filters to apply to search. The following properties may be given.\n * @param {String} [options.filters.[prop]] - Additionnal properties to filter search. Properties depends on options.index, and values type should be \"String\".\n *

    \n * Properties availables for address search :
    \n * \"postalCode\", \"inseeCode\" and \"city\".\n *

    \n * Properties availables for place names search :
    \n * \"postalCode\", \"inseeCode\" and \"type\".\n *

    \n * Properties availables for cadastral parcels search :
    \n * \"codeDepartement\", \"codeCommune\", \"nomCommune\", \"codeCommuneAbs\", \"codeArrondissement\", \"section\", \"numero\", \"feuille\".\n * @param {Number} [options.maximumResponses=20] - Maximum number of responses. Default underlying service value applies (20) if not provided.\n * @param {Boolean} [options.returnTrueGeometry=false] - Set this parameter to true if you wish to have the true geometrie returned.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GeocodeResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/geoportail/ols] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n geocode : function (options) {\n var geocodeService = new _Geocode_Geocode__WEBPACK_IMPORTED_MODULE_2__[\"default\"](options);\n geocodeService.call();\n },\n /**\n * Retrieving geographical identifiers (place names, address, cadastral parcels, ...) near a given position, using the [reverse geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage-inverse.html}.\n *\n * @method reverseGeocode\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} [options.index=\"StreetAddress\"] - Geographical identifier type to search. Values currently availables are : \"PositionOfInterest\" for place names, \"StreetAddress\" for address search, \"CadastralParcel\" for Cadastral parcels search, \"location\" for a multi-index search on \"StreetAddress\" and \"PositionOfInterest\". Default is \"StreetAddress\".\n * @param {Object} options.position - Reference position where to search geographical identifiers.\n * @param {Float} options.position.lon - Longitude\n * @param {Float} options.position.lat - Latitude\n * @param {Object} [options.filters] - Additional filters to apply to search. The following properties may be given.\n * @param {String} [options.filters.[prop]] - Additionnal properties to filter search. Properties depends on options.index, and values type should be \"String\".\n *

    \n * Properties availables for address search :
    \n * \"postalCode\", \"inseeCode\" and \"city\".\n *

    \n * Properties availables for place names search :
    \n * \"postalCode\", \"inseeCode\" and \"type\".\n *

    \n * Properties availables for cadastral parcels search :
    \n * \"codeDepartement\", \"codeCommune\", \"nomCommune\", \"codeCommuneAbs\", \"codeArrondissement\", \"section\", \"numero\", \"feuille\".\n * @param {Object} [options.searchGeometry] - Location where to perform the search.\n * @param {String} options.searchGeometry.type - Geometry type (Point|Circle|Linestring|Polygon)\n * @param {Array.|Array.Array.} options.searchGeometry.coordinates - Coordinates\n * @param {Float} [options.searchGeometry.radius] - Radius (only for type 'Circle')\n * @param {Number} [options.maximumResponses=20] - Maximum number of responses. Default underlying service value applies (20) if not provided.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GeocodeResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/geoportail/ols] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n reverseGeocode : function (options) {\n var reverseGeocodeService = new _Geocode_ReverseGeocode__WEBPACK_IMPORTED_MODULE_3__[\"default\"](options);\n reverseGeocodeService.call();\n },\n /**\n * Getting suggestions of probable places names or address based on uncomplete texts, using the [autocompletion service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/autocompletion.html}\n *\n * @method autoComplete\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} options.text - Text input to complete.\n * @param {Array.} [options.filterOptions.type = \"StreetAddress\"] - Suggestion types to provide : address (\"StreetAddress\") and/or place name (\"PositionOfInterest\").\n * @param {Array.} [options.filterOptions.territory] - Places where to limit the search of suggestions : \"METROPOLE\" (Corsica and metropolitan France), \"DOMTOM\" (French overseas departments and territories), or an INSEE code of a department. No limitation by default. For instance : ['METROPOLE', '31']\n * @param {Number} [options.maximumResponses = 10] - Maximum number of responses.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.AutoCompleteResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/ols/apis/completion] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n autoComplete : function (options) {\n var autoCompleteService = new _AutoComplete_AutoComplete__WEBPACK_IMPORTED_MODULE_4__[\"default\"](options);\n autoCompleteService.call();\n },\n /**\n * Getting a route from one point to another using the [route service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/itineraires.html}.\n *\n * @method route\n * @param {Object} options - Options for function call.\n * @param {String} options.resource - Resource used to compute the route. Available values are in the GetCapabilities.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} [options.routePreference = \"fastest\"] - Indicates the way to compute the route : \"fastest\" (time optimisation) or \"shortest\" (distance optimisation). Available values are in the GetCapabilities.\n * @param {Gp.Point} options.startPoint - Start point of the route. Expressed in CRS:84 coordinates system (startPoint.x corresponds to longitude, startPoint.y corresponds to latitude). Available bbox are in the GetCapabilities.\n * @param {Gp.Point} options.endPoint - End point of the route. Expressed in CRS:84 coordinates system (endPoint.x corresponds to longitude, endPoint.y corresponds to latitude). Available bbox are in the GetCapabilities.\n * @param {Array.} [options.viaPoints] - Ordered via Points of the route. Expressed in CRS:84 coordinates system (viaPoints[i].x corresponds to longitude, viaPoints[i].y corresponds to latitude). Available bbox are in the GetCapabilities.\n * @param {String} [options.graph = \"Voiture\"] - User profile to use to compute the route : \"Voiture\" (using a vehicule) or \"Pieton\" (pedestrian). Has an influence on the kind of roads the route may use and the average speed. Available bbox are in the GetCapabilities.\n * @param {Array.} [options.exclusions] - DEPRECATED: use options.constraints. Indicates if route has to avoid some features (\"toll\", \"bridge\" or \"tunnel\").\n * @param {Boolean} [options.geometryInInstructions = false] - Indicates if route geometry has to be also returned with route instructions.\n * @param {Boolean} [options.provideBoundingBox = true] - Indicates if route instructions has to be localised with a BBOX in the response.\n * @param {String} [options.distanceUnit = \"m\"] - The unit used to provide distances in the response (\"meter\" or \"kilometer\").\n * @param {String} [options.timeUnit = \"second\"] - The unit used to provide duration in the response (\"standard\", \"second\", \"minute\", \"hour\").\n * @param {Array.} [options.waysAttributes] - Way Attributes to add in the response. Available values are in the GetCapabilities.\n * @param {Array.} [options.constraints] - Constraints used ({'constraintType':'banned','key':'ways_type','operator':'=','value':'autoroute'}). Available values are in the GetCapabilities.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.RouteResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.outputFormat='json'] - Output format (\"json\" or \"xml\") to use for underlying webService. Only use if you know what you are doing.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/itineraire/rest/route.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n route : function (options) {\n var routeService = new _Route_Route__WEBPACK_IMPORTED_MODULE_5__[\"default\"](options);\n routeService.call();\n },\n /**\n * Computing a set of places (curve) reachable from a given point (or from where to start to reach a given point) within a time or distance constraint using the [isochrone service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/isochrones.html}.\n *\n * @method isoCurve\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} options.resource - Resource used to compute the route. Available values are in the GetCapabilities.\n * @param {Gp.Point} options.position - Start or Arrival (options.reverse===true) Point for the computing. Expressed in CRS:84 coordinates system (position.x corresponds to longitude, position.y corresponds to latitude).\n * @param {String} [options.graph = \"Voiture\"] - User profile to use to compute the isoCurve : \"Voiture\" (using a vehicule) or \"Pieton\" (pedestrian). Has an influence on the kind of roads to use and the average speed. Available values are in the GetCapabilities.\n * @param {Array.} [options.exclusions] - DEPRECATED: use options.constraints. Indicates if route has to avoid some features (\"toll\", \"bridge\" or \"tunnel\").\n * @param {Array.} [options.constraints] - Constraints used ({'constraintType':'banned','key':'ways_type','operator':'=','value':'autoroute'}). Available values are in the GetCapabilities.\n * @param {String} [options.method = \"time\"] - Computing method to use : \"time\" (using a duration as a constraint) or \"distance\" (using a distance as a constraint). Available values are in the GetCapabilities.\n * @param {Float} options.time - Maximum duration (expressed in seconds) to use when options.method is set to \"time\".\n * @param {Float} options.distance - Maximum distance (expressed in meters) to use when options.method is set to \"distance\".\n * @param {Boolean} [options.reverse = false] - Set this parameter to true if you want options.position to be the destination (instead of departure) for the computing.\n * @param {String} [options.distanceUnit = \"km\"] - The unit used to provide distances in the response (\"m\" or \"km\").\n * @param {String} [options.timeUnit = \"second\"] - The unit used to provide duration in the response (\"standard\", \"second\", \"minute\", \"hour\").\n * @param {Boolean} [options.smoothing = false] - DEPRECATED: Set this parameter to true if you want the resulting geometry to be smoothed.\n * @param {Boolean} [options.holes = false] - DEPRECATED: Set this parameter to true if you want the resulting geometry (polygon) to have holes if pertinent.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.IsoCurveResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.outputFormat='json'] - Output format (\"json\") to use for underlying webService. Only use if you know what you are doing.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/isochrone/isochrone.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n isoCurve : function (options) {\n var processIsoCurveService = new _ProcessIsoCurve_ProcessIsoCurve__WEBPACK_IMPORTED_MODULE_6__[\"default\"](options);\n processIsoCurveService.call();\n }\n};\n\n/**\n * Point object.\n *\n * @namespace\n * @alias Gp.Point\n *\n * @property {Float} x - Point abscissa\n * @property {Float} y - Point ordinate\n */\nvar point = {};\n\n/**\n * Circle object.\n *\n * @namespace\n * @alias Gp.Circle\n *\n * @property {Float} x - Circle center abscissa.\n * @property {Float} y - Circle center ordinate.\n * @property {Float} radius - Circle radius.\n */\nvar circle = {};\n\n/**\n * Bounding box object, expressed with four coordinates.\n *\n * @namespace\n * @alias Gp.BBox\n *\n * @property {Float} left - minimum abscissa\n * @property {Float} right - maximum abscissa\n * @property {Float} bottom - minimum ordinate\n * @property {Float} top - maximum ordinate\n */\nvar bbox = {};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Services);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvU2VydmljZXMuanM/YmMwOCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUEscUNBQXFDLDJDQUEyQzs7QUFFaEY7QUFDQTtBQUNBO0FBQ0E7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vYXR9IHggLSBQb2ludCBhYnNjaXNzYVxuICogQHByb3BlcnR5IHtGbG9hdH0geSAtIFBvaW50IG9yZGluYXRlXG4gKi9cbnZhciBwb2ludCA9IHt9O1xuXG4vKipcbiAqIENpcmNsZSBvYmplY3QuXG4gKlxuICogQG5hbWVzcGFjZVxuICogQGFsaWFzIEdwLkNpcmNsZVxuICpcbiAqIEBwcm9wZXJ0eSB7RmxvYXR9IHggLSBDaXJjbGUgY2VudGVyIGFic2Npc3NhLlxuICogQHByb3BlcnR5IHtGbG9hdH0geSAtIENpcmNsZSBjZW50ZXIgb3JkaW5hdGUuXG4gKiBAcHJvcGVydHkge0Zsb2F0fSByYWRpdXMgLSBDaXJjbGUgcmFkaXVzLlxuICovXG52YXIgY2lyY2xlID0ge307XG5cbi8qKlxuICogQm91bmRpbmcgYm94IG9iamVjdCwgZXhwcmVzc2VkIHdpdGggZm91ciBjb29yZGluYXRlcy5cbiAqXG4gKiBAbmFtZXNwYWNlXG4gKiBAYWxpYXMgR3AuQkJveFxuICpcbiAqIEBwcm9wZXJ0eSB7RmxvYXR9IGxlZnQgLSBtaW5pbXVtIGFic2Npc3NhXG4gKiBAcHJvcGVydHkge0Zsb2F0fSByaWdodCAtIG1heGltdW0gYWJzY2lzc2FcbiAqIEBwcm9wZXJ0eSB7RmxvYXR9IGJvdHRvbSAtIG1pbmltdW0gb3JkaW5hdGVcbiAqIEBwcm9wZXJ0eSB7RmxvYXR9IHRvcCAtIG1heGltdW0gb3JkaW5hdGVcbiAqL1xudmFyIGJib3ggPSB7fTtcblxuZXhwb3J0IGRlZmF1bHQgU2VydmljZXM7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Services.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Utils/Helper.js": +/*!***************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Utils/Helper.js ***! + \***************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Classe utilitaire\n *\n * @module Helper\n * @alias Gp.Helper\n */\nvar Helper = {\n\n /**\n * concatenation des parametres key/value dans les urls\n *\n * @method normalyzeParameters\n * @static\n * @param {Object} params - tableau de clef/valeur\n *\n * @example\n * Gp.Utils.Helper.normalyzeParameters ({\n * key1:value1,\n * key2:value2,\n * key3:value3\n * });\n * // out : \"key1=value1&key2=value2&key3=value3\"\n *\n * @returns {String} retourne les paramètres concaténés\n */\n normalyzeParameters : function (params) {\n var myParams = null;\n\n if (params) {\n var tabParams = [];\n for (var key in params) {\n if (params.hasOwnProperty(key)) {\n var value = params[key];\n if (!value) {\n value = \"\";\n }\n tabParams.push(key + \"=\" + value);\n }\n }\n\n myParams = tabParams.join(\"&\");\n }\n\n return myParams;\n },\n\n /**\n * Concaténation et encodage des urls.\n *\n * @method normalyzeUrl\n * @static\n * @param {String} url - url\n * @param {Object|String} params - tableau de clef/valeur ou string\n * @param {Boolean} encode - true|false, false par defaut\n *\n * @example\n * Gp.Utils.Helper.normalyzeUrl (url, {\n * key1:value1,\n * key2=:value2,\n * key3:value3\n * });\n * // out : \"url?key1=value1&key2=value2&key3=value3\"\n *\n * @returns {String} retourne une url normalisée\n */\n normalyzeUrl : function (url, params, encode) {\n var myUrl = url;\n\n if (url) {\n var k = url.indexOf(\"?\");\n if (k === -1) { // pas de ? et KVP\n myUrl += \"?\";\n }\n\n if (k !== -1 && k !== url.length - 1) { // KVP\n myUrl += \"&\";\n }\n }\n\n if (params) {\n if (typeof params === \"string\") {\n myUrl += params;\n } else {\n myUrl += this.normalyzeParameters(params);\n }\n }\n\n if (encode) {\n // FIXME bonne idée ?\n myUrl = encodeURIComponent(myUrl);\n }\n\n return myUrl;\n },\n\n /**\n * Indentation d'une chaine\n *\n * @method indent\n * @static\n * @param {Number} n - nombre de tabulation\n * @param {String} msg - chaine\n *\n * @example\n * Gp.Utils.Helper.indent (2, \"message à indenter\")\n * // out\n * // ........message à indenter\n *\n * @returns {String} retourne une chaine indentée\n */\n indent : function (n, msg) {\n var num = n || 0;\n return new Array(num + 1).join(\"\\t\") + msg;\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Helper);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvVXRpbHMvSGVscGVyLmpzPzBiZDAiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZUFBZSxPQUFPO0FBQ3RCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0EsaUJBQWlCLE9BQU87QUFDeEI7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBLEtBQUs7O0FBRUw7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsT0FBTztBQUN0QixlQUFlLGNBQWM7QUFDN0IsZUFBZSxRQUFRO0FBQ3ZCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0EsaUJBQWlCLE9BQU87QUFDeEI7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSwyQkFBMkI7QUFDM0I7QUFDQTs7QUFFQSxtREFBbUQ7QUFDbkQ7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLGFBQWE7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G4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSByZXRvdXJuZSBsZXMgcGFyYW3DqHRyZXMgY29uY2F0w6luw6lzXG4gICAgICovXG4gICAgbm9ybWFseXplUGFyYW1ldGVycyA6IGZ1bmN0aW9uIChwYXJhbXMpIHtcbiAgICAgICAgdmFyIG15UGFyYW1zID0gbnVsbDtcblxuICAgICAgICBpZiAocGFyYW1zKSB7XG4gICAgICAgICAgICB2YXIgdGFiUGFyYW1zID0gW107XG4gICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gcGFyYW1zKSB7XG4gICAgICAgICAgICAgICAgaWYgKHBhcmFtcy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB2YWx1ZSA9IHBhcmFtc1trZXldO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IFwiXCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGFiUGFyYW1zLnB1c2goa2V5ICsgXCI9XCIgKyB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBteVBhcmFtcyA9IHRhYlBhcmFtcy5qb2luKFwiJlwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBteVBhcmFtcztcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogQ29uY2F0w6luYXRpb24gZXQgZW5jb2RhZ2UgZGVzIHVybHMuXG4gICAgICpcbiAgICAgKiBAbWV0aG9kIG5vcm1hbHl6ZVVybFxuICAgICAqIEBzdGF0aWNcbiAgICAgKiBAcGFyYW0ge1N0cmluZ30gdXJsIC0gdXJsXG4gICAgICogQHBhcmFtIHtPYmplY3R8U3RyaW5nfSBwYXJhbXMgLSB0YWJsZWF1IGRlIGNsZWYvdmFsZXVyIG91IHN0cmluZ1xuICAgICAqIEBwYXJhbSB7Qm9vbGVhbn0gZW5jb2RlIC0gdHJ1ZXxmYWxzZSwgZmFsc2UgcGFyIGRlZmF1dFxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiAgR3AuVXRpbHMuSGVscGVyLm5vcm1hbHl6ZVVybCAodXJsLCB7XG4gICAgICogICAgICAgICBrZXkxOnZhbHVlMSxcbiAgICAgKiAgICAgICAgIGtleTI9OnZhbHVlMixcbiAgICAgKiAgICAgICAgIGtleTM6dmFsdWUzXG4gICAgICogIH0pO1xuICAgICAqICAvLyBvdXQgOiBcInVybD9rZXkxPXZhbHVlMSZrZXkyPXZhbHVlMiZrZXkzPXZhbHVlM1wiXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSByZXRvdXJuZSB1bmUgdXJsIG5vcm1hbGlzw6llXG4gICAgICovXG4gICAgbm9ybWFseXplVXJsIDogZnVuY3Rpb24gKHVybCwgcGFyYW1zLCBlbmNvZGUpIHtcbiAgICAgICAgdmFyIG15VXJsID0gdXJsO1xuXG4gICAgICAgIGlmICh1cmwpIHtcbiAgICAgICAgICAgIHZhciBrID0gdXJsLmluZGV4T2YoXCI/XCIpO1xuICAgICAgICAgICAgaWYgKGsgPT09IC0xKSB7IC8vIHBhcyBkZSA/IGV0IEtWUFxuICAgICAgICAgICAgICAgIG15VXJsICs9IFwiP1wiO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoayAhPT0gLTEgJiYgayAhPT0gdXJsLmxlbmd0aCAtIDEpIHsgLy8gS1ZQXG4gICAgICAgICAgICAgICAgbXlVcmwgKz0gXCImXCI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocGFyYW1zKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHBhcmFtcyA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgIG15VXJsICs9IHBhcmFtcztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbXlVcmwgKz0gdGhpcy5ub3JtYWx5emVQYXJhbWV0ZXJzKHBhcmFtcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW5jb2RlKSB7XG4gICAgICAgICAgICAvLyBGSVhNRSBib25uZSBpZMOpZSA/XG4gICAgICAgICAgICBteVVybCA9IGVuY29kZVVSSUNvbXBvbmVudChteVVybCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbXlVcmw7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIEluZGVudGF0aW9uIGQndW5lIGNoYWluZVxuICAgICAqXG4gICAgICogQG1ldGhvZCBpbmRlbnRcbiAgICAgKiBAc3RhdGljXG4gICAgICogQHBhcmFtIHtOdW1iZXJ9IG4gLSBub21icmUgZGUgdGFidWxhdGlvblxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBtc2cgLSBjaGFpbmVcbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogR3AuVXRpbHMuSGVscGVyLmluZGVudCAoMiwgXCJtZXNzYWdlIMOgIGluZGVudGVyXCIpXG4gICAgICogLy8gb3V0XG4gICAgICogLy8gLi4uLi4uLi5tZXNzYWdlIMOgIGluZGVudGVyXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSByZXRvdXJuZSB1bmUgY2hhaW5lIGluZGVudMOpZVxuICAgICAqL1xuICAgIGluZGVudCA6IGZ1bmN0aW9uIChuLCBtc2cpIHtcbiAgICAgICAgdmFyIG51bSA9IG4gfHwgMDtcbiAgICAgICAgcmV0dXJuIG5ldyBBcnJheShudW0gKyAxKS5qb2luKFwiXFx0XCIpICsgbXNnO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEhlbHBlcjtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Utils/Helper.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js": +/*!************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js ***! + \************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var loglevel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! loglevel */ \"./node_modules/loglevel/lib/loglevel.js\");\n/* harmony import */ var loglevel__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(loglevel__WEBPACK_IMPORTED_MODULE_0__);\n\n\nvar LoggerByDefault = {\n /**\n * logger statique\n *\n * @static\n * @param {String} name - nom du logger\n * @returns {Object} retourne un logger\n */\n getLogger : function (name) {\n // Substitute global constants configured at compile time\n // cf. webpack.config.js\n // FIXME howtodo !? DefineWebpackPlugin ? EnvironmentWebpackPlugin ?\n (\"false\".match(/true/)) ? loglevel__WEBPACK_IMPORTED_MODULE_0__[\"disableAll\"]() : loglevel__WEBPACK_IMPORTED_MODULE_0__[\"enableAll\"]();\n var logname = name || \"default\";\n return loglevel__WEBPACK_IMPORTED_MODULE_0__[\"getLogger\"](logname);\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (LoggerByDefault);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvVXRpbHMvTG9nZ2VyQnlEZWZhdWx0LmpzPzA2NWQiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQWdDOztBQUVoQztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZUFBZSxPQUFPO0FBQ3RCLGlCQUFpQixPQUFPO0FBQ3hCO0FBQ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VmYXVsdCBMb2dnZXJCeURlZmF1bHQ7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\n"); + +/***/ }), + +/***/ "./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js": +/*!**************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js ***! + \**************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Classe de gestion des erreurs qui permer d'associer un message d'erreur à l'exception lancée.\n *\n * @example\n * MessagesResources.getMessage(\"ERROR_PARAM_MISSING\", \"x\", \"y\", \"z\")));\n * // --> output : Parameter(s) 'x - y - z' missing\n *\n * @module MessagesResources\n * @alias Gp.Utils.MessagesResources\n * @private\n */\nvar MessagesResources = {\n\n // Paramètres\n PARAM_MISSING : \"Parameter(s) '%var%' missing\",\n PARAM_EMPTY : \"Parameter(s) '%var%' empty\",\n PARAM_TYPE : \"Wrong type(s) for parameter(s) '%var%'\",\n PARAM_FORMAT : \"Parameter(s) '%var%' not correctly formatted\",\n PARAM_NOT_SUPPORT : \"Value(s) for parameter(s) '%var%' not supported\",\n PARAM_NOT_SUPPORT_NODEJS : \"Value(s) for parameter(s) '%var%' not supported to NodeJS\",\n PARAM_UNKNOWN : \"Value(s) for parameter(s) '%var%' unknown\",\n\n // Services\n // Requête\n SERVICE_REQUEST_BUILD : \"An error occurred during the request building of the service\",\n SERVICE_REQUEST_EMPTY : \"The request sent to the service is empty\",\n\n // Réponse\n SERVICE_RESPONSE_EXCEPTION : \"The service returned an exception : '%var%'\",\n SERVICE_RESPONSE_EXCEPTION_2 : \"The service returned an exception\",\n SERVICE_RESPONSE_ANALYSE : \"An error occurred while parsing the response '%var%' of the service\",\n SERVICE_RESPONSE_ANALYSE_2 : \"An unknown error occurred while parsing the response\",\n SERVICE_RESPONSE_EMPTY : \"The response of the service is empty\",\n SERVICE_RESPONSE_EMPTY_2 : \"The response from the service could not be analyzed or is empty\",\n SERVICE_RESPONSE_FORMAT : \"The format of the service response is not supported (handled format(s) : '%var%')\",\n SERVICE_RESPONSE_FORMAT_2 : \"The format of the service response is not supported\",\n SERVICE_RESPONSE_FORMAT_3 : \"No suggestion matching the search\",\n\n // Classes\n CLASS_CONSTRUCTOR : \"'%var%' constructor cannot be called as a function.\",\n\n /**\n * Fonction qui va retourner le message d'erreur associé à la clé donnée\n *\n * @method getMessage\n * @param {String} clef - Clef de l'erreur (ex : ERROR_PARAM)\n * @param {String[]} parametres - Paramètres/variables concernés par le message d'erreur associé à la clef donnée\n * @return {String} message - String contenant le message de l'exception\n */\n getMessage : function (clef, parametres) {\n // param de la fonction uniquement pour la documentation...\n\n if (Object.keys(arguments).length === 0) {\n return \"Message indefined !\";\n }\n\n var params = Array.prototype.slice.call(arguments);\n var key = params.shift();\n var args = params;\n\n var message = this[key];\n\n try {\n if (Array.isArray(args) && args.length > 0) {\n message = message.replace(\"%var%\", args.join(\" - \"));\n } else {\n message = message.replace(\"%var%\", \"%var% (not specified)\");\n }\n } catch (e) {\n // error de string.replace()\n\n }\n\n return message;\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (MessagesResources);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvVXRpbHMvTWVzc2FnZXNSZXNvdXJjZXMuanM/Y2ViZiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFD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SB7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShhcmdzKSAmJiBhcmdzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICBtZXNzYWdlID0gbWVzc2FnZS5yZXBsYWNlKFwiJXZhciVcIiwgYXJncy5qb2luKFwiIC0gXCIpKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbWVzc2FnZSA9IG1lc3NhZ2UucmVwbGFjZShcIiV2YXIlXCIsIFwiJXZhciUgKG5vdCBzcGVjaWZpZWQpXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAvLyBlcnJvciBkZSBzdHJpbmcucmVwbGFjZSgpXG5cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IE1lc3NhZ2VzUmVzb3VyY2VzO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\n"); + +/***/ }), + +/***/ "./node_modules/leaflet-draw/dist/leaflet.draw-src.css": +/*!*************************************************************!*\ + !*** ./node_modules/leaflet-draw/dist/leaflet.draw-src.css ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9sZWFmbGV0LWRyYXcvZGlzdC9sZWFmbGV0LmRyYXctc3JjLmNzcz9jYWFkIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIiwiZmlsZSI6Ii4vbm9kZV9tb2R1bGVzL2xlYWZsZXQtZHJhdy9kaXN0L2xlYWZsZXQuZHJhdy1zcmMuY3NzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/leaflet-draw/dist/leaflet.draw-src.css\n"); + +/***/ }), + +/***/ "./node_modules/leaflet-draw/dist/leaflet.draw-src.js": +/*!************************************************************!*\ + !*** ./node_modules/leaflet-draw/dist/leaflet.draw-src.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/*\n Leaflet.draw 1.0.4, a plugin that adds drawing and editing tools to Leaflet powered maps.\n (c) 2012-2017, Jacob Toye, Jon West, Smartrak, Leaflet\n\n https://github.com/Leaflet/Leaflet.draw\n http://leafletjs.com\n */\n(function (window, document, undefined) {/**\n * Leaflet.draw assumes that you have already included the Leaflet library.\n */\nL.drawVersion = \"1.0.4\";\n/**\n * @class L.Draw\n * @aka Draw\n *\n *\n * To add the draw toolbar set the option drawControl: true in the map options.\n *\n * @example\n * ```js\n * var map = L.map('map', {drawControl: true}).setView([51.505, -0.09], 13);\n *\n * L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {\n * attribution: '© OpenStreetMap contributors'\n * }).addTo(map);\n * ```\n *\n * ### Adding the edit toolbar\n * To use the edit toolbar you must initialise the Leaflet.draw control and manually add it to the map.\n *\n * ```js\n * var map = L.map('map').setView([51.505, -0.09], 13);\n *\n * L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {\n * attribution: '© OpenStreetMap contributors'\n * }).addTo(map);\n *\n * // FeatureGroup is to store editable layers\n * var drawnItems = new L.FeatureGroup();\n * map.addLayer(drawnItems);\n *\n * var drawControl = new L.Control.Draw({\n * edit: {\n * featureGroup: drawnItems\n * }\n * });\n * map.addControl(drawControl);\n * ```\n *\n * The key here is the featureGroup option. This tells the plugin which FeatureGroup contains the layers that\n * should be editable. The featureGroup can contain 0 or more features with geometry types Point, LineString, and Polygon.\n * Leaflet.draw does not work with multigeometry features such as MultiPoint, MultiLineString, MultiPolygon,\n * or GeometryCollection. If you need to add multigeometry features to the draw plugin, convert them to a\n * FeatureCollection of non-multigeometries (Points, LineStrings, or Polygons).\n */\nL.Draw = {};\n\n/**\n * @class L.drawLocal\n * @aka L.drawLocal\n *\n * The core toolbar class of the API — it is used to create the toolbar ui\n *\n * @example\n * ```js\n * var modifiedDraw = L.drawLocal.extend({\n * draw: {\n * toolbar: {\n * buttons: {\n * polygon: 'Draw an awesome polygon'\n * }\n * }\n * }\n * });\n * ```\n *\n * The default state for the control is the draw toolbar just below the zoom control.\n * This will allow map users to draw vectors and markers.\n * **Please note the edit toolbar is not enabled by default.**\n */\nL.drawLocal = {\n\t// format: {\n\t// \tnumeric: {\n\t// \t\tdelimiters: {\n\t// \t\t\tthousands: ',',\n\t// \t\t\tdecimal: '.'\n\t// \t\t}\n\t// \t}\n\t// },\n\tdraw: {\n\t\ttoolbar: {\n\t\t\t// #TODO: this should be reorganized where actions are nested in actions\n\t\t\t// ex: actions.undo or actions.cancel\n\t\t\tactions: {\n\t\t\t\ttitle: 'Cancel drawing',\n\t\t\t\ttext: 'Cancel'\n\t\t\t},\n\t\t\tfinish: {\n\t\t\t\ttitle: 'Finish drawing',\n\t\t\t\ttext: 'Finish'\n\t\t\t},\n\t\t\tundo: {\n\t\t\t\ttitle: 'Delete last point drawn',\n\t\t\t\ttext: 'Delete last point'\n\t\t\t},\n\t\t\tbuttons: {\n\t\t\t\tpolyline: 'Draw a polyline',\n\t\t\t\tpolygon: 'Draw a polygon',\n\t\t\t\trectangle: 'Draw a rectangle',\n\t\t\t\tcircle: 'Draw a circle',\n\t\t\t\tmarker: 'Draw a marker',\n\t\t\t\tcirclemarker: 'Draw a circlemarker'\n\t\t\t}\n\t\t},\n\t\thandlers: {\n\t\t\tcircle: {\n\t\t\t\ttooltip: {\n\t\t\t\t\tstart: 'Click and drag to draw circle.'\n\t\t\t\t},\n\t\t\t\tradius: 'Radius'\n\t\t\t},\n\t\t\tcirclemarker: {\n\t\t\t\ttooltip: {\n\t\t\t\t\tstart: 'Click map to place circle marker.'\n\t\t\t\t}\n\t\t\t},\n\t\t\tmarker: {\n\t\t\t\ttooltip: {\n\t\t\t\t\tstart: 'Click map to place marker.'\n\t\t\t\t}\n\t\t\t},\n\t\t\tpolygon: {\n\t\t\t\ttooltip: {\n\t\t\t\t\tstart: 'Click to start drawing shape.',\n\t\t\t\t\tcont: 'Click to continue drawing shape.',\n\t\t\t\t\tend: 'Click first point to close this shape.'\n\t\t\t\t}\n\t\t\t},\n\t\t\tpolyline: {\n\t\t\t\terror: 'Error: shape edges cannot cross!',\n\t\t\t\ttooltip: {\n\t\t\t\t\tstart: 'Click to start drawing line.',\n\t\t\t\t\tcont: 'Click to continue drawing line.',\n\t\t\t\t\tend: 'Click last point to finish line.'\n\t\t\t\t}\n\t\t\t},\n\t\t\trectangle: {\n\t\t\t\ttooltip: {\n\t\t\t\t\tstart: 'Click and drag to draw rectangle.'\n\t\t\t\t}\n\t\t\t},\n\t\t\tsimpleshape: {\n\t\t\t\ttooltip: {\n\t\t\t\t\tend: 'Release mouse to finish drawing.'\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tedit: {\n\t\ttoolbar: {\n\t\t\tactions: {\n\t\t\t\tsave: {\n\t\t\t\t\ttitle: 'Save changes',\n\t\t\t\t\ttext: 'Save'\n\t\t\t\t},\n\t\t\t\tcancel: {\n\t\t\t\t\ttitle: 'Cancel editing, discards all changes',\n\t\t\t\t\ttext: 'Cancel'\n\t\t\t\t},\n\t\t\t\tclearAll: {\n\t\t\t\t\ttitle: 'Clear all layers',\n\t\t\t\t\ttext: 'Clear All'\n\t\t\t\t}\n\t\t\t},\n\t\t\tbuttons: {\n\t\t\t\tedit: 'Edit layers',\n\t\t\t\teditDisabled: 'No layers to edit',\n\t\t\t\tremove: 'Delete layers',\n\t\t\t\tremoveDisabled: 'No layers to delete'\n\t\t\t}\n\t\t},\n\t\thandlers: {\n\t\t\tedit: {\n\t\t\t\ttooltip: {\n\t\t\t\t\ttext: 'Drag handles or markers to edit features.',\n\t\t\t\t\tsubtext: 'Click cancel to undo changes.'\n\t\t\t\t}\n\t\t\t},\n\t\t\tremove: {\n\t\t\t\ttooltip: {\n\t\t\t\t\ttext: 'Click on a feature to remove.'\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n\n\n/**\n * ### Events\n * Once you have successfully added the Leaflet.draw plugin to your map you will want to respond to the different\n * actions users can initiate. The following events will be triggered on the map:\n *\n * @class L.Draw.Event\n * @aka Draw.Event\n *\n * Use `L.Draw.Event.EVENTNAME` constants to ensure events are correct.\n *\n * @example\n * ```js\n * map.on(L.Draw.Event.CREATED; function (e) {\n * var type = e.layerType,\n * layer = e.layer;\n *\n * if (type === 'marker') {\n * // Do marker specific actions\n * }\n *\n * // Do whatever else you need to. (save to db; add to map etc)\n * map.addLayer(layer);\n *});\n * ```\n */\nL.Draw.Event = {};\n/**\n * @event draw:created: PolyLine; Polygon; Rectangle; Circle; Marker | String\n *\n * Layer that was just created.\n * The type of layer this is. One of: `polyline`; `polygon`; `rectangle`; `circle`; `marker`\n * Triggered when a new vector or marker has been created.\n *\n */\nL.Draw.Event.CREATED = 'draw:created';\n\n/**\n * @event draw:edited: LayerGroup\n *\n * List of all layers just edited on the map.\n *\n *\n * Triggered when layers in the FeatureGroup; initialised with the plugin; have been edited and saved.\n *\n * @example\n * ```js\n * map.on('draw:edited', function (e) {\n * var layers = e.layers;\n * layers.eachLayer(function (layer) {\n * //do whatever you want; most likely save back to db\n * });\n * });\n * ```\n */\nL.Draw.Event.EDITED = 'draw:edited';\n\n/**\n * @event draw:deleted: LayerGroup\n *\n * List of all layers just removed from the map.\n *\n * Triggered when layers have been removed (and saved) from the FeatureGroup.\n */\nL.Draw.Event.DELETED = 'draw:deleted';\n\n/**\n * @event draw:drawstart: String\n *\n * The type of layer this is. One of:`polyline`; `polygon`; `rectangle`; `circle`; `marker`\n *\n * Triggered when the user has chosen to draw a particular vector or marker.\n */\nL.Draw.Event.DRAWSTART = 'draw:drawstart';\n\n/**\n * @event draw:drawstop: String\n *\n * The type of layer this is. One of: `polyline`; `polygon`; `rectangle`; `circle`; `marker`\n *\n * Triggered when the user has finished a particular vector or marker.\n */\n\nL.Draw.Event.DRAWSTOP = 'draw:drawstop';\n\n/**\n * @event draw:drawvertex: LayerGroup\n *\n * List of all layers just being added from the map.\n *\n * Triggered when a vertex is created on a polyline or polygon.\n */\nL.Draw.Event.DRAWVERTEX = 'draw:drawvertex';\n\n/**\n * @event draw:editstart: String\n *\n * The type of edit this is. One of: `edit`\n *\n * Triggered when the user starts edit mode by clicking the edit tool button.\n */\n\nL.Draw.Event.EDITSTART = 'draw:editstart';\n\n/**\n * @event draw:editmove: ILayer\n *\n * Layer that was just moved.\n *\n * Triggered as the user moves a rectangle; circle or marker.\n */\nL.Draw.Event.EDITMOVE = 'draw:editmove';\n\n/**\n * @event draw:editresize: ILayer\n *\n * Layer that was just moved.\n *\n * Triggered as the user resizes a rectangle or circle.\n */\nL.Draw.Event.EDITRESIZE = 'draw:editresize';\n\n/**\n * @event draw:editvertex: LayerGroup\n *\n * List of all layers just being edited from the map.\n *\n * Triggered when a vertex is edited on a polyline or polygon.\n */\nL.Draw.Event.EDITVERTEX = 'draw:editvertex';\n\n/**\n * @event draw:editstop: String\n *\n * The type of edit this is. One of: `edit`\n *\n * Triggered when the user has finshed editing (edit mode) and saves edits.\n */\nL.Draw.Event.EDITSTOP = 'draw:editstop';\n\n/**\n * @event draw:deletestart: String\n *\n * The type of edit this is. One of: `remove`\n *\n * Triggered when the user starts remove mode by clicking the remove tool button.\n */\nL.Draw.Event.DELETESTART = 'draw:deletestart';\n\n/**\n * @event draw:deletestop: String\n *\n * The type of edit this is. One of: `remove`\n *\n * Triggered when the user has finished removing shapes (remove mode) and saves.\n */\nL.Draw.Event.DELETESTOP = 'draw:deletestop';\n\n/**\n * @event draw:toolbaropened: String\n *\n * Triggered when a toolbar is opened.\n */\nL.Draw.Event.TOOLBAROPENED = 'draw:toolbaropened';\n\n/**\n * @event draw:toolbarclosed: String\n *\n * Triggered when a toolbar is closed.\n */\nL.Draw.Event.TOOLBARCLOSED = 'draw:toolbarclosed';\n\n/**\n * @event draw:markercontext: String\n *\n * Triggered when a marker is right clicked.\n */\nL.Draw.Event.MARKERCONTEXT = 'draw:markercontext';\n\n\nL.Draw = L.Draw || {};\n\n/**\n * @class L.Draw.Feature\n * @aka Draw.Feature\n */\nL.Draw.Feature = L.Handler.extend({\n\n\t// @method initialize(): void\n\tinitialize: function (map, options) {\n\t\tthis._map = map;\n\t\tthis._container = map._container;\n\t\tthis._overlayPane = map._panes.overlayPane;\n\t\tthis._popupPane = map._panes.popupPane;\n\n\t\t// Merge default shapeOptions options with custom shapeOptions\n\t\tif (options && options.shapeOptions) {\n\t\t\toptions.shapeOptions = L.Util.extend({}, this.options.shapeOptions, options.shapeOptions);\n\t\t}\n\t\tL.setOptions(this, options);\n\n\t\tvar version = L.version.split('.');\n\t\t//If Version is >= 1.2.0\n\t\tif (parseInt(version[0], 10) === 1 && parseInt(version[1], 10) >= 2) {\n\t\t\tL.Draw.Feature.include(L.Evented.prototype);\n\t\t} else {\n\t\t\tL.Draw.Feature.include(L.Mixin.Events);\n\t\t}\n\t},\n\n\t// @method enable(): void\n\t// Enables this handler\n\tenable: function () {\n\t\tif (this._enabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tL.Handler.prototype.enable.call(this);\n\n\t\tthis.fire('enabled', {handler: this.type});\n\n\t\tthis._map.fire(L.Draw.Event.DRAWSTART, {layerType: this.type});\n\t},\n\n\t// @method disable(): void\n\tdisable: function () {\n\t\tif (!this._enabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tL.Handler.prototype.disable.call(this);\n\n\t\tthis._map.fire(L.Draw.Event.DRAWSTOP, {layerType: this.type});\n\n\t\tthis.fire('disabled', {handler: this.type});\n\t},\n\n\t// @method addHooks(): void\n\t// Add's event listeners to this handler\n\taddHooks: function () {\n\t\tvar map = this._map;\n\n\t\tif (map) {\n\t\t\tL.DomUtil.disableTextSelection();\n\n\t\t\tmap.getContainer().focus();\n\n\t\t\tthis._tooltip = new L.Draw.Tooltip(this._map);\n\n\t\t\tL.DomEvent.on(this._container, 'keyup', this._cancelDrawing, this);\n\t\t}\n\t},\n\n\t// @method removeHooks(): void\n\t// Removes event listeners from this handler\n\tremoveHooks: function () {\n\t\tif (this._map) {\n\t\t\tL.DomUtil.enableTextSelection();\n\n\t\t\tthis._tooltip.dispose();\n\t\t\tthis._tooltip = null;\n\n\t\t\tL.DomEvent.off(this._container, 'keyup', this._cancelDrawing, this);\n\t\t}\n\t},\n\n\t// @method setOptions(object): void\n\t// Sets new options to this handler\n\tsetOptions: function (options) {\n\t\tL.setOptions(this, options);\n\t},\n\n\t_fireCreatedEvent: function (layer) {\n\t\tthis._map.fire(L.Draw.Event.CREATED, {layer: layer, layerType: this.type});\n\t},\n\n\t// Cancel drawing when the escape key is pressed\n\t_cancelDrawing: function (e) {\n\t\tif (e.keyCode === 27) {\n\t\t\tthis._map.fire('draw:canceled', {layerType: this.type});\n\t\t\tthis.disable();\n\t\t}\n\t}\n});\n\n\n\n/**\n * @class L.Draw.Polyline\n * @aka Draw.Polyline\n * @inherits L.Draw.Feature\n */\nL.Draw.Polyline = L.Draw.Feature.extend({\n\tstatics: {\n\t\tTYPE: 'polyline'\n\t},\n\n\tPoly: L.Polyline,\n\n\toptions: {\n\t\tallowIntersection: true,\n\t\trepeatMode: false,\n\t\tdrawError: {\n\t\t\tcolor: '#b00b00',\n\t\t\ttimeout: 2500\n\t\t},\n\t\ticon: new L.DivIcon({\n\t\t\ticonSize: new L.Point(8, 8),\n\t\t\tclassName: 'leaflet-div-icon leaflet-editing-icon'\n\t\t}),\n\t\ttouchIcon: new L.DivIcon({\n\t\t\ticonSize: new L.Point(20, 20),\n\t\t\tclassName: 'leaflet-div-icon leaflet-editing-icon leaflet-touch-icon'\n\t\t}),\n\t\tguidelineDistance: 20,\n\t\tmaxGuideLineLength: 4000,\n\t\tshapeOptions: {\n\t\t\tstroke: true,\n\t\t\tcolor: '#3388ff',\n\t\t\tweight: 4,\n\t\t\topacity: 0.5,\n\t\t\tfill: false,\n\t\t\tclickable: true\n\t\t},\n\t\tmetric: true, // Whether to use the metric measurement system or imperial\n\t\tfeet: true, // When not metric, to use feet instead of yards for display.\n\t\tnautic: false, // When not metric, not feet use nautic mile for display\n\t\tshowLength: true, // Whether to display distance in the tooltip\n\t\tzIndexOffset: 2000, // This should be > than the highest z-index any map layers\n\t\tfactor: 1, // To change distance calculation\n\t\tmaxPoints: 0 // Once this number of points are placed, finish shape\n\t},\n\n\t// @method initialize(): void\n\tinitialize: function (map, options) {\n\t\t// if touch, switch to touch icon\n\t\tif (L.Browser.touch) {\n\t\t\tthis.options.icon = this.options.touchIcon;\n\t\t}\n\n\t\t// Need to set this here to ensure the correct message is used.\n\t\tthis.options.drawError.message = L.drawLocal.draw.handlers.polyline.error;\n\n\t\t// Merge default drawError options with custom options\n\t\tif (options && options.drawError) {\n\t\t\toptions.drawError = L.Util.extend({}, this.options.drawError, options.drawError);\n\t\t}\n\n\t\t// Save the type so super can fire, need to do this as cannot do this.TYPE :(\n\t\tthis.type = L.Draw.Polyline.TYPE;\n\n\t\tL.Draw.Feature.prototype.initialize.call(this, map, options);\n\t},\n\n\t// @method addHooks(): void\n\t// Add listener hooks to this handler\n\taddHooks: function () {\n\t\tL.Draw.Feature.prototype.addHooks.call(this);\n\t\tif (this._map) {\n\t\t\tthis._markers = [];\n\n\t\t\tthis._markerGroup = new L.LayerGroup();\n\t\t\tthis._map.addLayer(this._markerGroup);\n\n\t\t\tthis._poly = new L.Polyline([], this.options.shapeOptions);\n\n\t\t\tthis._tooltip.updateContent(this._getTooltipText());\n\n\t\t\t// Make a transparent marker that will used to catch click events. These click\n\t\t\t// events will create the vertices. We need to do this so we can ensure that\n\t\t\t// we can create vertices over other map layers (markers, vector layers). We\n\t\t\t// also do not want to trigger any click handlers of objects we are clicking on\n\t\t\t// while drawing.\n\t\t\tif (!this._mouseMarker) {\n\t\t\t\tthis._mouseMarker = L.marker(this._map.getCenter(), {\n\t\t\t\t\ticon: L.divIcon({\n\t\t\t\t\t\tclassName: 'leaflet-mouse-marker',\n\t\t\t\t\t\ticonAnchor: [20, 20],\n\t\t\t\t\t\ticonSize: [40, 40]\n\t\t\t\t\t}),\n\t\t\t\t\topacity: 0,\n\t\t\t\t\tzIndexOffset: this.options.zIndexOffset\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis._mouseMarker\n\t\t\t\t.on('mouseout', this._onMouseOut, this)\n\t\t\t\t.on('mousemove', this._onMouseMove, this) // Necessary to prevent 0.8 stutter\n\t\t\t\t.on('mousedown', this._onMouseDown, this)\n\t\t\t\t.on('mouseup', this._onMouseUp, this) // Necessary for 0.8 compatibility\n\t\t\t\t.addTo(this._map);\n\n\t\t\tthis._map\n\t\t\t\t.on('mouseup', this._onMouseUp, this) // Necessary for 0.7 compatibility\n\t\t\t\t.on('mousemove', this._onMouseMove, this)\n\t\t\t\t.on('zoomlevelschange', this._onZoomEnd, this)\n\t\t\t\t.on('touchstart', this._onTouch, this)\n\t\t\t\t.on('zoomend', this._onZoomEnd, this);\n\n\t\t}\n\t},\n\n\t// @method removeHooks(): void\n\t// Remove listener hooks from this handler.\n\tremoveHooks: function () {\n\t\tL.Draw.Feature.prototype.removeHooks.call(this);\n\n\t\tthis._clearHideErrorTimeout();\n\n\t\tthis._cleanUpShape();\n\n\t\t// remove markers from map\n\t\tthis._map.removeLayer(this._markerGroup);\n\t\tdelete this._markerGroup;\n\t\tdelete this._markers;\n\n\t\tthis._map.removeLayer(this._poly);\n\t\tdelete this._poly;\n\n\t\tthis._mouseMarker\n\t\t\t.off('mousedown', this._onMouseDown, this)\n\t\t\t.off('mouseout', this._onMouseOut, this)\n\t\t\t.off('mouseup', this._onMouseUp, this)\n\t\t\t.off('mousemove', this._onMouseMove, this);\n\t\tthis._map.removeLayer(this._mouseMarker);\n\t\tdelete this._mouseMarker;\n\n\t\t// clean up DOM\n\t\tthis._clearGuides();\n\n\t\tthis._map\n\t\t\t.off('mouseup', this._onMouseUp, this)\n\t\t\t.off('mousemove', this._onMouseMove, this)\n\t\t\t.off('zoomlevelschange', this._onZoomEnd, this)\n\t\t\t.off('zoomend', this._onZoomEnd, this)\n\t\t\t.off('touchstart', this._onTouch, this)\n\t\t\t.off('click', this._onTouch, this);\n\t},\n\n\t// @method deleteLastVertex(): void\n\t// Remove the last vertex from the polyline, removes polyline from map if only one point exists.\n\tdeleteLastVertex: function () {\n\t\tif (this._markers.length <= 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar lastMarker = this._markers.pop(),\n\t\t\tpoly = this._poly,\n\t\t\t// Replaces .spliceLatLngs()\n\t\t\tlatlngs = poly.getLatLngs(),\n\t\t\tlatlng = latlngs.splice(-1, 1)[0];\n\t\tthis._poly.setLatLngs(latlngs);\n\n\t\tthis._markerGroup.removeLayer(lastMarker);\n\n\t\tif (poly.getLatLngs().length < 2) {\n\t\t\tthis._map.removeLayer(poly);\n\t\t}\n\n\t\tthis._vertexChanged(latlng, false);\n\t},\n\n\t// @method addVertex(): void\n\t// Add a vertex to the end of the polyline\n\taddVertex: function (latlng) {\n\t\tvar markersLength = this._markers.length;\n\t\t// markersLength must be greater than or equal to 2 before intersections can occur\n\t\tif (markersLength >= 2 && !this.options.allowIntersection && this._poly.newLatLngIntersects(latlng)) {\n\t\t\tthis._showErrorTooltip();\n\t\t\treturn;\n\t\t}\n\t\telse if (this._errorShown) {\n\t\t\tthis._hideErrorTooltip();\n\t\t}\n\n\t\tthis._markers.push(this._createMarker(latlng));\n\n\t\tthis._poly.addLatLng(latlng);\n\n\t\tif (this._poly.getLatLngs().length === 2) {\n\t\t\tthis._map.addLayer(this._poly);\n\t\t}\n\n\t\tthis._vertexChanged(latlng, true);\n\t},\n\n\t// @method completeShape(): void\n\t// Closes the polyline between the first and last points\n\tcompleteShape: function () {\n\t\tif (this._markers.length <= 1 || !this._shapeIsValid()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._fireCreatedEvent();\n\t\tthis.disable();\n\n\t\tif (this.options.repeatMode) {\n\t\t\tthis.enable();\n\t\t}\n\t},\n\n\t_finishShape: function () {\n\t\tvar latlngs = this._poly._defaultShape ? this._poly._defaultShape() : this._poly.getLatLngs();\n\t\tvar intersects = this._poly.newLatLngIntersects(latlngs[latlngs.length - 1]);\n\n\t\tif ((!this.options.allowIntersection && intersects) || !this._shapeIsValid()) {\n\t\t\tthis._showErrorTooltip();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._fireCreatedEvent();\n\t\tthis.disable();\n\t\tif (this.options.repeatMode) {\n\t\t\tthis.enable();\n\t\t}\n\t},\n\n\t// Called to verify the shape is valid when the user tries to finish it\n\t// Return false if the shape is not valid\n\t_shapeIsValid: function () {\n\t\treturn true;\n\t},\n\n\t_onZoomEnd: function () {\n\t\tif (this._markers !== null) {\n\t\t\tthis._updateGuide();\n\t\t}\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tvar newPos = this._map.mouseEventToLayerPoint(e.originalEvent);\n\t\tvar latlng = this._map.layerPointToLatLng(newPos);\n\n\t\t// Save latlng\n\t\t// should this be moved to _updateGuide() ?\n\t\tthis._currentLatLng = latlng;\n\n\t\tthis._updateTooltip(latlng);\n\n\t\t// Update the guide line\n\t\tthis._updateGuide(newPos);\n\n\t\t// Update the mouse marker position\n\t\tthis._mouseMarker.setLatLng(latlng);\n\n\t\tL.DomEvent.preventDefault(e.originalEvent);\n\t},\n\n\t_vertexChanged: function (latlng, added) {\n\t\tthis._map.fire(L.Draw.Event.DRAWVERTEX, {layers: this._markerGroup});\n\t\tthis._updateFinishHandler();\n\n\t\tthis._updateRunningMeasure(latlng, added);\n\n\t\tthis._clearGuides();\n\n\t\tthis._updateTooltip();\n\t},\n\n\t_onMouseDown: function (e) {\n\t\tif (!this._clickHandled && !this._touchHandled && !this._disableMarkers) {\n\t\t\tthis._onMouseMove(e);\n\t\t\tthis._clickHandled = true;\n\t\t\tthis._disableNewMarkers();\n\t\t\tvar originalEvent = e.originalEvent;\n\t\t\tvar clientX = originalEvent.clientX;\n\t\t\tvar clientY = originalEvent.clientY;\n\t\t\tthis._startPoint.call(this, clientX, clientY);\n\t\t}\n\t},\n\n\t_startPoint: function (clientX, clientY) {\n\t\tthis._mouseDownOrigin = L.point(clientX, clientY);\n\t},\n\n\t_onMouseUp: function (e) {\n\t\tvar originalEvent = e.originalEvent;\n\t\tvar clientX = originalEvent.clientX;\n\t\tvar clientY = originalEvent.clientY;\n\t\tthis._endPoint.call(this, clientX, clientY, e);\n\t\tthis._clickHandled = null;\n\t},\n\n\t_endPoint: function (clientX, clientY, e) {\n\t\tif (this._mouseDownOrigin) {\n\t\t\tvar dragCheckDistance = L.point(clientX, clientY)\n\t\t\t\t.distanceTo(this._mouseDownOrigin);\n\t\t\tvar lastPtDistance = this._calculateFinishDistance(e.latlng);\n\t\t\tif (this.options.maxPoints > 1 && this.options.maxPoints == this._markers.length + 1) {\n\t\t\t\tthis.addVertex(e.latlng);\n\t\t\t\tthis._finishShape();\n\t\t\t} else if (lastPtDistance < 10 && L.Browser.touch) {\n\t\t\t\tthis._finishShape();\n\t\t\t} else if (Math.abs(dragCheckDistance) < 9 * (window.devicePixelRatio || 1)) {\n\t\t\t\tthis.addVertex(e.latlng);\n\t\t\t}\n\t\t\tthis._enableNewMarkers(); // after a short pause, enable new markers\n\t\t}\n\t\tthis._mouseDownOrigin = null;\n\t},\n\n\t// ontouch prevented by clickHandled flag because some browsers fire both click/touch events,\n\t// causing unwanted behavior\n\t_onTouch: function (e) {\n\t\tvar originalEvent = e.originalEvent;\n\t\tvar clientX;\n\t\tvar clientY;\n\t\tif (originalEvent.touches && originalEvent.touches[0] && !this._clickHandled && !this._touchHandled && !this._disableMarkers) {\n\t\t\tclientX = originalEvent.touches[0].clientX;\n\t\t\tclientY = originalEvent.touches[0].clientY;\n\t\t\tthis._disableNewMarkers();\n\t\t\tthis._touchHandled = true;\n\t\t\tthis._startPoint.call(this, clientX, clientY);\n\t\t\tthis._endPoint.call(this, clientX, clientY, e);\n\t\t\tthis._touchHandled = null;\n\t\t}\n\t\tthis._clickHandled = null;\n\t},\n\n\t_onMouseOut: function () {\n\t\tif (this._tooltip) {\n\t\t\tthis._tooltip._onMouseOut.call(this._tooltip);\n\t\t}\n\t},\n\n\t// calculate if we are currently within close enough distance\n\t// of the closing point (first point for shapes, last point for lines)\n\t// this is semi-ugly code but the only reliable way i found to get the job done\n\t// note: calculating point.distanceTo between mouseDownOrigin and last marker did NOT work\n\t_calculateFinishDistance: function (potentialLatLng) {\n\t\tvar lastPtDistance;\n\t\tif (this._markers.length > 0) {\n\t\t\tvar finishMarker;\n\t\t\tif (this.type === L.Draw.Polyline.TYPE) {\n\t\t\t\tfinishMarker = this._markers[this._markers.length - 1];\n\t\t\t} else if (this.type === L.Draw.Polygon.TYPE) {\n\t\t\t\tfinishMarker = this._markers[0];\n\t\t\t} else {\n\t\t\t\treturn Infinity;\n\t\t\t}\n\t\t\tvar lastMarkerPoint = this._map.latLngToContainerPoint(finishMarker.getLatLng()),\n\t\t\t\tpotentialMarker = new L.Marker(potentialLatLng, {\n\t\t\t\t\ticon: this.options.icon,\n\t\t\t\t\tzIndexOffset: this.options.zIndexOffset * 2\n\t\t\t\t});\n\t\t\tvar potentialMarkerPint = this._map.latLngToContainerPoint(potentialMarker.getLatLng());\n\t\t\tlastPtDistance = lastMarkerPoint.distanceTo(potentialMarkerPint);\n\t\t} else {\n\t\t\tlastPtDistance = Infinity;\n\t\t}\n\t\treturn lastPtDistance;\n\t},\n\n\t_updateFinishHandler: function () {\n\t\tvar markerCount = this._markers.length;\n\t\t// The last marker should have a click handler to close the polyline\n\t\tif (markerCount > 1) {\n\t\t\tthis._markers[markerCount - 1].on('click', this._finishShape, this);\n\t\t}\n\n\t\t// Remove the old marker click handler (as only the last point should close the polyline)\n\t\tif (markerCount > 2) {\n\t\t\tthis._markers[markerCount - 2].off('click', this._finishShape, this);\n\t\t}\n\t},\n\n\t_createMarker: function (latlng) {\n\t\tvar marker = new L.Marker(latlng, {\n\t\t\ticon: this.options.icon,\n\t\t\tzIndexOffset: this.options.zIndexOffset * 2\n\t\t});\n\n\t\tthis._markerGroup.addLayer(marker);\n\n\t\treturn marker;\n\t},\n\n\t_updateGuide: function (newPos) {\n\t\tvar markerCount = this._markers ? this._markers.length : 0;\n\n\t\tif (markerCount > 0) {\n\t\t\tnewPos = newPos || this._map.latLngToLayerPoint(this._currentLatLng);\n\n\t\t\t// draw the guide line\n\t\t\tthis._clearGuides();\n\t\t\tthis._drawGuide(\n\t\t\t\tthis._map.latLngToLayerPoint(this._markers[markerCount - 1].getLatLng()),\n\t\t\t\tnewPos\n\t\t\t);\n\t\t}\n\t},\n\n\t_updateTooltip: function (latLng) {\n\t\tvar text = this._getTooltipText();\n\n\t\tif (latLng) {\n\t\t\tthis._tooltip.updatePosition(latLng);\n\t\t}\n\n\t\tif (!this._errorShown) {\n\t\t\tthis._tooltip.updateContent(text);\n\t\t}\n\t},\n\n\t_drawGuide: function (pointA, pointB) {\n\t\tvar length = Math.floor(Math.sqrt(Math.pow((pointB.x - pointA.x), 2) + Math.pow((pointB.y - pointA.y), 2))),\n\t\t\tguidelineDistance = this.options.guidelineDistance,\n\t\t\tmaxGuideLineLength = this.options.maxGuideLineLength,\n\t\t\t// Only draw a guideline with a max length\n\t\t\ti = length > maxGuideLineLength ? length - maxGuideLineLength : guidelineDistance,\n\t\t\tfraction,\n\t\t\tdashPoint,\n\t\t\tdash;\n\n\t\t//create the guides container if we haven't yet\n\t\tif (!this._guidesContainer) {\n\t\t\tthis._guidesContainer = L.DomUtil.create('div', 'leaflet-draw-guides', this._overlayPane);\n\t\t}\n\n\t\t//draw a dash every GuildeLineDistance\n\t\tfor (; i < length; i += this.options.guidelineDistance) {\n\t\t\t//work out fraction along line we are\n\t\t\tfraction = i / length;\n\n\t\t\t//calculate new x,y point\n\t\t\tdashPoint = {\n\t\t\t\tx: Math.floor((pointA.x * (1 - fraction)) + (fraction * pointB.x)),\n\t\t\t\ty: Math.floor((pointA.y * (1 - fraction)) + (fraction * pointB.y))\n\t\t\t};\n\n\t\t\t//add guide dash to guide container\n\t\t\tdash = L.DomUtil.create('div', 'leaflet-draw-guide-dash', this._guidesContainer);\n\t\t\tdash.style.backgroundColor =\n\t\t\t\t!this._errorShown ? this.options.shapeOptions.color : this.options.drawError.color;\n\n\t\t\tL.DomUtil.setPosition(dash, dashPoint);\n\t\t}\n\t},\n\n\t_updateGuideColor: function (color) {\n\t\tif (this._guidesContainer) {\n\t\t\tfor (var i = 0, l = this._guidesContainer.childNodes.length; i < l; i++) {\n\t\t\t\tthis._guidesContainer.childNodes[i].style.backgroundColor = color;\n\t\t\t}\n\t\t}\n\t},\n\n\t// removes all child elements (guide dashes) from the guides container\n\t_clearGuides: function () {\n\t\tif (this._guidesContainer) {\n\t\t\twhile (this._guidesContainer.firstChild) {\n\t\t\t\tthis._guidesContainer.removeChild(this._guidesContainer.firstChild);\n\t\t\t}\n\t\t}\n\t},\n\n\t_getTooltipText: function () {\n\t\tvar showLength = this.options.showLength,\n\t\t\tlabelText, distanceStr;\n\t\tif (this._markers.length === 0) {\n\t\t\tlabelText = {\n\t\t\t\ttext: L.drawLocal.draw.handlers.polyline.tooltip.start\n\t\t\t};\n\t\t} else {\n\t\t\tdistanceStr = showLength ? this._getMeasurementString() : '';\n\n\t\t\tif (this._markers.length === 1) {\n\t\t\t\tlabelText = {\n\t\t\t\t\ttext: L.drawLocal.draw.handlers.polyline.tooltip.cont,\n\t\t\t\t\tsubtext: distanceStr\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tlabelText = {\n\t\t\t\t\ttext: L.drawLocal.draw.handlers.polyline.tooltip.end,\n\t\t\t\t\tsubtext: distanceStr\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn labelText;\n\t},\n\n\t_updateRunningMeasure: function (latlng, added) {\n\t\tvar markersLength = this._markers.length,\n\t\t\tpreviousMarkerIndex, distance;\n\n\t\tif (this._markers.length === 1) {\n\t\t\tthis._measurementRunningTotal = 0;\n\t\t} else {\n\t\t\tpreviousMarkerIndex = markersLength - (added ? 2 : 1);\n\n\t\t\t// Calculate the distance based on the version\n\t\t\tif (L.GeometryUtil.isVersion07x()) {\n\t\t\t\tdistance = latlng.distanceTo(this._markers[previousMarkerIndex].getLatLng()) * (this.options.factor || 1);\n\t\t\t} else {\n\t\t\t\tdistance = this._map.distance(latlng, this._markers[previousMarkerIndex].getLatLng()) * (this.options.factor || 1);\n\t\t\t}\n\n\t\t\tthis._measurementRunningTotal += distance * (added ? 1 : -1);\n\t\t}\n\t},\n\n\t_getMeasurementString: function () {\n\t\tvar currentLatLng = this._currentLatLng,\n\t\t\tpreviousLatLng = this._markers[this._markers.length - 1].getLatLng(),\n\t\t\tdistance;\n\n\t\t// Calculate the distance from the last fixed point to the mouse position based on the version\n\t\tif (L.GeometryUtil.isVersion07x()) {\n\t\t\tdistance = previousLatLng && currentLatLng && currentLatLng.distanceTo ? this._measurementRunningTotal + currentLatLng.distanceTo(previousLatLng) * (this.options.factor || 1) : this._measurementRunningTotal || 0;\n\t\t} else {\n\t\t\tdistance = previousLatLng && currentLatLng ? this._measurementRunningTotal + this._map.distance(currentLatLng, previousLatLng) * (this.options.factor || 1) : this._measurementRunningTotal || 0;\n\t\t}\n\n\t\treturn L.GeometryUtil.readableDistance(distance, this.options.metric, this.options.feet, this.options.nautic, this.options.precision);\n\t},\n\n\t_showErrorTooltip: function () {\n\t\tthis._errorShown = true;\n\n\t\t// Update tooltip\n\t\tthis._tooltip\n\t\t\t.showAsError()\n\t\t\t.updateContent({text: this.options.drawError.message});\n\n\t\t// Update shape\n\t\tthis._updateGuideColor(this.options.drawError.color);\n\t\tthis._poly.setStyle({color: this.options.drawError.color});\n\n\t\t// Hide the error after 2 seconds\n\t\tthis._clearHideErrorTimeout();\n\t\tthis._hideErrorTimeout = setTimeout(L.Util.bind(this._hideErrorTooltip, this), this.options.drawError.timeout);\n\t},\n\n\t_hideErrorTooltip: function () {\n\t\tthis._errorShown = false;\n\n\t\tthis._clearHideErrorTimeout();\n\n\t\t// Revert tooltip\n\t\tthis._tooltip\n\t\t\t.removeError()\n\t\t\t.updateContent(this._getTooltipText());\n\n\t\t// Revert shape\n\t\tthis._updateGuideColor(this.options.shapeOptions.color);\n\t\tthis._poly.setStyle({color: this.options.shapeOptions.color});\n\t},\n\n\t_clearHideErrorTimeout: function () {\n\t\tif (this._hideErrorTimeout) {\n\t\t\tclearTimeout(this._hideErrorTimeout);\n\t\t\tthis._hideErrorTimeout = null;\n\t\t}\n\t},\n\n\t// disable new markers temporarily;\n\t// this is to prevent duplicated touch/click events in some browsers\n\t_disableNewMarkers: function () {\n\t\tthis._disableMarkers = true;\n\t},\n\n\t// see _disableNewMarkers\n\t_enableNewMarkers: function () {\n\t\tsetTimeout(function () {\n\t\t\tthis._disableMarkers = false;\n\t\t}.bind(this), 50);\n\t},\n\n\t_cleanUpShape: function () {\n\t\tif (this._markers.length > 1) {\n\t\t\tthis._markers[this._markers.length - 1].off('click', this._finishShape, this);\n\t\t}\n\t},\n\n\t_fireCreatedEvent: function () {\n\t\tvar poly = new this.Poly(this._poly.getLatLngs(), this.options.shapeOptions);\n\t\tL.Draw.Feature.prototype._fireCreatedEvent.call(this, poly);\n\t}\n});\n\n\n\n/**\n * @class L.Draw.Polygon\n * @aka Draw.Polygon\n * @inherits L.Draw.Polyline\n */\nL.Draw.Polygon = L.Draw.Polyline.extend({\n\tstatics: {\n\t\tTYPE: 'polygon'\n\t},\n\n\tPoly: L.Polygon,\n\n\toptions: {\n\t\tshowArea: false,\n\t\tshowLength: false,\n\t\tshapeOptions: {\n\t\t\tstroke: true,\n\t\t\tcolor: '#3388ff',\n\t\t\tweight: 4,\n\t\t\topacity: 0.5,\n\t\t\tfill: true,\n\t\t\tfillColor: null, //same as color by default\n\t\t\tfillOpacity: 0.2,\n\t\t\tclickable: true\n\t\t},\n\t\t// Whether to use the metric measurement system (truthy) or not (falsy).\n\t\t// Also defines the units to use for the metric system as an array of\n\t\t// strings (e.g. `['ha', 'm']`).\n\t\tmetric: true,\n\t\tfeet: true, // When not metric, to use feet instead of yards for display.\n\t\tnautic: false, // When not metric, not feet use nautic mile for display\n\t\t// Defines the precision for each type of unit (e.g. {km: 2, ft: 0}\n\t\tprecision: {}\n\t},\n\n\t// @method initialize(): void\n\tinitialize: function (map, options) {\n\t\tL.Draw.Polyline.prototype.initialize.call(this, map, options);\n\n\t\t// Save the type so super can fire, need to do this as cannot do this.TYPE :(\n\t\tthis.type = L.Draw.Polygon.TYPE;\n\t},\n\n\t_updateFinishHandler: function () {\n\t\tvar markerCount = this._markers.length;\n\n\t\t// The first marker should have a click handler to close the polygon\n\t\tif (markerCount === 1) {\n\t\t\tthis._markers[0].on('click', this._finishShape, this);\n\t\t}\n\n\t\t// Add and update the double click handler\n\t\tif (markerCount > 2) {\n\t\t\tthis._markers[markerCount - 1].on('dblclick', this._finishShape, this);\n\t\t\t// Only need to remove handler if has been added before\n\t\t\tif (markerCount > 3) {\n\t\t\t\tthis._markers[markerCount - 2].off('dblclick', this._finishShape, this);\n\t\t\t}\n\t\t}\n\t},\n\n\t_getTooltipText: function () {\n\t\tvar text, subtext;\n\n\t\tif (this._markers.length === 0) {\n\t\t\ttext = L.drawLocal.draw.handlers.polygon.tooltip.start;\n\t\t} else if (this._markers.length < 3) {\n\t\t\ttext = L.drawLocal.draw.handlers.polygon.tooltip.cont;\n\t\t\tsubtext = this._getMeasurementString();\n\t\t} else {\n\t\t\ttext = L.drawLocal.draw.handlers.polygon.tooltip.end;\n\t\t\tsubtext = this._getMeasurementString();\n\t\t}\n\n\t\treturn {\n\t\t\ttext: text,\n\t\t\tsubtext: subtext\n\t\t};\n\t},\n\n\t_getMeasurementString: function () {\n\t\tvar area = this._area,\n\t\t\tmeasurementString = '';\n\n\n\t\tif (!area && !this.options.showLength) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (this.options.showLength) {\n\t\t\tmeasurementString = L.Draw.Polyline.prototype._getMeasurementString.call(this);\n\t\t}\n\n\t\tif (area) {\n\t\t\tmeasurementString += '
    ' + L.GeometryUtil.readableArea(area, this.options.metric, this.options.precision);\n\t\t}\n\n\t\treturn measurementString;\n\t},\n\n\t_shapeIsValid: function () {\n\t\treturn this._markers.length >= 3;\n\t},\n\n\t_vertexChanged: function (latlng, added) {\n\t\tvar latLngs;\n\n\t\t// Check to see if we should show the area\n\t\tif (!this.options.allowIntersection && this.options.showArea) {\n\t\t\tlatLngs = this._poly.getLatLngs();\n\n\t\t\tthis._area = L.GeometryUtil.geodesicArea(latLngs);\n\t\t}\n\n\t\tL.Draw.Polyline.prototype._vertexChanged.call(this, latlng, added);\n\t},\n\n\t_cleanUpShape: function () {\n\t\tvar markerCount = this._markers.length;\n\n\t\tif (markerCount > 0) {\n\t\t\tthis._markers[0].off('click', this._finishShape, this);\n\n\t\t\tif (markerCount > 2) {\n\t\t\t\tthis._markers[markerCount - 1].off('dblclick', this._finishShape, this);\n\t\t\t}\n\t\t}\n\t}\n});\n\n\n\nL.SimpleShape = {};\n/**\n * @class L.Draw.SimpleShape\n * @aka Draw.SimpleShape\n * @inherits L.Draw.Feature\n */\nL.Draw.SimpleShape = L.Draw.Feature.extend({\n\toptions: {\n\t\trepeatMode: false\n\t},\n\n\t// @method initialize(): void\n\tinitialize: function (map, options) {\n\t\tthis._endLabelText = L.drawLocal.draw.handlers.simpleshape.tooltip.end;\n\n\t\tL.Draw.Feature.prototype.initialize.call(this, map, options);\n\t},\n\n\t// @method addHooks(): void\n\t// Add listener hooks to this handler.\n\taddHooks: function () {\n\t\tL.Draw.Feature.prototype.addHooks.call(this);\n\t\tif (this._map) {\n\t\t\tthis._mapDraggable = this._map.dragging.enabled();\n\n\t\t\tif (this._mapDraggable) {\n\t\t\t\tthis._map.dragging.disable();\n\t\t\t}\n\n\t\t\t//TODO refactor: move cursor to styles\n\t\t\tthis._container.style.cursor = 'crosshair';\n\n\t\t\tthis._tooltip.updateContent({text: this._initialLabelText});\n\n\t\t\tthis._map\n\t\t\t\t.on('mousedown', this._onMouseDown, this)\n\t\t\t\t.on('mousemove', this._onMouseMove, this)\n\t\t\t\t.on('touchstart', this._onMouseDown, this)\n\t\t\t\t.on('touchmove', this._onMouseMove, this);\n\n\t\t\t// we should prevent default, otherwise default behavior (scrolling) will fire,\n\t\t\t// and that will cause document.touchend to fire and will stop the drawing\n\t\t\t// (circle, rectangle) in touch mode.\n\t\t\t// (update): we have to send passive now to prevent scroll, because by default it is {passive: true} now, which means,\n\t\t\t// handler can't event.preventDefault\n\t\t\t// check the news https://developers.google.com/web/updates/2016/06/passive-event-listeners\n\t\t\tdocument.addEventListener('touchstart', L.DomEvent.preventDefault, {passive: false});\n\t\t}\n\t},\n\n\t// @method removeHooks(): void\n\t// Remove listener hooks from this handler.\n\tremoveHooks: function () {\n\t\tL.Draw.Feature.prototype.removeHooks.call(this);\n\t\tif (this._map) {\n\t\t\tif (this._mapDraggable) {\n\t\t\t\tthis._map.dragging.enable();\n\t\t\t}\n\n\t\t\t//TODO refactor: move cursor to styles\n\t\t\tthis._container.style.cursor = '';\n\n\t\t\tthis._map\n\t\t\t\t.off('mousedown', this._onMouseDown, this)\n\t\t\t\t.off('mousemove', this._onMouseMove, this)\n\t\t\t\t.off('touchstart', this._onMouseDown, this)\n\t\t\t\t.off('touchmove', this._onMouseMove, this);\n\n\t\t\tL.DomEvent.off(document, 'mouseup', this._onMouseUp, this);\n\t\t\tL.DomEvent.off(document, 'touchend', this._onMouseUp, this);\n\n\t\t\tdocument.removeEventListener('touchstart', L.DomEvent.preventDefault);\n\n\t\t\t// If the box element doesn't exist they must not have moved the mouse, so don't need to destroy/return\n\t\t\tif (this._shape) {\n\t\t\t\tthis._map.removeLayer(this._shape);\n\t\t\t\tdelete this._shape;\n\t\t\t}\n\t\t}\n\t\tthis._isDrawing = false;\n\t},\n\n\t_getTooltipText: function () {\n\t\treturn {\n\t\t\ttext: this._endLabelText\n\t\t};\n\t},\n\n\t_onMouseDown: function (e) {\n\t\tthis._isDrawing = true;\n\t\tthis._startLatLng = e.latlng;\n\n\t\tL.DomEvent\n\t\t\t.on(document, 'mouseup', this._onMouseUp, this)\n\t\t\t.on(document, 'touchend', this._onMouseUp, this)\n\t\t\t.preventDefault(e.originalEvent);\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tvar latlng = e.latlng;\n\n\t\tthis._tooltip.updatePosition(latlng);\n\t\tif (this._isDrawing) {\n\t\t\tthis._tooltip.updateContent(this._getTooltipText());\n\t\t\tthis._drawShape(latlng);\n\t\t}\n\t},\n\n\t_onMouseUp: function () {\n\t\tif (this._shape) {\n\t\t\tthis._fireCreatedEvent();\n\t\t}\n\n\t\tthis.disable();\n\t\tif (this.options.repeatMode) {\n\t\t\tthis.enable();\n\t\t}\n\t}\n});\n\n\n\n/**\n * @class L.Draw.Rectangle\n * @aka Draw.Rectangle\n * @inherits L.Draw.SimpleShape\n */\nL.Draw.Rectangle = L.Draw.SimpleShape.extend({\n\tstatics: {\n\t\tTYPE: 'rectangle'\n\t},\n\n\toptions: {\n\t\tshapeOptions: {\n\t\t\tstroke: true,\n\t\t\tcolor: '#3388ff',\n\t\t\tweight: 4,\n\t\t\topacity: 0.5,\n\t\t\tfill: true,\n\t\t\tfillColor: null, //same as color by default\n\t\t\tfillOpacity: 0.2,\n\t\t\tclickable: true\n\t\t},\n\t\tshowArea: true, //Whether to show the area in the tooltip\n\t\tmetric: true // Whether to use the metric measurement system or imperial\n\t},\n\n\t// @method initialize(): void\n\tinitialize: function (map, options) {\n\t\t// Save the type so super can fire, need to do this as cannot do this.TYPE :(\n\t\tthis.type = L.Draw.Rectangle.TYPE;\n\n\t\tthis._initialLabelText = L.drawLocal.draw.handlers.rectangle.tooltip.start;\n\n\t\tL.Draw.SimpleShape.prototype.initialize.call(this, map, options);\n\t},\n\n\t// @method disable(): void\n\tdisable: function () {\n\t\tif (!this._enabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isCurrentlyTwoClickDrawing = false;\n\t\tL.Draw.SimpleShape.prototype.disable.call(this);\n\t},\n\n\t_onMouseUp: function (e) {\n\t\tif (!this._shape && !this._isCurrentlyTwoClickDrawing) {\n\t\t\tthis._isCurrentlyTwoClickDrawing = true;\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure closing click is on map\n\t\tif (this._isCurrentlyTwoClickDrawing && !_hasAncestor(e.target, 'leaflet-pane')) {\n\t\t\treturn;\n\t\t}\n\n\t\tL.Draw.SimpleShape.prototype._onMouseUp.call(this);\n\t},\n\n\t_drawShape: function (latlng) {\n\t\tif (!this._shape) {\n\t\t\tthis._shape = new L.Rectangle(new L.LatLngBounds(this._startLatLng, latlng), this.options.shapeOptions);\n\t\t\tthis._map.addLayer(this._shape);\n\t\t} else {\n\t\t\tthis._shape.setBounds(new L.LatLngBounds(this._startLatLng, latlng));\n\t\t}\n\t},\n\n\t_fireCreatedEvent: function () {\n\t\tvar rectangle = new L.Rectangle(this._shape.getBounds(), this.options.shapeOptions);\n\t\tL.Draw.SimpleShape.prototype._fireCreatedEvent.call(this, rectangle);\n\t},\n\n\t_getTooltipText: function () {\n\t\tvar tooltipText = L.Draw.SimpleShape.prototype._getTooltipText.call(this),\n\t\t\tshape = this._shape,\n\t\t\tshowArea = this.options.showArea,\n\t\t\tlatLngs, area, subtext;\n\n\t\tif (shape) {\n\t\t\tlatLngs = this._shape._defaultShape ? this._shape._defaultShape() : this._shape.getLatLngs();\n\t\t\tarea = L.GeometryUtil.geodesicArea(latLngs);\n\t\t\tsubtext = showArea ? L.GeometryUtil.readableArea(area, this.options.metric) : '';\n\t\t}\n\n\t\treturn {\n\t\t\ttext: tooltipText.text,\n\t\t\tsubtext: subtext\n\t\t};\n\t}\n});\n\nfunction _hasAncestor(el, cls) {\n\twhile ((el = el.parentElement) && !el.classList.contains(cls)) {\n\t\t;\n\t}\n\treturn el;\n}\n\n\n\n/**\n * @class L.Draw.Marker\n * @aka Draw.Marker\n * @inherits L.Draw.Feature\n */\nL.Draw.Marker = L.Draw.Feature.extend({\n\tstatics: {\n\t\tTYPE: 'marker'\n\t},\n\n\toptions: {\n\t\ticon: new L.Icon.Default(),\n\t\trepeatMode: false,\n\t\tzIndexOffset: 2000 // This should be > than the highest z-index any markers\n\t},\n\n\t// @method initialize(): void\n\tinitialize: function (map, options) {\n\t\t// Save the type so super can fire, need to do this as cannot do this.TYPE :(\n\t\tthis.type = L.Draw.Marker.TYPE;\n\n\t\tthis._initialLabelText = L.drawLocal.draw.handlers.marker.tooltip.start;\n\n\t\tL.Draw.Feature.prototype.initialize.call(this, map, options);\n\t},\n\n\t// @method addHooks(): void\n\t// Add listener hooks to this handler.\n\taddHooks: function () {\n\t\tL.Draw.Feature.prototype.addHooks.call(this);\n\n\t\tif (this._map) {\n\t\t\tthis._tooltip.updateContent({text: this._initialLabelText});\n\n\t\t\t// Same mouseMarker as in Draw.Polyline\n\t\t\tif (!this._mouseMarker) {\n\t\t\t\tthis._mouseMarker = L.marker(this._map.getCenter(), {\n\t\t\t\t\ticon: L.divIcon({\n\t\t\t\t\t\tclassName: 'leaflet-mouse-marker',\n\t\t\t\t\t\ticonAnchor: [20, 20],\n\t\t\t\t\t\ticonSize: [40, 40]\n\t\t\t\t\t}),\n\t\t\t\t\topacity: 0,\n\t\t\t\t\tzIndexOffset: this.options.zIndexOffset\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis._mouseMarker\n\t\t\t\t.on('click', this._onClick, this)\n\t\t\t\t.addTo(this._map);\n\n\t\t\tthis._map.on('mousemove', this._onMouseMove, this);\n\t\t\tthis._map.on('click', this._onTouch, this);\n\t\t}\n\t},\n\n\t// @method removeHooks(): void\n\t// Remove listener hooks from this handler.\n\tremoveHooks: function () {\n\t\tL.Draw.Feature.prototype.removeHooks.call(this);\n\n\t\tif (this._map) {\n\t\t\tthis._map\n\t\t\t\t.off('click', this._onClick, this)\n\t\t\t\t.off('click', this._onTouch, this);\n\t\t\tif (this._marker) {\n\t\t\t\tthis._marker.off('click', this._onClick, this);\n\t\t\t\tthis._map\n\t\t\t\t\t.removeLayer(this._marker);\n\t\t\t\tdelete this._marker;\n\t\t\t}\n\n\t\t\tthis._mouseMarker.off('click', this._onClick, this);\n\t\t\tthis._map.removeLayer(this._mouseMarker);\n\t\t\tdelete this._mouseMarker;\n\n\t\t\tthis._map.off('mousemove', this._onMouseMove, this);\n\t\t}\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tvar latlng = e.latlng;\n\n\t\tthis._tooltip.updatePosition(latlng);\n\t\tthis._mouseMarker.setLatLng(latlng);\n\n\t\tif (!this._marker) {\n\t\t\tthis._marker = this._createMarker(latlng);\n\t\t\t// Bind to both marker and map to make sure we get the click event.\n\t\t\tthis._marker.on('click', this._onClick, this);\n\t\t\tthis._map\n\t\t\t\t.on('click', this._onClick, this)\n\t\t\t\t.addLayer(this._marker);\n\t\t}\n\t\telse {\n\t\t\tlatlng = this._mouseMarker.getLatLng();\n\t\t\tthis._marker.setLatLng(latlng);\n\t\t}\n\t},\n\n\t_createMarker: function (latlng) {\n\t\treturn new L.Marker(latlng, {\n\t\t\ticon: this.options.icon,\n\t\t\tzIndexOffset: this.options.zIndexOffset\n\t\t});\n\t},\n\n\t_onClick: function () {\n\t\tthis._fireCreatedEvent();\n\n\t\tthis.disable();\n\t\tif (this.options.repeatMode) {\n\t\t\tthis.enable();\n\t\t}\n\t},\n\n\t_onTouch: function (e) {\n\t\t// called on click & tap, only really does any thing on tap\n\t\tthis._onMouseMove(e); // creates & places marker\n\t\tthis._onClick(); // permanently places marker & ends interaction\n\t},\n\n\t_fireCreatedEvent: function () {\n\t\tvar marker = new L.Marker.Touch(this._marker.getLatLng(), {icon: this.options.icon});\n\t\tL.Draw.Feature.prototype._fireCreatedEvent.call(this, marker);\n\t}\n});\n\n\n\n/**\n * @class L.Draw.CircleMarker\n * @aka Draw.CircleMarker\n * @inherits L.Draw.Marker\n */\nL.Draw.CircleMarker = L.Draw.Marker.extend({\n\tstatics: {\n\t\tTYPE: 'circlemarker'\n\t},\n\n\toptions: {\n\t\tstroke: true,\n\t\tcolor: '#3388ff',\n\t\tweight: 4,\n\t\topacity: 0.5,\n\t\tfill: true,\n\t\tfillColor: null, //same as color by default\n\t\tfillOpacity: 0.2,\n\t\tclickable: true,\n\t\tzIndexOffset: 2000 // This should be > than the highest z-index any markers\n\t},\n\n\t// @method initialize(): void\n\tinitialize: function (map, options) {\n\t\t// Save the type so super can fire, need to do this as cannot do this.TYPE :(\n\t\tthis.type = L.Draw.CircleMarker.TYPE;\n\n\t\tthis._initialLabelText = L.drawLocal.draw.handlers.circlemarker.tooltip.start;\n\n\t\tL.Draw.Feature.prototype.initialize.call(this, map, options);\n\t},\n\n\n\t_fireCreatedEvent: function () {\n\t\tvar circleMarker = new L.CircleMarker(this._marker.getLatLng(), this.options);\n\t\tL.Draw.Feature.prototype._fireCreatedEvent.call(this, circleMarker);\n\t},\n\n\t_createMarker: function (latlng) {\n\t\treturn new L.CircleMarker(latlng, this.options);\n\t}\n});\n\n\n\n/**\n * @class L.Draw.Circle\n * @aka Draw.Circle\n * @inherits L.Draw.SimpleShape\n */\nL.Draw.Circle = L.Draw.SimpleShape.extend({\n\tstatics: {\n\t\tTYPE: 'circle'\n\t},\n\n\toptions: {\n\t\tshapeOptions: {\n\t\t\tstroke: true,\n\t\t\tcolor: '#3388ff',\n\t\t\tweight: 4,\n\t\t\topacity: 0.5,\n\t\t\tfill: true,\n\t\t\tfillColor: null, //same as color by default\n\t\t\tfillOpacity: 0.2,\n\t\t\tclickable: true\n\t\t},\n\t\tshowRadius: true,\n\t\tmetric: true, // Whether to use the metric measurement system or imperial\n\t\tfeet: true, // When not metric, use feet instead of yards for display\n\t\tnautic: false // When not metric, not feet use nautic mile for display\n\t},\n\n\t// @method initialize(): void\n\tinitialize: function (map, options) {\n\t\t// Save the type so super can fire, need to do this as cannot do this.TYPE :(\n\t\tthis.type = L.Draw.Circle.TYPE;\n\n\t\tthis._initialLabelText = L.drawLocal.draw.handlers.circle.tooltip.start;\n\n\t\tL.Draw.SimpleShape.prototype.initialize.call(this, map, options);\n\t},\n\n\t_drawShape: function (latlng) {\n\t\t// Calculate the distance based on the version\n\t\tif (L.GeometryUtil.isVersion07x()) {\n\t\t\tvar distance = this._startLatLng.distanceTo(latlng);\n\t\t} else {\n\t\t\tvar distance = this._map.distance(this._startLatLng, latlng);\n\t\t}\n\n\t\tif (!this._shape) {\n\t\t\tthis._shape = new L.Circle(this._startLatLng, distance, this.options.shapeOptions);\n\t\t\tthis._map.addLayer(this._shape);\n\t\t} else {\n\t\t\tthis._shape.setRadius(distance);\n\t\t}\n\t},\n\n\t_fireCreatedEvent: function () {\n\t\tvar circle = new L.Circle(this._startLatLng, this._shape.getRadius(), this.options.shapeOptions);\n\t\tL.Draw.SimpleShape.prototype._fireCreatedEvent.call(this, circle);\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tvar latlng = e.latlng,\n\t\t\tshowRadius = this.options.showRadius,\n\t\t\tuseMetric = this.options.metric,\n\t\t\tradius;\n\n\t\tthis._tooltip.updatePosition(latlng);\n\t\tif (this._isDrawing) {\n\t\t\tthis._drawShape(latlng);\n\n\t\t\t// Get the new radius (rounded to 1 dp)\n\t\t\tradius = this._shape.getRadius().toFixed(1);\n\n\t\t\tvar subtext = '';\n\t\t\tif (showRadius) {\n\t\t\t\tsubtext = L.drawLocal.draw.handlers.circle.radius + ': ' +\n\t\t\t\t\tL.GeometryUtil.readableDistance(radius, useMetric, this.options.feet, this.options.nautic);\n\t\t\t}\n\t\t\tthis._tooltip.updateContent({\n\t\t\t\ttext: this._endLabelText,\n\t\t\t\tsubtext: subtext\n\t\t\t});\n\t\t}\n\t}\n});\n\n\n\nL.Edit = L.Edit || {};\n\n/**\n * @class L.Edit.Marker\n * @aka Edit.Marker\n */\nL.Edit.Marker = L.Handler.extend({\n\t// @method initialize(): void\n\tinitialize: function (marker, options) {\n\t\tthis._marker = marker;\n\t\tL.setOptions(this, options);\n\t},\n\n\t// @method addHooks(): void\n\t// Add listener hooks to this handler\n\taddHooks: function () {\n\t\tvar marker = this._marker;\n\n\t\tmarker.dragging.enable();\n\t\tmarker.on('dragend', this._onDragEnd, marker);\n\t\tthis._toggleMarkerHighlight();\n\t},\n\n\t// @method removeHooks(): void\n\t// Remove listener hooks from this handler\n\tremoveHooks: function () {\n\t\tvar marker = this._marker;\n\n\t\tmarker.dragging.disable();\n\t\tmarker.off('dragend', this._onDragEnd, marker);\n\t\tthis._toggleMarkerHighlight();\n\t},\n\n\t_onDragEnd: function (e) {\n\t\tvar layer = e.target;\n\t\tlayer.edited = true;\n\t\tthis._map.fire(L.Draw.Event.EDITMOVE, {layer: layer});\n\t},\n\n\t_toggleMarkerHighlight: function () {\n\t\tvar icon = this._marker._icon;\n\n\t\t// Don't do anything if this layer is a marker but doesn't have an icon. Markers\n\t\t// should usually have icons. If using Leaflet.draw with Leaflet.markercluster there\n\t\t// is a chance that a marker doesn't.\n\t\tif (!icon) {\n\t\t\treturn;\n\t\t}\n\n\t\t// This is quite naughty, but I don't see another way of doing it. (short of setting a new icon)\n\t\ticon.style.display = 'none';\n\n\t\tif (L.DomUtil.hasClass(icon, 'leaflet-edit-marker-selected')) {\n\t\t\tL.DomUtil.removeClass(icon, 'leaflet-edit-marker-selected');\n\t\t\t// Offset as the border will make the icon move.\n\t\t\tthis._offsetMarker(icon, -4);\n\n\t\t} else {\n\t\t\tL.DomUtil.addClass(icon, 'leaflet-edit-marker-selected');\n\t\t\t// Offset as the border will make the icon move.\n\t\t\tthis._offsetMarker(icon, 4);\n\t\t}\n\n\t\ticon.style.display = '';\n\t},\n\n\t_offsetMarker: function (icon, offset) {\n\t\tvar iconMarginTop = parseInt(icon.style.marginTop, 10) - offset,\n\t\t\ticonMarginLeft = parseInt(icon.style.marginLeft, 10) - offset;\n\n\t\ticon.style.marginTop = iconMarginTop + 'px';\n\t\ticon.style.marginLeft = iconMarginLeft + 'px';\n\t}\n});\n\nL.Marker.addInitHook(function () {\n\tif (L.Edit.Marker) {\n\t\tthis.editing = new L.Edit.Marker(this);\n\n\t\tif (this.options.editable) {\n\t\t\tthis.editing.enable();\n\t\t}\n\t}\n});\n\n\n\nL.Edit = L.Edit || {};\n\n/**\n * @class L.Edit.Polyline\n * @aka L.Edit.Poly\n * @aka Edit.Poly\n */\nL.Edit.Poly = L.Handler.extend({\n\t// @method initialize(): void\n\tinitialize: function (poly) {\n\n\t\tthis.latlngs = [poly._latlngs];\n\t\tif (poly._holes) {\n\t\t\tthis.latlngs = this.latlngs.concat(poly._holes);\n\t\t}\n\n\t\tthis._poly = poly;\n\n\t\tthis._poly.on('revert-edited', this._updateLatLngs, this);\n\t},\n\n\t// Compatibility method to normalize Poly* objects\n\t// between 0.7.x and 1.0+\n\t_defaultShape: function () {\n\t\tif (!L.Polyline._flat) {\n\t\t\treturn this._poly._latlngs;\n\t\t}\n\t\treturn L.Polyline._flat(this._poly._latlngs) ? this._poly._latlngs : this._poly._latlngs[0];\n\t},\n\n\t_eachVertexHandler: function (callback) {\n\t\tfor (var i = 0; i < this._verticesHandlers.length; i++) {\n\t\t\tcallback(this._verticesHandlers[i]);\n\t\t}\n\t},\n\n\t// @method addHooks(): void\n\t// Add listener hooks to this handler\n\taddHooks: function () {\n\t\tthis._initHandlers();\n\t\tthis._eachVertexHandler(function (handler) {\n\t\t\thandler.addHooks();\n\t\t});\n\t},\n\n\t// @method removeHooks(): void\n\t// Remove listener hooks from this handler\n\tremoveHooks: function () {\n\t\tthis._eachVertexHandler(function (handler) {\n\t\t\thandler.removeHooks();\n\t\t});\n\t},\n\n\t// @method updateMarkers(): void\n\t// Fire an update for each vertex handler\n\tupdateMarkers: function () {\n\t\tthis._eachVertexHandler(function (handler) {\n\t\t\thandler.updateMarkers();\n\t\t});\n\t},\n\n\t_initHandlers: function () {\n\t\tthis._verticesHandlers = [];\n\t\tfor (var i = 0; i < this.latlngs.length; i++) {\n\t\t\tthis._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly, this.latlngs[i], this._poly.options.poly));\n\t\t}\n\t},\n\n\t_updateLatLngs: function (e) {\n\t\tthis.latlngs = [e.layer._latlngs];\n\t\tif (e.layer._holes) {\n\t\t\tthis.latlngs = this.latlngs.concat(e.layer._holes);\n\t\t}\n\t}\n\n});\n\n/**\n * @class L.Edit.PolyVerticesEdit\n * @aka Edit.PolyVerticesEdit\n */\nL.Edit.PolyVerticesEdit = L.Handler.extend({\n\toptions: {\n\t\ticon: new L.DivIcon({\n\t\t\ticonSize: new L.Point(8, 8),\n\t\t\tclassName: 'leaflet-div-icon leaflet-editing-icon'\n\t\t}),\n\t\ttouchIcon: new L.DivIcon({\n\t\t\ticonSize: new L.Point(20, 20),\n\t\t\tclassName: 'leaflet-div-icon leaflet-editing-icon leaflet-touch-icon'\n\t\t}),\n\t\tdrawError: {\n\t\t\tcolor: '#b00b00',\n\t\t\ttimeout: 1000\n\t\t}\n\n\n\t},\n\n\t// @method intialize(): void\n\tinitialize: function (poly, latlngs, options) {\n\t\t// if touch, switch to touch icon\n\t\tif (L.Browser.touch) {\n\t\t\tthis.options.icon = this.options.touchIcon;\n\t\t}\n\t\tthis._poly = poly;\n\n\t\tif (options && options.drawError) {\n\t\t\toptions.drawError = L.Util.extend({}, this.options.drawError, options.drawError);\n\t\t}\n\n\t\tthis._latlngs = latlngs;\n\n\t\tL.setOptions(this, options);\n\t},\n\n\t// Compatibility method to normalize Poly* objects\n\t// between 0.7.x and 1.0+\n\t_defaultShape: function () {\n\t\tif (!L.Polyline._flat) {\n\t\t\treturn this._latlngs;\n\t\t}\n\t\treturn L.Polyline._flat(this._latlngs) ? this._latlngs : this._latlngs[0];\n\t},\n\n\t// @method addHooks(): void\n\t// Add listener hooks to this handler.\n\taddHooks: function () {\n\t\tvar poly = this._poly;\n\t\tvar path = poly._path;\n\n\t\tif (!(poly instanceof L.Polygon)) {\n\t\t\tpoly.options.fill = false;\n\t\t\tif (poly.options.editing) {\n\t\t\t\tpoly.options.editing.fill = false;\n\t\t\t}\n\t\t}\n\n\t\tif (path) {\n\t\t\tif (poly.options.editing && poly.options.editing.className) {\n\t\t\t\tif (poly.options.original.className) {\n\t\t\t\t\tpoly.options.original.className.split(' ').forEach(function (className) {\n\t\t\t\t\t\tL.DomUtil.removeClass(path, className);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tpoly.options.editing.className.split(' ').forEach(function (className) {\n\t\t\t\t\tL.DomUtil.addClass(path, className);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tpoly.setStyle(poly.options.editing);\n\n\t\tif (this._poly._map) {\n\n\t\t\tthis._map = this._poly._map; // Set map\n\n\t\t\tif (!this._markerGroup) {\n\t\t\t\tthis._initMarkers();\n\t\t\t}\n\t\t\tthis._poly._map.addLayer(this._markerGroup);\n\t\t}\n\t},\n\n\t// @method removeHooks(): void\n\t// Remove listener hooks from this handler.\n\tremoveHooks: function () {\n\t\tvar poly = this._poly;\n\t\tvar path = poly._path;\n\n\t\tif (path) {\n\t\t\tif (poly.options.editing && poly.options.editing.className) {\n\t\t\t\tpoly.options.editing.className.split(' ').forEach(function (className) {\n\t\t\t\t\tL.DomUtil.removeClass(path, className);\n\t\t\t\t});\n\t\t\t\tif (poly.options.original.className) {\n\t\t\t\t\tpoly.options.original.className.split(' ').forEach(function (className) {\n\t\t\t\t\t\tL.DomUtil.addClass(path, className);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tpoly.setStyle(poly.options.original);\n\n\t\tif (poly._map) {\n\t\t\tpoly._map.removeLayer(this._markerGroup);\n\t\t\tdelete this._markerGroup;\n\t\t\tdelete this._markers;\n\t\t}\n\t},\n\n\t// @method updateMarkers(): void\n\t// Clear markers and update their location\n\tupdateMarkers: function () {\n\t\tthis._markerGroup.clearLayers();\n\t\tthis._initMarkers();\n\t},\n\n\t_initMarkers: function () {\n\t\tif (!this._markerGroup) {\n\t\t\tthis._markerGroup = new L.LayerGroup();\n\t\t}\n\t\tthis._markers = [];\n\n\t\tvar latlngs = this._defaultShape(),\n\t\t\ti, j, len, marker;\n\n\t\tfor (i = 0, len = latlngs.length; i < len; i++) {\n\n\t\t\tmarker = this._createMarker(latlngs[i], i);\n\t\t\tmarker.on('click', this._onMarkerClick, this);\n\t\t\tmarker.on('contextmenu', this._onContextMenu, this);\n\t\t\tthis._markers.push(marker);\n\t\t}\n\n\t\tvar markerLeft, markerRight;\n\n\t\tfor (i = 0, j = len - 1; i < len; j = i++) {\n\t\t\tif (i === 0 && !(L.Polygon && (this._poly instanceof L.Polygon))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tmarkerLeft = this._markers[j];\n\t\t\tmarkerRight = this._markers[i];\n\n\t\t\tthis._createMiddleMarker(markerLeft, markerRight);\n\t\t\tthis._updatePrevNext(markerLeft, markerRight);\n\t\t}\n\t},\n\n\t_createMarker: function (latlng, index) {\n\t\t// Extending L.Marker in TouchEvents.js to include touch.\n\t\tvar marker = new L.Marker.Touch(latlng, {\n\t\t\tdraggable: true,\n\t\t\ticon: this.options.icon,\n\t\t});\n\n\t\tmarker._origLatLng = latlng;\n\t\tmarker._index = index;\n\n\t\tmarker\n\t\t\t.on('dragstart', this._onMarkerDragStart, this)\n\t\t\t.on('drag', this._onMarkerDrag, this)\n\t\t\t.on('dragend', this._fireEdit, this)\n\t\t\t.on('touchmove', this._onTouchMove, this)\n\t\t\t.on('touchend', this._fireEdit, this)\n\t\t\t.on('MSPointerMove', this._onTouchMove, this)\n\t\t\t.on('MSPointerUp', this._fireEdit, this);\n\n\t\tthis._markerGroup.addLayer(marker);\n\n\t\treturn marker;\n\t},\n\n\t_onMarkerDragStart: function () {\n\t\tthis._poly.fire('editstart');\n\t},\n\n\t_spliceLatLngs: function () {\n\t\tvar latlngs = this._defaultShape();\n\t\tvar removed = [].splice.apply(latlngs, arguments);\n\t\tthis._poly._convertLatLngs(latlngs, true);\n\t\tthis._poly.redraw();\n\t\treturn removed;\n\t},\n\n\t_removeMarker: function (marker) {\n\t\tvar i = marker._index;\n\n\t\tthis._markerGroup.removeLayer(marker);\n\t\tthis._markers.splice(i, 1);\n\t\tthis._spliceLatLngs(i, 1);\n\t\tthis._updateIndexes(i, -1);\n\n\t\tmarker\n\t\t\t.off('dragstart', this._onMarkerDragStart, this)\n\t\t\t.off('drag', this._onMarkerDrag, this)\n\t\t\t.off('dragend', this._fireEdit, this)\n\t\t\t.off('touchmove', this._onMarkerDrag, this)\n\t\t\t.off('touchend', this._fireEdit, this)\n\t\t\t.off('click', this._onMarkerClick, this)\n\t\t\t.off('MSPointerMove', this._onTouchMove, this)\n\t\t\t.off('MSPointerUp', this._fireEdit, this);\n\t},\n\n\t_fireEdit: function () {\n\t\tthis._poly.edited = true;\n\t\tthis._poly.fire('edit');\n\t\tthis._poly._map.fire(L.Draw.Event.EDITVERTEX, {layers: this._markerGroup, poly: this._poly});\n\t},\n\n\t_onMarkerDrag: function (e) {\n\t\tvar marker = e.target;\n\t\tvar poly = this._poly;\n\n\t\tvar oldOrigLatLng = L.LatLngUtil.cloneLatLng(marker._origLatLng);\n\t\tL.extend(marker._origLatLng, marker._latlng);\n\t\tif (poly.options.poly) {\n\t\t\tvar tooltip = poly._map._editTooltip; // Access the tooltip\n\n\t\t\t// If we don't allow intersections and the polygon intersects\n\t\t\tif (!poly.options.poly.allowIntersection && poly.intersects()) {\n\t\t\t\tL.extend(marker._origLatLng, oldOrigLatLng);\n\t\t\t\tmarker.setLatLng(oldOrigLatLng);\n\t\t\t\tvar originalColor = poly.options.color;\n\t\t\t\tpoly.setStyle({color: this.options.drawError.color});\n\t\t\t\tif (tooltip) {\n\t\t\t\t\ttooltip.updateContent({\n\t\t\t\t\t\ttext: L.drawLocal.draw.handlers.polyline.error\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Reset everything back to normal after a second\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tpoly.setStyle({color: originalColor});\n\t\t\t\t\tif (tooltip) {\n\t\t\t\t\t\ttooltip.updateContent({\n\t\t\t\t\t\t\ttext: L.drawLocal.edit.handlers.edit.tooltip.text,\n\t\t\t\t\t\t\tsubtext: L.drawLocal.edit.handlers.edit.tooltip.subtext\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t}\n\n\t\tif (marker._middleLeft) {\n\t\t\tmarker._middleLeft.setLatLng(this._getMiddleLatLng(marker._prev, marker));\n\t\t}\n\t\tif (marker._middleRight) {\n\t\t\tmarker._middleRight.setLatLng(this._getMiddleLatLng(marker, marker._next));\n\t\t}\n\n\t\t//refresh the bounds when draging\n\t\tthis._poly._bounds._southWest = L.latLng(Infinity, Infinity);\n\t\tthis._poly._bounds._northEast = L.latLng(-Infinity, -Infinity);\n\t\tvar latlngs = this._poly.getLatLngs();\n\t\tthis._poly._convertLatLngs(latlngs, true);\n\t\tthis._poly.redraw();\n\t\tthis._poly.fire('editdrag');\n\t},\n\n\t_onMarkerClick: function (e) {\n\n\t\tvar minPoints = L.Polygon && (this._poly instanceof L.Polygon) ? 4 : 3,\n\t\t\tmarker = e.target;\n\n\t\t// If removing this point would create an invalid polyline/polygon don't remove\n\t\tif (this._defaultShape().length < minPoints) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove the marker\n\t\tthis._removeMarker(marker);\n\n\t\t// update prev/next links of adjacent markers\n\t\tthis._updatePrevNext(marker._prev, marker._next);\n\n\t\t// remove ghost markers near the removed marker\n\t\tif (marker._middleLeft) {\n\t\t\tthis._markerGroup.removeLayer(marker._middleLeft);\n\t\t}\n\t\tif (marker._middleRight) {\n\t\t\tthis._markerGroup.removeLayer(marker._middleRight);\n\t\t}\n\n\t\t// create a ghost marker in place of the removed one\n\t\tif (marker._prev && marker._next) {\n\t\t\tthis._createMiddleMarker(marker._prev, marker._next);\n\n\t\t} else if (!marker._prev) {\n\t\t\tmarker._next._middleLeft = null;\n\n\t\t} else if (!marker._next) {\n\t\t\tmarker._prev._middleRight = null;\n\t\t}\n\n\t\tthis._fireEdit();\n\t},\n\n\t_onContextMenu: function (e) {\n\t\tvar marker = e.target;\n\t\tvar poly = this._poly;\n\t\tthis._poly._map.fire(L.Draw.Event.MARKERCONTEXT, {marker: marker, layers: this._markerGroup, poly: this._poly});\n\t\tL.DomEvent.stopPropagation;\n\t},\n\n\t_onTouchMove: function (e) {\n\n\t\tvar layerPoint = this._map.mouseEventToLayerPoint(e.originalEvent.touches[0]),\n\t\t\tlatlng = this._map.layerPointToLatLng(layerPoint),\n\t\t\tmarker = e.target;\n\n\t\tL.extend(marker._origLatLng, latlng);\n\n\t\tif (marker._middleLeft) {\n\t\t\tmarker._middleLeft.setLatLng(this._getMiddleLatLng(marker._prev, marker));\n\t\t}\n\t\tif (marker._middleRight) {\n\t\t\tmarker._middleRight.setLatLng(this._getMiddleLatLng(marker, marker._next));\n\t\t}\n\n\t\tthis._poly.redraw();\n\t\tthis.updateMarkers();\n\t},\n\n\t_updateIndexes: function (index, delta) {\n\t\tthis._markerGroup.eachLayer(function (marker) {\n\t\t\tif (marker._index > index) {\n\t\t\t\tmarker._index += delta;\n\t\t\t}\n\t\t});\n\t},\n\n\t_createMiddleMarker: function (marker1, marker2) {\n\t\tvar latlng = this._getMiddleLatLng(marker1, marker2),\n\t\t\tmarker = this._createMarker(latlng),\n\t\t\tonClick,\n\t\t\tonDragStart,\n\t\t\tonDragEnd;\n\n\t\tmarker.setOpacity(0.6);\n\n\t\tmarker1._middleRight = marker2._middleLeft = marker;\n\n\t\tonDragStart = function () {\n\t\t\tmarker.off('touchmove', onDragStart, this);\n\t\t\tvar i = marker2._index;\n\n\t\t\tmarker._index = i;\n\n\t\t\tmarker\n\t\t\t\t.off('click', onClick, this)\n\t\t\t\t.on('click', this._onMarkerClick, this);\n\n\t\t\tlatlng.lat = marker.getLatLng().lat;\n\t\t\tlatlng.lng = marker.getLatLng().lng;\n\t\t\tthis._spliceLatLngs(i, 0, latlng);\n\t\t\tthis._markers.splice(i, 0, marker);\n\n\t\t\tmarker.setOpacity(1);\n\n\t\t\tthis._updateIndexes(i, 1);\n\t\t\tmarker2._index++;\n\t\t\tthis._updatePrevNext(marker1, marker);\n\t\t\tthis._updatePrevNext(marker, marker2);\n\n\t\t\tthis._poly.fire('editstart');\n\t\t};\n\n\t\tonDragEnd = function () {\n\t\t\tmarker.off('dragstart', onDragStart, this);\n\t\t\tmarker.off('dragend', onDragEnd, this);\n\t\t\tmarker.off('touchmove', onDragStart, this);\n\n\t\t\tthis._createMiddleMarker(marker1, marker);\n\t\t\tthis._createMiddleMarker(marker, marker2);\n\t\t};\n\n\t\tonClick = function () {\n\t\t\tonDragStart.call(this);\n\t\t\tonDragEnd.call(this);\n\t\t\tthis._fireEdit();\n\t\t};\n\n\t\tmarker\n\t\t\t.on('click', onClick, this)\n\t\t\t.on('dragstart', onDragStart, this)\n\t\t\t.on('dragend', onDragEnd, this)\n\t\t\t.on('touchmove', onDragStart, this);\n\n\t\tthis._markerGroup.addLayer(marker);\n\t},\n\n\t_updatePrevNext: function (marker1, marker2) {\n\t\tif (marker1) {\n\t\t\tmarker1._next = marker2;\n\t\t}\n\t\tif (marker2) {\n\t\t\tmarker2._prev = marker1;\n\t\t}\n\t},\n\n\t_getMiddleLatLng: function (marker1, marker2) {\n\t\tvar map = this._poly._map,\n\t\t\tp1 = map.project(marker1.getLatLng()),\n\t\t\tp2 = map.project(marker2.getLatLng());\n\n\t\treturn map.unproject(p1._add(p2)._divideBy(2));\n\t}\n});\n\nL.Polyline.addInitHook(function () {\n\n\t// Check to see if handler has already been initialized. This is to support versions of Leaflet that still have L.Handler.PolyEdit\n\tif (this.editing) {\n\t\treturn;\n\t}\n\n\tif (L.Edit.Poly) {\n\n\t\tthis.editing = new L.Edit.Poly(this);\n\n\t\tif (this.options.editable) {\n\t\t\tthis.editing.enable();\n\t\t}\n\t}\n\n\tthis.on('add', function () {\n\t\tif (this.editing && this.editing.enabled()) {\n\t\t\tthis.editing.addHooks();\n\t\t}\n\t});\n\n\tthis.on('remove', function () {\n\t\tif (this.editing && this.editing.enabled()) {\n\t\t\tthis.editing.removeHooks();\n\t\t}\n\t});\n});\n\n\n\nL.Edit = L.Edit || {};\n/**\n * @class L.Edit.SimpleShape\n * @aka Edit.SimpleShape\n */\nL.Edit.SimpleShape = L.Handler.extend({\n\toptions: {\n\t\tmoveIcon: new L.DivIcon({\n\t\t\ticonSize: new L.Point(8, 8),\n\t\t\tclassName: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-move'\n\t\t}),\n\t\tresizeIcon: new L.DivIcon({\n\t\t\ticonSize: new L.Point(8, 8),\n\t\t\tclassName: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-resize'\n\t\t}),\n\t\ttouchMoveIcon: new L.DivIcon({\n\t\t\ticonSize: new L.Point(20, 20),\n\t\t\tclassName: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon'\n\t\t}),\n\t\ttouchResizeIcon: new L.DivIcon({\n\t\t\ticonSize: new L.Point(20, 20),\n\t\t\tclassName: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon'\n\t\t}),\n\t},\n\n\t// @method intialize(): void\n\tinitialize: function (shape, options) {\n\t\t// if touch, switch to touch icon\n\t\tif (L.Browser.touch) {\n\t\t\tthis.options.moveIcon = this.options.touchMoveIcon;\n\t\t\tthis.options.resizeIcon = this.options.touchResizeIcon;\n\t\t}\n\n\t\tthis._shape = shape;\n\t\tL.Util.setOptions(this, options);\n\t},\n\n\t// @method addHooks(): void\n\t// Add listener hooks to this handler\n\taddHooks: function () {\n\t\tvar shape = this._shape;\n\t\tif (this._shape._map) {\n\t\t\tthis._map = this._shape._map;\n\t\t\tshape.setStyle(shape.options.editing);\n\n\t\t\tif (shape._map) {\n\t\t\t\tthis._map = shape._map;\n\t\t\t\tif (!this._markerGroup) {\n\t\t\t\t\tthis._initMarkers();\n\t\t\t\t}\n\t\t\t\tthis._map.addLayer(this._markerGroup);\n\t\t\t}\n\t\t}\n\t},\n\n\t// @method removeHooks(): void\n\t// Remove listener hooks from this handler\n\tremoveHooks: function () {\n\t\tvar shape = this._shape;\n\n\t\tshape.setStyle(shape.options.original);\n\n\t\tif (shape._map) {\n\t\t\tthis._unbindMarker(this._moveMarker);\n\n\t\t\tfor (var i = 0, l = this._resizeMarkers.length; i < l; i++) {\n\t\t\t\tthis._unbindMarker(this._resizeMarkers[i]);\n\t\t\t}\n\t\t\tthis._resizeMarkers = null;\n\n\t\t\tthis._map.removeLayer(this._markerGroup);\n\t\t\tdelete this._markerGroup;\n\t\t}\n\n\t\tthis._map = null;\n\t},\n\n\t// @method updateMarkers(): void\n\t// Remove the edit markers from this layer\n\tupdateMarkers: function () {\n\t\tthis._markerGroup.clearLayers();\n\t\tthis._initMarkers();\n\t},\n\n\t_initMarkers: function () {\n\t\tif (!this._markerGroup) {\n\t\t\tthis._markerGroup = new L.LayerGroup();\n\t\t}\n\n\t\t// Create center marker\n\t\tthis._createMoveMarker();\n\n\t\t// Create edge marker\n\t\tthis._createResizeMarker();\n\t},\n\n\t_createMoveMarker: function () {\n\t\t// Children override\n\t},\n\n\t_createResizeMarker: function () {\n\t\t// Children override\n\t},\n\n\t_createMarker: function (latlng, icon) {\n\t\t// Extending L.Marker in TouchEvents.js to include touch.\n\t\tvar marker = new L.Marker.Touch(latlng, {\n\t\t\tdraggable: true,\n\t\t\ticon: icon,\n\t\t\tzIndexOffset: 10\n\t\t});\n\n\t\tthis._bindMarker(marker);\n\n\t\tthis._markerGroup.addLayer(marker);\n\n\t\treturn marker;\n\t},\n\n\t_bindMarker: function (marker) {\n\t\tmarker\n\t\t\t.on('dragstart', this._onMarkerDragStart, this)\n\t\t\t.on('drag', this._onMarkerDrag, this)\n\t\t\t.on('dragend', this._onMarkerDragEnd, this)\n\t\t\t.on('touchstart', this._onTouchStart, this)\n\t\t\t.on('touchmove', this._onTouchMove, this)\n\t\t\t.on('MSPointerMove', this._onTouchMove, this)\n\t\t\t.on('touchend', this._onTouchEnd, this)\n\t\t\t.on('MSPointerUp', this._onTouchEnd, this);\n\t},\n\n\t_unbindMarker: function (marker) {\n\t\tmarker\n\t\t\t.off('dragstart', this._onMarkerDragStart, this)\n\t\t\t.off('drag', this._onMarkerDrag, this)\n\t\t\t.off('dragend', this._onMarkerDragEnd, this)\n\t\t\t.off('touchstart', this._onTouchStart, this)\n\t\t\t.off('touchmove', this._onTouchMove, this)\n\t\t\t.off('MSPointerMove', this._onTouchMove, this)\n\t\t\t.off('touchend', this._onTouchEnd, this)\n\t\t\t.off('MSPointerUp', this._onTouchEnd, this);\n\t},\n\n\t_onMarkerDragStart: function (e) {\n\t\tvar marker = e.target;\n\t\tmarker.setOpacity(0);\n\n\t\tthis._shape.fire('editstart');\n\t},\n\n\t_fireEdit: function () {\n\t\tthis._shape.edited = true;\n\t\tthis._shape.fire('edit');\n\t},\n\n\t_onMarkerDrag: function (e) {\n\t\tvar marker = e.target,\n\t\t\tlatlng = marker.getLatLng();\n\n\t\tif (marker === this._moveMarker) {\n\t\t\tthis._move(latlng);\n\t\t} else {\n\t\t\tthis._resize(latlng);\n\t\t}\n\n\t\tthis._shape.redraw();\n\t\tthis._shape.fire('editdrag');\n\t},\n\n\t_onMarkerDragEnd: function (e) {\n\t\tvar marker = e.target;\n\t\tmarker.setOpacity(1);\n\n\t\tthis._fireEdit();\n\t},\n\n\t_onTouchStart: function (e) {\n\t\tL.Edit.SimpleShape.prototype._onMarkerDragStart.call(this, e);\n\n\t\tif (typeof(this._getCorners) === 'function') {\n\t\t\t// Save a reference to the opposite point\n\t\t\tvar corners = this._getCorners(),\n\t\t\t\tmarker = e.target,\n\t\t\t\tcurrentCornerIndex = marker._cornerIndex;\n\n\t\t\tmarker.setOpacity(0);\n\n\t\t\t// Copyed from Edit.Rectangle.js line 23 _onMarkerDragStart()\n\t\t\t// Latlng is null otherwise.\n\t\t\tthis._oppositeCorner = corners[(currentCornerIndex + 2) % 4];\n\t\t\tthis._toggleCornerMarkers(0, currentCornerIndex);\n\t\t}\n\n\t\tthis._shape.fire('editstart');\n\t},\n\n\t_onTouchMove: function (e) {\n\t\tvar layerPoint = this._map.mouseEventToLayerPoint(e.originalEvent.touches[0]),\n\t\t\tlatlng = this._map.layerPointToLatLng(layerPoint),\n\t\t\tmarker = e.target;\n\n\t\tif (marker === this._moveMarker) {\n\t\t\tthis._move(latlng);\n\t\t} else {\n\t\t\tthis._resize(latlng);\n\t\t}\n\n\t\tthis._shape.redraw();\n\n\t\t// prevent touchcancel in IOS\n\t\t// e.preventDefault();\n\t\treturn false;\n\t},\n\n\t_onTouchEnd: function (e) {\n\t\tvar marker = e.target;\n\t\tmarker.setOpacity(1);\n\t\tthis.updateMarkers();\n\t\tthis._fireEdit();\n\t},\n\n\t_move: function () {\n\t\t// Children override\n\t},\n\n\t_resize: function () {\n\t\t// Children override\n\t}\n});\n\n\n\nL.Edit = L.Edit || {};\n/**\n * @class L.Edit.Rectangle\n * @aka Edit.Rectangle\n * @inherits L.Edit.SimpleShape\n */\nL.Edit.Rectangle = L.Edit.SimpleShape.extend({\n\t_createMoveMarker: function () {\n\t\tvar bounds = this._shape.getBounds(),\n\t\t\tcenter = bounds.getCenter();\n\n\t\tthis._moveMarker = this._createMarker(center, this.options.moveIcon);\n\t},\n\n\t_createResizeMarker: function () {\n\t\tvar corners = this._getCorners();\n\n\t\tthis._resizeMarkers = [];\n\n\t\tfor (var i = 0, l = corners.length; i < l; i++) {\n\t\t\tthis._resizeMarkers.push(this._createMarker(corners[i], this.options.resizeIcon));\n\t\t\t// Monkey in the corner index as we will need to know this for dragging\n\t\t\tthis._resizeMarkers[i]._cornerIndex = i;\n\t\t}\n\t},\n\n\t_onMarkerDragStart: function (e) {\n\t\tL.Edit.SimpleShape.prototype._onMarkerDragStart.call(this, e);\n\n\t\t// Save a reference to the opposite point\n\t\tvar corners = this._getCorners(),\n\t\t\tmarker = e.target,\n\t\t\tcurrentCornerIndex = marker._cornerIndex;\n\n\t\tthis._oppositeCorner = corners[(currentCornerIndex + 2) % 4];\n\n\t\tthis._toggleCornerMarkers(0, currentCornerIndex);\n\t},\n\n\t_onMarkerDragEnd: function (e) {\n\t\tvar marker = e.target,\n\t\t\tbounds, center;\n\n\t\t// Reset move marker position to the center\n\t\tif (marker === this._moveMarker) {\n\t\t\tbounds = this._shape.getBounds();\n\t\t\tcenter = bounds.getCenter();\n\n\t\t\tmarker.setLatLng(center);\n\t\t}\n\n\t\tthis._toggleCornerMarkers(1);\n\n\t\tthis._repositionCornerMarkers();\n\n\t\tL.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this, e);\n\t},\n\n\t_move: function (newCenter) {\n\t\tvar latlngs = this._shape._defaultShape ? this._shape._defaultShape() : this._shape.getLatLngs(),\n\t\t\tbounds = this._shape.getBounds(),\n\t\t\tcenter = bounds.getCenter(),\n\t\t\toffset, newLatLngs = [];\n\n\t\t// Offset the latlngs to the new center\n\t\tfor (var i = 0, l = latlngs.length; i < l; i++) {\n\t\t\toffset = [latlngs[i].lat - center.lat, latlngs[i].lng - center.lng];\n\t\t\tnewLatLngs.push([newCenter.lat + offset[0], newCenter.lng + offset[1]]);\n\t\t}\n\n\t\tthis._shape.setLatLngs(newLatLngs);\n\n\t\t// Reposition the resize markers\n\t\tthis._repositionCornerMarkers();\n\n\t\tthis._map.fire(L.Draw.Event.EDITMOVE, {layer: this._shape});\n\t},\n\n\t_resize: function (latlng) {\n\t\tvar bounds;\n\n\t\t// Update the shape based on the current position of this corner and the opposite point\n\t\tthis._shape.setBounds(L.latLngBounds(latlng, this._oppositeCorner));\n\n\t\t// Reposition the move marker\n\t\tbounds = this._shape.getBounds();\n\t\tthis._moveMarker.setLatLng(bounds.getCenter());\n\n\t\tthis._map.fire(L.Draw.Event.EDITRESIZE, {layer: this._shape});\n\t},\n\n\t_getCorners: function () {\n\t\tvar bounds = this._shape.getBounds(),\n\t\t\tnw = bounds.getNorthWest(),\n\t\t\tne = bounds.getNorthEast(),\n\t\t\tse = bounds.getSouthEast(),\n\t\t\tsw = bounds.getSouthWest();\n\n\t\treturn [nw, ne, se, sw];\n\t},\n\n\t_toggleCornerMarkers: function (opacity) {\n\t\tfor (var i = 0, l = this._resizeMarkers.length; i < l; i++) {\n\t\t\tthis._resizeMarkers[i].setOpacity(opacity);\n\t\t}\n\t},\n\n\t_repositionCornerMarkers: function () {\n\t\tvar corners = this._getCorners();\n\n\t\tfor (var i = 0, l = this._resizeMarkers.length; i < l; i++) {\n\t\t\tthis._resizeMarkers[i].setLatLng(corners[i]);\n\t\t}\n\t}\n});\n\nL.Rectangle.addInitHook(function () {\n\tif (L.Edit.Rectangle) {\n\t\tthis.editing = new L.Edit.Rectangle(this);\n\n\t\tif (this.options.editable) {\n\t\t\tthis.editing.enable();\n\t\t}\n\t}\n});\n\n\n\nL.Edit = L.Edit || {};\n/**\n * @class L.Edit.CircleMarker\n * @aka Edit.Circle\n * @inherits L.Edit.SimpleShape\n */\nL.Edit.CircleMarker = L.Edit.SimpleShape.extend({\n\t_createMoveMarker: function () {\n\t\tvar center = this._shape.getLatLng();\n\n\t\tthis._moveMarker = this._createMarker(center, this.options.moveIcon);\n\t},\n\n\t_createResizeMarker: function () {\n\t\t// To avoid an undefined check in L.Edit.SimpleShape.removeHooks\n\t\tthis._resizeMarkers = [];\n\t},\n\n\t_move: function (latlng) {\n\t\tif (this._resizeMarkers.length) {\n\t\t\tvar resizemarkerPoint = this._getResizeMarkerPoint(latlng);\n\t\t\t// Move the resize marker\n\t\t\tthis._resizeMarkers[0].setLatLng(resizemarkerPoint);\n\t\t}\n\n\t\t// Move the circle\n\t\tthis._shape.setLatLng(latlng);\n\n\t\tthis._map.fire(L.Draw.Event.EDITMOVE, {layer: this._shape});\n\t},\n});\n\nL.CircleMarker.addInitHook(function () {\n\tif (L.Edit.CircleMarker) {\n\t\tthis.editing = new L.Edit.CircleMarker(this);\n\n\t\tif (this.options.editable) {\n\t\t\tthis.editing.enable();\n\t\t}\n\t}\n\n\tthis.on('add', function () {\n\t\tif (this.editing && this.editing.enabled()) {\n\t\t\tthis.editing.addHooks();\n\t\t}\n\t});\n\n\tthis.on('remove', function () {\n\t\tif (this.editing && this.editing.enabled()) {\n\t\t\tthis.editing.removeHooks();\n\t\t}\n\t});\n});\n\n\n\nL.Edit = L.Edit || {};\n/**\n * @class L.Edit.Circle\n * @aka Edit.Circle\n * @inherits L.Edit.CircleMarker\n */\nL.Edit.Circle = L.Edit.CircleMarker.extend({\n\n\t_createResizeMarker: function () {\n\t\tvar center = this._shape.getLatLng(),\n\t\t\tresizemarkerPoint = this._getResizeMarkerPoint(center);\n\n\t\tthis._resizeMarkers = [];\n\t\tthis._resizeMarkers.push(this._createMarker(resizemarkerPoint, this.options.resizeIcon));\n\t},\n\n\t_getResizeMarkerPoint: function (latlng) {\n\t\t// From L.shape.getBounds()\n\t\tvar delta = this._shape._radius * Math.cos(Math.PI / 4),\n\t\t\tpoint = this._map.project(latlng);\n\t\treturn this._map.unproject([point.x + delta, point.y - delta]);\n\t},\n\n\t_resize: function (latlng) {\n\t\tvar moveLatLng = this._moveMarker.getLatLng();\n\n\t\t// Calculate the radius based on the version\n\t\tif (L.GeometryUtil.isVersion07x()) {\n\t\t\tradius = moveLatLng.distanceTo(latlng);\n\t\t} else {\n\t\t\tradius = this._map.distance(moveLatLng, latlng);\n\t\t}\n\t\tthis._shape.setRadius(radius);\n\n\t\tif (this._map.editTooltip) {\n\t\t\tthis._map._editTooltip.updateContent({\n\t\t\t\ttext: L.drawLocal.edit.handlers.edit.tooltip.subtext + '
    ' + L.drawLocal.edit.handlers.edit.tooltip.text,\n\t\t\t\tsubtext: L.drawLocal.draw.handlers.circle.radius + ': ' +\n\t\t\t\tL.GeometryUtil.readableDistance(radius, true, this.options.feet, this.options.nautic)\n\t\t\t});\n\t\t}\n\n\t\tthis._shape.setRadius(radius);\n\n\t\tthis._map.fire(L.Draw.Event.EDITRESIZE, {layer: this._shape});\n\t}\n});\n\nL.Circle.addInitHook(function () {\n\tif (L.Edit.Circle) {\n\t\tthis.editing = new L.Edit.Circle(this);\n\n\t\tif (this.options.editable) {\n\t\t\tthis.editing.enable();\n\t\t}\n\t}\n});\n\n\n\nL.Map.mergeOptions({\n\ttouchExtend: true\n});\n\n/**\n * @class L.Map.TouchExtend\n * @aka TouchExtend\n */\nL.Map.TouchExtend = L.Handler.extend({\n\n\t// @method initialize(): void\n\t// Sets TouchExtend private accessor variables\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\t\tthis._container = map._container;\n\t\tthis._pane = map._panes.overlayPane;\n\t},\n\n\t// @method addHooks(): void\n\t// Adds dom listener events to the map container\n\taddHooks: function () {\n\t\tL.DomEvent.on(this._container, 'touchstart', this._onTouchStart, this);\n\t\tL.DomEvent.on(this._container, 'touchend', this._onTouchEnd, this);\n\t\tL.DomEvent.on(this._container, 'touchmove', this._onTouchMove, this);\n\t\tif (this._detectIE()) {\n\t\t\tL.DomEvent.on(this._container, 'MSPointerDown', this._onTouchStart, this);\n\t\t\tL.DomEvent.on(this._container, 'MSPointerUp', this._onTouchEnd, this);\n\t\t\tL.DomEvent.on(this._container, 'MSPointerMove', this._onTouchMove, this);\n\t\t\tL.DomEvent.on(this._container, 'MSPointerCancel', this._onTouchCancel, this);\n\n\t\t} else {\n\t\t\tL.DomEvent.on(this._container, 'touchcancel', this._onTouchCancel, this);\n\t\t\tL.DomEvent.on(this._container, 'touchleave', this._onTouchLeave, this);\n\t\t}\n\t},\n\n\t// @method removeHooks(): void\n\t// Removes dom listener events from the map container\n\tremoveHooks: function () {\n\t\tL.DomEvent.off(this._container, 'touchstart', this._onTouchStart, this);\n\t\tL.DomEvent.off(this._container, 'touchend', this._onTouchEnd, this);\n\t\tL.DomEvent.off(this._container, 'touchmove', this._onTouchMove, this);\n\t\tif (this._detectIE()) {\n\t\t\tL.DomEvent.off(this._container, 'MSPointerDown', this._onTouchStart, this);\n\t\t\tL.DomEvent.off(this._container, 'MSPointerUp', this._onTouchEnd, this);\n\t\t\tL.DomEvent.off(this._container, 'MSPointerMove', this._onTouchMove, this);\n\t\t\tL.DomEvent.off(this._container, 'MSPointerCancel', this._onTouchCancel, this);\n\t\t} else {\n\t\t\tL.DomEvent.off(this._container, 'touchcancel', this._onTouchCancel, this);\n\t\t\tL.DomEvent.off(this._container, 'touchleave', this._onTouchLeave, this);\n\t\t}\n\t},\n\n\t_touchEvent: function (e, type) {\n\t\t// #TODO: fix the pageX error that is do a bug in Android where a single touch triggers two click events\n\t\t// _filterClick is what leaflet uses as a workaround.\n\t\t// This is a problem with more things than just android. Another problem is touchEnd has no touches in\n\t\t// its touch list.\n\t\tvar touchEvent = {};\n\t\tif (typeof e.touches !== 'undefined') {\n\t\t\tif (!e.touches.length) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttouchEvent = e.touches[0];\n\t\t} else if (e.pointerType === 'touch') {\n\t\t\ttouchEvent = e;\n\t\t\tif (!this._filterClick(e)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\tvar containerPoint = this._map.mouseEventToContainerPoint(touchEvent),\n\t\t\tlayerPoint = this._map.mouseEventToLayerPoint(touchEvent),\n\t\t\tlatlng = this._map.layerPointToLatLng(layerPoint);\n\n\t\tthis._map.fire(type, {\n\t\t\tlatlng: latlng,\n\t\t\tlayerPoint: layerPoint,\n\t\t\tcontainerPoint: containerPoint,\n\t\t\tpageX: touchEvent.pageX,\n\t\t\tpageY: touchEvent.pageY,\n\t\t\toriginalEvent: e\n\t\t});\n\t},\n\n\t/** Borrowed from Leaflet and modified for bool ops **/\n\t_filterClick: function (e) {\n\t\tvar timeStamp = (e.timeStamp || e.originalEvent.timeStamp),\n\t\t\telapsed = L.DomEvent._lastClick && (timeStamp - L.DomEvent._lastClick);\n\n\t\t// are they closer together than 500ms yet more than 100ms?\n\t\t// Android typically triggers them ~300ms apart while multiple listeners\n\t\t// on the same event should be triggered far faster;\n\t\t// or check if click is simulated on the element, and if it is, reject any non-simulated events\n\t\tif ((elapsed && elapsed > 100 && elapsed < 500) || (e.target._simulatedClick && !e._simulated)) {\n\t\t\tL.DomEvent.stop(e);\n\t\t\treturn false;\n\t\t}\n\t\tL.DomEvent._lastClick = timeStamp;\n\t\treturn true;\n\t},\n\n\t_onTouchStart: function (e) {\n\t\tif (!this._map._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar type = 'touchstart';\n\t\tthis._touchEvent(e, type);\n\n\t},\n\n\t_onTouchEnd: function (e) {\n\t\tif (!this._map._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar type = 'touchend';\n\t\tthis._touchEvent(e, type);\n\t},\n\n\t_onTouchCancel: function (e) {\n\t\tif (!this._map._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar type = 'touchcancel';\n\t\tif (this._detectIE()) {\n\t\t\ttype = 'pointercancel';\n\t\t}\n\t\tthis._touchEvent(e, type);\n\t},\n\n\t_onTouchLeave: function (e) {\n\t\tif (!this._map._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar type = 'touchleave';\n\t\tthis._touchEvent(e, type);\n\t},\n\n\t_onTouchMove: function (e) {\n\t\tif (!this._map._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar type = 'touchmove';\n\t\tthis._touchEvent(e, type);\n\t},\n\n\t_detectIE: function () {\n\t\tvar ua = window.navigator.userAgent;\n\n\t\tvar msie = ua.indexOf('MSIE ');\n\t\tif (msie > 0) {\n\t\t\t// IE 10 or older => return version number\n\t\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t\t}\n\n\t\tvar trident = ua.indexOf('Trident/');\n\t\tif (trident > 0) {\n\t\t\t// IE 11 => return version number\n\t\t\tvar rv = ua.indexOf('rv:');\n\t\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t\t}\n\n\t\tvar edge = ua.indexOf('Edge/');\n\t\tif (edge > 0) {\n\t\t\t// IE 12 => return version number\n\t\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t\t}\n\n\t\t// other browser\n\t\treturn false;\n\t}\n});\n\nL.Map.addInitHook('addHandler', 'touchExtend', L.Map.TouchExtend);\n\n\n/**\n * @class L.Marker.Touch\n * @aka Marker.Touch\n *\n * This isn't full Touch support. This is just to get markers to also support dom touch events after creation\n * #TODO: find a better way of getting markers to support touch.\n */\nL.Marker.Touch = L.Marker.extend({\n\n\t_initInteraction: function () {\n\t\tif (!this.addInteractiveTarget) {\n\t\t\t// 0.7.x support\n\t\t\treturn this._initInteractionLegacy();\n\t\t}\n\t\t// TODO this may need be updated to re-add touch events for 1.0+\n\t\treturn L.Marker.prototype._initInteraction.apply(this);\n\t},\n\n\t// This is an exact copy of https://github.com/Leaflet/Leaflet/blob/v0.7/src/layer/marker/Marker.js\n\t// with the addition of the touch events\n\t_initInteractionLegacy: function () {\n\n\t\tif (!this.options.clickable) {\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO refactor into something shared with Map/Path/etc. to DRY it up\n\n\t\tvar icon = this._icon,\n\t\t\tevents = ['dblclick',\n\t\t\t\t'mousedown',\n\t\t\t\t'mouseover',\n\t\t\t\t'mouseout',\n\t\t\t\t'contextmenu',\n\t\t\t\t'touchstart',\n\t\t\t\t'touchend',\n\t\t\t\t'touchmove'];\n\t\tif (this._detectIE) {\n\t\t\tevents.concat(['MSPointerDown',\n\t\t\t\t'MSPointerUp',\n\t\t\t\t'MSPointerMove',\n\t\t\t\t'MSPointerCancel']);\n\t\t} else {\n\t\t\tevents.concat(['touchcancel']);\n\t\t}\n\n\t\tL.DomUtil.addClass(icon, 'leaflet-clickable');\n\t\tL.DomEvent.on(icon, 'click', this._onMouseClick, this);\n\t\tL.DomEvent.on(icon, 'keypress', this._onKeyPress, this);\n\n\t\tfor (var i = 0; i < events.length; i++) {\n\t\t\tL.DomEvent.on(icon, events[i], this._fireMouseEvent, this);\n\t\t}\n\n\t\tif (L.Handler.MarkerDrag) {\n\t\t\tthis.dragging = new L.Handler.MarkerDrag(this);\n\n\t\t\tif (this.options.draggable) {\n\t\t\t\tthis.dragging.enable();\n\t\t\t}\n\t\t}\n\t},\n\n\t_detectIE: function () {\n\t\tvar ua = window.navigator.userAgent;\n\n\t\tvar msie = ua.indexOf('MSIE ');\n\t\tif (msie > 0) {\n\t\t\t// IE 10 or older => return version number\n\t\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t\t}\n\n\t\tvar trident = ua.indexOf('Trident/');\n\t\tif (trident > 0) {\n\t\t\t// IE 11 => return version number\n\t\t\tvar rv = ua.indexOf('rv:');\n\t\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t\t}\n\n\t\tvar edge = ua.indexOf('Edge/');\n\t\tif (edge > 0) {\n\t\t\t// IE 12 => return version number\n\t\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t\t}\n\n\t\t// other browser\n\t\treturn false;\n\t}\n});\n\n\n\n/**\n * @class L.LatLngUtil\n * @aka LatLngUtil\n */\nL.LatLngUtil = {\n\t// Clones a LatLngs[], returns [][]\n\n\t// @method cloneLatLngs(LatLngs[]): L.LatLngs[]\n\t// Clone the latLng point or points or nested points and return an array with those points\n\tcloneLatLngs: function (latlngs) {\n\t\tvar clone = [];\n\t\tfor (var i = 0, l = latlngs.length; i < l; i++) {\n\t\t\t// Check for nested array (Polyline/Polygon)\n\t\t\tif (Array.isArray(latlngs[i])) {\n\t\t\t\tclone.push(L.LatLngUtil.cloneLatLngs(latlngs[i]));\n\t\t\t} else {\n\t\t\t\tclone.push(this.cloneLatLng(latlngs[i]));\n\t\t\t}\n\t\t}\n\t\treturn clone;\n\t},\n\n\t// @method cloneLatLng(LatLng): L.LatLng\n\t// Clone the latLng and return a new LatLng object.\n\tcloneLatLng: function (latlng) {\n\t\treturn L.latLng(latlng.lat, latlng.lng);\n\t}\n};\n\n\n\n(function () {\n\n\tvar defaultPrecision = {\n\t\tkm: 2,\n\t\tha: 2,\n\t\tm: 0,\n\t\tmi: 2,\n\t\tac: 2,\n\t\tyd: 0,\n\t\tft: 0,\n\t\tnm: 2\n\t};\n\n\n\t/**\n\t * @class L.GeometryUtil\n\t * @aka GeometryUtil\n\t */\n\tL.GeometryUtil = L.extend(L.GeometryUtil || {}, {\n\t\t// Ported from the OpenLayers implementation. See https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Geometry/LinearRing.js#L270\n\n\t\t// @method geodesicArea(): number\n\t\tgeodesicArea: function (latLngs) {\n\t\t\tvar pointsCount = latLngs.length,\n\t\t\t\tarea = 0.0,\n\t\t\t\td2r = Math.PI / 180,\n\t\t\t\tp1, p2;\n\n\t\t\tif (pointsCount > 2) {\n\t\t\t\tfor (var i = 0; i < pointsCount; i++) {\n\t\t\t\t\tp1 = latLngs[i];\n\t\t\t\t\tp2 = latLngs[(i + 1) % pointsCount];\n\t\t\t\t\tarea += ((p2.lng - p1.lng) * d2r) *\n\t\t\t\t\t\t(2 + Math.sin(p1.lat * d2r) + Math.sin(p2.lat * d2r));\n\t\t\t\t}\n\t\t\t\tarea = area * 6378137.0 * 6378137.0 / 2.0;\n\t\t\t}\n\n\t\t\treturn Math.abs(area);\n\t\t},\n\n\t\t// @method formattedNumber(n, precision): string\n\t\t// Returns n in specified number format (if defined) and precision\n\t\tformattedNumber: function (n, precision) {\n\t\t\tvar formatted = parseFloat(n).toFixed(precision),\n\t\t\t\tformat = L.drawLocal.format && L.drawLocal.format.numeric,\n\t\t\t\tdelimiters = format && format.delimiters,\n\t\t\t\tthousands = delimiters && delimiters.thousands,\n\t\t\t\tdecimal = delimiters && delimiters.decimal;\n\n\t\t\tif (thousands || decimal) {\n\t\t\t\tvar splitValue = formatted.split('.');\n\t\t\t\tformatted = thousands ? splitValue[0].replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1' + thousands) : splitValue[0];\n\t\t\t\tdecimal = decimal || '.';\n\t\t\t\tif (splitValue.length > 1) {\n\t\t\t\t\tformatted = formatted + decimal + splitValue[1];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn formatted;\n\t\t},\n\n\t\t// @method readableArea(area, isMetric, precision): string\n\t\t// Returns a readable area string in yards or metric.\n\t\t// The value will be rounded as defined by the precision option object.\n\t\treadableArea: function (area, isMetric, precision) {\n\t\t\tvar areaStr,\n\t\t\t\tunits,\n\t\t\t\tprecision = L.Util.extend({}, defaultPrecision, precision);\n\n\t\t\tif (isMetric) {\n\t\t\t\tunits = ['ha', 'm'];\n\t\t\t\ttype = typeof isMetric;\n\t\t\t\tif (type === 'string') {\n\t\t\t\t\tunits = [isMetric];\n\t\t\t\t} else if (type !== 'boolean') {\n\t\t\t\t\tunits = isMetric;\n\t\t\t\t}\n\n\t\t\t\tif (area >= 1000000 && units.indexOf('km') !== -1) {\n\t\t\t\t\tareaStr = L.GeometryUtil.formattedNumber(area * 0.000001, precision['km']) + ' km²';\n\t\t\t\t} else if (area >= 10000 && units.indexOf('ha') !== -1) {\n\t\t\t\t\tareaStr = L.GeometryUtil.formattedNumber(area * 0.0001, precision['ha']) + ' ha';\n\t\t\t\t} else {\n\t\t\t\t\tareaStr = L.GeometryUtil.formattedNumber(area, precision['m']) + ' m²';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tarea /= 0.836127; // Square yards in 1 meter\n\n\t\t\t\tif (area >= 3097600) { //3097600 square yards in 1 square mile\n\t\t\t\t\tareaStr = L.GeometryUtil.formattedNumber(area / 3097600, precision['mi']) + ' mi²';\n\t\t\t\t} else if (area >= 4840) { //4840 square yards in 1 acre\n\t\t\t\t\tareaStr = L.GeometryUtil.formattedNumber(area / 4840, precision['ac']) + ' acres';\n\t\t\t\t} else {\n\t\t\t\t\tareaStr = L.GeometryUtil.formattedNumber(area, precision['yd']) + ' yd²';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn areaStr;\n\t\t},\n\n\t\t// @method readableDistance(distance, units): string\n\t\t// Converts a metric distance to one of [ feet, nauticalMile, metric or yards ] string\n\t\t//\n\t\t// @alternative\n\t\t// @method readableDistance(distance, isMetric, useFeet, isNauticalMile, precision): string\n\t\t// Converts metric distance to distance string.\n\t\t// The value will be rounded as defined by the precision option object.\n\t\treadableDistance: function (distance, isMetric, isFeet, isNauticalMile, precision) {\n\t\t\tvar distanceStr,\n\t\t\t\tunits,\n\t\t\t\tprecision = L.Util.extend({}, defaultPrecision, precision);\n\n\t\t\tif (isMetric) {\n\t\t\t\tunits = typeof isMetric == 'string' ? isMetric : 'metric';\n\t\t\t} else if (isFeet) {\n\t\t\t\tunits = 'feet';\n\t\t\t} else if (isNauticalMile) {\n\t\t\t\tunits = 'nauticalMile';\n\t\t\t} else {\n\t\t\t\tunits = 'yards';\n\t\t\t}\n\n\t\t\tswitch (units) {\n\t\t\t\tcase 'metric':\n\t\t\t\t\t// show metres when distance is < 1km, then show km\n\t\t\t\t\tif (distance > 1000) {\n\t\t\t\t\t\tdistanceStr = L.GeometryUtil.formattedNumber(distance / 1000, precision['km']) + ' km';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdistanceStr = L.GeometryUtil.formattedNumber(distance, precision['m']) + ' m';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'feet':\n\t\t\t\t\tdistance *= 1.09361 * 3;\n\t\t\t\t\tdistanceStr = L.GeometryUtil.formattedNumber(distance, precision['ft']) + ' ft';\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'nauticalMile':\n\t\t\t\t\tdistance *= 0.53996;\n\t\t\t\t\tdistanceStr = L.GeometryUtil.formattedNumber(distance / 1000, precision['nm']) + ' nm';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'yards':\n\t\t\t\tdefault:\n\t\t\t\t\tdistance *= 1.09361;\n\n\t\t\t\t\tif (distance > 1760) {\n\t\t\t\t\t\tdistanceStr = L.GeometryUtil.formattedNumber(distance / 1760, precision['mi']) + ' miles';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdistanceStr = L.GeometryUtil.formattedNumber(distance, precision['yd']) + ' yd';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn distanceStr;\n\t\t},\n\n\t\t// @method isVersion07x(): boolean\n\t\t// Returns true if the Leaflet version is 0.7.x, false otherwise.\n\t\tisVersion07x: function () {\n\t\t\tvar version = L.version.split('.');\n\t\t\t//If Version is == 0.7.*\n\t\t\treturn parseInt(version[0], 10) === 0 && parseInt(version[1], 10) === 7;\n\t\t},\n\t});\n\n})();\n\n\n\n/**\n * @class L.LineUtil\n * @aka Util\n * @aka L.Utils\n */\nL.Util.extend(L.LineUtil, {\n\n\t// @method segmentsIntersect(): boolean\n\t// Checks to see if two line segments intersect. Does not handle degenerate cases.\n\t// http://compgeom.cs.uiuc.edu/~jeffe/teaching/373/notes/x06-sweepline.pdf\n\tsegmentsIntersect: function (/*Point*/ p, /*Point*/ p1, /*Point*/ p2, /*Point*/ p3) {\n\t\treturn this._checkCounterclockwise(p, p2, p3) !==\n\t\t\tthis._checkCounterclockwise(p1, p2, p3) &&\n\t\t\tthis._checkCounterclockwise(p, p1, p2) !==\n\t\t\tthis._checkCounterclockwise(p, p1, p3);\n\t},\n\n\t// check to see if points are in counterclockwise order\n\t_checkCounterclockwise: function (/*Point*/ p, /*Point*/ p1, /*Point*/ p2) {\n\t\treturn (p2.y - p.y) * (p1.x - p.x) > (p1.y - p.y) * (p2.x - p.x);\n\t}\n});\n\n\n\n/**\n * @class L.Polyline\n * @aka Polyline\n */\nL.Polyline.include({\n\n\t// @method intersects(): boolean\n\t// Check to see if this polyline has any linesegments that intersect.\n\t// NOTE: does not support detecting intersection for degenerate cases.\n\tintersects: function () {\n\t\tvar points = this._getProjectedPoints(),\n\t\t\tlen = points ? points.length : 0,\n\t\t\ti, p, p1;\n\n\t\tif (this._tooFewPointsForIntersection()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (i = len - 1; i >= 3; i--) {\n\t\t\tp = points[i - 1];\n\t\t\tp1 = points[i];\n\n\n\t\t\tif (this._lineSegmentsIntersectsRange(p, p1, i - 2)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t// @method newLatLngIntersects(): boolean\n\t// Check for intersection if new latlng was added to this polyline.\n\t// NOTE: does not support detecting intersection for degenerate cases.\n\tnewLatLngIntersects: function (latlng, skipFirst) {\n\t\t// Cannot check a polyline for intersecting lats/lngs when not added to the map\n\t\tif (!this._map) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.newPointIntersects(this._map.latLngToLayerPoint(latlng), skipFirst);\n\t},\n\n\t// @method newPointIntersects(): boolean\n\t// Check for intersection if new point was added to this polyline.\n\t// newPoint must be a layer point.\n\t// NOTE: does not support detecting intersection for degenerate cases.\n\tnewPointIntersects: function (newPoint, skipFirst) {\n\t\tvar points = this._getProjectedPoints(),\n\t\t\tlen = points ? points.length : 0,\n\t\t\tlastPoint = points ? points[len - 1] : null,\n\t\t\t// The previous previous line segment. Previous line segment doesn't need testing.\n\t\t\tmaxIndex = len - 2;\n\n\t\tif (this._tooFewPointsForIntersection(1)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this._lineSegmentsIntersectsRange(lastPoint, newPoint, maxIndex, skipFirst ? 1 : 0);\n\t},\n\n\t// Polylines with 2 sides can only intersect in cases where points are collinear (we don't support detecting these).\n\t// Cannot have intersection when < 3 line segments (< 4 points)\n\t_tooFewPointsForIntersection: function (extraPoints) {\n\t\tvar points = this._getProjectedPoints(),\n\t\t\tlen = points ? points.length : 0;\n\t\t// Increment length by extraPoints if present\n\t\tlen += extraPoints || 0;\n\n\t\treturn !points || len <= 3;\n\t},\n\n\t// Checks a line segment intersections with any line segments before its predecessor.\n\t// Don't need to check the predecessor as will never intersect.\n\t_lineSegmentsIntersectsRange: function (p, p1, maxIndex, minIndex) {\n\t\tvar points = this._getProjectedPoints(),\n\t\t\tp2, p3;\n\n\t\tminIndex = minIndex || 0;\n\n\t\t// Check all previous line segments (beside the immediately previous) for intersections\n\t\tfor (var j = maxIndex; j > minIndex; j--) {\n\t\t\tp2 = points[j - 1];\n\t\t\tp3 = points[j];\n\n\t\t\tif (L.LineUtil.segmentsIntersect(p, p1, p2, p3)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_getProjectedPoints: function () {\n\t\tif (!this._defaultShape) {\n\t\t\treturn this._originalPoints;\n\t\t}\n\t\tvar points = [],\n\t\t\t_shape = this._defaultShape();\n\n\t\tfor (var i = 0; i < _shape.length; i++) {\n\t\t\tpoints.push(this._map.latLngToLayerPoint(_shape[i]));\n\t\t}\n\t\treturn points;\n\t}\n});\n\n\n\n/**\n * @class L.Polygon\n * @aka Polygon\n */\nL.Polygon.include({\n\n\t// @method intersects(): boolean\n\t// Checks a polygon for any intersecting line segments. Ignores holes.\n\tintersects: function () {\n\t\tvar polylineIntersects,\n\t\t\tpoints = this._getProjectedPoints(),\n\t\t\tlen, firstPoint, lastPoint, maxIndex;\n\n\t\tif (this._tooFewPointsForIntersection()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tpolylineIntersects = L.Polyline.prototype.intersects.call(this);\n\n\t\t// If already found an intersection don't need to check for any more.\n\t\tif (polylineIntersects) {\n\t\t\treturn true;\n\t\t}\n\n\t\tlen = points.length;\n\t\tfirstPoint = points[0];\n\t\tlastPoint = points[len - 1];\n\t\tmaxIndex = len - 2;\n\n\t\t// Check the line segment between last and first point. Don't need to check the first line segment (minIndex = 1)\n\t\treturn this._lineSegmentsIntersectsRange(lastPoint, firstPoint, maxIndex, 1);\n\t}\n});\n\n\n\n/**\n * @class L.Control.Draw\n * @aka L.Draw\n */\nL.Control.Draw = L.Control.extend({\n\n\t// Options\n\toptions: {\n\t\tposition: 'topleft',\n\t\tdraw: {},\n\t\tedit: false\n\t},\n\n\t// @method initialize(): void\n\t// Initializes draw control, toolbars from the options\n\tinitialize: function (options) {\n\t\tif (L.version < '0.7') {\n\t\t\tthrow new Error('Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/');\n\t\t}\n\n\t\tL.Control.prototype.initialize.call(this, options);\n\n\t\tvar toolbar;\n\n\t\tthis._toolbars = {};\n\n\t\t// Initialize toolbars\n\t\tif (L.DrawToolbar && this.options.draw) {\n\t\t\ttoolbar = new L.DrawToolbar(this.options.draw);\n\n\t\t\tthis._toolbars[L.DrawToolbar.TYPE] = toolbar;\n\n\t\t\t// Listen for when toolbar is enabled\n\t\t\tthis._toolbars[L.DrawToolbar.TYPE].on('enable', this._toolbarEnabled, this);\n\t\t}\n\n\t\tif (L.EditToolbar && this.options.edit) {\n\t\t\ttoolbar = new L.EditToolbar(this.options.edit);\n\n\t\t\tthis._toolbars[L.EditToolbar.TYPE] = toolbar;\n\n\t\t\t// Listen for when toolbar is enabled\n\t\t\tthis._toolbars[L.EditToolbar.TYPE].on('enable', this._toolbarEnabled, this);\n\t\t}\n\t\tL.toolbar = this; //set global var for editing the toolbar\n\t},\n\n\t// @method onAdd(): container\n\t// Adds the toolbar container to the map\n\tonAdd: function (map) {\n\t\tvar container = L.DomUtil.create('div', 'leaflet-draw'),\n\t\t\taddedTopClass = false,\n\t\t\ttopClassName = 'leaflet-draw-toolbar-top',\n\t\t\ttoolbarContainer;\n\n\t\tfor (var toolbarId in this._toolbars) {\n\t\t\tif (this._toolbars.hasOwnProperty(toolbarId)) {\n\t\t\t\ttoolbarContainer = this._toolbars[toolbarId].addToolbar(map);\n\n\t\t\t\tif (toolbarContainer) {\n\t\t\t\t\t// Add class to the first toolbar to remove the margin\n\t\t\t\t\tif (!addedTopClass) {\n\t\t\t\t\t\tif (!L.DomUtil.hasClass(toolbarContainer, topClassName)) {\n\t\t\t\t\t\t\tL.DomUtil.addClass(toolbarContainer.childNodes[0], topClassName);\n\t\t\t\t\t\t}\n\t\t\t\t\t\taddedTopClass = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tcontainer.appendChild(toolbarContainer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn container;\n\t},\n\n\t// @method onRemove(): void\n\t// Removes the toolbars from the map toolbar container\n\tonRemove: function () {\n\t\tfor (var toolbarId in this._toolbars) {\n\t\t\tif (this._toolbars.hasOwnProperty(toolbarId)) {\n\t\t\t\tthis._toolbars[toolbarId].removeToolbar();\n\t\t\t}\n\t\t}\n\t},\n\n\t// @method setDrawingOptions(options): void\n\t// Sets options to all toolbar instances\n\tsetDrawingOptions: function (options) {\n\t\tfor (var toolbarId in this._toolbars) {\n\t\t\tif (this._toolbars[toolbarId] instanceof L.DrawToolbar) {\n\t\t\t\tthis._toolbars[toolbarId].setOptions(options);\n\t\t\t}\n\t\t}\n\t},\n\n\t_toolbarEnabled: function (e) {\n\t\tvar enabledToolbar = e.target;\n\n\t\tfor (var toolbarId in this._toolbars) {\n\t\t\tif (this._toolbars[toolbarId] !== enabledToolbar) {\n\t\t\t\tthis._toolbars[toolbarId].disable();\n\t\t\t}\n\t\t}\n\t}\n});\n\nL.Map.mergeOptions({\n\tdrawControlTooltips: true,\n\tdrawControl: false\n});\n\nL.Map.addInitHook(function () {\n\tif (this.options.drawControl) {\n\t\tthis.drawControl = new L.Control.Draw();\n\t\tthis.addControl(this.drawControl);\n\t}\n});\n\n\n\n/**\n * @class L.Draw.Toolbar\n * @aka Toolbar\n *\n * The toolbar class of the API — it is used to create the ui\n * This will be depreciated\n *\n * @example\n *\n * ```js\n * var toolbar = L.Toolbar();\n * toolbar.addToolbar(map);\n * ```\n *\n * ### Disabling a toolbar\n *\n * If you do not want a particular toolbar in your app you can turn it off by setting the toolbar to false.\n *\n * ```js\n * var drawControl = new L.Control.Draw({\n * draw: false,\n * edit: {\n * featureGroup: editableLayers\n * }\n * });\n * ```\n *\n * ### Disabling a toolbar item\n *\n * If you want to turn off a particular toolbar item, set it to false. The following disables drawing polygons and\n * markers. It also turns off the ability to edit layers.\n *\n * ```js\n * var drawControl = new L.Control.Draw({\n * draw: {\n * polygon: false,\n * marker: false\n * },\n * edit: {\n * featureGroup: editableLayers,\n * edit: false\n * }\n * });\n * ```\n */\nL.Toolbar = L.Class.extend({\n\t// @section Methods for modifying the toolbar\n\n\t// @method initialize(options): void\n\t// Toolbar constructor\n\tinitialize: function (options) {\n\t\tL.setOptions(this, options);\n\n\t\tthis._modes = {};\n\t\tthis._actionButtons = [];\n\t\tthis._activeMode = null;\n\n\t\tvar version = L.version.split('.');\n\t\t//If Version is >= 1.2.0\n\t\tif (parseInt(version[0], 10) === 1 && parseInt(version[1], 10) >= 2) {\n\t\t\tL.Toolbar.include(L.Evented.prototype);\n\t\t} else {\n\t\t\tL.Toolbar.include(L.Mixin.Events);\n\t\t}\n\t},\n\n\t// @method enabled(): boolean\n\t// Gets a true/false of whether the toolbar is enabled\n\tenabled: function () {\n\t\treturn this._activeMode !== null;\n\t},\n\n\t// @method disable(): void\n\t// Disables the toolbar\n\tdisable: function () {\n\t\tif (!this.enabled()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._activeMode.handler.disable();\n\t},\n\n\t// @method addToolbar(map): L.DomUtil\n\t// Adds the toolbar to the map and returns the toolbar dom element\n\taddToolbar: function (map) {\n\t\tvar container = L.DomUtil.create('div', 'leaflet-draw-section'),\n\t\t\tbuttonIndex = 0,\n\t\t\tbuttonClassPrefix = this._toolbarClass || '',\n\t\t\tmodeHandlers = this.getModeHandlers(map),\n\t\t\ti;\n\n\t\tthis._toolbarContainer = L.DomUtil.create('div', 'leaflet-draw-toolbar leaflet-bar');\n\t\tthis._map = map;\n\n\t\tfor (i = 0; i < modeHandlers.length; i++) {\n\t\t\tif (modeHandlers[i].enabled) {\n\t\t\t\tthis._initModeHandler(\n\t\t\t\t\tmodeHandlers[i].handler,\n\t\t\t\t\tthis._toolbarContainer,\n\t\t\t\t\tbuttonIndex++,\n\t\t\t\t\tbuttonClassPrefix,\n\t\t\t\t\tmodeHandlers[i].title\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// if no buttons were added, do not add the toolbar\n\t\tif (!buttonIndex) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Save button index of the last button, -1 as we would have ++ after the last button\n\t\tthis._lastButtonIndex = --buttonIndex;\n\n\t\t// Create empty actions part of the toolbar\n\t\tthis._actionsContainer = L.DomUtil.create('ul', 'leaflet-draw-actions');\n\n\t\t// Add draw and cancel containers to the control container\n\t\tcontainer.appendChild(this._toolbarContainer);\n\t\tcontainer.appendChild(this._actionsContainer);\n\n\t\treturn container;\n\t},\n\n\t// @method removeToolbar(): void\n\t// Removes the toolbar and drops the handler event listeners\n\tremoveToolbar: function () {\n\t\t// Dispose each handler\n\t\tfor (var handlerId in this._modes) {\n\t\t\tif (this._modes.hasOwnProperty(handlerId)) {\n\t\t\t\t// Unbind handler button\n\t\t\t\tthis._disposeButton(\n\t\t\t\t\tthis._modes[handlerId].button,\n\t\t\t\t\tthis._modes[handlerId].handler.enable,\n\t\t\t\t\tthis._modes[handlerId].handler\n\t\t\t\t);\n\n\t\t\t\t// Make sure is disabled\n\t\t\t\tthis._modes[handlerId].handler.disable();\n\n\t\t\t\t// Unbind handler\n\t\t\t\tthis._modes[handlerId].handler\n\t\t\t\t\t.off('enabled', this._handlerActivated, this)\n\t\t\t\t\t.off('disabled', this._handlerDeactivated, this);\n\t\t\t}\n\t\t}\n\t\tthis._modes = {};\n\n\t\t// Dispose the actions toolbar\n\t\tfor (var i = 0, l = this._actionButtons.length; i < l; i++) {\n\t\t\tthis._disposeButton(\n\t\t\t\tthis._actionButtons[i].button,\n\t\t\t\tthis._actionButtons[i].callback,\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\t\tthis._actionButtons = [];\n\t\tthis._actionsContainer = null;\n\t},\n\n\t_initModeHandler: function (handler, container, buttonIndex, classNamePredix, buttonTitle) {\n\t\tvar type = handler.type;\n\n\t\tthis._modes[type] = {};\n\n\t\tthis._modes[type].handler = handler;\n\n\t\tthis._modes[type].button = this._createButton({\n\t\t\ttype: type,\n\t\t\ttitle: buttonTitle,\n\t\t\tclassName: classNamePredix + '-' + type,\n\t\t\tcontainer: container,\n\t\t\tcallback: this._modes[type].handler.enable,\n\t\t\tcontext: this._modes[type].handler\n\t\t});\n\n\t\tthis._modes[type].buttonIndex = buttonIndex;\n\n\t\tthis._modes[type].handler\n\t\t\t.on('enabled', this._handlerActivated, this)\n\t\t\t.on('disabled', this._handlerDeactivated, this);\n\t},\n\n\t/* Detect iOS based on browser User Agent, based on:\n\t * http://stackoverflow.com/a/9039885 */\n\t_detectIOS: function () {\n\t\tvar iOS = (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream);\n\t\treturn iOS;\n\t},\n\n\t_createButton: function (options) {\n\n\t\tvar link = L.DomUtil.create('a', options.className || '', options.container);\n\t\t// Screen reader tag\n\t\tvar sr = L.DomUtil.create('span', 'sr-only', options.container);\n\n\t\tlink.href = '#';\n\t\tlink.appendChild(sr);\n\n\t\tif (options.title) {\n\t\t\tlink.title = options.title;\n\t\t\tsr.innerHTML = options.title;\n\t\t}\n\n\t\tif (options.text) {\n\t\t\tlink.innerHTML = options.text;\n\t\t\tsr.innerHTML = options.text;\n\t\t}\n\n\t\t/* iOS does not use click events */\n\t\tvar buttonEvent = this._detectIOS() ? 'touchstart' : 'click';\n\n\t\tL.DomEvent\n\t\t\t.on(link, 'click', L.DomEvent.stopPropagation)\n\t\t\t.on(link, 'mousedown', L.DomEvent.stopPropagation)\n\t\t\t.on(link, 'dblclick', L.DomEvent.stopPropagation)\n\t\t\t.on(link, 'touchstart', L.DomEvent.stopPropagation)\n\t\t\t.on(link, 'click', L.DomEvent.preventDefault)\n\t\t\t.on(link, buttonEvent, options.callback, options.context);\n\n\t\treturn link;\n\t},\n\n\t_disposeButton: function (button, callback) {\n\t\t/* iOS does not use click events */\n\t\tvar buttonEvent = this._detectIOS() ? 'touchstart' : 'click';\n\n\t\tL.DomEvent\n\t\t\t.off(button, 'click', L.DomEvent.stopPropagation)\n\t\t\t.off(button, 'mousedown', L.DomEvent.stopPropagation)\n\t\t\t.off(button, 'dblclick', L.DomEvent.stopPropagation)\n\t\t\t.off(button, 'touchstart', L.DomEvent.stopPropagation)\n\t\t\t.off(button, 'click', L.DomEvent.preventDefault)\n\t\t\t.off(button, buttonEvent, callback);\n\t},\n\n\t_handlerActivated: function (e) {\n\t\t// Disable active mode (if present)\n\t\tthis.disable();\n\n\t\t// Cache new active feature\n\t\tthis._activeMode = this._modes[e.handler];\n\n\t\tL.DomUtil.addClass(this._activeMode.button, 'leaflet-draw-toolbar-button-enabled');\n\n\t\tthis._showActionsToolbar();\n\n\t\tthis.fire('enable');\n\t},\n\n\t_handlerDeactivated: function () {\n\t\tthis._hideActionsToolbar();\n\n\t\tL.DomUtil.removeClass(this._activeMode.button, 'leaflet-draw-toolbar-button-enabled');\n\n\t\tthis._activeMode = null;\n\n\t\tthis.fire('disable');\n\t},\n\n\t_createActions: function (handler) {\n\t\tvar container = this._actionsContainer,\n\t\t\tbuttons = this.getActions(handler),\n\t\t\tl = buttons.length,\n\t\t\tli, di, dl, button;\n\n\t\t// Dispose the actions toolbar (todo: dispose only not used buttons)\n\t\tfor (di = 0, dl = this._actionButtons.length; di < dl; di++) {\n\t\t\tthis._disposeButton(this._actionButtons[di].button, this._actionButtons[di].callback);\n\t\t}\n\t\tthis._actionButtons = [];\n\n\t\t// Remove all old buttons\n\t\twhile (container.firstChild) {\n\t\t\tcontainer.removeChild(container.firstChild);\n\t\t}\n\n\t\tfor (var i = 0; i < l; i++) {\n\t\t\tif ('enabled' in buttons[i] && !buttons[i].enabled) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tli = L.DomUtil.create('li', '', container);\n\n\t\t\tbutton = this._createButton({\n\t\t\t\ttitle: buttons[i].title,\n\t\t\t\ttext: buttons[i].text,\n\t\t\t\tcontainer: li,\n\t\t\t\tcallback: buttons[i].callback,\n\t\t\t\tcontext: buttons[i].context\n\t\t\t});\n\n\t\t\tthis._actionButtons.push({\n\t\t\t\tbutton: button,\n\t\t\t\tcallback: buttons[i].callback\n\t\t\t});\n\t\t}\n\t},\n\n\t_showActionsToolbar: function () {\n\t\tvar buttonIndex = this._activeMode.buttonIndex,\n\t\t\tlastButtonIndex = this._lastButtonIndex,\n\t\t\ttoolbarPosition = this._activeMode.button.offsetTop - 1;\n\n\t\t// Recreate action buttons on every click\n\t\tthis._createActions(this._activeMode.handler);\n\n\t\t// Correctly position the cancel button\n\t\tthis._actionsContainer.style.top = toolbarPosition + 'px';\n\n\t\tif (buttonIndex === 0) {\n\t\t\tL.DomUtil.addClass(this._toolbarContainer, 'leaflet-draw-toolbar-notop');\n\t\t\tL.DomUtil.addClass(this._actionsContainer, 'leaflet-draw-actions-top');\n\t\t}\n\n\t\tif (buttonIndex === lastButtonIndex) {\n\t\t\tL.DomUtil.addClass(this._toolbarContainer, 'leaflet-draw-toolbar-nobottom');\n\t\t\tL.DomUtil.addClass(this._actionsContainer, 'leaflet-draw-actions-bottom');\n\t\t}\n\n\t\tthis._actionsContainer.style.display = 'block';\n\t\tthis._map.fire(L.Draw.Event.TOOLBAROPENED);\n\t},\n\n\t_hideActionsToolbar: function () {\n\t\tthis._actionsContainer.style.display = 'none';\n\n\t\tL.DomUtil.removeClass(this._toolbarContainer, 'leaflet-draw-toolbar-notop');\n\t\tL.DomUtil.removeClass(this._toolbarContainer, 'leaflet-draw-toolbar-nobottom');\n\t\tL.DomUtil.removeClass(this._actionsContainer, 'leaflet-draw-actions-top');\n\t\tL.DomUtil.removeClass(this._actionsContainer, 'leaflet-draw-actions-bottom');\n\t\tthis._map.fire(L.Draw.Event.TOOLBARCLOSED);\n\t}\n});\n\n\n\nL.Draw = L.Draw || {};\n/**\n * @class L.Draw.Tooltip\n * @aka Tooltip\n *\n * The tooltip class — it is used to display the tooltip while drawing\n * This will be depreciated\n *\n * @example\n *\n * ```js\n * var tooltip = L.Draw.Tooltip();\n * ```\n *\n */\nL.Draw.Tooltip = L.Class.extend({\n\n\t// @section Methods for modifying draw state\n\n\t// @method initialize(map): void\n\t// Tooltip constructor\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\t\tthis._popupPane = map._panes.popupPane;\n\t\tthis._visible = false;\n\n\t\tthis._container = map.options.drawControlTooltips ?\n\t\t\tL.DomUtil.create('div', 'leaflet-draw-tooltip', this._popupPane) : null;\n\t\tthis._singleLineLabel = false;\n\n\t\tthis._map.on('mouseout', this._onMouseOut, this);\n\t},\n\n\t// @method dispose(): void\n\t// Remove Tooltip DOM and unbind events\n\tdispose: function () {\n\t\tthis._map.off('mouseout', this._onMouseOut, this);\n\n\t\tif (this._container) {\n\t\t\tthis._popupPane.removeChild(this._container);\n\t\t\tthis._container = null;\n\t\t}\n\t},\n\n\t// @method updateContent(labelText): this\n\t// Changes the tooltip text to string in function call\n\tupdateContent: function (labelText) {\n\t\tif (!this._container) {\n\t\t\treturn this;\n\t\t}\n\t\tlabelText.subtext = labelText.subtext || '';\n\n\t\t// update the vertical position (only if changed)\n\t\tif (labelText.subtext.length === 0 && !this._singleLineLabel) {\n\t\t\tL.DomUtil.addClass(this._container, 'leaflet-draw-tooltip-single');\n\t\t\tthis._singleLineLabel = true;\n\t\t}\n\t\telse if (labelText.subtext.length > 0 && this._singleLineLabel) {\n\t\t\tL.DomUtil.removeClass(this._container, 'leaflet-draw-tooltip-single');\n\t\t\tthis._singleLineLabel = false;\n\t\t}\n\n\t\tthis._container.innerHTML =\n\t\t\t(labelText.subtext.length > 0 ?\n\t\t\t\t'' + labelText.subtext + '' + '
    ' : '') +\n\t\t\t'' + labelText.text + '';\n\n\t\tif (!labelText.text && !labelText.subtext) {\n\t\t\tthis._visible = false;\n\t\t\tthis._container.style.visibility = 'hidden';\n\t\t} else {\n\t\t\tthis._visible = true;\n\t\t\tthis._container.style.visibility = 'inherit';\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t// @method updatePosition(latlng): this\n\t// Changes the location of the tooltip\n\tupdatePosition: function (latlng) {\n\t\tvar pos = this._map.latLngToLayerPoint(latlng),\n\t\t\ttooltipContainer = this._container;\n\n\t\tif (this._container) {\n\t\t\tif (this._visible) {\n\t\t\t\ttooltipContainer.style.visibility = 'inherit';\n\t\t\t}\n\t\t\tL.DomUtil.setPosition(tooltipContainer, pos);\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t// @method showAsError(): this\n\t// Applies error class to tooltip\n\tshowAsError: function () {\n\t\tif (this._container) {\n\t\t\tL.DomUtil.addClass(this._container, 'leaflet-error-draw-tooltip');\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method removeError(): this\n\t// Removes the error class from the tooltip\n\tremoveError: function () {\n\t\tif (this._container) {\n\t\t\tL.DomUtil.removeClass(this._container, 'leaflet-error-draw-tooltip');\n\t\t}\n\t\treturn this;\n\t},\n\n\t_onMouseOut: function () {\n\t\tif (this._container) {\n\t\t\tthis._container.style.visibility = 'hidden';\n\t\t}\n\t}\n});\n\n\n\n/**\n * @class L.DrawToolbar\n * @aka Toolbar\n */\nL.DrawToolbar = L.Toolbar.extend({\n\n\tstatics: {\n\t\tTYPE: 'draw'\n\t},\n\n\toptions: {\n\t\tpolyline: {},\n\t\tpolygon: {},\n\t\trectangle: {},\n\t\tcircle: {},\n\t\tmarker: {},\n\t\tcirclemarker: {}\n\t},\n\n\t// @method initialize(): void\n\tinitialize: function (options) {\n\t\t// Ensure that the options are merged correctly since L.extend is only shallow\n\t\tfor (var type in this.options) {\n\t\t\tif (this.options.hasOwnProperty(type)) {\n\t\t\t\tif (options[type]) {\n\t\t\t\t\toptions[type] = L.extend({}, this.options[type], options[type]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._toolbarClass = 'leaflet-draw-draw';\n\t\tL.Toolbar.prototype.initialize.call(this, options);\n\t},\n\n\t// @method getModeHandlers(): object\n\t// Get mode handlers information\n\tgetModeHandlers: function (map) {\n\t\treturn [\n\t\t\t{\n\t\t\t\tenabled: this.options.polyline,\n\t\t\t\thandler: new L.Draw.Polyline(map, this.options.polyline),\n\t\t\t\ttitle: L.drawLocal.draw.toolbar.buttons.polyline\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: this.options.polygon,\n\t\t\t\thandler: new L.Draw.Polygon(map, this.options.polygon),\n\t\t\t\ttitle: L.drawLocal.draw.toolbar.buttons.polygon\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: this.options.rectangle,\n\t\t\t\thandler: new L.Draw.Rectangle(map, this.options.rectangle),\n\t\t\t\ttitle: L.drawLocal.draw.toolbar.buttons.rectangle\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: this.options.circle,\n\t\t\t\thandler: new L.Draw.Circle(map, this.options.circle),\n\t\t\t\ttitle: L.drawLocal.draw.toolbar.buttons.circle\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: this.options.marker,\n\t\t\t\thandler: new L.Draw.Marker(map, this.options.marker),\n\t\t\t\ttitle: L.drawLocal.draw.toolbar.buttons.marker\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: this.options.circlemarker,\n\t\t\t\thandler: new L.Draw.CircleMarker(map, this.options.circlemarker),\n\t\t\t\ttitle: L.drawLocal.draw.toolbar.buttons.circlemarker\n\t\t\t}\n\t\t];\n\t},\n\n\t// @method getActions(): object\n\t// Get action information\n\tgetActions: function (handler) {\n\t\treturn [\n\t\t\t{\n\t\t\t\tenabled: handler.completeShape,\n\t\t\t\ttitle: L.drawLocal.draw.toolbar.finish.title,\n\t\t\t\ttext: L.drawLocal.draw.toolbar.finish.text,\n\t\t\t\tcallback: handler.completeShape,\n\t\t\t\tcontext: handler\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: handler.deleteLastVertex,\n\t\t\t\ttitle: L.drawLocal.draw.toolbar.undo.title,\n\t\t\t\ttext: L.drawLocal.draw.toolbar.undo.text,\n\t\t\t\tcallback: handler.deleteLastVertex,\n\t\t\t\tcontext: handler\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: L.drawLocal.draw.toolbar.actions.title,\n\t\t\t\ttext: L.drawLocal.draw.toolbar.actions.text,\n\t\t\t\tcallback: this.disable,\n\t\t\t\tcontext: this\n\t\t\t}\n\t\t];\n\t},\n\n\t// @method setOptions(): void\n\t// Sets the options to the toolbar\n\tsetOptions: function (options) {\n\t\tL.setOptions(this, options);\n\n\t\tfor (var type in this._modes) {\n\t\t\tif (this._modes.hasOwnProperty(type) && options.hasOwnProperty(type)) {\n\t\t\t\tthis._modes[type].handler.setOptions(options[type]);\n\t\t\t}\n\t\t}\n\t}\n});\n\n\n\n/*L.Map.mergeOptions({\n editControl: true\n });*/\n/**\n * @class L.EditToolbar\n * @aka EditToolbar\n */\nL.EditToolbar = L.Toolbar.extend({\n\tstatics: {\n\t\tTYPE: 'edit'\n\t},\n\n\toptions: {\n\t\tedit: {\n\t\t\tselectedPathOptions: {\n\t\t\t\tdashArray: '10, 10',\n\n\t\t\t\tfill: true,\n\t\t\t\tfillColor: '#fe57a1',\n\t\t\t\tfillOpacity: 0.1,\n\n\t\t\t\t// Whether to user the existing layers color\n\t\t\t\tmaintainColor: false\n\t\t\t}\n\t\t},\n\t\tremove: {},\n\t\tpoly: null,\n\t\tfeatureGroup: null /* REQUIRED! TODO: perhaps if not set then all layers on the map are selectable? */\n\t},\n\n\t// @method intialize(): void\n\tinitialize: function (options) {\n\t\t// Need to set this manually since null is an acceptable value here\n\t\tif (options.edit) {\n\t\t\tif (typeof options.edit.selectedPathOptions === 'undefined') {\n\t\t\t\toptions.edit.selectedPathOptions = this.options.edit.selectedPathOptions;\n\t\t\t}\n\t\t\toptions.edit.selectedPathOptions = L.extend({}, this.options.edit.selectedPathOptions, options.edit.selectedPathOptions);\n\t\t}\n\n\t\tif (options.remove) {\n\t\t\toptions.remove = L.extend({}, this.options.remove, options.remove);\n\t\t}\n\n\t\tif (options.poly) {\n\t\t\toptions.poly = L.extend({}, this.options.poly, options.poly);\n\t\t}\n\n\t\tthis._toolbarClass = 'leaflet-draw-edit';\n\t\tL.Toolbar.prototype.initialize.call(this, options);\n\n\t\tthis._selectedFeatureCount = 0;\n\t},\n\n\t// @method getModeHandlers(): object\n\t// Get mode handlers information\n\tgetModeHandlers: function (map) {\n\t\tvar featureGroup = this.options.featureGroup;\n\t\treturn [\n\t\t\t{\n\t\t\t\tenabled: this.options.edit,\n\t\t\t\thandler: new L.EditToolbar.Edit(map, {\n\t\t\t\t\tfeatureGroup: featureGroup,\n\t\t\t\t\tselectedPathOptions: this.options.edit.selectedPathOptions,\n\t\t\t\t\tpoly: this.options.poly\n\t\t\t\t}),\n\t\t\t\ttitle: L.drawLocal.edit.toolbar.buttons.edit\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: this.options.remove,\n\t\t\t\thandler: new L.EditToolbar.Delete(map, {\n\t\t\t\t\tfeatureGroup: featureGroup\n\t\t\t\t}),\n\t\t\t\ttitle: L.drawLocal.edit.toolbar.buttons.remove\n\t\t\t}\n\t\t];\n\t},\n\n\t// @method getActions(): object\n\t// Get actions information\n\tgetActions: function (handler) {\n\t\tvar actions = [\n\t\t\t{\n\t\t\t\ttitle: L.drawLocal.edit.toolbar.actions.save.title,\n\t\t\t\ttext: L.drawLocal.edit.toolbar.actions.save.text,\n\t\t\t\tcallback: this._save,\n\t\t\t\tcontext: this\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: L.drawLocal.edit.toolbar.actions.cancel.title,\n\t\t\t\ttext: L.drawLocal.edit.toolbar.actions.cancel.text,\n\t\t\t\tcallback: this.disable,\n\t\t\t\tcontext: this\n\t\t\t}\n\t\t];\n\n\t\tif (handler.removeAllLayers) {\n\t\t\tactions.push({\n\t\t\t\ttitle: L.drawLocal.edit.toolbar.actions.clearAll.title,\n\t\t\t\ttext: L.drawLocal.edit.toolbar.actions.clearAll.text,\n\t\t\t\tcallback: this._clearAllLayers,\n\t\t\t\tcontext: this\n\t\t\t});\n\t\t}\n\n\t\treturn actions;\n\t},\n\n\t// @method addToolbar(map): L.DomUtil\n\t// Adds the toolbar to the map\n\taddToolbar: function (map) {\n\t\tvar container = L.Toolbar.prototype.addToolbar.call(this, map);\n\n\t\tthis._checkDisabled();\n\n\t\tthis.options.featureGroup.on('layeradd layerremove', this._checkDisabled, this);\n\n\t\treturn container;\n\t},\n\n\t// @method removeToolbar(): void\n\t// Removes the toolbar from the map\n\tremoveToolbar: function () {\n\t\tthis.options.featureGroup.off('layeradd layerremove', this._checkDisabled, this);\n\n\t\tL.Toolbar.prototype.removeToolbar.call(this);\n\t},\n\n\t// @method disable(): void\n\t// Disables the toolbar\n\tdisable: function () {\n\t\tif (!this.enabled()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._activeMode.handler.revertLayers();\n\n\t\tL.Toolbar.prototype.disable.call(this);\n\t},\n\n\t_save: function () {\n\t\tthis._activeMode.handler.save();\n\t\tif (this._activeMode) {\n\t\t\tthis._activeMode.handler.disable();\n\t\t}\n\t},\n\n\t_clearAllLayers: function () {\n\t\tthis._activeMode.handler.removeAllLayers();\n\t\tif (this._activeMode) {\n\t\t\tthis._activeMode.handler.disable();\n\t\t}\n\t},\n\n\t_checkDisabled: function () {\n\t\tvar featureGroup = this.options.featureGroup,\n\t\t\thasLayers = featureGroup.getLayers().length !== 0,\n\t\t\tbutton;\n\n\t\tif (this.options.edit) {\n\t\t\tbutton = this._modes[L.EditToolbar.Edit.TYPE].button;\n\n\t\t\tif (hasLayers) {\n\t\t\t\tL.DomUtil.removeClass(button, 'leaflet-disabled');\n\t\t\t} else {\n\t\t\t\tL.DomUtil.addClass(button, 'leaflet-disabled');\n\t\t\t}\n\n\t\t\tbutton.setAttribute(\n\t\t\t\t'title',\n\t\t\t\thasLayers ?\n\t\t\t\t\tL.drawLocal.edit.toolbar.buttons.edit\n\t\t\t\t\t: L.drawLocal.edit.toolbar.buttons.editDisabled\n\t\t\t);\n\t\t}\n\n\t\tif (this.options.remove) {\n\t\t\tbutton = this._modes[L.EditToolbar.Delete.TYPE].button;\n\n\t\t\tif (hasLayers) {\n\t\t\t\tL.DomUtil.removeClass(button, 'leaflet-disabled');\n\t\t\t} else {\n\t\t\t\tL.DomUtil.addClass(button, 'leaflet-disabled');\n\t\t\t}\n\n\t\t\tbutton.setAttribute(\n\t\t\t\t'title',\n\t\t\t\thasLayers ?\n\t\t\t\t\tL.drawLocal.edit.toolbar.buttons.remove\n\t\t\t\t\t: L.drawLocal.edit.toolbar.buttons.removeDisabled\n\t\t\t);\n\t\t}\n\t}\n});\n\n\n\n/**\n * @class L.EditToolbar.Edit\n * @aka EditToolbar.Edit\n */\nL.EditToolbar.Edit = L.Handler.extend({\n\tstatics: {\n\t\tTYPE: 'edit'\n\t},\n\n\t// @method intialize(): void\n\tinitialize: function (map, options) {\n\t\tL.Handler.prototype.initialize.call(this, map);\n\n\t\tL.setOptions(this, options);\n\n\t\t// Store the selectable layer group for ease of access\n\t\tthis._featureGroup = options.featureGroup;\n\n\t\tif (!(this._featureGroup instanceof L.FeatureGroup)) {\n\t\t\tthrow new Error('options.featureGroup must be a L.FeatureGroup');\n\t\t}\n\n\t\tthis._uneditedLayerProps = {};\n\n\t\t// Save the type so super can fire, need to do this as cannot do this.TYPE :(\n\t\tthis.type = L.EditToolbar.Edit.TYPE;\n\n\t\tvar version = L.version.split('.');\n\t\t//If Version is >= 1.2.0\n\t\tif (parseInt(version[0], 10) === 1 && parseInt(version[1], 10) >= 2) {\n\t\t\tL.EditToolbar.Edit.include(L.Evented.prototype);\n\t\t} else {\n\t\t\tL.EditToolbar.Edit.include(L.Mixin.Events);\n\t\t}\n\t},\n\n\t// @method enable(): void\n\t// Enable the edit toolbar\n\tenable: function () {\n\t\tif (this._enabled || !this._hasAvailableLayers()) {\n\t\t\treturn;\n\t\t}\n\t\tthis.fire('enabled', {handler: this.type});\n\t\t//this disable other handlers\n\n\t\tthis._map.fire(L.Draw.Event.EDITSTART, {handler: this.type});\n\t\t//allow drawLayer to be updated before beginning edition.\n\n\t\tL.Handler.prototype.enable.call(this);\n\t\tthis._featureGroup\n\t\t\t.on('layeradd', this._enableLayerEdit, this)\n\t\t\t.on('layerremove', this._disableLayerEdit, this);\n\t},\n\n\t// @method disable(): void\n\t// Disable the edit toolbar\n\tdisable: function () {\n\t\tif (!this._enabled) {\n\t\t\treturn;\n\t\t}\n\t\tthis._featureGroup\n\t\t\t.off('layeradd', this._enableLayerEdit, this)\n\t\t\t.off('layerremove', this._disableLayerEdit, this);\n\t\tL.Handler.prototype.disable.call(this);\n\t\tthis._map.fire(L.Draw.Event.EDITSTOP, {handler: this.type});\n\t\tthis.fire('disabled', {handler: this.type});\n\t},\n\n\t// @method addHooks(): void\n\t// Add listener hooks for this handler\n\taddHooks: function () {\n\t\tvar map = this._map;\n\n\t\tif (map) {\n\t\t\tmap.getContainer().focus();\n\n\t\t\tthis._featureGroup.eachLayer(this._enableLayerEdit, this);\n\n\t\t\tthis._tooltip = new L.Draw.Tooltip(this._map);\n\t\t\tthis._tooltip.updateContent({\n\t\t\t\ttext: L.drawLocal.edit.handlers.edit.tooltip.text,\n\t\t\t\tsubtext: L.drawLocal.edit.handlers.edit.tooltip.subtext\n\t\t\t});\n\n\t\t\t// Quickly access the tooltip to update for intersection checking\n\t\t\tmap._editTooltip = this._tooltip;\n\n\t\t\tthis._updateTooltip();\n\n\t\t\tthis._map\n\t\t\t\t.on('mousemove', this._onMouseMove, this)\n\t\t\t\t.on('touchmove', this._onMouseMove, this)\n\t\t\t\t.on('MSPointerMove', this._onMouseMove, this)\n\t\t\t\t.on(L.Draw.Event.EDITVERTEX, this._updateTooltip, this);\n\t\t}\n\t},\n\n\t// @method removeHooks(): void\n\t// Remove listener hooks for this handler\n\tremoveHooks: function () {\n\t\tif (this._map) {\n\t\t\t// Clean up selected layers.\n\t\t\tthis._featureGroup.eachLayer(this._disableLayerEdit, this);\n\n\t\t\t// Clear the backups of the original layers\n\t\t\tthis._uneditedLayerProps = {};\n\n\t\t\tthis._tooltip.dispose();\n\t\t\tthis._tooltip = null;\n\n\t\t\tthis._map\n\t\t\t\t.off('mousemove', this._onMouseMove, this)\n\t\t\t\t.off('touchmove', this._onMouseMove, this)\n\t\t\t\t.off('MSPointerMove', this._onMouseMove, this)\n\t\t\t\t.off(L.Draw.Event.EDITVERTEX, this._updateTooltip, this);\n\t\t}\n\t},\n\n\t// @method revertLayers(): void\n\t// Revert each layer's geometry changes\n\trevertLayers: function () {\n\t\tthis._featureGroup.eachLayer(function (layer) {\n\t\t\tthis._revertLayer(layer);\n\t\t}, this);\n\t},\n\n\t// @method save(): void\n\t// Save the layer geometries\n\tsave: function () {\n\t\tvar editedLayers = new L.LayerGroup();\n\t\tthis._featureGroup.eachLayer(function (layer) {\n\t\t\tif (layer.edited) {\n\t\t\t\teditedLayers.addLayer(layer);\n\t\t\t\tlayer.edited = false;\n\t\t\t}\n\t\t});\n\t\tthis._map.fire(L.Draw.Event.EDITED, {layers: editedLayers});\n\t},\n\n\t_backupLayer: function (layer) {\n\t\tvar id = L.Util.stamp(layer);\n\n\t\tif (!this._uneditedLayerProps[id]) {\n\t\t\t// Polyline, Polygon or Rectangle\n\t\t\tif (layer instanceof L.Polyline || layer instanceof L.Polygon || layer instanceof L.Rectangle) {\n\t\t\t\tthis._uneditedLayerProps[id] = {\n\t\t\t\t\tlatlngs: L.LatLngUtil.cloneLatLngs(layer.getLatLngs())\n\t\t\t\t};\n\t\t\t} else if (layer instanceof L.Circle) {\n\t\t\t\tthis._uneditedLayerProps[id] = {\n\t\t\t\t\tlatlng: L.LatLngUtil.cloneLatLng(layer.getLatLng()),\n\t\t\t\t\tradius: layer.getRadius()\n\t\t\t\t};\n\t\t\t} else if (layer instanceof L.Marker || layer instanceof L.CircleMarker) { // Marker\n\t\t\t\tthis._uneditedLayerProps[id] = {\n\t\t\t\t\tlatlng: L.LatLngUtil.cloneLatLng(layer.getLatLng())\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t},\n\n\t_getTooltipText: function () {\n\t\treturn ({\n\t\t\ttext: L.drawLocal.edit.handlers.edit.tooltip.text,\n\t\t\tsubtext: L.drawLocal.edit.handlers.edit.tooltip.subtext\n\t\t});\n\t},\n\n\t_updateTooltip: function () {\n\t\tthis._tooltip.updateContent(this._getTooltipText());\n\t},\n\n\t_revertLayer: function (layer) {\n\t\tvar id = L.Util.stamp(layer);\n\t\tlayer.edited = false;\n\t\tif (this._uneditedLayerProps.hasOwnProperty(id)) {\n\t\t\t// Polyline, Polygon or Rectangle\n\t\t\tif (layer instanceof L.Polyline || layer instanceof L.Polygon || layer instanceof L.Rectangle) {\n\t\t\t\tlayer.setLatLngs(this._uneditedLayerProps[id].latlngs);\n\t\t\t} else if (layer instanceof L.Circle) {\n\t\t\t\tlayer.setLatLng(this._uneditedLayerProps[id].latlng);\n\t\t\t\tlayer.setRadius(this._uneditedLayerProps[id].radius);\n\t\t\t} else if (layer instanceof L.Marker || layer instanceof L.CircleMarker) { // Marker or CircleMarker\n\t\t\t\tlayer.setLatLng(this._uneditedLayerProps[id].latlng);\n\t\t\t}\n\n\t\t\tlayer.fire('revert-edited', {layer: layer});\n\t\t}\n\t},\n\n\t_enableLayerEdit: function (e) {\n\t\tvar layer = e.layer || e.target || e,\n\t\t\tpathOptions, poly;\n\n\t\t// Back up this layer (if haven't before)\n\t\tthis._backupLayer(layer);\n\n\t\tif (this.options.poly) {\n\t\t\tpoly = L.Util.extend({}, this.options.poly);\n\t\t\tlayer.options.poly = poly;\n\t\t}\n\n\t\t// Set different style for editing mode\n\t\tif (this.options.selectedPathOptions) {\n\t\t\tpathOptions = L.Util.extend({}, this.options.selectedPathOptions);\n\n\t\t\t// Use the existing color of the layer\n\t\t\tif (pathOptions.maintainColor) {\n\t\t\t\tpathOptions.color = layer.options.color;\n\t\t\t\tpathOptions.fillColor = layer.options.fillColor;\n\t\t\t}\n\n\t\t\tlayer.options.original = L.extend({}, layer.options);\n\t\t\tlayer.options.editing = pathOptions;\n\n\t\t}\n\n\t\tif (layer instanceof L.Marker) {\n\t\t\tif (layer.editing) {\n\t\t\t\tlayer.editing.enable();\n\t\t\t}\n\t\t\tlayer.dragging.enable();\n\t\t\tlayer\n\t\t\t\t.on('dragend', this._onMarkerDragEnd)\n\t\t\t\t// #TODO: remove when leaflet finally fixes their draggable so it's touch friendly again.\n\t\t\t\t.on('touchmove', this._onTouchMove, this)\n\t\t\t\t.on('MSPointerMove', this._onTouchMove, this)\n\t\t\t\t.on('touchend', this._onMarkerDragEnd, this)\n\t\t\t\t.on('MSPointerUp', this._onMarkerDragEnd, this);\n\t\t} else {\n\t\t\tlayer.editing.enable();\n\t\t}\n\t},\n\n\t_disableLayerEdit: function (e) {\n\t\tvar layer = e.layer || e.target || e;\n\n\t\tlayer.edited = false;\n\t\tif (layer.editing) {\n\t\t\tlayer.editing.disable();\n\t\t}\n\n\t\tdelete layer.options.editing;\n\t\tdelete layer.options.original;\n\t\t// Reset layer styles to that of before select\n\t\tif (this._selectedPathOptions) {\n\t\t\tif (layer instanceof L.Marker) {\n\t\t\t\tthis._toggleMarkerHighlight(layer);\n\t\t\t} else {\n\t\t\t\t// reset the layer style to what is was before being selected\n\t\t\t\tlayer.setStyle(layer.options.previousOptions);\n\t\t\t\t// remove the cached options for the layer object\n\t\t\t\tdelete layer.options.previousOptions;\n\t\t\t}\n\t\t}\n\n\t\tif (layer instanceof L.Marker) {\n\t\t\tlayer.dragging.disable();\n\t\t\tlayer\n\t\t\t\t.off('dragend', this._onMarkerDragEnd, this)\n\t\t\t\t.off('touchmove', this._onTouchMove, this)\n\t\t\t\t.off('MSPointerMove', this._onTouchMove, this)\n\t\t\t\t.off('touchend', this._onMarkerDragEnd, this)\n\t\t\t\t.off('MSPointerUp', this._onMarkerDragEnd, this);\n\t\t} else {\n\t\t\tlayer.editing.disable();\n\t\t}\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tthis._tooltip.updatePosition(e.latlng);\n\t},\n\n\t_onMarkerDragEnd: function (e) {\n\t\tvar layer = e.target;\n\t\tlayer.edited = true;\n\t\tthis._map.fire(L.Draw.Event.EDITMOVE, {layer: layer});\n\t},\n\n\t_onTouchMove: function (e) {\n\t\tvar touchEvent = e.originalEvent.changedTouches[0],\n\t\t\tlayerPoint = this._map.mouseEventToLayerPoint(touchEvent),\n\t\t\tlatlng = this._map.layerPointToLatLng(layerPoint);\n\t\te.target.setLatLng(latlng);\n\t},\n\n\t_hasAvailableLayers: function () {\n\t\treturn this._featureGroup.getLayers().length !== 0;\n\t}\n});\n\n\n\n/**\n * @class L.EditToolbar.Delete\n * @aka EditToolbar.Delete\n */\nL.EditToolbar.Delete = L.Handler.extend({\n\tstatics: {\n\t\tTYPE: 'remove' // not delete as delete is reserved in js\n\t},\n\n\t// @method intialize(): void\n\tinitialize: function (map, options) {\n\t\tL.Handler.prototype.initialize.call(this, map);\n\n\t\tL.Util.setOptions(this, options);\n\n\t\t// Store the selectable layer group for ease of access\n\t\tthis._deletableLayers = this.options.featureGroup;\n\n\t\tif (!(this._deletableLayers instanceof L.FeatureGroup)) {\n\t\t\tthrow new Error('options.featureGroup must be a L.FeatureGroup');\n\t\t}\n\n\t\t// Save the type so super can fire, need to do this as cannot do this.TYPE :(\n\t\tthis.type = L.EditToolbar.Delete.TYPE;\n\n\t\tvar version = L.version.split('.');\n\t\t//If Version is >= 1.2.0\n\t\tif (parseInt(version[0], 10) === 1 && parseInt(version[1], 10) >= 2) {\n\t\t\tL.EditToolbar.Delete.include(L.Evented.prototype);\n\t\t} else {\n\t\t\tL.EditToolbar.Delete.include(L.Mixin.Events);\n\t\t}\n\n\t},\n\n\t// @method enable(): void\n\t// Enable the delete toolbar\n\tenable: function () {\n\t\tif (this._enabled || !this._hasAvailableLayers()) {\n\t\t\treturn;\n\t\t}\n\t\tthis.fire('enabled', {handler: this.type});\n\n\t\tthis._map.fire(L.Draw.Event.DELETESTART, {handler: this.type});\n\n\t\tL.Handler.prototype.enable.call(this);\n\n\t\tthis._deletableLayers\n\t\t\t.on('layeradd', this._enableLayerDelete, this)\n\t\t\t.on('layerremove', this._disableLayerDelete, this);\n\t},\n\n\t// @method disable(): void\n\t// Disable the delete toolbar\n\tdisable: function () {\n\t\tif (!this._enabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._deletableLayers\n\t\t\t.off('layeradd', this._enableLayerDelete, this)\n\t\t\t.off('layerremove', this._disableLayerDelete, this);\n\n\t\tL.Handler.prototype.disable.call(this);\n\n\t\tthis._map.fire(L.Draw.Event.DELETESTOP, {handler: this.type});\n\n\t\tthis.fire('disabled', {handler: this.type});\n\t},\n\n\t// @method addHooks(): void\n\t// Add listener hooks to this handler\n\taddHooks: function () {\n\t\tvar map = this._map;\n\n\t\tif (map) {\n\t\t\tmap.getContainer().focus();\n\n\t\t\tthis._deletableLayers.eachLayer(this._enableLayerDelete, this);\n\t\t\tthis._deletedLayers = new L.LayerGroup();\n\n\t\t\tthis._tooltip = new L.Draw.Tooltip(this._map);\n\t\t\tthis._tooltip.updateContent({text: L.drawLocal.edit.handlers.remove.tooltip.text});\n\n\t\t\tthis._map.on('mousemove', this._onMouseMove, this);\n\t\t}\n\t},\n\n\t// @method removeHooks(): void\n\t// Remove listener hooks from this handler\n\tremoveHooks: function () {\n\t\tif (this._map) {\n\t\t\tthis._deletableLayers.eachLayer(this._disableLayerDelete, this);\n\t\t\tthis._deletedLayers = null;\n\n\t\t\tthis._tooltip.dispose();\n\t\t\tthis._tooltip = null;\n\n\t\t\tthis._map.off('mousemove', this._onMouseMove, this);\n\t\t}\n\t},\n\n\t// @method revertLayers(): void\n\t// Revert the deleted layers back to their prior state.\n\trevertLayers: function () {\n\t\t// Iterate of the deleted layers and add them back into the featureGroup\n\t\tthis._deletedLayers.eachLayer(function (layer) {\n\t\t\tthis._deletableLayers.addLayer(layer);\n\t\t\tlayer.fire('revert-deleted', {layer: layer});\n\t\t}, this);\n\t},\n\n\t// @method save(): void\n\t// Save deleted layers\n\tsave: function () {\n\t\tthis._map.fire(L.Draw.Event.DELETED, {layers: this._deletedLayers});\n\t},\n\n\t// @method removeAllLayers(): void\n\t// Remove all delateable layers\n\tremoveAllLayers: function () {\n\t\t// Iterate of the delateable layers and add remove them\n\t\tthis._deletableLayers.eachLayer(function (layer) {\n\t\t\tthis._removeLayer({layer: layer});\n\t\t}, this);\n\t\tthis.save();\n\t},\n\n\t_enableLayerDelete: function (e) {\n\t\tvar layer = e.layer || e.target || e;\n\n\t\tlayer.on('click', this._removeLayer, this);\n\t},\n\n\t_disableLayerDelete: function (e) {\n\t\tvar layer = e.layer || e.target || e;\n\n\t\tlayer.off('click', this._removeLayer, this);\n\n\t\t// Remove from the deleted layers so we can't accidentally revert if the user presses cancel\n\t\tthis._deletedLayers.removeLayer(layer);\n\t},\n\n\t_removeLayer: function (e) {\n\t\tvar layer = e.layer || e.target || e;\n\n\t\tthis._deletableLayers.removeLayer(layer);\n\n\t\tthis._deletedLayers.addLayer(layer);\n\n\t\tlayer.fire('deleted');\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tthis._tooltip.updatePosition(e.latlng);\n\t},\n\n\t_hasAvailableLayers: function () {\n\t\treturn this._deletableLayers.getLayers().length !== 0;\n\t}\n});\n\n\n\n}(window, document));\n//# sourceMappingURL=leaflet.draw-src.map//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9sZWFmbGV0LWRyYXcvZGlzdC9sZWFmbGV0LmRyYXctc3JjLmpzPzYxZmQiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLHlDQUF5QztBQUN6QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnQ0FBZ0Msa0JBQWtCO0FBQ2xEO0FBQ0EsNkJBQTZCLEVBQUUsZUFBZSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUU7QUFDeEQsZ0NBQWdDO0FBQ2hDLFNBQVM7QUFDVD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XMuX2RlbGV0YWJsZUxheWVycy5yZW1vdmVMYXllcihsYXllcik7XG5cblx0XHR0aGlzLl9kZWxldGVkTGF5ZXJzLmFkZExheWVyKGxheWVyKTtcblxuXHRcdGxheWVyLmZpcmUoJ2RlbGV0ZWQnKTtcblx0fSxcblxuXHRfb25Nb3VzZU1vdmU6IGZ1bmN0aW9uIChlKSB7XG5cdFx0dGhpcy5fdG9vbHRpcC51cGRhdGVQb3NpdGlvbihlLmxhdGxuZyk7XG5cdH0sXG5cblx0X2hhc0F2YWlsYWJsZUxheWVyczogZnVuY3Rpb24gKCkge1xuXHRcdHJldHVybiB0aGlzLl9kZWxldGFibGVMYXllcnMuZ2V0TGF5ZXJzKCkubGVuZ3RoICE9PSAwO1xuXHR9XG59KTtcblxuXG5cbn0od2luZG93LCBkb2N1bWVudCkpO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9bGVhZmxldC5kcmF3LXNyYy5tYXAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/leaflet-draw/dist/leaflet.draw-src.js\n"); + +/***/ }), + +/***/ "./node_modules/loglevel/lib/loglevel.js": +/*!***********************************************!*\ + !*** ./node_modules/loglevel/lib/loglevel.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (true) {\n !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else {}\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9sb2dsZXZlbC9saWIvbG9nbGV2ZWwuanM/NWM3ZCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsUUFBUSxJQUEwQztBQUNsRCxRQUFRLG9DQUFPLFVBQVU7QUFBQTtBQUFBO0FBQUE7QUFBQSxvR0FBQztBQUMxQixLQUFLLE1BQU0sRUFJTjtBQUNMLENBQUM7QUFDRDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0EsYUFBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxhQUFhO0FBQ2I7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLHlCQUF5Q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1bmN0aW9uLnByb3RvdHlwZS5iaW5kLmNhbGwobWV0aG9kLCBvYmopO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIC8vIE1pc3NpbmcgYmluZCBzaGltIG9yIElFOCArIE1vZGVybml6ciwgZmFsbGJhY2sgdG8gd3JhcHBpbmdcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGdW5jdGlvbi5wcm90b3R5cGUuYXBwbHkuYXBwbHkobWV0aG9kLCBbb2JqLCBhcmd1bWVudHNdKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gVHJhY2UoKSBkb2Vzbid0IHByaW50IHRoZSBtZXNzYWdlIGluIElFLCBzbyBmb3IgdGhhdCBjYXNlIHdlIG5lZWQgdG8gd3JhcCBpdFxuICAgIGZ1bmN0aW9uIHRyYWNlRm9ySUUoKSB7XG4gICAgICAgIGlmIChjb25zb2xlLmxvZykge1xuICAgICAgICAgICAgaWYgKGNvbnNvbGUubG9nLmFwcGx5KSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2cuYXBwbHkoY29uc29sZSwgYXJndW1lbnRzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gSW4gb2xkIElFLCBuYXRpdmUgY29uc29sZSBtZXRob2RzIHRoZW1zZWx2ZXMgZG9uJ3QgaGF2ZSBhcHBseSgpLlxuICAgICAgICAgICAgICAgIEZ1bmN0aW9uLnByb3RvdHlwZS5hcHBseS5hcHBseShjb25zb2xlLmxvZywgW2NvbnNvbGUsIGFyZ3VtZW50c10pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChjb25zb2xlLnRyYWNlKSBjb25zb2xlLnRyYWNlKCk7XG4gICAgfVxuXG4gICAgLy8gQnVpbGQgdGhlI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ICAgICAgICBzdG9yYWdlS2V5ID0gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICBmdW5jdGlvbiBwZXJzaXN0TGV2ZWxJZlBvc3NpYmxlKGxldmVsTnVtKSB7XG4gICAgICAgICAgdmFyIGxldmVsTmFtZSA9IChsb2dNZXRob2RzW2xldmVsTnVtXSB8fCAnc2lsZW50JykudG9VcHBlckNhc2UoKTtcblxuICAgICAgICAgIGlmICh0eXBlb2Ygd2luZG93ID09PSB1bmRlZmluZWRUeXBlIHx8ICFzdG9yYWdlS2V5KSByZXR1cm47XG5cbiAgICAgICAgICAvLyBVc2UgbG9jYWxTdG9yYWdlIGlmIGF2YWlsYWJsZVxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHdpbmRvdy5sb2NhbFN0b3JhZ2Vbc3RvcmFnZUtleV0gPSBsZXZlbE5hbWU7XG4gICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9IGNhdGNoIChpZ25vcmUpIHt9XG5cbiAgICAgICAgICAvLyBVc2Ugc2Vzc2lvbiBjb29raWUgYXMgZmFsbGJhY2tcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICB3aW5kb3cuZG9jdW1lbnQuY29va2llID1cbiAgICAgICAgICAgICAgICBlbmNvZGVVUklDb21wb25lbnQoc3RvcmFnZUtleSkgKyBcIj1cIiArIGxldmVsTmFtZSArIFwiO1wiO1xuICAgICAgICAgIH0gY2F0Y2ggKGlnbm9yZSkge31cbiAgICAgIH1cblxuICAgICAgZnVuY3Rpb24gZ2V0UGVyc2lzdGVkTGV2ZWwoKSB7XG4gICAgICAgICAgdmFyIHN0b3JlZExldmVsO1xuXG4gICAgICAgICAgaWYgKHR5cGVvZiB3aW5kb3cgPT09IHVuZGVmaW5lZFR5cGUgfHwgIXN0b3JhZ2VLZXkpIHJldHVybjtcblxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHN0b3JlZExldmVsID0gd2luZG93LmxvY2FsU3RvcmFnZVtzdG9yYWdlS2V5XTtcbiAgICAgICAgICB9IGNhdGNoIChpZ25vcmUpIHt9XG5cbiAgICAgICAgICAvLyBGYWxsYmFjayB0byBjb29raWVzIGlmIGxvY2FsIHN0b3JhZ2UgZ2l2ZXMgdXMgbm90aGluZ1xuICAgICAgICAgIGlmICh0eXBlb2Ygc3RvcmVkTGV2ZWwgPT09IHVuZGVmaW5lZFR5cGUpIHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgIHZhciBjb29raWUgPSB3aW5kb3cuZG9jdW1lbnQuY29va2llO1xuICAgICAgICAgICAgICAgICAgdmFyIGxvY2F0aW9uID0gY29va2llLmluZGV4T2YoXG4gICAgICAgICAgICAgICAgICAgICAgZW5jb2RlVVJJQ29tcG9uZW50KHN0b3JhZ2VLZXkpICsgXCI9XCIpO1xuICAgICAgICAgICAgICAgICAgaWYgKGxvY2F0aW9uICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgIHN0b3JlZExldmVsID0gL14oW147XSspLy5leGVjKGNvb2tpZS5zbGljZShsb2NhdGlvbikpWzFdO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGNhdGNoIChpZ25vcmUpIHt9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgLy8gSWYgdGhlIHN0b3JlZCBsZXZlbCBpcyBub3QgdmFsaWQsIHRyZWF0IGl0IGFzIGlmIG5vdGhpbmcgd2FzIHN0b3JlZC5cbiAgICAgICAgICBpZiAoc2VsZi5sZXZlbHNbc3RvcmVkTGV2ZWxdID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgc3RvcmVkTGV2ZWwgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHN0b3JlZExldmVsO1xuICAgICAgfVxuXG4gICAgICBmdW5jdGlvbiBjbGVhclBlcnNpc3RlZExldmVsKCkge1xuICAgICAgICAgIGlmICh0eXBlb2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9uICgpIHtcbiAgICAgICAgICByZXR1cm4gY3VycmVudExldmVsO1xuICAgICAgfTtcblxuICAgICAgc2VsZi5zZXRMZXZlbCA9IGZ1bmN0aW9uIChsZXZlbCwgcGVyc2lzdCkge1xuICAgICAgICAgIGlmICh0eXBlb2YgbGV2ZWwgPT09IFwic3RyaW5nXCIgJiYgc2VsZi5sZXZlbHNbbGV2ZWwudG9VcHBlckNhc2UoKV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICBsZXZlbCA9IHNlbGYubGV2ZWxzW2xldmVsLnRvVXBwZXJDYXNlKCldO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAodHlwZW9mIGxldmVsID09PSBcIm51bWJlclwiICYmIGxldmVsID49IDAgJiYgbGV2ZWwgPD0gc2VsZi5sZXZlbHMuU0lMRU5UKSB7XG4gICAgICAgICAgICAgIGN1cnJlbnRMZXZlbCA9IGxldmVsO1xuICAgICAgICAgICAgICBpZiAocGVyc2lzdCAhPT0gZmFsc2UpIHsgIC8vIGRlZmF1bHRzIHRvIHRydWVcbiAgICAgICAgICAgICAgICAgIHBlcnNpc3RMZXZlbElmUG9zc2libGUobGV2ZWwpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHJlcGxhY2VMb2dnaW5nTWV0aG9kcy5jYWxsKHNlbGYsIGxldmVsLCBuYW1lKTtcbiAgICAgICAgICAgICAgaWYgKHR5cGVvZiBjb25zb2xlID09PSB1bmRlZmluZWRUeXBlICYmIGxldmVsIDwgc2VsZi5sZXZlbHMuU0lMRU5UKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gXCJObyBjb25zb2xlIGF2YWlsYWJsZSBmb3IgbG9nZ2luZ1wiO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhyb3cgXCJsb2cuc2V0TGV2ZWwoKSBjYWxsZWQgd2l0aCBpbnZhbGlkIGxldmVsOiBcIiArIGxldmVsO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kZWZpbmVkVHlwZSAmJlxuICAgICAgICAgICAgICAgd2luZG93LmxvZyA9PT0gZGVmYXVsdExvZ2dlcikge1xuICAgICAgICAgICAgd2luZG93LmxvZyA9IF9sb2c7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZGVmYXVsdExvZ2dlcjtcbiAgICB9O1xuXG4gICAgZGVmYXVsdExvZ2dlci5nZXRMb2dnZXJzID0gZnVuY3Rpb24gZ2V0TG9nZ2VycygpIHtcbiAgICAgICAgcmV0dXJuIF9sb2dnZXJzQnlOYW1lO1xuICAgIH07XG5cbiAgICAvLyBFUzYgZGVmYXVsdCBleHBvcnQsIGZvciBjb21wYXRpYmlsaXR5XG4gICAgZGVmYXVsdExvZ2dlclsnZGVmYXVsdCddID0gZGVmYXVsdExvZ2dlcjtcblxuICAgIHJldHVybiBkZWZhdWx0TG9nZ2VyO1xufSkpO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/loglevel/lib/loglevel.js\n"); + +/***/ }), + +/***/ "./node_modules/process/browser.js": +/*!*****************************************!*\ + !*** ./node_modules/process/browser.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9wcm9jZXNzL2Jyb3dzZXIuanM/ZjI4YyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQU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IpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ3Byb2Nlc3MuY2hkaXIgaXMgbm90IHN1cHBvcnRlZCcpO1xufTtcbnByb2Nlc3MudW1hc2sgPSBmdW5jdGlvbigpIHsgcmV0dXJuIDA7IH07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/process/browser.js\n"); + +/***/ }), + +/***/ "./node_modules/proj4/dist/proj4-src.js": +/*!**********************************************!*\ + !*** ./node_modules/proj4/dist/proj4-src.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("(function (global, factory) {\n true ? module.exports = factory() :\n undefined;\n}(this, (function () { 'use strict';\n\n var globals = function(defs) {\n defs('EPSG:4326', \"+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees\");\n defs('EPSG:4269', \"+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees\");\n defs('EPSG:3857', \"+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs\");\n\n defs.WGS84 = defs['EPSG:4326'];\n defs['EPSG:3785'] = defs['EPSG:3857']; // maintain backward compat, official code is 3857\n defs.GOOGLE = defs['EPSG:3857'];\n defs['EPSG:900913'] = defs['EPSG:3857'];\n defs['EPSG:102113'] = defs['EPSG:3857'];\n };\n\n var PJD_3PARAM = 1;\n var PJD_7PARAM = 2;\n var PJD_GRIDSHIFT = 3;\n var PJD_WGS84 = 4; // WGS84 or equivalent\n var PJD_NODATUM = 5; // WGS84 or equivalent\n var SRS_WGS84_SEMIMAJOR = 6378137.0; // only used in grid shift transforms\n var SRS_WGS84_SEMIMINOR = 6356752.314; // only used in grid shift transforms\n var SRS_WGS84_ESQUARED = 0.0066943799901413165; // only used in grid shift transforms\n var SEC_TO_RAD = 4.84813681109535993589914102357e-6;\n var HALF_PI = Math.PI/2;\n // ellipoid pj_set_ell.c\n var SIXTH = 0.1666666666666666667;\n /* 1/6 */\n var RA4 = 0.04722222222222222222;\n /* 17/360 */\n var RA6 = 0.02215608465608465608;\n var EPSLN = 1.0e-10;\n // you'd think you could use Number.EPSILON above but that makes\n // Mollweide get into an infinate loop.\n\n var D2R = 0.01745329251994329577;\n var R2D = 57.29577951308232088;\n var FORTPI = Math.PI/4;\n var TWO_PI = Math.PI * 2;\n // SPI is slightly greater than Math.PI, so values that exceed the -180..180\n // degree range by a tiny amount don't get wrapped. This prevents points that\n // have drifted from their original location along the 180th meridian (due to\n // floating point error) from changing their sign.\n var SPI = 3.14159265359;\n\n var exports$1 = {};\n exports$1.greenwich = 0.0; //\"0dE\",\n exports$1.lisbon = -9.131906111111; //\"9d07'54.862\\\"W\",\n exports$1.paris = 2.337229166667; //\"2d20'14.025\\\"E\",\n exports$1.bogota = -74.080916666667; //\"74d04'51.3\\\"W\",\n exports$1.madrid = -3.687938888889; //\"3d41'16.58\\\"W\",\n exports$1.rome = 12.452333333333; //\"12d27'8.4\\\"E\",\n exports$1.bern = 7.439583333333; //\"7d26'22.5\\\"E\",\n exports$1.jakarta = 106.807719444444; //\"106d48'27.79\\\"E\",\n exports$1.ferro = -17.666666666667; //\"17d40'W\",\n exports$1.brussels = 4.367975; //\"4d22'4.71\\\"E\",\n exports$1.stockholm = 18.058277777778; //\"18d3'29.8\\\"E\",\n exports$1.athens = 23.7163375; //\"23d42'58.815\\\"E\",\n exports$1.oslo = 10.722916666667; //\"10d43'22.5\\\"E\"\n\n var units = {\n ft: {to_meter: 0.3048},\n 'us-ft': {to_meter: 1200 / 3937}\n };\n\n var ignoredChar = /[\\s_\\-\\/\\(\\)]/g;\n function match(obj, key) {\n if (obj[key]) {\n return obj[key];\n }\n var keys = Object.keys(obj);\n var lkey = key.toLowerCase().replace(ignoredChar, '');\n var i = -1;\n var testkey, processedKey;\n while (++i < keys.length) {\n testkey = keys[i];\n processedKey = testkey.toLowerCase().replace(ignoredChar, '');\n if (processedKey === lkey) {\n return obj[testkey];\n }\n }\n }\n\n var parseProj = function(defData) {\n var self = {};\n var paramObj = defData.split('+').map(function(v) {\n return v.trim();\n }).filter(function(a) {\n return a;\n }).reduce(function(p, a) {\n var split = a.split('=');\n split.push(true);\n p[split[0].toLowerCase()] = split[1];\n return p;\n }, {});\n var paramName, paramVal, paramOutname;\n var params = {\n proj: 'projName',\n datum: 'datumCode',\n rf: function(v) {\n self.rf = parseFloat(v);\n },\n lat_0: function(v) {\n self.lat0 = v * D2R;\n },\n lat_1: function(v) {\n self.lat1 = v * D2R;\n },\n lat_2: function(v) {\n self.lat2 = v * D2R;\n },\n lat_ts: function(v) {\n self.lat_ts = v * D2R;\n },\n lon_0: function(v) {\n self.long0 = v * D2R;\n },\n lon_1: function(v) {\n self.long1 = v * D2R;\n },\n lon_2: function(v) {\n self.long2 = v * D2R;\n },\n alpha: function(v) {\n self.alpha = parseFloat(v) * D2R;\n },\n gamma: function(v) {\n self.rectified_grid_angle = parseFloat(v);\n },\n lonc: function(v) {\n self.longc = v * D2R;\n },\n x_0: function(v) {\n self.x0 = parseFloat(v);\n },\n y_0: function(v) {\n self.y0 = parseFloat(v);\n },\n k_0: function(v) {\n self.k0 = parseFloat(v);\n },\n k: function(v) {\n self.k0 = parseFloat(v);\n },\n a: function(v) {\n self.a = parseFloat(v);\n },\n b: function(v) {\n self.b = parseFloat(v);\n },\n r_a: function() {\n self.R_A = true;\n },\n zone: function(v) {\n self.zone = parseInt(v, 10);\n },\n south: function() {\n self.utmSouth = true;\n },\n towgs84: function(v) {\n self.datum_params = v.split(\",\").map(function(a) {\n return parseFloat(a);\n });\n },\n to_meter: function(v) {\n self.to_meter = parseFloat(v);\n },\n units: function(v) {\n self.units = v;\n var unit = match(units, v);\n if (unit) {\n self.to_meter = unit.to_meter;\n }\n },\n from_greenwich: function(v) {\n self.from_greenwich = v * D2R;\n },\n pm: function(v) {\n var pm = match(exports$1, v);\n self.from_greenwich = (pm ? pm : parseFloat(v)) * D2R;\n },\n nadgrids: function(v) {\n if (v === '@null') {\n self.datumCode = 'none';\n }\n else {\n self.nadgrids = v;\n }\n },\n axis: function(v) {\n var legalAxis = \"ewnsud\";\n if (v.length === 3 && legalAxis.indexOf(v.substr(0, 1)) !== -1 && legalAxis.indexOf(v.substr(1, 1)) !== -1 && legalAxis.indexOf(v.substr(2, 1)) !== -1) {\n self.axis = v;\n }\n },\n approx: function() {\n self.approx = true;\n }\n };\n for (paramName in paramObj) {\n paramVal = paramObj[paramName];\n if (paramName in params) {\n paramOutname = params[paramName];\n if (typeof paramOutname === 'function') {\n paramOutname(paramVal);\n }\n else {\n self[paramOutname] = paramVal;\n }\n }\n else {\n self[paramName] = paramVal;\n }\n }\n if(typeof self.datumCode === 'string' && self.datumCode !== \"WGS84\"){\n self.datumCode = self.datumCode.toLowerCase();\n }\n return self;\n };\n\n var NEUTRAL = 1;\n var KEYWORD = 2;\n var NUMBER = 3;\n var QUOTED = 4;\n var AFTERQUOTE = 5;\n var ENDED = -1;\n var whitespace = /\\s/;\n var latin = /[A-Za-z]/;\n var keyword = /[A-Za-z84]/;\n var endThings = /[,\\]]/;\n var digets = /[\\d\\.E\\-\\+]/;\n // const ignoredChar = /[\\s_\\-\\/\\(\\)]/g;\n function Parser(text) {\n if (typeof text !== 'string') {\n throw new Error('not a string');\n }\n this.text = text.trim();\n this.level = 0;\n this.place = 0;\n this.root = null;\n this.stack = [];\n this.currentObject = null;\n this.state = NEUTRAL;\n }\n Parser.prototype.readCharicter = function() {\n var char = this.text[this.place++];\n if (this.state !== QUOTED) {\n while (whitespace.test(char)) {\n if (this.place >= this.text.length) {\n return;\n }\n char = this.text[this.place++];\n }\n }\n switch (this.state) {\n case NEUTRAL:\n return this.neutral(char);\n case KEYWORD:\n return this.keyword(char)\n case QUOTED:\n return this.quoted(char);\n case AFTERQUOTE:\n return this.afterquote(char);\n case NUMBER:\n return this.number(char);\n case ENDED:\n return;\n }\n };\n Parser.prototype.afterquote = function(char) {\n if (char === '\"') {\n this.word += '\"';\n this.state = QUOTED;\n return;\n }\n if (endThings.test(char)) {\n this.word = this.word.trim();\n this.afterItem(char);\n return;\n }\n throw new Error('havn\\'t handled \"' +char + '\" in afterquote yet, index ' + this.place);\n };\n Parser.prototype.afterItem = function(char) {\n if (char === ',') {\n if (this.word !== null) {\n this.currentObject.push(this.word);\n }\n this.word = null;\n this.state = NEUTRAL;\n return;\n }\n if (char === ']') {\n this.level--;\n if (this.word !== null) {\n this.currentObject.push(this.word);\n this.word = null;\n }\n this.state = NEUTRAL;\n this.currentObject = this.stack.pop();\n if (!this.currentObject) {\n this.state = ENDED;\n }\n\n return;\n }\n };\n Parser.prototype.number = function(char) {\n if (digets.test(char)) {\n this.word += char;\n return;\n }\n if (endThings.test(char)) {\n this.word = parseFloat(this.word);\n this.afterItem(char);\n return;\n }\n throw new Error('havn\\'t handled \"' +char + '\" in number yet, index ' + this.place);\n };\n Parser.prototype.quoted = function(char) {\n if (char === '\"') {\n this.state = AFTERQUOTE;\n return;\n }\n this.word += char;\n return;\n };\n Parser.prototype.keyword = function(char) {\n if (keyword.test(char)) {\n this.word += char;\n return;\n }\n if (char === '[') {\n var newObjects = [];\n newObjects.push(this.word);\n this.level++;\n if (this.root === null) {\n this.root = newObjects;\n } else {\n this.currentObject.push(newObjects);\n }\n this.stack.push(this.currentObject);\n this.currentObject = newObjects;\n this.state = NEUTRAL;\n return;\n }\n if (endThings.test(char)) {\n this.afterItem(char);\n return;\n }\n throw new Error('havn\\'t handled \"' +char + '\" in keyword yet, index ' + this.place);\n };\n Parser.prototype.neutral = function(char) {\n if (latin.test(char)) {\n this.word = char;\n this.state = KEYWORD;\n return;\n }\n if (char === '\"') {\n this.word = '';\n this.state = QUOTED;\n return;\n }\n if (digets.test(char)) {\n this.word = char;\n this.state = NUMBER;\n return;\n }\n if (endThings.test(char)) {\n this.afterItem(char);\n return;\n }\n throw new Error('havn\\'t handled \"' +char + '\" in neutral yet, index ' + this.place);\n };\n Parser.prototype.output = function() {\n while (this.place < this.text.length) {\n this.readCharicter();\n }\n if (this.state === ENDED) {\n return this.root;\n }\n throw new Error('unable to parse string \"' +this.text + '\". State is ' + this.state);\n };\n\n function parseString(txt) {\n var parser = new Parser(txt);\n return parser.output();\n }\n\n function mapit(obj, key, value) {\n if (Array.isArray(key)) {\n value.unshift(key);\n key = null;\n }\n var thing = key ? {} : obj;\n\n var out = value.reduce(function(newObj, item) {\n sExpr(item, newObj);\n return newObj\n }, thing);\n if (key) {\n obj[key] = out;\n }\n }\n\n function sExpr(v, obj) {\n if (!Array.isArray(v)) {\n obj[v] = true;\n return;\n }\n var key = v.shift();\n if (key === 'PARAMETER') {\n key = v.shift();\n }\n if (v.length === 1) {\n if (Array.isArray(v[0])) {\n obj[key] = {};\n sExpr(v[0], obj[key]);\n return;\n }\n obj[key] = v[0];\n return;\n }\n if (!v.length) {\n obj[key] = true;\n return;\n }\n if (key === 'TOWGS84') {\n obj[key] = v;\n return;\n }\n if (key === 'AXIS') {\n if (!(key in obj)) {\n obj[key] = [];\n }\n obj[key].push(v);\n return;\n }\n if (!Array.isArray(key)) {\n obj[key] = {};\n }\n\n var i;\n switch (key) {\n case 'UNIT':\n case 'PRIMEM':\n case 'VERT_DATUM':\n obj[key] = {\n name: v[0].toLowerCase(),\n convert: v[1]\n };\n if (v.length === 3) {\n sExpr(v[2], obj[key]);\n }\n return;\n case 'SPHEROID':\n case 'ELLIPSOID':\n obj[key] = {\n name: v[0],\n a: v[1],\n rf: v[2]\n };\n if (v.length === 4) {\n sExpr(v[3], obj[key]);\n }\n return;\n case 'PROJECTEDCRS':\n case 'PROJCRS':\n case 'GEOGCS':\n case 'GEOCCS':\n case 'PROJCS':\n case 'LOCAL_CS':\n case 'GEODCRS':\n case 'GEODETICCRS':\n case 'GEODETICDATUM':\n case 'EDATUM':\n case 'ENGINEERINGDATUM':\n case 'VERT_CS':\n case 'VERTCRS':\n case 'VERTICALCRS':\n case 'COMPD_CS':\n case 'COMPOUNDCRS':\n case 'ENGINEERINGCRS':\n case 'ENGCRS':\n case 'FITTED_CS':\n case 'LOCAL_DATUM':\n case 'DATUM':\n v[0] = ['name', v[0]];\n mapit(obj, key, v);\n return;\n default:\n i = -1;\n while (++i < v.length) {\n if (!Array.isArray(v[i])) {\n return sExpr(v, obj[key]);\n }\n }\n return mapit(obj, key, v);\n }\n }\n\n var D2R$1 = 0.01745329251994329577;\n function rename(obj, params) {\n var outName = params[0];\n var inName = params[1];\n if (!(outName in obj) && (inName in obj)) {\n obj[outName] = obj[inName];\n if (params.length === 3) {\n obj[outName] = params[2](obj[outName]);\n }\n }\n }\n\n function d2r(input) {\n return input * D2R$1;\n }\n\n function cleanWKT(wkt) {\n if (wkt.type === 'GEOGCS') {\n wkt.projName = 'longlat';\n } else if (wkt.type === 'LOCAL_CS') {\n wkt.projName = 'identity';\n wkt.local = true;\n } else {\n if (typeof wkt.PROJECTION === 'object') {\n wkt.projName = Object.keys(wkt.PROJECTION)[0];\n } else {\n wkt.projName = wkt.PROJECTION;\n }\n }\n if (wkt.AXIS) {\n var axisOrder = '';\n for (var i = 0, ii = wkt.AXIS.length; i < ii; ++i) {\n var axis = [wkt.AXIS[i][0].toLowerCase(), wkt.AXIS[i][1].toLowerCase()];\n if (axis[0].indexOf('north') !== -1 || ((axis[0] === 'y' || axis[0] === 'lat') && axis[1] === 'north')) {\n axisOrder += 'n';\n } else if (axis[0].indexOf('south') !== -1 || ((axis[0] === 'y' || axis[0] === 'lat') && axis[1] === 'south')) {\n axisOrder += 's';\n } else if (axis[0].indexOf('east') !== -1 || ((axis[0] === 'x' || axis[0] === 'lon') && axis[1] === 'east')) {\n axisOrder += 'e';\n } else if (axis[0].indexOf('west') !== -1 || ((axis[0] === 'x' || axis[0] === 'lon') && axis[1] === 'west')) {\n axisOrder += 'w';\n }\n }\n if (axisOrder.length === 2) {\n axisOrder += 'u';\n }\n if (axisOrder.length === 3) {\n wkt.axis = axisOrder;\n }\n }\n if (wkt.UNIT) {\n wkt.units = wkt.UNIT.name.toLowerCase();\n if (wkt.units === 'metre') {\n wkt.units = 'meter';\n }\n if (wkt.UNIT.convert) {\n if (wkt.type === 'GEOGCS') {\n if (wkt.DATUM && wkt.DATUM.SPHEROID) {\n wkt.to_meter = wkt.UNIT.convert*wkt.DATUM.SPHEROID.a;\n }\n } else {\n wkt.to_meter = wkt.UNIT.convert;\n }\n }\n }\n var geogcs = wkt.GEOGCS;\n if (wkt.type === 'GEOGCS') {\n geogcs = wkt;\n }\n if (geogcs) {\n //if(wkt.GEOGCS.PRIMEM&&wkt.GEOGCS.PRIMEM.convert){\n // wkt.from_greenwich=wkt.GEOGCS.PRIMEM.convert*D2R;\n //}\n if (geogcs.DATUM) {\n wkt.datumCode = geogcs.DATUM.name.toLowerCase();\n } else {\n wkt.datumCode = geogcs.name.toLowerCase();\n }\n if (wkt.datumCode.slice(0, 2) === 'd_') {\n wkt.datumCode = wkt.datumCode.slice(2);\n }\n if (wkt.datumCode === 'new_zealand_geodetic_datum_1949' || wkt.datumCode === 'new_zealand_1949') {\n wkt.datumCode = 'nzgd49';\n }\n if (wkt.datumCode === 'wgs_1984' || wkt.datumCode === 'world_geodetic_system_1984') {\n if (wkt.PROJECTION === 'Mercator_Auxiliary_Sphere') {\n wkt.sphere = true;\n }\n wkt.datumCode = 'wgs84';\n }\n if (wkt.datumCode.slice(-6) === '_ferro') {\n wkt.datumCode = wkt.datumCode.slice(0, - 6);\n }\n if (wkt.datumCode.slice(-8) === '_jakarta') {\n wkt.datumCode = wkt.datumCode.slice(0, - 8);\n }\n if (~wkt.datumCode.indexOf('belge')) {\n wkt.datumCode = 'rnb72';\n }\n if (geogcs.DATUM && geogcs.DATUM.SPHEROID) {\n wkt.ellps = geogcs.DATUM.SPHEROID.name.replace('_19', '').replace(/[Cc]larke\\_18/, 'clrk');\n if (wkt.ellps.toLowerCase().slice(0, 13) === 'international') {\n wkt.ellps = 'intl';\n }\n\n wkt.a = geogcs.DATUM.SPHEROID.a;\n wkt.rf = parseFloat(geogcs.DATUM.SPHEROID.rf, 10);\n }\n\n if (geogcs.DATUM && geogcs.DATUM.TOWGS84) {\n wkt.datum_params = geogcs.DATUM.TOWGS84;\n }\n if (~wkt.datumCode.indexOf('osgb_1936')) {\n wkt.datumCode = 'osgb36';\n }\n if (~wkt.datumCode.indexOf('osni_1952')) {\n wkt.datumCode = 'osni52';\n }\n if (~wkt.datumCode.indexOf('tm65')\n || ~wkt.datumCode.indexOf('geodetic_datum_of_1965')) {\n wkt.datumCode = 'ire65';\n }\n if (wkt.datumCode === 'ch1903+') {\n wkt.datumCode = 'ch1903';\n }\n if (~wkt.datumCode.indexOf('israel')) {\n wkt.datumCode = 'isr93';\n }\n }\n if (wkt.b && !isFinite(wkt.b)) {\n wkt.b = wkt.a;\n }\n\n function toMeter(input) {\n var ratio = wkt.to_meter || 1;\n return input * ratio;\n }\n var renamer = function(a) {\n return rename(wkt, a);\n };\n var list = [\n ['standard_parallel_1', 'Standard_Parallel_1'],\n ['standard_parallel_1', 'Latitude of 1st standard parallel'],\n ['standard_parallel_2', 'Standard_Parallel_2'],\n ['standard_parallel_2', 'Latitude of 2nd standard parallel'],\n ['false_easting', 'False_Easting'],\n ['false_easting', 'False easting'],\n ['false-easting', 'Easting at false origin'],\n ['false_northing', 'False_Northing'],\n ['false_northing', 'False northing'],\n ['false_northing', 'Northing at false origin'],\n ['central_meridian', 'Central_Meridian'],\n ['central_meridian', 'Longitude of natural origin'],\n ['central_meridian', 'Longitude of false origin'],\n ['latitude_of_origin', 'Latitude_Of_Origin'],\n ['latitude_of_origin', 'Central_Parallel'],\n ['latitude_of_origin', 'Latitude of natural origin'],\n ['latitude_of_origin', 'Latitude of false origin'],\n ['scale_factor', 'Scale_Factor'],\n ['k0', 'scale_factor'],\n ['latitude_of_center', 'Latitude_Of_Center'],\n ['latitude_of_center', 'Latitude_of_center'],\n ['lat0', 'latitude_of_center', d2r],\n ['longitude_of_center', 'Longitude_Of_Center'],\n ['longitude_of_center', 'Longitude_of_center'],\n ['longc', 'longitude_of_center', d2r],\n ['x0', 'false_easting', toMeter],\n ['y0', 'false_northing', toMeter],\n ['long0', 'central_meridian', d2r],\n ['lat0', 'latitude_of_origin', d2r],\n ['lat0', 'standard_parallel_1', d2r],\n ['lat1', 'standard_parallel_1', d2r],\n ['lat2', 'standard_parallel_2', d2r],\n ['azimuth', 'Azimuth'],\n ['alpha', 'azimuth', d2r],\n ['srsCode', 'name']\n ];\n list.forEach(renamer);\n if (!wkt.long0 && wkt.longc && (wkt.projName === 'Albers_Conic_Equal_Area' || wkt.projName === 'Lambert_Azimuthal_Equal_Area')) {\n wkt.long0 = wkt.longc;\n }\n if (!wkt.lat_ts && wkt.lat1 && (wkt.projName === 'Stereographic_South_Pole' || wkt.projName === 'Polar Stereographic (variant B)')) {\n wkt.lat0 = d2r(wkt.lat1 > 0 ? 90 : -90);\n wkt.lat_ts = wkt.lat1;\n }\n }\n var wkt = function(wkt) {\n var lisp = parseString(wkt);\n var type = lisp.shift();\n var name = lisp.shift();\n lisp.unshift(['name', name]);\n lisp.unshift(['type', type]);\n var obj = {};\n sExpr(lisp, obj);\n cleanWKT(obj);\n return obj;\n };\n\n function defs(name) {\n /*global console*/\n var that = this;\n if (arguments.length === 2) {\n var def = arguments[1];\n if (typeof def === 'string') {\n if (def.charAt(0) === '+') {\n defs[name] = parseProj(arguments[1]);\n }\n else {\n defs[name] = wkt(arguments[1]);\n }\n } else {\n defs[name] = def;\n }\n }\n else if (arguments.length === 1) {\n if (Array.isArray(name)) {\n return name.map(function(v) {\n if (Array.isArray(v)) {\n defs.apply(that, v);\n }\n else {\n defs(v);\n }\n });\n }\n else if (typeof name === 'string') {\n if (name in defs) {\n return defs[name];\n }\n }\n else if ('EPSG' in name) {\n defs['EPSG:' + name.EPSG] = name;\n }\n else if ('ESRI' in name) {\n defs['ESRI:' + name.ESRI] = name;\n }\n else if ('IAU2000' in name) {\n defs['IAU2000:' + name.IAU2000] = name;\n }\n else {\n console.log(name);\n }\n return;\n }\n\n\n }\n globals(defs);\n\n function testObj(code){\n return typeof code === 'string';\n }\n function testDef(code){\n return code in defs;\n }\n var codeWords = ['PROJECTEDCRS', 'PROJCRS', 'GEOGCS','GEOCCS','PROJCS','LOCAL_CS', 'GEODCRS', 'GEODETICCRS', 'GEODETICDATUM', 'ENGCRS', 'ENGINEERINGCRS'];\n function testWKT(code){\n return codeWords.some(function (word) {\n return code.indexOf(word) > -1;\n });\n }\n var codes = ['3857', '900913', '3785', '102113'];\n function checkMercator(item) {\n var auth = match(item, 'authority');\n if (!auth) {\n return;\n }\n var code = match(auth, 'epsg');\n return code && codes.indexOf(code) > -1;\n }\n function checkProjStr(item) {\n var ext = match(item, 'extension');\n if (!ext) {\n return;\n }\n return match(ext, 'proj4');\n }\n function testProj(code){\n return code[0] === '+';\n }\n function parse(code){\n if (testObj(code)) {\n //check to see if this is a WKT string\n if (testDef(code)) {\n return defs[code];\n }\n if (testWKT(code)) {\n var out = wkt(code);\n // test of spetial case, due to this being a very common and often malformed\n if (checkMercator(out)) {\n return defs['EPSG:3857'];\n }\n var maybeProjStr = checkProjStr(out);\n if (maybeProjStr) {\n return parseProj(maybeProjStr);\n }\n return out;\n }\n if (testProj(code)) {\n return parseProj(code);\n }\n }else{\n return code;\n }\n }\n\n var extend = function(destination, source) {\n destination = destination || {};\n var value, property;\n if (!source) {\n return destination;\n }\n for (property in source) {\n value = source[property];\n if (value !== undefined) {\n destination[property] = value;\n }\n }\n return destination;\n };\n\n var msfnz = function(eccent, sinphi, cosphi) {\n var con = eccent * sinphi;\n return cosphi / (Math.sqrt(1 - con * con));\n };\n\n var sign = function(x) {\n return x<0 ? -1 : 1;\n };\n\n var adjust_lon = function(x) {\n return (Math.abs(x) <= SPI) ? x : (x - (sign(x) * TWO_PI));\n };\n\n var tsfnz = function(eccent, phi, sinphi) {\n var con = eccent * sinphi;\n var com = 0.5 * eccent;\n con = Math.pow(((1 - con) / (1 + con)), com);\n return (Math.tan(0.5 * (HALF_PI - phi)) / con);\n };\n\n var phi2z = function(eccent, ts) {\n var eccnth = 0.5 * eccent;\n var con, dphi;\n var phi = HALF_PI - 2 * Math.atan(ts);\n for (var i = 0; i <= 15; i++) {\n con = eccent * Math.sin(phi);\n dphi = HALF_PI - 2 * Math.atan(ts * (Math.pow(((1 - con) / (1 + con)), eccnth))) - phi;\n phi += dphi;\n if (Math.abs(dphi) <= 0.0000000001) {\n return phi;\n }\n }\n //console.log(\"phi2z has NoConvergence\");\n return -9999;\n };\n\n function init() {\n var con = this.b / this.a;\n this.es = 1 - con * con;\n if(!('x0' in this)){\n this.x0 = 0;\n }\n if(!('y0' in this)){\n this.y0 = 0;\n }\n this.e = Math.sqrt(this.es);\n if (this.lat_ts) {\n if (this.sphere) {\n this.k0 = Math.cos(this.lat_ts);\n }\n else {\n this.k0 = msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts));\n }\n }\n else {\n if (!this.k0) {\n if (this.k) {\n this.k0 = this.k;\n }\n else {\n this.k0 = 1;\n }\n }\n }\n }\n\n /* Mercator forward equations--mapping lat,long to x,y\n --------------------------------------------------*/\n\n function forward(p) {\n var lon = p.x;\n var lat = p.y;\n // convert to radians\n if (lat * R2D > 90 && lat * R2D < -90 && lon * R2D > 180 && lon * R2D < -180) {\n return null;\n }\n\n var x, y;\n if (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN) {\n return null;\n }\n else {\n if (this.sphere) {\n x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0);\n y = this.y0 + this.a * this.k0 * Math.log(Math.tan(FORTPI + 0.5 * lat));\n }\n else {\n var sinphi = Math.sin(lat);\n var ts = tsfnz(this.e, lat, sinphi);\n x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0);\n y = this.y0 - this.a * this.k0 * Math.log(ts);\n }\n p.x = x;\n p.y = y;\n return p;\n }\n }\n\n /* Mercator inverse equations--mapping x,y to lat/long\n --------------------------------------------------*/\n function inverse(p) {\n\n var x = p.x - this.x0;\n var y = p.y - this.y0;\n var lon, lat;\n\n if (this.sphere) {\n lat = HALF_PI - 2 * Math.atan(Math.exp(-y / (this.a * this.k0)));\n }\n else {\n var ts = Math.exp(-y / (this.a * this.k0));\n lat = phi2z(this.e, ts);\n if (lat === -9999) {\n return null;\n }\n }\n lon = adjust_lon(this.long0 + x / (this.a * this.k0));\n\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n var names$1 = [\"Mercator\", \"Popular Visualisation Pseudo Mercator\", \"Mercator_1SP\", \"Mercator_Auxiliary_Sphere\", \"merc\"];\n var merc = {\n init: init,\n forward: forward,\n inverse: inverse,\n names: names$1\n };\n\n function init$1() {\n //no-op for longlat\n }\n\n function identity(pt) {\n return pt;\n }\n var names$2 = [\"longlat\", \"identity\"];\n var longlat = {\n init: init$1,\n forward: identity,\n inverse: identity,\n names: names$2\n };\n\n var projs = [merc, longlat];\n var names = {};\n var projStore = [];\n\n function add(proj, i) {\n var len = projStore.length;\n if (!proj.names) {\n console.log(i);\n return true;\n }\n projStore[len] = proj;\n proj.names.forEach(function(n) {\n names[n.toLowerCase()] = len;\n });\n return this;\n }\n\n function get(name) {\n if (!name) {\n return false;\n }\n var n = name.toLowerCase();\n if (typeof names[n] !== 'undefined' && projStore[names[n]]) {\n return projStore[names[n]];\n }\n }\n\n function start() {\n projs.forEach(add);\n }\n var projections = {\n start: start,\n add: add,\n get: get\n };\n\n var exports$2 = {};\n exports$2.MERIT = {\n a: 6378137.0,\n rf: 298.257,\n ellipseName: \"MERIT 1983\"\n };\n\n exports$2.SGS85 = {\n a: 6378136.0,\n rf: 298.257,\n ellipseName: \"Soviet Geodetic System 85\"\n };\n\n exports$2.GRS80 = {\n a: 6378137.0,\n rf: 298.257222101,\n ellipseName: \"GRS 1980(IUGG, 1980)\"\n };\n\n exports$2.IAU76 = {\n a: 6378140.0,\n rf: 298.257,\n ellipseName: \"IAU 1976\"\n };\n\n exports$2.airy = {\n a: 6377563.396,\n b: 6356256.910,\n ellipseName: \"Airy 1830\"\n };\n\n exports$2.APL4 = {\n a: 6378137,\n rf: 298.25,\n ellipseName: \"Appl. Physics. 1965\"\n };\n\n exports$2.NWL9D = {\n a: 6378145.0,\n rf: 298.25,\n ellipseName: \"Naval Weapons Lab., 1965\"\n };\n\n exports$2.mod_airy = {\n a: 6377340.189,\n b: 6356034.446,\n ellipseName: \"Modified Airy\"\n };\n\n exports$2.andrae = {\n a: 6377104.43,\n rf: 300.0,\n ellipseName: \"Andrae 1876 (Den., Iclnd.)\"\n };\n\n exports$2.aust_SA = {\n a: 6378160.0,\n rf: 298.25,\n ellipseName: \"Australian Natl & S. Amer. 1969\"\n };\n\n exports$2.GRS67 = {\n a: 6378160.0,\n rf: 298.2471674270,\n ellipseName: \"GRS 67(IUGG 1967)\"\n };\n\n exports$2.bessel = {\n a: 6377397.155,\n rf: 299.1528128,\n ellipseName: \"Bessel 1841\"\n };\n\n exports$2.bess_nam = {\n a: 6377483.865,\n rf: 299.1528128,\n ellipseName: \"Bessel 1841 (Namibia)\"\n };\n\n exports$2.clrk66 = {\n a: 6378206.4,\n b: 6356583.8,\n ellipseName: \"Clarke 1866\"\n };\n\n exports$2.clrk80 = {\n a: 6378249.145,\n rf: 293.4663,\n ellipseName: \"Clarke 1880 mod.\"\n };\n\n exports$2.clrk58 = {\n a: 6378293.645208759,\n rf: 294.2606763692654,\n ellipseName: \"Clarke 1858\"\n };\n\n exports$2.CPM = {\n a: 6375738.7,\n rf: 334.29,\n ellipseName: \"Comm. des Poids et Mesures 1799\"\n };\n\n exports$2.delmbr = {\n a: 6376428.0,\n rf: 311.5,\n ellipseName: \"Delambre 1810 (Belgium)\"\n };\n\n exports$2.engelis = {\n a: 6378136.05,\n rf: 298.2566,\n ellipseName: \"Engelis 1985\"\n };\n\n exports$2.evrst30 = {\n a: 6377276.345,\n rf: 300.8017,\n ellipseName: \"Everest 1830\"\n };\n\n exports$2.evrst48 = {\n a: 6377304.063,\n rf: 300.8017,\n ellipseName: \"Everest 1948\"\n };\n\n exports$2.evrst56 = {\n a: 6377301.243,\n rf: 300.8017,\n ellipseName: \"Everest 1956\"\n };\n\n exports$2.evrst69 = {\n a: 6377295.664,\n rf: 300.8017,\n ellipseName: \"Everest 1969\"\n };\n\n exports$2.evrstSS = {\n a: 6377298.556,\n rf: 300.8017,\n ellipseName: \"Everest (Sabah & Sarawak)\"\n };\n\n exports$2.fschr60 = {\n a: 6378166.0,\n rf: 298.3,\n ellipseName: \"Fischer (Mercury Datum) 1960\"\n };\n\n exports$2.fschr60m = {\n a: 6378155.0,\n rf: 298.3,\n ellipseName: \"Fischer 1960\"\n };\n\n exports$2.fschr68 = {\n a: 6378150.0,\n rf: 298.3,\n ellipseName: \"Fischer 1968\"\n };\n\n exports$2.helmert = {\n a: 6378200.0,\n rf: 298.3,\n ellipseName: \"Helmert 1906\"\n };\n\n exports$2.hough = {\n a: 6378270.0,\n rf: 297.0,\n ellipseName: \"Hough\"\n };\n\n exports$2.intl = {\n a: 6378388.0,\n rf: 297.0,\n ellipseName: \"International 1909 (Hayford)\"\n };\n\n exports$2.kaula = {\n a: 6378163.0,\n rf: 298.24,\n ellipseName: \"Kaula 1961\"\n };\n\n exports$2.lerch = {\n a: 6378139.0,\n rf: 298.257,\n ellipseName: \"Lerch 1979\"\n };\n\n exports$2.mprts = {\n a: 6397300.0,\n rf: 191.0,\n ellipseName: \"Maupertius 1738\"\n };\n\n exports$2.new_intl = {\n a: 6378157.5,\n b: 6356772.2,\n ellipseName: \"New International 1967\"\n };\n\n exports$2.plessis = {\n a: 6376523.0,\n rf: 6355863.0,\n ellipseName: \"Plessis 1817 (France)\"\n };\n\n exports$2.krass = {\n a: 6378245.0,\n rf: 298.3,\n ellipseName: \"Krassovsky, 1942\"\n };\n\n exports$2.SEasia = {\n a: 6378155.0,\n b: 6356773.3205,\n ellipseName: \"Southeast Asia\"\n };\n\n exports$2.walbeck = {\n a: 6376896.0,\n b: 6355834.8467,\n ellipseName: \"Walbeck\"\n };\n\n exports$2.WGS60 = {\n a: 6378165.0,\n rf: 298.3,\n ellipseName: \"WGS 60\"\n };\n\n exports$2.WGS66 = {\n a: 6378145.0,\n rf: 298.25,\n ellipseName: \"WGS 66\"\n };\n\n exports$2.WGS7 = {\n a: 6378135.0,\n rf: 298.26,\n ellipseName: \"WGS 72\"\n };\n\n var WGS84 = exports$2.WGS84 = {\n a: 6378137.0,\n rf: 298.257223563,\n ellipseName: \"WGS 84\"\n };\n\n exports$2.sphere = {\n a: 6370997.0,\n b: 6370997.0,\n ellipseName: \"Normal Sphere (r=6370997)\"\n };\n\n function eccentricity(a, b, rf, R_A) {\n var a2 = a * a; // used in geocentric\n var b2 = b * b; // used in geocentric\n var es = (a2 - b2) / a2; // e ^ 2\n var e = 0;\n if (R_A) {\n a *= 1 - es * (SIXTH + es * (RA4 + es * RA6));\n a2 = a * a;\n es = 0;\n } else {\n e = Math.sqrt(es); // eccentricity\n }\n var ep2 = (a2 - b2) / b2; // used in geocentric\n return {\n es: es,\n e: e,\n ep2: ep2\n };\n }\n function sphere(a, b, rf, ellps, sphere) {\n if (!a) { // do we have an ellipsoid?\n var ellipse = match(exports$2, ellps);\n if (!ellipse) {\n ellipse = WGS84;\n }\n a = ellipse.a;\n b = ellipse.b;\n rf = ellipse.rf;\n }\n\n if (rf && !b) {\n b = (1.0 - 1.0 / rf) * a;\n }\n if (rf === 0 || Math.abs(a - b) < EPSLN) {\n sphere = true;\n b = a;\n }\n return {\n a: a,\n b: b,\n rf: rf,\n sphere: sphere\n };\n }\n\n var exports$3 = {};\n exports$3.wgs84 = {\n towgs84: \"0,0,0\",\n ellipse: \"WGS84\",\n datumName: \"WGS84\"\n };\n\n exports$3.ch1903 = {\n towgs84: \"674.374,15.056,405.346\",\n ellipse: \"bessel\",\n datumName: \"swiss\"\n };\n\n exports$3.ggrs87 = {\n towgs84: \"-199.87,74.79,246.62\",\n ellipse: \"GRS80\",\n datumName: \"Greek_Geodetic_Reference_System_1987\"\n };\n\n exports$3.nad83 = {\n towgs84: \"0,0,0\",\n ellipse: \"GRS80\",\n datumName: \"North_American_Datum_1983\"\n };\n\n exports$3.nad27 = {\n nadgrids: \"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat\",\n ellipse: \"clrk66\",\n datumName: \"North_American_Datum_1927\"\n };\n\n exports$3.potsdam = {\n towgs84: \"598.1,73.7,418.2,0.202,0.045,-2.455,6.7\",\n ellipse: \"bessel\",\n datumName: \"Potsdam Rauenberg 1950 DHDN\"\n };\n\n exports$3.carthage = {\n towgs84: \"-263.0,6.0,431.0\",\n ellipse: \"clark80\",\n datumName: \"Carthage 1934 Tunisia\"\n };\n\n exports$3.hermannskogel = {\n towgs84: \"577.326,90.129,463.919,5.137,1.474,5.297,2.4232\",\n ellipse: \"bessel\",\n datumName: \"Hermannskogel\"\n };\n\n exports$3.osni52 = {\n towgs84: \"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15\",\n ellipse: \"airy\",\n datumName: \"Irish National\"\n };\n\n exports$3.ire65 = {\n towgs84: \"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15\",\n ellipse: \"mod_airy\",\n datumName: \"Ireland 1965\"\n };\n\n exports$3.rassadiran = {\n towgs84: \"-133.63,-157.5,-158.62\",\n ellipse: \"intl\",\n datumName: \"Rassadiran\"\n };\n\n exports$3.nzgd49 = {\n towgs84: \"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993\",\n ellipse: \"intl\",\n datumName: \"New Zealand Geodetic Datum 1949\"\n };\n\n exports$3.osgb36 = {\n towgs84: \"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894\",\n ellipse: \"airy\",\n datumName: \"Airy 1830\"\n };\n\n exports$3.s_jtsk = {\n towgs84: \"589,76,480\",\n ellipse: 'bessel',\n datumName: 'S-JTSK (Ferro)'\n };\n\n exports$3.beduaram = {\n towgs84: '-106,-87,188',\n ellipse: 'clrk80',\n datumName: 'Beduaram'\n };\n\n exports$3.gunung_segara = {\n towgs84: '-403,684,41',\n ellipse: 'bessel',\n datumName: 'Gunung Segara Jakarta'\n };\n\n exports$3.rnb72 = {\n towgs84: \"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1\",\n ellipse: \"intl\",\n datumName: \"Reseau National Belge 1972\"\n };\n\n function datum(datumCode, datum_params, a, b, es, ep2, nadgrids) {\n var out = {};\n\n if (datumCode === undefined || datumCode === 'none') {\n out.datum_type = PJD_NODATUM;\n } else {\n out.datum_type = PJD_WGS84;\n }\n\n if (datum_params) {\n out.datum_params = datum_params.map(parseFloat);\n if (out.datum_params[0] !== 0 || out.datum_params[1] !== 0 || out.datum_params[2] !== 0) {\n out.datum_type = PJD_3PARAM;\n }\n if (out.datum_params.length > 3) {\n if (out.datum_params[3] !== 0 || out.datum_params[4] !== 0 || out.datum_params[5] !== 0 || out.datum_params[6] !== 0) {\n out.datum_type = PJD_7PARAM;\n out.datum_params[3] *= SEC_TO_RAD;\n out.datum_params[4] *= SEC_TO_RAD;\n out.datum_params[5] *= SEC_TO_RAD;\n out.datum_params[6] = (out.datum_params[6] / 1000000.0) + 1.0;\n }\n }\n }\n\n if (nadgrids) {\n out.datum_type = PJD_GRIDSHIFT;\n out.grids = nadgrids;\n }\n out.a = a; //datum object also uses these values\n out.b = b;\n out.es = es;\n out.ep2 = ep2;\n return out;\n }\n\n /**\n * Resources for details of NTv2 file formats:\n * - https://web.archive.org/web/20140127204822if_/http://www.mgs.gov.on.ca:80/stdprodconsume/groups/content/@mgs/@iandit/documents/resourcelist/stel02_047447.pdf\n * - http://mimaka.com/help/gs/html/004_NTV2%20Data%20Format.htm\n */\n\n var loadedNadgrids = {};\n\n /**\n * Load a binary NTv2 file (.gsb) to a key that can be used in a proj string like +nadgrids=. Pass the NTv2 file\n * as an ArrayBuffer.\n */\n function nadgrid(key, data) {\n var view = new DataView(data);\n var isLittleEndian = detectLittleEndian(view);\n var header = readHeader(view, isLittleEndian);\n if (header.nSubgrids > 1) {\n console.log('Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored');\n }\n var subgrids = readSubgrids(view, header, isLittleEndian);\n var nadgrid = {header: header, subgrids: subgrids};\n loadedNadgrids[key] = nadgrid;\n return nadgrid;\n }\n\n /**\n * Given a proj4 value for nadgrids, return an array of loaded grids\n */\n function getNadgrids(nadgrids) {\n // Format details: http://proj.maptools.org/gen_parms.html\n if (nadgrids === undefined) { return null; }\n var grids = nadgrids.split(',');\n return grids.map(parseNadgridString);\n }\n\n function parseNadgridString(value) {\n if (value.length === 0) {\n return null;\n }\n var optional = value[0] === '@';\n if (optional) {\n value = value.slice(1);\n }\n if (value === 'null') {\n return {name: 'null', mandatory: !optional, grid: null, isNull: true};\n }\n return {\n name: value,\n mandatory: !optional,\n grid: loadedNadgrids[value] || null,\n isNull: false\n };\n }\n\n function secondsToRadians(seconds) {\n return (seconds / 3600) * Math.PI / 180;\n }\n\n function detectLittleEndian(view) {\n var nFields = view.getInt32(8, false);\n if (nFields === 11) {\n return false;\n }\n nFields = view.getInt32(8, true);\n if (nFields !== 11) {\n console.warn('Failed to detect nadgrid endian-ness, defaulting to little-endian');\n }\n return true;\n }\n\n function readHeader(view, isLittleEndian) {\n return {\n nFields: view.getInt32(8, isLittleEndian),\n nSubgridFields: view.getInt32(24, isLittleEndian),\n nSubgrids: view.getInt32(40, isLittleEndian),\n shiftType: decodeString(view, 56, 56 + 8).trim(),\n fromSemiMajorAxis: view.getFloat64(120, isLittleEndian),\n fromSemiMinorAxis: view.getFloat64(136, isLittleEndian),\n toSemiMajorAxis: view.getFloat64(152, isLittleEndian),\n toSemiMinorAxis: view.getFloat64(168, isLittleEndian),\n };\n }\n\n function decodeString(view, start, end) {\n return String.fromCharCode.apply(null, new Uint8Array(view.buffer.slice(start, end)));\n }\n\n function readSubgrids(view, header, isLittleEndian) {\n var gridOffset = 176;\n var grids = [];\n for (var i = 0; i < header.nSubgrids; i++) {\n var subHeader = readGridHeader(view, gridOffset, isLittleEndian);\n var nodes = readGridNodes(view, gridOffset, subHeader, isLittleEndian);\n var lngColumnCount = Math.round(\n 1 + (subHeader.upperLongitude - subHeader.lowerLongitude) / subHeader.longitudeInterval);\n var latColumnCount = Math.round(\n 1 + (subHeader.upperLatitude - subHeader.lowerLatitude) / subHeader.latitudeInterval);\n // Proj4 operates on radians whereas the coordinates are in seconds in the grid\n grids.push({\n ll: [secondsToRadians(subHeader.lowerLongitude), secondsToRadians(subHeader.lowerLatitude)],\n del: [secondsToRadians(subHeader.longitudeInterval), secondsToRadians(subHeader.latitudeInterval)],\n lim: [lngColumnCount, latColumnCount],\n count: subHeader.gridNodeCount,\n cvs: mapNodes(nodes)\n });\n }\n return grids;\n }\n\n function mapNodes(nodes) {\n return nodes.map(function (r) {return [secondsToRadians(r.longitudeShift), secondsToRadians(r.latitudeShift)];});\n }\n\n function readGridHeader(view, offset, isLittleEndian) {\n return {\n name: decodeString(view, offset + 8, offset + 16).trim(),\n parent: decodeString(view, offset + 24, offset + 24 + 8).trim(),\n lowerLatitude: view.getFloat64(offset + 72, isLittleEndian),\n upperLatitude: view.getFloat64(offset + 88, isLittleEndian),\n lowerLongitude: view.getFloat64(offset + 104, isLittleEndian),\n upperLongitude: view.getFloat64(offset + 120, isLittleEndian),\n latitudeInterval: view.getFloat64(offset + 136, isLittleEndian),\n longitudeInterval: view.getFloat64(offset + 152, isLittleEndian),\n gridNodeCount: view.getInt32(offset + 168, isLittleEndian)\n };\n }\n\n function readGridNodes(view, offset, gridHeader, isLittleEndian) {\n var nodesOffset = offset + 176;\n var gridRecordLength = 16;\n var gridShiftRecords = [];\n for (var i = 0; i < gridHeader.gridNodeCount; i++) {\n var record = {\n latitudeShift: view.getFloat32(nodesOffset + i * gridRecordLength, isLittleEndian),\n longitudeShift: view.getFloat32(nodesOffset + i * gridRecordLength + 4, isLittleEndian),\n latitudeAccuracy: view.getFloat32(nodesOffset + i * gridRecordLength + 8, isLittleEndian),\n longitudeAccuracy: view.getFloat32(nodesOffset + i * gridRecordLength + 12, isLittleEndian),\n };\n gridShiftRecords.push(record);\n }\n return gridShiftRecords;\n }\n\n function Projection(srsCode,callback) {\n if (!(this instanceof Projection)) {\n return new Projection(srsCode);\n }\n callback = callback || function(error){\n if(error){\n throw error;\n }\n };\n var json = parse(srsCode);\n if(typeof json !== 'object'){\n callback(srsCode);\n return;\n }\n var ourProj = Projection.projections.get(json.projName);\n if(!ourProj){\n callback(srsCode);\n return;\n }\n if (json.datumCode && json.datumCode !== 'none') {\n var datumDef = match(exports$3, json.datumCode);\n if (datumDef) {\n json.datum_params = json.datum_params || (datumDef.towgs84 ? datumDef.towgs84.split(',') : null);\n json.ellps = datumDef.ellipse;\n json.datumName = datumDef.datumName ? datumDef.datumName : json.datumCode;\n }\n }\n json.k0 = json.k0 || 1.0;\n json.axis = json.axis || 'enu';\n json.ellps = json.ellps || 'wgs84';\n json.lat1 = json.lat1 || json.lat0; // Lambert_Conformal_Conic_1SP, for example, needs this\n\n var sphere_ = sphere(json.a, json.b, json.rf, json.ellps, json.sphere);\n var ecc = eccentricity(sphere_.a, sphere_.b, sphere_.rf, json.R_A);\n var nadgrids = getNadgrids(json.nadgrids);\n var datumObj = json.datum || datum(json.datumCode, json.datum_params, sphere_.a, sphere_.b, ecc.es, ecc.ep2,\n nadgrids);\n\n extend(this, json); // transfer everything over from the projection because we don't know what we'll need\n extend(this, ourProj); // transfer all the methods from the projection\n\n // copy the 4 things over we calulated in deriveConstants.sphere\n this.a = sphere_.a;\n this.b = sphere_.b;\n this.rf = sphere_.rf;\n this.sphere = sphere_.sphere;\n\n // copy the 3 things we calculated in deriveConstants.eccentricity\n this.es = ecc.es;\n this.e = ecc.e;\n this.ep2 = ecc.ep2;\n\n // add in the datum object\n this.datum = datumObj;\n\n // init the projection\n this.init();\n\n // legecy callback from back in the day when it went to spatialreference.org\n callback(null, this);\n\n }\n Projection.projections = projections;\n Projection.projections.start();\n\n 'use strict';\n function compareDatums(source, dest) {\n if (source.datum_type !== dest.datum_type) {\n return false; // false, datums are not equal\n } else if (source.a !== dest.a || Math.abs(source.es - dest.es) > 0.000000000050) {\n // the tolerance for es is to ensure that GRS80 and WGS84\n // are considered identical\n return false;\n } else if (source.datum_type === PJD_3PARAM) {\n return (source.datum_params[0] === dest.datum_params[0] && source.datum_params[1] === dest.datum_params[1] && source.datum_params[2] === dest.datum_params[2]);\n } else if (source.datum_type === PJD_7PARAM) {\n return (source.datum_params[0] === dest.datum_params[0] && source.datum_params[1] === dest.datum_params[1] && source.datum_params[2] === dest.datum_params[2] && source.datum_params[3] === dest.datum_params[3] && source.datum_params[4] === dest.datum_params[4] && source.datum_params[5] === dest.datum_params[5] && source.datum_params[6] === dest.datum_params[6]);\n } else {\n return true; // datums are equal\n }\n } // cs_compare_datums()\n\n /*\n * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates\n * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z),\n * according to the current ellipsoid parameters.\n *\n * Latitude : Geodetic latitude in radians (input)\n * Longitude : Geodetic longitude in radians (input)\n * Height : Geodetic height, in meters (input)\n * X : Calculated Geocentric X coordinate, in meters (output)\n * Y : Calculated Geocentric Y coordinate, in meters (output)\n * Z : Calculated Geocentric Z coordinate, in meters (output)\n *\n */\n function geodeticToGeocentric(p, es, a) {\n var Longitude = p.x;\n var Latitude = p.y;\n var Height = p.z ? p.z : 0; //Z value not always supplied\n\n var Rn; /* Earth radius at location */\n var Sin_Lat; /* Math.sin(Latitude) */\n var Sin2_Lat; /* Square of Math.sin(Latitude) */\n var Cos_Lat; /* Math.cos(Latitude) */\n\n /*\n ** Don't blow up if Latitude is just a little out of the value\n ** range as it may just be a rounding issue. Also removed longitude\n ** test, it should be wrapped by Math.cos() and Math.sin(). NFW for PROJ.4, Sep/2001.\n */\n if (Latitude < -HALF_PI && Latitude > -1.001 * HALF_PI) {\n Latitude = -HALF_PI;\n } else if (Latitude > HALF_PI && Latitude < 1.001 * HALF_PI) {\n Latitude = HALF_PI;\n } else if (Latitude < -HALF_PI) {\n /* Latitude out of range */\n //..reportError('geocent:lat out of range:' + Latitude);\n return { x: -Infinity, y: -Infinity, z: p.z };\n } else if (Latitude > HALF_PI) {\n /* Latitude out of range */\n return { x: Infinity, y: Infinity, z: p.z };\n }\n\n if (Longitude > Math.PI) {\n Longitude -= (2 * Math.PI);\n }\n Sin_Lat = Math.sin(Latitude);\n Cos_Lat = Math.cos(Latitude);\n Sin2_Lat = Sin_Lat * Sin_Lat;\n Rn = a / (Math.sqrt(1.0e0 - es * Sin2_Lat));\n return {\n x: (Rn + Height) * Cos_Lat * Math.cos(Longitude),\n y: (Rn + Height) * Cos_Lat * Math.sin(Longitude),\n z: ((Rn * (1 - es)) + Height) * Sin_Lat\n };\n } // cs_geodetic_to_geocentric()\n\n function geocentricToGeodetic(p, es, a, b) {\n /* local defintions and variables */\n /* end-criterium of loop, accuracy of sin(Latitude) */\n var genau = 1e-12;\n var genau2 = (genau * genau);\n var maxiter = 30;\n\n var P; /* distance between semi-minor axis and location */\n var RR; /* distance between center and location */\n var CT; /* sin of geocentric latitude */\n var ST; /* cos of geocentric latitude */\n var RX;\n var RK;\n var RN; /* Earth radius at location */\n var CPHI0; /* cos of start or old geodetic latitude in iterations */\n var SPHI0; /* sin of start or old geodetic latitude in iterations */\n var CPHI; /* cos of searched geodetic latitude */\n var SPHI; /* sin of searched geodetic latitude */\n var SDPHI; /* end-criterium: addition-theorem of sin(Latitude(iter)-Latitude(iter-1)) */\n var iter; /* # of continous iteration, max. 30 is always enough (s.a.) */\n\n var X = p.x;\n var Y = p.y;\n var Z = p.z ? p.z : 0.0; //Z value not always supplied\n var Longitude;\n var Latitude;\n var Height;\n\n P = Math.sqrt(X * X + Y * Y);\n RR = Math.sqrt(X * X + Y * Y + Z * Z);\n\n /* special cases for latitude and longitude */\n if (P / a < genau) {\n\n /* special case, if P=0. (X=0., Y=0.) */\n Longitude = 0.0;\n\n /* if (X,Y,Z)=(0.,0.,0.) then Height becomes semi-minor axis\n * of ellipsoid (=center of mass), Latitude becomes PI/2 */\n if (RR / a < genau) {\n Latitude = HALF_PI;\n Height = -b;\n return {\n x: p.x,\n y: p.y,\n z: p.z\n };\n }\n } else {\n /* ellipsoidal (geodetic) longitude\n * interval: -PI < Longitude <= +PI */\n Longitude = Math.atan2(Y, X);\n }\n\n /* --------------------------------------------------------------\n * Following iterative algorithm was developped by\n * \"Institut for Erdmessung\", University of Hannover, July 1988.\n * Internet: www.ife.uni-hannover.de\n * Iterative computation of CPHI,SPHI and Height.\n * Iteration of CPHI and SPHI to 10**-12 radian resp.\n * 2*10**-7 arcsec.\n * --------------------------------------------------------------\n */\n CT = Z / RR;\n ST = P / RR;\n RX = 1.0 / Math.sqrt(1.0 - es * (2.0 - es) * ST * ST);\n CPHI0 = ST * (1.0 - es) * RX;\n SPHI0 = CT * RX;\n iter = 0;\n\n /* loop to find sin(Latitude) resp. Latitude\n * until |sin(Latitude(iter)-Latitude(iter-1))| < genau */\n do {\n iter++;\n RN = a / Math.sqrt(1.0 - es * SPHI0 * SPHI0);\n\n /* ellipsoidal (geodetic) height */\n Height = P * CPHI0 + Z * SPHI0 - RN * (1.0 - es * SPHI0 * SPHI0);\n\n RK = es * RN / (RN + Height);\n RX = 1.0 / Math.sqrt(1.0 - RK * (2.0 - RK) * ST * ST);\n CPHI = ST * (1.0 - RK) * RX;\n SPHI = CT * RX;\n SDPHI = SPHI * CPHI0 - CPHI * SPHI0;\n CPHI0 = CPHI;\n SPHI0 = SPHI;\n }\n while (SDPHI * SDPHI > genau2 && iter < maxiter);\n\n /* ellipsoidal (geodetic) latitude */\n Latitude = Math.atan(SPHI / Math.abs(CPHI));\n return {\n x: Longitude,\n y: Latitude,\n z: Height\n };\n } // cs_geocentric_to_geodetic()\n\n /****************************************************************/\n // pj_geocentic_to_wgs84( p )\n // p = point to transform in geocentric coordinates (x,y,z)\n\n\n /** point object, nothing fancy, just allows values to be\n passed back and forth by reference rather than by value.\n Other point classes may be used as long as they have\n x and y properties, which will get modified in the transform method.\n */\n function geocentricToWgs84(p, datum_type, datum_params) {\n\n if (datum_type === PJD_3PARAM) {\n // if( x[io] === HUGE_VAL )\n // continue;\n return {\n x: p.x + datum_params[0],\n y: p.y + datum_params[1],\n z: p.z + datum_params[2],\n };\n } else if (datum_type === PJD_7PARAM) {\n var Dx_BF = datum_params[0];\n var Dy_BF = datum_params[1];\n var Dz_BF = datum_params[2];\n var Rx_BF = datum_params[3];\n var Ry_BF = datum_params[4];\n var Rz_BF = datum_params[5];\n var M_BF = datum_params[6];\n // if( x[io] === HUGE_VAL )\n // continue;\n return {\n x: M_BF * (p.x - Rz_BF * p.y + Ry_BF * p.z) + Dx_BF,\n y: M_BF * (Rz_BF * p.x + p.y - Rx_BF * p.z) + Dy_BF,\n z: M_BF * (-Ry_BF * p.x + Rx_BF * p.y + p.z) + Dz_BF\n };\n }\n } // cs_geocentric_to_wgs84\n\n /****************************************************************/\n // pj_geocentic_from_wgs84()\n // coordinate system definition,\n // point to transform in geocentric coordinates (x,y,z)\n function geocentricFromWgs84(p, datum_type, datum_params) {\n\n if (datum_type === PJD_3PARAM) {\n //if( x[io] === HUGE_VAL )\n // continue;\n return {\n x: p.x - datum_params[0],\n y: p.y - datum_params[1],\n z: p.z - datum_params[2],\n };\n\n } else if (datum_type === PJD_7PARAM) {\n var Dx_BF = datum_params[0];\n var Dy_BF = datum_params[1];\n var Dz_BF = datum_params[2];\n var Rx_BF = datum_params[3];\n var Ry_BF = datum_params[4];\n var Rz_BF = datum_params[5];\n var M_BF = datum_params[6];\n var x_tmp = (p.x - Dx_BF) / M_BF;\n var y_tmp = (p.y - Dy_BF) / M_BF;\n var z_tmp = (p.z - Dz_BF) / M_BF;\n //if( x[io] === HUGE_VAL )\n // continue;\n\n return {\n x: x_tmp + Rz_BF * y_tmp - Ry_BF * z_tmp,\n y: -Rz_BF * x_tmp + y_tmp + Rx_BF * z_tmp,\n z: Ry_BF * x_tmp - Rx_BF * y_tmp + z_tmp\n };\n } //cs_geocentric_from_wgs84()\n }\n\n function checkParams(type) {\n return (type === PJD_3PARAM || type === PJD_7PARAM);\n }\n\n var datum_transform = function(source, dest, point) {\n // Short cut if the datums are identical.\n if (compareDatums(source, dest)) {\n return point; // in this case, zero is sucess,\n // whereas cs_compare_datums returns 1 to indicate TRUE\n // confusing, should fix this\n }\n\n // Explicitly skip datum transform by setting 'datum=none' as parameter for either source or dest\n if (source.datum_type === PJD_NODATUM || dest.datum_type === PJD_NODATUM) {\n return point;\n }\n\n // If this datum requires grid shifts, then apply it to geodetic coordinates.\n var source_a = source.a;\n var source_es = source.es;\n if (source.datum_type === PJD_GRIDSHIFT) {\n var gridShiftCode = applyGridShift(source, false, point);\n if (gridShiftCode !== 0) {\n return undefined;\n }\n source_a = SRS_WGS84_SEMIMAJOR;\n source_es = SRS_WGS84_ESQUARED;\n }\n\n var dest_a = dest.a;\n var dest_b = dest.b;\n var dest_es = dest.es;\n if (dest.datum_type === PJD_GRIDSHIFT) {\n dest_a = SRS_WGS84_SEMIMAJOR;\n dest_b = SRS_WGS84_SEMIMINOR;\n dest_es = SRS_WGS84_ESQUARED;\n }\n\n // Do we need to go through geocentric coordinates?\n if (source_es === dest_es && source_a === dest_a && !checkParams(source.datum_type) && !checkParams(dest.datum_type)) {\n return point;\n }\n\n // Convert to geocentric coordinates.\n point = geodeticToGeocentric(point, source_es, source_a);\n // Convert between datums\n if (checkParams(source.datum_type)) {\n point = geocentricToWgs84(point, source.datum_type, source.datum_params);\n }\n if (checkParams(dest.datum_type)) {\n point = geocentricFromWgs84(point, dest.datum_type, dest.datum_params);\n }\n point = geocentricToGeodetic(point, dest_es, dest_a, dest_b);\n\n if (dest.datum_type === PJD_GRIDSHIFT) {\n var destGridShiftResult = applyGridShift(dest, true, point);\n if (destGridShiftResult !== 0) {\n return undefined;\n }\n }\n\n return point;\n };\n\n function applyGridShift(source, inverse, point) {\n if (source.grids === null || source.grids.length === 0) {\n console.log('Grid shift grids not found');\n return -1;\n }\n var input = {x: -point.x, y: point.y};\n var output = {x: Number.NaN, y: Number.NaN};\n var attemptedGrids = [];\n for (var i = 0; i < source.grids.length; i++) {\n var grid = source.grids[i];\n attemptedGrids.push(grid.name);\n if (grid.isNull) {\n output = input;\n break;\n }\n if (grid.grid === null) {\n if (grid.mandatory) {\n console.log(\"Unable to find mandatory grid '\" + grid.name + \"'\");\n return -1;\n }\n continue;\n }\n var subgrid = grid.grid.subgrids[0];\n // skip tables that don't match our point at all\n var epsilon = (Math.abs(subgrid.del[1]) + Math.abs(subgrid.del[0])) / 10000.0;\n var minX = subgrid.ll[0] - epsilon;\n var minY = subgrid.ll[1] - epsilon;\n var maxX = subgrid.ll[0] + (subgrid.lim[0] - 1) * subgrid.del[0] + epsilon;\n var maxY = subgrid.ll[1] + (subgrid.lim[1] - 1) * subgrid.del[1] + epsilon;\n if (minY > input.y || minX > input.x || maxY < input.y || maxX < input.x ) {\n continue;\n }\n output = applySubgridShift(input, inverse, subgrid);\n if (!isNaN(output.x)) {\n break;\n }\n }\n if (isNaN(output.x)) {\n console.log(\"Failed to find a grid shift table for location '\"+\n -input.x * R2D + \" \" + input.y * R2D + \" tried: '\" + attemptedGrids + \"'\");\n return -1;\n }\n point.x = -output.x;\n point.y = output.y;\n return 0;\n }\n\n function applySubgridShift(pin, inverse, ct) {\n var val = {x: Number.NaN, y: Number.NaN};\n if (isNaN(pin.x)) { return val; }\n var tb = {x: pin.x, y: pin.y};\n tb.x -= ct.ll[0];\n tb.y -= ct.ll[1];\n tb.x = adjust_lon(tb.x - Math.PI) + Math.PI;\n var t = nadInterpolate(tb, ct);\n if (inverse) {\n if (isNaN(t.x)) {\n return val;\n }\n t.x = tb.x - t.x;\n t.y = tb.y - t.y;\n var i = 9, tol = 1e-12;\n var dif, del;\n do {\n del = nadInterpolate(t, ct);\n if (isNaN(del.x)) {\n console.log(\"Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.\");\n break;\n }\n dif = {x: tb.x - (del.x + t.x), y: tb.y - (del.y + t.y)};\n t.x += dif.x;\n t.y += dif.y;\n } while (i-- && Math.abs(dif.x) > tol && Math.abs(dif.y) > tol);\n if (i < 0) {\n console.log(\"Inverse grid shift iterator failed to converge.\");\n return val;\n }\n val.x = adjust_lon(t.x + ct.ll[0]);\n val.y = t.y + ct.ll[1];\n } else {\n if (!isNaN(t.x)) {\n val.x = pin.x + t.x;\n val.y = pin.y + t.y;\n }\n }\n return val;\n }\n\n function nadInterpolate(pin, ct) {\n var t = {x: pin.x / ct.del[0], y: pin.y / ct.del[1]};\n var indx = {x: Math.floor(t.x), y: Math.floor(t.y)};\n var frct = {x: t.x - 1.0 * indx.x, y: t.y - 1.0 * indx.y};\n var val= {x: Number.NaN, y: Number.NaN};\n var inx;\n if (indx.x < 0 || indx.x >= ct.lim[0]) {\n return val;\n }\n if (indx.y < 0 || indx.y >= ct.lim[1]) {\n return val;\n }\n inx = (indx.y * ct.lim[0]) + indx.x;\n var f00 = {x: ct.cvs[inx][0], y: ct.cvs[inx][1]};\n inx++;\n var f10= {x: ct.cvs[inx][0], y: ct.cvs[inx][1]};\n inx += ct.lim[0];\n var f11 = {x: ct.cvs[inx][0], y: ct.cvs[inx][1]};\n inx--;\n var f01 = {x: ct.cvs[inx][0], y: ct.cvs[inx][1]};\n var m11 = frct.x * frct.y, m10 = frct.x * (1.0 - frct.y),\n m00 = (1.0 - frct.x) * (1.0 - frct.y), m01 = (1.0 - frct.x) * frct.y;\n val.x = (m00 * f00.x + m10 * f10.x + m01 * f01.x + m11 * f11.x);\n val.y = (m00 * f00.y + m10 * f10.y + m01 * f01.y + m11 * f11.y);\n return val;\n }\n\n var adjust_axis = function(crs, denorm, point) {\n var xin = point.x,\n yin = point.y,\n zin = point.z || 0.0;\n var v, t, i;\n var out = {};\n for (i = 0; i < 3; i++) {\n if (denorm && i === 2 && point.z === undefined) {\n continue;\n }\n if (i === 0) {\n v = xin;\n if (\"ew\".indexOf(crs.axis[i]) !== -1) {\n t = 'x';\n } else {\n t = 'y';\n }\n\n }\n else if (i === 1) {\n v = yin;\n if (\"ns\".indexOf(crs.axis[i]) !== -1) {\n t = 'y';\n } else {\n t = 'x';\n }\n }\n else {\n v = zin;\n t = 'z';\n }\n switch (crs.axis[i]) {\n case 'e':\n out[t] = v;\n break;\n case 'w':\n out[t] = -v;\n break;\n case 'n':\n out[t] = v;\n break;\n case 's':\n out[t] = -v;\n break;\n case 'u':\n if (point[t] !== undefined) {\n out.z = v;\n }\n break;\n case 'd':\n if (point[t] !== undefined) {\n out.z = -v;\n }\n break;\n default:\n //console.log(\"ERROR: unknow axis (\"+crs.axis[i]+\") - check definition of \"+crs.projName);\n return null;\n }\n }\n return out;\n };\n\n var toPoint = function (array){\n var out = {\n x: array[0],\n y: array[1]\n };\n if (array.length>2) {\n out.z = array[2];\n }\n if (array.length>3) {\n out.m = array[3];\n }\n return out;\n };\n\n var checkSanity = function (point) {\n checkCoord(point.x);\n checkCoord(point.y);\n };\n function checkCoord(num) {\n if (typeof Number.isFinite === 'function') {\n if (Number.isFinite(num)) {\n return;\n }\n throw new TypeError('coordinates must be finite numbers');\n }\n if (typeof num !== 'number' || num !== num || !isFinite(num)) {\n throw new TypeError('coordinates must be finite numbers');\n }\n }\n\n function checkNotWGS(source, dest) {\n return ((source.datum.datum_type === PJD_3PARAM || source.datum.datum_type === PJD_7PARAM) && dest.datumCode !== 'WGS84') || ((dest.datum.datum_type === PJD_3PARAM || dest.datum.datum_type === PJD_7PARAM) && source.datumCode !== 'WGS84');\n }\n\n function transform(source, dest, point, enforceAxis) {\n var wgs84;\n if (Array.isArray(point)) {\n point = toPoint(point);\n }\n checkSanity(point);\n // Workaround for datum shifts towgs84, if either source or destination projection is not wgs84\n if (source.datum && dest.datum && checkNotWGS(source, dest)) {\n wgs84 = new Projection('WGS84');\n point = transform(source, wgs84, point, enforceAxis);\n source = wgs84;\n }\n // DGR, 2010/11/12\n if (enforceAxis && source.axis !== 'enu') {\n point = adjust_axis(source, false, point);\n }\n // Transform source points to long/lat, if they aren't already.\n if (source.projName === 'longlat') {\n point = {\n x: point.x * D2R,\n y: point.y * D2R,\n z: point.z || 0\n };\n } else {\n if (source.to_meter) {\n point = {\n x: point.x * source.to_meter,\n y: point.y * source.to_meter,\n z: point.z || 0\n };\n }\n point = source.inverse(point); // Convert Cartesian to longlat\n if (!point) {\n return;\n }\n }\n // Adjust for the prime meridian if necessary\n if (source.from_greenwich) {\n point.x += source.from_greenwich;\n }\n\n // Convert datums if needed, and if possible.\n point = datum_transform(source.datum, dest.datum, point);\n if (!point) {\n return;\n }\n\n // Adjust for the prime meridian if necessary\n if (dest.from_greenwich) {\n point = {\n x: point.x - dest.from_greenwich,\n y: point.y,\n z: point.z || 0\n };\n }\n\n if (dest.projName === 'longlat') {\n // convert radians to decimal degrees\n point = {\n x: point.x * R2D,\n y: point.y * R2D,\n z: point.z || 0\n };\n } else { // else project\n point = dest.forward(point);\n if (dest.to_meter) {\n point = {\n x: point.x / dest.to_meter,\n y: point.y / dest.to_meter,\n z: point.z || 0\n };\n }\n }\n\n // DGR, 2010/11/12\n if (enforceAxis && dest.axis !== 'enu') {\n return adjust_axis(dest, true, point);\n }\n\n return point;\n }\n\n var wgs84 = Projection('WGS84');\n\n function transformer(from, to, coords, enforceAxis) {\n var transformedArray, out, keys;\n if (Array.isArray(coords)) {\n transformedArray = transform(from, to, coords, enforceAxis) || {x: NaN, y: NaN};\n if (coords.length > 2) {\n if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) {\n if (typeof transformedArray.z === 'number') {\n return [transformedArray.x, transformedArray.y, transformedArray.z].concat(coords.splice(3));\n } else {\n return [transformedArray.x, transformedArray.y, coords[2]].concat(coords.splice(3));\n }\n } else {\n return [transformedArray.x, transformedArray.y].concat(coords.splice(2));\n }\n } else {\n return [transformedArray.x, transformedArray.y];\n }\n } else {\n out = transform(from, to, coords, enforceAxis);\n keys = Object.keys(coords);\n if (keys.length === 2) {\n return out;\n }\n keys.forEach(function (key) {\n if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) {\n if (key === 'x' || key === 'y' || key === 'z') {\n return;\n }\n } else {\n if (key === 'x' || key === 'y') {\n return;\n }\n }\n out[key] = coords[key];\n });\n return out;\n }\n }\n\n function checkProj(item) {\n if (item instanceof Projection) {\n return item;\n }\n if (item.oProj) {\n return item.oProj;\n }\n return Projection(item);\n }\n\n function proj4$1(fromProj, toProj, coord) {\n fromProj = checkProj(fromProj);\n var single = false;\n var obj;\n if (typeof toProj === 'undefined') {\n toProj = fromProj;\n fromProj = wgs84;\n single = true;\n } else if (typeof toProj.x !== 'undefined' || Array.isArray(toProj)) {\n coord = toProj;\n toProj = fromProj;\n fromProj = wgs84;\n single = true;\n }\n toProj = checkProj(toProj);\n if (coord) {\n return transformer(fromProj, toProj, coord);\n } else {\n obj = {\n forward: function (coords, enforceAxis) {\n return transformer(fromProj, toProj, coords, enforceAxis);\n },\n inverse: function (coords, enforceAxis) {\n return transformer(toProj, fromProj, coords, enforceAxis);\n }\n };\n if (single) {\n obj.oProj = toProj;\n }\n return obj;\n }\n }\n\n /**\n * UTM zones are grouped, and assigned to one of a group of 6\n * sets.\n *\n * {int} @private\n */\n var NUM_100K_SETS = 6;\n\n /**\n * The column letters (for easting) of the lower left value, per\n * set.\n *\n * {string} @private\n */\n var SET_ORIGIN_COLUMN_LETTERS = 'AJSAJS';\n\n /**\n * The row letters (for northing) of the lower left value, per\n * set.\n *\n * {string} @private\n */\n var SET_ORIGIN_ROW_LETTERS = 'AFAFAF';\n\n var A = 65; // A\n var I = 73; // I\n var O = 79; // O\n var V = 86; // V\n var Z = 90; // Z\n var mgrs = {\n forward: forward$1,\n inverse: inverse$1,\n toPoint: toPoint$1\n };\n /**\n * Conversion of lat/lon to MGRS.\n *\n * @param {object} ll Object literal with lat and lon properties on a\n * WGS84 ellipsoid.\n * @param {int} accuracy Accuracy in digits (5 for 1 m, 4 for 10 m, 3 for\n * 100 m, 2 for 1000 m or 1 for 10000 m). Optional, default is 5.\n * @return {string} the MGRS string for the given location and accuracy.\n */\n function forward$1(ll, accuracy) {\n accuracy = accuracy || 5; // default accuracy 1m\n return encode(LLtoUTM({\n lat: ll[1],\n lon: ll[0]\n }), accuracy);\n }\n\n /**\n * Conversion of MGRS to lat/lon.\n *\n * @param {string} mgrs MGRS string.\n * @return {array} An array with left (longitude), bottom (latitude), right\n * (longitude) and top (latitude) values in WGS84, representing the\n * bounding box for the provided MGRS reference.\n */\n function inverse$1(mgrs) {\n var bbox = UTMtoLL(decode(mgrs.toUpperCase()));\n if (bbox.lat && bbox.lon) {\n return [bbox.lon, bbox.lat, bbox.lon, bbox.lat];\n }\n return [bbox.left, bbox.bottom, bbox.right, bbox.top];\n }\n\n function toPoint$1(mgrs) {\n var bbox = UTMtoLL(decode(mgrs.toUpperCase()));\n if (bbox.lat && bbox.lon) {\n return [bbox.lon, bbox.lat];\n }\n return [(bbox.left + bbox.right) / 2, (bbox.top + bbox.bottom) / 2];\n }\n /**\n * Conversion from degrees to radians.\n *\n * @private\n * @param {number} deg the angle in degrees.\n * @return {number} the angle in radians.\n */\n function degToRad(deg) {\n return (deg * (Math.PI / 180.0));\n }\n\n /**\n * Conversion from radians to degrees.\n *\n * @private\n * @param {number} rad the angle in radians.\n * @return {number} the angle in degrees.\n */\n function radToDeg(rad) {\n return (180.0 * (rad / Math.PI));\n }\n\n /**\n * Converts a set of Longitude and Latitude co-ordinates to UTM\n * using the WGS84 ellipsoid.\n *\n * @private\n * @param {object} ll Object literal with lat and lon properties\n * representing the WGS84 coordinate to be converted.\n * @return {object} Object literal containing the UTM value with easting,\n * northing, zoneNumber and zoneLetter properties, and an optional\n * accuracy property in digits. Returns null if the conversion failed.\n */\n function LLtoUTM(ll) {\n var Lat = ll.lat;\n var Long = ll.lon;\n var a = 6378137.0; //ellip.radius;\n var eccSquared = 0.00669438; //ellip.eccsq;\n var k0 = 0.9996;\n var LongOrigin;\n var eccPrimeSquared;\n var N, T, C, A, M;\n var LatRad = degToRad(Lat);\n var LongRad = degToRad(Long);\n var LongOriginRad;\n var ZoneNumber;\n // (int)\n ZoneNumber = Math.floor((Long + 180) / 6) + 1;\n\n //Make sure the longitude 180.00 is in Zone 60\n if (Long === 180) {\n ZoneNumber = 60;\n }\n\n // Special zone for Norway\n if (Lat >= 56.0 && Lat < 64.0 && Long >= 3.0 && Long < 12.0) {\n ZoneNumber = 32;\n }\n\n // Special zones for Svalbard\n if (Lat >= 72.0 && Lat < 84.0) {\n if (Long >= 0.0 && Long < 9.0) {\n ZoneNumber = 31;\n }\n else if (Long >= 9.0 && Long < 21.0) {\n ZoneNumber = 33;\n }\n else if (Long >= 21.0 && Long < 33.0) {\n ZoneNumber = 35;\n }\n else if (Long >= 33.0 && Long < 42.0) {\n ZoneNumber = 37;\n }\n }\n\n LongOrigin = (ZoneNumber - 1) * 6 - 180 + 3; //+3 puts origin\n // in middle of\n // zone\n LongOriginRad = degToRad(LongOrigin);\n\n eccPrimeSquared = (eccSquared) / (1 - eccSquared);\n\n N = a / Math.sqrt(1 - eccSquared * Math.sin(LatRad) * Math.sin(LatRad));\n T = Math.tan(LatRad) * Math.tan(LatRad);\n C = eccPrimeSquared * Math.cos(LatRad) * Math.cos(LatRad);\n A = Math.cos(LatRad) * (LongRad - LongOriginRad);\n\n M = a * ((1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256) * LatRad - (3 * eccSquared / 8 + 3 * eccSquared * eccSquared / 32 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(2 * LatRad) + (15 * eccSquared * eccSquared / 256 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(4 * LatRad) - (35 * eccSquared * eccSquared * eccSquared / 3072) * Math.sin(6 * LatRad));\n\n var UTMEasting = (k0 * N * (A + (1 - T + C) * A * A * A / 6.0 + (5 - 18 * T + T * T + 72 * C - 58 * eccPrimeSquared) * A * A * A * A * A / 120.0) + 500000.0);\n\n var UTMNorthing = (k0 * (M + N * Math.tan(LatRad) * (A * A / 2 + (5 - T + 9 * C + 4 * C * C) * A * A * A * A / 24.0 + (61 - 58 * T + T * T + 600 * C - 330 * eccPrimeSquared) * A * A * A * A * A * A / 720.0)));\n if (Lat < 0.0) {\n UTMNorthing += 10000000.0; //10000000 meter offset for\n // southern hemisphere\n }\n\n return {\n northing: Math.round(UTMNorthing),\n easting: Math.round(UTMEasting),\n zoneNumber: ZoneNumber,\n zoneLetter: getLetterDesignator(Lat)\n };\n }\n\n /**\n * Converts UTM coords to lat/long, using the WGS84 ellipsoid. This is a convenience\n * class where the Zone can be specified as a single string eg.\"60N\" which\n * is then broken down into the ZoneNumber and ZoneLetter.\n *\n * @private\n * @param {object} utm An object literal with northing, easting, zoneNumber\n * and zoneLetter properties. If an optional accuracy property is\n * provided (in meters), a bounding box will be returned instead of\n * latitude and longitude.\n * @return {object} An object literal containing either lat and lon values\n * (if no accuracy was provided), or top, right, bottom and left values\n * for the bounding box calculated according to the provided accuracy.\n * Returns null if the conversion failed.\n */\n function UTMtoLL(utm) {\n\n var UTMNorthing = utm.northing;\n var UTMEasting = utm.easting;\n var zoneLetter = utm.zoneLetter;\n var zoneNumber = utm.zoneNumber;\n // check the ZoneNummber is valid\n if (zoneNumber < 0 || zoneNumber > 60) {\n return null;\n }\n\n var k0 = 0.9996;\n var a = 6378137.0; //ellip.radius;\n var eccSquared = 0.00669438; //ellip.eccsq;\n var eccPrimeSquared;\n var e1 = (1 - Math.sqrt(1 - eccSquared)) / (1 + Math.sqrt(1 - eccSquared));\n var N1, T1, C1, R1, D, M;\n var LongOrigin;\n var mu, phi1Rad;\n\n // remove 500,000 meter offset for longitude\n var x = UTMEasting - 500000.0;\n var y = UTMNorthing;\n\n // We must know somehow if we are in the Northern or Southern\n // hemisphere, this is the only time we use the letter So even\n // if the Zone letter isn't exactly correct it should indicate\n // the hemisphere correctly\n if (zoneLetter < 'N') {\n y -= 10000000.0; // remove 10,000,000 meter offset used\n // for southern hemisphere\n }\n\n // There are 60 zones with zone 1 being at West -180 to -174\n LongOrigin = (zoneNumber - 1) * 6 - 180 + 3; // +3 puts origin\n // in middle of\n // zone\n\n eccPrimeSquared = (eccSquared) / (1 - eccSquared);\n\n M = y / k0;\n mu = M / (a * (1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256));\n\n phi1Rad = mu + (3 * e1 / 2 - 27 * e1 * e1 * e1 / 32) * Math.sin(2 * mu) + (21 * e1 * e1 / 16 - 55 * e1 * e1 * e1 * e1 / 32) * Math.sin(4 * mu) + (151 * e1 * e1 * e1 / 96) * Math.sin(6 * mu);\n // double phi1 = ProjMath.radToDeg(phi1Rad);\n\n N1 = a / Math.sqrt(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad));\n T1 = Math.tan(phi1Rad) * Math.tan(phi1Rad);\n C1 = eccPrimeSquared * Math.cos(phi1Rad) * Math.cos(phi1Rad);\n R1 = a * (1 - eccSquared) / Math.pow(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad), 1.5);\n D = x / (N1 * k0);\n\n var lat = phi1Rad - (N1 * Math.tan(phi1Rad) / R1) * (D * D / 2 - (5 + 3 * T1 + 10 * C1 - 4 * C1 * C1 - 9 * eccPrimeSquared) * D * D * D * D / 24 + (61 + 90 * T1 + 298 * C1 + 45 * T1 * T1 - 252 * eccPrimeSquared - 3 * C1 * C1) * D * D * D * D * D * D / 720);\n lat = radToDeg(lat);\n\n var lon = (D - (1 + 2 * T1 + C1) * D * D * D / 6 + (5 - 2 * C1 + 28 * T1 - 3 * C1 * C1 + 8 * eccPrimeSquared + 24 * T1 * T1) * D * D * D * D * D / 120) / Math.cos(phi1Rad);\n lon = LongOrigin + radToDeg(lon);\n\n var result;\n if (utm.accuracy) {\n var topRight = UTMtoLL({\n northing: utm.northing + utm.accuracy,\n easting: utm.easting + utm.accuracy,\n zoneLetter: utm.zoneLetter,\n zoneNumber: utm.zoneNumber\n });\n result = {\n top: topRight.lat,\n right: topRight.lon,\n bottom: lat,\n left: lon\n };\n }\n else {\n result = {\n lat: lat,\n lon: lon\n };\n }\n return result;\n }\n\n /**\n * Calculates the MGRS letter designator for the given latitude.\n *\n * @private\n * @param {number} lat The latitude in WGS84 to get the letter designator\n * for.\n * @return {char} The letter designator.\n */\n function getLetterDesignator(lat) {\n //This is here as an error flag to show that the Latitude is\n //outside MGRS limits\n var LetterDesignator = 'Z';\n\n if ((84 >= lat) && (lat >= 72)) {\n LetterDesignator = 'X';\n }\n else if ((72 > lat) && (lat >= 64)) {\n LetterDesignator = 'W';\n }\n else if ((64 > lat) && (lat >= 56)) {\n LetterDesignator = 'V';\n }\n else if ((56 > lat) && (lat >= 48)) {\n LetterDesignator = 'U';\n }\n else if ((48 > lat) && (lat >= 40)) {\n LetterDesignator = 'T';\n }\n else if ((40 > lat) && (lat >= 32)) {\n LetterDesignator = 'S';\n }\n else if ((32 > lat) && (lat >= 24)) {\n LetterDesignator = 'R';\n }\n else if ((24 > lat) && (lat >= 16)) {\n LetterDesignator = 'Q';\n }\n else if ((16 > lat) && (lat >= 8)) {\n LetterDesignator = 'P';\n }\n else if ((8 > lat) && (lat >= 0)) {\n LetterDesignator = 'N';\n }\n else if ((0 > lat) && (lat >= -8)) {\n LetterDesignator = 'M';\n }\n else if ((-8 > lat) && (lat >= -16)) {\n LetterDesignator = 'L';\n }\n else if ((-16 > lat) && (lat >= -24)) {\n LetterDesignator = 'K';\n }\n else if ((-24 > lat) && (lat >= -32)) {\n LetterDesignator = 'J';\n }\n else if ((-32 > lat) && (lat >= -40)) {\n LetterDesignator = 'H';\n }\n else if ((-40 > lat) && (lat >= -48)) {\n LetterDesignator = 'G';\n }\n else if ((-48 > lat) && (lat >= -56)) {\n LetterDesignator = 'F';\n }\n else if ((-56 > lat) && (lat >= -64)) {\n LetterDesignator = 'E';\n }\n else if ((-64 > lat) && (lat >= -72)) {\n LetterDesignator = 'D';\n }\n else if ((-72 > lat) && (lat >= -80)) {\n LetterDesignator = 'C';\n }\n return LetterDesignator;\n }\n\n /**\n * Encodes a UTM location as MGRS string.\n *\n * @private\n * @param {object} utm An object literal with easting, northing,\n * zoneLetter, zoneNumber\n * @param {number} accuracy Accuracy in digits (1-5).\n * @return {string} MGRS string for the given UTM location.\n */\n function encode(utm, accuracy) {\n // prepend with leading zeroes\n var seasting = \"00000\" + utm.easting,\n snorthing = \"00000\" + utm.northing;\n\n return utm.zoneNumber + utm.zoneLetter + get100kID(utm.easting, utm.northing, utm.zoneNumber) + seasting.substr(seasting.length - 5, accuracy) + snorthing.substr(snorthing.length - 5, accuracy);\n }\n\n /**\n * Get the two letter 100k designator for a given UTM easting,\n * northing and zone number value.\n *\n * @private\n * @param {number} easting\n * @param {number} northing\n * @param {number} zoneNumber\n * @return the two letter 100k designator for the given UTM location.\n */\n function get100kID(easting, northing, zoneNumber) {\n var setParm = get100kSetForZone(zoneNumber);\n var setColumn = Math.floor(easting / 100000);\n var setRow = Math.floor(northing / 100000) % 20;\n return getLetter100kID(setColumn, setRow, setParm);\n }\n\n /**\n * Given a UTM zone number, figure out the MGRS 100K set it is in.\n *\n * @private\n * @param {number} i An UTM zone number.\n * @return {number} the 100k set the UTM zone is in.\n */\n function get100kSetForZone(i) {\n var setParm = i % NUM_100K_SETS;\n if (setParm === 0) {\n setParm = NUM_100K_SETS;\n }\n\n return setParm;\n }\n\n /**\n * Get the two-letter MGRS 100k designator given information\n * translated from the UTM northing, easting and zone number.\n *\n * @private\n * @param {number} column the column index as it relates to the MGRS\n * 100k set spreadsheet, created from the UTM easting.\n * Values are 1-8.\n * @param {number} row the row index as it relates to the MGRS 100k set\n * spreadsheet, created from the UTM northing value. Values\n * are from 0-19.\n * @param {number} parm the set block, as it relates to the MGRS 100k set\n * spreadsheet, created from the UTM zone. Values are from\n * 1-60.\n * @return two letter MGRS 100k code.\n */\n function getLetter100kID(column, row, parm) {\n // colOrigin and rowOrigin are the letters at the origin of the set\n var index = parm - 1;\n var colOrigin = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(index);\n var rowOrigin = SET_ORIGIN_ROW_LETTERS.charCodeAt(index);\n\n // colInt and rowInt are the letters to build to return\n var colInt = colOrigin + column - 1;\n var rowInt = rowOrigin + row;\n var rollover = false;\n\n if (colInt > Z) {\n colInt = colInt - Z + A - 1;\n rollover = true;\n }\n\n if (colInt === I || (colOrigin < I && colInt > I) || ((colInt > I || colOrigin < I) && rollover)) {\n colInt++;\n }\n\n if (colInt === O || (colOrigin < O && colInt > O) || ((colInt > O || colOrigin < O) && rollover)) {\n colInt++;\n\n if (colInt === I) {\n colInt++;\n }\n }\n\n if (colInt > Z) {\n colInt = colInt - Z + A - 1;\n }\n\n if (rowInt > V) {\n rowInt = rowInt - V + A - 1;\n rollover = true;\n }\n else {\n rollover = false;\n }\n\n if (((rowInt === I) || ((rowOrigin < I) && (rowInt > I))) || (((rowInt > I) || (rowOrigin < I)) && rollover)) {\n rowInt++;\n }\n\n if (((rowInt === O) || ((rowOrigin < O) && (rowInt > O))) || (((rowInt > O) || (rowOrigin < O)) && rollover)) {\n rowInt++;\n\n if (rowInt === I) {\n rowInt++;\n }\n }\n\n if (rowInt > V) {\n rowInt = rowInt - V + A - 1;\n }\n\n var twoLetter = String.fromCharCode(colInt) + String.fromCharCode(rowInt);\n return twoLetter;\n }\n\n /**\n * Decode the UTM parameters from a MGRS string.\n *\n * @private\n * @param {string} mgrsString an UPPERCASE coordinate string is expected.\n * @return {object} An object literal with easting, northing, zoneLetter,\n * zoneNumber and accuracy (in meters) properties.\n */\n function decode(mgrsString) {\n\n if (mgrsString && mgrsString.length === 0) {\n throw (\"MGRSPoint coverting from nothing\");\n }\n\n var length = mgrsString.length;\n\n var hunK = null;\n var sb = \"\";\n var testChar;\n var i = 0;\n\n // get Zone number\n while (!(/[A-Z]/).test(testChar = mgrsString.charAt(i))) {\n if (i >= 2) {\n throw (\"MGRSPoint bad conversion from: \" + mgrsString);\n }\n sb += testChar;\n i++;\n }\n\n var zoneNumber = parseInt(sb, 10);\n\n if (i === 0 || i + 3 > length) {\n // A good MGRS string has to be 4-5 digits long,\n // ##AAA/#AAA at least.\n throw (\"MGRSPoint bad conversion from: \" + mgrsString);\n }\n\n var zoneLetter = mgrsString.charAt(i++);\n\n // Should we check the zone letter here? Why not.\n if (zoneLetter <= 'A' || zoneLetter === 'B' || zoneLetter === 'Y' || zoneLetter >= 'Z' || zoneLetter === 'I' || zoneLetter === 'O') {\n throw (\"MGRSPoint zone letter \" + zoneLetter + \" not handled: \" + mgrsString);\n }\n\n hunK = mgrsString.substring(i, i += 2);\n\n var set = get100kSetForZone(zoneNumber);\n\n var east100k = getEastingFromChar(hunK.charAt(0), set);\n var north100k = getNorthingFromChar(hunK.charAt(1), set);\n\n // We have a bug where the northing may be 2000000 too low.\n // How\n // do we know when to roll over?\n\n while (north100k < getMinNorthing(zoneLetter)) {\n north100k += 2000000;\n }\n\n // calculate the char index for easting/northing separator\n var remainder = length - i;\n\n if (remainder % 2 !== 0) {\n throw (\"MGRSPoint has to have an even number \\nof digits after the zone letter and two 100km letters - front \\nhalf for easting meters, second half for \\nnorthing meters\" + mgrsString);\n }\n\n var sep = remainder / 2;\n\n var sepEasting = 0.0;\n var sepNorthing = 0.0;\n var accuracyBonus, sepEastingString, sepNorthingString, easting, northing;\n if (sep > 0) {\n accuracyBonus = 100000.0 / Math.pow(10, sep);\n sepEastingString = mgrsString.substring(i, i + sep);\n sepEasting = parseFloat(sepEastingString) * accuracyBonus;\n sepNorthingString = mgrsString.substring(i + sep);\n sepNorthing = parseFloat(sepNorthingString) * accuracyBonus;\n }\n\n easting = sepEasting + east100k;\n northing = sepNorthing + north100k;\n\n return {\n easting: easting,\n northing: northing,\n zoneLetter: zoneLetter,\n zoneNumber: zoneNumber,\n accuracy: accuracyBonus\n };\n }\n\n /**\n * Given the first letter from a two-letter MGRS 100k zone, and given the\n * MGRS table set for the zone number, figure out the easting value that\n * should be added to the other, secondary easting value.\n *\n * @private\n * @param {char} e The first letter from a two-letter MGRS 100´k zone.\n * @param {number} set The MGRS table set for the zone number.\n * @return {number} The easting value for the given letter and set.\n */\n function getEastingFromChar(e, set) {\n // colOrigin is the letter at the origin of the set for the\n // column\n var curCol = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(set - 1);\n var eastingValue = 100000.0;\n var rewindMarker = false;\n\n while (curCol !== e.charCodeAt(0)) {\n curCol++;\n if (curCol === I) {\n curCol++;\n }\n if (curCol === O) {\n curCol++;\n }\n if (curCol > Z) {\n if (rewindMarker) {\n throw (\"Bad character: \" + e);\n }\n curCol = A;\n rewindMarker = true;\n }\n eastingValue += 100000.0;\n }\n\n return eastingValue;\n }\n\n /**\n * Given the second letter from a two-letter MGRS 100k zone, and given the\n * MGRS table set for the zone number, figure out the northing value that\n * should be added to the other, secondary northing value. You have to\n * remember that Northings are determined from the equator, and the vertical\n * cycle of letters mean a 2000000 additional northing meters. This happens\n * approx. every 18 degrees of latitude. This method does *NOT* count any\n * additional northings. You have to figure out how many 2000000 meters need\n * to be added for the zone letter of the MGRS coordinate.\n *\n * @private\n * @param {char} n Second letter of the MGRS 100k zone\n * @param {number} set The MGRS table set number, which is dependent on the\n * UTM zone number.\n * @return {number} The northing value for the given letter and set.\n */\n function getNorthingFromChar(n, set) {\n\n if (n > 'V') {\n throw (\"MGRSPoint given invalid Northing \" + n);\n }\n\n // rowOrigin is the letter at the origin of the set for the\n // column\n var curRow = SET_ORIGIN_ROW_LETTERS.charCodeAt(set - 1);\n var northingValue = 0.0;\n var rewindMarker = false;\n\n while (curRow !== n.charCodeAt(0)) {\n curRow++;\n if (curRow === I) {\n curRow++;\n }\n if (curRow === O) {\n curRow++;\n }\n // fixing a bug making whole application hang in this loop\n // when 'n' is a wrong character\n if (curRow > V) {\n if (rewindMarker) { // making sure that this loop ends\n throw (\"Bad character: \" + n);\n }\n curRow = A;\n rewindMarker = true;\n }\n northingValue += 100000.0;\n }\n\n return northingValue;\n }\n\n /**\n * The function getMinNorthing returns the minimum northing value of a MGRS\n * zone.\n *\n * Ported from Geotrans' c Lattitude_Band_Value structure table.\n *\n * @private\n * @param {char} zoneLetter The MGRS zone to get the min northing for.\n * @return {number}\n */\n function getMinNorthing(zoneLetter) {\n var northing;\n switch (zoneLetter) {\n case 'C':\n northing = 1100000.0;\n break;\n case 'D':\n northing = 2000000.0;\n break;\n case 'E':\n northing = 2800000.0;\n break;\n case 'F':\n northing = 3700000.0;\n break;\n case 'G':\n northing = 4600000.0;\n break;\n case 'H':\n northing = 5500000.0;\n break;\n case 'J':\n northing = 6400000.0;\n break;\n case 'K':\n northing = 7300000.0;\n break;\n case 'L':\n northing = 8200000.0;\n break;\n case 'M':\n northing = 9100000.0;\n break;\n case 'N':\n northing = 0.0;\n break;\n case 'P':\n northing = 800000.0;\n break;\n case 'Q':\n northing = 1700000.0;\n break;\n case 'R':\n northing = 2600000.0;\n break;\n case 'S':\n northing = 3500000.0;\n break;\n case 'T':\n northing = 4400000.0;\n break;\n case 'U':\n northing = 5300000.0;\n break;\n case 'V':\n northing = 6200000.0;\n break;\n case 'W':\n northing = 7000000.0;\n break;\n case 'X':\n northing = 7900000.0;\n break;\n default:\n northing = -1.0;\n }\n if (northing >= 0.0) {\n return northing;\n }\n else {\n throw (\"Invalid zone letter: \" + zoneLetter);\n }\n\n }\n\n function Point(x, y, z) {\n if (!(this instanceof Point)) {\n return new Point(x, y, z);\n }\n if (Array.isArray(x)) {\n this.x = x[0];\n this.y = x[1];\n this.z = x[2] || 0.0;\n } else if(typeof x === 'object') {\n this.x = x.x;\n this.y = x.y;\n this.z = x.z || 0.0;\n } else if (typeof x === 'string' && typeof y === 'undefined') {\n var coords = x.split(',');\n this.x = parseFloat(coords[0], 10);\n this.y = parseFloat(coords[1], 10);\n this.z = parseFloat(coords[2], 10) || 0.0;\n } else {\n this.x = x;\n this.y = y;\n this.z = z || 0.0;\n }\n console.warn('proj4.Point will be removed in version 3, use proj4.toPoint');\n }\n\n Point.fromMGRS = function(mgrsStr) {\n return new Point(toPoint$1(mgrsStr));\n };\n Point.prototype.toMGRS = function(accuracy) {\n return forward$1([this.x, this.y], accuracy);\n };\n\n var C00 = 1;\n var C02 = 0.25;\n var C04 = 0.046875;\n var C06 = 0.01953125;\n var C08 = 0.01068115234375;\n var C22 = 0.75;\n var C44 = 0.46875;\n var C46 = 0.01302083333333333333;\n var C48 = 0.00712076822916666666;\n var C66 = 0.36458333333333333333;\n var C68 = 0.00569661458333333333;\n var C88 = 0.3076171875;\n\n var pj_enfn = function(es) {\n var en = [];\n en[0] = C00 - es * (C02 + es * (C04 + es * (C06 + es * C08)));\n en[1] = es * (C22 - es * (C04 + es * (C06 + es * C08)));\n var t = es * es;\n en[2] = t * (C44 - es * (C46 + es * C48));\n t *= es;\n en[3] = t * (C66 - es * C68);\n en[4] = t * es * C88;\n return en;\n };\n\n var pj_mlfn = function(phi, sphi, cphi, en) {\n cphi *= sphi;\n sphi *= sphi;\n return (en[0] * phi - cphi * (en[1] + sphi * (en[2] + sphi * (en[3] + sphi * en[4]))));\n };\n\n var MAX_ITER = 20;\n\n var pj_inv_mlfn = function(arg, es, en) {\n var k = 1 / (1 - es);\n var phi = arg;\n for (var i = MAX_ITER; i; --i) { /* rarely goes over 2 iterations */\n var s = Math.sin(phi);\n var t = 1 - es * s * s;\n //t = this.pj_mlfn(phi, s, Math.cos(phi), en) - arg;\n //phi -= t * (t * Math.sqrt(t)) * k;\n t = (pj_mlfn(phi, s, Math.cos(phi), en) - arg) * (t * Math.sqrt(t)) * k;\n phi -= t;\n if (Math.abs(t) < EPSLN) {\n return phi;\n }\n }\n //..reportError(\"cass:pj_inv_mlfn: Convergence error\");\n return phi;\n };\n\n // Heavily based on this tmerc projection implementation\n // https://github.com/mbloch/mapshaper-proj/blob/master/src/projections/tmerc.js\n\n function init$2() {\n this.x0 = this.x0 !== undefined ? this.x0 : 0;\n this.y0 = this.y0 !== undefined ? this.y0 : 0;\n this.long0 = this.long0 !== undefined ? this.long0 : 0;\n this.lat0 = this.lat0 !== undefined ? this.lat0 : 0;\n\n if (this.es) {\n this.en = pj_enfn(this.es);\n this.ml0 = pj_mlfn(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en);\n }\n }\n\n /**\n Transverse Mercator Forward - long/lat to x/y\n long/lat in radians\n */\n function forward$2(p) {\n var lon = p.x;\n var lat = p.y;\n\n var delta_lon = adjust_lon(lon - this.long0);\n var con;\n var x, y;\n var sin_phi = Math.sin(lat);\n var cos_phi = Math.cos(lat);\n\n if (!this.es) {\n var b = cos_phi * Math.sin(delta_lon);\n\n if ((Math.abs(Math.abs(b) - 1)) < EPSLN) {\n return (93);\n }\n else {\n x = 0.5 * this.a * this.k0 * Math.log((1 + b) / (1 - b)) + this.x0;\n y = cos_phi * Math.cos(delta_lon) / Math.sqrt(1 - Math.pow(b, 2));\n b = Math.abs(y);\n\n if (b >= 1) {\n if ((b - 1) > EPSLN) {\n return (93);\n }\n else {\n y = 0;\n }\n }\n else {\n y = Math.acos(y);\n }\n\n if (lat < 0) {\n y = -y;\n }\n\n y = this.a * this.k0 * (y - this.lat0) + this.y0;\n }\n }\n else {\n var al = cos_phi * delta_lon;\n var als = Math.pow(al, 2);\n var c = this.ep2 * Math.pow(cos_phi, 2);\n var cs = Math.pow(c, 2);\n var tq = Math.abs(cos_phi) > EPSLN ? Math.tan(lat) : 0;\n var t = Math.pow(tq, 2);\n var ts = Math.pow(t, 2);\n con = 1 - this.es * Math.pow(sin_phi, 2);\n al = al / Math.sqrt(con);\n var ml = pj_mlfn(lat, sin_phi, cos_phi, this.en);\n\n x = this.a * (this.k0 * al * (1 +\n als / 6 * (1 - t + c +\n als / 20 * (5 - 18 * t + ts + 14 * c - 58 * t * c +\n als / 42 * (61 + 179 * ts - ts * t - 479 * t))))) +\n this.x0;\n\n y = this.a * (this.k0 * (ml - this.ml0 +\n sin_phi * delta_lon * al / 2 * (1 +\n als / 12 * (5 - t + 9 * c + 4 * cs +\n als / 30 * (61 + ts - 58 * t + 270 * c - 330 * t * c +\n als / 56 * (1385 + 543 * ts - ts * t - 3111 * t)))))) +\n this.y0;\n }\n\n p.x = x;\n p.y = y;\n\n return p;\n }\n\n /**\n Transverse Mercator Inverse - x/y to long/lat\n */\n function inverse$2(p) {\n var con, phi;\n var lat, lon;\n var x = (p.x - this.x0) * (1 / this.a);\n var y = (p.y - this.y0) * (1 / this.a);\n\n if (!this.es) {\n var f = Math.exp(x / this.k0);\n var g = 0.5 * (f - 1 / f);\n var temp = this.lat0 + y / this.k0;\n var h = Math.cos(temp);\n con = Math.sqrt((1 - Math.pow(h, 2)) / (1 + Math.pow(g, 2)));\n lat = Math.asin(con);\n\n if (y < 0) {\n lat = -lat;\n }\n\n if ((g === 0) && (h === 0)) {\n lon = 0;\n }\n else {\n lon = adjust_lon(Math.atan2(g, h) + this.long0);\n }\n }\n else { // ellipsoidal form\n con = this.ml0 + y / this.k0;\n phi = pj_inv_mlfn(con, this.es, this.en);\n\n if (Math.abs(phi) < HALF_PI) {\n var sin_phi = Math.sin(phi);\n var cos_phi = Math.cos(phi);\n var tan_phi = Math.abs(cos_phi) > EPSLN ? Math.tan(phi) : 0;\n var c = this.ep2 * Math.pow(cos_phi, 2);\n var cs = Math.pow(c, 2);\n var t = Math.pow(tan_phi, 2);\n var ts = Math.pow(t, 2);\n con = 1 - this.es * Math.pow(sin_phi, 2);\n var d = x * Math.sqrt(con) / this.k0;\n var ds = Math.pow(d, 2);\n con = con * tan_phi;\n\n lat = phi - (con * ds / (1 - this.es)) * 0.5 * (1 -\n ds / 12 * (5 + 3 * t - 9 * c * t + c - 4 * cs -\n ds / 30 * (61 + 90 * t - 252 * c * t + 45 * ts + 46 * c -\n ds / 56 * (1385 + 3633 * t + 4095 * ts + 1574 * ts * t))));\n\n lon = adjust_lon(this.long0 + (d * (1 -\n ds / 6 * (1 + 2 * t + c -\n ds / 20 * (5 + 28 * t + 24 * ts + 8 * c * t + 6 * c -\n ds / 42 * (61 + 662 * t + 1320 * ts + 720 * ts * t)))) / cos_phi));\n }\n else {\n lat = HALF_PI * sign(y);\n lon = 0;\n }\n }\n\n p.x = lon;\n p.y = lat;\n\n return p;\n }\n\n var names$3 = [\"Fast_Transverse_Mercator\", \"Fast Transverse Mercator\"];\n var tmerc = {\n init: init$2,\n forward: forward$2,\n inverse: inverse$2,\n names: names$3\n };\n\n var sinh = function(x) {\n var r = Math.exp(x);\n r = (r - 1 / r) / 2;\n return r;\n };\n\n var hypot = function(x, y) {\n x = Math.abs(x);\n y = Math.abs(y);\n var a = Math.max(x, y);\n var b = Math.min(x, y) / (a ? a : 1);\n\n return a * Math.sqrt(1 + Math.pow(b, 2));\n };\n\n var log1py = function(x) {\n var y = 1 + x;\n var z = y - 1;\n\n return z === 0 ? x : x * Math.log(y) / z;\n };\n\n var asinhy = function(x) {\n var y = Math.abs(x);\n y = log1py(y * (1 + y / (hypot(1, y) + 1)));\n\n return x < 0 ? -y : y;\n };\n\n var gatg = function(pp, B) {\n var cos_2B = 2 * Math.cos(2 * B);\n var i = pp.length - 1;\n var h1 = pp[i];\n var h2 = 0;\n var h;\n\n while (--i >= 0) {\n h = -h2 + cos_2B * h1 + pp[i];\n h2 = h1;\n h1 = h;\n }\n\n return (B + h * Math.sin(2 * B));\n };\n\n var clens = function(pp, arg_r) {\n var r = 2 * Math.cos(arg_r);\n var i = pp.length - 1;\n var hr1 = pp[i];\n var hr2 = 0;\n var hr;\n\n while (--i >= 0) {\n hr = -hr2 + r * hr1 + pp[i];\n hr2 = hr1;\n hr1 = hr;\n }\n\n return Math.sin(arg_r) * hr;\n };\n\n var cosh = function(x) {\n var r = Math.exp(x);\n r = (r + 1 / r) / 2;\n return r;\n };\n\n var clens_cmplx = function(pp, arg_r, arg_i) {\n var sin_arg_r = Math.sin(arg_r);\n var cos_arg_r = Math.cos(arg_r);\n var sinh_arg_i = sinh(arg_i);\n var cosh_arg_i = cosh(arg_i);\n var r = 2 * cos_arg_r * cosh_arg_i;\n var i = -2 * sin_arg_r * sinh_arg_i;\n var j = pp.length - 1;\n var hr = pp[j];\n var hi1 = 0;\n var hr1 = 0;\n var hi = 0;\n var hr2;\n var hi2;\n\n while (--j >= 0) {\n hr2 = hr1;\n hi2 = hi1;\n hr1 = hr;\n hi1 = hi;\n hr = -hr2 + r * hr1 - i * hi1 + pp[j];\n hi = -hi2 + i * hr1 + r * hi1;\n }\n\n r = sin_arg_r * cosh_arg_i;\n i = cos_arg_r * sinh_arg_i;\n\n return [r * hr - i * hi, r * hi + i * hr];\n };\n\n // Heavily based on this etmerc projection implementation\n // https://github.com/mbloch/mapshaper-proj/blob/master/src/projections/etmerc.js\n\n function init$3() {\n if (!this.approx && (isNaN(this.es) || this.es <= 0)) {\n throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION[\"Fast_Transverse_Mercator\"] in the WKT.');\n }\n if (this.approx) {\n // When '+approx' is set, use tmerc instead\n tmerc.init.apply(this);\n this.forward = tmerc.forward;\n this.inverse = tmerc.inverse;\n }\n\n this.x0 = this.x0 !== undefined ? this.x0 : 0;\n this.y0 = this.y0 !== undefined ? this.y0 : 0;\n this.long0 = this.long0 !== undefined ? this.long0 : 0;\n this.lat0 = this.lat0 !== undefined ? this.lat0 : 0;\n\n this.cgb = [];\n this.cbg = [];\n this.utg = [];\n this.gtu = [];\n\n var f = this.es / (1 + Math.sqrt(1 - this.es));\n var n = f / (2 - f);\n var np = n;\n\n this.cgb[0] = n * (2 + n * (-2 / 3 + n * (-2 + n * (116 / 45 + n * (26 / 45 + n * (-2854 / 675 ))))));\n this.cbg[0] = n * (-2 + n * ( 2 / 3 + n * ( 4 / 3 + n * (-82 / 45 + n * (32 / 45 + n * (4642 / 4725))))));\n\n np = np * n;\n this.cgb[1] = np * (7 / 3 + n * (-8 / 5 + n * (-227 / 45 + n * (2704 / 315 + n * (2323 / 945)))));\n this.cbg[1] = np * (5 / 3 + n * (-16 / 15 + n * ( -13 / 9 + n * (904 / 315 + n * (-1522 / 945)))));\n\n np = np * n;\n this.cgb[2] = np * (56 / 15 + n * (-136 / 35 + n * (-1262 / 105 + n * (73814 / 2835))));\n this.cbg[2] = np * (-26 / 15 + n * (34 / 21 + n * (8 / 5 + n * (-12686 / 2835))));\n\n np = np * n;\n this.cgb[3] = np * (4279 / 630 + n * (-332 / 35 + n * (-399572 / 14175)));\n this.cbg[3] = np * (1237 / 630 + n * (-12 / 5 + n * ( -24832 / 14175)));\n\n np = np * n;\n this.cgb[4] = np * (4174 / 315 + n * (-144838 / 6237));\n this.cbg[4] = np * (-734 / 315 + n * (109598 / 31185));\n\n np = np * n;\n this.cgb[5] = np * (601676 / 22275);\n this.cbg[5] = np * (444337 / 155925);\n\n np = Math.pow(n, 2);\n this.Qn = this.k0 / (1 + n) * (1 + np * (1 / 4 + np * (1 / 64 + np / 256)));\n\n this.utg[0] = n * (-0.5 + n * ( 2 / 3 + n * (-37 / 96 + n * ( 1 / 360 + n * (81 / 512 + n * (-96199 / 604800))))));\n this.gtu[0] = n * (0.5 + n * (-2 / 3 + n * (5 / 16 + n * (41 / 180 + n * (-127 / 288 + n * (7891 / 37800))))));\n\n this.utg[1] = np * (-1 / 48 + n * (-1 / 15 + n * (437 / 1440 + n * (-46 / 105 + n * (1118711 / 3870720)))));\n this.gtu[1] = np * (13 / 48 + n * (-3 / 5 + n * (557 / 1440 + n * (281 / 630 + n * (-1983433 / 1935360)))));\n\n np = np * n;\n this.utg[2] = np * (-17 / 480 + n * (37 / 840 + n * (209 / 4480 + n * (-5569 / 90720 ))));\n this.gtu[2] = np * (61 / 240 + n * (-103 / 140 + n * (15061 / 26880 + n * (167603 / 181440))));\n\n np = np * n;\n this.utg[3] = np * (-4397 / 161280 + n * (11 / 504 + n * (830251 / 7257600)));\n this.gtu[3] = np * (49561 / 161280 + n * (-179 / 168 + n * (6601661 / 7257600)));\n\n np = np * n;\n this.utg[4] = np * (-4583 / 161280 + n * (108847 / 3991680));\n this.gtu[4] = np * (34729 / 80640 + n * (-3418889 / 1995840));\n\n np = np * n;\n this.utg[5] = np * (-20648693 / 638668800);\n this.gtu[5] = np * (212378941 / 319334400);\n\n var Z = gatg(this.cbg, this.lat0);\n this.Zb = -this.Qn * (Z + clens(this.gtu, 2 * Z));\n }\n\n function forward$3(p) {\n var Ce = adjust_lon(p.x - this.long0);\n var Cn = p.y;\n\n Cn = gatg(this.cbg, Cn);\n var sin_Cn = Math.sin(Cn);\n var cos_Cn = Math.cos(Cn);\n var sin_Ce = Math.sin(Ce);\n var cos_Ce = Math.cos(Ce);\n\n Cn = Math.atan2(sin_Cn, cos_Ce * cos_Cn);\n Ce = Math.atan2(sin_Ce * cos_Cn, hypot(sin_Cn, cos_Cn * cos_Ce));\n Ce = asinhy(Math.tan(Ce));\n\n var tmp = clens_cmplx(this.gtu, 2 * Cn, 2 * Ce);\n\n Cn = Cn + tmp[0];\n Ce = Ce + tmp[1];\n\n var x;\n var y;\n\n if (Math.abs(Ce) <= 2.623395162778) {\n x = this.a * (this.Qn * Ce) + this.x0;\n y = this.a * (this.Qn * Cn + this.Zb) + this.y0;\n }\n else {\n x = Infinity;\n y = Infinity;\n }\n\n p.x = x;\n p.y = y;\n\n return p;\n }\n\n function inverse$3(p) {\n var Ce = (p.x - this.x0) * (1 / this.a);\n var Cn = (p.y - this.y0) * (1 / this.a);\n\n Cn = (Cn - this.Zb) / this.Qn;\n Ce = Ce / this.Qn;\n\n var lon;\n var lat;\n\n if (Math.abs(Ce) <= 2.623395162778) {\n var tmp = clens_cmplx(this.utg, 2 * Cn, 2 * Ce);\n\n Cn = Cn + tmp[0];\n Ce = Ce + tmp[1];\n Ce = Math.atan(sinh(Ce));\n\n var sin_Cn = Math.sin(Cn);\n var cos_Cn = Math.cos(Cn);\n var sin_Ce = Math.sin(Ce);\n var cos_Ce = Math.cos(Ce);\n\n Cn = Math.atan2(sin_Cn * cos_Ce, hypot(sin_Ce, cos_Ce * cos_Cn));\n Ce = Math.atan2(sin_Ce, cos_Ce * cos_Cn);\n\n lon = adjust_lon(Ce + this.long0);\n lat = gatg(this.cgb, Cn);\n }\n else {\n lon = Infinity;\n lat = Infinity;\n }\n\n p.x = lon;\n p.y = lat;\n\n return p;\n }\n\n var names$4 = [\"Extended_Transverse_Mercator\", \"Extended Transverse Mercator\", \"etmerc\", \"Transverse_Mercator\", \"Transverse Mercator\", \"tmerc\"];\n var etmerc = {\n init: init$3,\n forward: forward$3,\n inverse: inverse$3,\n names: names$4\n };\n\n var adjust_zone = function(zone, lon) {\n if (zone === undefined) {\n zone = Math.floor((adjust_lon(lon) + Math.PI) * 30 / Math.PI) + 1;\n\n if (zone < 0) {\n return 0;\n } else if (zone > 60) {\n return 60;\n }\n }\n return zone;\n };\n\n var dependsOn = 'etmerc';\n function init$4() {\n var zone = adjust_zone(this.zone, this.long0);\n if (zone === undefined) {\n throw new Error('unknown utm zone');\n }\n this.lat0 = 0;\n this.long0 = ((6 * Math.abs(zone)) - 183) * D2R;\n this.x0 = 500000;\n this.y0 = this.utmSouth ? 10000000 : 0;\n this.k0 = 0.9996;\n\n etmerc.init.apply(this);\n this.forward = etmerc.forward;\n this.inverse = etmerc.inverse;\n }\n\n var names$5 = [\"Universal Transverse Mercator System\", \"utm\"];\n var utm = {\n init: init$4,\n names: names$5,\n dependsOn: dependsOn\n };\n\n var srat = function(esinp, exp) {\n return (Math.pow((1 - esinp) / (1 + esinp), exp));\n };\n\n var MAX_ITER$1 = 20;\n function init$6() {\n var sphi = Math.sin(this.lat0);\n var cphi = Math.cos(this.lat0);\n cphi *= cphi;\n this.rc = Math.sqrt(1 - this.es) / (1 - this.es * sphi * sphi);\n this.C = Math.sqrt(1 + this.es * cphi * cphi / (1 - this.es));\n this.phic0 = Math.asin(sphi / this.C);\n this.ratexp = 0.5 * this.C * this.e;\n this.K = Math.tan(0.5 * this.phic0 + FORTPI) / (Math.pow(Math.tan(0.5 * this.lat0 + FORTPI), this.C) * srat(this.e * sphi, this.ratexp));\n }\n\n function forward$5(p) {\n var lon = p.x;\n var lat = p.y;\n\n p.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * lat + FORTPI), this.C) * srat(this.e * Math.sin(lat), this.ratexp)) - HALF_PI;\n p.x = this.C * lon;\n return p;\n }\n\n function inverse$5(p) {\n var DEL_TOL = 1e-14;\n var lon = p.x / this.C;\n var lat = p.y;\n var num = Math.pow(Math.tan(0.5 * lat + FORTPI) / this.K, 1 / this.C);\n for (var i = MAX_ITER$1; i > 0; --i) {\n lat = 2 * Math.atan(num * srat(this.e * Math.sin(p.y), - 0.5 * this.e)) - HALF_PI;\n if (Math.abs(lat - p.y) < DEL_TOL) {\n break;\n }\n p.y = lat;\n }\n /* convergence failed */\n if (!i) {\n return null;\n }\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n var names$7 = [\"gauss\"];\n var gauss = {\n init: init$6,\n forward: forward$5,\n inverse: inverse$5,\n names: names$7\n };\n\n function init$5() {\n gauss.init.apply(this);\n if (!this.rc) {\n return;\n }\n this.sinc0 = Math.sin(this.phic0);\n this.cosc0 = Math.cos(this.phic0);\n this.R2 = 2 * this.rc;\n if (!this.title) {\n this.title = \"Oblique Stereographic Alternative\";\n }\n }\n\n function forward$4(p) {\n var sinc, cosc, cosl, k;\n p.x = adjust_lon(p.x - this.long0);\n gauss.forward.apply(this, [p]);\n sinc = Math.sin(p.y);\n cosc = Math.cos(p.y);\n cosl = Math.cos(p.x);\n k = this.k0 * this.R2 / (1 + this.sinc0 * sinc + this.cosc0 * cosc * cosl);\n p.x = k * cosc * Math.sin(p.x);\n p.y = k * (this.cosc0 * sinc - this.sinc0 * cosc * cosl);\n p.x = this.a * p.x + this.x0;\n p.y = this.a * p.y + this.y0;\n return p;\n }\n\n function inverse$4(p) {\n var sinc, cosc, lon, lat, rho;\n p.x = (p.x - this.x0) / this.a;\n p.y = (p.y - this.y0) / this.a;\n\n p.x /= this.k0;\n p.y /= this.k0;\n if ((rho = Math.sqrt(p.x * p.x + p.y * p.y))) {\n var c = 2 * Math.atan2(rho, this.R2);\n sinc = Math.sin(c);\n cosc = Math.cos(c);\n lat = Math.asin(cosc * this.sinc0 + p.y * sinc * this.cosc0 / rho);\n lon = Math.atan2(p.x * sinc, rho * this.cosc0 * cosc - p.y * this.sinc0 * sinc);\n }\n else {\n lat = this.phic0;\n lon = 0;\n }\n\n p.x = lon;\n p.y = lat;\n gauss.inverse.apply(this, [p]);\n p.x = adjust_lon(p.x + this.long0);\n return p;\n }\n\n var names$6 = [\"Stereographic_North_Pole\", \"Oblique_Stereographic\", \"Polar_Stereographic\", \"sterea\",\"Oblique Stereographic Alternative\",\"Double_Stereographic\"];\n var sterea = {\n init: init$5,\n forward: forward$4,\n inverse: inverse$4,\n names: names$6\n };\n\n function ssfn_(phit, sinphi, eccen) {\n sinphi *= eccen;\n return (Math.tan(0.5 * (HALF_PI + phit)) * Math.pow((1 - sinphi) / (1 + sinphi), 0.5 * eccen));\n }\n\n function init$7() {\n this.coslat0 = Math.cos(this.lat0);\n this.sinlat0 = Math.sin(this.lat0);\n if (this.sphere) {\n if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) {\n this.k0 = 0.5 * (1 + sign(this.lat0) * Math.sin(this.lat_ts));\n }\n }\n else {\n if (Math.abs(this.coslat0) <= EPSLN) {\n if (this.lat0 > 0) {\n //North pole\n //trace('stere:north pole');\n this.con = 1;\n }\n else {\n //South pole\n //trace('stere:south pole');\n this.con = -1;\n }\n }\n this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e));\n if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) {\n this.k0 = 0.5 * this.cons * msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / tsfnz(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts));\n }\n this.ms1 = msfnz(this.e, this.sinlat0, this.coslat0);\n this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - HALF_PI;\n this.cosX0 = Math.cos(this.X0);\n this.sinX0 = Math.sin(this.X0);\n }\n }\n\n // Stereographic forward equations--mapping lat,long to x,y\n function forward$6(p) {\n var lon = p.x;\n var lat = p.y;\n var sinlat = Math.sin(lat);\n var coslat = Math.cos(lat);\n var A, X, sinX, cosX, ts, rh;\n var dlon = adjust_lon(lon - this.long0);\n\n if (Math.abs(Math.abs(lon - this.long0) - Math.PI) <= EPSLN && Math.abs(lat + this.lat0) <= EPSLN) {\n //case of the origine point\n //trace('stere:this is the origin point');\n p.x = NaN;\n p.y = NaN;\n return p;\n }\n if (this.sphere) {\n //trace('stere:sphere case');\n A = 2 * this.k0 / (1 + this.sinlat0 * sinlat + this.coslat0 * coslat * Math.cos(dlon));\n p.x = this.a * A * coslat * Math.sin(dlon) + this.x0;\n p.y = this.a * A * (this.coslat0 * sinlat - this.sinlat0 * coslat * Math.cos(dlon)) + this.y0;\n return p;\n }\n else {\n X = 2 * Math.atan(this.ssfn_(lat, sinlat, this.e)) - HALF_PI;\n cosX = Math.cos(X);\n sinX = Math.sin(X);\n if (Math.abs(this.coslat0) <= EPSLN) {\n ts = tsfnz(this.e, lat * this.con, this.con * sinlat);\n rh = 2 * this.a * this.k0 * ts / this.cons;\n p.x = this.x0 + rh * Math.sin(lon - this.long0);\n p.y = this.y0 - this.con * rh * Math.cos(lon - this.long0);\n //trace(p.toString());\n return p;\n }\n else if (Math.abs(this.sinlat0) < EPSLN) {\n //Eq\n //trace('stere:equateur');\n A = 2 * this.a * this.k0 / (1 + cosX * Math.cos(dlon));\n p.y = A * sinX;\n }\n else {\n //other case\n //trace('stere:normal case');\n A = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * sinX + this.cosX0 * cosX * Math.cos(dlon)));\n p.y = A * (this.cosX0 * sinX - this.sinX0 * cosX * Math.cos(dlon)) + this.y0;\n }\n p.x = A * cosX * Math.sin(dlon) + this.x0;\n }\n //trace(p.toString());\n return p;\n }\n\n //* Stereographic inverse equations--mapping x,y to lat/long\n function inverse$6(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n var lon, lat, ts, ce, Chi;\n var rh = Math.sqrt(p.x * p.x + p.y * p.y);\n if (this.sphere) {\n var c = 2 * Math.atan(rh / (2 * this.a * this.k0));\n lon = this.long0;\n lat = this.lat0;\n if (rh <= EPSLN) {\n p.x = lon;\n p.y = lat;\n return p;\n }\n lat = Math.asin(Math.cos(c) * this.sinlat0 + p.y * Math.sin(c) * this.coslat0 / rh);\n if (Math.abs(this.coslat0) < EPSLN) {\n if (this.lat0 > 0) {\n lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y));\n }\n else {\n lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y));\n }\n }\n else {\n lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(c), rh * this.coslat0 * Math.cos(c) - p.y * this.sinlat0 * Math.sin(c)));\n }\n p.x = lon;\n p.y = lat;\n return p;\n }\n else {\n if (Math.abs(this.coslat0) <= EPSLN) {\n if (rh <= EPSLN) {\n lat = this.lat0;\n lon = this.long0;\n p.x = lon;\n p.y = lat;\n //trace(p.toString());\n return p;\n }\n p.x *= this.con;\n p.y *= this.con;\n ts = rh * this.cons / (2 * this.a * this.k0);\n lat = this.con * phi2z(this.e, ts);\n lon = this.con * adjust_lon(this.con * this.long0 + Math.atan2(p.x, - 1 * p.y));\n }\n else {\n ce = 2 * Math.atan(rh * this.cosX0 / (2 * this.a * this.k0 * this.ms1));\n lon = this.long0;\n if (rh <= EPSLN) {\n Chi = this.X0;\n }\n else {\n Chi = Math.asin(Math.cos(ce) * this.sinX0 + p.y * Math.sin(ce) * this.cosX0 / rh);\n lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(ce), rh * this.cosX0 * Math.cos(ce) - p.y * this.sinX0 * Math.sin(ce)));\n }\n lat = -1 * phi2z(this.e, Math.tan(0.5 * (HALF_PI + Chi)));\n }\n }\n p.x = lon;\n p.y = lat;\n\n //trace(p.toString());\n return p;\n\n }\n\n var names$8 = [\"stere\", \"Stereographic_South_Pole\", \"Polar Stereographic (variant B)\"];\n var stere = {\n init: init$7,\n forward: forward$6,\n inverse: inverse$6,\n names: names$8,\n ssfn_: ssfn_\n };\n\n /*\n references:\n Formules et constantes pour le Calcul pour la\n projection cylindrique conforme à axe oblique et pour la transformation entre\n des systèmes de référence.\n http://www.swisstopo.admin.ch/internet/swisstopo/fr/home/topics/survey/sys/refsys/switzerland.parsysrelated1.31216.downloadList.77004.DownloadFile.tmp/swissprojectionfr.pdf\n */\n\n function init$8() {\n var phy0 = this.lat0;\n this.lambda0 = this.long0;\n var sinPhy0 = Math.sin(phy0);\n var semiMajorAxis = this.a;\n var invF = this.rf;\n var flattening = 1 / invF;\n var e2 = 2 * flattening - Math.pow(flattening, 2);\n var e = this.e = Math.sqrt(e2);\n this.R = this.k0 * semiMajorAxis * Math.sqrt(1 - e2) / (1 - e2 * Math.pow(sinPhy0, 2));\n this.alpha = Math.sqrt(1 + e2 / (1 - e2) * Math.pow(Math.cos(phy0), 4));\n this.b0 = Math.asin(sinPhy0 / this.alpha);\n var k1 = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2));\n var k2 = Math.log(Math.tan(Math.PI / 4 + phy0 / 2));\n var k3 = Math.log((1 + e * sinPhy0) / (1 - e * sinPhy0));\n this.K = k1 - this.alpha * k2 + this.alpha * e / 2 * k3;\n }\n\n function forward$7(p) {\n var Sa1 = Math.log(Math.tan(Math.PI / 4 - p.y / 2));\n var Sa2 = this.e / 2 * Math.log((1 + this.e * Math.sin(p.y)) / (1 - this.e * Math.sin(p.y)));\n var S = -this.alpha * (Sa1 + Sa2) + this.K;\n\n // spheric latitude\n var b = 2 * (Math.atan(Math.exp(S)) - Math.PI / 4);\n\n // spheric longitude\n var I = this.alpha * (p.x - this.lambda0);\n\n // psoeudo equatorial rotation\n var rotI = Math.atan(Math.sin(I) / (Math.sin(this.b0) * Math.tan(b) + Math.cos(this.b0) * Math.cos(I)));\n\n var rotB = Math.asin(Math.cos(this.b0) * Math.sin(b) - Math.sin(this.b0) * Math.cos(b) * Math.cos(I));\n\n p.y = this.R / 2 * Math.log((1 + Math.sin(rotB)) / (1 - Math.sin(rotB))) + this.y0;\n p.x = this.R * rotI + this.x0;\n return p;\n }\n\n function inverse$7(p) {\n var Y = p.x - this.x0;\n var X = p.y - this.y0;\n\n var rotI = Y / this.R;\n var rotB = 2 * (Math.atan(Math.exp(X / this.R)) - Math.PI / 4);\n\n var b = Math.asin(Math.cos(this.b0) * Math.sin(rotB) + Math.sin(this.b0) * Math.cos(rotB) * Math.cos(rotI));\n var I = Math.atan(Math.sin(rotI) / (Math.cos(this.b0) * Math.cos(rotI) - Math.sin(this.b0) * Math.tan(rotB)));\n\n var lambda = this.lambda0 + I / this.alpha;\n\n var S = 0;\n var phy = b;\n var prevPhy = -1000;\n var iteration = 0;\n while (Math.abs(phy - prevPhy) > 0.0000001) {\n if (++iteration > 20) {\n //...reportError(\"omercFwdInfinity\");\n return;\n }\n //S = Math.log(Math.tan(Math.PI / 4 + phy / 2));\n S = 1 / this.alpha * (Math.log(Math.tan(Math.PI / 4 + b / 2)) - this.K) + this.e * Math.log(Math.tan(Math.PI / 4 + Math.asin(this.e * Math.sin(phy)) / 2));\n prevPhy = phy;\n phy = 2 * Math.atan(Math.exp(S)) - Math.PI / 2;\n }\n\n p.x = lambda;\n p.y = phy;\n return p;\n }\n\n var names$9 = [\"somerc\"];\n var somerc = {\n init: init$8,\n forward: forward$7,\n inverse: inverse$7,\n names: names$9\n };\n\n var TOL = 1e-7;\n\n function isTypeA(P) {\n var typeAProjections = ['Hotine_Oblique_Mercator','Hotine_Oblique_Mercator_Azimuth_Natural_Origin'];\n var projectionName = typeof P.PROJECTION === \"object\" ? Object.keys(P.PROJECTION)[0] : P.PROJECTION;\n \n return 'no_uoff' in P || 'no_off' in P || typeAProjections.indexOf(projectionName) !== -1;\n }\n\n\n /* Initialize the Oblique Mercator projection\n ------------------------------------------*/\n function init$9() { \n var con, com, cosph0, D, F, H, L, sinph0, p, J, gamma = 0,\n gamma0, lamc = 0, lam1 = 0, lam2 = 0, phi1 = 0, phi2 = 0, alpha_c = 0;\n \n // only Type A uses the no_off or no_uoff property\n // https://github.com/OSGeo/proj.4/issues/104\n this.no_off = isTypeA(this);\n this.no_rot = 'no_rot' in this;\n \n var alp = false;\n if (\"alpha\" in this) {\n alp = true;\n }\n\n var gam = false;\n if (\"rectified_grid_angle\" in this) {\n gam = true;\n }\n\n if (alp) {\n alpha_c = this.alpha;\n }\n \n if (gam) {\n gamma = (this.rectified_grid_angle * D2R);\n }\n \n if (alp || gam) {\n lamc = this.longc;\n } else {\n lam1 = this.long1;\n phi1 = this.lat1;\n lam2 = this.long2;\n phi2 = this.lat2;\n \n if (Math.abs(phi1 - phi2) <= TOL || (con = Math.abs(phi1)) <= TOL ||\n Math.abs(con - HALF_PI) <= TOL || Math.abs(Math.abs(this.lat0) - HALF_PI) <= TOL ||\n Math.abs(Math.abs(phi2) - HALF_PI) <= TOL) {\n throw new Error();\n }\n }\n \n var one_es = 1.0 - this.es;\n com = Math.sqrt(one_es);\n \n if (Math.abs(this.lat0) > EPSLN) {\n sinph0 = Math.sin(this.lat0);\n cosph0 = Math.cos(this.lat0);\n con = 1 - this.es * sinph0 * sinph0;\n this.B = cosph0 * cosph0;\n this.B = Math.sqrt(1 + this.es * this.B * this.B / one_es);\n this.A = this.B * this.k0 * com / con;\n D = this.B * com / (cosph0 * Math.sqrt(con));\n F = D * D -1;\n \n if (F <= 0) {\n F = 0;\n } else {\n F = Math.sqrt(F);\n if (this.lat0 < 0) {\n F = -F;\n }\n }\n \n this.E = F += D;\n this.E *= Math.pow(tsfnz(this.e, this.lat0, sinph0), this.B);\n } else {\n this.B = 1 / com;\n this.A = this.k0;\n this.E = D = F = 1;\n }\n \n if (alp || gam) {\n if (alp) {\n gamma0 = Math.asin(Math.sin(alpha_c) / D);\n if (!gam) {\n gamma = alpha_c;\n }\n } else {\n gamma0 = gamma;\n alpha_c = Math.asin(D * Math.sin(gamma0));\n }\n this.lam0 = lamc - Math.asin(0.5 * (F - 1 / F) * Math.tan(gamma0)) / this.B;\n } else {\n H = Math.pow(tsfnz(this.e, phi1, Math.sin(phi1)), this.B);\n L = Math.pow(tsfnz(this.e, phi2, Math.sin(phi2)), this.B);\n F = this.E / H;\n p = (L - H) / (L + H);\n J = this.E * this.E;\n J = (J - L * H) / (J + L * H);\n con = lam1 - lam2;\n \n if (con < -Math.pi) {\n lam2 -=TWO_PI;\n } else if (con > Math.pi) {\n lam2 += TWO_PI;\n }\n \n this.lam0 = adjust_lon(0.5 * (lam1 + lam2) - Math.atan(J * Math.tan(0.5 * this.B * (lam1 - lam2)) / p) / this.B);\n gamma0 = Math.atan(2 * Math.sin(this.B * adjust_lon(lam1 - this.lam0)) / (F - 1 / F));\n gamma = alpha_c = Math.asin(D * Math.sin(gamma0));\n }\n \n this.singam = Math.sin(gamma0);\n this.cosgam = Math.cos(gamma0);\n this.sinrot = Math.sin(gamma);\n this.cosrot = Math.cos(gamma);\n \n this.rB = 1 / this.B;\n this.ArB = this.A * this.rB;\n this.BrA = 1 / this.ArB;\n if (this.no_off) {\n this.u_0 = 0;\n } else {\n this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(D * D - 1) / Math.cos(alpha_c)));\n \n if (this.lat0 < 0) {\n this.u_0 = - this.u_0;\n } \n }\n \n F = 0.5 * gamma0;\n this.v_pole_n = this.ArB * Math.log(Math.tan(FORTPI - F));\n this.v_pole_s = this.ArB * Math.log(Math.tan(FORTPI + F));\n }\n\n\n /* Oblique Mercator forward equations--mapping lat,long to x,y\n ----------------------------------------------------------*/\n function forward$8(p) {\n var coords = {};\n var S, T, U, V, W, temp, u, v;\n p.x = p.x - this.lam0;\n \n if (Math.abs(Math.abs(p.y) - HALF_PI) > EPSLN) {\n W = this.E / Math.pow(tsfnz(this.e, p.y, Math.sin(p.y)), this.B);\n \n temp = 1 / W;\n S = 0.5 * (W - temp);\n T = 0.5 * (W + temp);\n V = Math.sin(this.B * p.x);\n U = (S * this.singam - V * this.cosgam) / T;\n \n if (Math.abs(Math.abs(U) - 1.0) < EPSLN) {\n throw new Error();\n }\n \n v = 0.5 * this.ArB * Math.log((1 - U)/(1 + U));\n temp = Math.cos(this.B * p.x);\n \n if (Math.abs(temp) < TOL) {\n u = this.A * p.x;\n } else {\n u = this.ArB * Math.atan2((S * this.cosgam + V * this.singam), temp);\n } \n } else {\n v = p.y > 0 ? this.v_pole_n : this.v_pole_s;\n u = this.ArB * p.y;\n }\n \n if (this.no_rot) {\n coords.x = u;\n coords.y = v;\n } else {\n u -= this.u_0;\n coords.x = v * this.cosrot + u * this.sinrot;\n coords.y = u * this.cosrot - v * this.sinrot;\n }\n \n coords.x = (this.a * coords.x + this.x0);\n coords.y = (this.a * coords.y + this.y0);\n \n return coords;\n }\n\n function inverse$8(p) {\n var u, v, Qp, Sp, Tp, Vp, Up;\n var coords = {};\n \n p.x = (p.x - this.x0) * (1.0 / this.a);\n p.y = (p.y - this.y0) * (1.0 / this.a);\n\n if (this.no_rot) {\n v = p.y;\n u = p.x;\n } else {\n v = p.x * this.cosrot - p.y * this.sinrot;\n u = p.y * this.cosrot + p.x * this.sinrot + this.u_0;\n }\n \n Qp = Math.exp(-this.BrA * v);\n Sp = 0.5 * (Qp - 1 / Qp);\n Tp = 0.5 * (Qp + 1 / Qp);\n Vp = Math.sin(this.BrA * u);\n Up = (Vp * this.cosgam + Sp * this.singam) / Tp;\n \n if (Math.abs(Math.abs(Up) - 1) < EPSLN) {\n coords.x = 0;\n coords.y = Up < 0 ? -HALF_PI : HALF_PI;\n } else {\n coords.y = this.E / Math.sqrt((1 + Up) / (1 - Up));\n coords.y = phi2z(this.e, Math.pow(coords.y, 1 / this.B));\n \n if (coords.y === Infinity) {\n throw new Error();\n }\n \n coords.x = -this.rB * Math.atan2((Sp * this.cosgam - Vp * this.singam), Math.cos(this.BrA * u));\n }\n \n coords.x += this.lam0;\n \n return coords;\n }\n\n var names$10 = [\"Hotine_Oblique_Mercator\", \"Hotine Oblique Mercator\", \"Hotine_Oblique_Mercator_Azimuth_Natural_Origin\", \"Hotine_Oblique_Mercator_Two_Point_Natural_Origin\", \"Hotine_Oblique_Mercator_Azimuth_Center\", \"Oblique_Mercator\", \"omerc\"];\n var omerc = {\n init: init$9,\n forward: forward$8,\n inverse: inverse$8,\n names: names$10\n };\n\n function init$10() {\n \n //double lat0; /* the reference latitude */\n //double long0; /* the reference longitude */\n //double lat1; /* first standard parallel */\n //double lat2; /* second standard parallel */\n //double r_maj; /* major axis */\n //double r_min; /* minor axis */\n //double false_east; /* x offset in meters */\n //double false_north; /* y offset in meters */\n \n //the above value can be set with proj4.defs\n //example: proj4.defs(\"EPSG:2154\",\"+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs\");\n\n if (!this.lat2) {\n this.lat2 = this.lat1;\n } //if lat2 is not defined\n if (!this.k0) {\n this.k0 = 1;\n }\n this.x0 = this.x0 || 0;\n this.y0 = this.y0 || 0;\n // Standard Parallels cannot be equal and on opposite sides of the equator\n if (Math.abs(this.lat1 + this.lat2) < EPSLN) {\n return;\n }\n\n var temp = this.b / this.a;\n this.e = Math.sqrt(1 - temp * temp);\n\n var sin1 = Math.sin(this.lat1);\n var cos1 = Math.cos(this.lat1);\n var ms1 = msfnz(this.e, sin1, cos1);\n var ts1 = tsfnz(this.e, this.lat1, sin1);\n\n var sin2 = Math.sin(this.lat2);\n var cos2 = Math.cos(this.lat2);\n var ms2 = msfnz(this.e, sin2, cos2);\n var ts2 = tsfnz(this.e, this.lat2, sin2);\n\n var ts0 = tsfnz(this.e, this.lat0, Math.sin(this.lat0));\n\n if (Math.abs(this.lat1 - this.lat2) > EPSLN) {\n this.ns = Math.log(ms1 / ms2) / Math.log(ts1 / ts2);\n }\n else {\n this.ns = sin1;\n }\n if (isNaN(this.ns)) {\n this.ns = sin1;\n }\n this.f0 = ms1 / (this.ns * Math.pow(ts1, this.ns));\n this.rh = this.a * this.f0 * Math.pow(ts0, this.ns);\n if (!this.title) {\n this.title = \"Lambert Conformal Conic\";\n }\n }\n\n // Lambert Conformal conic forward equations--mapping lat,long to x,y\n // -----------------------------------------------------------------\n function forward$9(p) {\n\n var lon = p.x;\n var lat = p.y;\n\n // singular cases :\n if (Math.abs(2 * Math.abs(lat) - Math.PI) <= EPSLN) {\n lat = sign(lat) * (HALF_PI - 2 * EPSLN);\n }\n\n var con = Math.abs(Math.abs(lat) - HALF_PI);\n var ts, rh1;\n if (con > EPSLN) {\n ts = tsfnz(this.e, lat, Math.sin(lat));\n rh1 = this.a * this.f0 * Math.pow(ts, this.ns);\n }\n else {\n con = lat * this.ns;\n if (con <= 0) {\n return null;\n }\n rh1 = 0;\n }\n var theta = this.ns * adjust_lon(lon - this.long0);\n p.x = this.k0 * (rh1 * Math.sin(theta)) + this.x0;\n p.y = this.k0 * (this.rh - rh1 * Math.cos(theta)) + this.y0;\n\n return p;\n }\n\n // Lambert Conformal Conic inverse equations--mapping x,y to lat/long\n // -----------------------------------------------------------------\n function inverse$9(p) {\n\n var rh1, con, ts;\n var lat, lon;\n var x = (p.x - this.x0) / this.k0;\n var y = (this.rh - (p.y - this.y0) / this.k0);\n if (this.ns > 0) {\n rh1 = Math.sqrt(x * x + y * y);\n con = 1;\n }\n else {\n rh1 = -Math.sqrt(x * x + y * y);\n con = -1;\n }\n var theta = 0;\n if (rh1 !== 0) {\n theta = Math.atan2((con * x), (con * y));\n }\n if ((rh1 !== 0) || (this.ns > 0)) {\n con = 1 / this.ns;\n ts = Math.pow((rh1 / (this.a * this.f0)), con);\n lat = phi2z(this.e, ts);\n if (lat === -9999) {\n return null;\n }\n }\n else {\n lat = -HALF_PI;\n }\n lon = adjust_lon(theta / this.ns + this.long0);\n\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n var names$11 = [\n \"Lambert Tangential Conformal Conic Projection\",\n \"Lambert_Conformal_Conic\",\n \"Lambert_Conformal_Conic_1SP\",\n \"Lambert_Conformal_Conic_2SP\",\n \"lcc\"\n ];\n\n var lcc = {\n init: init$10,\n forward: forward$9,\n inverse: inverse$9,\n names: names$11\n };\n\n function init$11() {\n this.a = 6377397.155;\n this.es = 0.006674372230614;\n this.e = Math.sqrt(this.es);\n if (!this.lat0) {\n this.lat0 = 0.863937979737193;\n }\n if (!this.long0) {\n this.long0 = 0.7417649320975901 - 0.308341501185665;\n }\n /* if scale not set default to 0.9999 */\n if (!this.k0) {\n this.k0 = 0.9999;\n }\n this.s45 = 0.785398163397448; /* 45 */\n this.s90 = 2 * this.s45;\n this.fi0 = this.lat0;\n this.e2 = this.es;\n this.e = Math.sqrt(this.e2);\n this.alfa = Math.sqrt(1 + (this.e2 * Math.pow(Math.cos(this.fi0), 4)) / (1 - this.e2));\n this.uq = 1.04216856380474;\n this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa);\n this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2);\n this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g;\n this.k1 = this.k0;\n this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2));\n this.s0 = 1.37008346281555;\n this.n = Math.sin(this.s0);\n this.ro0 = this.k1 * this.n0 / Math.tan(this.s0);\n this.ad = this.s90 - this.uq;\n }\n\n /* ellipsoid */\n /* calculate xy from lat/lon */\n /* Constants, identical to inverse transform function */\n function forward$10(p) {\n var gfi, u, deltav, s, d, eps, ro;\n var lon = p.x;\n var lat = p.y;\n var delta_lon = adjust_lon(lon - this.long0);\n /* Transformation */\n gfi = Math.pow(((1 + this.e * Math.sin(lat)) / (1 - this.e * Math.sin(lat))), (this.alfa * this.e / 2));\n u = 2 * (Math.atan(this.k * Math.pow(Math.tan(lat / 2 + this.s45), this.alfa) / gfi) - this.s45);\n deltav = -delta_lon * this.alfa;\n s = Math.asin(Math.cos(this.ad) * Math.sin(u) + Math.sin(this.ad) * Math.cos(u) * Math.cos(deltav));\n d = Math.asin(Math.cos(u) * Math.sin(deltav) / Math.cos(s));\n eps = this.n * d;\n ro = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n);\n p.y = ro * Math.cos(eps) / 1;\n p.x = ro * Math.sin(eps) / 1;\n\n if (!this.czech) {\n p.y *= -1;\n p.x *= -1;\n }\n return (p);\n }\n\n /* calculate lat/lon from xy */\n function inverse$10(p) {\n var u, deltav, s, d, eps, ro, fi1;\n var ok;\n\n /* Transformation */\n /* revert y, x*/\n var tmp = p.x;\n p.x = p.y;\n p.y = tmp;\n if (!this.czech) {\n p.y *= -1;\n p.x *= -1;\n }\n ro = Math.sqrt(p.x * p.x + p.y * p.y);\n eps = Math.atan2(p.y, p.x);\n d = eps / Math.sin(this.s0);\n s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45);\n u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d));\n deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u));\n p.x = this.long0 - deltav / this.alfa;\n fi1 = u;\n ok = 0;\n var iter = 0;\n do {\n p.y = 2 * (Math.atan(Math.pow(this.k, - 1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45);\n if (Math.abs(fi1 - p.y) < 0.0000000001) {\n ok = 1;\n }\n fi1 = p.y;\n iter += 1;\n } while (ok === 0 && iter < 15);\n if (iter >= 15) {\n return null;\n }\n\n return (p);\n }\n\n var names$12 = [\"Krovak\", \"krovak\"];\n var krovak = {\n init: init$11,\n forward: forward$10,\n inverse: inverse$10,\n names: names$12\n };\n\n var mlfn = function(e0, e1, e2, e3, phi) {\n return (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi));\n };\n\n var e0fn = function(x) {\n return (1 - 0.25 * x * (1 + x / 16 * (3 + 1.25 * x)));\n };\n\n var e1fn = function(x) {\n return (0.375 * x * (1 + 0.25 * x * (1 + 0.46875 * x)));\n };\n\n var e2fn = function(x) {\n return (0.05859375 * x * x * (1 + 0.75 * x));\n };\n\n var e3fn = function(x) {\n return (x * x * x * (35 / 3072));\n };\n\n var gN = function(a, e, sinphi) {\n var temp = e * sinphi;\n return a / Math.sqrt(1 - temp * temp);\n };\n\n var adjust_lat = function(x) {\n return (Math.abs(x) < HALF_PI) ? x : (x - (sign(x) * Math.PI));\n };\n\n var imlfn = function(ml, e0, e1, e2, e3) {\n var phi;\n var dphi;\n\n phi = ml / e0;\n for (var i = 0; i < 15; i++) {\n dphi = (ml - (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi))) / (e0 - 2 * e1 * Math.cos(2 * phi) + 4 * e2 * Math.cos(4 * phi) - 6 * e3 * Math.cos(6 * phi));\n phi += dphi;\n if (Math.abs(dphi) <= 0.0000000001) {\n return phi;\n }\n }\n\n //..reportError(\"IMLFN-CONV:Latitude failed to converge after 15 iterations\");\n return NaN;\n };\n\n function init$12() {\n if (!this.sphere) {\n this.e0 = e0fn(this.es);\n this.e1 = e1fn(this.es);\n this.e2 = e2fn(this.es);\n this.e3 = e3fn(this.es);\n this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0);\n }\n }\n\n /* Cassini forward equations--mapping lat,long to x,y\n -----------------------------------------------------------------------*/\n function forward$11(p) {\n\n /* Forward equations\n -----------------*/\n var x, y;\n var lam = p.x;\n var phi = p.y;\n lam = adjust_lon(lam - this.long0);\n\n if (this.sphere) {\n x = this.a * Math.asin(Math.cos(phi) * Math.sin(lam));\n y = this.a * (Math.atan2(Math.tan(phi), Math.cos(lam)) - this.lat0);\n }\n else {\n //ellipsoid\n var sinphi = Math.sin(phi);\n var cosphi = Math.cos(phi);\n var nl = gN(this.a, this.e, sinphi);\n var tl = Math.tan(phi) * Math.tan(phi);\n var al = lam * Math.cos(phi);\n var asq = al * al;\n var cl = this.es * cosphi * cosphi / (1 - this.es);\n var ml = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, phi);\n\n x = nl * al * (1 - asq * tl * (1 / 6 - (8 - tl + 8 * cl) * asq / 120));\n y = ml - this.ml0 + nl * sinphi / cosphi * asq * (0.5 + (5 - tl + 6 * cl) * asq / 24);\n\n\n }\n\n p.x = x + this.x0;\n p.y = y + this.y0;\n return p;\n }\n\n /* Inverse equations\n -----------------*/\n function inverse$11(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n var x = p.x / this.a;\n var y = p.y / this.a;\n var phi, lam;\n\n if (this.sphere) {\n var dd = y + this.lat0;\n phi = Math.asin(Math.sin(dd) * Math.cos(x));\n lam = Math.atan2(Math.tan(x), Math.cos(dd));\n }\n else {\n /* ellipsoid */\n var ml1 = this.ml0 / this.a + y;\n var phi1 = imlfn(ml1, this.e0, this.e1, this.e2, this.e3);\n if (Math.abs(Math.abs(phi1) - HALF_PI) <= EPSLN) {\n p.x = this.long0;\n p.y = HALF_PI;\n if (y < 0) {\n p.y *= -1;\n }\n return p;\n }\n var nl1 = gN(this.a, this.e, Math.sin(phi1));\n\n var rl1 = nl1 * nl1 * nl1 / this.a / this.a * (1 - this.es);\n var tl1 = Math.pow(Math.tan(phi1), 2);\n var dl = x * this.a / nl1;\n var dsq = dl * dl;\n phi = phi1 - nl1 * Math.tan(phi1) / rl1 * dl * dl * (0.5 - (1 + 3 * tl1) * dl * dl / 24);\n lam = dl * (1 - dsq * (tl1 / 3 + (1 + 3 * tl1) * tl1 * dsq / 15)) / Math.cos(phi1);\n\n }\n\n p.x = adjust_lon(lam + this.long0);\n p.y = adjust_lat(phi);\n return p;\n\n }\n\n var names$13 = [\"Cassini\", \"Cassini_Soldner\", \"cass\"];\n var cass = {\n init: init$12,\n forward: forward$11,\n inverse: inverse$11,\n names: names$13\n };\n\n var qsfnz = function(eccent, sinphi) {\n var con;\n if (eccent > 1.0e-7) {\n con = eccent * sinphi;\n return ((1 - eccent * eccent) * (sinphi / (1 - con * con) - (0.5 / eccent) * Math.log((1 - con) / (1 + con))));\n }\n else {\n return (2 * sinphi);\n }\n };\n\n /*\n reference\n \"New Equal-Area Map Projections for Noncircular Regions\", John P. Snyder,\n The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355.\n */\n\n var S_POLE = 1;\n\n var N_POLE = 2;\n var EQUIT = 3;\n var OBLIQ = 4;\n\n /* Initialize the Lambert Azimuthal Equal Area projection\n ------------------------------------------------------*/\n function init$13() {\n var t = Math.abs(this.lat0);\n if (Math.abs(t - HALF_PI) < EPSLN) {\n this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE;\n }\n else if (Math.abs(t) < EPSLN) {\n this.mode = this.EQUIT;\n }\n else {\n this.mode = this.OBLIQ;\n }\n if (this.es > 0) {\n var sinphi;\n\n this.qp = qsfnz(this.e, 1);\n this.mmf = 0.5 / (1 - this.es);\n this.apa = authset(this.es);\n switch (this.mode) {\n case this.N_POLE:\n this.dd = 1;\n break;\n case this.S_POLE:\n this.dd = 1;\n break;\n case this.EQUIT:\n this.rq = Math.sqrt(0.5 * this.qp);\n this.dd = 1 / this.rq;\n this.xmf = 1;\n this.ymf = 0.5 * this.qp;\n break;\n case this.OBLIQ:\n this.rq = Math.sqrt(0.5 * this.qp);\n sinphi = Math.sin(this.lat0);\n this.sinb1 = qsfnz(this.e, sinphi) / this.qp;\n this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1);\n this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * sinphi * sinphi) * this.rq * this.cosb1);\n this.ymf = (this.xmf = this.rq) / this.dd;\n this.xmf *= this.dd;\n break;\n }\n }\n else {\n if (this.mode === this.OBLIQ) {\n this.sinph0 = Math.sin(this.lat0);\n this.cosph0 = Math.cos(this.lat0);\n }\n }\n }\n\n /* Lambert Azimuthal Equal Area forward equations--mapping lat,long to x,y\n -----------------------------------------------------------------------*/\n function forward$12(p) {\n\n /* Forward equations\n -----------------*/\n var x, y, coslam, sinlam, sinphi, q, sinb, cosb, b, cosphi;\n var lam = p.x;\n var phi = p.y;\n\n lam = adjust_lon(lam - this.long0);\n if (this.sphere) {\n sinphi = Math.sin(phi);\n cosphi = Math.cos(phi);\n coslam = Math.cos(lam);\n if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {\n y = (this.mode === this.EQUIT) ? 1 + cosphi * coslam : 1 + this.sinph0 * sinphi + this.cosph0 * cosphi * coslam;\n if (y <= EPSLN) {\n return null;\n }\n y = Math.sqrt(2 / y);\n x = y * cosphi * Math.sin(lam);\n y *= (this.mode === this.EQUIT) ? sinphi : this.cosph0 * sinphi - this.sinph0 * cosphi * coslam;\n }\n else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {\n if (this.mode === this.N_POLE) {\n coslam = -coslam;\n }\n if (Math.abs(phi + this.lat0) < EPSLN) {\n return null;\n }\n y = FORTPI - phi * 0.5;\n y = 2 * ((this.mode === this.S_POLE) ? Math.cos(y) : Math.sin(y));\n x = y * Math.sin(lam);\n y *= coslam;\n }\n }\n else {\n sinb = 0;\n cosb = 0;\n b = 0;\n coslam = Math.cos(lam);\n sinlam = Math.sin(lam);\n sinphi = Math.sin(phi);\n q = qsfnz(this.e, sinphi);\n if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {\n sinb = q / this.qp;\n cosb = Math.sqrt(1 - sinb * sinb);\n }\n switch (this.mode) {\n case this.OBLIQ:\n b = 1 + this.sinb1 * sinb + this.cosb1 * cosb * coslam;\n break;\n case this.EQUIT:\n b = 1 + cosb * coslam;\n break;\n case this.N_POLE:\n b = HALF_PI + phi;\n q = this.qp - q;\n break;\n case this.S_POLE:\n b = phi - HALF_PI;\n q = this.qp + q;\n break;\n }\n if (Math.abs(b) < EPSLN) {\n return null;\n }\n switch (this.mode) {\n case this.OBLIQ:\n case this.EQUIT:\n b = Math.sqrt(2 / b);\n if (this.mode === this.OBLIQ) {\n y = this.ymf * b * (this.cosb1 * sinb - this.sinb1 * cosb * coslam);\n }\n else {\n y = (b = Math.sqrt(2 / (1 + cosb * coslam))) * sinb * this.ymf;\n }\n x = this.xmf * b * cosb * sinlam;\n break;\n case this.N_POLE:\n case this.S_POLE:\n if (q >= 0) {\n x = (b = Math.sqrt(q)) * sinlam;\n y = coslam * ((this.mode === this.S_POLE) ? b : -b);\n }\n else {\n x = y = 0;\n }\n break;\n }\n }\n\n p.x = this.a * x + this.x0;\n p.y = this.a * y + this.y0;\n return p;\n }\n\n /* Inverse equations\n -----------------*/\n function inverse$12(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n var x = p.x / this.a;\n var y = p.y / this.a;\n var lam, phi, cCe, sCe, q, rho, ab;\n if (this.sphere) {\n var cosz = 0,\n rh, sinz = 0;\n\n rh = Math.sqrt(x * x + y * y);\n phi = rh * 0.5;\n if (phi > 1) {\n return null;\n }\n phi = 2 * Math.asin(phi);\n if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {\n sinz = Math.sin(phi);\n cosz = Math.cos(phi);\n }\n switch (this.mode) {\n case this.EQUIT:\n phi = (Math.abs(rh) <= EPSLN) ? 0 : Math.asin(y * sinz / rh);\n x *= sinz;\n y = cosz * rh;\n break;\n case this.OBLIQ:\n phi = (Math.abs(rh) <= EPSLN) ? this.lat0 : Math.asin(cosz * this.sinph0 + y * sinz * this.cosph0 / rh);\n x *= sinz * this.cosph0;\n y = (cosz - Math.sin(phi) * this.sinph0) * rh;\n break;\n case this.N_POLE:\n y = -y;\n phi = HALF_PI - phi;\n break;\n case this.S_POLE:\n phi -= HALF_PI;\n break;\n }\n lam = (y === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ)) ? 0 : Math.atan2(x, y);\n }\n else {\n ab = 0;\n if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {\n x /= this.dd;\n y *= this.dd;\n rho = Math.sqrt(x * x + y * y);\n if (rho < EPSLN) {\n p.x = this.long0;\n p.y = this.lat0;\n return p;\n }\n sCe = 2 * Math.asin(0.5 * rho / this.rq);\n cCe = Math.cos(sCe);\n x *= (sCe = Math.sin(sCe));\n if (this.mode === this.OBLIQ) {\n ab = cCe * this.sinb1 + y * sCe * this.cosb1 / rho;\n q = this.qp * ab;\n y = rho * this.cosb1 * cCe - y * this.sinb1 * sCe;\n }\n else {\n ab = y * sCe / rho;\n q = this.qp * ab;\n y = rho * cCe;\n }\n }\n else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {\n if (this.mode === this.N_POLE) {\n y = -y;\n }\n q = (x * x + y * y);\n if (!q) {\n p.x = this.long0;\n p.y = this.lat0;\n return p;\n }\n ab = 1 - q / this.qp;\n if (this.mode === this.S_POLE) {\n ab = -ab;\n }\n }\n lam = Math.atan2(x, y);\n phi = authlat(Math.asin(ab), this.apa);\n }\n\n p.x = adjust_lon(this.long0 + lam);\n p.y = phi;\n return p;\n }\n\n /* determine latitude from authalic latitude */\n var P00 = 0.33333333333333333333;\n\n var P01 = 0.17222222222222222222;\n var P02 = 0.10257936507936507936;\n var P10 = 0.06388888888888888888;\n var P11 = 0.06640211640211640211;\n var P20 = 0.01641501294219154443;\n\n function authset(es) {\n var t;\n var APA = [];\n APA[0] = es * P00;\n t = es * es;\n APA[0] += t * P01;\n APA[1] = t * P10;\n t *= es;\n APA[0] += t * P02;\n APA[1] += t * P11;\n APA[2] = t * P20;\n return APA;\n }\n\n function authlat(beta, APA) {\n var t = beta + beta;\n return (beta + APA[0] * Math.sin(t) + APA[1] * Math.sin(t + t) + APA[2] * Math.sin(t + t + t));\n }\n\n var names$14 = [\"Lambert Azimuthal Equal Area\", \"Lambert_Azimuthal_Equal_Area\", \"laea\"];\n var laea = {\n init: init$13,\n forward: forward$12,\n inverse: inverse$12,\n names: names$14,\n S_POLE: S_POLE,\n N_POLE: N_POLE,\n EQUIT: EQUIT,\n OBLIQ: OBLIQ\n };\n\n var asinz = function(x) {\n if (Math.abs(x) > 1) {\n x = (x > 1) ? 1 : -1;\n }\n return Math.asin(x);\n };\n\n function init$14() {\n\n if (Math.abs(this.lat1 + this.lat2) < EPSLN) {\n return;\n }\n this.temp = this.b / this.a;\n this.es = 1 - Math.pow(this.temp, 2);\n this.e3 = Math.sqrt(this.es);\n\n this.sin_po = Math.sin(this.lat1);\n this.cos_po = Math.cos(this.lat1);\n this.t1 = this.sin_po;\n this.con = this.sin_po;\n this.ms1 = msfnz(this.e3, this.sin_po, this.cos_po);\n this.qs1 = qsfnz(this.e3, this.sin_po, this.cos_po);\n\n this.sin_po = Math.sin(this.lat2);\n this.cos_po = Math.cos(this.lat2);\n this.t2 = this.sin_po;\n this.ms2 = msfnz(this.e3, this.sin_po, this.cos_po);\n this.qs2 = qsfnz(this.e3, this.sin_po, this.cos_po);\n\n this.sin_po = Math.sin(this.lat0);\n this.cos_po = Math.cos(this.lat0);\n this.t3 = this.sin_po;\n this.qs0 = qsfnz(this.e3, this.sin_po, this.cos_po);\n\n if (Math.abs(this.lat1 - this.lat2) > EPSLN) {\n this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1);\n }\n else {\n this.ns0 = this.con;\n }\n this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1;\n this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0;\n }\n\n /* Albers Conical Equal Area forward equations--mapping lat,long to x,y\n -------------------------------------------------------------------*/\n function forward$13(p) {\n\n var lon = p.x;\n var lat = p.y;\n\n this.sin_phi = Math.sin(lat);\n this.cos_phi = Math.cos(lat);\n\n var qs = qsfnz(this.e3, this.sin_phi, this.cos_phi);\n var rh1 = this.a * Math.sqrt(this.c - this.ns0 * qs) / this.ns0;\n var theta = this.ns0 * adjust_lon(lon - this.long0);\n var x = rh1 * Math.sin(theta) + this.x0;\n var y = this.rh - rh1 * Math.cos(theta) + this.y0;\n\n p.x = x;\n p.y = y;\n return p;\n }\n\n function inverse$13(p) {\n var rh1, qs, con, theta, lon, lat;\n\n p.x -= this.x0;\n p.y = this.rh - p.y + this.y0;\n if (this.ns0 >= 0) {\n rh1 = Math.sqrt(p.x * p.x + p.y * p.y);\n con = 1;\n }\n else {\n rh1 = -Math.sqrt(p.x * p.x + p.y * p.y);\n con = -1;\n }\n theta = 0;\n if (rh1 !== 0) {\n theta = Math.atan2(con * p.x, con * p.y);\n }\n con = rh1 * this.ns0 / this.a;\n if (this.sphere) {\n lat = Math.asin((this.c - con * con) / (2 * this.ns0));\n }\n else {\n qs = (this.c - con * con) / this.ns0;\n lat = this.phi1z(this.e3, qs);\n }\n\n lon = adjust_lon(theta / this.ns0 + this.long0);\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n /* Function to compute phi1, the latitude for the inverse of the\n Albers Conical Equal-Area projection.\n -------------------------------------------*/\n function phi1z(eccent, qs) {\n var sinphi, cosphi, con, com, dphi;\n var phi = asinz(0.5 * qs);\n if (eccent < EPSLN) {\n return phi;\n }\n\n var eccnts = eccent * eccent;\n for (var i = 1; i <= 25; i++) {\n sinphi = Math.sin(phi);\n cosphi = Math.cos(phi);\n con = eccent * sinphi;\n com = 1 - con * con;\n dphi = 0.5 * com * com / cosphi * (qs / (1 - eccnts) - sinphi / com + 0.5 / eccent * Math.log((1 - con) / (1 + con)));\n phi = phi + dphi;\n if (Math.abs(dphi) <= 1e-7) {\n return phi;\n }\n }\n return null;\n }\n\n var names$15 = [\"Albers_Conic_Equal_Area\", \"Albers\", \"aea\"];\n var aea = {\n init: init$14,\n forward: forward$13,\n inverse: inverse$13,\n names: names$15,\n phi1z: phi1z\n };\n\n /*\n reference:\n Wolfram Mathworld \"Gnomonic Projection\"\n http://mathworld.wolfram.com/GnomonicProjection.html\n Accessed: 12th November 2009\n */\n function init$15() {\n\n /* Place parameters in static storage for common use\n -------------------------------------------------*/\n this.sin_p14 = Math.sin(this.lat0);\n this.cos_p14 = Math.cos(this.lat0);\n // Approximation for projecting points to the horizon (infinity)\n this.infinity_dist = 1000 * this.a;\n this.rc = 1;\n }\n\n /* Gnomonic forward equations--mapping lat,long to x,y\n ---------------------------------------------------*/\n function forward$14(p) {\n var sinphi, cosphi; /* sin and cos value */\n var dlon; /* delta longitude value */\n var coslon; /* cos of longitude */\n var ksp; /* scale factor */\n var g;\n var x, y;\n var lon = p.x;\n var lat = p.y;\n /* Forward equations\n -----------------*/\n dlon = adjust_lon(lon - this.long0);\n\n sinphi = Math.sin(lat);\n cosphi = Math.cos(lat);\n\n coslon = Math.cos(dlon);\n g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon;\n ksp = 1;\n if ((g > 0) || (Math.abs(g) <= EPSLN)) {\n x = this.x0 + this.a * ksp * cosphi * Math.sin(dlon) / g;\n y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon) / g;\n }\n else {\n\n // Point is in the opposing hemisphere and is unprojectable\n // We still need to return a reasonable point, so we project\n // to infinity, on a bearing\n // equivalent to the northern hemisphere equivalent\n // This is a reasonable approximation for short shapes and lines that\n // straddle the horizon.\n\n x = this.x0 + this.infinity_dist * cosphi * Math.sin(dlon);\n y = this.y0 + this.infinity_dist * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon);\n\n }\n p.x = x;\n p.y = y;\n return p;\n }\n\n function inverse$14(p) {\n var rh; /* Rho */\n var sinc, cosc;\n var c;\n var lon, lat;\n\n /* Inverse equations\n -----------------*/\n p.x = (p.x - this.x0) / this.a;\n p.y = (p.y - this.y0) / this.a;\n\n p.x /= this.k0;\n p.y /= this.k0;\n\n if ((rh = Math.sqrt(p.x * p.x + p.y * p.y))) {\n c = Math.atan2(rh, this.rc);\n sinc = Math.sin(c);\n cosc = Math.cos(c);\n\n lat = asinz(cosc * this.sin_p14 + (p.y * sinc * this.cos_p14) / rh);\n lon = Math.atan2(p.x * sinc, rh * this.cos_p14 * cosc - p.y * this.sin_p14 * sinc);\n lon = adjust_lon(this.long0 + lon);\n }\n else {\n lat = this.phic0;\n lon = 0;\n }\n\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n var names$16 = [\"gnom\"];\n var gnom = {\n init: init$15,\n forward: forward$14,\n inverse: inverse$14,\n names: names$16\n };\n\n var iqsfnz = function(eccent, q) {\n var temp = 1 - (1 - eccent * eccent) / (2 * eccent) * Math.log((1 - eccent) / (1 + eccent));\n if (Math.abs(Math.abs(q) - temp) < 1.0E-6) {\n if (q < 0) {\n return (-1 * HALF_PI);\n }\n else {\n return HALF_PI;\n }\n }\n //var phi = 0.5* q/(1-eccent*eccent);\n var phi = Math.asin(0.5 * q);\n var dphi;\n var sin_phi;\n var cos_phi;\n var con;\n for (var i = 0; i < 30; i++) {\n sin_phi = Math.sin(phi);\n cos_phi = Math.cos(phi);\n con = eccent * sin_phi;\n dphi = Math.pow(1 - con * con, 2) / (2 * cos_phi) * (q / (1 - eccent * eccent) - sin_phi / (1 - con * con) + 0.5 / eccent * Math.log((1 - con) / (1 + con)));\n phi += dphi;\n if (Math.abs(dphi) <= 0.0000000001) {\n return phi;\n }\n }\n\n //console.log(\"IQSFN-CONV:Latitude failed to converge after 30 iterations\");\n return NaN;\n };\n\n /*\n reference:\n \"Cartographic Projection Procedures for the UNIX Environment-\n A User's Manual\" by Gerald I. Evenden,\n USGS Open File Report 90-284and Release 4 Interim Reports (2003)\n */\n function init$16() {\n //no-op\n if (!this.sphere) {\n this.k0 = msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts));\n }\n }\n\n /* Cylindrical Equal Area forward equations--mapping lat,long to x,y\n ------------------------------------------------------------*/\n function forward$15(p) {\n var lon = p.x;\n var lat = p.y;\n var x, y;\n /* Forward equations\n -----------------*/\n var dlon = adjust_lon(lon - this.long0);\n if (this.sphere) {\n x = this.x0 + this.a * dlon * Math.cos(this.lat_ts);\n y = this.y0 + this.a * Math.sin(lat) / Math.cos(this.lat_ts);\n }\n else {\n var qs = qsfnz(this.e, Math.sin(lat));\n x = this.x0 + this.a * this.k0 * dlon;\n y = this.y0 + this.a * qs * 0.5 / this.k0;\n }\n\n p.x = x;\n p.y = y;\n return p;\n }\n\n /* Cylindrical Equal Area inverse equations--mapping x,y to lat/long\n ------------------------------------------------------------*/\n function inverse$15(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n var lon, lat;\n\n if (this.sphere) {\n lon = adjust_lon(this.long0 + (p.x / this.a) / Math.cos(this.lat_ts));\n lat = Math.asin((p.y / this.a) * Math.cos(this.lat_ts));\n }\n else {\n lat = iqsfnz(this.e, 2 * p.y * this.k0 / this.a);\n lon = adjust_lon(this.long0 + p.x / (this.a * this.k0));\n }\n\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n var names$17 = [\"cea\"];\n var cea = {\n init: init$16,\n forward: forward$15,\n inverse: inverse$15,\n names: names$17\n };\n\n function init$17() {\n\n this.x0 = this.x0 || 0;\n this.y0 = this.y0 || 0;\n this.lat0 = this.lat0 || 0;\n this.long0 = this.long0 || 0;\n this.lat_ts = this.lat_ts || 0;\n this.title = this.title || \"Equidistant Cylindrical (Plate Carre)\";\n\n this.rc = Math.cos(this.lat_ts);\n }\n\n // forward equations--mapping lat,long to x,y\n // -----------------------------------------------------------------\n function forward$16(p) {\n\n var lon = p.x;\n var lat = p.y;\n\n var dlon = adjust_lon(lon - this.long0);\n var dlat = adjust_lat(lat - this.lat0);\n p.x = this.x0 + (this.a * dlon * this.rc);\n p.y = this.y0 + (this.a * dlat);\n return p;\n }\n\n // inverse equations--mapping x,y to lat/long\n // -----------------------------------------------------------------\n function inverse$16(p) {\n\n var x = p.x;\n var y = p.y;\n\n p.x = adjust_lon(this.long0 + ((x - this.x0) / (this.a * this.rc)));\n p.y = adjust_lat(this.lat0 + ((y - this.y0) / (this.a)));\n return p;\n }\n\n var names$18 = [\"Equirectangular\", \"Equidistant_Cylindrical\", \"eqc\"];\n var eqc = {\n init: init$17,\n forward: forward$16,\n inverse: inverse$16,\n names: names$18\n };\n\n var MAX_ITER$2 = 20;\n\n function init$18() {\n /* Place parameters in static storage for common use\n -------------------------------------------------*/\n this.temp = this.b / this.a;\n this.es = 1 - Math.pow(this.temp, 2); // devait etre dans tmerc.js mais n y est pas donc je commente sinon retour de valeurs nulles\n this.e = Math.sqrt(this.es);\n this.e0 = e0fn(this.es);\n this.e1 = e1fn(this.es);\n this.e2 = e2fn(this.es);\n this.e3 = e3fn(this.es);\n this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0); //si que des zeros le calcul ne se fait pas\n }\n\n /* Polyconic forward equations--mapping lat,long to x,y\n ---------------------------------------------------*/\n function forward$17(p) {\n var lon = p.x;\n var lat = p.y;\n var x, y, el;\n var dlon = adjust_lon(lon - this.long0);\n el = dlon * Math.sin(lat);\n if (this.sphere) {\n if (Math.abs(lat) <= EPSLN) {\n x = this.a * dlon;\n y = -1 * this.a * this.lat0;\n }\n else {\n x = this.a * Math.sin(el) / Math.tan(lat);\n y = this.a * (adjust_lat(lat - this.lat0) + (1 - Math.cos(el)) / Math.tan(lat));\n }\n }\n else {\n if (Math.abs(lat) <= EPSLN) {\n x = this.a * dlon;\n y = -1 * this.ml0;\n }\n else {\n var nl = gN(this.a, this.e, Math.sin(lat)) / Math.tan(lat);\n x = nl * Math.sin(el);\n y = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, lat) - this.ml0 + nl * (1 - Math.cos(el));\n }\n\n }\n p.x = x + this.x0;\n p.y = y + this.y0;\n return p;\n }\n\n /* Inverse equations\n -----------------*/\n function inverse$17(p) {\n var lon, lat, x, y, i;\n var al, bl;\n var phi, dphi;\n x = p.x - this.x0;\n y = p.y - this.y0;\n\n if (this.sphere) {\n if (Math.abs(y + this.a * this.lat0) <= EPSLN) {\n lon = adjust_lon(x / this.a + this.long0);\n lat = 0;\n }\n else {\n al = this.lat0 + y / this.a;\n bl = x * x / this.a / this.a + al * al;\n phi = al;\n var tanphi;\n for (i = MAX_ITER$2; i; --i) {\n tanphi = Math.tan(phi);\n dphi = -1 * (al * (phi * tanphi + 1) - phi - 0.5 * (phi * phi + bl) * tanphi) / ((phi - al) / tanphi - 1);\n phi += dphi;\n if (Math.abs(dphi) <= EPSLN) {\n lat = phi;\n break;\n }\n }\n lon = adjust_lon(this.long0 + (Math.asin(x * Math.tan(phi) / this.a)) / Math.sin(lat));\n }\n }\n else {\n if (Math.abs(y + this.ml0) <= EPSLN) {\n lat = 0;\n lon = adjust_lon(this.long0 + x / this.a);\n }\n else {\n\n al = (this.ml0 + y) / this.a;\n bl = x * x / this.a / this.a + al * al;\n phi = al;\n var cl, mln, mlnp, ma;\n var con;\n for (i = MAX_ITER$2; i; --i) {\n con = this.e * Math.sin(phi);\n cl = Math.sqrt(1 - con * con) * Math.tan(phi);\n mln = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, phi);\n mlnp = this.e0 - 2 * this.e1 * Math.cos(2 * phi) + 4 * this.e2 * Math.cos(4 * phi) - 6 * this.e3 * Math.cos(6 * phi);\n ma = mln / this.a;\n dphi = (al * (cl * ma + 1) - ma - 0.5 * cl * (ma * ma + bl)) / (this.es * Math.sin(2 * phi) * (ma * ma + bl - 2 * al * ma) / (4 * cl) + (al - ma) * (cl * mlnp - 2 / Math.sin(2 * phi)) - mlnp);\n phi -= dphi;\n if (Math.abs(dphi) <= EPSLN) {\n lat = phi;\n break;\n }\n }\n\n //lat=phi4z(this.e,this.e0,this.e1,this.e2,this.e3,al,bl,0,0);\n cl = Math.sqrt(1 - this.es * Math.pow(Math.sin(lat), 2)) * Math.tan(lat);\n lon = adjust_lon(this.long0 + Math.asin(x * cl / this.a) / Math.sin(lat));\n }\n }\n\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n var names$19 = [\"Polyconic\", \"poly\"];\n var poly = {\n init: init$18,\n forward: forward$17,\n inverse: inverse$17,\n names: names$19\n };\n\n /*\n reference\n Department of Land and Survey Technical Circular 1973/32\n http://www.linz.govt.nz/docs/miscellaneous/nz-map-definition.pdf\n OSG Technical Report 4.1\n http://www.linz.govt.nz/docs/miscellaneous/nzmg.pdf\n */\n\n /**\n * iterations: Number of iterations to refine inverse transform.\n * 0 -> km accuracy\n * 1 -> m accuracy -- suitable for most mapping applications\n * 2 -> mm accuracy\n */\n\n\n function init$19() {\n this.A = [];\n this.A[1] = 0.6399175073;\n this.A[2] = -0.1358797613;\n this.A[3] = 0.063294409;\n this.A[4] = -0.02526853;\n this.A[5] = 0.0117879;\n this.A[6] = -0.0055161;\n this.A[7] = 0.0026906;\n this.A[8] = -0.001333;\n this.A[9] = 0.00067;\n this.A[10] = -0.00034;\n\n this.B_re = [];\n this.B_im = [];\n this.B_re[1] = 0.7557853228;\n this.B_im[1] = 0;\n this.B_re[2] = 0.249204646;\n this.B_im[2] = 0.003371507;\n this.B_re[3] = -0.001541739;\n this.B_im[3] = 0.041058560;\n this.B_re[4] = -0.10162907;\n this.B_im[4] = 0.01727609;\n this.B_re[5] = -0.26623489;\n this.B_im[5] = -0.36249218;\n this.B_re[6] = -0.6870983;\n this.B_im[6] = -1.1651967;\n\n this.C_re = [];\n this.C_im = [];\n this.C_re[1] = 1.3231270439;\n this.C_im[1] = 0;\n this.C_re[2] = -0.577245789;\n this.C_im[2] = -0.007809598;\n this.C_re[3] = 0.508307513;\n this.C_im[3] = -0.112208952;\n this.C_re[4] = -0.15094762;\n this.C_im[4] = 0.18200602;\n this.C_re[5] = 1.01418179;\n this.C_im[5] = 1.64497696;\n this.C_re[6] = 1.9660549;\n this.C_im[6] = 2.5127645;\n\n this.D = [];\n this.D[1] = 1.5627014243;\n this.D[2] = 0.5185406398;\n this.D[3] = -0.03333098;\n this.D[4] = -0.1052906;\n this.D[5] = -0.0368594;\n this.D[6] = 0.007317;\n this.D[7] = 0.01220;\n this.D[8] = 0.00394;\n this.D[9] = -0.0013;\n }\n\n /**\n New Zealand Map Grid Forward - long/lat to x/y\n long/lat in radians\n */\n function forward$18(p) {\n var n;\n var lon = p.x;\n var lat = p.y;\n\n var delta_lat = lat - this.lat0;\n var delta_lon = lon - this.long0;\n\n // 1. Calculate d_phi and d_psi ... // and d_lambda\n // For this algorithm, delta_latitude is in seconds of arc x 10-5, so we need to scale to those units. Longitude is radians.\n var d_phi = delta_lat / SEC_TO_RAD * 1E-5;\n var d_lambda = delta_lon;\n var d_phi_n = 1; // d_phi^0\n\n var d_psi = 0;\n for (n = 1; n <= 10; n++) {\n d_phi_n = d_phi_n * d_phi;\n d_psi = d_psi + this.A[n] * d_phi_n;\n }\n\n // 2. Calculate theta\n var th_re = d_psi;\n var th_im = d_lambda;\n\n // 3. Calculate z\n var th_n_re = 1;\n var th_n_im = 0; // theta^0\n var th_n_re1;\n var th_n_im1;\n\n var z_re = 0;\n var z_im = 0;\n for (n = 1; n <= 6; n++) {\n th_n_re1 = th_n_re * th_re - th_n_im * th_im;\n th_n_im1 = th_n_im * th_re + th_n_re * th_im;\n th_n_re = th_n_re1;\n th_n_im = th_n_im1;\n z_re = z_re + this.B_re[n] * th_n_re - this.B_im[n] * th_n_im;\n z_im = z_im + this.B_im[n] * th_n_re + this.B_re[n] * th_n_im;\n }\n\n // 4. Calculate easting and northing\n p.x = (z_im * this.a) + this.x0;\n p.y = (z_re * this.a) + this.y0;\n\n return p;\n }\n\n /**\n New Zealand Map Grid Inverse - x/y to long/lat\n */\n function inverse$18(p) {\n var n;\n var x = p.x;\n var y = p.y;\n\n var delta_x = x - this.x0;\n var delta_y = y - this.y0;\n\n // 1. Calculate z\n var z_re = delta_y / this.a;\n var z_im = delta_x / this.a;\n\n // 2a. Calculate theta - first approximation gives km accuracy\n var z_n_re = 1;\n var z_n_im = 0; // z^0\n var z_n_re1;\n var z_n_im1;\n\n var th_re = 0;\n var th_im = 0;\n for (n = 1; n <= 6; n++) {\n z_n_re1 = z_n_re * z_re - z_n_im * z_im;\n z_n_im1 = z_n_im * z_re + z_n_re * z_im;\n z_n_re = z_n_re1;\n z_n_im = z_n_im1;\n th_re = th_re + this.C_re[n] * z_n_re - this.C_im[n] * z_n_im;\n th_im = th_im + this.C_im[n] * z_n_re + this.C_re[n] * z_n_im;\n }\n\n // 2b. Iterate to refine the accuracy of the calculation\n // 0 iterations gives km accuracy\n // 1 iteration gives m accuracy -- good enough for most mapping applications\n // 2 iterations bives mm accuracy\n for (var i = 0; i < this.iterations; i++) {\n var th_n_re = th_re;\n var th_n_im = th_im;\n var th_n_re1;\n var th_n_im1;\n\n var num_re = z_re;\n var num_im = z_im;\n for (n = 2; n <= 6; n++) {\n th_n_re1 = th_n_re * th_re - th_n_im * th_im;\n th_n_im1 = th_n_im * th_re + th_n_re * th_im;\n th_n_re = th_n_re1;\n th_n_im = th_n_im1;\n num_re = num_re + (n - 1) * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im);\n num_im = num_im + (n - 1) * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im);\n }\n\n th_n_re = 1;\n th_n_im = 0;\n var den_re = this.B_re[1];\n var den_im = this.B_im[1];\n for (n = 2; n <= 6; n++) {\n th_n_re1 = th_n_re * th_re - th_n_im * th_im;\n th_n_im1 = th_n_im * th_re + th_n_re * th_im;\n th_n_re = th_n_re1;\n th_n_im = th_n_im1;\n den_re = den_re + n * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im);\n den_im = den_im + n * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im);\n }\n\n // Complex division\n var den2 = den_re * den_re + den_im * den_im;\n th_re = (num_re * den_re + num_im * den_im) / den2;\n th_im = (num_im * den_re - num_re * den_im) / den2;\n }\n\n // 3. Calculate d_phi ... // and d_lambda\n var d_psi = th_re;\n var d_lambda = th_im;\n var d_psi_n = 1; // d_psi^0\n\n var d_phi = 0;\n for (n = 1; n <= 9; n++) {\n d_psi_n = d_psi_n * d_psi;\n d_phi = d_phi + this.D[n] * d_psi_n;\n }\n\n // 4. Calculate latitude and longitude\n // d_phi is calcuated in second of arc * 10^-5, so we need to scale back to radians. d_lambda is in radians.\n var lat = this.lat0 + (d_phi * SEC_TO_RAD * 1E5);\n var lon = this.long0 + d_lambda;\n\n p.x = lon;\n p.y = lat;\n\n return p;\n }\n\n var names$20 = [\"New_Zealand_Map_Grid\", \"nzmg\"];\n var nzmg = {\n init: init$19,\n forward: forward$18,\n inverse: inverse$18,\n names: names$20\n };\n\n /*\n reference\n \"New Equal-Area Map Projections for Noncircular Regions\", John P. Snyder,\n The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355.\n */\n\n\n /* Initialize the Miller Cylindrical projection\n -------------------------------------------*/\n function init$20() {\n //no-op\n }\n\n /* Miller Cylindrical forward equations--mapping lat,long to x,y\n ------------------------------------------------------------*/\n function forward$19(p) {\n var lon = p.x;\n var lat = p.y;\n /* Forward equations\n -----------------*/\n var dlon = adjust_lon(lon - this.long0);\n var x = this.x0 + this.a * dlon;\n var y = this.y0 + this.a * Math.log(Math.tan((Math.PI / 4) + (lat / 2.5))) * 1.25;\n\n p.x = x;\n p.y = y;\n return p;\n }\n\n /* Miller Cylindrical inverse equations--mapping x,y to lat/long\n ------------------------------------------------------------*/\n function inverse$19(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n\n var lon = adjust_lon(this.long0 + p.x / this.a);\n var lat = 2.5 * (Math.atan(Math.exp(0.8 * p.y / this.a)) - Math.PI / 4);\n\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n var names$21 = [\"Miller_Cylindrical\", \"mill\"];\n var mill = {\n init: init$20,\n forward: forward$19,\n inverse: inverse$19,\n names: names$21\n };\n\n var MAX_ITER$3 = 20;\n function init$21() {\n /* Place parameters in static storage for common use\n -------------------------------------------------*/\n\n\n if (!this.sphere) {\n this.en = pj_enfn(this.es);\n }\n else {\n this.n = 1;\n this.m = 0;\n this.es = 0;\n this.C_y = Math.sqrt((this.m + 1) / this.n);\n this.C_x = this.C_y / (this.m + 1);\n }\n\n }\n\n /* Sinusoidal forward equations--mapping lat,long to x,y\n -----------------------------------------------------*/\n function forward$20(p) {\n var x, y;\n var lon = p.x;\n var lat = p.y;\n /* Forward equations\n -----------------*/\n lon = adjust_lon(lon - this.long0);\n\n if (this.sphere) {\n if (!this.m) {\n lat = this.n !== 1 ? Math.asin(this.n * Math.sin(lat)) : lat;\n }\n else {\n var k = this.n * Math.sin(lat);\n for (var i = MAX_ITER$3; i; --i) {\n var V = (this.m * lat + Math.sin(lat) - k) / (this.m + Math.cos(lat));\n lat -= V;\n if (Math.abs(V) < EPSLN) {\n break;\n }\n }\n }\n x = this.a * this.C_x * lon * (this.m + Math.cos(lat));\n y = this.a * this.C_y * lat;\n\n }\n else {\n\n var s = Math.sin(lat);\n var c = Math.cos(lat);\n y = this.a * pj_mlfn(lat, s, c, this.en);\n x = this.a * lon * c / Math.sqrt(1 - this.es * s * s);\n }\n\n p.x = x;\n p.y = y;\n return p;\n }\n\n function inverse$20(p) {\n var lat, temp, lon, s;\n\n p.x -= this.x0;\n lon = p.x / this.a;\n p.y -= this.y0;\n lat = p.y / this.a;\n\n if (this.sphere) {\n lat /= this.C_y;\n lon = lon / (this.C_x * (this.m + Math.cos(lat)));\n if (this.m) {\n lat = asinz((this.m * lat + Math.sin(lat)) / this.n);\n }\n else if (this.n !== 1) {\n lat = asinz(Math.sin(lat) / this.n);\n }\n lon = adjust_lon(lon + this.long0);\n lat = adjust_lat(lat);\n }\n else {\n lat = pj_inv_mlfn(p.y / this.a, this.es, this.en);\n s = Math.abs(lat);\n if (s < HALF_PI) {\n s = Math.sin(lat);\n temp = this.long0 + p.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(lat));\n //temp = this.long0 + p.x / (this.a * Math.cos(lat));\n lon = adjust_lon(temp);\n }\n else if ((s - EPSLN) < HALF_PI) {\n lon = this.long0;\n }\n }\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n var names$22 = [\"Sinusoidal\", \"sinu\"];\n var sinu = {\n init: init$21,\n forward: forward$20,\n inverse: inverse$20,\n names: names$22\n };\n\n function init$22() {}\n /* Mollweide forward equations--mapping lat,long to x,y\n ----------------------------------------------------*/\n function forward$21(p) {\n\n /* Forward equations\n -----------------*/\n var lon = p.x;\n var lat = p.y;\n\n var delta_lon = adjust_lon(lon - this.long0);\n var theta = lat;\n var con = Math.PI * Math.sin(lat);\n\n /* Iterate using the Newton-Raphson method to find theta\n -----------------------------------------------------*/\n while (true) {\n var delta_theta = -(theta + Math.sin(theta) - con) / (1 + Math.cos(theta));\n theta += delta_theta;\n if (Math.abs(delta_theta) < EPSLN) {\n break;\n }\n }\n theta /= 2;\n\n /* If the latitude is 90 deg, force the x coordinate to be \"0 + false easting\"\n this is done here because of precision problems with \"cos(theta)\"\n --------------------------------------------------------------------------*/\n if (Math.PI / 2 - Math.abs(lat) < EPSLN) {\n delta_lon = 0;\n }\n var x = 0.900316316158 * this.a * delta_lon * Math.cos(theta) + this.x0;\n var y = 1.4142135623731 * this.a * Math.sin(theta) + this.y0;\n\n p.x = x;\n p.y = y;\n return p;\n }\n\n function inverse$21(p) {\n var theta;\n var arg;\n\n /* Inverse equations\n -----------------*/\n p.x -= this.x0;\n p.y -= this.y0;\n arg = p.y / (1.4142135623731 * this.a);\n\n /* Because of division by zero problems, 'arg' can not be 1. Therefore\n a number very close to one is used instead.\n -------------------------------------------------------------------*/\n if (Math.abs(arg) > 0.999999999999) {\n arg = 0.999999999999;\n }\n theta = Math.asin(arg);\n var lon = adjust_lon(this.long0 + (p.x / (0.900316316158 * this.a * Math.cos(theta))));\n if (lon < (-Math.PI)) {\n lon = -Math.PI;\n }\n if (lon > Math.PI) {\n lon = Math.PI;\n }\n arg = (2 * theta + Math.sin(2 * theta)) / Math.PI;\n if (Math.abs(arg) > 1) {\n arg = 1;\n }\n var lat = Math.asin(arg);\n\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n var names$23 = [\"Mollweide\", \"moll\"];\n var moll = {\n init: init$22,\n forward: forward$21,\n inverse: inverse$21,\n names: names$23\n };\n\n function init$23() {\n\n /* Place parameters in static storage for common use\n -------------------------------------------------*/\n // Standard Parallels cannot be equal and on opposite sides of the equator\n if (Math.abs(this.lat1 + this.lat2) < EPSLN) {\n return;\n }\n this.lat2 = this.lat2 || this.lat1;\n this.temp = this.b / this.a;\n this.es = 1 - Math.pow(this.temp, 2);\n this.e = Math.sqrt(this.es);\n this.e0 = e0fn(this.es);\n this.e1 = e1fn(this.es);\n this.e2 = e2fn(this.es);\n this.e3 = e3fn(this.es);\n\n this.sinphi = Math.sin(this.lat1);\n this.cosphi = Math.cos(this.lat1);\n\n this.ms1 = msfnz(this.e, this.sinphi, this.cosphi);\n this.ml1 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat1);\n\n if (Math.abs(this.lat1 - this.lat2) < EPSLN) {\n this.ns = this.sinphi;\n }\n else {\n this.sinphi = Math.sin(this.lat2);\n this.cosphi = Math.cos(this.lat2);\n this.ms2 = msfnz(this.e, this.sinphi, this.cosphi);\n this.ml2 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat2);\n this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1);\n }\n this.g = this.ml1 + this.ms1 / this.ns;\n this.ml0 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0);\n this.rh = this.a * (this.g - this.ml0);\n }\n\n /* Equidistant Conic forward equations--mapping lat,long to x,y\n -----------------------------------------------------------*/\n function forward$22(p) {\n var lon = p.x;\n var lat = p.y;\n var rh1;\n\n /* Forward equations\n -----------------*/\n if (this.sphere) {\n rh1 = this.a * (this.g - lat);\n }\n else {\n var ml = mlfn(this.e0, this.e1, this.e2, this.e3, lat);\n rh1 = this.a * (this.g - ml);\n }\n var theta = this.ns * adjust_lon(lon - this.long0);\n var x = this.x0 + rh1 * Math.sin(theta);\n var y = this.y0 + this.rh - rh1 * Math.cos(theta);\n p.x = x;\n p.y = y;\n return p;\n }\n\n /* Inverse equations\n -----------------*/\n function inverse$22(p) {\n p.x -= this.x0;\n p.y = this.rh - p.y + this.y0;\n var con, rh1, lat, lon;\n if (this.ns >= 0) {\n rh1 = Math.sqrt(p.x * p.x + p.y * p.y);\n con = 1;\n }\n else {\n rh1 = -Math.sqrt(p.x * p.x + p.y * p.y);\n con = -1;\n }\n var theta = 0;\n if (rh1 !== 0) {\n theta = Math.atan2(con * p.x, con * p.y);\n }\n\n if (this.sphere) {\n lon = adjust_lon(this.long0 + theta / this.ns);\n lat = adjust_lat(this.g - rh1 / this.a);\n p.x = lon;\n p.y = lat;\n return p;\n }\n else {\n var ml = this.g - rh1 / this.a;\n lat = imlfn(ml, this.e0, this.e1, this.e2, this.e3);\n lon = adjust_lon(this.long0 + theta / this.ns);\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n }\n\n var names$24 = [\"Equidistant_Conic\", \"eqdc\"];\n var eqdc = {\n init: init$23,\n forward: forward$22,\n inverse: inverse$22,\n names: names$24\n };\n\n /* Initialize the Van Der Grinten projection\n ----------------------------------------*/\n function init$24() {\n //this.R = 6370997; //Radius of earth\n this.R = this.a;\n }\n\n function forward$23(p) {\n\n var lon = p.x;\n var lat = p.y;\n\n /* Forward equations\n -----------------*/\n var dlon = adjust_lon(lon - this.long0);\n var x, y;\n\n if (Math.abs(lat) <= EPSLN) {\n x = this.x0 + this.R * dlon;\n y = this.y0;\n }\n var theta = asinz(2 * Math.abs(lat / Math.PI));\n if ((Math.abs(dlon) <= EPSLN) || (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN)) {\n x = this.x0;\n if (lat >= 0) {\n y = this.y0 + Math.PI * this.R * Math.tan(0.5 * theta);\n }\n else {\n y = this.y0 + Math.PI * this.R * -Math.tan(0.5 * theta);\n }\n // return(OK);\n }\n var al = 0.5 * Math.abs((Math.PI / dlon) - (dlon / Math.PI));\n var asq = al * al;\n var sinth = Math.sin(theta);\n var costh = Math.cos(theta);\n\n var g = costh / (sinth + costh - 1);\n var gsq = g * g;\n var m = g * (2 / sinth - 1);\n var msq = m * m;\n var con = Math.PI * this.R * (al * (g - msq) + Math.sqrt(asq * (g - msq) * (g - msq) - (msq + asq) * (gsq - msq))) / (msq + asq);\n if (dlon < 0) {\n con = -con;\n }\n x = this.x0 + con;\n //con = Math.abs(con / (Math.PI * this.R));\n var q = asq + g;\n con = Math.PI * this.R * (m * q - al * Math.sqrt((msq + asq) * (asq + 1) - q * q)) / (msq + asq);\n if (lat >= 0) {\n //y = this.y0 + Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con);\n y = this.y0 + con;\n }\n else {\n //y = this.y0 - Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con);\n y = this.y0 - con;\n }\n p.x = x;\n p.y = y;\n return p;\n }\n\n /* Van Der Grinten inverse equations--mapping x,y to lat/long\n ---------------------------------------------------------*/\n function inverse$23(p) {\n var lon, lat;\n var xx, yy, xys, c1, c2, c3;\n var a1;\n var m1;\n var con;\n var th1;\n var d;\n\n /* inverse equations\n -----------------*/\n p.x -= this.x0;\n p.y -= this.y0;\n con = Math.PI * this.R;\n xx = p.x / con;\n yy = p.y / con;\n xys = xx * xx + yy * yy;\n c1 = -Math.abs(yy) * (1 + xys);\n c2 = c1 - 2 * yy * yy + xx * xx;\n c3 = -2 * c1 + 1 + 2 * yy * yy + xys * xys;\n d = yy * yy / c3 + (2 * c2 * c2 * c2 / c3 / c3 / c3 - 9 * c1 * c2 / c3 / c3) / 27;\n a1 = (c1 - c2 * c2 / 3 / c3) / c3;\n m1 = 2 * Math.sqrt(-a1 / 3);\n con = ((3 * d) / a1) / m1;\n if (Math.abs(con) > 1) {\n if (con >= 0) {\n con = 1;\n }\n else {\n con = -1;\n }\n }\n th1 = Math.acos(con) / 3;\n if (p.y >= 0) {\n lat = (-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI;\n }\n else {\n lat = -(-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI;\n }\n\n if (Math.abs(xx) < EPSLN) {\n lon = this.long0;\n }\n else {\n lon = adjust_lon(this.long0 + Math.PI * (xys - 1 + Math.sqrt(1 + 2 * (xx * xx - yy * yy) + xys * xys)) / 2 / xx);\n }\n\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n var names$25 = [\"Van_der_Grinten_I\", \"VanDerGrinten\", \"vandg\"];\n var vandg = {\n init: init$24,\n forward: forward$23,\n inverse: inverse$23,\n names: names$25\n };\n\n function init$25() {\n this.sin_p12 = Math.sin(this.lat0);\n this.cos_p12 = Math.cos(this.lat0);\n }\n\n function forward$24(p) {\n var lon = p.x;\n var lat = p.y;\n var sinphi = Math.sin(p.y);\n var cosphi = Math.cos(p.y);\n var dlon = adjust_lon(lon - this.long0);\n var e0, e1, e2, e3, Mlp, Ml, tanphi, Nl1, Nl, psi, Az, G, H, GH, Hs, c, kp, cos_c, s, s2, s3, s4, s5;\n if (this.sphere) {\n if (Math.abs(this.sin_p12 - 1) <= EPSLN) {\n //North Pole case\n p.x = this.x0 + this.a * (HALF_PI - lat) * Math.sin(dlon);\n p.y = this.y0 - this.a * (HALF_PI - lat) * Math.cos(dlon);\n return p;\n }\n else if (Math.abs(this.sin_p12 + 1) <= EPSLN) {\n //South Pole case\n p.x = this.x0 + this.a * (HALF_PI + lat) * Math.sin(dlon);\n p.y = this.y0 + this.a * (HALF_PI + lat) * Math.cos(dlon);\n return p;\n }\n else {\n //default case\n cos_c = this.sin_p12 * sinphi + this.cos_p12 * cosphi * Math.cos(dlon);\n c = Math.acos(cos_c);\n kp = c ? c / Math.sin(c) : 1;\n p.x = this.x0 + this.a * kp * cosphi * Math.sin(dlon);\n p.y = this.y0 + this.a * kp * (this.cos_p12 * sinphi - this.sin_p12 * cosphi * Math.cos(dlon));\n return p;\n }\n }\n else {\n e0 = e0fn(this.es);\n e1 = e1fn(this.es);\n e2 = e2fn(this.es);\n e3 = e3fn(this.es);\n if (Math.abs(this.sin_p12 - 1) <= EPSLN) {\n //North Pole case\n Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);\n Ml = this.a * mlfn(e0, e1, e2, e3, lat);\n p.x = this.x0 + (Mlp - Ml) * Math.sin(dlon);\n p.y = this.y0 - (Mlp - Ml) * Math.cos(dlon);\n return p;\n }\n else if (Math.abs(this.sin_p12 + 1) <= EPSLN) {\n //South Pole case\n Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);\n Ml = this.a * mlfn(e0, e1, e2, e3, lat);\n p.x = this.x0 + (Mlp + Ml) * Math.sin(dlon);\n p.y = this.y0 + (Mlp + Ml) * Math.cos(dlon);\n return p;\n }\n else {\n //Default case\n tanphi = sinphi / cosphi;\n Nl1 = gN(this.a, this.e, this.sin_p12);\n Nl = gN(this.a, this.e, sinphi);\n psi = Math.atan((1 - this.es) * tanphi + this.es * Nl1 * this.sin_p12 / (Nl * cosphi));\n Az = Math.atan2(Math.sin(dlon), this.cos_p12 * Math.tan(psi) - this.sin_p12 * Math.cos(dlon));\n if (Az === 0) {\n s = Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi));\n }\n else if (Math.abs(Math.abs(Az) - Math.PI) <= EPSLN) {\n s = -Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi));\n }\n else {\n s = Math.asin(Math.sin(dlon) * Math.cos(psi) / Math.sin(Az));\n }\n G = this.e * this.sin_p12 / Math.sqrt(1 - this.es);\n H = this.e * this.cos_p12 * Math.cos(Az) / Math.sqrt(1 - this.es);\n GH = G * H;\n Hs = H * H;\n s2 = s * s;\n s3 = s2 * s;\n s4 = s3 * s;\n s5 = s4 * s;\n c = Nl1 * s * (1 - s2 * Hs * (1 - Hs) / 6 + s3 / 8 * GH * (1 - 2 * Hs) + s4 / 120 * (Hs * (4 - 7 * Hs) - 3 * G * G * (1 - 7 * Hs)) - s5 / 48 * GH);\n p.x = this.x0 + c * Math.sin(Az);\n p.y = this.y0 + c * Math.cos(Az);\n return p;\n }\n }\n\n\n }\n\n function inverse$24(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n var rh, z, sinz, cosz, lon, lat, con, e0, e1, e2, e3, Mlp, M, N1, psi, Az, cosAz, tmp, A, B, D, Ee, F, sinpsi;\n if (this.sphere) {\n rh = Math.sqrt(p.x * p.x + p.y * p.y);\n if (rh > (2 * HALF_PI * this.a)) {\n return;\n }\n z = rh / this.a;\n\n sinz = Math.sin(z);\n cosz = Math.cos(z);\n\n lon = this.long0;\n if (Math.abs(rh) <= EPSLN) {\n lat = this.lat0;\n }\n else {\n lat = asinz(cosz * this.sin_p12 + (p.y * sinz * this.cos_p12) / rh);\n con = Math.abs(this.lat0) - HALF_PI;\n if (Math.abs(con) <= EPSLN) {\n if (this.lat0 >= 0) {\n lon = adjust_lon(this.long0 + Math.atan2(p.x, - p.y));\n }\n else {\n lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y));\n }\n }\n else {\n /*con = cosz - this.sin_p12 * Math.sin(lat);\n if ((Math.abs(con) < EPSLN) && (Math.abs(p.x) < EPSLN)) {\n //no-op, just keep the lon value as is\n } else {\n var temp = Math.atan2((p.x * sinz * this.cos_p12), (con * rh));\n lon = adjust_lon(this.long0 + Math.atan2((p.x * sinz * this.cos_p12), (con * rh)));\n }*/\n lon = adjust_lon(this.long0 + Math.atan2(p.x * sinz, rh * this.cos_p12 * cosz - p.y * this.sin_p12 * sinz));\n }\n }\n\n p.x = lon;\n p.y = lat;\n return p;\n }\n else {\n e0 = e0fn(this.es);\n e1 = e1fn(this.es);\n e2 = e2fn(this.es);\n e3 = e3fn(this.es);\n if (Math.abs(this.sin_p12 - 1) <= EPSLN) {\n //North pole case\n Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);\n rh = Math.sqrt(p.x * p.x + p.y * p.y);\n M = Mlp - rh;\n lat = imlfn(M / this.a, e0, e1, e2, e3);\n lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y));\n p.x = lon;\n p.y = lat;\n return p;\n }\n else if (Math.abs(this.sin_p12 + 1) <= EPSLN) {\n //South pole case\n Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);\n rh = Math.sqrt(p.x * p.x + p.y * p.y);\n M = rh - Mlp;\n\n lat = imlfn(M / this.a, e0, e1, e2, e3);\n lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y));\n p.x = lon;\n p.y = lat;\n return p;\n }\n else {\n //default case\n rh = Math.sqrt(p.x * p.x + p.y * p.y);\n Az = Math.atan2(p.x, p.y);\n N1 = gN(this.a, this.e, this.sin_p12);\n cosAz = Math.cos(Az);\n tmp = this.e * this.cos_p12 * cosAz;\n A = -tmp * tmp / (1 - this.es);\n B = 3 * this.es * (1 - A) * this.sin_p12 * this.cos_p12 * cosAz / (1 - this.es);\n D = rh / N1;\n Ee = D - A * (1 + A) * Math.pow(D, 3) / 6 - B * (1 + 3 * A) * Math.pow(D, 4) / 24;\n F = 1 - A * Ee * Ee / 2 - D * Ee * Ee * Ee / 6;\n psi = Math.asin(this.sin_p12 * Math.cos(Ee) + this.cos_p12 * Math.sin(Ee) * cosAz);\n lon = adjust_lon(this.long0 + Math.asin(Math.sin(Az) * Math.sin(Ee) / Math.cos(psi)));\n sinpsi = Math.sin(psi);\n lat = Math.atan2((sinpsi - this.es * F * this.sin_p12) * Math.tan(psi), sinpsi * (1 - this.es));\n p.x = lon;\n p.y = lat;\n return p;\n }\n }\n\n }\n\n var names$26 = [\"Azimuthal_Equidistant\", \"aeqd\"];\n var aeqd = {\n init: init$25,\n forward: forward$24,\n inverse: inverse$24,\n names: names$26\n };\n\n function init$26() {\n //double temp; /* temporary variable */\n\n /* Place parameters in static storage for common use\n -------------------------------------------------*/\n this.sin_p14 = Math.sin(this.lat0);\n this.cos_p14 = Math.cos(this.lat0);\n }\n\n /* Orthographic forward equations--mapping lat,long to x,y\n ---------------------------------------------------*/\n function forward$25(p) {\n var sinphi, cosphi; /* sin and cos value */\n var dlon; /* delta longitude value */\n var coslon; /* cos of longitude */\n var ksp; /* scale factor */\n var g, x, y;\n var lon = p.x;\n var lat = p.y;\n /* Forward equations\n -----------------*/\n dlon = adjust_lon(lon - this.long0);\n\n sinphi = Math.sin(lat);\n cosphi = Math.cos(lat);\n\n coslon = Math.cos(dlon);\n g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon;\n ksp = 1;\n if ((g > 0) || (Math.abs(g) <= EPSLN)) {\n x = this.a * ksp * cosphi * Math.sin(dlon);\n y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon);\n }\n p.x = x;\n p.y = y;\n return p;\n }\n\n function inverse$25(p) {\n var rh; /* height above ellipsoid */\n var z; /* angle */\n var sinz, cosz; /* sin of z and cos of z */\n var con;\n var lon, lat;\n /* Inverse equations\n -----------------*/\n p.x -= this.x0;\n p.y -= this.y0;\n rh = Math.sqrt(p.x * p.x + p.y * p.y);\n z = asinz(rh / this.a);\n\n sinz = Math.sin(z);\n cosz = Math.cos(z);\n\n lon = this.long0;\n if (Math.abs(rh) <= EPSLN) {\n lat = this.lat0;\n p.x = lon;\n p.y = lat;\n return p;\n }\n lat = asinz(cosz * this.sin_p14 + (p.y * sinz * this.cos_p14) / rh);\n con = Math.abs(this.lat0) - HALF_PI;\n if (Math.abs(con) <= EPSLN) {\n if (this.lat0 >= 0) {\n lon = adjust_lon(this.long0 + Math.atan2(p.x, - p.y));\n }\n else {\n lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y));\n }\n p.x = lon;\n p.y = lat;\n return p;\n }\n lon = adjust_lon(this.long0 + Math.atan2((p.x * sinz), rh * this.cos_p14 * cosz - p.y * this.sin_p14 * sinz));\n p.x = lon;\n p.y = lat;\n return p;\n }\n\n var names$27 = [\"ortho\"];\n var ortho = {\n init: init$26,\n forward: forward$25,\n inverse: inverse$25,\n names: names$27\n };\n\n // QSC projection rewritten from the original PROJ4\n // https://github.com/OSGeo/proj.4/blob/master/src/PJ_qsc.c\n\n /* constants */\n var FACE_ENUM = {\n FRONT: 1,\n RIGHT: 2,\n BACK: 3,\n LEFT: 4,\n TOP: 5,\n BOTTOM: 6\n };\n\n var AREA_ENUM = {\n AREA_0: 1,\n AREA_1: 2,\n AREA_2: 3,\n AREA_3: 4\n };\n\n function init$27() {\n\n this.x0 = this.x0 || 0;\n this.y0 = this.y0 || 0;\n this.lat0 = this.lat0 || 0;\n this.long0 = this.long0 || 0;\n this.lat_ts = this.lat_ts || 0;\n this.title = this.title || \"Quadrilateralized Spherical Cube\";\n\n /* Determine the cube face from the center of projection. */\n if (this.lat0 >= HALF_PI - FORTPI / 2.0) {\n this.face = FACE_ENUM.TOP;\n } else if (this.lat0 <= -(HALF_PI - FORTPI / 2.0)) {\n this.face = FACE_ENUM.BOTTOM;\n } else if (Math.abs(this.long0) <= FORTPI) {\n this.face = FACE_ENUM.FRONT;\n } else if (Math.abs(this.long0) <= HALF_PI + FORTPI) {\n this.face = this.long0 > 0.0 ? FACE_ENUM.RIGHT : FACE_ENUM.LEFT;\n } else {\n this.face = FACE_ENUM.BACK;\n }\n\n /* Fill in useful values for the ellipsoid <-> sphere shift\n * described in [LK12]. */\n if (this.es !== 0) {\n this.one_minus_f = 1 - (this.a - this.b) / this.a;\n this.one_minus_f_squared = this.one_minus_f * this.one_minus_f;\n }\n }\n\n // QSC forward equations--mapping lat,long to x,y\n // -----------------------------------------------------------------\n function forward$26(p) {\n var xy = {x: 0, y: 0};\n var lat, lon;\n var theta, phi;\n var t, mu;\n /* nu; */\n var area = {value: 0};\n\n // move lon according to projection's lon\n p.x -= this.long0;\n\n /* Convert the geodetic latitude to a geocentric latitude.\n * This corresponds to the shift from the ellipsoid to the sphere\n * described in [LK12]. */\n if (this.es !== 0) {//if (P->es != 0) {\n lat = Math.atan(this.one_minus_f_squared * Math.tan(p.y));\n } else {\n lat = p.y;\n }\n\n /* Convert the input lat, lon into theta, phi as used by QSC.\n * This depends on the cube face and the area on it.\n * For the top and bottom face, we can compute theta and phi\n * directly from phi, lam. For the other faces, we must use\n * unit sphere cartesian coordinates as an intermediate step. */\n lon = p.x; //lon = lp.lam;\n if (this.face === FACE_ENUM.TOP) {\n phi = HALF_PI - lat;\n if (lon >= FORTPI && lon <= HALF_PI + FORTPI) {\n area.value = AREA_ENUM.AREA_0;\n theta = lon - HALF_PI;\n } else if (lon > HALF_PI + FORTPI || lon <= -(HALF_PI + FORTPI)) {\n area.value = AREA_ENUM.AREA_1;\n theta = (lon > 0.0 ? lon - SPI : lon + SPI);\n } else if (lon > -(HALF_PI + FORTPI) && lon <= -FORTPI) {\n area.value = AREA_ENUM.AREA_2;\n theta = lon + HALF_PI;\n } else {\n area.value = AREA_ENUM.AREA_3;\n theta = lon;\n }\n } else if (this.face === FACE_ENUM.BOTTOM) {\n phi = HALF_PI + lat;\n if (lon >= FORTPI && lon <= HALF_PI + FORTPI) {\n area.value = AREA_ENUM.AREA_0;\n theta = -lon + HALF_PI;\n } else if (lon < FORTPI && lon >= -FORTPI) {\n area.value = AREA_ENUM.AREA_1;\n theta = -lon;\n } else if (lon < -FORTPI && lon >= -(HALF_PI + FORTPI)) {\n area.value = AREA_ENUM.AREA_2;\n theta = -lon - HALF_PI;\n } else {\n area.value = AREA_ENUM.AREA_3;\n theta = (lon > 0.0 ? -lon + SPI : -lon - SPI);\n }\n } else {\n var q, r, s;\n var sinlat, coslat;\n var sinlon, coslon;\n\n if (this.face === FACE_ENUM.RIGHT) {\n lon = qsc_shift_lon_origin(lon, +HALF_PI);\n } else if (this.face === FACE_ENUM.BACK) {\n lon = qsc_shift_lon_origin(lon, +SPI);\n } else if (this.face === FACE_ENUM.LEFT) {\n lon = qsc_shift_lon_origin(lon, -HALF_PI);\n }\n sinlat = Math.sin(lat);\n coslat = Math.cos(lat);\n sinlon = Math.sin(lon);\n coslon = Math.cos(lon);\n q = coslat * coslon;\n r = coslat * sinlon;\n s = sinlat;\n\n if (this.face === FACE_ENUM.FRONT) {\n phi = Math.acos(q);\n theta = qsc_fwd_equat_face_theta(phi, s, r, area);\n } else if (this.face === FACE_ENUM.RIGHT) {\n phi = Math.acos(r);\n theta = qsc_fwd_equat_face_theta(phi, s, -q, area);\n } else if (this.face === FACE_ENUM.BACK) {\n phi = Math.acos(-q);\n theta = qsc_fwd_equat_face_theta(phi, s, -r, area);\n } else if (this.face === FACE_ENUM.LEFT) {\n phi = Math.acos(-r);\n theta = qsc_fwd_equat_face_theta(phi, s, q, area);\n } else {\n /* Impossible */\n phi = theta = 0;\n area.value = AREA_ENUM.AREA_0;\n }\n }\n\n /* Compute mu and nu for the area of definition.\n * For mu, see Eq. (3-21) in [OL76], but note the typos:\n * compare with Eq. (3-14). For nu, see Eq. (3-38). */\n mu = Math.atan((12 / SPI) * (theta + Math.acos(Math.sin(theta) * Math.cos(FORTPI)) - HALF_PI));\n t = Math.sqrt((1 - Math.cos(phi)) / (Math.cos(mu) * Math.cos(mu)) / (1 - Math.cos(Math.atan(1 / Math.cos(theta)))));\n\n /* Apply the result to the real area. */\n if (area.value === AREA_ENUM.AREA_1) {\n mu += HALF_PI;\n } else if (area.value === AREA_ENUM.AREA_2) {\n mu += SPI;\n } else if (area.value === AREA_ENUM.AREA_3) {\n mu += 1.5 * SPI;\n }\n\n /* Now compute x, y from mu and nu */\n xy.x = t * Math.cos(mu);\n xy.y = t * Math.sin(mu);\n xy.x = xy.x * this.a + this.x0;\n xy.y = xy.y * this.a + this.y0;\n\n p.x = xy.x;\n p.y = xy.y;\n return p;\n }\n\n // QSC inverse equations--mapping x,y to lat/long\n // -----------------------------------------------------------------\n function inverse$26(p) {\n var lp = {lam: 0, phi: 0};\n var mu, nu, cosmu, tannu;\n var tantheta, theta, cosphi, phi;\n var t;\n var area = {value: 0};\n\n /* de-offset */\n p.x = (p.x - this.x0) / this.a;\n p.y = (p.y - this.y0) / this.a;\n\n /* Convert the input x, y to the mu and nu angles as used by QSC.\n * This depends on the area of the cube face. */\n nu = Math.atan(Math.sqrt(p.x * p.x + p.y * p.y));\n mu = Math.atan2(p.y, p.x);\n if (p.x >= 0.0 && p.x >= Math.abs(p.y)) {\n area.value = AREA_ENUM.AREA_0;\n } else if (p.y >= 0.0 && p.y >= Math.abs(p.x)) {\n area.value = AREA_ENUM.AREA_1;\n mu -= HALF_PI;\n } else if (p.x < 0.0 && -p.x >= Math.abs(p.y)) {\n area.value = AREA_ENUM.AREA_2;\n mu = (mu < 0.0 ? mu + SPI : mu - SPI);\n } else {\n area.value = AREA_ENUM.AREA_3;\n mu += HALF_PI;\n }\n\n /* Compute phi and theta for the area of definition.\n * The inverse projection is not described in the original paper, but some\n * good hints can be found here (as of 2011-12-14):\n * http://fits.gsfc.nasa.gov/fitsbits/saf.93/saf.9302\n * (search for \"Message-Id: <9302181759.AA25477 at fits.cv.nrao.edu>\") */\n t = (SPI / 12) * Math.tan(mu);\n tantheta = Math.sin(t) / (Math.cos(t) - (1 / Math.sqrt(2)));\n theta = Math.atan(tantheta);\n cosmu = Math.cos(mu);\n tannu = Math.tan(nu);\n cosphi = 1 - cosmu * cosmu * tannu * tannu * (1 - Math.cos(Math.atan(1 / Math.cos(theta))));\n if (cosphi < -1) {\n cosphi = -1;\n } else if (cosphi > +1) {\n cosphi = +1;\n }\n\n /* Apply the result to the real area on the cube face.\n * For the top and bottom face, we can compute phi and lam directly.\n * For the other faces, we must use unit sphere cartesian coordinates\n * as an intermediate step. */\n if (this.face === FACE_ENUM.TOP) {\n phi = Math.acos(cosphi);\n lp.phi = HALF_PI - phi;\n if (area.value === AREA_ENUM.AREA_0) {\n lp.lam = theta + HALF_PI;\n } else if (area.value === AREA_ENUM.AREA_1) {\n lp.lam = (theta < 0.0 ? theta + SPI : theta - SPI);\n } else if (area.value === AREA_ENUM.AREA_2) {\n lp.lam = theta - HALF_PI;\n } else /* area.value == AREA_ENUM.AREA_3 */ {\n lp.lam = theta;\n }\n } else if (this.face === FACE_ENUM.BOTTOM) {\n phi = Math.acos(cosphi);\n lp.phi = phi - HALF_PI;\n if (area.value === AREA_ENUM.AREA_0) {\n lp.lam = -theta + HALF_PI;\n } else if (area.value === AREA_ENUM.AREA_1) {\n lp.lam = -theta;\n } else if (area.value === AREA_ENUM.AREA_2) {\n lp.lam = -theta - HALF_PI;\n } else /* area.value == AREA_ENUM.AREA_3 */ {\n lp.lam = (theta < 0.0 ? -theta - SPI : -theta + SPI);\n }\n } else {\n /* Compute phi and lam via cartesian unit sphere coordinates. */\n var q, r, s;\n q = cosphi;\n t = q * q;\n if (t >= 1) {\n s = 0;\n } else {\n s = Math.sqrt(1 - t) * Math.sin(theta);\n }\n t += s * s;\n if (t >= 1) {\n r = 0;\n } else {\n r = Math.sqrt(1 - t);\n }\n /* Rotate q,r,s into the correct area. */\n if (area.value === AREA_ENUM.AREA_1) {\n t = r;\n r = -s;\n s = t;\n } else if (area.value === AREA_ENUM.AREA_2) {\n r = -r;\n s = -s;\n } else if (area.value === AREA_ENUM.AREA_3) {\n t = r;\n r = s;\n s = -t;\n }\n /* Rotate q,r,s into the correct cube face. */\n if (this.face === FACE_ENUM.RIGHT) {\n t = q;\n q = -r;\n r = t;\n } else if (this.face === FACE_ENUM.BACK) {\n q = -q;\n r = -r;\n } else if (this.face === FACE_ENUM.LEFT) {\n t = q;\n q = r;\n r = -t;\n }\n /* Now compute phi and lam from the unit sphere coordinates. */\n lp.phi = Math.acos(-s) - HALF_PI;\n lp.lam = Math.atan2(r, q);\n if (this.face === FACE_ENUM.RIGHT) {\n lp.lam = qsc_shift_lon_origin(lp.lam, -HALF_PI);\n } else if (this.face === FACE_ENUM.BACK) {\n lp.lam = qsc_shift_lon_origin(lp.lam, -SPI);\n } else if (this.face === FACE_ENUM.LEFT) {\n lp.lam = qsc_shift_lon_origin(lp.lam, +HALF_PI);\n }\n }\n\n /* Apply the shift from the sphere to the ellipsoid as described\n * in [LK12]. */\n if (this.es !== 0) {\n var invert_sign;\n var tanphi, xa;\n invert_sign = (lp.phi < 0 ? 1 : 0);\n tanphi = Math.tan(lp.phi);\n xa = this.b / Math.sqrt(tanphi * tanphi + this.one_minus_f_squared);\n lp.phi = Math.atan(Math.sqrt(this.a * this.a - xa * xa) / (this.one_minus_f * xa));\n if (invert_sign) {\n lp.phi = -lp.phi;\n }\n }\n\n lp.lam += this.long0;\n p.x = lp.lam;\n p.y = lp.phi;\n return p;\n }\n\n /* Helper function for forward projection: compute the theta angle\n * and determine the area number. */\n function qsc_fwd_equat_face_theta(phi, y, x, area) {\n var theta;\n if (phi < EPSLN) {\n area.value = AREA_ENUM.AREA_0;\n theta = 0.0;\n } else {\n theta = Math.atan2(y, x);\n if (Math.abs(theta) <= FORTPI) {\n area.value = AREA_ENUM.AREA_0;\n } else if (theta > FORTPI && theta <= HALF_PI + FORTPI) {\n area.value = AREA_ENUM.AREA_1;\n theta -= HALF_PI;\n } else if (theta > HALF_PI + FORTPI || theta <= -(HALF_PI + FORTPI)) {\n area.value = AREA_ENUM.AREA_2;\n theta = (theta >= 0.0 ? theta - SPI : theta + SPI);\n } else {\n area.value = AREA_ENUM.AREA_3;\n theta += HALF_PI;\n }\n }\n return theta;\n }\n\n /* Helper function: shift the longitude. */\n function qsc_shift_lon_origin(lon, offset) {\n var slon = lon + offset;\n if (slon < -SPI) {\n slon += TWO_PI;\n } else if (slon > +SPI) {\n slon -= TWO_PI;\n }\n return slon;\n }\n\n var names$28 = [\"Quadrilateralized Spherical Cube\", \"Quadrilateralized_Spherical_Cube\", \"qsc\"];\n var qsc = {\n init: init$27,\n forward: forward$26,\n inverse: inverse$26,\n names: names$28\n };\n\n // Robinson projection\n // Based on https://github.com/OSGeo/proj.4/blob/master/src/PJ_robin.c\n // Polynomial coeficients from http://article.gmane.org/gmane.comp.gis.proj-4.devel/6039\n\n var COEFS_X = [\n [1.0000, 2.2199e-17, -7.15515e-05, 3.1103e-06],\n [0.9986, -0.000482243, -2.4897e-05, -1.3309e-06],\n [0.9954, -0.00083103, -4.48605e-05, -9.86701e-07],\n [0.9900, -0.00135364, -5.9661e-05, 3.6777e-06],\n [0.9822, -0.00167442, -4.49547e-06, -5.72411e-06],\n [0.9730, -0.00214868, -9.03571e-05, 1.8736e-08],\n [0.9600, -0.00305085, -9.00761e-05, 1.64917e-06],\n [0.9427, -0.00382792, -6.53386e-05, -2.6154e-06],\n [0.9216, -0.00467746, -0.00010457, 4.81243e-06],\n [0.8962, -0.00536223, -3.23831e-05, -5.43432e-06],\n [0.8679, -0.00609363, -0.000113898, 3.32484e-06],\n [0.8350, -0.00698325, -6.40253e-05, 9.34959e-07],\n [0.7986, -0.00755338, -5.00009e-05, 9.35324e-07],\n [0.7597, -0.00798324, -3.5971e-05, -2.27626e-06],\n [0.7186, -0.00851367, -7.01149e-05, -8.6303e-06],\n [0.6732, -0.00986209, -0.000199569, 1.91974e-05],\n [0.6213, -0.010418, 8.83923e-05, 6.24051e-06],\n [0.5722, -0.00906601, 0.000182, 6.24051e-06],\n [0.5322, -0.00677797, 0.000275608, 6.24051e-06]\n ];\n\n var COEFS_Y = [\n [-5.20417e-18, 0.0124, 1.21431e-18, -8.45284e-11],\n [0.0620, 0.0124, -1.26793e-09, 4.22642e-10],\n [0.1240, 0.0124, 5.07171e-09, -1.60604e-09],\n [0.1860, 0.0123999, -1.90189e-08, 6.00152e-09],\n [0.2480, 0.0124002, 7.10039e-08, -2.24e-08],\n [0.3100, 0.0123992, -2.64997e-07, 8.35986e-08],\n [0.3720, 0.0124029, 9.88983e-07, -3.11994e-07],\n [0.4340, 0.0123893, -3.69093e-06, -4.35621e-07],\n [0.4958, 0.0123198, -1.02252e-05, -3.45523e-07],\n [0.5571, 0.0121916, -1.54081e-05, -5.82288e-07],\n [0.6176, 0.0119938, -2.41424e-05, -5.25327e-07],\n [0.6769, 0.011713, -3.20223e-05, -5.16405e-07],\n [0.7346, 0.0113541, -3.97684e-05, -6.09052e-07],\n [0.7903, 0.0109107, -4.89042e-05, -1.04739e-06],\n [0.8435, 0.0103431, -6.4615e-05, -1.40374e-09],\n [0.8936, 0.00969686, -6.4636e-05, -8.547e-06],\n [0.9394, 0.00840947, -0.000192841, -4.2106e-06],\n [0.9761, 0.00616527, -0.000256, -4.2106e-06],\n [1.0000, 0.00328947, -0.000319159, -4.2106e-06]\n ];\n\n var FXC = 0.8487;\n var FYC = 1.3523;\n var C1 = R2D/5; // rad to 5-degree interval\n var RC1 = 1/C1;\n var NODES = 18;\n\n var poly3_val = function(coefs, x) {\n return coefs[0] + x * (coefs[1] + x * (coefs[2] + x * coefs[3]));\n };\n\n var poly3_der = function(coefs, x) {\n return coefs[1] + x * (2 * coefs[2] + x * 3 * coefs[3]);\n };\n\n function newton_rapshon(f_df, start, max_err, iters) {\n var x = start;\n for (; iters; --iters) {\n var upd = f_df(x);\n x -= upd;\n if (Math.abs(upd) < max_err) {\n break;\n }\n }\n return x;\n }\n\n function init$28() {\n this.x0 = this.x0 || 0;\n this.y0 = this.y0 || 0;\n this.long0 = this.long0 || 0;\n this.es = 0;\n this.title = this.title || \"Robinson\";\n }\n\n function forward$27(ll) {\n var lon = adjust_lon(ll.x - this.long0);\n\n var dphi = Math.abs(ll.y);\n var i = Math.floor(dphi * C1);\n if (i < 0) {\n i = 0;\n } else if (i >= NODES) {\n i = NODES - 1;\n }\n dphi = R2D * (dphi - RC1 * i);\n var xy = {\n x: poly3_val(COEFS_X[i], dphi) * lon,\n y: poly3_val(COEFS_Y[i], dphi)\n };\n if (ll.y < 0) {\n xy.y = -xy.y;\n }\n\n xy.x = xy.x * this.a * FXC + this.x0;\n xy.y = xy.y * this.a * FYC + this.y0;\n return xy;\n }\n\n function inverse$27(xy) {\n var ll = {\n x: (xy.x - this.x0) / (this.a * FXC),\n y: Math.abs(xy.y - this.y0) / (this.a * FYC)\n };\n\n if (ll.y >= 1) { // pathologic case\n ll.x /= COEFS_X[NODES][0];\n ll.y = xy.y < 0 ? -HALF_PI : HALF_PI;\n } else {\n // find table interval\n var i = Math.floor(ll.y * NODES);\n if (i < 0) {\n i = 0;\n } else if (i >= NODES) {\n i = NODES - 1;\n }\n for (;;) {\n if (COEFS_Y[i][0] > ll.y) {\n --i;\n } else if (COEFS_Y[i+1][0] <= ll.y) {\n ++i;\n } else {\n break;\n }\n }\n // linear interpolation in 5 degree interval\n var coefs = COEFS_Y[i];\n var t = 5 * (ll.y - coefs[0]) / (COEFS_Y[i+1][0] - coefs[0]);\n // find t so that poly3_val(coefs, t) = ll.y\n t = newton_rapshon(function(x) {\n return (poly3_val(coefs, x) - ll.y) / poly3_der(coefs, x);\n }, t, EPSLN, 100);\n\n ll.x /= poly3_val(COEFS_X[i], t);\n ll.y = (5 * i + t) * D2R;\n if (xy.y < 0) {\n ll.y = -ll.y;\n }\n }\n\n ll.x = adjust_lon(ll.x + this.long0);\n return ll;\n }\n\n var names$29 = [\"Robinson\", \"robin\"];\n var robin = {\n init: init$28,\n forward: forward$27,\n inverse: inverse$27,\n names: names$29\n };\n\n function init$29() {\n this.name = 'geocent';\n\n }\n\n function forward$28(p) {\n var point = geodeticToGeocentric(p, this.es, this.a);\n return point;\n }\n\n function inverse$28(p) {\n var point = geocentricToGeodetic(p, this.es, this.a, this.b);\n return point;\n }\n\n var names$30 = [\"Geocentric\", 'geocentric', \"geocent\", \"Geocent\"];\n var geocent = {\n init: init$29,\n forward: forward$28,\n inverse: inverse$28,\n names: names$30\n };\n\n var mode = {\n N_POLE: 0,\n S_POLE: 1,\n EQUIT: 2,\n OBLIQ: 3\n };\n\n var params = {\n h: { def: 100000, num: true }, // default is Karman line, no default in PROJ.7\n azi: { def: 0, num: true, degrees: true }, // default is North\n tilt: { def: 0, num: true, degrees: true }, // default is Nadir\n long0: { def: 0, num: true }, // default is Greenwich, conversion to rad is automatic\n lat0: { def: 0, num: true } // default is Equator, conversion to rad is automatic\n };\n\n function init$30() {\n Object.keys(params).forEach(function (p) {\n if (typeof this[p] === \"undefined\") {\n this[p] = params[p].def;\n } else if (params[p].num && isNaN(this[p])) {\n throw new Error(\"Invalid parameter value, must be numeric \" + p + \" = \" + this[p]);\n } else if (params[p].num) {\n this[p] = parseFloat(this[p]);\n }\n if (params[p].degrees) {\n this[p] = this[p] * D2R;\n }\n }.bind(this));\n\n if (Math.abs((Math.abs(this.lat0) - HALF_PI)) < EPSLN) {\n this.mode = this.lat0 < 0 ? mode.S_POLE : mode.N_POLE;\n } else if (Math.abs(this.lat0) < EPSLN) {\n this.mode = mode.EQUIT;\n } else {\n this.mode = mode.OBLIQ;\n this.sinph0 = Math.sin(this.lat0);\n this.cosph0 = Math.cos(this.lat0);\n }\n\n this.pn1 = this.h / this.a; // Normalize relative to the Earth's radius\n\n if (this.pn1 <= 0 || this.pn1 > 1e10) {\n throw new Error(\"Invalid height\");\n }\n \n this.p = 1 + this.pn1;\n this.rp = 1 / this.p;\n this.h1 = 1 / this.pn1;\n this.pfact = (this.p + 1) * this.h1;\n this.es = 0;\n\n var omega = this.tilt;\n var gamma = this.azi;\n this.cg = Math.cos(gamma);\n this.sg = Math.sin(gamma);\n this.cw = Math.cos(omega);\n this.sw = Math.sin(omega);\n }\n\n function forward$29(p) {\n p.x -= this.long0;\n var sinphi = Math.sin(p.y);\n var cosphi = Math.cos(p.y);\n var coslam = Math.cos(p.x);\n var x, y;\n switch (this.mode) {\n case mode.OBLIQ:\n y = this.sinph0 * sinphi + this.cosph0 * cosphi * coslam;\n break;\n case mode.EQUIT:\n y = cosphi * coslam;\n break;\n case mode.S_POLE:\n y = -sinphi;\n break;\n case mode.N_POLE:\n y = sinphi;\n break;\n }\n y = this.pn1 / (this.p - y);\n x = y * cosphi * Math.sin(p.x);\n\n switch (this.mode) {\n case mode.OBLIQ:\n y *= this.cosph0 * sinphi - this.sinph0 * cosphi * coslam;\n break;\n case mode.EQUIT:\n y *= sinphi;\n break;\n case mode.N_POLE:\n y *= -(cosphi * coslam);\n break;\n case mode.S_POLE:\n y *= cosphi * coslam;\n break;\n }\n\n // Tilt \n var yt, ba;\n yt = y * this.cg + x * this.sg;\n ba = 1 / (yt * this.sw * this.h1 + this.cw);\n x = (x * this.cg - y * this.sg) * this.cw * ba;\n y = yt * ba;\n\n p.x = x * this.a;\n p.y = y * this.a;\n return p;\n }\n\n function inverse$29(p) {\n p.x /= this.a;\n p.y /= this.a;\n var r = { x: p.x, y: p.y };\n\n // Un-Tilt\n var bm, bq, yt;\n yt = 1 / (this.pn1 - p.y * this.sw);\n bm = this.pn1 * p.x * yt;\n bq = this.pn1 * p.y * this.cw * yt;\n p.x = bm * this.cg + bq * this.sg;\n p.y = bq * this.cg - bm * this.sg;\n\n var rh = hypot(p.x, p.y);\n if (Math.abs(rh) < EPSLN) {\n r.x = 0;\n r.y = p.y;\n } else {\n var cosz, sinz;\n sinz = 1 - rh * rh * this.pfact;\n sinz = (this.p - Math.sqrt(sinz)) / (this.pn1 / rh + rh / this.pn1);\n cosz = Math.sqrt(1 - sinz * sinz);\n switch (this.mode) {\n case mode.OBLIQ:\n r.y = Math.asin(cosz * this.sinph0 + p.y * sinz * this.cosph0 / rh);\n p.y = (cosz - this.sinph0 * Math.sin(r.y)) * rh;\n p.x *= sinz * this.cosph0;\n break;\n case mode.EQUIT:\n r.y = Math.asin(p.y * sinz / rh);\n p.y = cosz * rh;\n p.x *= sinz;\n break;\n case mode.N_POLE:\n r.y = Math.asin(cosz);\n p.y = -p.y;\n break;\n case mode.S_POLE:\n r.y = -Math.asin(cosz);\n break;\n }\n r.x = Math.atan2(p.x, p.y);\n }\n\n p.x = r.x + this.long0;\n p.y = r.y;\n return p;\n }\n\n var names$31 = [\"Tilted_Perspective\", \"tpers\"];\n var tpers = {\n init: init$30,\n forward: forward$29,\n inverse: inverse$29,\n names: names$31\n };\n\n var includedProjections = function(proj4){\n proj4.Proj.projections.add(tmerc);\n proj4.Proj.projections.add(etmerc);\n proj4.Proj.projections.add(utm);\n proj4.Proj.projections.add(sterea);\n proj4.Proj.projections.add(stere);\n proj4.Proj.projections.add(somerc);\n proj4.Proj.projections.add(omerc);\n proj4.Proj.projections.add(lcc);\n proj4.Proj.projections.add(krovak);\n proj4.Proj.projections.add(cass);\n proj4.Proj.projections.add(laea);\n proj4.Proj.projections.add(aea);\n proj4.Proj.projections.add(gnom);\n proj4.Proj.projections.add(cea);\n proj4.Proj.projections.add(eqc);\n proj4.Proj.projections.add(poly);\n proj4.Proj.projections.add(nzmg);\n proj4.Proj.projections.add(mill);\n proj4.Proj.projections.add(sinu);\n proj4.Proj.projections.add(moll);\n proj4.Proj.projections.add(eqdc);\n proj4.Proj.projections.add(vandg);\n proj4.Proj.projections.add(aeqd);\n proj4.Proj.projections.add(ortho);\n proj4.Proj.projections.add(qsc);\n proj4.Proj.projections.add(robin);\n proj4.Proj.projections.add(geocent);\n proj4.Proj.projections.add(tpers);\n };\n\n proj4$1.defaultDatum = 'WGS84'; //default datum\n proj4$1.Proj = Projection;\n proj4$1.WGS84 = new proj4$1.Proj('WGS84');\n proj4$1.Point = Point;\n proj4$1.toPoint = toPoint;\n proj4$1.defs = defs;\n proj4$1.nadgrid = nadgrid;\n proj4$1.transform = transform;\n proj4$1.mgrs = mgrs;\n proj4$1.version = '2.7.5';\n includedProjections(proj4$1);\n\n return proj4$1;\n\n})));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9wcm9qNC9kaXN0L3Byb2o0LXNyYy5qcz8xMzVjIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0EsSUFBSSxLQUE0RDtBQUNoRSxJQUFJLFNBQzBCO0FBQzlCLENBQUMscUJBQXFCOztBQUV0QjtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLDRDQUE0QztBQUM1QztBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxzQkFBc0I7QUFDdEIsd0JBQXdCO0FBQ3hCLHdDQUF3QztBQUN4QywwQ0FBMEM7QUFDMUMsbURBQW1EO0FBQ25EO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQT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ICBsYXRfMTogZnVuY3Rpb24odikge1xuICAgICAgICAgIHNlbGYubGF0MSA9IHYgKiBEMlI7XG4gICAgICAgIH0sXG4gICAgICAgIGxhdF8yOiBmdW5jdGlvbih2KSB7XG4gICAgICAgICAgc2VsZi5sYXQyID0gdiAqIEQyUjtcbiAgICAgICAgfSxcbiAgICAgICAgbGF0X3RzOiBmdW5jdGlvbih2KSB7XG4gICAgICAgICAgc2VsZi5sYXRfdHMgPSB2ICogRDJSO1xuICAgICAgICB9LFxuICAgICAgICBsb25fMDogZnVuY3Rpb24odikge1xuICAgICAgICAgIHNlbGYubG9uZzAgPSB2ICogRDJSO1xuICAgICAgICB9LFxuICAgICAgICBsb25fMTogZnVuY3Rpb24odikge1xuICAgICAgICAgIHNlbGYubG9uZzEgPSB2ICogRDJSO1xuICAgICAgICB9LFxuICAgICAgICBsb25fMjogZnVuY3Rpb24odikge1xuICAgICAgICAgIHNlbGYubG9uZzIgPSB2ICogRDJSO1xuICAgICAgICB9LFxuICAgICAgICBhbHBoYTogZnVuY3Rpb24odikge1xuICAgICAgICAgIHNlbGYuYWxwaGEgPSBwYXJzZUZsb2F0KHYpICogRDJSO1xuICAgICAgICB9LFxuICAgICAgICBnYW1tYTogZnVuY3Rpb24odikge1xuICAgICAgICAgIHNlbGYucmVjdGlmaWVkX2dyaWRfYW5nbGUgPSBwYXJzZUZsb2F0KHYpO1xuICAgICAgICB9LFxuICAgICAgICBsb25jOiBmdW5jdGlvbih2KSB7XG4gICAgICAgICAgc2VsZi5sb25nYyA9IHYgKiBEMlI7XG4gICAgICAgIH0sXG4gICAgICAgIHhfMDogZnVuY3Rpb24odikge1xuICAgICAgICAgIHNlbGYueDAgPSBwYXJzZUZsb2F0KHYpO1xuICAgICAgICB9LFxuICAgICAgICB5XzA6IGZ1bmN0aW9uKHYpIHtcbiAgICAgICAgICBzZWxmLnkwID0gcGFyc2VGbG9hdCh2KTtcbiAgICAgICAgfSxcbiAgICAgICAga18wOiBmdW5jdGlvbih2KSB7XG4gICAgICAgICAgc2VsZi5rMCA9IHBhcnNlRmxvYXQodik7XG4gICAgICAgIH0sXG4gICAgICAgIGs6IGZ1bmN0aW9uKHYpIHtcbiAgICAgICAgICBzZWxmLmswID0gcGFyc2VGbG9hdCh2KTtcbiAgICAgICAgfSxcbiAgICAgICAgYTogZnVuY3Rpb24odikge1xuICAgICAgICAgIHNlbGYuYSA9IHBhcnNlRmxvYXQodik7XG4gICAgICAgIH0sXG4gICAgICAgIGI6IGZ1bmN0aW9uKHYpIHtcbiAgICAgICAgICBzZWxmLmIgPSBwYXJzZUZsb2F0KHYpO1xuICAgICAgICB9LFxuICAgICAgICByX2E6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHNlbGYuUl9BID0gdHJ1ZTtcbiAgICAgICAgfSxcbiAgICAgICAgem9uZTogZnVuY3Rpb24odikge1xuICAgICAgICAgIHNlbGYuem9uZSA9IHBhcnNlSW50KHYsIDEwKTtcbiAgICAgICAgfSxcbiAgICAgICAgc291dGg6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHNlbGYudXRtU291dGggPSB0cnVlO1xuICAgICAgICB9LFxuICAgICAgICB0b3dnczg0OiBmdW5jdGlvbih2KSB7XG4gICAgICAgICAgc2VsZi5kYXR1bV9wYXJhbXMgPSB2LnNwbGl0KFwiLFwiKS5tYXAoZnVuY3Rpb24oYSkge1xuICAgICAgICAgICAgcmV0dXJuIHBhcnNlRmxvYXQoYSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHRvX21ldGVyOiBmdW5jdGlvbih2KSB7XG4gICAgICAgICAgc2VsZi50b19tZXRlciA9IHBhcnNlRmxvYXQodik7XG4gICAgICAgIH0sXG4gICAgICAgIHVuaXRzOiBmdW5jdGlvbih2KSB7XG4gICAgICAgICAgc2VsZi51bml0cyA9IHY7XG4gICAgICAgICAgdmFyIHVuaXQgPSBtYXRjaCh1bml0cywgdik7XG4gICAgICAgICAgaWYgKHVuaXQpIHtcbiAgICAgICAgICAgIHNlbGYudG9fbWV0ZXIgPSB1bml0LnRvX21ldGVyO1xuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZnJvbV9ncmVlbndpY2g6IGZ1bmN0aW9uKHYpIHtcbiAgICAgICAgICBzZWxmLmZyb21fZ3JlZW53aWNoID0gdiAqIEQyUjtcbiAgICAgICAgfSxcbiAgICAgICAgcG06IGZ1bmN0aW9uKHYpIHtcbiAgICAgICAgICB2YXIgcG0gPSBtYXRjaChleHBvcnRzJDEsIHYpO1xuICAgICAgICAgIHNlbGYuZnJvbV9ncmVlbndpY2ggPSAocG0gPyBwbSA6IHBhcnNlRmxvYXQodikpICogRDJSO1xuICAgICAgICB9LFxuICAgICAgICBuYWRncmlkczogZnVuY3Rpb24odikge1xuICAgICAgICAgIGlmICh2ID09PSAnQG51bGwnKSB7XG4gICAgICAgICAgICBzZWxmLmRhdHVtQ29kZSA9ICdub25lJztcbiAgICAgICAgICB9XG4gICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBzZWxmLm5hZGdyaWRzID0gdjtcbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGF4aXM6IGZ1bmN0aW9uKHYpIHtcbiAgICAgICAgICB2YXIgbGVnYWxBeGlzID0gXCJld25zdWRcIjtcbiAgICAgICAgICBpZiAodi5sZW5ndGggPT09IDMgJiYgbGVnYWxBeGlzLmluZGV4T2Yodi5zdWJzdHIoMCwgMSkpICE9PSAtMSAmJiBsZWdhbEF4aXMuaW5kZXhPZih2LnN1YnN0cigxLCAxKSkgIT09IC0xICYmIGxlZ2FsQXhpcy5pbmRleE9mKHYuc3Vic3RyKDIsIDEpKSAhPT0gLTEpIHtcbiAgICAgICAgICAgIHNlbGYuYXhpcyA9IHY7XG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBhcHByb3g6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHNlbGYuYXBwcm94ID0gdHJ1ZTtcbiAgICA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5jdXJyZW50T2JqZWN0LnB1c2godGhpcy53b3JkKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLndvcmQgPSBudWxsO1xuICAgICAgICB0aGlzLnN0YXRlID0gTkVVVFJBTDtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgICAgaWYgKGNoYXIgPT09ICddJykge1xuICAgICAgICB0aGlzLmxldmVsLS07XG4gICAgICAgIGlmICh0aGlzLndvcmQgIT09IG51bGwpIHtcbiAgICAgICAgICB0aGlzLmN1cnJlbnRPYmplY3QucHVzaCh0aGlzLndvcmQpO1xuICAgICAgICAgIHRoaXMud29yZCA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5zdGF0ZSA9IE5FVVRSQUw7XG4gICAgICAgIHRoaXMuY3VycmVudE9iamVjdCA9IHRoaXMuc3RhY2sucG9wKCk7XG4gICAgICAgIGlmICghdGhpcy5jdXJyZW50T2JqZWN0KSB7XG4gICAgICAgICAgdGhpcy5zdGF0ZSA9IEVOREVEO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgIH07XG4gICAgUGFyc2VyLnByb3RvdHlwZS5udW1iZXIgPSBmdW5jdGlvbihjaGFyKSB7XG4gICAgICBpZiAoZGlnZXRzLnRlc3QoY2hhcikpIHtcbiAgICAgICAgdGhpcy53b3JkICs9IGNoYXI7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIGlmIChlbmRUaGluZ3MudGVzdChjaGFyKSkge1xuICAgICAgICB0aGlzLndvcmQgPSBwYXJzZUZsb2F0KHRoaXMud29yZCk7XG4gICAgICAgIHRoaXMuYWZ0ZXJJdGVtKGNoYXIpO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ2hhdm5cXCd0IGhhbmRsZWQgXCInICtjaGFyICsgJ1wiIGluIG51bWJlciB5ZXQsIGluZGV4ICcgKyB0aGlzLnBsYWNlKTtcbiAgICB9O1xuICAgIFBhcnNlci5wcm90b3R5cGUucXVvdGVkID0gZnVuY3Rpb24oY2hhcikge1xuICAgICAgaWYgKGNoYXIgPT09ICdcIicpIHtcbiAgICAgICAgdGhpcy5zdGF0ZSA9IEFGVEVSUVVPVEU7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIHRoaXMud29yZCArPSBjaGFyO1xuICAgICAgcmV0dXJuO1xuICAgIH07XG4gICAgUGFyc2VyLnByb3RvdHlwZS5rZXl3b3JkID0gZnVuY3Rpb24oY2hhcikge1xuICAgICAgaWYgKGtleXdvcmQudGVzdChjaGFyKSkge1xuICAgICAgICB0aGlzLndvcmQgKz0gY2hhcjtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgICAgaWYgKGNoYXIgPT09ICdbJykge1xuICAgICAgICB2YXIgbmV3T2JqZWN0cyA9IFtdO1xuICAgICAgICBuZXdPYmplY3RzLnB1c2godGhpcy53b3JkKTtcbiAgICAgICAgdGhpcy5sZXZlbCsrO1xuICAgICAgICBpZiAodGhpcy5yb290ID09PSBudWxsKSB7XG4gICAgICAgICAgdGhpcy5yb290ID0gbmV3T2JqZWN0cztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aGlzLmN1cnJlbnRPYmplY3QucHVzaChuZXdPYmplY3RzKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnN0YWNrLnB1c2godGhpcy5jdXJyZW50T2JqZWN0KTtcbiAgICAgICAgdGhpcy5jdXJyZW50T2JqZWN0ID0gbmV3T2JqZWN0cztcbiAgICAgICAgdGhpcy5zdGF0ZSA9IE5FVVRSQUw7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIGlmIChlbmRUaGluZ3MudGVzdChjaGFyKSkge1xuICAgICAgICB0aGlzLmFmdGVySXRlbShjaGFyKTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgICAgdGhyb3cgbmV3IEVycm9yKCdo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uICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh2WzBdKSkge1xuICAgICAgICAgIG9ialtrZXldID0ge307XG4gICAgICAgICAgc0V4cHIodlswXSwgb2JqW2tleV0pO1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBvYmpba2V5XSA9IHZbMF07XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIGlmICghdi5sZW5ndGgpIHtcbiAgICAgICAgb2JqW2tleV0gPSB0cnVlO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG4gICAgICBpZiAoa2V5ID09PSAnVE9XR1M4NCcpIHtcbiAgICAgICAgb2JqW2tleV0gPSB2O1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG4gICAgICBpZiAoa2V5ID09PSAnQVhJUycpIHtcbiAgICAgICAgaWYgKCEoa2V5IGluIG9iaikpIHtcbiAgICAgICAgICBvYmpba2V5XSA9IFtdO1xuICAgICAgICB9XG4gICAgICAgIG9ialtrZXldLnB1c2godik7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIGlmICghQXJyYXkuaXNBcnJheShrZXkpKSB7XG4gICAgICAgIG9ialtrZXldID0ge307XG4gICAgICB9XG5cbiAgICAgIHZhciBpO1xuICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgY2FzZSAnVU5JVCc6XG4gICAgICAgIGNhc2UgJ1BSSU1FTSc6XG4gICAgICAgIGNhc2UgJ1ZFUlRfREFUVU0nOlxuICAgICAgICAgIG9ialtrZXldID0ge1xuICAgICAgICAgICAgbmFtZTogdlswXS50b0xvd2VyQ2FzZSgpLFxuICAgICAgICAgICAgY29udmVydDogdlsxXVxuICAgICAgICAgIH07XG4gICAgICAgICAgaWYgKHYubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICBzRXhwcih2WzJdLCBvYmpba2V5XSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgY2FzZSAnU1BI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xuICAgICAgICAgIG1hcGl0KG9iaiwga2V5LCB2KTtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgaSA9IC0xO1xuICAgICAgICAgIHdoaWxlICgrK2kgPCB2Lmxlbmd0aCkge1xuICAgICAgICAgICAgaWYgKCFBcnJheS5pc0FycmF5KHZbaV0pKSB7XG4gICAgICAgICAgICAgIHJldHVybiBzRXhwcih2LCBvYmpba2V5XSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBtYXBpdChvYmosIGtleSwgdik7XG4gICAgICB9XG4gICAgfVxuXG4gICAgdmFyIEQyUiQxID0gMC4wMTc0NTMyOTI1MTk5NDMyOTU3NztcbiAgICBmdW5jdGlvbiByZW5hbWUob2JqLCBwYXJhbXMpIHtcbiAgICAgIHZhciBvdXROYW1lID0gcGFyYW1zWzBdO1xuICAgICAgdmFyIGluTmFtZSA9IHBhcmFtc1sxXTtcbiAgICAgIGlmICghKG91dE5hbWUgaW4gb2JqKSAmJiAoaW5OYW1lIGluIG9iaikpIHtcbiAgICAgICAgb2JqW291dE5hbWVdID0gb2JqW2luTmFtZV07XG4gICAgICAgIGlmIChwYXJhbXMubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgb2JqW291dE5hbWVdID0gcGFyYW1zWzJdKG9ialtvdXROYW1lXSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBkMnIoaW5wdXQpIHtcbiAgICAgIHJldHVybiBpbnB1dCAqIEQyUiQxO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGNsZWFuV0tUKHdrdCkge1xuICAgICAgaWYgKHdrdC50eXBlID09PSAnR0VPR0NTJykge1xuICAgICAgICB3a3QucHJvak5hbWUgPSAnbG9uZ2xhdCc7XG4gICAgICB9IGVsc2UgaWYgKHdrdC50eXBlID09PSAnTE9DQUxfQ1MnKSB7XG4gICAgICAgIHdrdC5wcm9qTmFtZSA9ICdpZGVudGl0eSc7XG4gICAgICAgIHdrdC5sb2NhbCA9IHRydWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAodHlwZW9mIHdrdC5QUk9KRUNUSU9OID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgIHdrdC5wcm9qTmFtZSA9IE9iamVjdC5rZXlzKHdrdC5QUk9KRUNUSU9OKVswXTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB3a3QucHJvak5hbWUgPSB3a3QuUFJPSkVDVElPTjtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKHdrdC5BWElTKSB7XG4gICAgICAgIHZhciBheGlzT3JkZXIgPSAnJztcbiAgICAgICAgZm9yICh2YXIgaSA9IDAsIGlpID0gd2t0LkFYSVMubGVuZ3RoOyBpIDwgaWk7ICsraSkge1xuICAgICAgICAgIHZhciBheGlzID0gW3drdC5BWElTW2ldWzBdLnRvTG93ZXJDYXNlKCksIHdrdC5BWElTW2ldWzFdLnRvTG93ZXJDYXNlKCldO1xuICAgICAgICAgIGlmIChheGlzWzBdLmluZGV4T2YoJ25vcnRoJykgIT09IC0xIHx8ICgoYXhpc1swXSA9PT0gJ3knIHx8IGF4aXNbMF0gPT09ICdsYXQnKSAmJiBheGlzWzFdID09PSAnbm9ydGgnKSkge1xuICAgICAgICAgICAgYXhpc09yZGVyICs9ICduJztcbiAgICAgICAgICB9IGVsc2UgaWYgKGF4aXNbMF0uaW5kZXhPZignc291dGgnKSAhPT0gLTEgfHwgKChheGlzWzBdID09PSAneScgfHwgYXhpc1swXSA9PT0gJ2xhdCcpICYmIGF4aXNbMV0gPT09ICdzb3V0aCcpKSB7XG4gICAgICAgICAgICBheGlzT3JkZXIgKz0gJ3MnO1xuICAgICAgICAgIH0gZWxzZSBpZiAoYXhpc1swXS5pbmRleE9mKCdlYXN0JykgIT09IC0xIHx8ICgoYXhpc1swXSA9PT0gJ3gnIHx8IGF4aXNbMF0gPT09ICdsb24nKSAmJiBheGlzWzFdID09PSAnZWFzdCcpKSB7XG4gICAgICAgICAgICBheGlzT3JkZXIgKz0gJ2UnO1xuICAgICAgICAgIH0gZWxzZSBpZiAoYXhpc1swXS5pbmRleE9mKCd3ZXN0JykgIT09IC0xIHx8ICgoYXhpc1swXSA9PT0gJ3gnIHx8IGF4aXNbMF0gPT09ICdsb24nKSAmJiBheGlzWzFdID09PSAnd2VzdCcpKSB7XG4gICAgICAgICAgICBheGlzT3JkZXIgKz0gJ3cnO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoYXhpc09yZGVyLmxlbmd0aCA9PT0gMikge1xuICAgICAgICAgIGF4aXNPcmRlciArPSAndSc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGF4aXNPcmRlci5sZW5ndGggPT09IDMpIHtcbiAgICAgICAgICB3a3QuYXhpcyA9IGF4aXNPcmRlcjtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKHdrdC5VTklUKSB7XG4gICAgICAgIHdrdC51bml0cyA9IHdrdC5VTklULm5hbWUudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgaWYgKHdrdC51bml0cyA9PT0gJ21ldHJlJykge1xuICAgICAgICAgIHdrdC51bml0cyA9ICdtZXRlcic7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHdrdC5VTklULmNvbnZlcnQpIHtcbiAgICAgICAgICBpZiAod2t0LnR5cGUgPT09ICdHRU9HQ1MnKSB7XG4gICAgICAgICAgICBpZiAod2t0LkRBVFVNICYmIHdrdC5EQVRVTS5TUEhFUk9JRCkge1xuICAgICAgICAgICAgICB3a3QudG9fbWV0ZXIgPSB3a3QuVU5JVC5jb252ZXJ0KndrdC5EQVRVTS5TUEhFUk9JRC5hO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB3a3QudG9fbWV0ZXIgPSB3a3QuVU5JVC5jb252ZXJ0O1xuICAgICAgICAg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LmFwcGx5KHRoYXQsIHYpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgIGRlZnModik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAodHlwZW9mIG5hbWUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgaWYgKG5hbWUgaW4gZGVmcykge1xuICAgICAgICAgICAgcmV0dXJuIGRlZnNbbmFtZV07XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKCdFUFNHJyBpbiBuYW1lKSB7XG4gICAgICAgICAgZGVmc1snRVBTRzonICsgbmFtZS5FUFNHXSA9IG5hbWU7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoJ0VTUkknIGluIG5hbWUpIHtcbiAgICAgICAgICBkZWZzWydFU1JJOicgKyBuYW1lLkVTUkldID0gbmFtZTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICgnSUFVMjAwMCcgaW4gbmFtZSkge1xuICAgICAgICAgIGRlZnNbJ0lBVTIwMDA6JyArIG5hbWUuSUFVMjAwMF0gPSBuYW1lO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIGNvbnNvbGUubG9nKG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuXG4gICAgfVxuICAgIGdsb2JhbHMoZGVmcyk7XG5cbiAgICBmdW5jdGlvbiB0ZXN0T2JqKGNvZGUpe1xuICAgICAgcmV0dXJuIHR5cGVvZiBjb2RlID09PSAnc3RyaW5nJztcbiAgICB9XG4gICAgZnVuY3Rpb24gdGVzdERlZihjb2RlKXtcbiAgICAgIHJldHVybiBjb2RlIGluIGRlZnM7XG4gICAgfVxuICAgIHZhciBjb2RlV29yZHMgPSBbJ1BST0pFQ1RFRENSUycsICdQUk9KQ1JTJywgJ0dFT0dDUycsJ0dF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ZiB0aGlzIGlzIGEgV0tUIHN0cmluZ1xuICAgICAgICBpZiAodGVzdERlZihjb2RlKSkge1xuICAgICAgICAgIHJldHVybiBkZWZzW2NvZGVdO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0ZXN0V0tUKGNvZGUpKSB7XG4gICAgICAgICAgdmFyIG91dCA9IHdrdChjb2RlKTtcbiAgICAgICAgICAvLyB0ZXN0IG9mIHNwZXRpYWwgY2FzZSwgZHVlIHRvIHRoaXMgYmVpbmcgYSB2ZXJ5IGNvbW1vbiBhbmQgb2Z0ZW4gbWFsZm9ybWVkXG4gICAgICAgICAgaWYgKGNoZWNrTWVyY2F0b3Iob3V0KSkge1xuICAgICAgICAgICAgcmV0dXJuIGRlZnNbJ0VQU0c6Mzg1NyddO1xuICAgICAgICAgIH1cbiAgICAgICAgICB2YXIgbWF5YmVQcm9qU3RyID0gY2hlY2tQcm9qU3RyKG91dCk7XG4gICAgICAgICAgaWYgKG1heWJlUHJvalN0cikge1xuICAgICAgICAgICAgcmV0dXJuIHBhcnNlUHJvaihtYXliZVByb2pTdHIpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gb3V0O1xuICAgICAgICB9XG4gICAgICAgIGlmICh0ZXN0UHJvaihjb2RlKSkge1xuICAgICAgICAgIHJldHVybiBwYXJzZVByb2ooY29kZSk7XG4gICAgICAgIH1cbiAgICAgIH1lbHNle1xuICAgICAgICByZXR1cm4gY29kZTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICB2YXIgZXh0ZW5kID0gZnVuY3Rpb24oZGVzdGluYXRpb24sIHNvdXJjZSkge1xuICAgICAgZGVzdGluYXRpb24gPSBkZXN0aW5hdGlvbiB8fCB7fTtcbiAgICAgIHZhciB2YWx1ZSwgcHJvcGVydHk7XG4gICAgICBpZiAoIXNvdXJjZSkge1xuICAgICAgICByZXR1cm4gZGVzdGluYXRpb247XG4gICAgICB9XG4gICAgICBmb3IgKHByb3BlcnR5IGluIHNvdXJjZSkge1xu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GF0X3RzKSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpZiAoIXRoaXMuazApIHtcbiAgICAgICAgICBpZiAodGhpcy5rKSB7XG4gICAgICAgICAgICB0aGlzLmswID0gdGhpcy5rO1xuICAgICAgICAgIH1cbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuazAgPSAxO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIC8qIE1lcmNhdG9yIGZvcndhcmQgZXF1YXRpb25zLS1tYXBwaW5nIGxhdCxsb25nIHRvIHgseVxuICAgICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qL1xuXG4gICAgZnVuY3Rpb24gZm9yd2FyZChwKSB7XG4gICAgICB2YXIgbG9uID0gcC54O1xuICAgICAgdmFyIGxhdCA9IHAueTtcbiAgICAgIC8vIGNvbnZlcnQgdG8gcmFkaWFuc1xuICAgICAgaWYgKGxhdCAqIFIyRCA+IDkwICYmIGxhdCAqIFIyRCA8IC05MCAmJiBsb24gKiBSMkQgPiAxODAgJiYgbG9uICogUjJEIDwgLTE4MCkge1xuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgIH1cblxuICAgICAgdmFyIHgsIHk7XG4gICAgICBpZiAoTWF0aC5hYnMoTWF0aC5hYnMobGF0KSAtIEhBTEZfUEkpIDw9IEVQU0xOKSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIGlmICh0aGlzLnNwaGVyZSkge1xuICAgICAgICAgIHggPSB0aGlzLngwICsgdGhpcy5hICogdGhpcy5rMCAqIGFkanVzdF9sb24obG9uIC0gdGhpcy5sb25nMCk7XG4gICAgICAgICAgeSA9IHRoaXMueTAgKyB0aGlzLmEgKiB0aGlzLmswICogTWF0aC5sb2coTWF0aC50YW4oRk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mxlbmd0aDtcbiAgICAgIGlmICghcHJvai5uYW1lcykge1xuICAgICAgICBjb25zb2xlLmxvZyhpKTtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9XG4gICAgICBwcm9qU3RvcmVbbGVuXSA9IHByb2o7XG4gICAgICBwcm9qLm5hbWVzLmZvckVhY2goZnVuY3Rpb24obikge1xuICAgICAgICBuYW1lc1tuLnRvTG93ZXJDYXNlKCldID0gbGVuO1xuICAgICAgfSk7XG4gICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBnZXQobmFtZSkge1xuICAgICAgaWYgKCFuYW1lKSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgIH1cbiAgICAgIHZhciBuID0gbmFtZS50b0xvd2VyQ2FzZSgpO1xuICAgICAgaWYgKHR5cGVvZiBuYW1lc1tuXSAhPT0gJ3VuZGVmaW5lZCcgJiYgcHJvalN0b3JlW25hbWVzW25dXSkge1xuICAgICAgICByZXR1cm4gcHJvalN0b3JlW25hbWVzW25dXTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBzdGFydCgpIHtcbiAgICAgIHByb2pzLmZvckVhY2goYWRkKTtcbiAgICB9XG4gICAgdmFyIHByb2plY3Rpb25zID0ge1xuICAgICAgc3RhcnQ6IHN0YXJ0LFxuICAgICAgYWRkOiBhZGQsXG4gICAgICBnZXQ6IGdldFxuICAgIH07XG5cbiAgICB2YXIgZXhwb3J0cyQyID0ge307XG4gICAgZXhwb3J0cyQyLk1FUklUID0ge1xuICAgICAgYTogNjM3ODEzNy4wLFxuICAgICAgcmY6IDI5OC4yNTcsXG4gICAgICBlbGxpcHNlTmFtZTogXCJNRVJJVCAxOTgzXCJcbiAgICB9O1xuXG4gICAgZXhwb3J0cyQyLlNHUzg1ID0ge1xuICAgICAgYTogNjM3ODEzNi4wLFxuICAgICAgcmY6IDI5OC4yNTcsXG4gICAgICBlbGxpcHNlTmFtZTogXCJ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gICAgICBncmlkU2hpZnRSZWNvcmRzLnB1c2gocmVjb3JkKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBncmlkU2hpZnRSZWNvcmRzO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIFByb2plY3Rpb24oc3JzQ29kZSxjYWxsYmFjaykge1xuICAgICAgaWYgKCEodGhpcyBpbnN0YW5jZW9mIFByb2plY3Rpb24pKSB7XG4gICAgICAgIHJldHVybiBuZXcgUHJvamVjdGlvbihzcnNDb2RlKTtcbiAgICAgIH1cbiAgICAgIGNhbGxiYWNrID0gY2FsbGJhY2sgfHwgZnVuY3Rpb24oZXJyb3Ipe1xuICAgICAgICBpZihlcnJvcil7XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgICB2YXIganNvbiA9IHBhcnNlKHNyc0NvZGUpO1xuICAgICAgaWYodHlwZW9mIGpzb24gIT09ICdvYmplY3QnKXtcbiAgICAgICAgY2FsbGJhY2soc3JzQ29kZSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIHZhciBvdXJQcm9qID0gUHJvamVjdGlvbi5wcm9qZWN0aW9ucy5nZXQoanNvbi5wcm9qTmFtZSk7XG4gICAgICBpZighb3VyUHJvail7XG4gICAgICAgIGNhbGxiYWNrKHNyc0NvZGUpO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG4gICAgICBpZiAoanNvbi5kYXR1bUNvZGUgJiYganNvbi5kYXR1bUNvZGUgIT09ICdub25lJykge1xuICAgICAgICB2YXIgZGF0dW1EZWYgPSBtYXRjaChleHBvcnRzJDMsIGpzb24uZGF0dW1Db2RlKTtcbiAgICAgICAgaWYgKGRhdHVtRGVmKSB7XG4gICAgICAgICAganNvbi5kYXR1bV9wYXJhbXMgPSBqc29uLmRhdHVtX3BhcmFtcyB8fCAoZGF0dW1EZWYudG93Z3M4NCA/IGRhdHVtRGVmLnRvd2dzODQuc3BsaXQoJywnKSA6IG51b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HJpY190b193Z3M4NFxuXG4gICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4gICAgLy8gcGpfZ2VvY2VudGljX2Zyb21fd2dzODQoKVxuICAgIC8vICBjb29yZGluYXRlIHN5c3RlbSBkZWZpbml0aW9uLFxuICAgIC8vICBwb2ludCB0byB0cmFuc2Zvcm0gaW4gZ2VvY2VudHJpYyBjb29yZGluYXRlcyAoeCx5LHopXG4gICAgZnVuY3Rpb24gZ2VvY2VudHJpY0Zyb21XZ3M4NChwLCBkYXR1bV90eXBlLCBkYXR1bV9wYXJhbXMpIHtcblxuICAgICAgaWYgKGRhdHVtX3R5cGUgPT09IFBKRF8zUEFSQU0pIHtcbiAgICAgICAgLy9pZiggeFtpb10gPT09IEhVR0VfVkFMIClcbiAgICAgICAgLy8gICAgY29udGludWU7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgeDogcC54IC0gZGF0dW1fcGFyYW1zWzBdLFxuICAgICAgICAgIHk6IHAueSAtIGRhdHVtX3BhcmFtc1sxXSxcbiAgICAgICAgICB6OiBwLnogLSBkYXR1bV9wYXJhbXNbMl0sXG4gICAgICAgIH07XG5cbiAgICAgIH0gZWxzZSBpZiAoZGF0dW1fdHlwZSA9PT0gUEpEXzdQQVJBTSkge1xuICAgICAgICB2YXIgRHhfQkYgPSBkYXR1bV9wYXJhbXNbMF07XG4gICAgICAgIHZhciBEeV9CRiA9IGRhdHVtX3BhcmFtc1sxXTtcbiAgICAgICAgdmFyIER6X0JGID0gZGF0dW1fcGFyYW1zWzJdO1xuICAgICAgICB2YXIgUnhfQkYgPSBkYXR1bV9wYXJhbXNbM107XG4gICAgICAgIHZhciBSeV9CRiA9IGRhdHVtX3BhcmFtc1s0XTtcbiAgICAgICAgdmFyIFJ6X0JGID0gZGF0dW1fcGFyYW1zWzVdO1xuICAgICAgICB2YXIgTV9CRiA9IGRhdHVtX3BhcmFtc1s2XTtcb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MWUtMTI7XG4gICAgICAgIHZhciBkaWYsIGRlbDtcbiAgICAgICAgZG8ge1xuICAgICAgICAgIGRlbCA9IG5hZEludGVycG9sYXRlKHQsIGN0KTtcbiAgICAgICAgICBpZiAoaXNOYU4oZGVsLngpKSB7XG4gICAgICAgICAgICBjb25zb2xlLmxvZyhcIkludmVyc2UgZ3JpZCBzaGlmdCBpdGVyYXRpb24gZmFpbGVkLCBwcmVzdW1hYmx5IGF0IGdyaWQgZWRnZS4gIFVzaW5nIGZpcnN0IGFwcHJveGltYXRpb24uXCIpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICAgIGRpZiA9IHt4OiB0Yi54IC0gKGRlbC54ICsgdC54KSwgeTogdGIueSAtIChkZWwueSArIHQueSl9O1xuICAgICAgICAgIHQueCArPSBkaWYueDtcbiAgICAgICAgICB0LnkgKz0gZGlmLnk7XG4gICAgICAgIH0gd2hpbGUgKGktLSAmJiBNYXRoLmFicyhkaWYueCkgPiB0b2wgJiYgTWF0aC5hYnMoZGlmLnkpID4gdG9sKTtcbiAgICAgICAgaWYgKGkgPCAwKSB7XG4gICAgICAgICAgY29uc29sZS5sb2coXCJJbnZlcnNlIGdyaWQgc2hpZnQgaXRlcmF0b3IgZmFpbGVkIHRvIGNvbnZlcmdlLlwiKTtcbiAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICB9XG4gICAgICAgIHZhbC54ID0gYWRqdXN0X2xvbih0LnggKyBjdC5sbFswXSk7XG4gICAgICAgIHZhbC55ID0gdC55ICsgY3QubGxbMV07XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoIWlzTmFOKHQueCkpIHtcbiAgICAgICAgICB2YWwueCA9IHBpbi54ICsgdC54O1xuICAgICAgICAgIHZhbC55ID0gcGluLnkgKyB0Lnk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiB2YWw7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gbmFkSW50ZXJwb2xhdGUocGluLCBjdCkge1xuICAgICAgdmFyIHQgPSB7eDogcGluLnggLyBjdC5kZWxbMF0sIHk6IHBpbi55IC8gY3QuZGVsWzFdfTtcbiAgICAgIHZhciBpbmR4ID0ge3g6IE1hdGguZmxvb3IodC54KSwgeTogTWF0aC5mbG9vcih0LnkpfTtcbiAgICAgIHZhciBmcmN0ID0ge3g6IHQueCAtIDEuMCAqIGluZHgueCwgeTogdC55IC0gMS4wICogaW5keC55fTtcbiAgICAgIHZhciB2YWw9IHt4OiBOdW1iZXIuTmFOLCB5OiBOdW1iZXIuTmFOfTtcbiAgICAgIHZhciBpbng7XG4gICAgICBpZiAoaW5keC54IDwgMCB8fCBpbmR4LnggPj0gY3QubGltWzBdKSB7XG4gICAgICAgIHJldHVybiB2YWw7XG4gICAgICB9XG4gICAgICBpZiAoaW5keC55IDwgMCB8fCBpbmR4LnkgPj0gY3QubGltWzFdKSB7XG4gICAgICAgIHJldHVybiB2YWw7XG4gICAgICB9XG4gICAgICBpbnggPSAoaW5keC55ICogY3QubGltWzBdKSArIGluZHgueDtcbiAgICAgIHZhciBmMDAgPSB7eDogY3QuY3ZzW2lueF1bMF0sIHk6IGN0LmN2c1tpbnhdWzFdfTtcbiAgICAgIGlueCsrO1xuICAgICAgdmFyIGYxMD0ge3g6IGN0LmN2c1tpbnhdWzBdLCB5OiBjdC5jdnNbaW54XVsxXX07XG4gICAgICBpbnggKz0gY3QubGltWzBdO1xuICAgICAgdmFyIGYxMSA9IHt4OiBjdC5jdnNbaW54XVswXSwgeTogY3QuY3ZzW2lueF1bMV19O1xuICAgICAgaW54LS07XG4gICAgICB2YXIgZjAxID0ge3g6IGN0LmN2c1tpbnhdWzBdLCB5OiBjdC5jdnNbaW54XVsxXX07XG4gICAgICB2YXIgbTExID0gZnJjdC54ICogZnJjdC55LCBtMTAgPSBmcmN0LnggKiAoMS4wIC0gZnJjdC55KSxcbiAgICAgICAgbTAwID0gKDEuMCAtIGZyY3QueCkgKiAoMS4wIC0gZnJjdC55KSwgbTAxID0gKDEuMCAtIGZyY3QueCkgKiBmcmN0Lnk7XG4gICAgICB2YWwueCA9IChtMDAgKiBmMDAueCArIG0xMCAqIGYxMC54ICsgbTAxICogZjAxLnggKyBtMTEgKiBmMTEueCk7XG4gICAgICB2YWwueSA9IChtMDAgKiBmMDAueSArIG0xMCAqIGYxMC55ICsgbTAxICogZjAxLnkgKyBtMTEgKiBmMTEueSk7XG4gICAgICByZXR1cm4gdmFsO1xuICAgIH1cblxuICAgIHZhciBhZGp1c3RfYXhpcyA9IGZ1bmN0aW9uKGNycywgZGVub3JtLCBwb2ludCkge1xuICAgICAgdmFyIHhpbiA9IHBvaW50LngsXG4gICAgICAgIHlpbiA9IHBvaW50LnksXG4gICAgICAgIHppbiA9IHBvaW50LnogfHwgMC4wO1xuICAgICAgdmFyIHYsIHQsIGk7XG4gICAgICB2YXIgb3V0ID0ge307XG4gICAgICBmb3IgKGkgPSAwOyBpIDwgMzsgaSsrKSB7XG4gICAgICAgIGlmIChkZW5vcm0gJiYgaSA9PT0gMiAmJiBwb2ludC56ID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoaSA9PT0gMCkge1xuICAgICAgICAgIHYgPSB4aW47XG4gICAgICAgICAgaWYgKFwiZXdcIi5pbmRleE9mKGNycy5heGlzW2ldKSAhPT0gLTEpIHtcbiAgICAgICAgICAgIHQgPSAneCc7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHQgPSAneSc7XG4gICAgICAgICAgfVxuXG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoaSA9PT0gMSkge1xuICAgICAgICAgIHYgPSB5aW47XG4gICAgICAgICAgaWYgKFwibnNcIi5pbmRleE9mKGNycy5heGlzW2ldKSAhPT0gLTEpIHtcbiAgICAgICAgICAgIHQgPSAneSc7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHQgPSAneCc7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIHYgPSB6aW47XG4gICAgICAgICAgdCA9ICd6JztcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKGNycy5heGlzW2ldKSB7XG4gICAgICAgIGNhc2UgJ2UnOlxuICAgICAgICAgIG91dFt0XSA9IHY7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgJ3cnOlxuICAgICAgICAgIG91dFt0XSA9IC12O1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICduJzpcbiAgICAgICAgICBvdXRbdF0gPSB2O1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICdzJzpcbiAgICAgICAgICBvdXRbdF0gPSAtdjtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAndSc6XG4gICAgICAgICAgaWYgKHBvaW50W3RdICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIG91dC56ID0gdjtcbiAgICAgICAgICB9XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgJ2QnOlxuICAgICAgICAgIGlmIChwb2ludFt0XSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBvdXQueiA9IC12O1xuICAgICAgICAgIH1cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAvL2NvbnNvbGUubG9nKFwiRVJST1I6IHVua25vdyBheGlzIChcIitjcnMuYXhpc1tpXStcIikgLSBjaGVjayBkZWZpbml0aW9uIG9mIFwiK2Nycy5wcm9qTmFtZSk7XG4gICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiBvdXQ7XG4gICAgfTtcblxuICAgIHZhciB0b1BvaW50ID0gZnVuY3Rpb24gKGFycmF5KXtcbiAgICAgIHZhciBvdXQgPSB7XG4gICAgICAgIHg6IGFycmF5WzBdLFxuICAgICAgICB5OiBhcnJheVsxXVxuICAgICAgfTtcbiAgICAgIGlmIChhcnJheS5sZW5ndGg+Mikge1xuICAgICAgICBvdXQueiA9IGFycmF5WzJdO1xuICAgICAgfVxuICAgICAgaWYgKGFycmF5Lmxlbmd0aD4zKSB7XG4gICAgICAgIG91dC5tID0gYXJyYXlbM107XG4gICAgICB9XG4gICAgICByZXR1cm4gb3V0O1xuICAgIH07XG5cbiAgICB2YXIgY2hlY2tTYW5pdHkgPSBmdW5jdGlvbiAocG9pbnQpIHtcbiAgICAgIGNoZWNrQ29vcmQocG9pbnQueCk7XG4gICAgICBjaGVja0Nvb3JkKHBvaW50LnkpO1xuICAgIH07XG4gICAgZnVuY3Rpb24gY2hlY2tDb29yZChudW0pIHtcbiAgICAgIGlmICh0eXBlb2YgTnVtYmVyLmlzRmluaXRlID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgIGlmIChOdW1iZXIuaXNGaW5pdGUobnVtKSkge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdjb29yZGluYXRlcyBtdXN0IGJlIGZpbml0ZSBudW1iZXJzJyk7XG4gICAgICB9XG4gICAgICBpZiAodHlwZW9mIG51bSAhPT0gJ251bWJlcicgfHwgbnVtICE9PSBudW0gfHwgIWlzRmluaXRlKG51bSkpIHtcbiAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignY29vcmRpbmF0ZXMgbXVzdCBiZSBmaW5pdGUgbnVtYmVycycpO1xuICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGNoZWNrTm90V0dTKHNvdXJjZSwgZGVzdCkge1xuICAgICAgcmV0dXJuICgoc291cmNlLmRhdHVtLmRhdHVtX3R5cGUgPT09IFBKRF8zUEFSQU0gfHwgc291cmNlLmRhdHVtLmRhdHVtX3R5cGUgPT09IFBKRF83UEFSQU0pICYmIGRlc3QuZGF0dW1Db2RlICE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GhleSBhcmVuJ3QgYWxyZWFkeS5cbiAgICAgIGlmIChzb3VyY2UucHJvak5hbWUgPT09ICdsb25nbGF0Jykge1xuICAgICAgICBwb2ludCA9IHtcbiAgICAgICAgICB4OiBwb2ludC54ICogRDJSLFxuICAgICAgICAgIHk6IHBvaW50LnkgKiBEMlIsXG4gICAgICAgICAgejogcG9pbnQueiB8fCAwXG4gICAgICAgIH07XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoc291cmNlLnRvX21ldGVyKSB7XG4gICAgICAgICAgcG9pbnQgPSB7XG4gICAgICAgICAgICB4OiBwb2ludC54ICogc291cmNlLnRvX21ldGVyLFxuICAgICAgICAgICAgeTogcG9pbnQueSAqIHNvdXJjZS50b19tZXRlcixcbiAgICAgICAgICAgIHo6IHBvaW50LnogfHwgMFxuICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgcG9pbnQgPSBzb3VyY2UuaW52ZXJzZShwb2ludCk7IC8vIENvbnZlcnQgQ2FydGVzaWFuIHRvIGxvbmdsYXRcbiAgICAgICAgaWYgKCFwb2ludCkge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgLy8gQWRqdXN0IGZvciB0aGUgcHJpbWUgbWVyaWRpYW4gaWYgbmVjZXNzYXJ5XG4gICAgICBpZiAoc291cmNlLmZyb21fZ3JlZW53aWNoKSB7XG4gICAgICAgIHBvaW50LnggKz0gc291cmNlLmZyb21fZ3JlZW53aWNoO1xuICAgICAgfVxuXG4gICAgICAvLyBDb252ZXJ0IGRhdHVtcyBpZiBuZWVkZWQsIGFuZCBpZiBwb3NzaWJsZS5cbiAgICAgIHBvaW50ID0gZGF0dW1fdHJhbnNmb3JtKHNvdXJjZS5kYXR1bSwgZGVzdC5kYXR1bSwgcG9pbnQpO1xuICAgICAgaWYgKCFwb2ludCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIC8vIEFkanVzdCBmb3IgdGhlIHByaW1lIG1lcmlkaWFuIGlmIG5lY2Vzc2FyeVxuICAgICAgaWYgKGRlc3QuZnJvbV9ncmVlbndpY2gpIHtcbiAgICAgICAgcG9pbnQgPSB7XG4gICAgICAgICAgeDogcG9pbnQueCAtIGRlc3QuZnJvbV9ncmVlbndpY2gsXG4gICAgICAgICAgeTogcG9pbnQueSxcbiAgICAgICAgICB6OiBwb2ludC56IHx8IDBcbiAgICAgICAgfTtcbiAgICAgIH1cblxuICAgICAgaWYgKGRlc3QucHJvak5hbWUgPT09ICdsb25nbGF0Jykge1xuICAgICAgICAvLyBjb252ZXJ0IHJhZGlhbnMgdG8gZGVjaW1hbCBkZWdyZWVzXG4gICAgICAgIHBvaW50ID0ge1xuICAgICAgICAgIHg6IHBvaW50LnggKiBSMkQsXG4gICAgICAgICAgeTogcG9pbnQueSAqIFIyRCxcbiAgICAgICAgICB6OiBwb2ludC56IHx8IDBcbiAgICAgICAgfTtcbiAgICAgIH0gZWxzZSB7IC8vIGVsc2UgcHJvamVjdFxuICAgICAgICBwb2ludCA9IGRlc3QuZm9yd2FyZChwb2ludCk7XG4gICAgICAgIGlmIChkZXN0LnRvX21ldGVyKSB7XG4gICAgICAgICAgcG9pbnQgPSB7XG4gICAgICAgICAgICB4OiBwb2ludC54IC8gZGVzdC50b19tZXRlcixcbiAgICAgICAgICAgIHk6IHBvaW50LnkgLyBkZXN0LnRvX21ldGVyLFxuICAgICAgICAgICAgejogcG9pbnQueiB8fCAwXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBER1IsIDIwMTAvMTEvMTJcbiAgICAgIGlmIChlbmZvcmNlQXhpcyAmJiBkZXN0LmF4aXMgIT09ICdlbnUnKSB7XG4gICAgICAgIHJldHVybiBhZGp1c3RfYXhpcyhkZXN0LCB0cnVlLCBwb2ludCk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBwb2ludDtcbiAgICB9XG5cbiAgICB2YXIgd2dzODQgPSBQcm9qZ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DIpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmV0dXJuIFt0cmFuc2Zvcm1lZEFycmF5LngsIHRyYW5zZm9ybWVkQXJyYXkueV07XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIG91dCA9IHRyYW5zZm9ybShmcm9tLCB0bywgY29vcmRzLCBlbmZvcmNlQXhpcyk7XG4gICAgICAgIGtleXMgPSBPYmplY3Qua2V5cyhjb29yZHMpO1xuICAgICAgICBpZiAoa2V5cy5sZW5ndGggPT09IDIpIHtcbiAgICAgICAgICByZXR1cm4gb3V0O1xuICAgICAgICB9XG4gICAgICAgIGtleXMuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgICAgaWYgKCh0eXBlb2YgZnJvbS5uYW1lICE9PSAndW5kZWZpbmVkJyAmJiBmcm9tLm5hbWUgPT09ICdnZW9jZW50JykgfHwgKHR5cGVvZiB0by5uYW1lICE9PSAndW5kZWZpbmVkJyAmJiB0by5uYW1lID09PSAnZ2VvY2VudCcpKSB7XG4gICAgICAgICAgICBpZiAoa2V5ID09PSAneCcgfHwga2V5ID09PSAneScgfHwga2V5ID09PSAneicpIHtcbiAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoa2V5ID09PSAneCcgfHwga2V5ID09PSAneScpIHtcbiAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBvdXRba2V5XSA9IGNvb3Jkc1trZXldO1xuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIG91dDtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBjaGVja1Byb2ooaXRlbSkge1xuICAgICAgaWYgKGl0ZW0gaW5zdGFuY2VvZiBQcm9qZWN0aW9uKSB7XG4gICAgICAgIHJldHVybiB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BMb25nIDwgMTIuMCkge1xuICAgICAgICBab25lTnVtYmVyID0gMzI7XG4gICAgICB9XG5cbiAgICAgIC8vIFNwZWNpYWwgem9uZXMgZm9yIFN2YWxiYXJkXG4gICAgICBpZiAoTGF0ID49IDcyLjAgJiYgTGF0IDwgODQuMCkge1xuICAgICAgICBpZiAoTG9uZyA+PSAwLjAgJiYgTG9uZyA8IDkuMCkge1xuICAgICAgICAgIFpvbmVOdW1iZXIgPSAzMTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChMb25nID49IDkuMCAmJiBMb25nIDwgMjEuMCkge1xuICAgICAgICAgIFpvbmVOdW1iZXIgPSAzMztcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChMb25nID49IDIxLjAgJiYgTG9uZyA8IDMzLjApIHtcbiAgICAgICAgICBab25lTnVtYmVyID0gMzU7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoTG9uZyA+PSAzMy4wICYmIExvbmcgPCA0Mi4wKSB7XG4gICAgICAgICAgWm9uZU51bWJlciA9IDM3O1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIExvbmdPcmlnaW4gPSAoWm9uZU51bWJlciAtIDEpICogNiAtIDE4MCArIDM7IC8vKzMgcHV0cyBvcmlnaW5cbiAgICAgIC8vIGluIG1pZGRsZSBvZlxuICAgICAgLy8gem9uZVxuICAgICAgTG9uZ09yaWdpblJhZCA9IGRlZ1RvUmFkKExvbmdPcmlnaW4pO1xuXG4gICAgICBlY2NQcmltZVNxdWFyZWQgPSAoZWNjU3F1YXJlZCkgLyAoMSAtIGVjY1NxdWFyZWQpO1xuXG4gICAgICBOID0gYSAvIE1hdGguc3FydCgxIC0gZWNjU3F1YXJlZCAqIE1hdGguc2luKExhdFJhZCkgKiBNYXRoLnNpbihMYXRSYWQpKTtcbiAgICAgIFQgPSBNYXRoLnRhbihMYXRSYWQpICogTWF0aC50YW4oTGF0UmFkKTtcbiAgICAgIEMgPSBlY2NQcmltZV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WCc7XG4gICAgICB9XG4gICAgICBlbHNlIGlmICgoNzIgPiBsYXQpICYmIChsYXQgPj0gNjQpKSB7XG4gICAgICAgIExldHRlckRlc2lnbmF0b3IgPSAnVyc7XG4gICAgICB9XG4gICAgICBlbHNlIGlmICgoNjQgPiBsYXQpICYmIChsYXQgPj0gNTYpKSB7XG4gICAgICAgIExldHRlckRlc2lnbmF0b3IgPSAnVic7XG4gICAgICB9XG4gICAgICBlbHNlIGlmICgoNTYgPiBsYXQpICYmIChsYXQgPj0gNDgpKSB7XG4gICAgICAgIExldHRlckRlc2lnbmF0b3IgPSAnVSc7XG4gICAgICB9XG4gICAgICBlbHNlIGlmICgoNDggPiBsYXQpICYmIChsYXQgPj0gNDApKSB7XG4gICAgICAgIExldHRlckRlc2lnbmF0b3IgPSAnVCc7XG4gICAgICB9XG4gICAgICBlbHNlIGlmICgoNDAgPiBsYXQpICYmIChsYXQgPj0gMzIpKSB7XG4gICAgICAgIExldHRlckRlc2lnbmF0b3IgPSAnUyc7XG4gICAgICB9XG4gICAgICBlbHNlIGlmICgoMzIgPiBsYXQpICYmIChsYXQgPj0gMjQpKSB7XG4gICAgICAgIExldHRlckRlc2lnbmF0b3IgPSAnUic7XG4gICAgICB9XG4gICAgICBlbHNlIGlmICgoMjQgPiBsYXQpICYmIChsYXQgPj0gMTYpKSB7XG4gICAgICAgIExldHRlckRlc2lnbmF0b3IgPSAnUSc7XG4gICAgICB9XG4gICAgICBlbHNlIGlmICgoMTYgPiBsYXQpICYmIChsYXQgPj0gOCkpIHtcbiAgICAgICAgTGV0dGVyRGVzaWduYXRvciA9ICdQJztcbiAgICAgIH1cbiAgICAgIGVsc2UgaWYgKCg4ID4gbGF0KSAmJiAobGF0ID49IDApKSB7XG4gICAgICAgIExldHRlckRlc2lnbmF0b3IgPSAnTic7XG4gICAgICB9XG4gICAgICBlbHNlIGlmICgoMCA+IGxhdCkgJiYgKGxhdCA+PSAtOCkpIHtcbiAgICAgICAgTGV0dGVyRGVzaW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Bjb2xJbnQrKztcblxuICAgICAgICBpZiAoY29sSW50ID09PSBJKSB7XG4gICAgICAgICAgY29sSW50Kys7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGNvbEludCA+IFopIHtcbiAgICAgICAgY29sSW50ID0gY29sSW50IC0gWiArIEEgLSAxO1xuICAgICAgfVxuXG4gICAgICBpZiAocm93SW50ID4gVikge1xuICAgICAgICByb3dJbnQgPSByb3dJbnQgLSBWICsgQSAtIDE7XG4gICAgICAgIHJvbGxvdmVyID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICByb2xsb3ZlciA9IGZhbHNlO1xuICAgICAgfVxuXG4gICAgICBpZiAoKChyb3dJbnQgPT09IEkpIHx8ICgocm93T3JpZ2luIDwgSSkgJiYgKHJvd0ludCA+IEkpKSkgfHwgKCgocm93SW50ID4gSSkgfHwgKHJvd09yaWdpbiA8IEkpKSAmJiByb2xsb3ZlcikpIHtcbiAgICAgICAgcm93SW50Kys7XG4gICAgICB9XG5cbiAgICAgIGlmICgoKHJvd0ludCA9PT0gTykgfHwgKChyb3dPcmlnaW4gPCBPKSAmJiAocm93SW50ID4gTykpKSB8fCAoKChyb3dJbnQgPiBPKSB8fCAocm93T3JpZ2luIDwgTykpICYmIHJvbGxvdmVyKSkge1xuICAgICAgICByb3dJbnQrKztcblxuICAgICAgICBpZiAocm93SW50ID09PSBJKSB7XG4gICAgICAgICAgcm93SW50Kys7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKHJvd0ludCA+IFYpIHtcbiAgICAgICAgcm93SW50ID0gcm93SW50IC0gViArIEEgLSAxO1xuICAgICAgfVxuXG4gICAgICB2YXIgdHdvTGV0dGVyID0gU3RyaW5nLmZyb21DaGFyQ29kZShjb2xJbnQpICsgU3RyaW5nLmZyb21DaGFyQ29kZShyb3dJbnQpO1xuICAgICAgcmV0dXJuIHR3b0xldHRlcjtcbiAgICB9XG5cbiAgICAvKipcb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DAuMDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdFJzpcbiAgICAgICAgbm9ydGhpbmcgPSAyODAwMDAwLjA7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnRic6XG4gICAgICAgIG5vcnRoaW5nID0gMzcwMDAwMC4wO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ0cnOlxuICAgICAgICBub3J0aGluZyA9IDQ2MDAwMDAuMDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdIJzpcbiAgICAgICAgbm9ydGhpbmcgPSA1NTAwMDAwLjA7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnSic6XG4gICAgICAgIG5vcnRoaW5nID0gNjQwMDAwMC4wO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ0snOlxuICAgICAgICBub3J0aGluZyA9IDczMDAwMDAuMDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdMJzpcbiAgICAgICAgbm9ydGhpbmcgPSA4MjAwMDAwLjA7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnTSc6XG4gICAgICAgIG5vcnRoaW5nID0gOTEwMDAwMC4wO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ04nOlxuICAgICAgICBub3J0aGluZyA9IDAuMDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdQJzpcbiAgICAgICAgbm9ydGhpbmcgPSA4MDAwMDAuMDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdRJzpcbiAgICAgICAgbm9ydGhpbmcgPSAxNzAwMDAwLjA7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnUic6XG4gICAgICAgIG5vcnRoaW5nID0gMjYwMDAwMC4wO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ1MnOlxuICAgICAgICBub3J0aGluZyA9IDM1MDAwMDAuMDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdUJzpcbiAgICAgICAgbm9ydGhpbmcgPSA0NDAwMDAwLjA7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnVSc6XG4gICAgICAgIG5vcnRoaW5nID0gNTMwMDAwMC4wO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ1YnOlxuICAgICAgICBub3J0aGluZyA9IDYyMDAwMDAuMDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdXJzpcbiAgICAgICAgbm9ydGhpbmcgPSA3MDAwMDAwLjA7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnWCc6XG4gICAgICAgIG5vcnRoaW5nID0gNzkwMDAwMC4wO1xuICAgICAgICBicmVhaztcbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIG5vcnRoaW5nID0gLTEuMDtcbiAgICAgIH1cbiAgICAgIGlmIChub3J0aGluZyA+PSAwLjApIHtcbiAgICAgICAgcmV0dXJuIG5vcnRoaW5nO1xuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIHRocm93IChcIkludmFsaWQgem9uZSBsZXR0ZXI6IFwiICsgem9uZUxldHRlcik7XG4gICAgICB9XG5cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBQb2ludCh4LCB5LCB6KSB7XG4gICAgICBpZiAoISh0aGlzIGluc3RhbmNlb2YgUG9pbnQpKSB7XG4gICAgICAgIHJldHVybiBuZXcgUG9pbnQoeCwgeSwgeik7XG4gICAgICB9XG4gICAgICBpZiAoQXJyYXkuaXNBcnJheSh4KSkge1xuICAgICAgICB0aGlzLnggPSB4WzBdO1xuICAgICAgICB0aGlzLnkgPSB4WzFdO1xuICAgICAgICB0aGlzLnogPSB4WzJdIHx8IDAuMDtcbiAgICAgIH0gZWxzZSBpZih0eXBlb2YgeCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgdGhpcy54ID0geC54O1xuICAgICAgICB0aGlzLnkgPSB4Lnk7XG4gICAgICAgIHRoaXMueiA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gIHggPSAwLjUgKiB0aGlzLmEgKiB0aGlzLmswICogTWF0aC5sb2coKDEgKyBiKSAvICgxIC0gYikpICsgdGhpcy54MDtcbiAgICAgICAgICB5ID0gY29zX3BoaSAqIE1hdGguY29zKGRlbHRhX2xvbikgLyBNYXRoLnNxcnQoMSAtIE1hdGgucG93KGIsIDIpKTtcbiAgICAgICAgICBiID0gTWF0aC5hYnMoeSk7XG5cbiAgICAgICAgICBpZiAoYiA+PSAxKSB7XG4gICAgICAgICAgICBpZiAoKGIgLSAxKSA+IEVQU0xOKSB7XG4gICAgICAgICAgICAgIHJldHVybiAoOTMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgIHkgPSAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHkgPSBNYXRoLmFjb3MoeSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGxhdCA8IDApIHtcbiAgICAgICAgICAgIHkgPSAteTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICB5ID0gdGhpcy5hICogdGhpcy5rMCAqICh5IC0gdGhpcy5sYXQwKSArIHRoaXMueTA7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICB2YXIgYWwgPSBjb3NfcGhpICogZGVsdGFfbG9uO1xuICAgICAgICB2YXIgYWxzID0gTWF0aC5wb3coYWwsIDIpO1xuICAgICAgICB2YXIgYyA9IHRoaXMuZXAyICogTWF0aC5wb3coY29zX3BoaSwgMik7XG4gICAgICAgIHZhciBjcyA9IE1hdGgucG93KGMsIDIpO1xuICAgICAgICB2YXIgdHEgPSBNYXRoLmFicyhjb3NfcGhpKSA+IEVQU0xOID8gTWF0aC50YW4obGF0KSA6IDA7XG4gICAgICAgIHZhciB0ID0gTWF0aC5wb3codHEsIDIpO1xuICAgICAgICB2YXIgdHMgPSBNYXRoLnBvdyh0LCAyKTtcbiAgICAgICAgY29uID0gMSAtIHRoaXMuZXMgKiBNYXRoLnBvdyhzaW5fcGhpLCAyKTtcbiAgICAgICAgYWwgPSBhbCAvIE1hdGguc3FydChjb24pO1xuICAgICAgICB2YXIgbWwgPSBwal9tbGZuKGxhdCwgc2luX3BoaSwgY29zX3BoaSwgdGhpcy5lbik7XG5cbiAgICAgICAgeCA9IHRoaXMuYSAqICh0aGlzLmswICogYWwgKiAoMSArXG4gICAgICAgICAgYWxzIC8gNiAqICgxIC0gdCArIGMgK1xuICAgICAgICAgIGFscyAvIDIwICogKDUgLSAxOCAqIHQgKyB0cyArIDE0ICogYyAtIDU4ICogdCAqIGMgK1xuICAgICAgICAgIGFscyAvIDQyICogKDYxICsgMTc5ICogdHMgLSB0cyAqIHQgLSA0NzkgKiB0KSkpKSkgK1xuICAgICAgICAgIHRoaXMueDA7XG5cbiAgICAgICAgeSA9IHRoaXMuYSAqICh0aGlzLmswICogKG1sIC0gdGhpcy5tbDAgK1xuICAgICAgICAgIHNpbl9waGkgKiBkZWx0YV9sb24gKiBhbCAvIDIgKiAoMSArXG4gICAgICAgICAgYWxzIC8gMTIgKiAoNSAtIHQgKyA5ICogYyArIDQgKiBjcyArXG4gICAgICAgICAgYWxzIC8gMzAgKiAoNjEgKyB0cyAtIDU4ICogdCArIDI3MCAqIGMgLSAzMzAgKiB0ICogYyArXG4gICAgICAgICAgYWxzIC8gNTYgKiAoMTM4NSArIDU0MyAqIHRzIC0gdHMgKiB0IC0gMzExMSAqIHQpKSkpKSkgK1xuICAgICAgICAgIHRoaXMueTA7XG4gICAgICB9XG5cbiAgICAgIHAueCA9IHg7XG4gICAgICBwLnkgPSB5O1xuXG4gICAgICByZXR1cm4gcDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgICAgVHJhbnN2ZXJzZSBNZXJjYXRvciBJbnZlcnNlICAtICB4L3kgdG8gbG9uZy9sYXRcbiAgICAgICovXG4gICAgZnVuY3Rpb24gaW52ZXJzZSQyKHApIHtcbiAgICAgIHZhciBjb24sIHBoaTtcbiAgICAgIHZhciBsYXQsIGxvbjtcbiAgICAgIHZhciB4ID0gKHAueCAtIHRoaXMueDApICogKDEgLyB0aGlzLmEpO1xuICAgICAgdmFyIHkgPSAocC55IC0gdGhpcy55MCkgKiAoMSAvIHRoaXMuYSk7XG5cbiAgICAgIGlmICghdGhpcy5lcykge1xuICAgICAgICB2YXIgZiA9IE1hdGguZXhwKHggLyB0aGlzLmswKTtcbiAgICAgICAgdmFyIGcgPSAwLjUgKiAoZiAtIDEgLyBmKTtcbiAgICAgICAgdmFyIHRlbXAgPSB0aGlzLmxhdDAgKyB5IC8gdGhpcy5rMDtcbiAgICAgICAgdmFyIGggPSBNYXRoLmNvcyh0ZW1wKTtcbiAgICAgICAgY29uID0gTWF0aC5zcXJ0KCgxIC0gTWF0aC5wb3coaCwgMikpIC8gKDEgKyBNYXRoLnBvdyhnLCAyKSkpO1xuICAgICAgICBsYXQgPSBNYXRoLmFzaW4oY29uKTtcblxuICAgICAgICBpZiAoeSA8IDApIHtcbiAgICAgICAgICBsYXQgPSAtbGF0O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKChnID09PSAwKSAmJiAoaCA9PT0gMCkpIHtcbiAgICAgICAgICBsb24gPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIGxvbiA9IGFkanVzdF9sb24oTWF0aC5hdGFuMihnLCBoKSArIHRoaXMubG9uZzApO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBlbHNlIHsgLy8gZWxsaXBzb2lkYWwgZm9ybVxuICAgICAgICBjb24gPSB0aGlzLm1sMCArIHkgLyB0aGlzLmswO1xuICAgICAgICBwaGkgPSBwal9pbnZfbWxmbihjb24sIHRoaXMuZXMsIHRoaXMuZW4pO1xuXG4gICAgICAgIGlmIChNYXRoLmFicyhwaGkpIDwgSEFMRl9QSSkge1xuICAgICAgICAgIHZhciBzaW5fcGhpID0gTWF0aC5zaW4ocGhpKTtcbiAgICAgICAgICB2YXIgY29zX3BoaSA9IE1hdGguY29zKHBoaSk7XG4gICAgICAgICAgdmFyIHRhbl9waGkgPSBNYXRoLmFicyhjb3NfcGhpKSA+IEVQU0xOID8gTWF0aC50YW4ocGhpKSA6IDA7XG4gICAgICAgICAgdmFyIGMgPSB0aGlzLmVwMiAqIE1hdGgucG93KGNvc19waGksIDIpO1xuICAgICAgICAgIHZhciBjcyA9IE1hdGgucG93KGMsIDIpO1xuICAgICAgICAgIHZhciB0ID0gTWF0aC5wb3codGFuX3BoaSwgMik7XG4gICAgICAgICAgdmFyIHRzID0gTWF0aC5wb3codCwgMik7XG4gICAgICAgICAgY29uID0gMSAtIHRoaXMuZXMgKiBNYXRoLnBvdyhzaW5fcGhpLCAyKTtcbiAgICAgICAgICB2YXIgZCA9IHggKiBNYXRoLnNxcnQoY29uKSAvIHRoaXMuazA7XG4gICAgICAgICAgdmFyIGRzID0gTWF0aC5wb3coZCwgMik7XG4gICAgICAgICAgY29uID0gY29uICogdGFuX3BoaTtcblxuICAgICAgICAgIGxhdCA9IHBoaSAtIChjb24gKiBkcyAvICgxIC0gdGhpcy5lcykpICogMC41ICogKDEgLVxuICAgICAgICAgICAgZHMgLyAxMiAqICg1ICsgMyAqIHQgLSA5ICogYyAqIHQgKyBjIC0gNCAqIGNzIC1cbiAgICAgICAgICAgIGRzIC8gMzAgKiAoNjEgKyA5MCAqIHQgLSAyNTIgKiBjICogdCArIDQ1ICogdHMgKyA0NiAqIGMgLVxuICAgICAgICAgICAgZHMgLyA1NiAqICgxMzg1ICsgMzYzMyAqIHQgKyA0MDk1ICogdHMgKyAxNTc0ICogdHMgKiB0KSkpKTtcblxuICAgICAgICAgIGxvbiA9IGFkanVzdF9sb24odGhpcy5sb25nMCArIChkICogKDEgLVxuICAgICAgICAgICAgZHMgLyA2ICogKDEgKyAyICogdCArIGMgLVxuICAgICAgICAgICAgZHMgLyAyMCAqICg1ICsgMjggKiB0ICsgMjQgKiB0cyArID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AgICAgdmFyIHkgPSAxICsgeDtcbiAgICAgIHZhciB6ID0geSAtIDE7XG5cbiAgICAgIHJldHVybiB6ID09PSAwID8geCA6IHggKiBNYXRoLmxvZyh5KSAvIHo7XG4gICAgfTtcblxuICAgIHZhciBhc2luaHkgPSBmdW5jdGlvbih4KSB7XG4gICAgICB2YXIgeSA9IE1hdGguYWJzKHgpO1xuICAgICAgeSA9IGxvZzFweSh5ICogKDEgKyB5IC8gKGh5cG90KDEsIHkpICsgMSkpKTtcblxuICAgICAgcmV0dXJuIHggPCAwID8gLXkgOiB5O1xuICAgIH07XG5cbiAgICB2YXIgZ2F0ZyA9IGZ1bmN0aW9uKHBwLCBCKSB7XG4gICAgICB2YXIgY29zXzJCID0gMiAqIE1hdGguY29zKDIgKiBCKTtcbiAgICAgIHZhciBpID0gcHAubGVuZ3RoIC0gMTtcbiAgICAgIHZhciBoMSA9IHBwW2ldO1xuICAgICAgdmFyIGgyID0gMDtcbiAgICAgIHZhciBoO1xuXG4gICAgICB3aGlsZSAoLS1pID49IDApIHtcbiAgICAgICAgaCA9IC1oMiArIGNvc18yQiAqIGgxICsgcHBbaV07XG4gICAgICAgIGgyID0gaDE7XG4gICAgICAgIGgxID0gaDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIChCICsgaCAqIE1hdGguc2luKDIgKiBCKSk7XG4gICAgfTtcblxuICAgIHZhciBjbGVucyA9IGZ1bmN0aW9uKHBwLCBhcmdfcikge1xuICAgICAgdmFyIHIgPSAyICogTWF0aC5jb3MoYXJnX3IpO1xuICAgICAgdmFyIGkgPSBwcC5sZW5ndGggLSAxO1xuICAgICAgdmFyIGhyMSA9IHBwW2ldO1xuICAgICAgdmFyIGhyMiA9IDA7XG4gICAgICB2YXIgaHI7XG5cbiAgICAgIHdoaWxlICgtLWkgPj0gMCkge1xuICAgICAgICBociA9IC1ocjIgKyByICogaHIxICsgcHBbaV07XG4gICAgICAgIGhyMiA9IGhyMTtcbiAgICAgICAgaHIxID0gaHI7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBNYXRoLnNpbihhcmdfcikgKiBocjtcbiAgICB9O1xuXG4gICAgdmFyIGNvc2ggPSBmdW5jdGlvbih4KSB7XG4gICAgICB2YXIgciA9IE1hdGguZXhwKHgpO1xuICAgICAgciA9IChyICsgMSAvIHIpIC8gMjtcbiAgICAgIHJldHVybiByO1xuICAgIH07XG5cbiAgICB2YXIgY2xlbnNfY21wbHggPSBmdW5jdGlvbihwcCwgYXJnX3IsIGFyZ19pKSB7XG4gICAgICB2YXIgc2luX2FyZ19yID0gTWF0aC5zaW4oYXJnX3IpO1xuICAgICAgdmFyIGNvc19hcmdfciA9IE1hdGguY29zKGFyZ19yKTtcbiAgICAgIHZhciBzaW5oX2FyZ19pID0gc2luaChhcmdfaSk7XG4gICAgICB2YXIgY29zaF9hcmdfaSA9IGNvc2goYXJnX2kpO1xuICAgICAgdmFyIHIgPSAyICogY29zX2FyZ19yICogY29zaF9hcmdfaTtcbiAgICAgIHZhciBpID0gLTIgKiBzaW5fYXJnX3IgKiBzaW5oX2FyZ19pO1xuICAgICAgdmFyIGogPSBwcC5sZW5ndGggLSAxO1xuICAgICAgdmFyIGhyID0gcHBbal07XG4gICAgICB2YXIgaGkxID0gMDtcbiAgICAgIHZhciBocjEgPSAwO1xuICAgICAgdmFyIGhpID0gMDtcbiAgICAgIHZhciBocjI7XG4gICAgICB2YXIgaGkyO1xuXG4gICAgICB3aGlsZSAoLS1qID49IDApIHtcbiAgICAgICAgaHIyID0gaHIxO1xuICAgICAgICBoaTIgPSBoaTE7XG4gICAgICAgIGhyMSA9IGhyO1xuICAgICAgICBoaTEgPSBoaTtcbiAgICAgICAgaHIgPSAtaHIyICsgciAqIGhyMSAtIGkgKiBoaTEgKyBwcFtqXTtcbiAgICAgICAgaGkgPSAtaGkyICsgaSAqIGhyMSArIHIgKiBoaTE7XG4gICAgICB9XG5cbiAgICAgIHIgPSBzaW5fYXJnX3IgKiBjb3NoX2FyZ19pO1xuICA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HRoaXMuYSAqIHAueSArIHRoaXMueTA7XG4gICAgICByZXR1cm4gcDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpbnZlcnNlJDQocCkge1xuICAgICAgdmFyIHNpbmMsIGNvc2MsIGxvbiwgbGF0LCByaG87XG4gICAgICBwLnggPSAocC54IC0gdGhpcy54MCkgLyB0aGlzLmE7XG4gICAgICBwLnkgPSAocC55IC0gdGhpcy55MCkgLyB0aGlzLmE7XG5cbiAgICAgIHAueCAvPSB0aGlzLmswO1xuICAgICAgcC55IC89IHRoaXMuazA7XG4gICAgICBpZiAoKHJobyA9IE1hdGguc3FydChwLnggKiBwLnggKyBwLnkgKiBwLnkpKSkge1xuICAgICAgICB2YXIgYyA9IDIgKiBNYXRoLmF0YW4yKHJobywgdGhpcy5SMik7XG4gICAgICAgIHNpbmMgPSBNYXRoLnNpbihjKTtcbiAgICAgICAgY29zYyA9IE1hdGguY29zKGMpO1xuICAgICAgICBsYXQgPSBNYXRoLmFzaW4oY29zYyAqIHRoaXMuc2luYzAgKyBwLnkgKiBzaW5jICogdGhpcy5jb3NjMCAvIHJobyk7XG4gICAgICAgIGxvbiA9IE1hdGguYXRhbjIocC54ICogc2luYywgcmhvICogdGhpcy5jb3NjMCAqIGNvc2MgLSBwLnkgKiB0aGlzLnNpbmMwICogc2luYyk7XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAgbGF0ID0gdGhpcy5waGljMDtcbiAgICAgICAgbG9uID0gMDtcbiAgICAgIH1cblxuICAgICAgcC54ID0gbG9uO1xuICAgICAgcC55ID0gbGF0O1xuICAgICAgZ2F1c3MuaW52ZXJzZS5hcHBseSh0aGlzLCBbcF0pO1xuICAgICAgcC54ID0gYWRqdXN0X2xvbihwLnggKyB0aGlzLmxvbmcwKTtcbiAgICAgIHJldHVybiBwO1xuICAgIH1cblxuICAgIHZhciBuYW1lcyQ2ID0gW1wiU3RlcmVvZ3JhcGhpY19Ob3J0aF9Qb2xlXCIsIFwiT2Js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biAgICAgICAgcC55ID0gdGhpcy5hICogQSAqICh0aGlzLmNvc2xhdDAgKiBzaW5sYXQgLSB0aGlzLnNpbmxhdDAgKiBjb3NsYXQgKiBNYXRoLmNvcyhkbG9uKSkgKyB0aGlzLnkwO1xuICAgICAgICByZXR1cm4gcDtcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBYID0gMiAqIE1hdGguYXRhbih0aGlzLnNzZm5fKGxhdCwgc2lubGF0LCB0aGlzLmUpKSAtIEhBTEZfUEk7XG4gICAgICAgIGNvc1ggPSBNYXRoLmNvcyhYKTtcbiAgICAgICAgc2luWCA9IE1hdGguc2luKFgpO1xuICAgICAgICBpZiAoTWF0aC5hYnModGhpcy5jb3NsYXQwKSA8PSBFUFNMTikge1xuICAgICAgICAgIHRzID0gdHNmbnoodGhpcy5lLCBsYXQgKiB0aGlzLmNvbiwgdGhpcy5jb24gKiBzaW5sYXQpO1xuICAgICAgICAgIHJoID0gMiAqIHRoaXMuYSAqIHRoaXMuazAgKiB0cyAvIHRoaXMuY29ucztcbiAgICAgICAgICBwLnggPSB0aGlzLngwICsgcmggKiBNYXRoLnNpbihsb24gLSB0aGlzLmxvbmcwKTtcbiAgICAgICAgICBwLnkgPSB0aGlzLnkwIC0gdGhpcy5jb24gKiByaCAqIE1hdGguY29zKGxvbiAtIHRoaXMubG9uZzApO1xuICAgICAgICAgIC8vdHJhY2UocC50b1N0cmluZygpKTtcbiAgICAgICAgICByZXR1cm4gcDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChNYXRoLmFicyh0aGlzLnNpbmxhdDApIDwgRVBTTE4pIHtcbiAgICAgICAgICAvL0VxXG4gICAgICAgICAgLy90cmFjZSgnc3RlcmU6ZXF1YXRldXInKTtcbiAgICAgICAgICBBID0gMiAqIHRoaXMuYSAqIHRoaXMuazAgLyAoMSArIGNvc1ggKiBNYXRoLmNvcyhkbG9uKSk7XG4gICAgICAgICAgcC55ID0gQSAqIHNpblg7XG4gICA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C54ID0gbG9uO1xuICAgICAgICAgIHAueSA9IGxhdDtcbiAgICAgICAgICByZXR1cm4gcDtcbiAgICAgICAgfVxuICAgICAgICBsYXQgPSBNYXRoLmFzaW4oTWF0aC5jb3MoYykgKiB0aGlzLnNpbmxhdDAgKyBwLnkgKiBNYXRoLnNpbihjKSAqIHRoaXMuY29zbGF0MCAvIHJoKTtcbiAgICAgICAgaWYgKE1hdGguYWJzKHRoaXMuY29zbGF0MCkgPCBFUFNMTikge1xuICAgICAgICAgIGlmICh0aGlzLmxhdDAgPiAwKSB7XG4gICAgICAgICAgICBsb24gPSBhZGp1c3RfbG9uKHRoaXMubG9uZzAgKyBNYXRoLmF0YW4yKHAueCwgLSAxICogcC55KSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgbG9uID0gYWRqdXN0X2xvbih0aGlzLmxvbmcwICsgTWF0aC5hdGFuMihwLngsIHAueSkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICBsb24gPSBhZGp1c3RfbG9uKHRoaXMubG9uZzAgKyBNYXRoLmF0YW4yKHAueCAqIE1hdGguc2luKGMpLCByaCAqIHRoaXMuY29zbGF0MCAqIE1hdGguY29zKGMpIC0gcC55ICogdGhpcy5zaW5sYXQwICogTWF0aC5zaW4oYykpKTtcbiAgICAgICAgfVxuICAgICAgICBwLnggPSBsb247XG4gICAgICAgIHAueSA9IGxhdDtcbiAgICAgICAgcmV0dXJuIHA7XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAgaWYgKE1hdGguYWJzKHRoaXMuY29zbGF0MCkgPD0gRVBTTE4pIHtcbiAgICAgICAgICBpZiAocmggPD0gRVBTTE4pIHtcbiAgICAgICAgICAgIGxhdCA9IHRoaXMubGF0MDtcbiAgICAgICAgICAgIGxvbiA9IHRoaXMubG9uZzA7XG4gICAgICAgICAgICBwLnggPSBsb247XG4gICAgICAgICAgICBwLnkgPSBsYXQ7XG4gICAgICAgICAgICAvL3RyYWNlKHAudG9TdHJpbmcoKSk7XG4gICAgICAgICAgICByZXR1cm4gcDtcbiAgICAgICAgICB9XG4gICAgICAgICAgcC54ICo9IHRoaXMuY29uO1xuICAgICAgICAgIHAueSAqPSB0aGlzLmNvbjtcbiAgICAgICAgICB0cyA9IHJoICogdGhpcy5jb25zIC8gKDIgKiB0aGlzLmEgKiB0aGlzLmswKTtcbiAgICAgICAgICBsYXQgPSB0aGlzLmNvbiAqIHBoaTJ6KHRoaXMuZSwgdHMpO1xuICAgICAgICAgIGxvbiA9IHRoaXMuY29uICogYWRqdXN0X2xvbih0aGlzLmNvbiAqIHRoaXMubG9uZzAgKyBNYXRoLmF0YW4yKHAueCwgLSAxICogcC55KSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgY2UgPSAyICogTWF0aC5hdGFuKHJoICogdGhpcy5jb3NYMCAvICgyICogdGhpcy5hICogdGhpcy5rMCAqIHRoaXMubXMxKSk7XG4gICAgICAgICAgbG9uID0gdGhpcy5sb25nMDtcbiAgICAgICAgICBpZiAocmggPD0gRVBTTE4pIHtcbiAgICAgICAgICAgIENoaSA9IHRoaXMuWDA7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgQ2hpID0gTWF0aC5hc2luKE1hdGguY29zKGNlKSAqIHRoaXMuc2luWDAgKyBwLnkgKiBNYXRoLnNpbihjZSkgKiB0aGlzLmNvc1gwIC8gcmgpO1xuICAgICAgICAgICAgbG9uID0gYWRqdXN0X2xvbih0aGlzLmxvbmcwICsgTWF0aC5hdGFuMihwLnggKiBNYXRoLnNpbihjZSksIHJoICogdGhpcy5jb3NYMCAqIE1hdGguY29zKGNlKSAtIHAueSAqIHRoaXMuc2luWDAgKiBNYXRoLnNpbihjZSkpKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgbGF0ID0gLTEgKiBwaGkyeih0aGlzLmUsIE1hdGgudG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IGNvbjtcbiAgICAgICAgRCA9IHRoaXMuQiAqIGNvbSAvIChjb3NwaDAgKiBNYXRoLnNxcnQoY29uKSk7XG4gICAgICAgIEYgPSBEICogRCAtMTtcbiAgICAgICAgXG4gICAgICAgIGlmIChGIDw9IDApIHtcbiAgICAgICAgICBGID0gMDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBGID0gTWF0aC5zcXJ0KEYpO1xuICAgICAgICAgIGlmICh0aGlzLmxhdDAgPCAwKSB7XG4gICAgICAgICAgICBGID0gLUY7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICB0aGlzLkUgPSBGICs9IEQ7XG4gICAgICAgIHRoaXMuRSAqPSBNYXRoLnBvdyh0c2Zueih0aGlzLmUsIHRoaXMubGF0MCwgc2lucGgwKSwgdGhpcy5CKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMuQiA9IDEgLyBjb207XG4gICAgICAgIHRoaXMuQSA9IHRoaXMuazA7XG4gICAgICAgIHRoaXMuRSA9IEQgPSBGID0gMTtcbiAgICAgIH1cbiAgICAgIFxuICAgICAgaWYgKGFscCB8fCBnYW0pIHtcbiAgICAgICAgaWYgKGFscCkge1xuICAgICAgICAgIGdhbW1hMCA9IE1hdGguYXNpbihNYXRoLnNpbihhbHBoYV9jKSAvIEQpO1xuICAgICAgICAgIGlmICghZ2FtKSB7XG4gICAgICAgICAgICBnYW1tYSA9IGFscGhhX2M7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGdhbW1hMCA9IGdhbW1hO1xuICAgICAgICAgIGFscGhhX2MgPSBNYXRoLmFzaW4oRCAqIE1hdGguc2luKGdhbW1hMCkpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMubGFtMCA9IGxhbWMgLSBNYXRoLmFzaW4oMC41ICogKEYgLSAxIC8gRikgKiBNYXRoLnRhbihnYW1tYTApKSAvIHRoaXMuQjtcbiAgICAgIH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ICAgcC54ID0gcC54IC0gdGhpcy5sYW0wO1xuICAgICAgXG4gICAgICBpZiAoTWF0aC5hYnMoTWF0aC5hYnMocC55KSAtIEhBTEZfUEkpID4gRVBTTE4pIHtcbiAgICAgICAgVyA9IHRoaXMuRSAvIE1hdGgucG93KHRzZm56KHRoaXMuZSwgcC55LCBNYXRoLnNpbihwLnkpKSwgdGhpcy5CKTtcbiAgICAgICAgXG4gICAgICAgIHRlbXAgPSAxIC8gVztcbiAgICAgICAgUyA9IDAuNSAqIChXIC0gdGVtcCk7XG4gICAgICAgIFQgPSAwLjUgKiAoVyArIHRlbXApO1xuICAgICAgICBWID0gTWF0aC5zaW4odGhpcy5CICogcC54KTtcbiAgICAgICAgVSA9IChTICogdGhpcy5zaW5nYW0gLSBWICogdGhpcy5jb3NnYW0pIC8gVDtcbiAgICAgICAgICAgIFxuICAgICAgICBpZiAoTWF0aC5hYnMoTWF0aC5hYnMoVSkgLSAxLjApIDwgRVBTTE4pIHtcbiAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoKTtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgdiA9IDAuNSAqIHRoaXMuQXJCICogTWF0aC5sb2coKDEgLSBVKS8oMSArIFUpKTtcbiAgICAgICAgdGVtcCA9IE1hdGguY29zKHRoaXMuQiAqIHAueCk7XG4gICAgICAgIFxuICAgICAgICBpZiAoTWF0aC5hYnModGVtcCkgPCBUT0wpIHtcbiAgICAgICAgICB1ID0gdGhpcy5BICogcC54O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHUgPSB0aGlzLkFyQiAqIE1hdGguYXRhbjIoKFMgKiB0aGlzLmNvc2dhbSArIFYgKiB0aGlzLnNpbmdhbSksIHRlbXApO1xuICAgICAgICB9ICAgIFxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdiA9IHAueSA+IDAgPyB0aGlzLnZfcG9sZV9uIDogdGhpcy52X3BvbGVfcztcbiAgICAgICAgdSA9IHRoaXMuQXJCICogcC55O1xuICAgICAgfVxuICAgICAgICAgXG4gICAgICBpZiAodGhpcy5ub19yb3QpIHtcbiAgICAgICAgY29vcmRzLnggPSB1O1xuICAgICAgICBjb29yZHMueSA9IHY7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB1IC09IHRoaXMudV8wO1xuICAgICAgICBjb29yZHMueCA9IHYgKiB0aGlzLmNvc3JvdCArIHUgKiB0aGlzLnNpbnJvdDtcbiAgICAgICAgY29vcmRzLnkgPSB1ICogdGhpcy5jb3Nyb3QgLSB2ICogdGhpcy5zaW5yb3Q7XG4gICAgICB9XG4gICAgICBcbiAgICAgIGNvb3Jkcy54ID0gKHRoaXMuYSAqIGNvb3Jkcy54ICsgdGhpcy54MCk7XG4gICAgICBjb29yZHMueSA9ICh0aGlzLmEgKiBjb29yZHMueSArIHRoaXMueTApO1xuICAgICAgXG4gICAgICByZXR1cm4gY29vcmRzO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGludmVyc2UkOChwKSB7XG4gICAgICB2YXIgdSwgdiwgUXAsIFNwLCBUcCwgVnAsIFVwO1xuICAgICAgdmFyIGNvb3JkcyA9IHt9O1xuICAgICAgXG4gICAgICBwLnggPSAocC54IC0gdGhpcy54MCkgKiAoMS4wIC8gdGhpcy5hKTtcbiAgICAgIHAueSA9IChwLnkgLSB0aGlzLnkwKSAqICgxLjAgLyB0aGlzLmEpO1xuXG4gICAgICBpZiAodGhpcy5ub19yb3QpIHtcbiAgICAgICAgdiA9IHAueTtcbiAgICAgICAgdSA9IHAueDtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHYgPSBwLnggKiB0aGlzLmNvc3JvdCAtIHAueSAqIHRoaXMuc2lucm90O1xuICAgICAgICB1ID0gcC55ICogdGhpcy5jb3Nyb3QgKyBwLnggKiB0aGlzLnNpbnJvdCArIHRoaXMudV8wO1xuICAgICAgfVxuICAgICAgXG4gICAgICBRcCA9IE1hdGguZXhwKC10aGlzLkJyQSAqIHYpO1xuICAgICAgU3A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xfT3JpZ2luXCIsIFwiSG90aW5lX09ibGlxdWVfTWVyY2F0b3JfVHdvX1BvaW50X05hdHVyYWxfT3JpZ2luXCIsIFwiSG90aW5lX09ibGlxdWVfTWVyY2F0b3JfQXppbXV0aF9DZW50ZXJcIiwgXCJPYmxpcXVlX01lcmNhdG9yXCIsIFwib21lcmNcIl07XG4gICAgdmFyIG9tZXJjID0ge1xuICAgICAgaW5pdDogaW5pdCQ5LFxuICAgICAgZm9yd2FyZDogZm9yd2FyZCQ4LFxuICAgICAgaW52ZXJzZTogaW52ZXJzZSQ4LFxuICAgICAgbmFtZXM6IG5hbWVzJDEwXG4gICAgfTtcblxuICAgIGZ1bmN0aW9uIGluaXQkMTAoKSB7XG4gICAgICBcbiAgICAgIC8vZG91YmxlIGxhdDA7ICAgICAgICAgICAgICAgICAgICAvKiB0aGUgcmVmZXJlbmNlIGxhdGl0dWRlICAgICAgICAgICAgICAgKi9cbiAgICAgIC8vZG91YmxlIGxvbmcwOyAgICAgICAgICAgICAgICAgICAvKiB0aGUgcmVmZXJlbmNlIGxvbmdpdHVkZSAgICAgICAgICAgICAgKi9cbiAgICAgIC8vZG91YmxlIGxhdDE7ICAgICAgICAgICAgICAgICAgICAvKiBmaXJzdCBzdGFuZGFyZCBwYXJhbGxlbCAgICAgICAgICAgICAgKi9cbiAgICAgIC8vZG91YmxlIGxhdDI7ICAgICAgICAgICAgICAgICAgICAvKiBzZWNvbmQgc3RhbmRhcmQgcGFyYWxsZWwgICAgICAgICAgICAgKi9cbiAgICAgIC8vZG91YmxlIHJfbWFqOyAgICAgICAgICAgICAgICAgICAvKiBtYWpvciBheGlzICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgIC8vZG91YmxlIHJfbWluOyAgICAgICAgICAgICAgICAgICAvKiBtaW5vciBheGlzICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgIC8vZG91YmxlIGZhbHNlX2Vhc3Q7ICAgICAgICAgICAgICAvKiB4IG9m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EgKiBkbCAqIGRsICogKDAuNSAtICgxICsgMyAqIHRsMSkgKiBkbCAqIGRsIC8gMjQpO1xuICAgICAgICBsYW0gPSBkbCAqICgxIC0gZHNxICogKHRsMSAvIDMgKyAoMSArIDMgKiB0bDEpICogdGwxICogZHNxIC8gMTUpKSAvIE1hdGguY29zKHBoaTEpO1xuXG4gICAgICB9XG5cbiAgICAgIHAueCA9IGFkanVzdF9sb24obGFtICsgdGhpcy5sb25nMCk7XG4gICAgICBwLnkgPSBhZGp1c3RfbGF0KHBoaSk7XG4gICAgICByZXR1cm4gcDtcblxuICAgIH1cblxuICAgIHZhciBuYW1lcyQxMyA9IFtcIkNhc3NpbmlcIiwgXCJDYXNzaW5pX1NvbGRuZXJcIiwgXCJjYXNzXCJdO1xuICAgIHZhciBjYXNzID0ge1xuICAgICAgaW5pdDogaW5pdCQxMixcbiAgICAgIGZvcndhcmQ6IGZvcndhcmQkMTEsXG4gICAgICBpbnZlcnNlOiBpbnZlcnNlJDExLFxuICAgICAgbmFtZXM6IG5hbWVzJDEzXG4gICAgfTtcblxuICAgIHZhciBxc2ZueiA9IGZ1bmN0aW9uKGVjY2VudCwgc2lucGhpKSB7XG4gICAgICB2YXIgY29uO1xuICAgICAgaWYgKGVjY2VudCA+IDEuMGUtNykge1xuICAgICAgICBjb24gPSBlY2NlbnQgKiBzaW5waGk7XG4gICAgICAgIHJldHVybiAoKDEgLSBlY2NlbnQgKiBlY2NlbnQpICogKHNpbnBoaSAvICgxIC0gY29uICogY29uKSAtICgwLjUgLyBlY2NlbnQpICogTWF0aC5sb2coKDEgLSBjb24pIC8gKDEgKyBjb24pKSkpO1xuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIHJldHVybiAoMiAqIHNpbnBoaSk7XG4gICAgICB9XG4gICAgfTtcblxuICAgIC8qXG4gICAgICByZWZlcmVuY2VcbiAgICAgICAgXCJOZXcgRXF1YWwtQXJlYSBNYXAgUHJvamVjdGlvbnMgZm9yIE5vbmNpcm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MpO1xuICAgICAgICBzd2l0Y2ggKHRoaXMubW9kZSkge1xuICAgICAgICBjYXNlIHRoaXMuTl9QT0xFOlxuICAgICAgICAgIHRoaXMuZGQgPSAxO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIHRoaXMuU19QT0xFOlxuICAgICAgICAgIHRoaXMuZGQgPSAxO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIHRoaXMuRVFVSVQ6XG4gICAgICAgICAgdGhpcy5ycSA9IE1hdGguc3FydCgwLjUgKiB0aGlzLnFwKTtcbiAgICAgICAgICB0aGlzLmRkID0gMSAvIHRoaXMucnE7XG4gICAgICAgICAgdGhpcy54bWYgPSAxO1xuICAgICAgICAgIHRoaXMueW1mID0gMC41ICogdGhpcy5xcDtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSB0aGlzLk9CTElROlxuICAgICAgICAgIHRoaXMucnEgPSBNYXRoLnNxcnQoMC41ICogdGhpcy5xcCk7XG4gICAgICAgICAgc2lucGhpID0gTWF0aC5zaW4odGhpcy5sYXQwKTtcbiAgICAgICAgICB0aGlzLnNpbmIxID0gcXNmbnoodGhpcy5lLCBzaW5waGkpIC8gdGhpcy5xcDtcbiAgICAgICAgICB0aGlzLmNvc2IxID0gTWF0aC5zcXJ0KDEgLSB0aGlzLnNpbmIxICogdGhpcy5zaW5iMSk7XG4gICAgICAgICAgdGhpcy5kZCA9IE1hdGguY29zKHRoaXMubGF0MCkgLyAoTWF0aC5zcXJ0KDEgLSB0aGlzLmVzICogc2lucGhpICogc2lucGhpKSAqIHRoaXMucnEgKiB0aGlzLmNvc2IxKTtcbiAgICAgICAgICB0aGlzLnltZiA9ICh0aGlzLnhtZiA9IHRoaXMucnEpIC8gdGhpcy5kZDtcbiAgICAgICAgICB0aGlzLnhtZiAqPSB0aGlzLmRkO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAg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hpcy5zaW5waDAgKiBzaW5waGkgKyB0aGlzLmNvc3BoMCAqIGNvc3BoaSAqIGNvc2xhbTtcbiAgICAgICAgICBpZiAoeSA8PSBFUFNMTikge1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgfVxuICAgICAgICAgIHkgPSBNYXRoLnNxcnQoMiAvIHkpO1xuICAgICAgICAgIHggPSB5ICogY29zcGhpICogTWF0aC5zaW4obGFtKTtcbiAgICAgICAgICB5ICo9ICh0aGlzLm1vZGUgPT09IHRoaXMuRVFVSVQpID8gc2lucGhpIDogdGhpcy5jb3NwaDAgKiBzaW5waGkgLSB0aGlzLnNpbnBoMCAqIGNvc3BoaSAqIGNvc2xhbTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0aGlzLm1vZGUgPT09IHRoaXMuTl9QT0xFIHx8IHRoaXMubW9kZSA9PT0gdGhpcy5TX1BPTEUpIHtcbiAgICAgICAgICBpZiAodGhpcy5tb2RlID09PSB0aGlzLk5fUE9MRSkge1xuICAgICAgICAgICAgY29zbGFtID0gLWNvc2xhbTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKE1hdGguYWJzKHBoaSArIHRoaXMubGF0MCkgPCBFUFNMTikge1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgfVxuICAgICAgICAgIHkgPSBGT1JUUEkgLSBwaGkgKiAwLjU7XG4gICAgICAgICAgeSA9IDIgKiAoKHRoaXMubW9kZSA9PT0gdGhpcy5TX1BPTEUpID8gTWF0aC5jb3MoeSkgOiBNYXRoLnNpbih5KSk7XG4gICAgICAgICAgeCA9IHkgKiBNYXRoLnNpbihsYW0pO1xuICAgICAgICAgIHkgKj0gY29zbGFtO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAgc2luYiA9IDA7XG4gICAgICAgIGNvc2IgPSAwO1xuICAgICAgICBiID0gMDtcbiAgICAgICAgY29zbGFtID0gTWF0aC5jb3MobGFtKTtcbiAgICAgICAgc2lubGFtID0gTWF0aC5zaW4obGFtKTtcbiAgICAgICAgc2lucGhpID0gTWF0aC5zaW4ocGhpKTtcbiAgICAgICAgcSA9IHFzZm56KHRoaXMuZSwgc2lucGhpKTtcbiAgICAgICAgaWYgKHRoaXMubW9kZSA9PT0gdGhpcy5PQkxJUSB8fCB0aGlzLm1vZGUgPT09IHRoaXMuRVFVSVQpIHtcbiAgICAgICAgICBzaW5iID0gcSAvIHRoaXMucXA7XG4gICAgICAgICAgY29zYiA9IE1hdGguc3FydCgxIC0gc2luYiAqIHNpbmIpO1xuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAodGhpcy5tb2RlKSB7XG4gICAgICAgIGNhc2UgdGhpcy5PQkxJUTpcbiAgICAgICAgICBiID0gMSArIHRoaXMuc2luYjEgKiBzaW5iICsgdGhpcy5jb3NiMSAqIGNvc2IgKiBjb3NsYW07XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgdGhpcy5FUVVJVDpcbiAgICAgICAgICBiID0gMSArIGNvc2IgKiBjb3NsYW07XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgdGhpcy5OX1BPTEU6XG4gICAgICAgICAgYiA9IEhBTEZfUEkgKyBwaGk7XG4gICAgICAgICAgcSA9IHRoaXMucXAgLSBxO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIHRoaXMuU19QT0xFOlxuICAgICAgICAgIGIgPSBwaGkgLSBIQUxGX1BJO1xuICAgICAgICAgIHEgPSB0aGlzLnFwICsgcTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAoTWF0aC5hYnMoYikgPCBFUFNMTikge1xuICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAodGhpcy5tb2RlKSB7XG4gICAgICAgIGNhc2UgdGhpcy5PQkxJUTpcbiAgICAgICAgY2FzZSB0aGlzLkVRVUlUOlxuICAgICAgICAgIGIgPSBNYXRoLnNxcnQoMiAvIGIpO1xuICAgICAgICAgIGlmICh0aGlzLm1vZGUgPT09IHRoaXMuT0JMSVEpIHtcbiAgICAgICAgICAgIHkgPSB0aGlzLnltZiAqIGIgKiAodGhpcy5jb3NiMSAqIHNpbmIgLSB0aGlzLnNpbmIxICogY29zYiAqIGNvc2xhbSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgeSA9IChiID0gTWF0aC5zcXJ0KDIgLyAoMSArIGNvc2IgKiBjb3NsYW0pKSkgKiBzaW5iICogdGhpcy55bWY7XG4gICAgICAgICAgfVxuICAgICAgICAgIHggPSB0aGlzLnhtZiAqIGIgKiBjb3NiICogc2lubGFtO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIHRoaXMuTl9QT0xFOlxuICAgICAgICBjYXNlIHRoaXMuU19QT0xFOlxuICAgICAgICAgIGlmIChxID49IDApIHtcbiAgICAgICAgICAgIHggPSAoYiA9IE1hdGguc3FydChxKSkgKiBzaW5sYW07XG4gICAgICAgICAgICB5ID0gY29zbGFtICogKCh0aGlzLm1vZGUgPT09IHRoaXMuU19QT0xFKSA/IGIgOiAtYik7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgeCA9IHkgPSAwO1xuICAgICAgICAgIH1cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBwLnggPSB0aGlzLmEgKiB4ICsgdGhpcy54MDtcbiAgICAgIHAueSA9IHRoaXMuYSAqIHkgKyB0aGlzLnkwO1xuICAgICAgcmV0dXJuIHA7XG4gICAgfVxuXG4gICAgLyogSW52ZXJzZSBlcXVhdGlvbnNcbiAgICAgIC0tLS0tLS0tLS0tLS0tLS0tKi9cbiAgICBmdW5jdGlvbiBpbnZlcnNlJDEyKHApIHtcbiAgICAgIHAueCAtPSB0aGlzLngwO1xuICAgICAgcC55IC09IHRoaXMueTA7XG4gICAgICB2YXIgeCA9IHAueCAvIHRoaXMuYTtcbiAgICAgIHZhciB5ID0gcC55IC8gdGhpcy5hO1xuICAgICAgdmFyIGxhbSwgcGhpLCBjQ2UsIHNDZSwgcSwgcmhvLCBhYjtcbiAgICAgIGlmICh0aGlzLnNwaGVyZSkge1xuICAgICAgICB2YXIgY29zeiA9IDAsXG4gICAgICAgICAgcmgsIHNpbnogPSAwO1xuXG4gICAgICAgIHJoID0gTWF0aC5zcXJ0KHggKiB4ICsgeSAqIHkpO1xuICAgICAgICBwaGkgPSByaCAqIDAuNTtcbiAgICAgICAgaWYgKHBoaSA+IDEpIHtcbiAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICBwaGkgPSAyICogTWF0aC5hc2luKHBoaSk7XG4gICAgICAgIGlmICh0aGlzLm1vZGUgPT09IHRoaXMuT0JMSVEgfHwgdGhpcy5tb2RlID09PSB0aGlzLkVRVUlUKSB7XG4gICAgICAgICAgc2lueiA9IE1hdGguc2luKHBoaSk7XG4gICAgICAgICAgY29zeiA9IE1hdGguY29zKHBoaSk7XG4gICAgICAgIH1cbiAgICAgICAgc3dpdGNoICh0aGlzLm1vZGUpIHtcbiAgICAgICAgY2FzZSB0aGlzLkVRVUlUOlxuICAgICAgICAgIHBoaSA9IChNYXRoLmFicyhyaCkgPD0gRVBTTE4pID8gMCA6IE1hdGguYXNpbih5ICogc2lueiAvIHJoKTtcbiAgICAgICAgICB4ICo9IHNpbno7XG4gICAgICAgICAgeSA9IGNvc3ogKiByaDtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSB0aGlzLk9CTElROlxuICAgICAgICAgIHBoaSA9IChNYXRoLmFicyhyaCkgPD0gRVBTTE4pID8gdGhpcy5sYXQwIDogTWF0aC5hc2luKGNvc3ogKiB0aGlzLnNpbnBoMCArIHkgKiBzaW56ICogdGhpcy5jb3NwaDAgLyByaCk7XG4gICAgICAgICAgeCAqPSBzaW56ICogdGhpcy5jb3NwaDA7XG4gICAgICAgICAgeSA9IChjb3N6IC0gTWF0aC5zaW4ocGhpKSAqIHRoaXMuc2lucGgwKSAqIHJoO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIHRoaXMuTl9QT0xFOlxuICAgICAgICAgIHkgPSAteTtcbiAgICAgICAgICBwaGkgPSBIQUxGX1BJIC0gcGhpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIHRoaXMuU19QT0xFOlxuICAgICAgICAgIHBoaSAtPSBIQUxGX1BJO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGxhbSA9ICh5ID09PSAwICYmICh0aGlzLm1vZGUgPT09IHRoaXMuRVFVSVQgfHwgdGhpcy5tb2RlID09PSB0aGlzLk9CTElRKSkgPyAwIDogTWF0aC5hdGFuMih4LCB5KTtcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBhYiA9IDA7XG4gICAgICAgIGlmICh0aGlzLm1vZGUgPT09IHRoaXMuT0JMSVEgfHwgdGhpcy5tb2RlID09PSB0aGlzLkVRVUlUKSB7XG4gICAgICAgICAgeCAvPSB0aGlzLmRkO1xuICAgICAgICAgIHkgKj0gdGhpcy5kZDtcbiAgICAgICAgICByaG8gPSBNYXRoLnNxcnQoeCAqIHggKyB5ICogeSk7XG4gICAgICAgICAgaWYgKHJobyA8IEVQU0xOKSB7XG4gICAgICAgICAgICBwLnggPSB0aGlzLmxvbmcwO1xuICAgICAgICAgICAgcC55ID0gdGhpcy5sYXQwO1xuICAgICAgICAgICAgcmV0dXJuIHA7XG4gICAgICAgICAgfVxuICAgICAgICAgIHNDZSA9IDIgKiBNYXRoLmFzaW4oMC41ICogcmhvIC8gdGhpcy5ycSk7XG4gICAgICAgICAgY0NlID0gTWF0aC5jb3Moc0NlKTtcbiAgICAgICAgICB4ICo9IChzQ2UgPSBNYXRoLnNpbihzQ2UpKTtcbiAgICAgICAgICBpZiAodGhpcy5tb2RlID09PSB0aGlzLk9CTElRKSB7XG4gICAgICAgICAgICBhYiA9IGNDZSAqIHRoaXMuc2luYjEgKyB5ICogc0NlICogdGhpcy5jb3NiMSAvIHJobztcbiAgICAgICAgICAgIHEgPSB0aGlzLnFwICogYWI7XG4gICAgICAgICAgICB5ID0gcmhvICogdGhpcy5jb3NiMSAqIGNDZSAtIHkgKiB0aGlzLnNpbmIxICogc0NlO1xuICAgICAgICAgIH1cbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGFiID0geSAqIHNDZSAvIHJobztcbiAgICAgICAgICAgIHEgPSB0aGlzLnFwICogYWI7XG4gICAgICAgICAgICB5ID0gcmhvICogY0NlO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0aGlzLm1vZGUgPT09IHRoaXMuTl9QT0xFIHx8IHRoaXMubW9kZSA9PT0gdGhpcy5TX1BPTEUpIHtcbiAgICAgICAgICBpZiAodGhpcy5tb2RlID09PSB0aGlzLk5fUE9MRSkge1xuICAgICAgICAgICAgeSA9IC15O1xuICAgICAgICAgIH1cbiAgICAgICAgICBxID0gKHggKiB4ICsgeSAqIHkpO1xuICAgICAgICAgIGlmICghcSkge1xuICAgICAgICAgICAgcC54ID0gdGhpcy5sb25nMDtcbiAgICAgICAgICAgIHAueSA9IHRoaXMubGF0MDtcbiAgICAgICAgICAgIHJldHVybiBwO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhYiA9IDEgLSBxIC8gdGhpcy5xcDtcbiAgICAgICAgICBpZiAodGhpcy5tb2RlID09PSB0aGlzLlNfUE9MRSkge1xuICAgICAgICAgICAgYWIgPSAtYWI7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGxhbSA9IE1hdGguYXRhbjIoeCwgeSk7XG4gICAgICAgIHBoaSA9IGF1dGhsYXQoTWF0aC5hc2luKGFiKSwgdGhpcy5hcGEpO1xuICAgICAgfVxuXG4gICAgICBwLngg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nVuY3Rpb24gcGhpMXooZWNjZW50LCBxcykge1xuICAgICAgdmFyIHNpbnBoaSwgY29zcGhpLCBjb24sIGNvbSwgZHBoaTtcbiAgICAgIHZhciBwaGkgPSBhc2lueigwLjUgKiBxcyk7XG4gICAgICBpZiAoZWNjZW50IDwgRVBTTE4pIHtcbiAgICAgICAgcmV0dXJuIHBoaTtcbiAgICAgIH1cblxuICAgICAgdmFyIGVjY250cyA9IGVjY2VudCAqIGVjY2VudDtcbiAgICAgIGZvciAodmFyIGkgPSAxOyBpIDw9IDI1OyBpKyspIHtcbiAgICAgICAgc2lucGhpID0gTWF0aC5zaW4ocGhpKTtcbiAgICAgICAgY29zcGhpID0gTWF0aC5jb3MocGhpKTtcbiAgICAgICAgY29uID0gZWNjZW50ICogc2lucGhpO1xuICAgICAgICBjb20gPSAxIC0gY29uICogY29uO1xuICAgICAgICBkcGhpID0gMC41ICogY29tICogY29tIC8gY29zcGhpICogKHFzIC8gKDEgLSBlY2NudHMpIC0gc2lucGhpIC8gY29tICsgMC41IC8gZWNjZW50ICogTWF0aC5sb2coKDEgLSBjb24pIC8gKDEgKyBjb24pKSk7XG4gICAgICAgIHBoaSA9IHBoaSArIGRwaGk7XG4gICAgICAgIGlmIChNYXRoLmFicyhkcGhpKSA8PSAxZS03KSB7XG4gICAgICAgICAgcmV0dXJuIHBoaTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgdmFyIG5hbWVzJDE1ID0gW1wiQWxiZXJzX0NvbmljX0VxdWFsX0FyZWFcIiwgXCJBbGJlcnNcIiwgXCJhZWFcIl07XG4gICAgdmFyIGFlYSA9IHtcbiAgICAgIGluaXQ6IGluaXQkMTQsXG4gICAgICBmb3J3YXJkOiBmb3J3YXJkJDEzLFxuICAgICAgaW52ZXJzZTogaW52ZXJzZSQxMyxcbiAgICAgIG5hbWVzOiBuYW1lcyQxNSxcbiAgICAgIHBoaTF6OiBwaGkxelxuICA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jKTtcbiAgICAgICAgc2luYyA9IE1hdGguc2luKGMpO1xuICAgICAgICBjb3NjID0gTWF0aC5jb3MoYyk7XG5cbiAgICAgICAgbGF0ID0gYXNpbnooY29zYyAqIHRoaXMuc2luX3AxNCArIChwLnkgKiBzaW5jICogdGhpcy5jb3NfcDE0KSAvIHJoKTtcbiAgICAgICAgbG9uID0gTWF0aC5hdGFuMihwLnggKiBzaW5jLCByaCAqIHRoaXMuY29zX3AxNCAqIGNvc2MgLSBwLnkgKiB0aGlzLnNpbl9wMTQgKiBzaW5jKTtcbiAgICAgICAgbG9uID0gYWRqdXN0X2xvbih0aGlzLmxvbmcwICsgbG9uKTtcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBsYXQgPSB0aGlzLnBoaWMwO1xuICAgICAgICBsb24gPSAwO1xuICAgICAgfVxuXG4gICAgICBwLnggPSBsb247XG4gICAgICBwLnkgPSBsYXQ7XG4gICAgICByZXR1cm4gcDtcbiAgICB9XG5cbiAgICB2YXIgbmFtZXMkMTYgPSBbXCJnbm9tXCJdO1xuICAgIHZhciBnbm9tID0ge1xuICAgICAgaW5pdDogaW5pdCQxNSxcbiAgICAgIGZvcndhcmQ6IGZvcndhcmQkMTQsXG4gICAgICBpbnZlcnNlOiBpbnZlcnNlJDE0LFxuICAgICAgbmFtZXM6IG5hbWVzJDE2XG4gICAgfTtcblxuICAgIHZhciBpcXNmbnogPSBmdW5jdGlvbihlY2NlbnQsIHEpIHtcbiAgICAgIHZhciB0ZW1wID0gMSAtICgxIC0gZWNjZW50ICogZWNjZW50KSAvICgyICogZWNjZW50KSAqIE1hdGgubG9nKCgxIC0gZWNjZW50KSAvICgxICsgZWNjZW50KSk7XG4gICAgICBpZiAoTWF0aC5hYnMoTWF0aC5hYnMocSkgLSB0ZW1wKSA8IDEuMEUtNikge1xuICAgICAgICBpZiAocSA8IDApIHtcbiAgICAgICAgICByZXR1cm4gKC0xICogSEFMRl9QSSk7XG4gICAgICAgIH1cbiAgIC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Bsb24sIGxhdCwgeCwgeSwgaTtcbiAgICAgIHZhciBhbCwgYmw7XG4gICAgICB2YXIgcGhpLCBkcGhpO1xuICAgICAgeCA9IHAueCAtIHRoaXMueDA7XG4gICAgICB5ID0gcC55IC0gdGhpcy55MDtcblxuICAgICAgaWYgKHRoaXMuc3BoZXJlKSB7XG4gICAgICAgIGlmIChNYXRoLmFicyh5ICsgdGhpcy5hICogdGhpcy5sYXQwKSA8PSBFUFNMTikge1xuICAgICAgICAgIGxvbiA9IGFkanVzdF9sb24oeCAvIHRoaXMuYSArIHRoaXMubG9uZzApO1xuICAgICAgICAgIGxhdCA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgYWwgPSB0aGlzLmxhdDAgKyB5IC8gdGhpcy5hO1xuICAgICAgICAgIGJsID0geCAqIHggLyB0aGlzLmEgLyB0aGlzLmEgKyBhbCAqIGFsO1xuICAgICAgICAgIHBoaSA9IGFsO1xuICAgICAgICAgIHZhciB0YW5waGk7XG4gICAgICAgICAgZm9yIChpID0gTUFYX0lURVIkMjsgaTsgLS1pKSB7XG4gICAgICAgICAgICB0YW5waGkgPSBNYXRoLnRhbihwaGkpO1xuICAgICAgICAgICAgZHBoaSA9IC0xICogKGFsICogKHBoaSAqIHRhbnBoaSArIDEpIC0gcGhpIC0gMC41ICogKHBoaSAqIHBoaSArIGJsKSAqIHRhbnBoaSkgLyAoKHBoaSAtIGFsKSAvIHRhbnBoaSAtIDEpO1xuICAgICAgICAgICAgcGhpICs9IGRwaGk7XG4gICAgICAgICAgICBpZiAoTWF0aC5hYnMoZHBoaSkgPD0gRVBTTE4pIHtcbiAgICAgICAgICAgICAgbGF0ID0gcGhpO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgbG9uID0gYWRqdXN0X2xvbih0aGlzLmxvbmcwICsgKE1hdGguYXNpbih4ICogTWF0aC50YW4ocGhpKSAvIHRoaXMuYSkpIC8gTWF0aC5zaW4obGF0KSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpZiAoTWF0aC5hYnMoeSArIHRoaXMubWwwKSA8PSBFUFNMTikge1xuICAgICAgICAgIGxhdCA9IDA7XG4gICAgICAgICAgbG9uID0gYWRqdXN0X2xvbih0aGlzLmxvbmcwICsgeCAvIHRoaXMuYSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG5cbiAgICAgICAgICBhbCA9ICh0aGlzLm1sMCArIHkpIC8gdGhpcy5hO1xuICAgICAgICAgIGJsID0geCAqIHggLyB0aGlzLmEgLyB0aGlzLmEgKyBhbCAqIGFsO1xuICAgICAgICAgIHBoaSA9IGFsO1xuICAgICAgICAgIHZhciBjbCwgbWxuLCBtbG5wLCBtYTtcbiAgICAgICAgICB2YXIgY29uO1xuICAgICAgICAgIGZvciAoaSA9IE1BWF9JVEVSJDI7IGk7IC0taSkge1xuICAgICAgICAgICAgY29uID0gdGhpcy5lICogTWF0aC5zaW4ocGhpKTtcbiAgICAgICAgICAgIGNsID0gTWF0aC5zcXJ0KDEgLSBjb24gKiBjb24pICogTWF0aC50YW4ocGhpKTtcbiAgICAgICAgICAgIG1sbiA9IHRoaXMuYSAqIG1sZm4odGhpcy5lMCwgdGhpcy5lMSwgdGhpcy5lMiwgdGhpcy5lMywgcGhpKTtcbiAgICAgICAgICAgIG1sbnAgPSB0aGlzLmUwIC0gMiAqIHRoaXMuZTEgKiBNYXRoLmNvcygyICogcGhpKSArIDQgKiB0aGlzLmUyICogTWF0aC5jb3MoNCAqIHBoaSkgLSA2ICogdGhpcy5lMyAqIE1hdGguY29zKDYgKiBwaGkpO1xuICAgICAgICAgICAgbWEgPSBtbG4gLyB0aGlzLmE7XG4gICAgICAgICAgICBkcGhpID0gKGFsICogKGNsICogbWEgKyAxKSAtIG1hIC0gMC41ICogY2wgKiAobWEgKiBtYSArIGJsKSkgLyAodGhpcy5lcyAqI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ltO1xuICAgICAgICAgIHRoX25faW0xID0gdGhfbl9pbSAqIHRoX3JlICsgdGhfbl9yZSAqIHRoX2ltO1xuICAgICAgICAgIHRoX25fcmUgPSB0aF9uX3JlMTtcbiAgICAgICAgICB0aF9uX2ltID0gdGhfbl9pbTE7XG4gICAgICAgICAgbnVtX3JlID0gbnVtX3JlICsgKG4gLSAxKSAqICh0aGlzLkJfcmVbbl0gKiB0aF9uX3JlIC0gdGhpcy5CX2ltW25dICogdGhfbl9pbSk7XG4gICAgICAgICAgbnVtX2ltID0gbnVtX2ltICsgKG4gLSAxKSAqICh0aGlzLkJfaW1bbl0gKiB0aF9uX3JlICsgdGhpcy5CX3JlW25dICogdGhfbl9pbSk7XG4gICAgICAgIH1cblxuICAgICAgICB0aF9uX3JlID0gMTtcbiAgICAgICAgdGhfbl9pbSA9IDA7XG4gICAgICAgIHZhciBkZW5fcmUgPSB0aGlzLkJfcmVbMV07XG4gICAgICAgIHZhciBkZW5faW0gPSB0aGlzLkJfaW1bMV07XG4gICAgICAgIGZvciAobiA9IDI7IG4gPD0gNjsgbisrKSB7XG4gICAgICAgICAgdGhfbl9yZTEgPSB0aF9uX3JlICogdGhfcmUgLSB0aF9uX2ltICogdGhfaW07XG4gICAgICAgICAgdGhfbl9pbTEgPSB0aF9uX2ltICogdGhfcmUgKyB0aF9uX3JlICogdGhfaW07XG4gICAgICAgICAgdGhfbl9yZSA9IHRoX25fcmUxO1xuICAgICAgICAgIHRoX25faW0gPSB0aF9uX2ltMTtcbiAgICAgICAgICBkZW5fcmUgPSBkZW5fcmUgKyBuICogKHRoaXMuQl9yZVtuXSAqIHRoX25fcmUgLSB0aGlzLkJfaW1bbl0gKiB0aF9uX2ltKTtcbiAgICAgICAgICBkZW5faW0gPSBkZW5faW0gKyBuICogKHRoaXMuQl9pbVtuXSAqIHRoX25fcmUgKyB0aGlzLkJfcmVbbl0gKiB0aF9uX2ltKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIENvbXBsZXggZ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gICBpZiAoIXRoaXMubSkge1xuICAgICAgICAgIGxhdCA9IHRoaXMubiAhPT0gMSA/IE1hdGguYXNpbih0aGlzLm4gKiBNYXRoLnNpbihsYXQpKSA6IGxhdDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICB2YXIgayA9IHRoaXMubiAqIE1hdGguc2luKGxhdCk7XG4gICAgICAgICAgZm9yICh2YXIgaSA9IE1BWF9JVEVSJDM7IGk7IC0taSkge1xuICAgICAgICAgICAgdmFyIFYgPSAodGhpcy5tICogbGF0ICsgTWF0aC5zaW4obGF0KSAtIGspIC8gKHRoaXMubSArIE1hdGguY29zKGxhdCkpO1xuICAgICAgICAgICAgbGF0IC09IFY7XG4gICAgICAgICAgICBpZiAoTWF0aC5hYnMoVikgPCBFUFNMTikge1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgeCA9IHRoaXMuYSAqIHRoaXMuQ194ICogbG9uICogKHRoaXMubSArIE1hdGguY29zKGxhdCkpO1xuICAgICAgICB5ID0gdGhpcy5hICogdGhpcy5DX3kgKiBsYXQ7XG5cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuXG4gICAgICAgIHZhciBzID0gTWF0aC5zaW4obGF0KTtcbiAgICAgICAgdmFyIGMgPSBNYXRoLmNvcyhsYXQpO1xuICAgICAgICB5ID0gdGhpcy5hICogcGpfbWxmbihsYXQsIHMsIGMsIHRoaXMuZW4pO1xuICAgICAgICB4ID0gdGhpcy5hICogbG9uICogYyAvIE1hdGguc3FydCgxIC0gdGhpcy5lcyAqIHMgKiBzKTtcbiAgICAgIH1cblxuICAgICAgcC54ID0geDtcbiAgICAgIHAueSA9IHk7XG4gICAgICByZXR1cm4gcDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpbnZlcnNlJDIwKHApIHtcbiAgICAgIHZhciBsYXQsIHRlbXAsIGxvbiwgcztcblxuICAgICAgcC54IC09IHRoaXMueDA7XG4gICAgICBsb24gPSBwLnggLyB0aGlzLmE7XG4gICAgICBwLnkgLT0gdGhpcy55MDtcbiAgICAgIGxhdCA9IHAueSAvIHRoaXMuYTtcblxuICAgICAgaWYgKHRoaXMuc3BoZXJlKSB7XG4gICAgICAgIGxhdCAvPSB0aGlzLkNfeTtcbiAgICAgICAgbG9uID0gbG9uIC8gKHRoaXMuQ194ICogKHRoaXMubSArIE1hdGguY29zKGxhdCkpKTtcbiAgICAgICAgaWYgKHRoaXMubSkge1xuICAgICAgICAgIGxhdCA9IGFzaW56KCh0aGlzLm0gKiBsYXQgKyBNYXRoLnNpbihsYXQpKSAvIHRoaXMubik7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAodGhpcy5uICE9PSAxKSB7XG4gICAgICAgICAgbGF0ID0gYXNpbnooTWF0aC5zaW4obGF0KSAvIHRoaXMubik7XG4gICAgICAgIH1cbiAgICAgICAgbG9uID0gYWRqdXN0X2xvbihsb24gKyB0aGlzLmxvbmcwKTtcbiAgICAgICAgbGF0ID0gYWRqdXN0X2xhdChsYXQpO1xuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIGxhdCA9IHBqX2ludl9tbGZuKHAueSAvIHRoaXMuYSwgdGhpcy5lcywgdGhpcy5lbik7XG4gICAgICAgIHMgPSBNYXRoLmFicyhsYXQpO1xuICAgICAgICBpZiAocyA8IEhBTEZfUEkpIHtcbiAgICAgICAgICBzID0gTWF0aC5zaW4obGF0KTtcbiAgICAgICAgICB0ZW1wID0gdGhpcy5sb25nMCArIHAueCAqIE1hdGguc3FydCgxIC0gdGhpcy5lcyAqIHMgKiBzKSAvICh0aGlzLmEgKiBNYXRoLmNvcyhsYXQpKTtcbiAgICAgICAgICAvL3RlbXAgPSB0aGlzLmxvbmcwICsgcC54IC8gKHRoaXMuYSAqIE1hdGguY29zKGxhdCkpO1xuICAgICAgICAgIGxvbiA9IGFkanVzdF9sb24odGVtcCk7XG4gICAgICA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AgICAgICAtLS0tLS0tLS0tLS0tLS0tLSovXG4gICAgICBwLnggLT0gdGhpcy54MDtcbiAgICAgIHAueSAtPSB0aGlzLnkwO1xuICAgICAgY29uID0gTWF0aC5QSSAqIHRoaXMuUjtcbiAgICAgIHh4ID0gcC54IC8gY29uO1xuICAgICAgeXkgPSBwLnkgLyBjb247XG4gICAgICB4eXMgPSB4eCAqIHh4ICsgeXkgKiB5eTtcbiAgICAgIGMxID0gLU1hdGguYWJzKHl5KSAqICgxICsgeHlzKTtcbiAgICAgIGMyID0gYzEgLSAyICogeXkgKiB5eSArIHh4ICogeHg7XG4gICAgICBjMyA9IC0yICogYzEgKyAxICsgMiAqIHl5ICogeXkgKyB4eXMgKiB4eXM7XG4gICAgICBkID0geXkgKiB5eSAvIGMzICsgKDIgKiBjMiAqIGMyICogYzIgLyBjMyAvIGMzIC8gYzMgLSA5ICogYzEgKiBjMiAvIGMzIC8gYzMpIC8gMjc7XG4gICAgICBhMSA9IChjMSAtIGMyICogYzIgLyAzIC8gYzMpIC8gYzM7XG4gICAgICBtMSA9IDIgKiBNYXRoLnNxcnQoLWExIC8gMyk7XG4gICAgICBjb24gPSAoKDMgKiBkKSAvIGExKSAvIG0xO1xuICAgICAgaWYgKE1hdGguYWJzKGNvbikgPiAxKSB7XG4gICAgICAgIGlmIChjb24gPj0gMCkge1xuICAgICAgICAgIGNvbiA9IDE7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgY29uID0gLTE7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHRoMSA9IE1hdGguYWNvcyhjb24pIC8gMztcbiAgICAgIGlmIChwLnkgPj0gMCkge1xuICAgICAgICBsYXQgPSAoLW0xICogTWF0aC5jb3ModGgxICsgTWF0aC5QSSAvIDMpIC0gYzIgLyAzIC8gYzMpICogTWF0aC5QSTtcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBsYXQgPSAtKC1tMSAqIE1hdGguY29zKHRo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gdGhpcy5sb25nMCk7XG4gICAgICB2YXIgZTAsIGUxLCBlMiwgZTMsIE1scCwgTWwsIHRhbnBoaSwgTmwxLCBObCwgcHNpLCBBeiwgRywgSCwgR0gsIEhzLCBjLCBrcCwgY29zX2MsIHMsIHMyLCBzMywgczQsIHM1O1xuICAgICAgaWYgKHRoaXMuc3BoZXJlKSB7XG4gICAgICAgIGlmIChNYXRoLmFicyh0aGlzLnNpbl9wMTIgLSAxKSA8PSBFUFNMTikge1xuICAgICAgICAgIC8vTm9ydGggUG9sZSBjYXNlXG4gICAgICAgICAgcC54ID0gdGhpcy54MCArIHRoaXMuYSAqIChIQUxGX1BJIC0gbGF0KSAqIE1hdGguc2luKGRsb24pO1xuICAgICAgICAgIHAueSA9IHRoaXMueTAgLSB0aGlzLmEgKiAoSEFMRl9QSSAtIGxhdCkgKiBNYXRoLmNvcyhkbG9uKTtcbiAgICAgICAgICByZXR1cm4gcDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChNYXRoLmFicyh0aGlzLnNpbl9wMTIgKyAxKSA8PSBFUFNMTikge1xuICAgICAgICAgIC8vU291dGggUG9sZSBjYXNlXG4gICAgICAgICAgcC54ID0gdGhpcy54MCArIHRoaXMuYSAqIChIQUxGX1BJICsgbGF0KSAqIE1hdGguc2luKGRsb24pO1xuICAgICAgICAgIHAueSA9IHRoaXMueTAgKyB0aGlzLmEgKiAoSEFMRl9QSSArIGxhdCkgKiBNYXRoLmNvcyhkbG9uKTtcbiAgICAgICAgICByZXR1cm4gcDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAvL2RlZmF1bHQgY2FzZVxuICAgICAgICAgIGNvc19jID0gdGhpcy5zaW5fcDEyICogc2lucGhpICsgdGhpcy5jb3NfcDEyICogY29zcGhpICogTWF0aC5jb3MoZGxvbik7XG4gICAgICAgICAgYyA9IE1hdGguYWNvcyhjb3NfYyk7XG4gICAgICAgICAga3AgPSBjID8gYyAvIE1hdGguc2luKGMpIDogMTtcbiAgICAgICAgICBwLnggPSB0aGlzLngwICsgdGhpcy5hICoga3AgKiBjb3NwaGkgKiBNYXRoLnNpbihkbG9uKTtcbiAgICAgICAgICBwLnkgPSB0aGlzLnkwICsgdGhpcy5hICoga3AgKiAodGhpcy5jb3NfcDEyICogc2lucGhpIC0gdGhpcy5zaW5fcDEyICogY29zcGhpICogTWF0aC5jb3MoZGxvbikpO1xuICAgICAgICAgIHJldHVybiBwO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAgZTAgPSBlMGZuKHRoaXMuZXMpO1xuICAgICAgICBlMSA9IGUxZm4odGhpcy5lcyk7XG4gICAgICAgIGUyID0gZTJmbih0aGlzLmVzKTtcbiAgICAgICAgZTMgPSBlM2ZuKHRoaXMuZXMpO1xuICAgICAgICBpZiAoTWF0aC5hYnModGhpcy5zaW5fcDEyIC0gMSkgPD0gRVBTTE4pIHtcbiAgICAgICAgICAvL05vcnRoIFBvbGUgY2FzZVxuICAgICAgICAgIE1scCA9IHRoaXMuYSAqIG1sZm4oZTAsIGUxLCBlMiwgZTMsIEhBTEZfUEkpO1xuICAgICAgICAgIE1sID0gdGhpcy5hICogbWxmbihlMCwgZTEsIGUyLCBlMywgbGF0KTtcbiAgICAgICAgICBwLnggPSB0aGlzLngwICsgKE1scCAtIE1sKSAqIE1hdGguc2luKGRsb24pO1xuICAgICAgICAgIHAueSA9IHRoaXMueTAgLSAoTWxwIC0gTWwpICogTWF0aC5jb3MoZGxvbik7XG4gICAgICAgICAgcmV0dXJuIHA7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoTWF0aC5hYnModGhpcy5zaW5fcDEyICsgMSkgPD0gRVBTTE4pIHtcbiAgICAgICAgICAvL1NvdXRoIFBvbGUgY2FzZVxuICAgICAgICAgIE1scCA9IHRoaXMuYSAqIG1sZm4oZTAsIGUxLCBlMiwgZTMsIEhBTEZfUEkpO1xuICAgICAgICAgIE1sID0gdGhpcy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KTtcbiAgICAgICAgICB9XG4gICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBzID0gTWF0aC5hc2luKE1hdGguc2luKGRsb24pICogTWF0aC5jb3MocHNpKSAvIE1hdGguc2luKEF6KSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIEcgPSB0aGlzLmUgKiB0aGlzLnNpbl9wMTIgLyBNYXRoLnNxcnQoMSAtIHRoaXMuZXMpO1xuICAgICAgICAgIEggPSB0aGlzLmUgKiB0aGlzLmNvc19wMTIgKiBNYXRoLmNvcyhBeikgLyBNYXRoLnNxcnQoMSAtIHRoaXMuZXMpO1xuICAgICAgICAgIEdIID0gRyAqIEg7XG4gICAgICAgICAgSHMgPSBIICogSDtcbiAgICAgICAgICBzMiA9IHMgKiBzO1xuICAgICAgICAgIHMzID0gczIgKiBzO1xuICAgICAgICAgIHM0ID0gczMgKiBzO1xuICAgICAgICAgIHM1ID0gczQgKiBzO1xuICAgICAgICAgIGMgPSBObDEgKiBzICogKDEgLSBzMiAqIEhzICogKDEgLSBIcykgLyA2ICsgczMgLyA4ICogR0ggKiAoMSAtIDIgKiBIcykgKyBzNCAvIDEyMCAqIChIcyAqICg0IC0gNyAqIEhzKSAtIDMgKiBHICogRyAqICgxIC0gNyAqIEhzKSkgLSBzNSAvIDQ4ICogR0gpO1xuICAgICAgICAgIHAueCA9IHRoaXMueDAgKyBjICogTWF0aC5zaW4oQXopO1xuICAgICAgICAgIHAueSA9IHRoaXMueTAgKyBjICogTWF0aC5jb3MoQXopO1xuICAgICAgICAgIHJldHVybiBwO1xuICAgICAgICB9XG4gICAgICB9XG5cblxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGludmVyc2UkMjQocCkge1xuICAgICAgcC54IC09IHRoaXMueDA7XG4gICAgICBwLnkgLT0gdGhpcy55MDtcbiAgICAgIHZhciByaCwgeiwgc2lueiwgY29zeiwgbG9uLCBsYXQsIGNvbiwgZTAsIGUxLCBlMiwgZTMsIE1scCwgTSwgTjEsIHBzaSwgQXosIGNvc0F6LCB0bXAsIEEsIEIsIEQsIEVlLCBGLCBzaW5wc2k7XG4gICAgICBpZiAodGhpcy5zcGhlcmUpIHtcbiAgICAgICAgcmggPSBNYXRoLnNxcnQocC54ICogcC54ICsgcC55ICogcC55KTtcbiAgICAgICAgaWYgKHJoID4gKDIgKiBIQUxGX1BJICogdGhpcy5hKSkge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB6ID0gcmggLyB0aGlzLmE7XG5cbiAgICAgICAgc2lueiA9IE1hdGguc2luKHopO1xuICAgICAgICBjb3N6ID0gTWF0aC5jb3Moeik7XG5cbiAgICAgICAgbG9uID0gdGhpcy5sb25nMDtcbiAgICAgICAgaWYgKE1hdGguYWJzKHJoKSA8PSBFUFNMTikge1xuICAgICAgICAgIGxhdCA9IHRoaXMubGF0MDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICBsYXQgPSBhc2lueihjb3N6ICogdGhpcy5zaW5fcDEyICsgKHAueSAqIHNpbnogKiB0aGlzLmNvc19wMTIpIC8gcmgpO1xuICAgICAgICAgIGNvbiA9IE1hdGguYWJzKHRoaXMubGF0MCkgLSBIQUxGX1BJO1xuICAgICAgICAgIGlmIChNYXRoLmFicyhjb24pIDw9IEVQU0xOKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5sYXQwID49IDApIHtcbiAgICAgICAgICAgICAgbG9uID0gYWRqdXN0X2xvbih0aGlzLmxvbmcwICsgTWF0aC5hdGFuMihwLngsIC0gcC55KSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgbG9uID0gYWRqdXN0X2xvbih0aGlzLmxvbmcwIC0gTWF0aC5hdGFuMigtcC54LCBwLnkpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAvKmNvbiA9IGNvc3ogLSB0aGlzLnNpbl9wMTIgKiBNYXRoLnNpbihsYXQpO1xuICAgICAgICAgICAgaWYgKChNYXRoLmFicyhjb24pIDwgRVBTTE4pICYmIChNYXRoLmFicyhwLngpIDwgRVBTTE4pKSB7XG4gICAgICAgICAgICAgIC8vbm8tb3AsIGp1c3Qga2VlcCB0aGUgbG9uIHZhbHVlIGFzIGlzXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgdGVtcCA9IE1hdGguYXRhbjIoKHAueCAqIHNpbnogKiB0aGlzLmNvc19wMTIpLCAoY29uICogcmgpKTtcbiAgICAgICAgICAgICAgbG9uID0gYWRqdXN0X2xvbih0aGlzLmxvbmcwICsgTWF0aC5hdGFuMigocC54ICogc2lueiAqIHRoaXMuY29zX3AxMiksIChjb24gKiByaCkpKTtcbiAgICAgICAgICAgIH0qL1xuICAgICAgICAgICAgbG9uID0gYWRqdXN0X2xvbih0aGlzLmxvbmcwICsgTWF0aC5hdGFuMihwLnggKiBzaW56LCByaCAqIHRoaXMuY29zX3AxMiAqIGNvc3ogLSBwLnkgKiB0aGlzLnNpbl9wMTIgKiBzaW56KSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcC54ID0gbG9uO1xuICAgICAgICBwLnkgPSBsYXQ7XG4gICAgICAgIHJldHVybiBwO1xuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIGUwID0gZTBmbih0aGlzLmVzKTtcbiAgICAgICAgZTEgPSBlMWZuKHRoaXMuZXMpO1xuICAgICAgICBlMiA9IGUyZm4odGhpcy5lcyk7XG4gICAgICAgIGUzID0gZTNmbih0aGlzLmVzKTtcbiAgICAgICAgaWYgKE1hdGguYWJzKHRoaXMuc2luX3AxMiAtIDEpIDw9IEVQU0xOKSB7XG4gICAgICAgICAgLy9Ob3J0aCBwb2xlIGNhc2VcbiAgICAgICAgICBNbHAgPSB0aGlzLmEgKiBtbGZuKGUwLCBlMSwgZTIsIGUzLCBIQUxGX1BJKTtcbiAgICAgICAgICByaCA9IE1hdGguc3FydChwLnggKiBwLnggKyBwLnkgKiBwLnkpO1xuICAgICAgICAgIE0gPSBNbHAgLSByaDtcbiAgICAgICAgICBsYXQgPSBpbWxmbihNIC8gdGhpcy5hLCBlMCwgZTEsIGUyLCBlMyk7XG4gICAgICAgICAgbG9uID0gYWRqdXN0X2xvbih0aGlzLmxvbmcwICsgTWF0aC5hdGFuMihwLngsIC0gMSAqIHAueSkpO1xuICAgICAgICAgIHAueCA9IGxvbjtcbiAgICAgICAgICBwLnkgPSBsYXQ7XG4gICAgICAgICAgcmV0dXJuIHA7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoTWF0aC5hYnModGhpcy5zaW5fcDEyICsgMSkgPD0gRVBTTE4pIHtcbiAgICAgICAgICAvL1NvdXRoIHBvbGUgY2FzZVxuICAgICAgICAgIE1scCA9IHRoaXMuYSAqIG1sZm4oZTAsIGUxLCBlMiwgZTMsIEhBTEZfUEkpO1xuICAgICAgICAgIHJoID0gTWF0aC5zcXJ0KHAueCAqIHAueCArIHAueSAqIHAueSk7XG4gICAgICAgICAgTSA9IHJoIC0gTWxwO1xuXG4gICAgICAgICAgbGF0ID0gaW1sZm4oTSAvIHRoaXMuYSwgZTAsIGUxLCBlMiwgZTMpO1xuICAgICAgICAgIGxvbiA9IGFkanVzdF9sb24odGhpcy5sb25nMCArIE1hdGguYXRhbjIocC54LCBwLnkpKTtcbiAgICAgICAgICBwLnggPSBsb247XG4gICAgICAgICAgcC55ID0gbGF0O1xuICAgICAgICAgIHJldHVybiBwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIC8vZGVmYXVsdCBjYXNlXG4gICAgICAgICAgcmggPSBNYXRoLnNxcnQocC54ICogcC54ICsgcC55ICogcC55KTtcbiAgICAgICAgICBBeiA9IE1hdGguYXRhbjIocC54LCBwLnkpO1xuICAgICAgICAgIE4xID0gZ04odGhpcy5hLCB0aGlzLmUsIHRoaXMuc2luX3AxMik7XG4gICAgICAgICAgY29zQXogPSBNYXRoLmNvcyhBeik7XG4gICAgICAgICAgdG1wID0gdGhpcy5lICogdGhpcy5jb3NfcDEyICogY29zQXo7XG4gICAgICAgICAgQSA9IC10bXAgKiB0bXAgLyAoMSAtIHRoaXMuZXMpO1xuICAgICAgICAgIEIgPSAzICogdGhpcy5lcyAqICgxIC0gQSkgKiB0aGlzLnNpbl9wMTIgKiB0aGlzLmNvc19wMTIgKiBjb3NBeiAvICgxIC0gdGhpcy5lcyk7XG4gICAgICAgICAgRCA9IHJoIC8gTjE7XG4gICAgICAgICAgRWUgPSBEIC0gQSAqICgxICsgQSkgKiBNYXRoLnBvdyhELCAzKSAvIDYgLSBCICogKDEgKyAzICogQSkgKiBNYXRoLnBvdyhELCA0KSAvIDI0O1xuICAgICAgICAgIEYgPSAxIC0gQSAqIEVlICogRWUgLyAyIC0gRCAqIEVlICogRWUgKiBFZSAvIDY7XG4gICAgICAgICAgcHNpID0gTWF0aC5hc2luKHRoaXMuc2luX3AxMiAqIE1hdGguY29zKEVlKSArIHRoaXMuY29zX3AxMiAqIE1hdGguc2luKEVlKSAqIGNvc0F6KTtcbiAgICAgICAgICBsb24gPSBhZGp1c3RfbG9uKHRoaXMubG9uZzAgKyBNYXRoLmFzaW4oTWF0aC5zaW4oQXopICogTWF0aC5zaW4oRWUpIC8gTWF0aC5jb3MocHNpKSkpO1xuICAgICAgICAgIHNpbnBzaSA9IE1hdGguc2luKHBzaSk7XG4gICAgICAgICAgbGF0ID0gTWF0aC5hdGFuMigoc2lucHNpIC0gdGhpcy5lcyAqIEYgKiB0aGlzLnNpbl9wMTIpICogTWF0aC50YW4ocHNpKSwgc2lucHNpICogKDEgLSB0aGlzLmVzKSk7XG4gICAgICAgICAgcC54ID0gbG9uO1xuICAgICAgICAgIHAueSA9IGxhdDtcbiAgICAgICAgICByZXR1cm4gcDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgfVxuXG4gICAgdmFyIG5hbWVzJDI2ID0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VhdGlvbnNcbiAgICAgICAgICAtLS0tLS0tLS0tLS0tLS0tLSovXG4gICAgICBwLnggLT0gdGhpcy54MDtcbiAgICAgIHAueSAtPSB0aGlzLnkwO1xuICAgICAgcmggPSBNYXRoLnNxcnQocC54ICogcC54ICsgcC55ICogcC55KTtcbiAgICAgIHogPSBhc2lueihyaCAvIHRoaXMuYSk7XG5cbiAgICAgIHNpbnogPSBNYXRoLnNpbih6KTtcbiAgICAgIGNvc3ogPSBNYXRoLmNvcyh6KTtcblxuICAgICAgbG9uID0gdGhpcy5sb25nMDtcbiAgICAgIGlmIChNYXRoLmFicyhyaCkgPD0gRVBTTE4pIHtcbiAgICAgICAgbGF0ID0gdGhpcy5sYXQwO1xuICAgICAgICBwLnggPSBsb247XG4gICAgICAgIHAueSA9IGxhdDtcbiAgICAgICAgcmV0dXJuIHA7XG4gICAgICB9XG4gICAgICBsYXQgPSBhc2lueihjb3N6ICogdGhpcy5zaW5fcDE0ICsgKHAueSAqIHNpbnogKiB0aGlzLmNvc19wMTQpIC8gcmgpO1xuICAgICAgY29uID0gTWF0aC5hYnModGhpcy5sYXQwKSAtIEhBTEZfUEk7XG4gICAgICBpZiAoTWF0aC5hYnMoY29uKSA8PSBFUFNMTikge1xuICAgICAgICBpZiAodGhpcy5sYXQwID49IDApIHtcbiAgICAgICAgICBsb24gPSBhZGp1c3RfbG9uKHRoaXMubG9uZzAgKyBNYXRoLmF0YW4yKHAueCwgLSBwLnkpKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICBsb24gPSBhZGp1c3RfbG9uKHRoaXMubG9uZzAgLSBNYXRoLmF0YW4yKC1wLngsIHAueSkpO1xuICAgICAgICB9XG4gICAgICAgIHAueCA9IGxvbjtcbiAgICAgICAgcC55ID0gbGF0O1xuICAgICAgICByZXR1cm4gcDtcbiAgICAgIH1cbiAgICAgIGxvbiA9IGFkanVzdF9sb24odGhpcy5sb25nMCArIE1hdGguYXRhbjIoKHAueCAqIHN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hLnZhbHVlID09PSBBUkVBX0VOVU0uQVJFQV8xKSB7XG4gICAgICAgICAgdCA9IHI7XG4gICAgICAgICAgciA9IC1zO1xuICAgICAgICAgIHMgPSB0O1xuICAgICAgICB9IGVsc2UgaWYgKGFyZWEudmFsdWUgPT09IEFSRUFfRU5VTS5BUkVBXzIpIHtcbiAgICAgICAgICByID0gLXI7XG4gICAgICAgICAgcyA9IC1zO1xuICAgICAgICB9IGVsc2UgaWYgKGFyZWEudmFsdWUgPT09IEFSRUFfRU5VTS5BUkVBXzMpIHtcbiAgICAgICAgICB0ID0gcjtcbiAgICAgICAgICByID0gcztcbiAgICAgICAgICBzID0gLXQ7XG4gICAgICAgIH1cbiAgICAgICAgLyogUm90YXRlIHEscixzIGludG8gdGhlIGNvcnJlY3QgY3ViZSBmYWNlLiAqL1xuICAgICAgICBpZiAodGhpcy5mYWNlID09PSBGQUNFX0VOVU0uUklHSFQpIHtcbiAgICAgICAgICB0ID0gcTtcbiAgICAgICAgICBxID0gLXI7XG4gICAgICAgICAgciA9IHQ7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5mYWNlID09PSBGQUNFX0VOVU0uQkFDSykge1xuICAgICAgICAgIHEgPSAtcTtcbiAgICAgICAgICByID0gLXI7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5mYWNlID09PSBGQUNFX0VOVU0uTEVGVCkge1xuICAgICAgICAgIHQgPSBxO1xuICAgICAgICAgIHEgPSByO1xuICAgICAgICAgIHIgPSAtdDtcbiAgICAgICAgfVxuICAgICAgICAvKiBOb3cgY29tcHV0ZSBwaGkgYW5kIGxhbSBmcm9tIHRoZSB1bml0IHNwaGVyZSBjb29yZGluYXRlcy4gKi9cbiAgICAgICAgbHAucGhpID0gTWF0aC5hY29zKC1zKSAtIEhBTEZfUEk7XG4gICAgICAgIGxwLmxhbSA9IE1hdGguYXRhbjIociwgcSk7XG4gICAgICAgIGlmICh0aGlzLmZhY2UgPT09IEZBQ0VfRU5VTS5SSUdI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ICAgICAgICByZXR1cm4gY29lZnNbMF0gKyB4ICogKGNvZWZzWzFdICsgeCAqIChjb2Vmc1syXSArIHggKiBjb2Vmc1szXSkpO1xuICAgIH07XG5cbiAgICB2YXIgcG9seTNfZGVyID0gZnVuY3Rpb24oY29lZnMsIHgpIHtcbiAgICAgICAgcmV0dXJuIGNvZWZzWzFdICsgeCAqICgyICogY29lZnNbMl0gKyB4ICogMyAqIGNvZWZzWzNdKTtcbiAgICB9O1xuXG4gICAgZnVuY3Rpb24gbmV3dG9uX3JhcHNob24oZl9kZiwgc3RhcnQsIG1heF9lcnIsIGl0ZXJzKSB7XG4gICAgICAgIHZhciB4ID0gc3RhcnQ7XG4gICAgICAgIGZvciAoOyBpdGVyczsgLS1pdGVycykge1xuICAgICAgICAgICAgdmFyIHVwZCA9IGZfZGYoeCk7XG4gICAgICAgICAgICB4IC09IHVwZDtcbiAgICAgICAgICAgIGlmIChNYXRoLmFicyh1cGQpIDwgbWF4X2Vycikge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB4O1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGluaXQkMjgoKSB7XG4gICAgICAgIHRoaXMueDAgPSB0aGlzLngwIHx8IDA7XG4gICAgICAgIHRoaXMueTAgPSB0aGlzLnkwIHx8IDA7XG4gICAgICAgIHRoaXMubG9uZzAgPSB0aGlzLmxvbmcwIHx8IDA7XG4gICAgICAgIHRoaXMuZXMgPSAwO1xuICAgICAgICB0aGlzLnRpdGxlID0gdGhpcy50aXRsZSB8fCBcIlJvYmluc29uXCI7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZm9yd2FyZCQyNyhsbCkge1xuICAgICAgICB2YXIgbG9uID0gYWRqdXN0X2xvbihsbC54IC0gdGhpcy5sb25nMCk7XG5cbiAgICAgICAgdmFyIGRwaGkgPSBNYXRoLmFicyhsbC55KTtcbiAgICAgICAgdmFyIGkgPSBNYXRoLmZsb29yKGRwaGkgKiBDMSk7XG4gICAgICAgIGlmIChpIDwgMCkge1xuICAgICAgICAgICAgaSA9IDA7XG4gICAgICAgIH0gZWxzZSBpZiAoaSA+PSBOT0RFUykge1xuICAgICAgICAgICAgaSA9IE5PREVTIC0gMTtcbiAgICAgICAgfVxuICAgICAgICBkcGhpID0gUjJEICogKGRwaGkgLSBSQzEgKiBpKTtcbiAgICAgICAgdmFyIHh5ID0ge1xuICAgICAgICAgICAgeDogcG9seTNfdmFsKENPRUZTX1hbaV0sIGRwaGkpICogbG9uLFxuICAgICAgICAgICAgeTogcG9seTNfdmFsKENPRUZTX1lbaV0sIGRwaGkpXG4gICAgICAgIH07XG4gICAgICAgIGlmIChsbC55IDwgMCkge1xuICAgICAgICAgICAgeHkueSA9IC14eS55O1xuICAgICAgICB9XG5cbiAgICAgICAgeHkueCA9IHh5LnggKiB0aGlzLmEgKiBGWEMgKyB0aGlzLngwO1xuICAgICAgICB4eS55ID0geHkueSAqIHRoaXMuYSAqIEZZQyArIHRoaXMueTA7XG4gICAgICAgIHJldHVybiB4eTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpbnZlcnNlJDI3KHh5KSB7XG4gICAgICAgIHZhciBsbCA9IHtcbiAgICAgICAgICAgIHg6ICh4eS54IC0gdGhpcy54MCkgLyAodGhpcy5hICogRlhDKSxcbiAgICAgICAgICAgIHk6IE1hdGguYWJzKHh5LnkgLSB0aGlzLnkwKSAvICh0aGlzLmEgKiBGWUMpXG4gICAgICAgIH07XG5cbiAgICAgICAgaWYgKGxsLnkgPj0gMSkgeyAvLyBwYXRob2xvZ2ljIGNhc2VcbiAgICAgICAgICAgIGxsLnggLz0gQ09FRlNfWFtOT0RFU11bMF07XG4gICAgICAgICAgICBsbC55ID0geHkueSA8IDAgPyAtSEFMRl9QSSA6IEhBTEZfUEk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvLyBmaW5kIHRhYmxlIGludGVydmFsXG4gICAgICAgICAgICB2YXIgaSA9IE1hdGguZmxvb3IobGwueSAqIE5PREVTKTtcbiAgICAgICAgICAgIGlmIChpIDwgMCkge1xuICAgICAgICAgICAgICAgIGkgPSAwO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpID49IE5PREVTKSB7XG4gICAgICAgICAgICAgICAgaSA9IE5PREVTIC0gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAoOzspIHtcbiAgICAgICAgICAgICAgICBpZiAoQ09FRlNfWVtpXVswXSA+IGxsLnkpIHtcbiAgICAgICAgICAgICAgICAgICAgLS1pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoQ09FRlNfWVtpKzFdWzBdIDw9IGxsLnkpIHtcbiAgICAgICAgICAgICAgICAgICAgKytpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIGxpbmVhciBpbnRlcnBvbGF0aW9uIGluIDUgZGVncmVlIGludGVydmFsXG4gICAgICAgICAgICB2YXIgY29lZnMgPSBDT0VGU19ZW2ldO1xuICAgICAgICAgICAgdmFyIHQgPSA1ICogKGxsLnkgLSBjb2Vmc1swXSkgLyAoQ09FRlNfWVtpKzFdWzBdIC0gY29lZnNbMF0pO1xuICAgICAgICAgICAgLy8gZmluZCB0IHNvIHRoYXQgcG9seTNfdmFsKGNvZWZzLCB0KSA9IGxsLnlcbiAgICAgICAgICAgIHQgPSBuZXd0b25fcmFwc2hvbihmdW5jdGlvbih4KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChwb2x5M192YWwoY29lZnMsIHgpIC0gbGwueSkgLyBwb2x5M19kZXIoY29lZnMsIHgpO1xuICAgICAgICAgICAgfSwgdCwgRVBTTE4sIDEwMCk7XG5cbiAgICAgICAgICAgIGxsLnggLz0gcG9seTNfdmFsKENPRUZTX1hbaV0sIHQpO1xuICAgICAgICAgICAgbGwueSA9ICg1ICogaSArIHQpICogRDJSO1xuICAgICAgICAgICAgaWYgKHh5LnkgPCAwKSB7XG4gICAgICAgICAgICAgICAgbGwueSA9IC1sbC55O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgbGwueCA9IGFkanVzdF9sb24obGwueCArIHRoaXMubG9uZzApO1xuICAgICAgICByZXR1cm4gbGw7XG4gICAgfVxuXG4gICAgdmFyIG5hbWVzJDI5ID0gW1wiUm9iaW5zb25cIiwgXCJyb2JpblwiXTtcbiAgICB2YXIgcm9iaW4gPSB7XG4gICAgICBpbml0OiBpbml0JDI4LFxuICAgICAgZm9yd2FyZDogZm9yd2FyZCQyNyxcbiAgICAgIGludmVyc2U6IGludmVyc2UkMjcsXG4gICAgICBuYW1lczogbmFtZXMkMjlcbiAgICB9O1xuXG4gICAgZnVuY3Rpb24gaW5pdCQyOSgpIHtcbiAgICAgICAgdGhpcy5uYW1lID0gJ2dlb2NlbnQnO1xuXG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZm9yd2FyZCQyOChwKSB7XG4gICAgICAgIHZhciBwb2ludCA9IGdlb2RldGljVG9HZW9jZW50cmljKHAsIHRoaXMuZXMsIHRoaXMuYSk7XG4gICAgICAgIHJldHVybiBwb2ludDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpbnZlcnNlJDI4KHApIHtcbiAgICAgICAgdmFyIHBvaW50ID0gZ2VvY2VudHJpY1RvR2VvZGV0aWMocCwgdGhpcy5lcywgdGhpcy5hLCB0aGlzLmIpO1xuICAgICAgICByZXR1cm4gcG9pbnQ7XG4gICAgfVxuXG4gICAgdmFyIG5hbWVzJDMwID0gW1wiR2VvY2VudHJpY1wiLCAnZ2VvY2VudHJpYycsIFwiZ2VvY2VudFwiLCBcIkdlb2NlbnRcIl07XG4gICAgdmFyIGdlb2NlbnQgPSB7XG4gICAgICAgIGluaXQ6IGluaXQkMjksXG4gICAgICAgIGZvcndhcmQ6IG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gICByZXR1cm4gcDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpbnZlcnNlJDI5KHApIHtcbiAgICAgIHAueCAvPSB0aGlzLmE7XG4gICAgICBwLnkgLz0gdGhpcy5hO1xuICAgICAgdmFyIHIgPSB7IHg6IHAueCwgeTogcC55IH07XG5cbiAgICAgIC8vIFVuLVRpbHRcbiAgICAgIHZhciBibSwgYnEsIHl0O1xuICAgICAgeXQgPSAxIC8gKHRoaXMucG4xIC0gcC55ICogdGhpcy5zdyk7XG4gICAgICBibSA9IHRoaXMucG4xICogcC54ICogeXQ7XG4gICAgICBicSA9IHRoaXMucG4xICogcC55ICogdGhpcy5jdyAqIHl0O1xuICAgICAgcC54ID0gYm0gKiB0aGlzLmNnICsgYnEgKiB0aGlzLnNnO1xuICAgICAgcC55ID0gYnEgKiB0aGlzLmNnIC0gYm0gKiB0aGlzLnNnO1xuXG4gICAgICB2YXIgcmggPSBoeXBvdChwLngsIHAueSk7XG4gICAgICBpZiAoTWF0aC5hYnMocmgpIDwgRVBTTE4pIHtcbiAgICAgICAgci54ID0gMDtcbiAgICAgICAgci55ID0gcC55O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIGNvc3osIHNpbno7XG4gICAgICAgIHNpbnogPSAxIC0gcmggKiByaCAqIHRoaXMucGZhY3Q7XG4gICAgICAgIHNpbnogPSAodGhpcy5wIC0gTWF0aC5zcXJ0KHNpbnopKSAvICh0aGlzLnBuMSAvIHJoICsgcmggLyB0aGlzLnBuMSk7XG4gICAgICAgIGNvc3ogPSBNYXRoLnNxcnQoMSAtIHNpbnogKiBzaW56KTtcbiAgICAgICAgc3dpdGNoICh0aGlzLm1vZGUpIHtcbiAgICAgICAgICBjYXNlIG1vZGUuT0JMSVE6XG4gICAgICAgICAgICByLnkgPSBNYXRoLmFzaW4oY29zeiAqIHRoaXMuc2lucGgwICsgcC55ICogc2lueiAqIHRoaXMuY29zcGgwIC8gcmgpO1xuICAgICAgICAgICAgcC55ID0gKGNvc3ogLSB0aGlzLnNpbnBoMCAqIE1hdGguc2luKHIueSkpICogcmg7XG4gICAgICAgICAgICBwLnggKj0gc2lueiAqIHRoaXMuY29zcGgwO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSBtb2RlLkVRVUlUOlxuICAgICAgICAgICAgci55ID0gTWF0aC5hc2luKHAueSAqIHNpbnogLyByaCk7XG4gICAgICAgICAgICBwLnkgPSBjb3N6ICogcmg7XG4gICAgICAgICAgICBwLnggKj0gc2luejtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgbW9kZS5OX1BPTEU6XG4gICAgICAgICAgICByLnkgPSBNYXRoLmFzaW4oY29zeik7XG4gICAgICAgICAgICBwLnkgPSAtcC55O1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSBtb2RlLlNfUE9MRTpcbiAgICAgICAgICAgIHIueSA9IC1NYXRoLmFzaW4oY29zeik7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICByLnggPSBNYXRoLmF0YW4yKHAueCwgcC55KTtcbiAgICAgIH1cblxuICAgICAgcC54ID0gci54ICsgdGhpcy5sb25nMDtcbiAgICAgIHAueSA9IHIueTtcbiAgICAgIHJldHVybiBwO1xuICAgIH1cblxuICAgIHZhciBuYW1lcyQzMSA9IFtcIlRpbHRlZF9QZXJzcGVjdGl2ZVwiLCBcInRwZXJzXCJdO1xuICAgIHZhciB0cGVycyA9IHtcbiAgICAgIGluaXQ6IGluaXQkMzAsXG4gICAgICBmb3J3YXJkOiBmb3J3YXJkJDI5LFxuICAgICAgaW52ZXJzZTogaW52ZXJzZSQyOSxcbiAgICAgIG5hbWVzOiBuYW1lcyQzMVxuICAgIH07XG5cbiAgICB2YXIgaW5jbHVkZWRQcm9qZWN0aW9ucyA9IGZ1bmN0aW9uKHByb2o0KXtcbiAgICAgIHByb2o0LlByb2oucHJvamVjdGlvbnMuYWRkKHRtZXJjKTtc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o0LlByb2oucHJvamVjdGlvbnMuYWRkKHZhbmRnKTtcbiAgICAgIHByb2o0LlByb2oucHJvamVjdGlvbnMuYWRkKGFlcWQpO1xuICAgICAgcHJvajQuUHJvai5wcm9qZWN0aW9ucy5hZGQob3J0aG8pO1xuICAgICAgcHJvajQuUHJvai5wcm9qZWN0aW9ucy5hZGQocXNjKTtcbiAgICAgIHByb2o0LlByb2oucHJvamVjdGlvbnMuYWRkKHJvYmluKTtcbiAgICAgIHByb2o0LlByb2oucHJvamVjdGlvbnMuYWRkKGdlb2NlbnQpO1xuICAgICAgcHJvajQuUHJvai5wcm9qZWN0aW9ucy5hZGQodHBlcnMpO1xuICAgIH07XG5cbiAgICBwcm9qNCQxLmRlZmF1bHREYXR1bSA9ICdXR1M4NCc7IC8vZGVmYXVsdCBkYXR1bVxuICAgIHByb2o0JDEuUHJvaiA9IFByb2plY3Rpb247XG4gICAgcHJvajQkMS5XR1M4NCA9IG5ldyBwcm9qNCQxLlByb2ooJ1dHUzg0Jyk7XG4gICAgcHJvajQkMS5Qb2ludCA9IFBvaW50O1xuICAgIHByb2o0JDEudG9Qb2ludCA9IHRvUG9pbnQ7XG4gICAgcHJvajQkMS5kZWZzID0gZGVmcztcbiAgICBwcm9qNCQxLm5hZGdyaWQgPSBuYWRncmlkO1xuICAgIHByb2o0JDEudHJhbnNmb3JtID0gdHJhbnNmb3JtO1xuICAgIHByb2o0JDEubWdycyA9IG1ncnM7XG4gICAgcHJvajQkMS52ZXJzaW9uID0gJzIuNy41JztcbiAgICBpbmNsdWRlZFByb2plY3Rpb25zKHByb2o0JDEpO1xuXG4gICAgcmV0dXJuIHByb2o0JDE7XG5cbn0pKSk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/proj4/dist/proj4-src.js\n"); + +/***/ }), + +/***/ "./node_modules/proj4/dist/proj4-src.js-exposed": +/*!******************************************************!*\ + !*** ./node_modules/proj4/dist/proj4-src.js-exposed ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"proj4\"] = __webpack_require__(/*! -!./proj4-src.js */ \"./node_modules/proj4/dist/proj4-src.js\");\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9wcm9qNC9kaXN0L3Byb2o0LXNyYy5qcy1leHBvc2VkPzkzMzQiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsaUZBQW1DLG1CQUFPLENBQUMsZ0VBQWtCLEUiLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvcHJvajQvZGlzdC9wcm9qNC1zcmMuanMtZXhwb3NlZC5qcyIsInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZ2xvYmFsW1wicHJvajRcIl0gPSByZXF1aXJlKFwiLSEuL3Byb2o0LXNyYy5qc1wiKTsiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/proj4/dist/proj4-src.js-exposed\n"); + +/***/ }), + +/***/ "./node_modules/proj4leaflet/src/proj4leaflet.js": +/*!*******************************************************!*\ + !*** ./node_modules/proj4leaflet/src/proj4leaflet.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (factory) {\r\n\tvar L, proj4;\r\n\tif (true) {\r\n\t\t// AMD\r\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! leaflet */ \"leaflet\"), __webpack_require__(/*! proj4 */ \"./node_modules/proj4/dist/proj4-src.js-exposed\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\t} else {}\r\n}(function (L, proj4) {\r\n\tif (proj4.__esModule && proj4.default) {\r\n\t\t// If proj4 was bundled as an ES6 module, unwrap it to get\r\n\t\t// to the actual main proj4 object.\r\n\t\t// See discussion in https://github.com/kartena/Proj4Leaflet/pull/147\r\n\t\tproj4 = proj4.default;\r\n\t}\r\n \r\n\tL.Proj = {};\r\n\r\n\tL.Proj._isProj4Obj = function(a) {\r\n\t\treturn (typeof a.inverse !== 'undefined' &&\r\n\t\t\ttypeof a.forward !== 'undefined');\r\n\t};\r\n\r\n\tL.Proj.Projection = L.Class.extend({\r\n\t\tinitialize: function(code, def, bounds) {\r\n\t\t\tvar isP4 = L.Proj._isProj4Obj(code);\r\n\t\t\tthis._proj = isP4 ? code : this._projFromCodeDef(code, def);\r\n\t\t\tthis.bounds = isP4 ? def : bounds;\r\n\t\t},\r\n\r\n\t\tproject: function (latlng) {\r\n\t\t\tvar point = this._proj.forward([latlng.lng, latlng.lat]);\r\n\t\t\treturn new L.Point(point[0], point[1]);\r\n\t\t},\r\n\r\n\t\tunproject: function (point, unbounded) {\r\n\t\t\tvar point2 = this._proj.inverse([point.x, point.y]);\r\n\t\t\treturn new L.LatLng(point2[1], point2[0], unbounded);\r\n\t\t},\r\n\r\n\t\t_projFromCodeDef: function(code, def) {\r\n\t\t\tif (def) {\r\n\t\t\t\tproj4.defs(code, def);\r\n\t\t\t} else if (proj4.defs[code] === undefined) {\r\n\t\t\t\tvar urn = code.split(':');\r\n\t\t\t\tif (urn.length > 3) {\r\n\t\t\t\t\tcode = urn[urn.length - 3] + ':' + urn[urn.length - 1];\r\n\t\t\t\t}\r\n\t\t\t\tif (proj4.defs[code] === undefined) {\r\n\t\t\t\t\tthrow 'No projection definition for code ' + code;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn proj4(code);\r\n\t\t}\r\n\t});\r\n\r\n\tL.Proj.CRS = L.Class.extend({\r\n\t\tincludes: L.CRS,\r\n\r\n\t\toptions: {\r\n\t\t\ttransformation: new L.Transformation(1, 0, -1, 0)\r\n\t\t},\r\n\r\n\t\tinitialize: function(a, b, c) {\r\n\t\t\tvar code,\r\n\t\t\t proj,\r\n\t\t\t def,\r\n\t\t\t options;\r\n\r\n\t\t\tif (L.Proj._isProj4Obj(a)) {\r\n\t\t\t\tproj = a;\r\n\t\t\t\tcode = proj.srsCode;\r\n\t\t\t\toptions = b || {};\r\n\r\n\t\t\t\tthis.projection = new L.Proj.Projection(proj, options.bounds);\r\n\t\t\t} else {\r\n\t\t\t\tcode = a;\r\n\t\t\t\tdef = b;\r\n\t\t\t\toptions = c || {};\r\n\t\t\t\tthis.projection = new L.Proj.Projection(code, def, options.bounds);\r\n\t\t\t}\r\n\r\n\t\t\tL.Util.setOptions(this, options);\r\n\t\t\tthis.code = code;\r\n\t\t\tthis.transformation = this.options.transformation;\r\n\r\n\t\t\tif (this.options.origin) {\r\n\t\t\t\tthis.transformation =\r\n\t\t\t\t\tnew L.Transformation(1, -this.options.origin[0],\r\n\t\t\t\t\t\t-1, this.options.origin[1]);\r\n\t\t\t}\r\n\r\n\t\t\tif (this.options.scales) {\r\n\t\t\t\tthis._scales = this.options.scales;\r\n\t\t\t} else if (this.options.resolutions) {\r\n\t\t\t\tthis._scales = [];\r\n\t\t\t\tfor (var i = this.options.resolutions.length - 1; i >= 0; i--) {\r\n\t\t\t\t\tif (this.options.resolutions[i]) {\r\n\t\t\t\t\t\tthis._scales[i] = 1 / this.options.resolutions[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.infinite = !this.options.bounds;\r\n\r\n\t\t},\r\n\r\n\t\tscale: function(zoom) {\r\n\t\t\tvar iZoom = Math.floor(zoom),\r\n\t\t\t\tbaseScale,\r\n\t\t\t\tnextScale,\r\n\t\t\t\tscaleDiff,\r\n\t\t\t\tzDiff;\r\n\t\t\tif (zoom === iZoom) {\r\n\t\t\t\treturn this._scales[zoom];\r\n\t\t\t} else {\r\n\t\t\t\t// Non-integer zoom, interpolate\r\n\t\t\t\tbaseScale = this._scales[iZoom];\r\n\t\t\t\tnextScale = this._scales[iZoom + 1];\r\n\t\t\t\tscaleDiff = nextScale - baseScale;\r\n\t\t\t\tzDiff = (zoom - iZoom);\r\n\t\t\t\treturn baseScale + scaleDiff * zDiff;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tzoom: function(scale) {\r\n\t\t\t// Find closest number in this._scales, down\r\n\t\t\tvar downScale = this._closestElement(this._scales, scale),\r\n\t\t\t\tdownZoom = this._scales.indexOf(downScale),\r\n\t\t\t\tnextScale,\r\n\t\t\t\tnextZoom,\r\n\t\t\t\tscaleDiff;\r\n\t\t\t// Check if scale is downScale => return array index\r\n\t\t\tif (scale === downScale) {\r\n\t\t\t\treturn downZoom;\r\n\t\t\t}\r\n\t\t\tif (downScale === undefined) {\r\n\t\t\t\treturn -Infinity;\r\n\t\t\t}\r\n\t\t\t// Interpolate\r\n\t\t\tnextZoom = downZoom + 1;\r\n\t\t\tnextScale = this._scales[nextZoom];\r\n\t\t\tif (nextScale === undefined) {\r\n\t\t\t\treturn Infinity;\r\n\t\t\t}\r\n\t\t\tscaleDiff = nextScale - downScale;\r\n\t\t\treturn (scale - downScale) / scaleDiff + downZoom;\r\n\t\t},\r\n\r\n\t\tdistance: L.CRS.Earth.distance,\r\n\r\n\t\tR: L.CRS.Earth.R,\r\n\r\n\t\t/* Get the closest lowest element in an array */\r\n\t\t_closestElement: function(array, element) {\r\n\t\t\tvar low;\r\n\t\t\tfor (var i = array.length; i--;) {\r\n\t\t\t\tif (array[i] <= element && (low === undefined || low < array[i])) {\r\n\t\t\t\t\tlow = array[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn low;\r\n\t\t}\r\n\t});\r\n\r\n\tL.Proj.GeoJSON = L.GeoJSON.extend({\r\n\t\tinitialize: function(geojson, options) {\r\n\t\t\tthis._callLevel = 0;\r\n\t\t\tL.GeoJSON.prototype.initialize.call(this, geojson, options);\r\n\t\t},\r\n\r\n\t\taddData: function(geojson) {\r\n\t\t\tvar crs;\r\n\r\n\t\t\tif (geojson) {\r\n\t\t\t\tif (geojson.crs && geojson.crs.type === 'name') {\r\n\t\t\t\t\tcrs = new L.Proj.CRS(geojson.crs.properties.name);\r\n\t\t\t\t} else if (geojson.crs && geojson.crs.type) {\r\n\t\t\t\t\tcrs = new L.Proj.CRS(geojson.crs.type + ':' + geojson.crs.properties.code);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (crs !== undefined) {\r\n\t\t\t\t\tthis.options.coordsToLatLng = function(coords) {\r\n\t\t\t\t\t\tvar point = L.point(coords[0], coords[1]);\r\n\t\t\t\t\t\treturn crs.projection.unproject(point);\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Base class' addData might call us recursively, but\r\n\t\t\t// CRS shouldn't be cleared in that case, since CRS applies\r\n\t\t\t// to the whole GeoJSON, inluding sub-features.\r\n\t\t\tthis._callLevel++;\r\n\t\t\ttry {\r\n\t\t\t\tL.GeoJSON.prototype.addData.call(this, geojson);\r\n\t\t\t} finally {\r\n\t\t\t\tthis._callLevel--;\r\n\t\t\t\tif (this._callLevel === 0) {\r\n\t\t\t\t\tdelete this.options.coordsToLatLng;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tL.Proj.geoJson = function(geojson, options) {\r\n\t\treturn new L.Proj.GeoJSON(geojson, options);\r\n\t};\r\n\r\n\tL.Proj.ImageOverlay = L.ImageOverlay.extend({\r\n\t\tinitialize: function (url, bounds, options) {\r\n\t\t\tL.ImageOverlay.prototype.initialize.call(this, url, null, options);\r\n\t\t\tthis._projectedBounds = bounds;\r\n\t\t},\r\n\r\n\t\t// Danger ahead: Overriding internal methods in Leaflet.\r\n\t\t// Decided to do this rather than making a copy of L.ImageOverlay\r\n\t\t// and doing very tiny modifications to it.\r\n\t\t// Future will tell if this was wise or not.\r\n\t\t_animateZoom: function (event) {\r\n\t\t\tvar scale = this._map.getZoomScale(event.zoom);\r\n\t\t\tvar northWest = L.point(this._projectedBounds.min.x, this._projectedBounds.max.y);\r\n\t\t\tvar offset = this._projectedToNewLayerPoint(northWest, event.zoom, event.center);\r\n\r\n\t\t\tL.DomUtil.setTransform(this._image, offset, scale);\r\n\t\t},\r\n\r\n\t\t_reset: function () {\r\n\t\t\tvar zoom = this._map.getZoom();\r\n\t\t\tvar pixelOrigin = this._map.getPixelOrigin();\r\n\t\t\tvar bounds = L.bounds(\r\n\t\t\t\tthis._transform(this._projectedBounds.min, zoom)._subtract(pixelOrigin),\r\n\t\t\t\tthis._transform(this._projectedBounds.max, zoom)._subtract(pixelOrigin)\r\n\t\t\t);\r\n\t\t\tvar size = bounds.getSize();\r\n\r\n\t\t\tL.DomUtil.setPosition(this._image, bounds.min);\r\n\t\t\tthis._image.style.width = size.x + 'px';\r\n\t\t\tthis._image.style.height = size.y + 'px';\r\n\t\t},\r\n\r\n\t\t_projectedToNewLayerPoint: function (point, zoom, center) {\r\n\t\t\tvar viewHalf = this._map.getSize()._divideBy(2);\r\n\t\t\tvar newTopLeft = this._map.project(center, zoom)._subtract(viewHalf)._round();\r\n\t\t\tvar topLeft = newTopLeft.add(this._map._getMapPanePos());\r\n\r\n\t\t\treturn this._transform(point, zoom)._subtract(topLeft);\r\n\t\t},\r\n\r\n\t\t_transform: function (point, zoom) {\r\n\t\t\tvar crs = this._map.options.crs;\r\n\t\t\tvar transformation = crs.transformation;\r\n\t\t\tvar scale = crs.scale(zoom);\r\n\r\n\t\t\treturn transformation.transform(point, scale);\r\n\t\t}\r\n\t});\r\n\r\n\tL.Proj.imageOverlay = function (url, bounds, options) {\r\n\t\treturn new L.Proj.ImageOverlay(url, bounds, options);\r\n\t};\r\n\r\n\treturn L.Proj;\r\n}));\r\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9wcm9qNGxlYWZsZXQvc3JjL3Byb2o0bGVhZmxldC5qcz85YjQwIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQSxLQUFLLElBQTBDO0FBQy9DO0FBQ0EsRUFBRSxpQ0FBTyxDQUFDLDZDQUFTLEVBQUUsa0ZBQU8sQ0FBQyxvQ0FBRSxPQUFPO0FBQUE7QUFBQTtBQUFBLG9HQUFDO0FBQ3ZDLEVBQUUsTUFBTSxFQVVOO0FBQ0YsQ0FBQztBQUNEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRzs7QUFFSDtBQUNBO0FBQ0E7QUFDQSxHQUFHOztBQUVIO0FBQ0E7QUFDQTtBQUNBLEdBQUc7O0FBRUg7QUFDQTtBQUNBO0FBQ0EsSUFBSTtBQUNKO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLEVBQUU7O0FBRUY7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsR0FBRzs7QUFFSDtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO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xuXHRcdFx0dmFyIGNycyA9IHRoaXMuX21hcC5vcHRpb25zLmNycztcclxuXHRcdFx0dmFyIHRyYW5zZm9ybWF0aW9uID0gY3JzLnRyYW5zZm9ybWF0aW9uO1xyXG5cdFx0XHR2YXIgc2NhbGUgPSBjcnMuc2NhbGUoem9vbSk7XHJcblxyXG5cdFx0XHRyZXR1cm4gdHJhbnNmb3JtYXRpb24udHJhbnNmb3JtKHBvaW50LCBzY2FsZSk7XHJcblx0XHR9XHJcblx0fSk7XHJcblxyXG5cdEwuUHJvai5pbWFnZU92ZXJsYXkgPSBmdW5jdGlvbiAodXJsLCBib3VuZHMsIG9wdGlvbnMpIHtcclxuXHRcdHJldHVybiBuZXcgTC5Qcm9qLkltYWdlT3ZlcmxheSh1cmwsIGJvdW5kcywgb3B0aW9ucyk7XHJcblx0fTtcclxuXHJcblx0cmV0dXJuIEwuUHJvajtcclxufSkpO1xyXG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/proj4leaflet/src/proj4leaflet.js\n"); + +/***/ }), + +/***/ "./node_modules/sortablejs/modular/sortable.esm.js": +/*!*********************************************************!*\ + !*** ./node_modules/sortablejs/modular/sortable.esm.js ***! + \*********************************************************/ +/*! exports provided: default, MultiDrag, Sortable, Swap */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MultiDrag\", function() { return MultiDragPlugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Sortable\", function() { return Sortable; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Swap\", function() { return SwapPlugin; });\n/**!\n * Sortable 1.14.0\n * @author\tRubaXa \n * @author\towenm \n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.14.0\";\n\nfunction userAgent(pattern) {\n if (typeof window !== 'undefined' && window.navigator) {\n return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n }\n}\n\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n capture: false,\n passive: false\n};\n\nfunction on(el, event, fn) {\n el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction off(el, event, fn) {\n el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction matches(\n/**HTMLElement*/\nel,\n/**String*/\nselector) {\n if (!selector) return;\n selector[0] === '>' && (selector = selector.substring(1));\n\n if (el) {\n try {\n if (el.matches) {\n return el.matches(selector);\n } else if (el.msMatchesSelector) {\n return el.msMatchesSelector(selector);\n } else if (el.webkitMatchesSelector) {\n return el.webkitMatchesSelector(selector);\n }\n } catch (_) {\n return false;\n }\n }\n\n return false;\n}\n\nfunction getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\n\nfunction closest(\n/**HTMLElement*/\nel,\n/**String*/\nselector,\n/**HTMLElement*/\nctx, includeCTX) {\n if (el) {\n ctx = ctx || document;\n\n do {\n if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n return el;\n }\n\n if (el === ctx) break;\n /* jshint boss:true */\n } while (el = getParentOrHost(el));\n }\n\n return null;\n}\n\nvar R_SPACE = /\\s+/g;\n\nfunction toggleClass(el, name, state) {\n if (el && name) {\n if (el.classList) {\n el.classList[state ? 'add' : 'remove'](name);\n } else {\n var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n }\n }\n}\n\nfunction css(el, prop, val) {\n var style = el && el.style;\n\n if (style) {\n if (val === void 0) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n val = document.defaultView.getComputedStyle(el, '');\n } else if (el.currentStyle) {\n val = el.currentStyle;\n }\n\n return prop === void 0 ? val : val[prop];\n } else {\n if (!(prop in style) && prop.indexOf('webkit') === -1) {\n prop = '-webkit-' + prop;\n }\n\n style[prop] = val + (typeof val === 'string' ? '' : 'px');\n }\n }\n}\n\nfunction matrix(el, selfOnly) {\n var appliedTransforms = '';\n\n if (typeof el === 'string') {\n appliedTransforms = el;\n } else {\n do {\n var transform = css(el, 'transform');\n\n if (transform && transform !== 'none') {\n appliedTransforms = transform + ' ' + appliedTransforms;\n }\n /* jshint boss:true */\n\n } while (!selfOnly && (el = el.parentNode));\n }\n\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */\n\n return matrixFn && new matrixFn(appliedTransforms);\n}\n\nfunction find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName),\n i = 0,\n n = list.length;\n\n if (iterator) {\n for (; i < n; i++) {\n iterator(list[i], i);\n }\n }\n\n return list;\n }\n\n return [];\n}\n\nfunction getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n\n if (scrollingElement) {\n return scrollingElement;\n } else {\n return document.documentElement;\n }\n}\n/**\n * Returns the \"bounding client rect\" of given element\n * @param {HTMLElement} el The element whose boundingClientRect is wanted\n * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container\n * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr\n * @param {[Boolean]} undoScale Whether the container's scale() should be undone\n * @param {[HTMLElement]} container The parent the element will be placed in\n * @return {Object} The boundingClientRect of el, with specified adjustments\n */\n\n\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n if (!el.getBoundingClientRect && el !== window) return;\n var elRect, top, left, bottom, right, height, width;\n\n if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n elRect = el.getBoundingClientRect();\n top = elRect.top;\n left = elRect.left;\n bottom = elRect.bottom;\n right = elRect.right;\n height = elRect.height;\n width = elRect.width;\n } else {\n top = 0;\n left = 0;\n bottom = window.innerHeight;\n right = window.innerWidth;\n height = window.innerHeight;\n width = window.innerWidth;\n }\n\n if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n // Adjust for translate()\n container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n\n if (!IE11OrLess) {\n do {\n if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container\n\n top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n bottom = top + elRect.height;\n right = left + elRect.width;\n break;\n }\n /* jshint boss:true */\n\n } while (container = container.parentNode);\n }\n }\n\n if (undoScale && el !== window) {\n // Adjust for scale()\n var elMatrix = matrix(container || el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d;\n\n if (elMatrix) {\n top /= scaleY;\n left /= scaleX;\n width /= scaleX;\n height /= scaleY;\n bottom = top + height;\n right = left + width;\n }\n }\n\n return {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n width: width,\n height: height\n };\n}\n/**\n * Checks if a side of an element is scrolled past a side of its parents\n * @param {HTMLElement} el The element who's side being scrolled out of view is in question\n * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')\n * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')\n * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\n */\n\n\nfunction isScrolledPast(el, elSide, parentSide) {\n var parent = getParentAutoScrollElement(el, true),\n elSideVal = getRect(el)[elSide];\n /* jshint boss:true */\n\n while (parent) {\n var parentSideVal = getRect(parent)[parentSide],\n visible = void 0;\n\n if (parentSide === 'top' || parentSide === 'left') {\n visible = elSideVal >= parentSideVal;\n } else {\n visible = elSideVal <= parentSideVal;\n }\n\n if (!visible) return parent;\n if (parent === getWindowScrollingElement()) break;\n parent = getParentAutoScrollElement(parent, false);\n }\n\n return false;\n}\n/**\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\n * and non-draggable elements\n * @param {HTMLElement} el The parent element\n * @param {Number} childNum The index of the child\n * @param {Object} options Parent Sortable's options\n * @return {HTMLElement} The child at index childNum, or null if not found\n */\n\n\nfunction getChild(el, childNum, options, includeDragEl) {\n var currentChild = 0,\n i = 0,\n children = el.children;\n\n while (i < children.length) {\n if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n if (currentChild === childNum) {\n return children[i];\n }\n\n currentChild++;\n }\n\n i++;\n }\n\n return null;\n}\n/**\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\n * @param {HTMLElement} el Parent element\n * @param {selector} selector Any other elements that should be ignored\n * @return {HTMLElement} The last child, ignoring ghostEl\n */\n\n\nfunction lastChild(el, selector) {\n var last = el.lastElementChild;\n\n while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n last = last.previousElementSibling;\n }\n\n return last || null;\n}\n/**\n * Returns the index of an element within its parent for a selected set of\n * elements\n * @param {HTMLElement} el\n * @param {selector} selector\n * @return {number}\n */\n\n\nfunction index(el, selector) {\n var index = 0;\n\n if (!el || !el.parentNode) {\n return -1;\n }\n /* jshint boss:true */\n\n\n while (el = el.previousElementSibling) {\n if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n index++;\n }\n }\n\n return index;\n}\n/**\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\n * The value is returned in real pixels.\n * @param {HTMLElement} el\n * @return {Array} Offsets in the format of [left, top]\n */\n\n\nfunction getRelativeScrollOffset(el) {\n var offsetLeft = 0,\n offsetTop = 0,\n winScroller = getWindowScrollingElement();\n\n if (el) {\n do {\n var elMatrix = matrix(el),\n scaleX = elMatrix.a,\n scaleY = elMatrix.d;\n offsetLeft += el.scrollLeft * scaleX;\n offsetTop += el.scrollTop * scaleY;\n } while (el !== winScroller && (el = el.parentNode));\n }\n\n return [offsetLeft, offsetTop];\n}\n/**\n * Returns the index of the object within the given array\n * @param {Array} arr Array that may or may not hold the object\n * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\n * @return {Number} The index of the object in the array, or -1\n */\n\n\nfunction indexOfObject(arr, obj) {\n for (var i in arr) {\n if (!arr.hasOwnProperty(i)) continue;\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n }\n }\n\n return -1;\n}\n\nfunction getParentAutoScrollElement(el, includeSelf) {\n // skip to window\n if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n var elem = el;\n var gotSelf = false;\n\n do {\n // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n var elemCSS = css(elem);\n\n if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n if (gotSelf || includeSelf) return elem;\n gotSelf = true;\n }\n }\n /* jshint boss:true */\n\n } while (elem = elem.parentNode);\n\n return getWindowScrollingElement();\n}\n\nfunction extend(dst, src) {\n if (dst && src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst;\n}\n\nfunction isRectEqual(rect1, rect2) {\n return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\n\nvar _throttleTimeout;\n\nfunction throttle(callback, ms) {\n return function () {\n if (!_throttleTimeout) {\n var args = arguments,\n _this = this;\n\n if (args.length === 1) {\n callback.call(_this, args[0]);\n } else {\n callback.apply(_this, args);\n }\n\n _throttleTimeout = setTimeout(function () {\n _throttleTimeout = void 0;\n }, ms);\n }\n };\n}\n\nfunction cancelThrottle() {\n clearTimeout(_throttleTimeout);\n _throttleTimeout = void 0;\n}\n\nfunction scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\n\nfunction clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n\n if (Polymer && Polymer.dom) {\n return Polymer.dom(el).cloneNode(true);\n } else if ($) {\n return $(el).clone(true)[0];\n } else {\n return el.cloneNode(true);\n }\n}\n\nfunction setRect(el, rect) {\n css(el, 'position', 'absolute');\n css(el, 'top', rect.top);\n css(el, 'left', rect.left);\n css(el, 'width', rect.width);\n css(el, 'height', rect.height);\n}\n\nfunction unsetRect(el) {\n css(el, 'position', '');\n css(el, 'top', '');\n css(el, 'left', '');\n css(el, 'width', '');\n css(el, 'height', '');\n}\n\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n var animationStates = [],\n animationCallbackId;\n return {\n captureAnimationState: function captureAnimationState() {\n animationStates = [];\n if (!this.options.animation) return;\n var children = [].slice.call(this.el.children);\n children.forEach(function (child) {\n if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n animationStates.push({\n target: child,\n rect: getRect(child)\n });\n\n var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation\n\n\n if (child.thisAnimationDuration) {\n var childMatrix = matrix(child, true);\n\n if (childMatrix) {\n fromRect.top -= childMatrix.f;\n fromRect.left -= childMatrix.e;\n }\n }\n\n child.fromRect = fromRect;\n });\n },\n addAnimationState: function addAnimationState(state) {\n animationStates.push(state);\n },\n removeAnimationState: function removeAnimationState(target) {\n animationStates.splice(indexOfObject(animationStates, {\n target: target\n }), 1);\n },\n animateAll: function animateAll(callback) {\n var _this = this;\n\n if (!this.options.animation) {\n clearTimeout(animationCallbackId);\n if (typeof callback === 'function') callback();\n return;\n }\n\n var animating = false,\n animationTime = 0;\n animationStates.forEach(function (state) {\n var time = 0,\n target = state.target,\n fromRect = target.fromRect,\n toRect = getRect(target),\n prevFromRect = target.prevFromRect,\n prevToRect = target.prevToRect,\n animatingRect = state.rect,\n targetMatrix = matrix(target, true);\n\n if (targetMatrix) {\n // Compensate for current animation\n toRect.top -= targetMatrix.f;\n toRect.left -= targetMatrix.e;\n }\n\n target.toRect = toRect;\n\n if (target.thisAnimationDuration) {\n // Could also check if animatingRect is between fromRect and toRect\n if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect\n (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n // If returning to same place as started from animation and on same axis\n time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n } // if fromRect != toRect: animate\n\n\n if (!isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n\n if (!time) {\n time = _this.options.animation;\n }\n\n _this.animate(target, animatingRect, toRect, time);\n }\n\n if (time) {\n animating = true;\n animationTime = Math.max(animationTime, time);\n clearTimeout(target.animationResetTimer);\n target.animationResetTimer = setTimeout(function () {\n target.animationTime = 0;\n target.prevFromRect = null;\n target.fromRect = null;\n target.prevToRect = null;\n target.thisAnimationDuration = null;\n }, time);\n target.thisAnimationDuration = time;\n }\n });\n clearTimeout(animationCallbackId);\n\n if (!animating) {\n if (typeof callback === 'function') callback();\n } else {\n animationCallbackId = setTimeout(function () {\n if (typeof callback === 'function') callback();\n }, animationTime);\n }\n\n animationStates = [];\n },\n animate: function animate(target, currentRect, toRect, duration) {\n if (duration) {\n css(target, 'transition', '');\n css(target, 'transform', '');\n var elMatrix = matrix(this.el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d,\n translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n target.animatingX = !!translateX;\n target.animatingY = !!translateY;\n css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n this.forRepaintDummy = repaint(target); // repaint\n\n css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n css(target, 'transform', 'translate3d(0,0,0)');\n typeof target.animated === 'number' && clearTimeout(target.animated);\n target.animated = setTimeout(function () {\n css(target, 'transition', '');\n css(target, 'transform', '');\n target.animated = false;\n target.animatingX = false;\n target.animatingY = false;\n }, duration);\n }\n }\n };\n}\n\nfunction repaint(target) {\n return target.offsetWidth;\n}\n\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n initializeByDefault: true\n};\nvar PluginManager = {\n mount: function mount(plugin) {\n // Set default static properties\n for (var option in defaults) {\n if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n plugin[option] = defaults[option];\n }\n }\n\n plugins.forEach(function (p) {\n if (p.pluginName === plugin.pluginName) {\n throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n }\n });\n plugins.push(plugin);\n },\n pluginEvent: function pluginEvent(eventName, sortable, evt) {\n var _this = this;\n\n this.eventCanceled = false;\n\n evt.cancel = function () {\n _this.eventCanceled = true;\n };\n\n var eventNameGlobal = eventName + 'Global';\n plugins.forEach(function (plugin) {\n if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable\n\n if (sortable[plugin.pluginName][eventNameGlobal]) {\n sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n sortable: sortable\n }, evt));\n } // Only fire plugin event if plugin is enabled in this sortable,\n // and plugin has event defined\n\n\n if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n sortable[plugin.pluginName][eventName](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n });\n },\n initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n plugins.forEach(function (plugin) {\n var pluginName = plugin.pluginName;\n if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n var initialized = new plugin(sortable, el, sortable.options);\n initialized.sortable = sortable;\n initialized.options = sortable.options;\n sortable[pluginName] = initialized; // Add default options from plugin\n\n _extends(defaults, initialized.defaults);\n });\n\n for (var option in sortable.options) {\n if (!sortable.options.hasOwnProperty(option)) continue;\n var modified = this.modifyOption(sortable, option, sortable.options[option]);\n\n if (typeof modified !== 'undefined') {\n sortable.options[option] = modified;\n }\n }\n },\n getEventProperties: function getEventProperties(name, sortable) {\n var eventProperties = {};\n plugins.forEach(function (plugin) {\n if (typeof plugin.eventProperties !== 'function') return;\n\n _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n });\n return eventProperties;\n },\n modifyOption: function modifyOption(sortable, name, value) {\n var modifiedValue;\n plugins.forEach(function (plugin) {\n // Plugin must exist on the Sortable\n if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n\n if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n }\n });\n return modifiedValue;\n }\n};\n\nfunction dispatchEvent(_ref) {\n var sortable = _ref.sortable,\n rootEl = _ref.rootEl,\n name = _ref.name,\n targetEl = _ref.targetEl,\n cloneEl = _ref.cloneEl,\n toEl = _ref.toEl,\n fromEl = _ref.fromEl,\n oldIndex = _ref.oldIndex,\n newIndex = _ref.newIndex,\n oldDraggableIndex = _ref.oldDraggableIndex,\n newDraggableIndex = _ref.newDraggableIndex,\n originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n extraEventProperties = _ref.extraEventProperties;\n sortable = sortable || rootEl && rootEl[expando];\n if (!sortable) return;\n var evt,\n options = sortable.options,\n onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent(name, {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n }\n\n evt.to = toEl || rootEl;\n evt.from = fromEl || rootEl;\n evt.item = targetEl || rootEl;\n evt.clone = cloneEl;\n evt.oldIndex = oldIndex;\n evt.newIndex = newIndex;\n evt.oldDraggableIndex = oldDraggableIndex;\n evt.newDraggableIndex = newDraggableIndex;\n evt.originalEvent = originalEvent;\n evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n\n var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n\n for (var option in allEventProperties) {\n evt[option] = allEventProperties[option];\n }\n\n if (rootEl) {\n rootEl.dispatchEvent(evt);\n }\n\n if (options[onName]) {\n options[onName].call(sortable, evt);\n }\n}\n\nvar _excluded = [\"evt\"];\n\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n originalEvent = _ref.evt,\n data = _objectWithoutProperties(_ref, _excluded);\n\n PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n dragEl: dragEl,\n parentEl: parentEl,\n ghostEl: ghostEl,\n rootEl: rootEl,\n nextEl: nextEl,\n lastDownEl: lastDownEl,\n cloneEl: cloneEl,\n cloneHidden: cloneHidden,\n dragStarted: moved,\n putSortable: putSortable,\n activeSortable: Sortable.active,\n originalEvent: originalEvent,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n hideGhostForTarget: _hideGhostForTarget,\n unhideGhostForTarget: _unhideGhostForTarget,\n cloneNowHidden: function cloneNowHidden() {\n cloneHidden = true;\n },\n cloneNowShown: function cloneNowShown() {\n cloneHidden = false;\n },\n dispatchSortableEvent: function dispatchSortableEvent(name) {\n _dispatchEvent({\n sortable: sortable,\n name: name,\n originalEvent: originalEvent\n });\n }\n }, data));\n};\n\nfunction _dispatchEvent(info) {\n dispatchEvent(_objectSpread2({\n putSortable: putSortable,\n cloneEl: cloneEl,\n targetEl: dragEl,\n rootEl: rootEl,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex\n }, info));\n}\n\nvar dragEl,\n parentEl,\n ghostEl,\n rootEl,\n nextEl,\n lastDownEl,\n cloneEl,\n cloneHidden,\n oldIndex,\n newIndex,\n oldDraggableIndex,\n newDraggableIndex,\n activeGroup,\n putSortable,\n awaitingDragStarted = false,\n ignoreNextClick = false,\n sortables = [],\n tapEvt,\n touchEvt,\n lastDx,\n lastDy,\n tapDistanceLeft,\n tapDistanceTop,\n moved,\n lastTarget,\n lastDirection,\n pastFirstInvertThresh = false,\n isCircumstantialInvert = false,\n targetMoveDistance,\n // For positioning ghost absolutely\nghostRelativeParent,\n ghostRelativeParentInitialScroll = [],\n // (left, top)\n_silent = false,\n savedInputChecked = [];\n/** @const */\n\nvar documentExists = typeof document !== 'undefined',\n PositionGhostAbsolutely = IOS,\n CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n // This will not pass for IE9, because IE9 DnD only works on anchors\nsupportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n supportCssPointerEvents = function () {\n if (!documentExists) return; // false when <= IE11\n\n if (IE11OrLess) {\n return false;\n }\n\n var el = document.createElement('x');\n el.style.cssText = 'pointer-events:auto';\n return el.style.pointerEvents === 'auto';\n}(),\n _detectDirection = function _detectDirection(el, options) {\n var elCSS = css(el),\n elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n child1 = getChild(el, 0, options),\n child2 = getChild(el, 1, options),\n firstChildCSS = child1 && css(child1),\n secondChildCSS = child2 && css(child2),\n firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n\n if (elCSS.display === 'flex') {\n return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n }\n\n if (elCSS.display === 'grid') {\n return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n }\n\n if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n }\n\n return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n},\n _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n dragElOppLength = vertical ? dragRect.width : dragRect.height,\n targetS1Opp = vertical ? targetRect.left : targetRect.top,\n targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n targetOppLength = vertical ? targetRect.width : targetRect.height;\n return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n},\n\n/**\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\n * @param {Number} x X position\n * @param {Number} y Y position\n * @return {HTMLElement} Element of the first found nearest Sortable\n */\n_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n var ret;\n sortables.some(function (sortable) {\n var threshold = sortable[expando].options.emptyInsertThreshold;\n if (!threshold || lastChild(sortable)) return;\n var rect = getRect(sortable),\n insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n\n if (insideHorizontally && insideVertically) {\n return ret = sortable;\n }\n });\n return ret;\n},\n _prepareGroup = function _prepareGroup(options) {\n function toFn(value, pull) {\n return function (to, from, dragEl, evt) {\n var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n\n if (value == null && (pull || sameGroup)) {\n // Default pull value\n // Default pull and put value if same group\n return true;\n } else if (value == null || value === false) {\n return false;\n } else if (pull && value === 'clone') {\n return value;\n } else if (typeof value === 'function') {\n return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n } else {\n var otherGroup = (pull ? to : from).options.group.name;\n return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n }\n };\n }\n\n var group = {};\n var originalGroup = options.group;\n\n if (!originalGroup || _typeof(originalGroup) != 'object') {\n originalGroup = {\n name: originalGroup\n };\n }\n\n group.name = originalGroup.name;\n group.checkPull = toFn(originalGroup.pull, true);\n group.checkPut = toFn(originalGroup.put);\n group.revertClone = originalGroup.revertClone;\n options.group = group;\n},\n _hideGhostForTarget = function _hideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', 'none');\n }\n},\n _unhideGhostForTarget = function _unhideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', '');\n }\n}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position\n\n\nif (documentExists) {\n document.addEventListener('click', function (evt) {\n if (ignoreNextClick) {\n evt.preventDefault();\n evt.stopPropagation && evt.stopPropagation();\n evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n ignoreNextClick = false;\n return false;\n }\n }, true);\n}\n\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if (dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n\n var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n\n if (nearest) {\n // Create imitation event\n var event = {};\n\n for (var i in evt) {\n if (evt.hasOwnProperty(i)) {\n event[i] = evt[i];\n }\n }\n\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n\n nearest[expando]._onDragOver(event);\n }\n }\n};\n\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if (dragEl) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n }\n};\n/**\n * @class Sortable\n * @param {HTMLElement} el\n * @param {Object} [options]\n */\n\n\nfunction Sortable(el, options) {\n if (!(el && el.nodeType && el.nodeType === 1)) {\n throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n }\n\n this.el = el; // root element\n\n this.options = options = _extends({}, options); // Export instance\n\n el[expando] = this;\n var defaults = {\n group: null,\n sort: true,\n disabled: false,\n store: null,\n handle: null,\n draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n swapThreshold: 1,\n // percentage; 0 <= x <= 1\n invertSwap: false,\n // invert always\n invertedSwapThreshold: null,\n // will be set to same as swapThreshold if default\n removeCloneOnHide: true,\n direction: function direction() {\n return _detectDirection(el, this.options);\n },\n ghostClass: 'sortable-ghost',\n chosenClass: 'sortable-chosen',\n dragClass: 'sortable-drag',\n ignore: 'a, img',\n filter: null,\n preventOnFilter: true,\n animation: 0,\n easing: null,\n setData: function setData(dataTransfer, dragEl) {\n dataTransfer.setData('Text', dragEl.textContent);\n },\n dropBubble: false,\n dragoverBubble: false,\n dataIdAttr: 'data-id',\n delay: 0,\n delayOnTouchOnly: false,\n touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n forceFallback: false,\n fallbackClass: 'sortable-fallback',\n fallbackOnBody: false,\n fallbackTolerance: 0,\n fallbackOffset: {\n x: 0,\n y: 0\n },\n supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,\n emptyInsertThreshold: 5\n };\n PluginManager.initializePlugins(this, el, defaults); // Set default options\n\n for (var name in defaults) {\n !(name in options) && (options[name] = defaults[name]);\n }\n\n _prepareGroup(options); // Bind all private methods\n\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n } // Setup drag mode\n\n\n this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n if (this.nativeDraggable) {\n // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n } // Bind events\n\n\n if (options.supportPointer) {\n on(el, 'pointerdown', this._onTapStart);\n } else {\n on(el, 'mousedown', this._onTapStart);\n on(el, 'touchstart', this._onTapStart);\n }\n\n if (this.nativeDraggable) {\n on(el, 'dragover', this);\n on(el, 'dragenter', this);\n }\n\n sortables.push(this.el); // Restore sorting\n\n options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager\n\n _extends(this, AnimationStateManager());\n}\n\nSortable.prototype =\n/** @lends Sortable.prototype */\n{\n constructor: Sortable,\n _isOutsideThisEl: function _isOutsideThisEl(target) {\n if (!this.el.contains(target) && target !== this.el) {\n lastTarget = null;\n }\n },\n _getDirection: function _getDirection(evt, target) {\n return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n },\n _onTapStart: function _onTapStart(\n /** Event|TouchEvent */\n evt) {\n if (!evt.cancelable) return;\n\n var _this = this,\n el = this.el,\n options = this.options,\n preventOnFilter = options.preventOnFilter,\n type = evt.type,\n touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n target = (touch || evt).target,\n originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n filter = options.filter;\n\n _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n\n\n if (dragEl) {\n return;\n }\n\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n return; // only left button and enabled\n } // cancel dnd if original target is content editable\n\n\n if (originalTarget.isContentEditable) {\n return;\n } // Safari ignores further event handling after mousedown\n\n\n if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n return;\n }\n\n target = closest(target, options.draggable, el, false);\n\n if (target && target.animated) {\n return;\n }\n\n if (lastDownEl === target) {\n // Ignoring duplicate `down`\n return;\n } // Get the index of the dragged element within its parent\n\n\n oldIndex = index(target);\n oldDraggableIndex = index(target, options.draggable); // Check filter\n\n if (typeof filter === 'function') {\n if (filter.call(this, evt, target, this)) {\n _dispatchEvent({\n sortable: _this,\n rootEl: originalTarget,\n name: 'filter',\n targetEl: target,\n toEl: el,\n fromEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n } else if (filter) {\n filter = filter.split(',').some(function (criteria) {\n criteria = closest(originalTarget, criteria.trim(), el, false);\n\n if (criteria) {\n _dispatchEvent({\n sortable: _this,\n rootEl: criteria,\n name: 'filter',\n targetEl: target,\n fromEl: el,\n toEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n return true;\n }\n });\n\n if (filter) {\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n }\n\n if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n return;\n } // Prepare `dragstart`\n\n\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart(\n /** Event */\n evt,\n /** Touch */\n touch,\n /** HTMLElement */\n target) {\n var _this = this,\n el = _this.el,\n options = _this.options,\n ownerDocument = el.ownerDocument,\n dragStartFn;\n\n if (target && !dragEl && target.parentNode === el) {\n var dragRect = getRect(target);\n rootEl = el;\n dragEl = target;\n parentEl = dragEl.parentNode;\n nextEl = dragEl.nextSibling;\n lastDownEl = target;\n activeGroup = options.group;\n Sortable.dragged = dragEl;\n tapEvt = {\n target: dragEl,\n clientX: (touch || evt).clientX,\n clientY: (touch || evt).clientY\n };\n tapDistanceLeft = tapEvt.clientX - dragRect.left;\n tapDistanceTop = tapEvt.clientY - dragRect.top;\n this._lastX = (touch || evt).clientX;\n this._lastY = (touch || evt).clientY;\n dragEl.style['will-change'] = 'all';\n\n dragStartFn = function dragStartFn() {\n pluginEvent('delayEnded', _this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n _this._onDrop();\n\n return;\n } // Delayed drag has been triggered\n // we can re-enable the events: touchmove/mousemove\n\n\n _this._disableDelayedDragEvents();\n\n if (!FireFox && _this.nativeDraggable) {\n dragEl.draggable = true;\n } // Bind the events: dragstart/dragend\n\n\n _this._triggerDragStart(evt, touch); // Drag start event\n\n\n _dispatchEvent({\n sortable: _this,\n name: 'choose',\n originalEvent: evt\n }); // Chosen item\n\n\n toggleClass(dragEl, options.chosenClass, true);\n }; // Disable \"draggable\"\n\n\n options.ignore.split(',').forEach(function (criteria) {\n find(dragEl, criteria.trim(), _disableDraggable);\n });\n on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mouseup', _this._onDrop);\n on(ownerDocument, 'touchend', _this._onDrop);\n on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)\n\n if (FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n dragEl.draggable = true;\n }\n\n pluginEvent('delayStart', this, {\n evt: evt\n }); // Delay is impossible for native DnD in Edge or IE\n\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n } // If the user moves the pointer or let go the click or touch\n // before the delay has been reached:\n // disable the delayed drag\n\n\n on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n } else {\n dragStartFn();\n }\n }\n },\n _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(\n /** TouchEvent|PointerEvent **/\n e) {\n var touch = e.touches ? e.touches[0] : e;\n\n if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n this._disableDelayedDrag();\n }\n },\n _disableDelayedDrag: function _disableDelayedDrag() {\n dragEl && _disableDraggable(dragEl);\n clearTimeout(this._dragStartTimer);\n\n this._disableDelayedDragEvents();\n },\n _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n off(ownerDocument, 'touchend', this._disableDelayedDrag);\n off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n },\n _triggerDragStart: function _triggerDragStart(\n /** Event */\n evt,\n /** Touch */\n touch) {\n touch = touch || evt.pointerType == 'touch' && evt;\n\n if (!this.nativeDraggable || touch) {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._onTouchMove);\n } else if (touch) {\n on(document, 'touchmove', this._onTouchMove);\n } else {\n on(document, 'mousemove', this._onTouchMove);\n }\n } else {\n on(dragEl, 'dragend', this);\n on(rootEl, 'dragstart', this._onDragStart);\n }\n\n try {\n if (document.selection) {\n // Timeout neccessary for IE9\n _nextTick(function () {\n document.selection.empty();\n });\n } else {\n window.getSelection().removeAllRanges();\n }\n } catch (err) {}\n },\n _dragStarted: function _dragStarted(fallback, evt) {\n\n awaitingDragStarted = false;\n\n if (rootEl && dragEl) {\n pluginEvent('dragStarted', this, {\n evt: evt\n });\n\n if (this.nativeDraggable) {\n on(document, 'dragover', _checkOutsideTargetEl);\n }\n\n var options = this.options; // Apply effect\n\n !fallback && toggleClass(dragEl, options.dragClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n Sortable.active = this;\n fallback && this._appendGhost(); // Drag start event\n\n _dispatchEvent({\n sortable: this,\n name: 'start',\n originalEvent: evt\n });\n } else {\n this._nulling();\n }\n },\n _emulateDragOver: function _emulateDragOver() {\n if (touchEvt) {\n this._lastX = touchEvt.clientX;\n this._lastY = touchEvt.clientY;\n\n _hideGhostForTarget();\n\n var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n var parent = target;\n\n while (target && target.shadowRoot) {\n target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n\n dragEl.parentNode[expando]._isOutsideThisEl(target);\n\n if (parent) {\n do {\n if (parent[expando]) {\n var inserted = void 0;\n inserted = parent[expando]._onDragOver({\n clientX: touchEvt.clientX,\n clientY: touchEvt.clientY,\n target: target,\n rootEl: parent\n });\n\n if (inserted && !this.options.dragoverBubble) {\n break;\n }\n }\n\n target = parent; // store last element\n }\n /* jshint boss:true */\n while (parent = parent.parentNode);\n }\n\n _unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove(\n /**TouchEvent*/\n evt) {\n if (tapEvt) {\n var options = this.options,\n fallbackTolerance = options.fallbackTolerance,\n fallbackOffset = options.fallbackOffset,\n touch = evt.touches ? evt.touches[0] : evt,\n ghostMatrix = ghostEl && matrix(ghostEl, true),\n scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging\n\n if (!Sortable.active && !awaitingDragStarted) {\n if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n return;\n }\n\n this._onDragStart(evt, true);\n }\n\n if (ghostEl) {\n if (ghostMatrix) {\n ghostMatrix.e += dx - (lastDx || 0);\n ghostMatrix.f += dy - (lastDy || 0);\n } else {\n ghostMatrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: dx,\n f: dy\n };\n }\n\n var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n css(ghostEl, 'webkitTransform', cssMatrix);\n css(ghostEl, 'mozTransform', cssMatrix);\n css(ghostEl, 'msTransform', cssMatrix);\n css(ghostEl, 'transform', cssMatrix);\n lastDx = dx;\n lastDy = dy;\n touchEvt = touch;\n }\n\n evt.cancelable && evt.preventDefault();\n }\n },\n _appendGhost: function _appendGhost() {\n // Bug if using scale(): https://stackoverflow.com/questions/2637058\n // Not being adjusted for\n if (!ghostEl) {\n var container = this.options.fallbackOnBody ? document.body : rootEl,\n rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n options = this.options; // Position absolutely\n\n if (PositionGhostAbsolutely) {\n // Get relatively positioned parent\n ghostRelativeParent = container;\n\n while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n ghostRelativeParent = ghostRelativeParent.parentNode;\n }\n\n if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n rect.top += ghostRelativeParent.scrollTop;\n rect.left += ghostRelativeParent.scrollLeft;\n } else {\n ghostRelativeParent = getWindowScrollingElement();\n }\n\n ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n }\n\n ghostEl = dragEl.cloneNode(true);\n toggleClass(ghostEl, options.ghostClass, false);\n toggleClass(ghostEl, options.fallbackClass, true);\n toggleClass(ghostEl, options.dragClass, true);\n css(ghostEl, 'transition', '');\n css(ghostEl, 'transform', '');\n css(ghostEl, 'box-sizing', 'border-box');\n css(ghostEl, 'margin', 0);\n css(ghostEl, 'top', rect.top);\n css(ghostEl, 'left', rect.left);\n css(ghostEl, 'width', rect.width);\n css(ghostEl, 'height', rect.height);\n css(ghostEl, 'opacity', '0.8');\n css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n css(ghostEl, 'zIndex', '100000');\n css(ghostEl, 'pointerEvents', 'none');\n Sortable.ghost = ghostEl;\n container.appendChild(ghostEl); // Set transform-origin\n\n css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n }\n },\n _onDragStart: function _onDragStart(\n /**Event*/\n evt,\n /**boolean*/\n fallback) {\n var _this = this;\n\n var dataTransfer = evt.dataTransfer;\n var options = _this.options;\n pluginEvent('dragStart', this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n }\n\n pluginEvent('setupClone', this);\n\n if (!Sortable.eventCanceled) {\n cloneEl = clone(dragEl);\n cloneEl.draggable = false;\n cloneEl.style['will-change'] = '';\n\n this._hideClone();\n\n toggleClass(cloneEl, this.options.chosenClass, false);\n Sortable.clone = cloneEl;\n } // #1143: IFrame support workaround\n\n\n _this.cloneId = _nextTick(function () {\n pluginEvent('clone', _this);\n if (Sortable.eventCanceled) return;\n\n if (!_this.options.removeCloneOnHide) {\n rootEl.insertBefore(cloneEl, dragEl);\n }\n\n _this._hideClone();\n\n _dispatchEvent({\n sortable: _this,\n name: 'clone'\n });\n });\n !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events\n\n if (fallback) {\n ignoreNextClick = true;\n _this._loopId = setInterval(_this._emulateDragOver, 50);\n } else {\n // Undo what was set in _prepareDragStart before drag started\n off(document, 'mouseup', _this._onDrop);\n off(document, 'touchend', _this._onDrop);\n off(document, 'touchcancel', _this._onDrop);\n\n if (dataTransfer) {\n dataTransfer.effectAllowed = 'move';\n options.setData && options.setData.call(_this, dataTransfer, dragEl);\n }\n\n on(document, 'drop', _this); // #1276 fix:\n\n css(dragEl, 'transform', 'translateZ(0)');\n }\n\n awaitingDragStarted = true;\n _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n on(document, 'selectstart', _this);\n moved = true;\n\n if (Safari) {\n css(document.body, 'user-select', 'none');\n }\n },\n // Returns true - if no further action is needed (either inserted or another condition)\n _onDragOver: function _onDragOver(\n /**Event*/\n evt) {\n var el = this.el,\n target = evt.target,\n dragRect,\n targetRect,\n revert,\n options = this.options,\n group = options.group,\n activeSortable = Sortable.active,\n isOwner = activeGroup === group,\n canSort = options.sort,\n fromSortable = putSortable || activeSortable,\n vertical,\n _this = this,\n completedFired = false;\n\n if (_silent) return;\n\n function dragOverEvent(name, extra) {\n pluginEvent(name, _this, _objectSpread2({\n evt: evt,\n isOwner: isOwner,\n axis: vertical ? 'vertical' : 'horizontal',\n revert: revert,\n dragRect: dragRect,\n targetRect: targetRect,\n canSort: canSort,\n fromSortable: fromSortable,\n target: target,\n completed: completed,\n onMove: function onMove(target, after) {\n return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n },\n changed: changed\n }, extra));\n } // Capture animation state\n\n\n function capture() {\n dragOverEvent('dragOverAnimationCapture');\n\n _this.captureAnimationState();\n\n if (_this !== fromSortable) {\n fromSortable.captureAnimationState();\n }\n } // Return invocation when dragEl is inserted (or completed)\n\n\n function completed(insertion) {\n dragOverEvent('dragOverCompleted', {\n insertion: insertion\n });\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n } else {\n activeSortable._showClone(_this);\n }\n\n if (_this !== fromSortable) {\n // Set ghost class to new sortable's ghost class\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n }\n\n if (putSortable !== _this && _this !== Sortable.active) {\n putSortable = _this;\n } else if (_this === Sortable.active && putSortable) {\n putSortable = null;\n } // Animation\n\n\n if (fromSortable === _this) {\n _this._ignoreWhileAnimating = target;\n }\n\n _this.animateAll(function () {\n dragOverEvent('dragOverAnimationComplete');\n _this._ignoreWhileAnimating = null;\n });\n\n if (_this !== fromSortable) {\n fromSortable.animateAll();\n fromSortable._ignoreWhileAnimating = null;\n }\n } // Null lastTarget if it is not inside a previously swapped element\n\n\n if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n lastTarget = null;\n } // no bubbling and not fallback\n\n\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted\n\n\n !insertion && nearestEmptyInsertDetectEvent(evt);\n }\n\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n } // Call when dragEl has been inserted\n\n\n function changed() {\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n _dispatchEvent({\n sortable: _this,\n name: 'change',\n toEl: el,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n originalEvent: evt\n });\n }\n\n if (evt.preventDefault !== void 0) {\n evt.cancelable && evt.preventDefault();\n }\n\n target = closest(target, options.draggable, el, true);\n dragOverEvent('dragOver');\n if (Sortable.eventCanceled) return completedFired;\n\n if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n return completed(false);\n }\n\n ignoreNextClick = false;\n\n if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n vertical = this._getDirection(evt, target) === 'vertical';\n dragRect = getRect(dragEl);\n dragOverEvent('dragOverValid');\n if (Sortable.eventCanceled) return completedFired;\n\n if (revert) {\n parentEl = rootEl; // actualization\n\n capture();\n\n this._hideClone();\n\n dragOverEvent('revert');\n\n if (!Sortable.eventCanceled) {\n if (nextEl) {\n rootEl.insertBefore(dragEl, nextEl);\n } else {\n rootEl.appendChild(dragEl);\n }\n }\n\n return completed(true);\n }\n\n var elLastChild = lastChild(el, options.draggable);\n\n if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n // Insert to end of list\n // If already at end of list: Do not insert\n if (elLastChild === dragEl) {\n return completed(false);\n } // if there is a last element, it is the target\n\n\n if (elLastChild && el === evt.target) {\n target = elLastChild;\n }\n\n if (target) {\n targetRect = getRect(target);\n }\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n el.appendChild(dragEl);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n // Insert to start of list\n var firstChild = getChild(el, 0, options, true);\n\n if (firstChild === dragEl) {\n return completed(false);\n }\n\n target = firstChild;\n targetRect = getRect(target);\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n capture();\n el.insertBefore(dragEl, firstChild);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (target.parentNode === el) {\n targetRect = getRect(target);\n var direction = 0,\n targetBeforeFirstSwap,\n differentLevel = dragEl.parentNode !== el,\n differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n side1 = vertical ? 'top' : 'left',\n scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n\n if (lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n pastFirstInvertThresh = false;\n isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\n\n direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n var sibling;\n\n if (direction !== 0) {\n // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n var dragIndex = index(dragEl);\n\n do {\n dragIndex -= direction;\n sibling = parentEl.children[dragIndex];\n } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n } // If dragEl is already beside target: Do not insert\n\n\n if (direction === 0 || sibling === target) {\n return completed(false);\n }\n\n lastTarget = target;\n lastDirection = direction;\n var nextSibling = target.nextElementSibling,\n after = false;\n after = direction === 1;\n\n var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) {\n after = moveVector === 1;\n }\n\n _silent = true;\n setTimeout(_unsilent, 30);\n capture();\n\n if (after && !nextSibling) {\n el.appendChild(dragEl);\n } else {\n target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n } // Undo chrome's scroll adjustment (has no effect on other browsers)\n\n\n if (scrolledPastTop) {\n scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n }\n\n parentEl = dragEl.parentNode; // actualization\n // must be done before animation\n\n if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n }\n\n changed();\n return completed(true);\n }\n }\n\n if (el.contains(dragEl)) {\n return completed(false);\n }\n }\n\n return false;\n },\n _ignoreWhileAnimating: null,\n _offMoveEvents: function _offMoveEvents() {\n off(document, 'mousemove', this._onTouchMove);\n off(document, 'touchmove', this._onTouchMove);\n off(document, 'pointermove', this._onTouchMove);\n off(document, 'dragover', nearestEmptyInsertDetectEvent);\n off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n },\n _offUpEvents: function _offUpEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._onDrop);\n off(ownerDocument, 'touchend', this._onDrop);\n off(ownerDocument, 'pointerup', this._onDrop);\n off(ownerDocument, 'touchcancel', this._onDrop);\n off(document, 'selectstart', this);\n },\n _onDrop: function _onDrop(\n /**Event*/\n evt) {\n var el = this.el,\n options = this.options; // Get the index of the dragged element within its parent\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n pluginEvent('drop', this, {\n evt: evt\n });\n parentEl = dragEl && dragEl.parentNode; // Get again after plugin event\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n if (Sortable.eventCanceled) {\n this._nulling();\n\n return;\n }\n\n awaitingDragStarted = false;\n isCircumstantialInvert = false;\n pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n\n _cancelNextTick(this.cloneId);\n\n _cancelNextTick(this._dragStartId); // Unbind events\n\n\n if (this.nativeDraggable) {\n off(document, 'drop', this);\n off(el, 'dragstart', this._onDragStart);\n }\n\n this._offMoveEvents();\n\n this._offUpEvents();\n\n if (Safari) {\n css(document.body, 'user-select', '');\n }\n\n css(dragEl, 'transform', '');\n\n if (evt) {\n if (moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n\n ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n // Remove clone(s)\n cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n }\n\n if (dragEl) {\n if (this.nativeDraggable) {\n off(dragEl, 'dragend', this);\n }\n\n _disableDraggable(dragEl);\n\n dragEl.style['will-change'] = ''; // Remove classes\n // ghostClass is added in dragStarted\n\n if (moved && !awaitingDragStarted) {\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n }\n\n toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event\n\n _dispatchEvent({\n sortable: this,\n name: 'unchoose',\n toEl: parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\n\n if (rootEl !== parentEl) {\n if (newIndex >= 0) {\n // Add event\n _dispatchEvent({\n rootEl: parentEl,\n name: 'add',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n }); // Remove event\n\n\n _dispatchEvent({\n sortable: this,\n name: 'remove',\n toEl: parentEl,\n originalEvent: evt\n }); // drag from one list and drop into another\n\n\n _dispatchEvent({\n rootEl: parentEl,\n name: 'sort',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n\n putSortable && putSortable.save();\n } else {\n if (newIndex !== oldIndex) {\n if (newIndex >= 0) {\n // drag & drop within the same list\n _dispatchEvent({\n sortable: this,\n name: 'update',\n toEl: parentEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n }\n }\n\n if (Sortable.active) {\n /* jshint eqnull:true */\n if (newIndex == null || newIndex === -1) {\n newIndex = oldIndex;\n newDraggableIndex = oldDraggableIndex;\n }\n\n _dispatchEvent({\n sortable: this,\n name: 'end',\n toEl: parentEl,\n originalEvent: evt\n }); // Save sorting\n\n\n this.save();\n }\n }\n }\n\n this._nulling();\n },\n _nulling: function _nulling() {\n pluginEvent('nulling', this);\n rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n savedInputChecked.forEach(function (el) {\n el.checked = true;\n });\n savedInputChecked.length = lastDx = lastDy = 0;\n },\n handleEvent: function handleEvent(\n /**Event*/\n evt) {\n switch (evt.type) {\n case 'drop':\n case 'dragend':\n this._onDrop(evt);\n\n break;\n\n case 'dragenter':\n case 'dragover':\n if (dragEl) {\n this._onDragOver(evt);\n\n _globalDragOver(evt);\n }\n\n break;\n\n case 'selectstart':\n evt.preventDefault();\n break;\n }\n },\n\n /**\n * Serializes the item into an array of string.\n * @returns {String[]}\n */\n toArray: function toArray() {\n var order = [],\n el,\n children = this.el.children,\n i = 0,\n n = children.length,\n options = this.options;\n\n for (; i < n; i++) {\n el = children[i];\n\n if (closest(el, options.draggable, this.el, false)) {\n order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n }\n }\n\n return order;\n },\n\n /**\n * Sorts the elements according to the array.\n * @param {String[]} order order of the items\n */\n sort: function sort(order, useAnimation) {\n var items = {},\n rootEl = this.el;\n this.toArray().forEach(function (id, i) {\n var el = rootEl.children[i];\n\n if (closest(el, this.options.draggable, rootEl, false)) {\n items[id] = el;\n }\n }, this);\n useAnimation && this.captureAnimationState();\n order.forEach(function (id) {\n if (items[id]) {\n rootEl.removeChild(items[id]);\n rootEl.appendChild(items[id]);\n }\n });\n useAnimation && this.animateAll();\n },\n\n /**\n * Save the current sorting\n */\n save: function save() {\n var store = this.options.store;\n store && store.set && store.set(this);\n },\n\n /**\n * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\n * @param {HTMLElement} el\n * @param {String} [selector] default: `options.draggable`\n * @returns {HTMLElement|null}\n */\n closest: function closest$1(el, selector) {\n return closest(el, selector || this.options.draggable, this.el, false);\n },\n\n /**\n * Set/get option\n * @param {string} name\n * @param {*} [value]\n * @returns {*}\n */\n option: function option(name, value) {\n var options = this.options;\n\n if (value === void 0) {\n return options[name];\n } else {\n var modifiedValue = PluginManager.modifyOption(this, name, value);\n\n if (typeof modifiedValue !== 'undefined') {\n options[name] = modifiedValue;\n } else {\n options[name] = value;\n }\n\n if (name === 'group') {\n _prepareGroup(options);\n }\n }\n },\n\n /**\n * Destroy\n */\n destroy: function destroy() {\n pluginEvent('destroy', this);\n var el = this.el;\n el[expando] = null;\n off(el, 'mousedown', this._onTapStart);\n off(el, 'touchstart', this._onTapStart);\n off(el, 'pointerdown', this._onTapStart);\n\n if (this.nativeDraggable) {\n off(el, 'dragover', this);\n off(el, 'dragenter', this);\n } // Remove draggable attributes\n\n\n Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n el.removeAttribute('draggable');\n });\n\n this._onDrop();\n\n this._disableDelayedDragEvents();\n\n sortables.splice(sortables.indexOf(this.el), 1);\n this.el = el = null;\n },\n _hideClone: function _hideClone() {\n if (!cloneHidden) {\n pluginEvent('hideClone', this);\n if (Sortable.eventCanceled) return;\n css(cloneEl, 'display', 'none');\n\n if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n cloneEl.parentNode.removeChild(cloneEl);\n }\n\n cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== 'clone') {\n this._hideClone();\n\n return;\n }\n\n if (cloneHidden) {\n pluginEvent('showClone', this);\n if (Sortable.eventCanceled) return; // show clone at dragEl or original position\n\n if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n rootEl.insertBefore(cloneEl, dragEl);\n } else if (nextEl) {\n rootEl.insertBefore(cloneEl, nextEl);\n } else {\n rootEl.appendChild(cloneEl);\n }\n\n if (this.options.group.revertClone) {\n this.animate(dragEl, cloneEl);\n }\n\n css(cloneEl, 'display', '');\n cloneHidden = false;\n }\n }\n};\n\nfunction _globalDragOver(\n/**Event*/\nevt) {\n if (evt.dataTransfer) {\n evt.dataTransfer.dropEffect = 'move';\n }\n\n evt.cancelable && evt.preventDefault();\n}\n\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n var evt,\n sortable = fromEl[expando],\n onMoveFn = sortable.options.onMove,\n retVal; // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent('move', {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent('move', true, true);\n }\n\n evt.to = toEl;\n evt.from = fromEl;\n evt.dragged = dragEl;\n evt.draggedRect = dragRect;\n evt.related = targetEl || toEl;\n evt.relatedRect = targetRect || getRect(toEl);\n evt.willInsertAfter = willInsertAfter;\n evt.originalEvent = originalEvent;\n fromEl.dispatchEvent(evt);\n\n if (onMoveFn) {\n retVal = onMoveFn.call(sortable, evt, originalEvent);\n }\n\n return retVal;\n}\n\nfunction _disableDraggable(el) {\n el.draggable = false;\n}\n\nfunction _unsilent() {\n _silent = false;\n}\n\nfunction _ghostIsFirst(evt, vertical, sortable) {\n var rect = getRect(getChild(sortable.el, 0, sortable.options, true));\n var spacer = 10;\n return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;\n}\n\nfunction _ghostIsLast(evt, vertical, sortable) {\n var rect = getRect(lastChild(sortable.el, sortable.options.draggable));\n var spacer = 10;\n return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;\n}\n\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n targetLength = vertical ? targetRect.height : targetRect.width,\n targetS1 = vertical ? targetRect.top : targetRect.left,\n targetS2 = vertical ? targetRect.bottom : targetRect.right,\n invert = false;\n\n if (!invertSwap) {\n // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n // check if past first invert threshold on side opposite of lastDirection\n if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n pastFirstInvertThresh = true;\n }\n\n if (!pastFirstInvertThresh) {\n // dragEl shadow (target move distance shadow)\n if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n : mouseOnAxis > targetS2 - targetMoveDistance) {\n return -lastDirection;\n }\n } else {\n invert = true;\n }\n } else {\n // Regular\n if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n return _getInsertDirection(target);\n }\n }\n }\n\n invert = invert || invertSwap;\n\n if (invert) {\n // Invert of regular\n if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n }\n }\n\n return 0;\n}\n/**\n * Gets the direction dragEl must be swapped relative to target in order to make it\n * seem that dragEl has been \"inserted\" into that element's position\n * @param {HTMLElement} target The target whose position dragEl is being inserted at\n * @return {Number} Direction dragEl must be swapped\n */\n\n\nfunction _getInsertDirection(target) {\n if (index(dragEl) < index(target)) {\n return 1;\n } else {\n return -1;\n }\n}\n/**\n * Generate id\n * @param {HTMLElement} el\n * @returns {String}\n * @private\n */\n\n\nfunction _generateId(el) {\n var str = el.tagName + el.className + el.src + el.href + el.textContent,\n i = str.length,\n sum = 0;\n\n while (i--) {\n sum += str.charCodeAt(i);\n }\n\n return sum.toString(36);\n}\n\nfunction _saveInputCheckedState(root) {\n savedInputChecked.length = 0;\n var inputs = root.getElementsByTagName('input');\n var idx = inputs.length;\n\n while (idx--) {\n var el = inputs[idx];\n el.checked && savedInputChecked.push(el);\n }\n}\n\nfunction _nextTick(fn) {\n return setTimeout(fn, 0);\n}\n\nfunction _cancelNextTick(id) {\n return clearTimeout(id);\n} // Fixed #973:\n\n\nif (documentExists) {\n on(document, 'touchmove', function (evt) {\n if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n evt.preventDefault();\n }\n });\n} // Export utils\n\n\nSortable.utils = {\n on: on,\n off: off,\n css: css,\n find: find,\n is: function is(el, selector) {\n return !!closest(el, selector, el, false);\n },\n extend: extend,\n throttle: throttle,\n closest: closest,\n toggleClass: toggleClass,\n clone: clone,\n index: index,\n nextTick: _nextTick,\n cancelNextTick: _cancelNextTick,\n detectDirection: _detectDirection,\n getChild: getChild\n};\n/**\n * Get the Sortable instance of an element\n * @param {HTMLElement} element The element\n * @return {Sortable|undefined} The instance of Sortable\n */\n\nSortable.get = function (element) {\n return element[expando];\n};\n/**\n * Mount a plugin to Sortable\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\n */\n\n\nSortable.mount = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n if (plugins[0].constructor === Array) plugins = plugins[0];\n plugins.forEach(function (plugin) {\n if (!plugin.prototype || !plugin.prototype.constructor) {\n throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n }\n\n if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n PluginManager.mount(plugin);\n });\n};\n/**\n * Create sortable instance\n * @param {HTMLElement} el\n * @param {Object} [options]\n */\n\n\nSortable.create = function (el, options) {\n return new Sortable(el, options);\n}; // Export\n\n\nSortable.version = version;\n\nvar autoScrolls = [],\n scrollEl,\n scrollRootEl,\n scrolling = false,\n lastAutoScrollX,\n lastAutoScrollY,\n touchEvt$1,\n pointerElemChangedInterval;\n\nfunction AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n forceAutoScrollFallback: false,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n }; // Bind all private methods\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n }\n\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n\n if (this.sortable.nativeDraggable) {\n on(document, 'dragover', this._handleAutoScroll);\n } else {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._handleFallbackAutoScroll);\n } else if (originalEvent.touches) {\n on(document, 'touchmove', this._handleFallbackAutoScroll);\n } else {\n on(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref2) {\n var originalEvent = _ref2.originalEvent;\n\n // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n this._handleAutoScroll(originalEvent);\n }\n },\n drop: function drop() {\n if (this.sortable.nativeDraggable) {\n off(document, 'dragover', this._handleAutoScroll);\n } else {\n off(document, 'pointermove', this._handleFallbackAutoScroll);\n off(document, 'touchmove', this._handleFallbackAutoScroll);\n off(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n\n clearPointerElemChangedInterval();\n clearAutoScrolls();\n cancelThrottle();\n },\n nulling: function nulling() {\n touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n autoScrolls.length = 0;\n },\n _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n this._handleAutoScroll(evt, true);\n },\n _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n var _this = this;\n\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n elem = document.elementFromPoint(x, y);\n touchEvt$1 = evt; // IE does not seem to have native autoscroll,\n // Edge's autoscroll seems too conditional,\n // MACOS Safari does not have autoscroll,\n // Firefox and Chrome are good\n\n if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change\n\n var ogElemScroller = getParentAutoScrollElement(elem, true);\n\n if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour\n\n pointerElemChangedInterval = setInterval(function () {\n var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n clearAutoScrolls();\n }\n\n autoScroll(evt, _this.options, newElem, fallback);\n }, 10);\n lastAutoScrollX = x;\n lastAutoScrollY = y;\n }\n } else {\n // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n clearAutoScrolls();\n return;\n }\n\n autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return _extends(AutoScroll, {\n pluginName: 'scroll',\n initializeByDefault: true\n });\n}\n\nfunction clearAutoScrolls() {\n autoScrolls.forEach(function (autoScroll) {\n clearInterval(autoScroll.pid);\n });\n autoScrolls = [];\n}\n\nfunction clearPointerElemChangedInterval() {\n clearInterval(pointerElemChangedInterval);\n}\n\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n if (!options.scroll) return;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n sens = options.scrollSensitivity,\n speed = options.scrollSpeed,\n winScroller = getWindowScrollingElement();\n var scrollThisInstance = false,\n scrollCustomFn; // New scroll root, set scrollEl\n\n if (scrollRootEl !== rootEl) {\n scrollRootEl = rootEl;\n clearAutoScrolls();\n scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n\n if (scrollEl === true) {\n scrollEl = getParentAutoScrollElement(rootEl, true);\n }\n }\n\n var layersOut = 0;\n var currentParent = scrollEl;\n\n do {\n var el = currentParent,\n rect = getRect(el),\n top = rect.top,\n bottom = rect.bottom,\n left = rect.left,\n right = rect.right,\n width = rect.width,\n height = rect.height,\n canScrollX = void 0,\n canScrollY = void 0,\n scrollWidth = el.scrollWidth,\n scrollHeight = el.scrollHeight,\n elCSS = css(el),\n scrollPosX = el.scrollLeft,\n scrollPosY = el.scrollTop;\n\n if (el === winScroller) {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n } else {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n }\n\n var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n\n if (!autoScrolls[layersOut]) {\n for (var i = 0; i <= layersOut; i++) {\n if (!autoScrolls[i]) {\n autoScrolls[i] = {};\n }\n }\n }\n\n if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n autoScrolls[layersOut].el = el;\n autoScrolls[layersOut].vx = vx;\n autoScrolls[layersOut].vy = vy;\n clearInterval(autoScrolls[layersOut].pid);\n\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */\n\n autoScrolls[layersOut].pid = setInterval(function () {\n // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n if (isFallback && this.layer === 0) {\n Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n\n }\n\n var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n\n if (typeof scrollCustomFn === 'function') {\n if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n return;\n }\n }\n\n scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }.bind({\n layer: layersOut\n }), 24);\n }\n }\n\n layersOut++;\n } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n\n scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n var originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n dragEl = _ref.dragEl,\n activeSortable = _ref.activeSortable,\n dispatchSortableEvent = _ref.dispatchSortableEvent,\n hideGhostForTarget = _ref.hideGhostForTarget,\n unhideGhostForTarget = _ref.unhideGhostForTarget;\n if (!originalEvent) return;\n var toSortable = putSortable || activeSortable;\n hideGhostForTarget();\n var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n var target = document.elementFromPoint(touch.clientX, touch.clientY);\n unhideGhostForTarget();\n\n if (toSortable && !toSortable.el.contains(target)) {\n dispatchSortableEvent('spill');\n this.onSpill({\n dragEl: dragEl,\n putSortable: putSortable\n });\n }\n};\n\nfunction Revert() {}\n\nRevert.prototype = {\n startIndex: null,\n dragStart: function dragStart(_ref2) {\n var oldDraggableIndex = _ref2.oldDraggableIndex;\n this.startIndex = oldDraggableIndex;\n },\n onSpill: function onSpill(_ref3) {\n var dragEl = _ref3.dragEl,\n putSortable = _ref3.putSortable;\n this.sortable.captureAnimationState();\n\n if (putSortable) {\n putSortable.captureAnimationState();\n }\n\n var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n\n if (nextSibling) {\n this.sortable.el.insertBefore(dragEl, nextSibling);\n } else {\n this.sortable.el.appendChild(dragEl);\n }\n\n this.sortable.animateAll();\n\n if (putSortable) {\n putSortable.animateAll();\n }\n },\n drop: drop\n};\n\n_extends(Revert, {\n pluginName: 'revertOnSpill'\n});\n\nfunction Remove() {}\n\nRemove.prototype = {\n onSpill: function onSpill(_ref4) {\n var dragEl = _ref4.dragEl,\n putSortable = _ref4.putSortable;\n var parentSortable = putSortable || this.sortable;\n parentSortable.captureAnimationState();\n dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n parentSortable.animateAll();\n },\n drop: drop\n};\n\n_extends(Remove, {\n pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\n\nfunction SwapPlugin() {\n function Swap() {\n this.defaults = {\n swapClass: 'sortable-swap-highlight'\n };\n }\n\n Swap.prototype = {\n dragStart: function dragStart(_ref) {\n var dragEl = _ref.dragEl;\n lastSwapEl = dragEl;\n },\n dragOverValid: function dragOverValid(_ref2) {\n var completed = _ref2.completed,\n target = _ref2.target,\n onMove = _ref2.onMove,\n activeSortable = _ref2.activeSortable,\n changed = _ref2.changed,\n cancel = _ref2.cancel;\n if (!activeSortable.options.swap) return;\n var el = this.sortable.el,\n options = this.options;\n\n if (target && target !== el) {\n var prevSwapEl = lastSwapEl;\n\n if (onMove(target) !== false) {\n toggleClass(target, options.swapClass, true);\n lastSwapEl = target;\n } else {\n lastSwapEl = null;\n }\n\n if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n toggleClass(prevSwapEl, options.swapClass, false);\n }\n }\n\n changed();\n completed(true);\n cancel();\n },\n drop: function drop(_ref3) {\n var activeSortable = _ref3.activeSortable,\n putSortable = _ref3.putSortable,\n dragEl = _ref3.dragEl;\n var toSortable = putSortable || this.sortable;\n var options = this.options;\n lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n\n if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n if (dragEl !== lastSwapEl) {\n toSortable.captureAnimationState();\n if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n swapNodes(dragEl, lastSwapEl);\n toSortable.animateAll();\n if (toSortable !== activeSortable) activeSortable.animateAll();\n }\n }\n },\n nulling: function nulling() {\n lastSwapEl = null;\n }\n };\n return _extends(Swap, {\n pluginName: 'swap',\n eventProperties: function eventProperties() {\n return {\n swapItem: lastSwapEl\n };\n }\n });\n}\n\nfunction swapNodes(n1, n2) {\n var p1 = n1.parentNode,\n p2 = n2.parentNode,\n i1,\n i2;\n if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n i1 = index(n1);\n i2 = index(n2);\n\n if (p1.isEqualNode(p2) && i1 < i2) {\n i2++;\n }\n\n p1.insertBefore(n2, p1.children[i1]);\n p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n multiDragClones = [],\n lastMultiDragSelect,\n // for selection with modifier key down (SHIFT)\nmultiDragSortable,\n initialFolding = false,\n // Initial multi-drag fold when drag started\nfolding = false,\n // Folding any other time\ndragStarted = false,\n dragEl$1,\n clonesFromRect,\n clonesHidden;\n\nfunction MultiDragPlugin() {\n function MultiDrag(sortable) {\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n\n if (sortable.options.supportPointer) {\n on(document, 'pointerup', this._deselectMultiDrag);\n } else {\n on(document, 'mouseup', this._deselectMultiDrag);\n on(document, 'touchend', this._deselectMultiDrag);\n }\n\n on(document, 'keydown', this._checkKeyDown);\n on(document, 'keyup', this._checkKeyUp);\n this.defaults = {\n selectedClass: 'sortable-selected',\n multiDragKey: null,\n setData: function setData(dataTransfer, dragEl) {\n var data = '';\n\n if (multiDragElements.length && multiDragSortable === sortable) {\n multiDragElements.forEach(function (multiDragElement, i) {\n data += (!i ? '' : ', ') + multiDragElement.textContent;\n });\n } else {\n data = dragEl.textContent;\n }\n\n dataTransfer.setData('Text', data);\n }\n };\n }\n\n MultiDrag.prototype = {\n multiDragKeyDown: false,\n isMultiDrag: false,\n delayStartGlobal: function delayStartGlobal(_ref) {\n var dragged = _ref.dragEl;\n dragEl$1 = dragged;\n },\n delayEnded: function delayEnded() {\n this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n },\n setupClone: function setupClone(_ref2) {\n var sortable = _ref2.sortable,\n cancel = _ref2.cancel;\n if (!this.isMultiDrag) return;\n\n for (var i = 0; i < multiDragElements.length; i++) {\n multiDragClones.push(clone(multiDragElements[i]));\n multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n multiDragClones[i].draggable = false;\n multiDragClones[i].style['will-change'] = '';\n toggleClass(multiDragClones[i], this.options.selectedClass, false);\n multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n }\n\n sortable._hideClone();\n\n cancel();\n },\n clone: function clone(_ref3) {\n var sortable = _ref3.sortable,\n rootEl = _ref3.rootEl,\n dispatchSortableEvent = _ref3.dispatchSortableEvent,\n cancel = _ref3.cancel;\n if (!this.isMultiDrag) return;\n\n if (!this.options.removeCloneOnHide) {\n if (multiDragElements.length && multiDragSortable === sortable) {\n insertMultiDragClones(true, rootEl);\n dispatchSortableEvent('clone');\n cancel();\n }\n }\n },\n showClone: function showClone(_ref4) {\n var cloneNowShown = _ref4.cloneNowShown,\n rootEl = _ref4.rootEl,\n cancel = _ref4.cancel;\n if (!this.isMultiDrag) return;\n insertMultiDragClones(false, rootEl);\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', '');\n });\n cloneNowShown();\n clonesHidden = false;\n cancel();\n },\n hideClone: function hideClone(_ref5) {\n var _this = this;\n\n var sortable = _ref5.sortable,\n cloneNowHidden = _ref5.cloneNowHidden,\n cancel = _ref5.cancel;\n if (!this.isMultiDrag) return;\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', 'none');\n\n if (_this.options.removeCloneOnHide && clone.parentNode) {\n clone.parentNode.removeChild(clone);\n }\n });\n cloneNowHidden();\n clonesHidden = true;\n cancel();\n },\n dragStartGlobal: function dragStartGlobal(_ref6) {\n var sortable = _ref6.sortable;\n\n if (!this.isMultiDrag && multiDragSortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n }\n\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.sortableIndex = index(multiDragElement);\n }); // Sort multi-drag elements\n\n multiDragElements = multiDragElements.sort(function (a, b) {\n return a.sortableIndex - b.sortableIndex;\n });\n dragStarted = true;\n },\n dragStarted: function dragStarted(_ref7) {\n var _this2 = this;\n\n var sortable = _ref7.sortable;\n if (!this.isMultiDrag) return;\n\n if (this.options.sort) {\n // Capture rects,\n // hide multi drag elements (by positioning them absolute),\n // set multi drag elements rects to dragRect,\n // show multi drag elements,\n // animate to rects,\n // unset rects & remove from DOM\n sortable.captureAnimationState();\n\n if (this.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n css(multiDragElement, 'position', 'absolute');\n });\n var dragRect = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRect);\n });\n folding = true;\n initialFolding = true;\n }\n }\n\n sortable.animateAll(function () {\n folding = false;\n initialFolding = false;\n\n if (_this2.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n } // Remove all auxiliary multidrag items from el, if sorting enabled\n\n\n if (_this2.options.sort) {\n removeMultiDragElements();\n }\n });\n },\n dragOver: function dragOver(_ref8) {\n var target = _ref8.target,\n completed = _ref8.completed,\n cancel = _ref8.cancel;\n\n if (folding && ~multiDragElements.indexOf(target)) {\n completed(false);\n cancel();\n }\n },\n revert: function revert(_ref9) {\n var fromSortable = _ref9.fromSortable,\n rootEl = _ref9.rootEl,\n sortable = _ref9.sortable,\n dragRect = _ref9.dragRect;\n\n if (multiDragElements.length > 1) {\n // Setup unfold animation\n multiDragElements.forEach(function (multiDragElement) {\n sortable.addAnimationState({\n target: multiDragElement,\n rect: folding ? getRect(multiDragElement) : dragRect\n });\n unsetRect(multiDragElement);\n multiDragElement.fromRect = dragRect;\n fromSortable.removeAnimationState(multiDragElement);\n });\n folding = false;\n insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref10) {\n var sortable = _ref10.sortable,\n isOwner = _ref10.isOwner,\n insertion = _ref10.insertion,\n activeSortable = _ref10.activeSortable,\n parentEl = _ref10.parentEl,\n putSortable = _ref10.putSortable;\n var options = this.options;\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n }\n\n initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location\n\n if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n\n parentEl.appendChild(multiDragElement);\n });\n folding = true;\n } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n\n\n if (!isOwner) {\n // Only remove if not folding (folding will remove them anyways)\n if (!folding) {\n removeMultiDragElements();\n }\n\n if (multiDragElements.length > 1) {\n var clonesHiddenBefore = clonesHidden;\n\n activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden\n\n\n if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n multiDragClones.forEach(function (clone) {\n activeSortable.addAnimationState({\n target: clone,\n rect: clonesFromRect\n });\n clone.fromRect = clonesFromRect;\n clone.thisAnimationDuration = null;\n });\n }\n } else {\n activeSortable._showClone(sortable);\n }\n }\n }\n },\n dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n var dragRect = _ref11.dragRect,\n isOwner = _ref11.isOwner,\n activeSortable = _ref11.activeSortable;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n });\n\n if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n clonesFromRect = _extends({}, dragRect);\n var dragMatrix = matrix(dragEl$1, true);\n clonesFromRect.top -= dragMatrix.f;\n clonesFromRect.left -= dragMatrix.e;\n }\n },\n dragOverAnimationComplete: function dragOverAnimationComplete() {\n if (folding) {\n folding = false;\n removeMultiDragElements();\n }\n },\n drop: function drop(_ref12) {\n var evt = _ref12.originalEvent,\n rootEl = _ref12.rootEl,\n parentEl = _ref12.parentEl,\n sortable = _ref12.sortable,\n dispatchSortableEvent = _ref12.dispatchSortableEvent,\n oldIndex = _ref12.oldIndex,\n putSortable = _ref12.putSortable;\n var toSortable = putSortable || this.sortable;\n if (!evt) return;\n var options = this.options,\n children = parentEl.children; // Multi-drag selection\n\n if (!dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) {\n this._deselectMultiDrag();\n }\n\n toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n\n if (!~multiDragElements.indexOf(dragEl$1)) {\n multiDragElements.push(dragEl$1);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: dragEl$1,\n originalEvt: evt\n }); // Modifier activated, select from last to dragEl\n\n if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n var lastIndex = index(lastMultiDragSelect),\n currentIndex = index(dragEl$1);\n\n if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n // (but previous selection existed)\n var n, i;\n\n if (currentIndex > lastIndex) {\n i = lastIndex;\n n = currentIndex;\n } else {\n i = currentIndex;\n n = lastIndex + 1;\n }\n\n for (; i < n; i++) {\n if (~multiDragElements.indexOf(children[i])) continue;\n toggleClass(children[i], options.selectedClass, true);\n multiDragElements.push(children[i]);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: children[i],\n originalEvt: evt\n });\n }\n }\n } else {\n lastMultiDragSelect = dragEl$1;\n }\n\n multiDragSortable = toSortable;\n } else {\n multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n lastMultiDragSelect = null;\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'deselect',\n targetEl: dragEl$1,\n originalEvt: evt\n });\n }\n } // Multi-drag drop\n\n\n if (dragStarted && this.isMultiDrag) {\n folding = false; // Do not \"unfold\" after around dragEl if reverted\n\n if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n var dragRect = getRect(dragEl$1),\n multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n toSortable.captureAnimationState();\n\n if (!initialFolding) {\n if (options.animation) {\n dragEl$1.fromRect = dragRect;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n\n if (multiDragElement !== dragEl$1) {\n var rect = folding ? getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect; // Prepare unfold animation\n\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\n });\n }\n });\n } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n // properly they must all be removed\n\n\n removeMultiDragElements();\n multiDragElements.forEach(function (multiDragElement) {\n if (children[multiDragIndex]) {\n parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n } else {\n parentEl.appendChild(multiDragElement);\n }\n\n multiDragIndex++;\n }); // If initial folding is done, the elements may have changed position because they are now\n // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n // must be fired here as Sortable will not.\n\n if (oldIndex === index(dragEl$1)) {\n var update = false;\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n update = true;\n return;\n }\n });\n\n if (update) {\n dispatchSortableEvent('update');\n }\n }\n } // Must be done after capturing individual rects (scroll bar)\n\n\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n\n multiDragSortable = toSortable;\n } // Remove clones if necessary\n\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n multiDragClones.forEach(function (clone) {\n clone.parentNode && clone.parentNode.removeChild(clone);\n });\n }\n },\n nullingGlobal: function nullingGlobal() {\n this.isMultiDrag = dragStarted = false;\n multiDragClones.length = 0;\n },\n destroyGlobal: function destroyGlobal() {\n this._deselectMultiDrag();\n\n off(document, 'pointerup', this._deselectMultiDrag);\n off(document, 'mouseup', this._deselectMultiDrag);\n off(document, 'touchend', this._deselectMultiDrag);\n off(document, 'keydown', this._checkKeyDown);\n off(document, 'keyup', this._checkKeyUp);\n },\n _deselectMultiDrag: function _deselectMultiDrag(evt) {\n if (typeof dragStarted !== \"undefined\" && dragStarted) return; // Only deselect if selection is in this sortable\n\n if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable\n\n if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click\n\n if (evt && evt.button !== 0) return;\n\n while (multiDragElements.length) {\n var el = multiDragElements[0];\n toggleClass(el, this.options.selectedClass, false);\n multiDragElements.shift();\n dispatchEvent({\n sortable: this.sortable,\n rootEl: this.sortable.el,\n name: 'deselect',\n targetEl: el,\n originalEvt: evt\n });\n }\n },\n _checkKeyDown: function _checkKeyDown(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = true;\n }\n },\n _checkKeyUp: function _checkKeyUp(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = false;\n }\n }\n };\n return _extends(MultiDrag, {\n // Static methods & properties\n pluginName: 'multiDrag',\n utils: {\n /**\n * Selects the provided multi-drag item\n * @param {HTMLElement} el The element to be selected\n */\n select: function select(el) {\n var sortable = el.parentNode[expando];\n if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n\n if (multiDragSortable && multiDragSortable !== sortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n\n multiDragSortable = sortable;\n }\n\n toggleClass(el, sortable.options.selectedClass, true);\n multiDragElements.push(el);\n },\n\n /**\n * Deselects the provided multi-drag item\n * @param {HTMLElement} el The element to be deselected\n */\n deselect: function deselect(el) {\n var sortable = el.parentNode[expando],\n index = multiDragElements.indexOf(el);\n if (!sortable || !sortable.options.multiDrag || !~index) return;\n toggleClass(el, sortable.options.selectedClass, false);\n multiDragElements.splice(index, 1);\n }\n },\n eventProperties: function eventProperties() {\n var _this3 = this;\n\n var oldIndicies = [],\n newIndicies = [];\n multiDragElements.forEach(function (multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n }); // multiDragElements will already be sorted if folding\n\n var newIndex;\n\n if (folding && multiDragElement !== dragEl$1) {\n newIndex = -1;\n } else if (folding) {\n newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n } else {\n newIndex = index(multiDragElement);\n }\n\n newIndicies.push({\n multiDragElement: multiDragElement,\n index: newIndex\n });\n });\n return {\n items: _toConsumableArray(multiDragElements),\n clones: [].concat(multiDragClones),\n oldIndicies: oldIndicies,\n newIndicies: newIndicies\n };\n },\n optionListeners: {\n multiDragKey: function multiDragKey(key) {\n key = key.toLowerCase();\n\n if (key === 'ctrl') {\n key = 'Control';\n } else if (key.length > 1) {\n key = key.charAt(0).toUpperCase() + key.substr(1);\n }\n\n return key;\n }\n }\n });\n}\n\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n multiDragElements.forEach(function (multiDragElement, i) {\n var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(multiDragElement, target);\n } else {\n rootEl.appendChild(multiDragElement);\n }\n });\n}\n/**\n * Insert multi-drag clones\n * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted\n * @param {HTMLElement} rootEl\n */\n\n\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n multiDragClones.forEach(function (clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(clone, target);\n } else {\n rootEl.appendChild(clone);\n }\n });\n}\n\nfunction removeMultiDragElements() {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Sortable);\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9u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9wdGlvbnMuYW5pbWF0aW9uO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIF90aGlzLmFuaW1hdGUodGFyZ2V0LCBhbmltYXRpbmdSZWN0LCB0b1JlY3QsIHRpbWUpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRpbWUpIHtcbiAgICAgICAgICBhbmltYXRpbmcgPSB0cnVlO1xuICAgICAgICAgIGFuaW1hdGlvblRpbWUgPSBNYXRoLm1heChhbmltYXRpb25UaW1lLCB0aW1lKTtcbiAgICAgICAgICBjbGVhclRpbWVvdXQodGFyZ2V0LmFuaW1hdGlvblJlc2V0VGltZXIpO1xuICAgICAgICAgIHRhcmdldC5hbmltYXRpb25SZXNldFRpbWVyID0gc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB0YXJnZXQuYW5pbWF0aW9uVGltZSA9IDA7XG4gICAgICAgICAgICB0YXJnZXQucHJldkZyb21SZWN0ID0gbnVsbDtcbiAgICAgICAgICAgIHRhcmdldC5mcm9tUmVjdCA9IG51bGw7XG4gICAgICAgICAgICB0YXJnZXQucHJldlRvUmVjdCA9IG51bGw7XG4gICAgICAgICAgICB0YXJnZXQudGhpc0FuaW1hdGlvbkR1cmF0aW9uID0gbnVsbDtcbiAgICAgICAgICB9LCB0aW1lKTtcbiAgICAgICAgICB0YXJnZXQudGhpc0FuaW1hdGlvbkR1cmF0aW9uID0gdGltZTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBjbGVhclRpbWVvdXQoYW5pbWF0aW9uQ2FsbGJhY2tJZCk7XG5cbiAgICAgIGlmICghYW5pbWF0aW5nKSB7XG4gICAgICAgIGlmICh0eXBlb2YgY2FsbGJhY2sgPT09ICdmdW5jdGlvbicpIGNhbGxiYWNrKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBhbmltYXRpb25DYWxsYmFja0lkID0gc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgaWYgKHR5cGVvZ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5FdmVudCgnZmlsdGVyJywgX3RoaXMsIHtcbiAgICAgICAgICBldnQ6IGV2dFxuICAgICAgICB9KTtcbiAgICAgICAgcHJldmVudE9uRmlsdGVyICYmIGV2dC5jYW5jZWxhYmxlICYmIGV2dC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICByZXR1cm47IC8vIGNhbmNlbCBkbmRcbiAgICAgIH1cbiAgICB9IGVsc2UgaWYgKGZpbHRlcikge1xuICAgICAgZmlsdGVyID0gZmlsdGVyLnNwbGl0KCcsJykuc29tZShmdW5jdGlvbiAoY3JpdGVyaWEpIHtcbiAgICAgICAgY3JpdGVyaWEgPSBjbG9zZXN0KG9yaWdpbmFsVGFyZ2V0LCBjcml0ZXJpYS50cmltKCksIGVsLCBmYWxzZSk7XG5cbiAgICAgICAgaWYgKGNyaXRlcmlhKSB7XG4gICAgICAgICAgX2Rpc3BhdGNoRXZlbnQoe1xuICAgICAgICAgICAgc29ydGFibGU6IF90aGlzLFxuICAgICAgICAgICAgcm9vdEVsOiBjcml0ZXJpYSxcbiAgICAgICAgICAgIG5hbWU6ICdmaWx0ZXInLFxuICAgICAgICAgICAgdGFyZ2V0RWw6IHRhcmdldCxcbiAgICAgICAgICAgIGZyb21FbDogZWwsXG4gICAgICAgICAgICB0b0VsOiBlbFxuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgcGx1Z2luRXZlbnQoJ2ZpbHRlcicsIF90aGlzLCB7XG4gICAgICAgICAgICBldnQ6IGV2dFxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICB9KTtcblxuICAgICAgaWYgKGZpbHRlcikge1xuICAgICAgICBwcmV2ZW50T25GaWx0ZXIgJiYgZXZ0LmNhbmNlbGFibGUgJiYgZXZ0LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIHJldHVybjsgLy8gY2FuY2VsIGRuZFxuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChvcHRpb25zL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SB7XG4gICAgICAgIGlmIChnaG9zdE1hdHJpeCkge1xuICAgICAgICAgIGdob3N0TWF0cml4LmUgKz0gZHggLSAobGFzdER4IHx8IDApO1xuICAgICAgICAgIGdob3N0TWF0cml4LmYgKz0gZHkgLSAobGFzdER5IHx8IDApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGdob3N0TWF0cml4ID0ge1xuICAgICAgICAgICAgYTogMSxcbiAgICAgICAgICAgIGI6IDAsXG4gICAgICAgICAgICBjOiAwLFxuICAgICAgICAgICAgZDogMSxcbiAgICAgICAgICAgIGU6IGR4LFxuICAgICAgICAgICAgZjogZHlcbiAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGNzc01hdHJpeCA9IFwibWF0cml4KFwiLmNvbmNhdChnaG9zdE1hdHJpeC5hLCBcIixcIikuY29uY2F0KGdob3N0TWF0cml4LmIsIFwiLFwiKS5jb25jYXQoZ2hvc3RNYXRyaXguYywgXCIsXCIpLmNvbmNhdChnaG9zdE1hdHJpeC5kLCBcIixcIikuY29uY2F0KGdob3N0TWF0cml4LmUsIFwiLFwiKS5jb25jYXQoZ2hvc3RNYXRyaXguZiwgXCIpXCIpO1xuICAgICAgICBjc3MoZ2hvc3RFbCwgJ3dlYmtpdFRyYW5zZm9ybScsIGNzc01hdHJpeCk7XG4gICAgICAgIGNzcyhnaG9zdEVsLCAnbW96VHJhbnNmb3JtJywgY3NzTWF0cml4KTtcbiAgICAgICAgY3NzKGdob3N0RWwsICdtc1RyYW5zZm9ybScsIGNzc01hdHJpeCk7XG4gICAgICAgIGNzcyhnaG9zdEVsLCAndHJhbnNmb3JtJywgY3NzTWF0cml4KTtcbiAgICAgICAgbGFzdER4ID0gZHg7XG4gICAgICAgIGxhc3REeSA9IGR5O1xuICAgICAgICB0b3VjaEV2dCA9IHRvdWNoO1xuICAgICAgfVxuXG4gICAgICBldnQuY2FuY2VsYWJsZSAmJiBldnQucHJldmVudERlZmF1bHQoKTtcbiA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bnRcbiAgICAgICAgICAgIF9kaXNwYXRjaEV2ZW50KHtcbiAgICAgICAgICAgICAgcm9vdEVsOiBwYXJlbnRFbCxcbiAgICAgICAgICAgICAgbmFtZTogJ2FkZCcsXG4gICAgICAgICAgICAgIHRvRWw6IHBhcmVudEVsLFxuICAgICAgICAgICAgICBmcm9tRWw6IHJvb3RFbCxcbiAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZXZ0XG4gICAgICAgICAgICB9KTsgLy8gUmVtb3ZlIGV2ZW50XG5cblxuICAgICAgICAgICAgX2Rpc3BhdGNoRXZlbnQoe1xuICAgICAgICAgICAgICBzb3J0YWJsZTogdGhpcyxcbiAgICAgICAgICAgICAgbmFtZTogJ3JlbW92ZScsXG4gICAgICAgICAgICAgIHRvRWw6IHBhcmVudEVsLFxuICAgICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBldnRcbiAgICAgICAgICAgIH0pOyAvLyBkcmFnIGZyb20gb25lIGxpc3QgYW5kIGRyb3AgaW50byBhbm90aGVyXG5cblxuICAgICAgICAgICAgX2Rpc3BhdGNoRXZlbnQoe1xuICAgICAgICAgICAgICByb290RWw6IHBhcmVudEVsLFxuICAgICAgICAgICAgICBuYW1lOiAnc29ydCcsXG4gICAgICAgICAgICAgIHRvRWw6IHBhcmVudEVsLFxuICAgICAgICAgICAgICBmcm9tRWw6IHJvb3RFbCxcbiAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZXZ0XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgX2Rpc3BhdGNoRXZlbnQoe1xuICAgICAgICAgICAgICBzb3J0YWJsZTogdGhpcyxcbiAgICAgICAgICAgICAgbmFtZTogJ3NvcnQnLFxuICAgICAgICAgICAgICB0b0VsOiBwYXJlbnRFbCxcbiAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZXZ0XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBwdXRTb3J0YWJsZSAmJiBwdXRTb3J0YWJsZS5zYXZlKCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKG5ld0luZGV4ICE9PSBvbGRJbmRleCkge1xuICAgICAgICAgICAgaWYgKG5ld0luZGV4ID49IDApIHtcbiAgICAgICAgICAgICAgLy8gZHJhZyAmIGRyb3Agd2l0aGluIHRoZSBzYW1lIGxpc3RcbiAgICAgICAgICAgICAgX2Rpc3BhdGNoRXZlbnQoe1xuICAgICAgICAgICAgICAgIHNvcnRhYmxlOiB0aGlzLFxuICAgICAgICAgICAgICAgIG5hbWU6ICd1cGRhdGUnLFxuICAgICAgICAgICAgICAgIHRvRWw6IHBhcmVudEVsLFxuICAgICAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGV2dFxuICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICBfZGlzcGF0Y2hFdmVudCh7XG4gICAgICAgICAgICAgICAgc29ydGFibGU6IHRoaXMsXG4gICAgICAgICAgICAgICAgbmFtZTogJ3NvcnQnLFxuICAgICAgICAgICAgICAgIHRvRWw6IHBhcmVudEVsLFxuICAgICAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGV2dFxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoU29ydGFibGUuYWN0aXZlKSB7XG4gICAgICAgICAgLyoganNoaW50IGVxbnVsbDp0cnVlICovXG4gICAgICAgICAgaWYgKG5ld0luZGV4ID09IG51bGwgfHwgbmV3SW5kZXggPT09IC0xKSB7XG4gICAgICAgICAgICBuZXdJbmRleCA9IG9sZEluZGV4O1xuICAgICAgICAgICAgbmV3RHJhZ2dhYmxlSW5kZXggPSBvbGREcmFnZ2FibGVJbmRleDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfZGlzcGF0Y2hFdmVudCh7XG4gICAgICAgICAgICBzb3J0YWJsZTogdGhpcyxcbiAgICAgICAgICAgIG5h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EluZGV4ICE9PSBjdXJyZW50SW5kZXgpIHtcbiAgICAgICAgICAgICAgLy8gTXVzdCBpbmNsdWRlIGxhc3RNdWx0aURyYWdTZWxlY3QgKHNlbGVjdCBpdCksIGluIGNhc2UgbW9kaWZpZWQgc2VsZWN0aW9uIGZyb20gbm8gc2VsZWN0aW9uXG4gICAgICAgICAgICAgIC8vIChidXQgcHJldmlvdXMgc2VsZWN0aW9uIGV4aXN0ZWQpXG4gICAgICAgICAgICAgIHZhciBuLCBpO1xuXG4gICAgICAgICAgICAgIGlmIChjdXJyZW50SW5kZXggPiBsYXN0SW5kZXgpIHtcbiAgICAgICAgICAgICAgICBpID0gbGFzdEluZGV4O1xuICAgICAgICAgICAgICAgIG4gPSBjdXJyZW50SW5kZXg7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaSA9IGN1cnJlbnRJbmRleDtcbiAgICAgICAgICAgICAgICBuID0gbGFzdEluZGV4ICsgMTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGZvciAoOyBpIDwgbjsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKH5tdWx0aURyYWdFbGVtZW50cy5pbmRleE9mKGNoaWxkcmVuW2ldKSkgY29udGludWU7XG4gICAgICAgICAgICAgICAgdG9nZ2xlQ2xhc3MoY2hpbGRyZW5baV0sIG9wdGlvbnMuc2VsZWN0ZWRDbGFzcywgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgbXVsdGlEcmFnRWxlbWVudHMucHVzaChjaGlsZHJlbltpXSk7XG4gICAgICAgICAgICAgICAgZGlzcGF0Y2hFdmVudCh7XG4gICAgICAgICAgICAgICAgICBzb3J0YWJsZTogc29ydGFibGUsXG4gICAgICAgICAgICAgICAgICByb290RWw6IHJvb3RFbCxcbiAgICAgICAgICAgICAgICAgIG5hbWU6ICdzZWxlY3QnLFxuICAgICAgICAgICAgICAgICAgdGFyZ2V0RWw6IGNoaWxkcmVuW2ldLFxu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gICAgICAgICAgIHJlY3Q6IHJlY3RcbiAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IC8vIE11bHRpIGRyYWcgZWxlbWVudHMgYXJlIG5vdCBuZWNlc3NhcmlseSByZW1vdmVkIGZyb20gdGhlIERPTSBvbiBkcm9wLCBzbyB0byByZWluc2VydFxuICAgICAgICAgICAgLy8gcHJvcGVybHkgdGhleSBtdXN0IGFsbCBiZSByZW1vdmVkXG5cblxuICAgICAgICAgICAgcmVtb3ZlTXVsdGlEcmFnRWxlbWVudHMoKTtcbiAgICAgICAgICAgIG11bHRpRHJhZ0VsZW1lbnRzLmZvckVhY2goZnVuY3Rpb24gKG11bHRpRHJhZ0VsZW1lbnQpIHtcbiAgICAgICAgICAgICAgaWYgKGNoaWxkcmVuW211bHRpRHJhZ0luZGV4XSkge1xuICAgICAgICAgICAgICAgIHBhcmVudEVsLmluc2VydEJlZm9yZShtdWx0aURyYWdFbGVtZW50LCBjaGlsZHJlblttdWx0aURyYWdJbmRleF0pO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHBhcmVudEVsLmFwcGVuZENoaWxkKG11bHRpRHJhZ0VsZW1lbnQpO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgbXVsdGlEcmFnSW5kZXgrKztcbiAgICAgICAgICAgIH0pOyAvLyBJZiBpbml0aWFsIGZvbGRpbmcgaXMgZG9uZSwgdGhlIGVsZW1lbnRzIG1heSBoYXZlIGNoYW5nZWQgcG9zaXRpb24gYmVjYXVzZSB0aGV5IGFyZSBub3dcbiAgICAgICAgICAgIC8vIHVuZm9sZGluZyBhcm91bmQgZHJhZ0VsLCBldmVuIHRob3VnaCBkcmFnRWwgbWF5IG5vdCBoYXZlIGhpcyBpbmRleCBjaGFuZ2VkLCBzbyB1cGRhdGUgZXZlbnRcbiAgICAgICAgICAgIC8vIG11c3QgYmUgZmlyZWQgaGVyZSBhcyBTb3J0YWJsZSB3aWxsIG5vdC5cblxuICAgICAgICAgICAgaWYgKG9sZEluZGV4ID09PSBpbmRleChkcmFnRWwkMSkpIHtcbiAgICAgICAgICAgICAgdmFyIHVwZGF0ZSA9IGZhbHNlO1xuICAgICAgICAgICAgICBtdWx0aURyYWdFbGVtZW50cy5mb3JFYWNoKGZ1bmN0aW9uIChtdWx0aURyYWdFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgaWYgKG11bHRpRHJhZ0VsZW1lbnQuc29ydGFibGVJbmRleCAhPT0gaW5kZXgobXVsdGlEcmFnRWxlbWVudCkpIHtcbiAgICAgICAgICAgICAgICAgIHVwZGF0ZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICBpZiAodXBkYXRlKSB7XG4gICAgICAgICAgICAgICAgZGlzcGF0Y2hTb3J0YWJsZUV2ZW50KCd1cGRhdGUnKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gLy8gTXVzdCBiZSBkb25lIGFmdGVyIGNhcHR1cmluZyBpbmRpdmlkdWFsIHJlY3RzIChzY3JvbGwgYmFyKVxuXG5cbiAgICAgICAgICBtdWx0aURyYWdFbGVtZW50cy5mb3JFYWNoKGZ1bmN0aW9uIChtdWx0aURyYWdFbGVtZW50KSB7XG4gICAgICAgICAgICB1bnNldFJlY3QobXVsdGlEcmFnRWxlbWVudCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgdG9Tb3J0YWJsZS5hbmltYXRlQWxsKCk7XG4gICAgICAgIH1cblxuICAgICAgICBtdWx0aURyYWdTb3J0YWJsZSA9IHRvU29ydGFibGU7XG4gICAgICB9IC8vIFJlbW92ZSBjbG9uZXMgaWYgbmVjZXNzYXJ5XG5cblxuICAgICAgaWYgKHJvb3RFbCA9PT0gcGFyZW50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gICAgICBvbGRJbmRpY2llcy5wdXNoKHtcbiAgICAgICAgICBtdWx0aURyYWdFbGVtZW50OiBtdWx0aURyYWdFbGVtZW50LFxuICAgICAgICAgIGluZGV4OiBtdWx0aURyYWdFbGVtZW50LnNvcnRhYmxlSW5kZXhcbiAgICAgICAgfSk7IC8vIG11bHRpRHJhZ0VsZW1lbnRzIHdpbGwgYWxyZWFkeSBiZSBzb3J0ZWQgaWYgZm9sZGluZ1xuXG4gICAgICAgIHZhciBuZXdJbmRleDtcblxuICAgICAgICBpZiAoZm9sZGluZyAmJiBtdWx0aURyYWdFbGVtZW50ICE9PSBkcmFnRWwkMSkge1xuICAgICAgICAgIG5ld0luZGV4ID0gLTE7XG4gICAgICAgIH0gZWxzZSBpZiAoZm9sZGluZykge1xuICAgICAgICAgIG5ld0luZGV4ID0gaW5kZXgobXVsdGlEcmFnRWxlbWVudCwgJzpub3QoLicgKyBfdGhpczMub3B0aW9ucy5zZWxlY3RlZENsYXNzICsgJyknKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBuZXdJbmRleCA9IGluZGV4KG11bHRpRHJhZ0VsZW1lbnQpO1xuICAgICAgICB9XG5cbiAgICAgICAgbmV3SW5kaWNpZXMucHVzaCh7XG4gICAgICAgICAgbXVsdGlEcmFnRWxlbWVudDogbXVsdGlEcmFnRWxlbWVudCxcbiAgICAgICAgICBpbmRleDogbmV3SW5kZXhcbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIGl0ZW1zOiBfdG9Db25zdW1hYmxlQXJyYXkobXVsdGlEcmFnRWxlbWVudHMpLFxuICAgICAgICBjbG9uZXM6IFtdLmNvbmNhdChtdWx0aURyYWdDbG9uZXMpLFxuICAgICAgICBvbGRJbmRpY2llczogb2xkSW5kaWNpZXMsXG4gICAgICAgIG5ld0luZGljaWVzOiBuZXdJbmRpY2llc1xuICAgICAgfTtcbiAgICB9LFxuICAgIG9wdGlvbkxpc3Rlb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VsXG4gKi9cblxuXG5mdW5jdGlvbiBpbnNlcnRNdWx0aURyYWdDbG9uZXMoZWxlbWVudHNJbnNlcnRlZCwgcm9vdEVsKSB7XG4gIG11bHRpRHJhZ0Nsb25lcy5mb3JFYWNoKGZ1bmN0aW9uIChjbG9uZSwgaSkge1xuICAgIHZhciB0YXJnZXQgPSByb290RWwuY2hpbGRyZW5bY2xvbmUuc29ydGFibGVJbmRleCArIChlbGVtZW50c0luc2VydGVkID8gTnVtYmVyKGkpIDogMCldO1xuXG4gICAgaWYgKHRhcmdldCkge1xuICAgICAgcm9vdEVsLmluc2VydEJlZm9yZShjbG9uZSwgdGFyZ2V0KTtcbiAgICB9IGVsc2Uge1xuICAgICAgcm9vdEVsLmFwcGVuZENoaWxkKGNsb25lKTtcbiAgICB9XG4gIH0pO1xufVxuXG5mdW5jdGlvbiByZW1vdmVNdWx0aURyYWdFbGVtZW50cygpIHtcbiAgbXVsdGlEcmFnRWxlbWVudHMuZm9yRWFjaChmdW5jdGlvbiAobXVsdGlEcmFnRWxlbWVudCkge1xuICAgIGlmIChtdWx0aURyYWdFbGVtZW50ID09PSBkcmFnRWwkMSkgcmV0dXJuO1xuICAgIG11bHRpRHJhZ0VsZW1lbnQucGFyZW50Tm9kZSAmJiBtdWx0aURyYWdFbGVtZW50LnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQobXVsdGlEcmFnRWxlbWVudCk7XG4gIH0pO1xufVxuXG5Tb3J0YWJsZS5tb3VudChuZXcgQXV0b1Njcm9sbFBsdWdpbigpKTtcblNvcnRhYmxlLm1vdW50KFJlbW92ZSwgUmV2ZXJ0KTtcblxuZXhwb3J0IGRlZmF1bHQgU29ydGFibGU7XG5leHBvcnQgeyBNdWx0aURyYWdQbHVnaW4gYXMgTXVsdGlEcmFnLCBTb3J0YWJsZSwgU3dhcFBsdWdpbiBhcyBTd2FwIH07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/sortablejs/modular/sortable.esm.js\n"); + +/***/ }), + +/***/ "./node_modules/webpack/buildin/global.js": +/*!***********************************!*\ + !*** (webpack)/buildin/global.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8od2VicGFjaykvYnVpbGRpbi9nbG9iYWwuanM/Y2QwMCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxDQUFDOztBQUVEO0FBQ0E7QUFDQTtBQUNBLENBQUM7QUFDRDtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLDRDQUE0Qzs7QUFFNUMiLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvd2VicGFjay9idWlsZGluL2dsb2JhbC5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbInZhciBnO1xuXG4vLyBUaGlzIHdvcmtzIGluIG5vbi1zdHJpY3QgbW9kZVxuZyA9IChmdW5jdGlvbigpIHtcblx0cmV0dXJuIHRoaXM7XG59KSgpO1xuXG50cnkge1xuXHQvLyBUaGlzIHdvcmtzIGlmIGV2YWwgaXMgYWxsb3dlZCAoc2VlIENTUClcblx0ZyA9IGcgfHwgbmV3IEZ1bmN0aW9uKFwicmV0dXJuIHRoaXNcIikoKTtcbn0gY2F0Y2ggKGUpIHtcblx0Ly8gVGhpcyB3b3JrcyBpZiB0aGUgd2luZG93IHJlZmVyZW5jZSBpcyBhdmFpbGFibGVcblx0aWYgKHR5cGVvZiB3aW5kb3cgPT09IFwib2JqZWN0XCIpIGcgPSB3aW5kb3c7XG59XG5cbi8vIGcgY2FuIHN0aWxsIGJlIHVuZGVmaW5lZCwgYnV0IG5vdGhpbmcgdG8gZG8gYWJvdXQgaXQuLi5cbi8vIFdlIHJldHVybiB1bmRlZmluZWQsIGluc3RlYWQgb2Ygbm90aGluZyBoZXJlLCBzbyBpdCdzXG4vLyBlYXNpZXIgdG8gaGFuZGxlIHRoaXMgY2FzZS4gaWYoIWdsb2JhbCkgeyAuLi59XG5cbm1vZHVsZS5leHBvcnRzID0gZztcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/webpack/buildin/global.js\n"); + +/***/ }), + +/***/ "./package.json": +/*!**********************!*\ + !*** ./package.json ***! + \**********************/ +/*! exports provided: name, description, version, date, leafletExtName, leafletExtVersion, olExtName, olExtVersion, itownsExtName, itownsExtVersion, main, types, module, directories, scripts, repository, author, keywords, license, bugs, homepage, dependencies, devDependencies, default */ +/***/ (function(module) { + +eval("module.exports = JSON.parse(\"{\\\"name\\\":\\\"geoportal-extensions\\\",\\\"description\\\":\\\"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries\\\",\\\"version\\\":\\\"2.8.6\\\",\\\"date\\\":\\\"30/08/2023\\\",\\\"leafletExtName\\\":\\\"French Geoportal Extension for Leaflet\\\",\\\"leafletExtVersion\\\":\\\"2.3.4\\\",\\\"olExtName\\\":\\\"French Geoportal Extension for OpenLayers\\\",\\\"olExtVersion\\\":\\\"3.3.4\\\",\\\"itownsExtName\\\":\\\"French Geoportal Extension for Itowns\\\",\\\"itownsExtVersion\\\":\\\"2.4.3\\\",\\\"main\\\":\\\"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js\\\",\\\"types\\\":\\\"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts\\\",\\\"module\\\":\\\"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js\\\",\\\"directories\\\":{},\\\"scripts\\\":{\\\"setup\\\":\\\"npm install\\\",\\\"clean\\\":\\\"echo \\\\\\\"Warning: target not yet implemented!\\\\\\\" && exit 0\\\",\\\"eslint\\\":\\\"eslint src/\\\",\\\"test\\\":\\\"npm run test:serve\\\",\\\"test:serve\\\":\\\"cd test && webpack-dev-server --hot --config webpack.test.serve.js\\\",\\\"sample\\\":\\\"npm run sample:serve\\\",\\\"sample:serve\\\":\\\"npm run sample:ol:serve\\\",\\\"sample:itowns:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path '/dist/itowns/' --port 9001 --open\\\",\\\"sample:leaflet:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path '/dist/leaflet/' --port 9001 --open\\\",\\\"sample:ol:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path '/dist/openlayers/' --port 9001 --open\\\",\\\"generate-types:ol\\\":\\\"npx tsc -p build/types/tsconfig-openlayers.json\\\",\\\"generate-types:leaflet\\\":\\\"npx tsc -p build/types/tsconfig-leaflet.json\\\",\\\"generate-types:itowns\\\":\\\"npx tsc -p build/types/tsconfig-itowns.json\\\",\\\"generate-jsdoc:ol\\\":\\\"jsdoc -c build/jsdoc/jsdoc-openlayers.json\\\",\\\"generate-jsdoc:leaflet\\\":\\\"jsdoc -c build/jsdoc/jsdoc-leaflet.json\\\",\\\"generate-jsdoc:itowns\\\":\\\"jsdoc -c build/jsdoc/jsdoc-itowns.json\\\",\\\"doc\\\":\\\"npm run doc:serve\\\",\\\"doc:serve\\\":\\\"npm run doc:ol:serve\\\",\\\"doc:itowns:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open\\\",\\\"doc:leaflet:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open\\\",\\\"doc:ol:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open\\\",\\\"build:dev\\\":\\\"npm-run-all --print-label --print-name build:*:dev\\\",\\\"build:prod\\\":\\\"npm-run-all --print-label --print-name build:*:prod\\\",\\\"build:src\\\":\\\"npm-run-all --print-label --print-name build:*:src\\\",\\\"build\\\":\\\"npm-run-all --print-label --print-name build:*:*\\\",\\\"build:itowns\\\":\\\"npm-run-all --print-label --print-name build:itowns:*\\\",\\\"build:itowns:dev\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=development\\\",\\\"build:itowns:prod\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=production\\\",\\\"build:itowns:src\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=none\\\",\\\"build:ol\\\":\\\"npm-run-all --print-label --print-name build:ol:*\\\",\\\"build:ol:dev\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=development\\\",\\\"build:ol:prod\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=production\\\",\\\"build:ol:src\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=none\\\",\\\"build:leaflet\\\":\\\"npm-run-all --print-label --print-name build:leaflet:*\\\",\\\"build:leaflet:dev\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=development\\\",\\\"build:leaflet:prod\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=production\\\",\\\"build:leaflet:src\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=none\\\"},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"https://github.com/IGNF/geoportal-extensions.git\\\"},\\\"author\\\":\\\"IGNF\\\",\\\"keywords\\\":[\\\"geoportail\\\",\\\"javascript\\\",\\\"OpenLayers\\\",\\\"Leaflet\\\",\\\"Itowns\\\",\\\"3D\\\"],\\\"license\\\":\\\"CECILL-B\\\",\\\"bugs\\\":{\\\"url\\\":\\\"https://github.com/IGNF/geoportal-extensions/issues\\\"},\\\"homepage\\\":\\\"https://github.com/IGNF/geoportal-extensions#readme\\\",\\\"dependencies\\\":{\\\"@mapbox/mapbox-gl-style-spec\\\":\\\"13.20.1\\\",\\\"eventbusjs\\\":\\\"0.2.0\\\",\\\"geoportal-access-lib\\\":\\\"3.3.4\\\",\\\"itowns\\\":\\\"2.38.2\\\",\\\"leaflet\\\":\\\"1.7.1\\\",\\\"leaflet-draw\\\":\\\"1.0.4\\\",\\\"loglevel\\\":\\\"^1.6.7\\\",\\\"markdown-toc\\\":\\\"^1.2.0\\\",\\\"ol\\\":\\\"6.9.0\\\",\\\"ol-mapbox-style\\\":\\\"6.7.0\\\",\\\"proj4\\\":\\\"2.7.5\\\",\\\"proj4leaflet\\\":\\\"1.0.2\\\",\\\"sortablejs\\\":\\\"1.14.0\\\",\\\"three\\\":\\\"0.137.5\\\",\\\"typescript\\\":\\\"^4.5.5\\\",\\\"whatwg-fetch\\\":\\\"3.0.0\\\"},\\\"devDependencies\\\":{\\\"@babel/core\\\":\\\"^7.4.4\\\",\\\"@babel/plugin-transform-template-literals\\\":\\\"^7.7.4\\\",\\\"@babel/preset-env\\\":\\\"^7.4.4\\\",\\\"babel-loader\\\":\\\"^8.0.5\\\",\\\"chai\\\":\\\"^4.2.0\\\",\\\"chalk\\\":\\\"^4.0.0\\\",\\\"clean-webpack-plugin\\\":\\\"^3.0.0\\\",\\\"copy-webpack-plugin\\\":\\\"^5.0.3\\\",\\\"core-js\\\":\\\"^3.6.4\\\",\\\"css-loader\\\":\\\"^3.4.2\\\",\\\"eslint\\\":\\\"^6.8.0\\\",\\\"eslint-config-standard\\\":\\\"^14.1.1\\\",\\\"eslint-loader\\\":\\\"^4.0.0\\\",\\\"eslint-plugin-import\\\":\\\"^2.17.2\\\",\\\"eslint-plugin-node\\\":\\\"^11.1.0\\\",\\\"eslint-plugin-promise\\\":\\\"^4.1.1\\\",\\\"eslint-plugin-standard\\\":\\\"^4.0.0\\\",\\\"exports-loader\\\":\\\"^0.7.0\\\",\\\"expose-loader\\\":\\\"^0.7.5\\\",\\\"fs-extra\\\":\\\"^9.0.0\\\",\\\"handlebars\\\":\\\"^4.7.5\\\",\\\"handlebars-layouts\\\":\\\"^3.1.4\\\",\\\"html-webpack-plugin\\\":\\\"^4.0.4\\\",\\\"jsdoc-webpack-plugin\\\":\\\"^0.3.0\\\",\\\"mini-css-extract-plugin\\\":\\\"^0.9.0\\\",\\\"mocha\\\":\\\"^7.1.1\\\",\\\"mocha-loader\\\":\\\"^5.0.0\\\",\\\"npm-run-all\\\":\\\"^4.1.5\\\",\\\"optimize-css-assets-webpack-plugin\\\":\\\"^5.0.1\\\",\\\"path\\\":\\\"^0.12.7\\\",\\\"replace-bundle-webpack-plugin\\\":\\\"^1.0.0\\\",\\\"requirejs\\\":\\\"^2.3.6\\\",\\\"responsive-loader\\\":\\\"^1.2.0\\\",\\\"speed-measure-webpack-plugin\\\":\\\"^1.3.0\\\",\\\"string-template\\\":\\\"^1.0.0\\\",\\\"style-loader\\\":\\\"^1.1.3\\\",\\\"terser-webpack-plugin\\\":\\\"^2.0.0\\\",\\\"url-loader\\\":\\\"^4.0.0\\\",\\\"webpack\\\":\\\"^4.30.0\\\",\\\"webpack-cli\\\":\\\"^3.3.1\\\",\\\"webpack-dev-server\\\":\\\"^3.3.1\\\",\\\"webpack-node-externals\\\":\\\"^1.7.2\\\"}}\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiIuL3BhY2thZ2UuanNvbi5qcyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./package.json\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPboostRelief.css": +/*!******************************************!*\ + !*** ./src/Common/CSS/GPboostRelief.css ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQYm9vc3RSZWxpZWYuY3NzPzFmMzIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvQ29tbW9uL0NTUy9HUGJvb3N0UmVsaWVmLmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPboostRelief.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPbuildings.css": +/*!****************************************!*\ + !*** ./src/Common/CSS/GPbuildings.css ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQYnVpbGRpbmdzLmNzcz81YTY3Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIiwiZmlsZSI6Ii4vc3JjL0NvbW1vbi9DU1MvR1BidWlsZGluZ3MuY3NzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPbuildings.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPdrawing.css": +/*!**************************************!*\ + !*** ./src/Common/CSS/GPdrawing.css ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQZHJhd2luZy5jc3M/MmI2NCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiIuL3NyYy9Db21tb24vQ1NTL0dQZHJhd2luZy5jc3MuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPdrawing.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPelevationPath.css": +/*!********************************************!*\ + !*** ./src/Common/CSS/GPelevationPath.css ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQZWxldmF0aW9uUGF0aC5jc3M/NTAxYSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiIuL3NyYy9Db21tb24vQ1NTL0dQZWxldmF0aW9uUGF0aC5jc3MuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPelevationPath.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPgeneralWidget.css": +/*!********************************************!*\ + !*** ./src/Common/CSS/GPgeneralWidget.css ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQZ2VuZXJhbFdpZGdldC5jc3M/ZjJkYSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiIuL3NyYy9Db21tb24vQ1NTL0dQZ2VuZXJhbFdpZGdldC5jc3MuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPgeneralWidget.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPgetFeatureInfo.css": +/*!*********************************************!*\ + !*** ./src/Common/CSS/GPgetFeatureInfo.css ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQZ2V0RmVhdHVyZUluZm8uY3NzPzU5NTciXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvQ29tbW9uL0NTUy9HUGdldEZlYXR1cmVJbmZvLmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPgetFeatureInfo.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPisochron.css": +/*!***************************************!*\ + !*** ./src/Common/CSS/GPisochron.css ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQaXNvY2hyb24uY3NzPzI2MjIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvQ29tbW9uL0NTUy9HUGlzb2Nocm9uLmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPisochron.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPlayerSwitcher.css": +/*!********************************************!*\ + !*** ./src/Common/CSS/GPlayerSwitcher.css ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQbGF5ZXJTd2l0Y2hlci5jc3M/MzFlZiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiIuL3NyYy9Db21tb24vQ1NTL0dQbGF5ZXJTd2l0Y2hlci5jc3MuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPlayerSwitcher.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPlocation.css": +/*!***************************************!*\ + !*** ./src/Common/CSS/GPlocation.css ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQbG9jYXRpb24uY3NzPzIzYjciXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvQ29tbW9uL0NTUy9HUGxvY2F0aW9uLmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPlocation.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPmeasureArea.css": +/*!******************************************!*\ + !*** ./src/Common/CSS/GPmeasureArea.css ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQbWVhc3VyZUFyZWEuY3NzP2Q4ZmUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvQ29tbW9uL0NTUy9HUG1lYXN1cmVBcmVhLmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPmeasureArea.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPmeasureAzimuth.css": +/*!*********************************************!*\ + !*** ./src/Common/CSS/GPmeasureAzimuth.css ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQbWVhc3VyZUF6aW11dGguY3NzP2IxMmMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvQ29tbW9uL0NTUy9HUG1lYXN1cmVBemltdXRoLmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPmeasureAzimuth.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPmeasureLength.css": +/*!********************************************!*\ + !*** ./src/Common/CSS/GPmeasureLength.css ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQbWVhc3VyZUxlbmd0aC5jc3M/Njg4NCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiIuL3NyYy9Db21tb24vQ1NTL0dQbWVhc3VyZUxlbmd0aC5jc3MuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPmeasureLength.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPmeasureToolTip.css": +/*!*********************************************!*\ + !*** ./src/Common/CSS/GPmeasureToolTip.css ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQbWVhc3VyZVRvb2xUaXAuY3NzPzMyOTciXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvQ29tbW9uL0NTUy9HUG1lYXN1cmVUb29sVGlwLmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPmeasureToolTip.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPmousePosition.css": +/*!********************************************!*\ + !*** ./src/Common/CSS/GPmousePosition.css ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQbW91c2VQb3NpdGlvbi5jc3M/MjliNiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiIuL3NyYy9Db21tb24vQ1NTL0dQbW91c2VQb3NpdGlvbi5jc3MuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPmousePosition.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPreverseGeocoding.css": +/*!***********************************************!*\ + !*** ./src/Common/CSS/GPreverseGeocoding.css ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQcmV2ZXJzZUdlb2NvZGluZy5jc3M/OTZiOCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiIuL3NyYy9Db21tb24vQ1NTL0dQcmV2ZXJzZUdlb2NvZGluZy5jc3MuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPreverseGeocoding.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GProute.css": +/*!************************************!*\ + !*** ./src/Common/CSS/GProute.css ***! + \************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQcm91dGUuY3NzPzU1MzkiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvQ29tbW9uL0NTUy9HUHJvdXRlLmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/CSS/GProute.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPsearchEngine.css": +/*!*******************************************!*\ + !*** ./src/Common/CSS/GPsearchEngine.css ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQc2VhcmNoRW5naW5lLmNzcz81ZTIxIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIiwiZmlsZSI6Ii4vc3JjL0NvbW1vbi9DU1MvR1BzZWFyY2hFbmdpbmUuY3NzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPsearchEngine.css\n"); + +/***/ }), + +/***/ "./src/Common/CSS/GPwaiting.css": +/*!**************************************!*\ + !*** ./src/Common/CSS/GPwaiting.css ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ1NTL0dQd2FpdGluZy5jc3M/OTMwNiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiIuL3NyYy9Db21tb24vQ1NTL0dQd2FpdGluZy5jc3MuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/CSS/GPwaiting.css\n"); + +/***/ }), + +/***/ "./src/Common/Controls/ElevationPathDOM.js": +/*!*************************************************!*\ + !*** ./src/Common/Controls/ElevationPathDOM.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nvar ElevationPathDOM = {\n /**\n * Add uuid to the tag ID\n * @param {String} id - id selector\n * @returns {String} uid - id selector with an unique id\n */\n _addUID: function _addUID(id) {\n var uid = this._uid ? id + \"-\" + this._uid : id;\n return uid;\n },\n /**\n * Main container (DOM)\n *\n * @returns {DOMElement} DOM element\n */\n _createMainContainerElement: function _createMainContainerElement() {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPelevationPath\");\n container.className = \"GPwidget\";\n return container;\n },\n // ################################################################### //\n // ################# Methods to display Main Panel ################### //\n // ################################################################### //\n\n /**\n * Hidden checkbox for minimizing/maximizing panel\n *\n * @returns {DOMElement} DOM element\n */\n _createShowElevationPathElement: function _createShowElevationPathElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPshowElevationPath\");\n input.type = \"checkbox\";\n return input;\n },\n /**\n * Show control\n * see event !\n *\n * @returns {DOMElement} DOM element\n */\n _createShowElevationPathPictoElement: function _createShowElevationPathPictoElement() {\n // contexte d'execution\n var context = this;\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowElevationPathPicto\");\n label.className = \"GPshowAdvancedToolPicto\";\n label.htmlFor = this._addUID(\"GPshowElevationPath\");\n label.title = \"Calculer un profil\";\n\n // gestionnaire d'evenement :\n // on ouvre le menu de saisie de saisie\n // L'ouverture/Fermeture permet de faire le menage\n // (reinitialisation)\n if (label.addEventListener) {\n label.addEventListener(\"click\", function (e) {\n context.onShowElevationPathClick(e);\n });\n } else if (label.attachEvent) {\n label.attachEvent(\"onclick\", function (e) {\n context.onShowElevationPathClick(e);\n });\n }\n var spanOpen = document.createElement(\"span\");\n spanOpen.id = this._addUID(\"GPshowElevationPathOpen\");\n spanOpen.className = \"GPshowAdvancedToolOpen\";\n label.appendChild(spanOpen);\n return label;\n },\n // ################################################################### //\n // ######################### Methods to Panel ######################## //\n // ################################################################### //\n\n /**\n * Create Container Panel\n *\n * FIXME\n * don't call this._createElevationPathPanelHeaderElement\n * don't call this._createElevationPathPanelProfilElement\n *\n * @returns {DOMElement} DOM element\n */\n _createElevationPathPanelElement: function _createElevationPathPanelElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPelevationPathPanel\");\n div.className = \"GPpanel\";\n\n // div.appendChild(this._createElevationPathPanelHeaderElement());\n // div.appendChild(this._createElevationPathPanelProfilElement());\n\n return div;\n },\n /**\n * Create Header Panel\n *\n * @returns {DOMElement} DOM element\n */\n _createElevationPathPanelHeaderElement: function _createElevationPathPanelHeaderElement() {\n var self = this;\n var container = document.createElement(\"div\");\n container.className = \"GPpanelHeader\";\n var divInfo = document.createElement(\"div\");\n divInfo.id = this._addUID(\"GPelevationPathPanelInfo\");\n divInfo.className = \"GPpanelInfo\";\n divInfo.title = \"Informations\";\n // add event on click\n if (divInfo.addEventListener) {\n divInfo.addEventListener(\"click\", function () {\n self.onOpenElevationPathInfoClick();\n });\n } else if (divInfo.attachEvent) {\n // internet explorer\n divInfo.attachEvent(\"onclick\", function () {\n self.onOpenElevationPathInfoClick();\n });\n }\n container.appendChild(divInfo);\n var divTitle = document.createElement(\"div\");\n divTitle.className = \"GPpanelTitle\";\n divTitle.innerHTML = \"Profil Altimétrique\";\n container.appendChild(divTitle);\n var divReduce = document.createElement(\"div\");\n divReduce.id = this._addUID(\"GPelevationPathPanelReduce\");\n divReduce.className = \"GPpanelReduce\";\n divReduce.title = \"Masquer le panneau\";\n if (divReduce.addEventListener) {\n divReduce.addEventListener(\"click\", function () {\n if (typeof self.onReduceElevationPathPanelClick === \"function\") {\n document.getElementById(self._addUID(\"GPshowElevationPath\")).checked = false;\n self.onReduceElevationPathPanelClick();\n }\n }, false);\n } else if (divReduce.attachEvent) {\n divReduce.attachEvent(\"onclick\", function () {\n if (typeof self.onReduceElevationPathPanelClick === \"function\") {\n document.getElementById(self._addUID(\"GPshowElevationPath\")).checked = false;\n self.onReduceElevationPathPanelClick();\n }\n });\n }\n container.appendChild(divReduce);\n var divClose = document.createElement(\"div\");\n divClose.id = this._addUID(\"GPelevationPathPanelClose\");\n divClose.className = \"GPpanelClose\";\n divClose.title = \"Fermer le panneau\";\n\n // Link panel close / visibility checkbox\n if (divClose.addEventListener) {\n divClose.addEventListener(\"click\", function () {\n document.getElementById(self._addUID(\"GPshowElevationPathPicto\")).click();\n }, false);\n } else if (divClose.attachEvent) {\n divClose.attachEvent(\"onclick\", function () {\n document.getElementById(self._addUID(\"GPshowElevationPathPicto\")).click();\n });\n }\n container.appendChild(divClose);\n return container;\n },\n /**\n * Create Form\n * see evenement !\n *\n * @returns {DOMElement} DOM element\n */\n _createElevationPathPanelProfilElement: function _createElevationPathPanelProfilElement() {\n var div = document.createElement(\"div\");\n div.id = \"GPelevationPathProfil\";\n return div;\n },\n /**\n * Create Waiting Panel\n *\n * @returns {DOMElement} DOM element\n */\n _createElevationPathWaitingElement: function _createElevationPathWaitingElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPelevationPathCalcWaitingContainer\");\n div.className = \"GPelevationPathCalcWaitingContainerHidden\";\n var p = document.createElement(\"p\");\n p.className = \"GPelevationPathCalcWaiting\";\n p.innerHTML = \"Calcul en cours...\";\n div.appendChild(p);\n return div;\n },\n /**\n * Create information Panel\n *\n * @returns {DOMElement} DOM element\n */\n _createElevationPathInformationsElement: function _createElevationPathInformationsElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPelevationPathInformationsContainer\");\n div.className = \"GPelevationPathInformationsContainerHidden\";\n var p = document.createElement(\"p\");\n p.className = \"GPelevationPathInformations\";\n p.innerHTML = \"Aucune information...\";\n div.appendChild(p);\n return div;\n },\n /**\n * Add a information into Panel\n *\n * @param {String} value - value of item\n * @returns {DOMElement} DOM element\n */\n _addElevationPathInformationsItem: function _addElevationPathInformationsItem(value) {\n var div = document.getElementById(this._addUID(\"GPelevationPathInformationsContainer\"));\n if (div) {\n var p = document.createElement(\"p\");\n p.className = \"GPelevationPathInformations\";\n p.innerHTML = value;\n div.appendChild(p);\n }\n return div;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ElevationPathDOM);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ29udHJvbHMvRWxldmF0aW9uUGF0aERPTS5qcz83Zjc4Il0sIm5hbWVzIjpbIkVsZXZhdGlvblBhdGhET00iLCJfYWRkVUlEIiwiaWQiLCJ1aWQiLCJfdWlkIiwiX2NyZWF0ZU1haW5Db250YWluZXJFbGVtZW50IiwiY29udGFpbmVyIiwiZG9jdW1lbnQiLCJjcmVhdGVFbGVtZW50IiwiY2xhc3NOYW1lIiwiX2NyZWF0ZVNob3dFbGV2YXRpb25QYXRoRWxlbWVudCIsImlucHV0IiwidHlwZSIsIl9jcmVhdGVTaG93RWxldmF0aW9uUGF0aFBpY3RvRWxlbWVudCIsImNvbnRleHQiLCJsYWJlbCIsImh0bWxGb3IiLCJ0aXRsZSIsImFkZEV2ZW50TGlzdGVuZXIiLCJlIiwib25TaG93RWxldmF0aW9uUGF0aENsaWNrIiwiYXR0YWNoRXZlbnQiLCJzcGFuT3BlbiIsImFwcGVuZENoaWxkIiwiX2NyZWF0ZUVsZXZhdGlvblBhdGhQYW5lbEVsZW1lbnQiLCJ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mFtZSA9IFwiR1BlbGV2YXRpb25QYXRoSW5mb3JtYXRpb25zXCI7XG4gICAgICAgICAgICBwLmlubmVySFRNTCA9IHZhbHVlO1xuICAgICAgICAgICAgZGl2LmFwcGVuZENoaWxkKHApO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGRpdjtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBFbGV2YXRpb25QYXRoRE9NO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/Controls/ElevationPathDOM.js\n"); + +/***/ }), + +/***/ "./src/Common/Controls/IsoDOM.js": +/*!***************************************!*\ + !*** ./src/Common/Controls/IsoDOM.js ***! + \***************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nvar IsoDOM = {\n /**\n * Add uuid to the tag ID\n * @param {String} id - id selector\n * @returns {String} uid - id selector with an unique id\n */\n _addUID: function _addUID(id) {\n var uid = this._uid ? id + \"-\" + this._uid : id;\n return uid;\n },\n /**\n * Main container (DOM)\n *\n * @returns {DOMElement} DOM element\n */\n _createMainContainerElement: function _createMainContainerElement() {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPisochron\");\n container.className = \"GPwidget\";\n return container;\n },\n // ################################################################### //\n // ################# Methods to display Main Panel ################### //\n // ################################################################### //\n\n /**\n * Hidden checkbox for minimizing/maximizing panel\n *\n * @returns {DOMElement} DOM element\n */\n _createShowIsoElement: function _createShowIsoElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPshowIsochron\");\n input.type = \"checkbox\";\n return input;\n },\n /**\n * Show iso control\n * see event !\n *\n * @returns {DOMElement} DOM element\n */\n _createShowIsoPictoElement: function _createShowIsoPictoElement() {\n // contexte d'execution\n var context = this;\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowIsochronPicto\");\n label.className = \"GPshowAdvancedToolPicto\";\n label.htmlFor = this._addUID(\"GPshowIsochron\");\n label.title = \"Calculer une isochrone\";\n\n // gestionnaire d'evenement :\n // on ouvre le menu de saisie du calcul d'isochrone\n // L'ouverture/Fermeture permet de faire le menage\n // (reinitialisation)\n if (label.addEventListener) {\n label.addEventListener(\"click\", function (e) {\n context.onShowIsoPanelClick(e);\n });\n } else if (label.attachEvent) {\n label.attachEvent(\"onclick\", function (e) {\n context.onShowIsoPanelClick(e);\n });\n }\n var spanOpen = document.createElement(\"span\");\n spanOpen.id = this._addUID(\"GPshowIsochronOpen\");\n spanOpen.className = \"GPshowAdvancedToolOpen\";\n label.appendChild(spanOpen);\n return label;\n },\n // ################################################################### //\n // ################## Methods to display Inputs Panel ################ //\n // ################################################################### //\n\n /**\n * Create Container Panel\n *\n * FIXME\n * don't call this._createIsoPanelHeaderElement\n * don't call this._createIsoPanelFormElement\n *\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelElement: function _createIsoPanelElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPisochronPanel\");\n div.className = \"GPpanel\";\n\n // div.appendChild(this._createIsoPanelHeaderElement());\n // div.appendChild(this._createIsoPanelFormElement());\n\n return div;\n },\n /**\n * Create Header Panel\n *\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelHeaderElement: function _createIsoPanelHeaderElement() {\n var self = this;\n var container = document.createElement(\"div\");\n container.className = \"GPpanelHeader\";\n var div = document.createElement(\"div\");\n div.className = \"GPpanelTitle\";\n div.innerHTML = \"Calcul d'isochrone\";\n container.appendChild(div);\n\n // on desactive l'impl. reduction de la fenetre\n // var divReduce = document.createElement(\"div\");\n // divReduce.id = this._addUID(\"GPisochronPanelReduce\");\n // divReduce.className = \"GPpanelReduce\";\n // divReduce.title = \"Masquer le panneau\";\n //\n // if (divReduce.addEventListener) {\n // divReduce.addEventListener(\"click\", function () {\n // if ( typeof self.onReduceIsoPanelClick === \"function\") {\n // document.getElementById(self._addUID(\"GPshowIsochron\")).checked = false;\n // self.onReduceIsoPanelClick();\n // }\n // }, false);\n // } else if (divReduce.attachEvent) {\n // divReduce.attachEvent(\"onclick\", function () {\n // if ( typeof self.onReduceIsoPanelClick === \"function\") {\n // document.getElementById(self._addUID(\"GPshowIsochron\")).checked = false;\n // self.onReduceIsoPanelClick();\n // }\n // });\n // }\n // container.appendChild(divReduce);\n\n var divClose = document.createElement(\"div\");\n divClose.id = this._addUID(\"GPisochronPanelClose\");\n divClose.className = \"GPpanelClose\";\n divClose.title = \"Fermer le panneau\";\n\n // Link panel close / visibility checkbox\n if (divClose.addEventListener) {\n divClose.addEventListener(\"click\", function () {\n document.getElementById(self._addUID(\"GPshowIsochronPicto\")).click();\n }, false);\n } else if (divClose.attachEvent) {\n divClose.attachEvent(\"onclick\", function () {\n document.getElementById(self._addUID(\"GPshowIsochronPicto\")).click();\n });\n }\n container.appendChild(divClose);\n return container;\n },\n /**\n * Create Form\n * see evenement !\n *\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelFormElement: function _createIsoPanelFormElement() {\n // contexte d'execution\n var self = this;\n var form = document.createElement(\"form\");\n form.id = this._addUID(\"GPisochronForm\");\n form.addEventListener(\"submit\", function (e) {\n e.preventDefault();\n self.onIsoComputationSubmit(e);\n return false;\n });\n return form;\n },\n /**\n * Create Waiting Panel\n *\n * @returns {DOMElement} DOM element\n */\n _createIsoWaitingElement: function _createIsoWaitingElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPisochronCalcWaitingContainer\");\n div.className = \"GPisochronCalcWaitingContainerHidden\";\n var p = document.createElement(\"p\");\n p.className = \"GPisochronCalcWaiting\";\n p.innerHTML = \"Calcul en cours...\";\n div.appendChild(p);\n return div;\n },\n // ################################################################### //\n // ############# Methods to the type choice into form ################ //\n // ################################################################### //\n\n /**\n * Create Container to type choice\n *\n * FIXME\n * don't call this._createIsoPanelFormTypeChoiceChronElement\n * don't call this._createIsoPanelFormTypeChoiceDistElement\n *\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelFormTypeChoiceElement: function _createIsoPanelFormTypeChoiceElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPisochronChoice\");\n\n // div.appendChild(this._createIsoPanelFormTypeChoiceChronElement());\n // div.appendChild(this._createIsoPanelFormTypeChoiceDistElement());\n\n return div;\n },\n /**\n * Create Type choice Chron\n * see event !\n * FIXME event not useful\n * @param {Boolean} checked - checked\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelFormTypeChoiceChronElement: function _createIsoPanelFormTypeChoiceChronElement(checked) {\n var self = this;\n var div = document.createElement(\"div\");\n div.className = \"GPisochronChoiceAlt\";\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPisochronChoiceAltChron\");\n input.name = \"GPisochronChoiceMode\";\n input.type = \"radio\";\n input.checked = !!checked;\n if (input.addEventListener) {\n input.addEventListener(\"change\", function (e) {\n document.getElementById(self._addUID(\"GPisochronValueChron\")).className = \"GPflexInput\";\n document.getElementById(self._addUID(\"GPisochronValueDist\")).className = \"GPisochronValueHidden\";\n self.onIsoTypeChoiceChange(e);\n }, false);\n } else if (input.attachEvent) {\n input.attachEvent(\"onchange\", function () {\n document.getElementById(self._addUID(\"GPisochronValueChron\")).className = \"GPflexInput\";\n document.getElementById(self._addUID(\"GPisochronValueDist\")).className = \"GPisochronValueHidden\";\n self.onIsoTypeChoiceChange();\n });\n }\n // info: Internet explorer support\n input.value = \"isochron\";\n div.appendChild(input);\n var label = document.createElement(\"label\");\n label.className = \"GPisochronChoiceAltImg\";\n label.htmlFor = this._addUID(\"GPisochronChoiceAltChron\");\n div.appendChild(label);\n var span = document.createElement(\"span\");\n span.id = this._addUID(\"GPisochronChoiceAltChronTxt\");\n span.innerHTML = \"isochrone\";\n if (span.addEventListener) {\n span.addEventListener(\"click\", function () {\n document.getElementById(self._addUID(\"GPisochronChoiceAltChron\")).click();\n }, false);\n } else if (span.attachEvent) {\n span.attachEvent(\"onclick\", function () {\n document.getElementById(self._addUID(\"GPisochronChoiceAltChron\")).click();\n });\n }\n div.appendChild(span);\n return div;\n },\n /**\n * Create Type choice Dist\n * see event !\n * FIXME event not useful\n * @param {Boolean} checked - checked\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelFormTypeChoiceDistElement: function _createIsoPanelFormTypeChoiceDistElement(checked) {\n var self = this;\n var div = document.createElement(\"div\");\n div.className = \"GPisochronChoiceAlt\";\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPisochronChoiceAltDist\");\n input.name = \"GPisochronChoiceMode\";\n input.type = \"radio\";\n input.checked = !!checked;\n if (input.addEventListener) {\n input.addEventListener(\"change\", function (e) {\n document.getElementById(self._addUID(\"GPisochronValueDist\")).className = \"GPflexInput\";\n document.getElementById(self._addUID(\"GPisochronValueChron\")).className = \"GPisochronValueHidden\";\n self.onIsoTypeChoiceChange(e);\n }, false);\n } else if (input.attachEvent) {\n input.attachEvent(\"onchange\", function () {\n document.getElementById(self._addUID(\"GPisochronValueDist\")).className = \"GPflexInput\";\n document.getElementById(self._addUID(\"GPisochronValueChron\")).className = \"GPisochronValueHidden\";\n self.onIsoTypeChoiceChange();\n });\n }\n // info: Internet explorer support\n input.value = \"isodistance\";\n div.appendChild(input);\n var label = document.createElement(\"label\");\n label.className = \"GPisochronChoiceAltImg\";\n label.htmlFor = this._addUID(\"GPisochronChoiceAltDist\");\n div.appendChild(label);\n var span = document.createElement(\"span\");\n span.id = this._addUID(\"GPisochronChoiceAltDistTxt\");\n span.innerHTML = \"isodistance\";\n if (span.addEventListener) {\n span.addEventListener(\"click\", function () {\n document.getElementById(self._addUID(\"GPisochronChoiceAltDist\")).click();\n }, false);\n } else if (span.attachEvent) {\n span.attachEvent(\"onclick\", function () {\n document.getElementById(self._addUID(\"GPisochronChoiceAltDist\")).click();\n });\n }\n div.appendChild(span);\n return div;\n },\n // ################################################################### //\n // ############### Methods to the value iso into form ################ //\n // ################################################################### //\n\n /**\n * Create isochron inputs values\n * see event !\n * @param {Boolean} checked - checked\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelFormValueIsochronElement: function _createIsoPanelFormValueIsochronElement(checked) {\n // contexte\n var context = this;\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPisochronValueChron\");\n div.className = checked ? \"GPflexInput\" : \"GPisochronValueHidden\";\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPisochronValueChronLabel\");\n label.htmlFor = this._addUID(\"GPisochronValueChronInput\");\n label.innerHTML = \"Temps\";\n div.appendChild(label);\n var input1 = document.createElement(\"input\");\n input1.id = this._addUID(\"GPisochronValueChronInput1\");\n input1.min = \"0\";\n input1.step = \"1\";\n input1.value = \"0\";\n input1.type = \"number\";\n if (input1.addEventListener) {\n input1.addEventListener(\"change\", function (e) {\n if (typeof context.onIsoValueChronTimeMinuteChange === \"function\") {\n context.onIsoValueChronTimeHourChange(e);\n }\n });\n } else if (input1.attachEvent) {\n input1.attachEvent(\"onchange\", function (e) {\n if (typeof context.onIsoValueChronTimeMinuteChange === \"function\") {\n context.onIsoValueChronTimeHourChange(e);\n }\n });\n }\n div.appendChild(input1);\n var label1 = document.createElement(\"label\");\n label1.innerHTML = \"h\";\n div.appendChild(label1);\n var input2 = document.createElement(\"input\");\n input2.id = this._addUID(\"GPisochronValueChronInput2\");\n input2.min = \"0\";\n input2.max = \"59\";\n input2.step = \"1\";\n input2.value = \"0\";\n input2.type = \"number\";\n if (input2.addEventListener) {\n input2.addEventListener(\"change\", function (e) {\n if (typeof context.onIsoValueChronTimeMinuteChange === \"function\") {\n context.onIsoValueChronTimeMinuteChange(e);\n }\n });\n } else if (input2.attachEvent) {\n input2.attachEvent(\"onchange\", function (e) {\n if (typeof context.onIsoValueChronTimeMinuteChange === \"function\") {\n context.onIsoValueChronTimeMinuteChange(e);\n }\n });\n }\n div.appendChild(input2);\n var label2 = document.createElement(\"label\");\n label2.innerHTML = \"min\";\n div.appendChild(label2);\n return div;\n },\n /**\n * Create isodistance inputs values\n * see event !\n * @param {Boolean} checked - checked\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelFormValueIsodistanceElement: function _createIsoPanelFormValueIsodistanceElement(checked) {\n // contexte\n var context = this;\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPisochronValueDist\");\n div.className = checked ? \"GPflexInput\" : \"GPisochronValueHidden\";\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPisochronValueDistLabel\");\n label.htmlFor = this._addUID(\"GPisochronValueDistInput\");\n label.innerHTML = \"Distance\";\n div.appendChild(label);\n var input1 = document.createElement(\"input\");\n input1.id = this._addUID(\"GPisochronValueDistInput\");\n input1.min = \"0\";\n input1.step = \"any\";\n input1.value = \"0\";\n input1.type = \"number\";\n if (input1.addEventListener) {\n input1.addEventListener(\"change\", function (e) {\n if (typeof context.onIsoValueDistChange === \"function\") {\n context.onIsoValueDistChange(e);\n }\n });\n } else if (input1.attachEvent) {\n input1.attachEvent(\"onchange\", function (e) {\n if (typeof context.onIsoValueDistChange === \"function\") {\n context.onIsoValueDistChange(e);\n }\n });\n }\n div.appendChild(input1);\n var label1 = document.createElement(\"label\");\n label1.innerHTML = \"km\";\n div.appendChild(label1);\n return div;\n },\n // ################################################################### //\n // ############ Methods to the mode choice into form ################# //\n // ################################################################### //\n\n /**\n * Create Container to Mode choice\n *\n * FIXME\n * don't call this._createIsoPanelFormModeChoiceTransportElement\n * don't call this._createIsoPanelFormModeChoiceDirectionElement\n *\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelFormModeChoiceElement: function _createIsoPanelFormModeChoiceElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPisochronModeChoice\");\n\n // div.appendChild(this._createIsoPanelFormModeChoiceTransportElement());\n // div.appendChild(this._createIsoPanelFormModeChoiceDirectionElement());\n\n return div;\n },\n /**\n * Create Mode choice transport\n * see event !\n * FIXME event not useful\n * @param {Array} transports - transports in a list\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelFormModeChoiceTransportElement: function _createIsoPanelFormModeChoiceTransportElement(transports) {\n // contexte d'execution\n var context = this;\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPisochronTransportChoice\");\n var span = document.createElement(\"span\");\n span.className = \"GPisochronModeLabel\";\n span.innerHTML = \"Mode de transport\";\n div.appendChild(span);\n\n /* jshint -W083 */\n for (var i = 0; i < transports.length; i++) {\n var transport = transports[i];\n if (transport === \"Voiture\") {\n var inputCar = document.createElement(\"input\");\n inputCar.id = this._addUID(\"GPisochronTransportCar\");\n inputCar.type = \"radio\";\n inputCar.name = \"GPisochronTransport\";\n if (i === 0) {\n inputCar.checked = true;\n }\n // gestionnaire d'evenement :\n // on stocke le mode de transport,\n // utilisation pour la requête sur le service de calcul d'itiniraire\n if (inputCar.addEventListener) {\n inputCar.addEventListener(\"change\", function (e) {\n context.onIsoModeTransportChange(e);\n });\n } else if (inputCar.attachEvent) {\n inputCar.attachEvent(\"onchange\", function (e) {\n context.onIsoModeTransportChange(e);\n });\n }\n // info : internet explorer support\n inputCar.value = \"Voiture\";\n div.appendChild(inputCar);\n var labelCar = document.createElement(\"label\");\n labelCar.className = \"GPisochronTransportImg\";\n labelCar.htmlFor = this._addUID(\"GPisochronTransportCar\");\n labelCar.title = \"Voiture\";\n div.appendChild(labelCar);\n }\n if (transport === \"Pieton\") {\n var inputPedestrian = document.createElement(\"input\");\n inputPedestrian.id = this._addUID(\"GPisochronTransportPedestrian\");\n inputPedestrian.type = \"radio\";\n inputPedestrian.name = \"GPisochronTransport\";\n if (i === 0) {\n inputPedestrian.checked = true;\n }\n // gestionnaire d'evenement :\n // on stocke le mode de transport,\n // utilisation pour la requête sur le service de calcul d'itiniraire\n if (inputPedestrian.addEventListener) {\n inputPedestrian.addEventListener(\"change\", function (e) {\n context.onIsoModeTransportChange(e);\n });\n } else if (inputPedestrian.attachEvent) {\n inputPedestrian.attachEvent(\"onchange\", function (e) {\n context.onIsoModeTransportChange(e);\n });\n }\n // info : internet explorer support\n inputPedestrian.value = \"Pieton\";\n div.appendChild(inputPedestrian);\n var labelPedestrian = document.createElement(\"label\");\n labelPedestrian.className = \"GPisochronTransportImg\";\n labelPedestrian.htmlFor = this._addUID(\"GPisochronTransportPedestrian\");\n labelPedestrian.title = \"Piéton\";\n div.appendChild(labelPedestrian);\n }\n }\n return div;\n },\n /**\n * Create Mode choice direction\n * see event!\n *\n * @param {Array} directions - directions to display in list (\"Departure\", \"Arrival\"). First element will be selected by default\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelFormModeChoiceDirectionElement: function _createIsoPanelFormModeChoiceDirectionElement(directions) {\n // contexte d'execution\n var self = this;\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPisochronDirectionChoice\");\n var span = document.createElement(\"span\");\n span.className = \"GPisochronModeLabel\";\n span.innerHTML = \"Sens de parcours\";\n div.appendChild(span);\n var select = document.createElement(\"select\");\n select.id = this._addUID(\"GPisochronDirectionSelect\");\n select.className = \"GPinputSelect\";\n // gestionnaire d'evenement :\n // on stocke la valeur du mode de calcul,\n // utilisation pour la requête sur le service de calcul d'iso\n select.addEventListener(\"change\", function (e) {\n self.onIsoModeDirectionChange(e);\n });\n for (var i = 0; i < directions.length; i++) {\n var direction = directions[i];\n if (direction.toLowerCase() === \"departure\") {\n var departureOption = document.createElement(\"option\");\n if (i === 0) {\n departureOption.selected = \"selected\";\n }\n departureOption.value = \"departure\";\n departureOption.text = \"Départ\";\n select.appendChild(departureOption);\n }\n if (direction.toLowerCase() === \"arrival\") {\n var arrivalOption = document.createElement(\"option\");\n if (i === 0) {\n arrivalOption.selected = \"selected\";\n }\n arrivalOption.value = \"arrival\";\n arrivalOption.text = \"Arrivée\";\n select.appendChild(arrivalOption);\n }\n }\n div.appendChild(select);\n return div;\n },\n // ################################################################### //\n // ################# Methods to the choice exclusions ################ //\n // ################################################################### //\n\n /**\n * Hidden checkbox for minimizing/maximizing Exclusions Options\n *\n * @returns {DOMElement} DOM element\n */\n _createShowIsoExclusionsElement: function _createShowIsoExclusionsElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPshowIsoExclusions\");\n input.type = \"checkbox\";\n return input;\n },\n /**\n * Label to Exclusions Options\n *\n * @returns {DOMElement} DOM element\n */\n _createShowIsoExclusionsPictoElement: function _createShowIsoExclusionsPictoElement() {\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowIsoExclusionsPicto\");\n label.className = \"GPshowMoreOptionsImage GPshowMoreOptions GPshowIsoExclusionsPicto\";\n label.htmlFor = this._addUID(\"GPshowIsoExclusions\");\n label.title = \"Exclusions\";\n label.style.top = \"240px\";\n return label;\n },\n /**\n * Create Container to Exclusions\n *\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelFormExclusionsElement: function _createIsoPanelFormExclusionsElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPisoExclusions\");\n var span = document.createElement(\"span\");\n span.className = \"GPisoExclusionsLabel\";\n span.innerHTML = \"Passages autorisés\";\n div.appendChild(span);\n\n // div.appendChild(this._createIsoPanelFormExclusionOptionsElement());\n\n return div;\n },\n /**\n * Create Exclusions Options\n * see event !\n * FIXME event not useful\n * @param {Array} exclusions - exclusions to display in list\n * @returns {DOMElement} DOM element\n */\n _createIsoPanelFormExclusionOptionsElement: function _createIsoPanelFormExclusionOptionsElement(exclusions) {\n // contexte d'execution\n var context = this;\n var div = document.createElement(\"div\");\n div.className = \"GPisoExclusionsOptions\";\n\n /* jshint -W083 */\n for (var value in exclusions) {\n if (exclusions.hasOwnProperty(value)) {\n var status = exclusions[value];\n switch (value) {\n case \"toll\":\n var inputToll = document.createElement(\"input\");\n inputToll.id = this._addUID(\"GPisoExclusionsToll\");\n inputToll.type = \"checkbox\";\n inputToll.checked = !status;\n // gestionnaire d'evenement :\n // on stocke l'exclusion,\n // utilisation pour la requête sur le service de calcul d'itiniraire\n if (inputToll.addEventListener) {\n inputToll.addEventListener(\"change\", function (e) {\n context.onIsoExclusionsChange(e);\n });\n } else if (inputToll.attachEvent) {\n inputToll.attachEvent(\"onchange\", function (e) {\n context.onIsoExclusionsChange(e);\n });\n }\n // info : internet explorer support\n inputToll.value = \"Toll\";\n div.appendChild(inputToll);\n var labelToll = document.createElement(\"label\");\n labelToll.className = \"GPisoExclusionsOption\";\n labelToll.htmlFor = this._addUID(\"GPisoExclusionsToll\");\n labelToll.innerHTML = \"Péages\";\n div.appendChild(labelToll);\n break;\n case \"tunnel\":\n var inputTunnel = document.createElement(\"input\");\n inputTunnel.id = this._addUID(\"GPisoExclusionsTunnel\");\n inputTunnel.type = \"checkbox\";\n inputTunnel.checked = !status;\n // gestionnaire d'evenement :\n // on stocke l'exclusion,\n // utilisation pour la requête sur le service de calcul d'itiniraire\n if (inputTunnel.addEventListener) {\n inputTunnel.addEventListener(\"change\", function (e) {\n context.onIsoExclusionsChange(e);\n });\n } else if (inputTunnel.attachEvent) {\n inputTunnel.attachEvent(\"onchange\", function (e) {\n context.onIsoExclusionsChange(e);\n });\n }\n // info : internet explorer support\n inputTunnel.value = \"Tunnel\";\n div.appendChild(inputTunnel);\n var labelTunnel = document.createElement(\"label\");\n labelTunnel.className = \"GPisoExclusionsOption\";\n labelTunnel.htmlFor = this._addUID(\"GPisoExclusionsTunnel\");\n labelTunnel.innerHTML = \"Tunnels\";\n div.appendChild(labelTunnel);\n break;\n case \"bridge\":\n var inputBridge = document.createElement(\"input\");\n inputBridge.id = this._addUID(\"GPisoExclusionsBridge\");\n inputBridge.type = \"checkbox\";\n inputBridge.checked = !status;\n // gestionnaire d'evenement :\n // on stocke l'exclusion,\n // utilisation pour la requête sur le service de calcul d'itiniraire\n if (inputBridge.addEventListener) {\n inputBridge.addEventListener(\"change\", function (e) {\n context.onIsoExclusionsChange(e);\n });\n } else if (inputBridge.attachEvent) {\n inputBridge.attachEvent(\"onchange\", function (e) {\n context.onIsoExclusionsChange(e);\n });\n }\n // info : internet explorer support\n inputBridge.value = \"Bridge\";\n div.appendChild(inputBridge);\n var labelBridge = document.createElement(\"label\");\n labelBridge.className = \"GPisoExclusionsOption\";\n labelBridge.htmlFor = this._addUID(\"GPisoExclusionsBridge\");\n labelBridge.innerHTML = \"Ponts\";\n div.appendChild(labelBridge);\n break;\n }\n }\n }\n return div;\n },\n // ################################################################### //\n // ############################### Submit Form ####################### //\n // ################################################################### //\n\n /**\n * Create Submit Form Element\n *\n * @returns {DOMElement} DOM element\n */\n _createIsoSubmitFormElement: function _createIsoSubmitFormElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPisochronSubmit\");\n input.className = \"GPinputSubmit\";\n input.type = \"submit\";\n input.value = \"Calculer\";\n return input;\n },\n // ################################################################### //\n // ############################### Reset picto ####################### //\n // ################################################################### //\n\n /**\n * Create Reset Picto Element\n *\n * @returns {DOMElement} DOM element\n */\n _createIsoFormResetElement: function _createIsoFormResetElement() {\n var self = this;\n var divReset = document.createElement(\"div\");\n divReset.id = this._addUID(\"GPisochronReset\");\n divReset.title = \"Réinitialiser les paramètres\";\n divReset.addEventListener(\"click\", function (e) {\n self.onIsoResetClick(e);\n });\n return divReset;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (IsoDOM);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ29udHJvbHMvSXNvRE9NLmpzPzliMDUiXSwibmFtZXMiOlsiSXNvRE9NIiwiX2FkZFVJRCIsImlkIiwidWlkIiwiX3VpZCIsIl9jcmVhdGVNYWluQ29udGFpbmVyRWxlbWVudCIsImNvbnRhaW5lciIsImRvY3VtZW50IiwiY3JlYXRlRWxlbWVudCIsImNsYXNzTmFtZSIsIl9jcmVhdGVTaG93SXNvRWxlbWVudCIsImlucHV0IiwidHlwZSIsIl9jcmVhdGVTaG93SXNvUGljdG9FbGVtZW50IiwiY29udGV4dCIsImxhYmVsIiwiaHRtbEZvciIsInRpdGxlIiwiYWRkRXZlbnRMaXN0ZW5lciIsImUiLCJvblNob3dJc29QYW5lbENsaWNrIiwiYXR0YWNoRXZlb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B2YXIgZGl2ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcbiAgICAgICAgZGl2LmlkID0gdGhpcy5fYWRkVUlEKFwiR1Bpc29jaHJvblRyYW5zcG9ydENob2ljZVwiKTtcblxuICAgICAgICB2YXIgc3BhbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJzcGFuXCIpO1xuICAgICAgICBzcGFuLmNsYXNzTmFtZSA9IFwiR1Bpc29jaHJvbk1vZGVMYWJlbFwiO1xuICAgICAgICBzcGFuLmlubmVySFRNTCA9IFwiTW9kZSBkZSB0cmFuc3BvcnRcIjtcbiAgICAgICAgZGl2LmFwcGVuZENoaWxkKHNwYW4pO1xuXG4gICAgICAgIC8qIGpzaGludCAtVzA4MyAqL1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRyYW5zcG9ydHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciB0cmFuc3BvcnQgPSB0cmFuc3BvcnRzW2ldO1xuXG4gICAgICAgICAgICBpZiAodHJhbnNwb3J0ID09PSBcIlZvaXR1cmVcIikge1xuICAgICAgICAgICAgICAgIHZhciBpbnB1dENhciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJpbnB1dFwiKTtcbiAgICAgICAgICAgICAgICBpbnB1dENhci5pZCA9IHRoaXMuX2FkZFVJRChcIkdQaXNvY2hyb25UcmFuc3BvcnRDYXJcIik7XG4gICAgICAgICAgICAgICAgaW5wdXRDYXIudHlwZSA9IFwicmFkaW9cIjtcbiAgICAgICAgICAgICAgICBpbnB1dENhci5uYW1lID0gXCJHUGlzb2Nocm9uVHJhbnNwb3J0XCI7XG4gICAgICAgICAgICAgICAgaWYgKGkgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRDYXIuY2hlY2tlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIGdlc3Rpb25uYWlyZSBkJ2V2ZW5lbWVudCA6XG4gICAgICAgICAgICAgICAgLy8gb24gc3RvY2tlIGxlIG1vZGUgZGUgdHJhbnNwb3J0LFxuICAgICAgICAgICAgICAgIC8vIHV0aWxpc2F0aW9uIHBvdXIgbGEgcmVxdcOqdGUgc3VyIGxlIHNlcnZpY2UgZGUgY2FsY3VsIGQnaXRpbmlyYWlyZVxuICAgICAgICAgICAgICAgIGlmIChpbnB1dENhci5hZGRFdmVudExpc3RlbmVyKSB7XG4gICAgICAgICAgICAgICAgICAgIGlucHV0Q2FyLmFkZEV2ZW50TGlzdGVuZXIoXCJjaGFuZ2VcIiwgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQub25Jc29Nb2RlVHJhbnNwb3J0Q2hhbmdlKGUpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0Q2FyLmF0dGFjaEV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGlucHV0Q2FyLmF0dGFjaEV2ZW50KFwib25jaGFuZ2VcIiwgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQub25Jc29Nb2RlVHJhbnNwb3J0Q2hhbmdlKGUpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gaW5mbyA6IGludGVybmV0IGV4cGxvcmVyIHN1cHBvcnRcbiAgICAgICAgICAgICAgICBpbnB1dENhci52YWx1ZSA9IFwiVm9pdHVyZVwiO1xuICAgICAgICAgICAgICAgIGRpdi5hcHBlbmRDaGlsZChpbnB1dENhcik7XG5cbiAgICAgICAgICAgICAgICB2YXIgbGFiZWxDYXIgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwibGFiZWxcIik7XG4gICAgICAgICAgICAgICAgbGFiZWxDYXIuY2xhc3NOYW1lID0gXCJHUGlzb2Nocm9uVHJhbnNwb3J0SW1nXCI7XG4gICAgICAgICAgICAgICAgbGFiZWxDYXIuaHRtbEZvciA9IHRoaXMuX2FkZFVJRChcIkdQaXNvY2hyb25UcmFuc3BvcnRDYXJcIik7XG4gICAgICAgICAgICAgICAgbGFiZWxDYXIudGl0bGUgPSBcIlZvaXR1cmVcIjtcbiAgICAgICAgICAgICAgICBkaXYuYXBwZW5kQ2hpbGQobGFiZWxDYXIpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodHJhbnNwb3J0ID09PSBcIlBpZXRvblwiKSB7XG4gICAgICAgICAgICAgICAgdmFyIGlucHV0UGVkZXN0cmlhbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJpbnB1dFwiKTtcbiAgICAgICAgICAgICAgICBpbnB1dFBlZGVzdHJpYW4uaWQgPSB0aGlzLl9hZGRVSUQoXCJHUGlzb2Nocm9uVHJhbnNwb3J0UGVkZXN0cmlhblwiKTtcbiAgICAgICAgICAgICAgICBpbnB1dFBlZGVzdHJpYW4udHlwZSA9IFwicmFkaW9cIjtcbiAgICAgICAgICAgICAgICBpbnB1dFBlZGVzdHJpYW4ubmFtZSA9IFwiR1Bpc29jaHJvblRyYW5zcG9ydFwiO1xuICAgICAgICAgICAgICAgIGlmIChpID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGlucHV0UGVkZXN0cmlhbi5jaGVja2VkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gZ2VzdGlvbm5haXJlIGQnZXZlbmVtZW50IDpcbiAgICAgICAgICAgICAgICAvLyBvbiBzdG9ja2UgbGUgbW9kZSBkZSB0cmFuc3BvcnQsXG4gICAgICAgICAgICAgICAgLy8gdXRpbGlzYXRpb24gcG91ciBsYSByZXF1w6p0ZSBzdXIgbGUgc2VydmljZSBkZSBjYWxjdWwgZCdpdGluaXJhaXJlXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0UG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nR5cGUgPSBcImNoZWNrYm94XCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dFRvbGwuY2hlY2tlZCA9ICFzdGF0dXM7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBnZXN0aW9ubmFpcmUgZCdldmVuZW1lbnQgOlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gb24gc3RvY2tlIGwnZXhjbHVzaW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdXRpbGlzYXRpb24gcG91ciBsYSByZXF1w6p0ZSBzdXIgbGUgc2VydmljZSBkZSBjYWxjdWwgZCdpdGluaXJhaXJlXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXRUb2xsLmFkZEV2ZW50TGlzdGVuZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dFRvbGwuYWRkRXZlbnRMaXN0ZW5lcihcImNoYW5nZVwiLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0Lm9uSXNvRXhjbHVzaW9uc0NoYW5nZShlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXRUb2xsLmF0dGFjaEV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRUb2xsLmF0dGFjaEV2ZW50KFwib25jaGFuZ2VcIiwgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dC5vbklzb0V4Y2x1c2lvbnNDaGFuZ2UoZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBpbmZvIDogaW50ZXJuZXQgZXhwbG9yZXIgc3VwcG9ydFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRUb2xsLnZhbHVlID0gXCJUb2xsXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXYuYXBwZW5kQ2hpbGQoaW5wdXRUb2xsKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxhYmVsVG9sbCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJsYWJlbFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsVG9sbC5jbGFzc05hbWUgPSBcIkdQaXNvRXhjbHVzaW9uc09wdGlvblwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxUb2xsLmh0bWxGb3IgPSB0aGlzLl9hZGRVSUQoXCJHUGlzb0V4Y2x1c2lvbnNUb2xsXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxUb2xsLmlubmVySFRNTCA9IFwiUMOpYWdlc1wiO1xuICAgICAgICAgICAgICAgICAgICAgICAgZGl2LmFwcGVuZENoaWxkKGxhYmVsVG9sbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICBjYXNlIFwidHVubmVsXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaW5wdXRUdW5uZWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiaW5wdXRcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dFR1bm5lbC5pZCA9IHRoaXMuX2FkZFVJRChcIkdQaXNvRXhjbHVzaW9uc1R1bm5lbFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0VHVubmVsLnR5cGUgPSBcImNoZWNrYm94XCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dFR1bm5lbC5jaGVja2VkID0gIXN0YXR1cztcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGdlc3Rpb25uYWlyZSBkJ2V2ZW5lbWVudCA6XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBvbiBzdG9ja2UgbCdleGNsdXNpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB1dGlsaXNhdGlvbiBwb3VyIGxhIHJlcXXDqnRlIHN1ciBsZSBzZXJ2aWNlIGRlIGNhbGN1bCBkJ2l0aW5pcmFpcmVcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dFR1bm5lbC5hZGRFdmVudExpc3RlbmVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRUdW5uZWwuYWRkRXZlbnRMaXN0ZW5lcihcImNoYW5nZVwiLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0Lm9uSXNvRXhjbHVzaW9uc0NoYW5nZShlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXRUdW5uZWwuYXR0YWNoRXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dFR1bm5lbC5hdHRhY2hFdmVudChcIm9uY2hhbmdlXCIsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQub25Jc29FeGNsdXNpb25zQ2hhbmdlKGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW5mbyA6IGludGVybmV0IGV4cGxvcmVyIHN1cHBvcnRcbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0VHVubmVsLnZhbHVlID0gXCJUdW5uZWxcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpdi5hcHBlbmRDaGlsZChpbnB1dFR1bm5lbCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsYWJlbFR1bm5lbCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJsYWJlbFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsVHVubmVsLmNsYXNzTmFtZSA9IFwiR1Bpc29FeGNsdXNpb25zT3B0aW9uXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbFR1bm5lbC5odG1sRm9yID0gdGhpcy5fYWRkVUlEKFwiR1Bpc29FeGNsdXNpb25zVHVubmVsXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxUdW5uZWwuaW5uZXJIVE1MID0gXCJUdW5uZWxzXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXYuYXBwZW5kQ2hpbGQobGFiZWxUdW5uZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcImJyaWRnZVwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGlucHV0QnJpZGdlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImlucHV0XCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRCcmlkZ2UuaWQgPSB0aGlzLl9hZGRVSUQoXCJHUGlzb0V4Y2x1c2lvbnNCcmlkZ2VcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dEJyaWRnZS50eXBlID0gXCJjaGVja2JveFwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRCcmlkZ2UuY2hlY2tlZCA9ICFzdGF0dXM7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBnZXN0aW9ubmFpcmUgZCdldmVuZW1lbnQgOlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gb24gc3RvY2tlIGwnZXhjbHVzaW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdXRpbGlzYXRpb24gcG91ciBsYSByZXF1w6p0ZSBzdXIgbGUgc2VydmljZSBkZSBjYWxjdWwgZCdpdGluaXJhaXJlXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXRCcmlkZ2UuYWRkRXZlbnRMaXN0ZW5lcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0QnJpZGdlLmFkZEV2ZW50TGlzdGVuZXIoXCJjaGFuZ2VcIiwgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dC5vbklzb0V4Y2x1c2lvbnNDaGFuZ2UoZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0QnJpZGdlLmF0dGFjaEV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRCcmlkZ2UuYXR0YWNoRXZlbnQoXCJvbmNoYW5nZVwiLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0Lm9uSXNvRXhjbHVzaW9uc0NoYW5nZShlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGluZm8gOiBpbnRlcm5ldCBleHBsb3JlciBzdXBwb3J0XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dEJyaWRnZS52YWx1ZSA9IFwiQnJpZGdlXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXYuYXBwZW5kQ2hpbGQoaW5wdXRCcmlkZ2UpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGFiZWxCcmlkZ2UgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwibGFiZWxcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbEJyaWRnZS5jbGFzc05hbWUgPSBcIkdQaXNvRXhjbHVzaW9uc09wdGlvblwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxCcmlkZ2UuaHRtbEZ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l2UmVzZXQ7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgSXNvRE9NO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/Controls/IsoDOM.js\n"); + +/***/ }), + +/***/ "./src/Common/Controls/LayerSwitcherDOM.js": +/*!*************************************************!*\ + !*** ./src/Common/Controls/LayerSwitcherDOM.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var sortablejs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sortablejs */ \"./node_modules/sortablejs/modular/sortable.esm.js\");\n\nvar LayerSwitcherDOM = {\n /**\n * Creation du drag and drop\n *\n * @param {Object} elementDraggable - Element HTML (DOM) Container\n * @param {Object} context - this\n */\n _createDraggableElement: function _createDraggableElement(elementDraggable, context) {\n // FIXME retirer cette détection user-agent pour solution propre\n // option forcefallback pour réparer sortable sous Chrome 97\n // option forcefallback casse le layerswitcher du portail sous firefox\n if (navigator.userAgent.match(/chrome|chromium|crios/i)) {\n sortablejs__WEBPACK_IMPORTED_MODULE_0__[\"default\"].create(elementDraggable, {\n handle: \".GPlayerName\",\n draggable: \".draggable-layer\",\n ghostClass: \"GPghostLayer\",\n animation: 200,\n forceFallback: true,\n // Call event function on drag and drop\n onEnd: function onEnd(e) {\n // FIXME pas terrrible, mais il faut bien passer ce contexte...\n context._onDragAndDropLayerClick(e);\n }\n });\n } else {\n sortablejs__WEBPACK_IMPORTED_MODULE_0__[\"default\"].create(elementDraggable, {\n handle: \".GPlayerName\",\n draggable: \".draggable-layer\",\n ghostClass: \"GPghostLayer\",\n animation: 200,\n // Call event function on drag and drop\n onEnd: function onEnd(e) {\n // FIXME pas terrrible, mais il faut bien passer ce contexte...\n context._onDragAndDropLayerClick(e);\n }\n });\n }\n },\n // ################################################################### //\n // ######################### Main container ########################## //\n // ################################################################### //\n\n /**\n * Add uuid to the tag ID\n * @param {String} id - id selector\n * @returns {String} uid - id selector with an unique id\n */\n _addUID: function _addUID(id) {\n var uid = this._uid ? id + \"-\" + this._uid : id;\n return uid;\n },\n /**\n * Creation du container principal (DOM)\n *\n * @returns {DOMElement} container - layer switcher DOM element\n */\n _createMainContainerElement: function _createMainContainerElement() {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPlayerSwitcher\");\n container.className = \"GPwidget\";\n return container;\n },\n /**\n * Creation du container principal d\"affichage des layers (DOM)\n *\n * @returns {DOMElement} input - element for minimizing/maximizing the layer switcher\n */\n _createMainLayersShowElement: function _createMainLayersShowElement() {\n // \n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPshowLayersList\");\n input.type = \"checkbox\";\n return input;\n },\n /**\n * Creation du container principal des layers (DOM)\n *\n * @returns {DOMElement} container - layers list container\n */\n _createMainLayersElement: function _createMainLayersElement() {\n // ajout de la liste des layers dans le container principal\n //
    \n // (...)\n //
    \n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPlayersList\");\n div.className = \"GPpanel\";\n return div;\n },\n /**\n * Creation du container du picto du controle (DOM)\n *\n * @returns {DOMElement} label\n */\n _createMainPictoElement: function _createMainPictoElement() {\n var self = this;\n\n // exemple :\n // \n // \n\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowLayersListPicto\");\n label.className = \"GPshowAdvancedToolPicto\";\n label.htmlFor = this._addUID(\"GPshowLayersList\");\n label.title = \"Afficher/masquer le gestionnaire de couches\";\n var spanOpen = document.createElement(\"span\");\n spanOpen.id = this._addUID(\"GPshowLayersListOpen\");\n spanOpen.className = \"GPshowAdvancedToolOpen\";\n spanOpen.addEventListener(\"click\", function () {\n if (document.getElementById(self._addUID(\"GPshowLayersList\")).checked) {\n var layers = document.getElementsByClassName(\"GPlayerInfoOpened\");\n for (var i = 0; i < layers.length; i++) {\n layers[i].className = \"GPlayerInfo\";\n }\n document.getElementById(self._addUID(\"GPlayerInfoPanel\")).className = \"GPlayerInfoPanelClosed\";\n }\n });\n label.appendChild(spanOpen);\n var spanClose = document.createElement(\"span\");\n spanClose.addEventListener(\"click\", function () {\n if (document.getElementById(self._addUID(\"GPshowLayersList\")).checked) {\n var layers = document.getElementsByClassName(\"GPlayerInfoOpened\");\n for (var i = 0; i < layers.length; i++) {\n layers[i].className = \"GPlayerInfo\";\n }\n document.getElementById(self._addUID(\"GPlayerInfoPanel\")).className = \"GPlayerInfoPanelClosed\";\n }\n });\n spanClose.id = self._addUID(\"GPshowLayersListClose\");\n label.appendChild(spanClose);\n return label;\n },\n /**\n * Creation du container du panneau d\"information (DOM)\n *\n * @returns {DOMElement} container\n */\n _createMainInfoElement: function _createMainInfoElement() {\n // gestion du panneau d\"information dans le container principal\n //
    ...
    \n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPlayerInfoPanel\");\n div.className = \"GPpanel GPlayerInfoPanelClosed\";\n return div;\n },\n // ################################################################### //\n // ######################### Layer container ######################### //\n // ################################################################### //\n\n /**\n * Creation du container du layer (DOM)\n *\n * @param {Object} obj - options de la couche à ajouter dans le layer switcher\n * @param {Object} obj.layer - couche (ol ou leaflet)\n * @param {String} obj.id - identifiant de la couche (pour ol ou leaflet)\n * @param {String} obj.title - nom de la couche à afficher dans le controle\n * @param {String} obj.description - description de la couche à afficher\n * @param {Boolean} obj.visibility - visibilité de la couche dans la carte (true or false)\n * @param {Float} obj.opacity - opacité de la couche\n *\n * @returns {DOMElement} container\n */\n _createContainerLayerElement: function _createContainerLayerElement(obj) {\n // exemple :\n //
    \n // \n // \n // \n //
    \n\n // \n // \n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPlayerSwitcher_ID_\" + obj.id);\n container.className = \"GPlayerSwitcher_layer draggable-layer\";\n\n // ajout des outils basiques (visibility / layer name)\n container.appendChild(this._createBasicToolElement(obj));\n\n // liste des outils avancés (layer info / opacity slider / opacity value / removal)\n var array = this._createAdvancedToolShowElement(obj);\n for (var i = 0; i < array.length; i++) {\n container.appendChild(array[i]);\n }\n\n // ajout des outils avancés\n container.appendChild(this._createAdvancedToolElement(obj));\n return container;\n },\n // ################################################################### //\n // ############################ Layer tool ########################### //\n // ################################################################### //\n\n /**\n * Creation du container des outils basiques du layer (DOM)\n *\n * @param {Object} obj - options de la couche à ajouter dans le layer switcher\n *\n * @returns {DOMElement} container\n */\n _createBasicToolElement: function _createBasicToolElement(obj) {\n // exemple :\n //
    \n // \n // \n //
    \n\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPbasicTools_ID_\" + obj.id);\n div.className = \"GPlayerBasicTools\";\n div.appendChild(this._createBasicToolNameElement(obj));\n var array = this._createBasicToolVisibilityElement(obj);\n for (var i = 0; i < array.length; i++) {\n div.appendChild(array[i]);\n }\n return div;\n },\n /**\n * Creation du nom du layer (DOM)\n *\n * @param {Object} obj - options de la couche à ajouter dans le layer switcher\n *\n * @returns {DOMElement} container\n */\n _createBasicToolNameElement: function _createBasicToolNameElement(obj) {\n // exemple :\n // Quartiers prioritaires de la ville\n var span = document.createElement(\"span\");\n span.id = this._addUID(\"GPname_ID_\" + obj.id);\n span.className = \"GPlayerName\";\n span.title = obj.description || obj.title;\n span.innerHTML = obj.title;\n return span;\n },\n /**\n * Creation de l'icone de visibilité du layer (DOM)\n *\n * @param {Object} obj - options de la couche à ajouter dans le layer switcher\n * @returns {DOMElement[]} array containing input and label elements\n */\n _createBasicToolVisibilityElement: function _createBasicToolVisibilityElement(obj) {\n // exemple :\n // \n // \n\n var list = [];\n var checked = typeof obj.visibility !== \"undefined\" ? obj.visibility : true;\n var id = this._addUID(\"GPvisibility_ID_\" + obj.id);\n var input = document.createElement(\"input\");\n input.id = id;\n input.type = \"checkbox\";\n input.checked = checked;\n var label = document.createElement(\"label\");\n label.htmlFor = id;\n label.id = this._addUID(\"GPvisibilityPicto_ID_\" + obj.id);\n label.className = \"GPlayerVisibility\";\n label.title = \"Afficher/masquer la couche\";\n\n // add event for visibility change\n var context = this;\n if (input.addEventListener) {\n input.addEventListener(\"click\", function (e) {\n context._onVisibilityLayerClick(e);\n });\n } else if (input.attachEvent) {\n // internet explorer\n input.attachEvent(\"onclick\", function (e) {\n context._onVisibilityLayerClick(e);\n });\n }\n list.push(input);\n list.push(label);\n return list;\n },\n /**\n * Creation de l'affichage du menu des outils avancés du layer (DOM)\n *\n * @param {Object} obj - options de la couche à ajouter dans le layer switcher\n *\n * @returns {DOMElement[]} array containing input and label elements\n */\n _createAdvancedToolShowElement: function _createAdvancedToolShowElement(obj) {\n // \n // \n\n var list = [];\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowAdvancedToolsPicto_ID_\" + obj.id);\n label.htmlFor = this._addUID(\"GPshowAdvancedTools_ID_\" + obj.id);\n label.title = \"Plus d'outils\";\n label.className = \"GPshowMoreOptions GPshowLayerAdvancedTools\";\n var input = document.createElement(\"input\");\n input.type = \"checkbox\";\n input.id = this._addUID(\"GPshowAdvancedTools_ID_\" + obj.id);\n list.push(input);\n list.push(label);\n return list;\n },\n /**\n * Creation du container des outils avancés du layer (DOM)\n *\n * @param {Object} obj - options de la couche à ajouter dans le layer switcher\n *\n * @returns {DOMElement} container\n */\n _createAdvancedToolElement: function _createAdvancedToolElement(obj) {\n // exemple :\n //
    \n // \n // \n // \n //
    \n\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPadvancedTools_ID_\" + obj.id);\n container.className = \"GPlayerAdvancedTools\";\n container.appendChild(this._createAdvancedToolDeleteElement(obj));\n\n // si on n'a de l'informations à afficher, on met en place ce composant\n if (obj.title && obj.description) {\n container.appendChild(this._createAdvancedToolInformationElement(obj));\n }\n if (obj.type !== \"feature\") {\n var array = this._createAdvancedToolOpacityElement(obj);\n for (var i = 0; i < array.length; i++) {\n container.appendChild(array[i]);\n }\n }\n return container;\n },\n /**\n * Creation de l'icone de suppression du layer (DOM)\n *\n * @param {Object} obj - options de la couche à ajouter dans le layer switcher\n *\n * @returns {DOMElement} container\n */\n _createAdvancedToolDeleteElement: function _createAdvancedToolDeleteElement(obj) {\n // exemple :\n //
    \n\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPremove_ID_\" + obj.id);\n div.className = \"GPlayerRemove\";\n div.title = \"Supprimer la couche\";\n div.layerId = obj.id;\n var context = this;\n if (div.addEventListener) {\n div.addEventListener(\"click\", function (e) {\n context._onDropLayerClick(e);\n });\n } else if (div.attachEvent) {\n // internet explorer\n div.attachEvent(\"onclick\", function (e) {\n context._onDropLayerClick(e);\n });\n }\n return div;\n },\n /**\n * Creation de l'icone d'information du layer (DOM)\n *\n * @param {Object} obj - options de la couche à ajouter dans le layer switcher\n *\n * @returns {DOMElement} container\n */\n _createAdvancedToolInformationElement: function _createAdvancedToolInformationElement(obj) {\n // exemple :\n //
    \n\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPinfo_ID_\" + obj.id);\n div.className = \"GPlayerInfo\";\n div.title = \"Informations/légende\";\n div.layerId = obj.id;\n // add event on click\n var context = this;\n if (div.addEventListener) {\n div.addEventListener(\"click\", function (e) {\n context._onOpenLayerInfoClick(e);\n });\n } else if (div.attachEvent) {\n // internet explorer\n div.attachEvent(\"onclick\", function (e) {\n context._onOpenLayerInfoClick(e);\n });\n }\n return div;\n },\n /**\n * Creation de l'icone de gestion de l'opacité du layer (DOM)\n *\n * @param {Object} obj - options de la couche à ajouter dans le layer switcher\n *\n * @returns {DOMElement[]} array of two containers\n */\n _createAdvancedToolOpacityElement: function _createAdvancedToolOpacityElement(obj) {\n // exemple :\n //
    \n // \n //
    \n //
    \n // 100\n // %\n //
    \n\n var list = [];\n\n // curseur pour changer l'opacité\n var divO = document.createElement(\"div\");\n divO.id = this._addUID(\"GPopacity_ID_\" + obj.id);\n divO.className = \"GPlayerOpacity\";\n divO.title = \"Opacité\";\n var opacity = typeof obj.opacity !== \"undefined\" ? obj.opacity : 1;\n opacity = Math.round(opacity * 100);\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPopacityValueDiv_ID_\" + obj.id);\n input.type = \"range\";\n input.value = opacity;\n\n // add event for opacity change\n var context = this;\n if (input.addEventListener) {\n input.addEventListener(\"change\", function (e) {\n context._onChangeLayerOpacity(e);\n });\n } else if (input.attachEvent) {\n // internet explorer\n input.attachEvent(\"onchange\", function (e) {\n context._onChangeLayerOpacity(e);\n });\n }\n if (input.addEventListener) {\n input.addEventListener(\"input\", function (e) {\n context._onChangeLayerOpacity(e);\n });\n } else if (input.attachEvent) {\n // internet explorer\n input.attachEvent(\"oninput\", function (e) {\n context._onChangeLayerOpacity(e);\n });\n }\n divO.appendChild(input);\n\n // Valeur d'opacité\n var divC = document.createElement(\"div\");\n divC.id = this._addUID(\"GPopacityValueDiv_ID_\" + obj.id);\n divC.className = \"GPlayerOpacityValue\";\n var span = document.createElement(\"span\");\n span.id = this._addUID(\"GPopacityValue_ID_\" + obj.id);\n span.innerHTML = opacity + \"%\";\n divC.appendChild(span);\n list.push(divO);\n list.push(divC);\n return list;\n },\n // ################################################################### //\n // ############################ Layer info ########################### //\n // ################################################################### //\n\n /**\n * Creation du container du layer info (DOM)\n *\n * TODO GPlayerInfoPopup : ???\n * TODO GPlayerInfoLink : mettre en forme les échelles !\n *\n * @param {Object} obj - options de la couche à ajouter dans le layer switcher\n *\n * @returns {DOMElement} container\n */\n _createContainerLayerInfoElement: function _createContainerLayerInfoElement(obj) {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPlayerInfoContent\");\n var title = document.createElement(\"div\");\n title.id = this._addUID(\"GPlayerInfoTitle\");\n title.innerHTML = obj.title;\n container.appendChild(title);\n if (obj.quicklookUrl) {\n var quick = document.createElement(\"div\");\n quick.id = this._addUID(\"GPlayerInfoQuicklook\");\n quick.title = \"Afficher un aperçu de la couche\";\n var refquick = document.createElement(\"a\");\n refquick.href = obj.quicklookUrl;\n refquick.appendChild(quick);\n container.appendChild(refquick);\n }\n var close = document.createElement(\"div\");\n close.id = this._addUID(\"GPlayerInfoClose\");\n close.title = \"Fermer la fenêtre\";\n var self = this;\n /** Call event function on close click */\n var onCloseClick = function onCloseClick() {\n document.getElementById(self._addUID(\"GPlayerInfoPanel\")).className = \"GPlayerInfoPanelClosed\";\n var layers = document.getElementsByClassName(\"GPlayerInfoOpened\");\n for (var i = 0; i < layers.length; i++) {\n layers[i].className = \"GPlayerInfo\";\n }\n };\n if (close.addEventListener) {\n close.addEventListener(\"click\", onCloseClick);\n } else if (close.attachEvent) {\n // internet explorer\n close.attachEvent(\"onclick\", onCloseClick);\n }\n container.appendChild(close);\n var desc = document.createElement(\"div\");\n desc.id = this._addUID(\"GPlayerInfoDescription\");\n desc.innerHTML = obj.description;\n container.appendChild(desc);\n if (obj.metadata) {\n var mtd = document.createElement(\"div\");\n mtd.id = this._addUID(\"GPlayerInfoMetadata\");\n var mtdtitle = document.createElement(\"div\");\n mtdtitle.className = \"GPlayerInfoSubtitle\";\n mtdtitle.innerHTML = \"Métadonnées\";\n mtd.appendChild(mtdtitle);\n for (var i = 0; i < obj.metadata.length; i++) {\n var urlmtd = obj.metadata[i].url;\n var mtdlink = document.createElement(\"div\");\n mtdlink.className = \"GPlayerInfoLink\";\n var refmtd = document.createElement(\"a\");\n refmtd.href = urlmtd;\n refmtd.innerHTML = urlmtd;\n mtdlink.appendChild(refmtd);\n mtd.appendChild(mtdlink);\n }\n if (obj.metadata.length !== 0) {\n container.appendChild(mtd);\n }\n }\n if (obj.legends) {\n var lgd = document.createElement(\"div\");\n lgd.id = this._addUID(\"GPlayerInfoLegend\");\n var lgdtitle = document.createElement(\"div\");\n lgdtitle.className = \"GPlayerInfoSubtitle\";\n lgdtitle.innerHTML = \"Légende\";\n lgd.appendChild(lgdtitle);\n var legends = {};\n var maxScale = obj.maxScaleDenominator || 560000000;\n\n // on crée un tableau temporaire pour ordonner les légendes selon le dénominateur d'échelle\n for (var k = 0; k < obj.legends.length; k++) {\n var minScale = obj.legends[k].minScaleDenominator;\n if (minScale) {\n var s = minScale.toString();\n minScale = Math.round(parseInt(s.substring(0, 3), 10) / 10) * Math.pow(10, s.length - 2);\n } else {\n minScale = 270;\n }\n legends[minScale] = obj.legends[k];\n }\n for (var scale in legends) {\n if (legends.hasOwnProperty(scale)) {\n var urllgd = legends[scale].url;\n // on n'affiche pas les légendes pointant vers \"nolegend.jpg\"\n if (typeof urllgd === \"string\" && urllgd.toLowerCase().indexOf(\"nolegend.jpg\") === -1) {\n // TODO GPlayerInfoPopup\n var lgdlink = document.createElement(\"div\");\n lgdlink.className = \"GPlayerInfoLink\";\n maxScale = legends[scale].maxScaleDenominator || maxScale;\n var reflgd = document.createElement(\"a\");\n reflgd.href = urllgd;\n reflgd.innerHTML = \"Du 1/\" + scale + \" au 1/\" + maxScale;\n lgdlink.appendChild(reflgd);\n lgd.appendChild(lgdlink);\n } else {\n delete legends[scale];\n }\n }\n }\n if (Object.keys(legends).length !== 0) {\n container.appendChild(lgd);\n }\n }\n return container;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (LayerSwitcherDOM);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ29udHJvbHMvTGF5ZXJTd2l0Y2hlckRPTS5qcz8zM2JlIl0sIm5hbWVzIjpbIkxheWVyU3dpdGNoZXJET00iLCJfY3JlYXRlRHJhZ2dhYmxlRWxlbWVudCIsImVsZW1lbnREcmFnZ2FibGUiLCJjb250ZXh0IiwibmF2aWdhdG9yIiwidXNlckFnZW50IiwibWF0Y2giLCJTb3J0YWJsZSIsImNyZWF0ZSIsImhhbmRsZSIsImRyYWdnYWJsZSIsImdob3N0Q2xhc3MiLCJhbmltYXRpb24iLCJmb3JjZUZhbGxiYWNrIiwib25FbmQiLCJlIiwiX29uRHJhZ0FuZERyb3BMYXllckNsaWNrIiwiX2FkZFVJRCIsImlkIiwidWlkIiwiX3VpZCIsIl9jcmVhdGVNYWluQ29udGFpbmVyRWxlbWVudCIsImNvbnRhaW5lci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OiB0cnVlLFxuICAgICAgICAgICAgICAgIC8vIENhbGwgZXZlbnQgZnVuY3Rpb24gb24gZHJhZyBhbmQgZHJvcFxuICAgICAgICAgICAgICAgIG9uRW5kIDogZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gRklYTUUgcGFzIHRlcnJyaWJsZSwgbWFpcyBpbCBmYXV0IGJpZW4gcGFzc2VyIGNlIGNvbnRleHRlLi4uXG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQuX29uRHJhZ0FuZERyb3BMYXllckNsaWNrKGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgU29ydGFibGUuY3JlYXRlKGVsZW1lbnREcmFnZ2FibGUsIHtcbiAgICAgICAgICAgICAgICBoYW5kbGUgOiBcIi5HUGxheWVyTmFtZVwiLFxuICAgICAgICAgICAgICAgIGRyYWdnYWJsZSA6IFwiLmRyYWdnYWJsZS1sYXllclwiLFxuICAgICAgICAgICAgICAgIGdob3N0Q2xhc3MgOiBcIkdQZ2hvc3RMYXllclwiLFxuICAgICAgICAgICAgICAgIGFuaW1hdGlvbiA6IDIwMCxcbiAgICAgICAgICAgICAgICAvLyBDYWxsIGV2ZW50IGZ1bmN0aW9uIG9uIGRyYWcgYW5kIGRyb3BcbiAgICAgICAgICAgICAgICBvbkVuZCA6IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIEZJWE1FIHBhcyB0ZXJycmlibGUsIG1haXMgaWwgZmF1dCBiaWVuIHBhc3NlciBjZSBjb250ZXh0ZS4uLlxuICAgICAgICAgICAgICAgICAgICBjb250ZXh0Ll9vbkRyYWdBbmREcm9wTGF5ZXJDbGljayhlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICAvLyAjIyMjIyMjIyMjIyMjIyMjIyMjI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ICAgICAgIHZhciBjaGVja2VkID0gKHR5cGVvZiBvYmoudmlzaWJpbGl0eSAhPT0gXCJ1bmRlZmluZWRcIikgPyBvYmoudmlzaWJpbGl0eSA6IHRydWU7XG4gICAgICAgIHZhciBpZCA9IHRoaXMuX2FkZFVJRChcIkdQdmlzaWJpbGl0eV9JRF9cIiArIG9iai5pZCk7XG5cbiAgICAgICAgdmFyIGlucHV0ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImlucHV0XCIpO1xuICAgICAgICBpbnB1dC5pZCA9IGlkO1xuICAgICAgICBpbnB1dC50eXBlID0gXCJjaGVja2JveFwiO1xuICAgICAgICBpbnB1dC5jaGVja2VkID0gY2hlY2tlZDtcblxuICAgICAgICB2YXIgbGFiZWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwibGFiZWxcIik7XG4gICAgICAgIGxhYmVsLmh0bWxGb3IgPSBpZDtcbiAgICAgICAgbGFiZWwuaWQgPSB0aGlzLl9hZGRVSUQoXCJHUHZpc2liaWxpdHlQaWN0b19JRF9cIiArIG9iai5pZCk7XG4gICAgICAgIGxhYmVsLmNsYXNzTmFtZSA9IFwiR1BsYXllclZpc2liaWxpdHlcIjtcbiAgICAgICAgbGFiZWwudGl0bGUgPSBcIkFmZmljaGVyL21hc3F1ZXIgbGEgY291Y2hlXCI7XG5cbiAgICAgICAgLy8gYWRkIGV2ZW50IGZvciB2aXNpYmlsaXR5IGNoYW5nZVxuICAgICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG4gICAgICAgIGlmIChpbnB1dC5hZGRFdmVudExpc3RlbmVyKSB7XG4gICAgICAgICAgICBpbnB1dC5hZGRFdmVudExpc3RlbmVyKFxuICAgICAgICAgICAgICAgIFwiY2xpY2tcIixcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICBjb250ZXh0Ll9vblZpc2liaWxpdHlMYXllckNsaWNrKGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICk7XG4gICAgICAgIH0gZWxzZSBpZiAoaW5wdXQuYXR0YWNoRXZlbnQpIHtcbiAgICAgICAgICAgIC8vIGludGVybmV0IGV4cGxvcmVyXG4gICAgICAgICAgICBpbnB1dC5hdHRhY2hFdmVudChcbiAgICAgICAgICAgICAgICBcIm9uY2xpY2tcIixcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICBjb250ZXh0Ll9vblZpc2liaWxpdHlMYXllckNsaWNrKGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBsaXN0LnB1c2goaW5wdXQpO1xuICAgICAgICBsaXN0LnB1c2gobGFiZWwpO1xuXG4gICAgICAgIHJldHVybiBsaXN0O1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBDcmVhdGlvbiBkZSBsJ2FmZmljaGFnZSBkdSBtZW51IGRlcyBvdXRpbHMgYXZhbmPDqXMgZHUgbGF5ZXIgKERPTSlcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmogLSBvcHRpb25zIGRlIGxhIGNvdWNoZSDDoCBham91dGVyIGRhbnMgbGUgbGF5ZXIgc3dpdGNoZXJcbiAgICAgKlxuICAgICAqIEByZXR1cm5zIHtET01FbGVtZW50W119IGFycmF5IGNvbnRhaW5pbmcgaW5wdXQgYW5kIGxhYmVsIGVsZW1lbnRzXG4gICAgICovXG4gICAgX2NyZWF0ZUFkdmFuY2VkVG9vbFNob3dFbGVtZW50IDogZnVuY3Rpb24gKG9iaikge1xuICAgICAgICAvLyA8aW5wdXQgdHlwZT1cImNoZWNrYm94XCIgaWQ9XCJHUHNob3dBZHZhbmNlZFRvb2xzX0lEX0xheWVyMVwiPlxuICAgICAgICAvLyA8bGFiZWwgZm9yPVwiR1BzaG93QWR2YW5jZWRUb29sc19JRF9MYXllcjFcIiBpZD1cIkdQc2hvd0Fkdm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Gl2PlxuXG4gICAgICAgIHZhciBkaXYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiZGl2XCIpO1xuICAgICAgICBkaXYuaWQgPSB0aGlzLl9hZGRVSUQoXCJHUHJlbW92ZV9JRF9cIiArIG9iai5pZCk7XG4gICAgICAgIGRpdi5jbGFzc05hbWUgPSBcIkdQbGF5ZXJSZW1vdmVcIjtcbiAgICAgICAgZGl2LnRpdGxlID0gXCJTdXBwcmltZXIgbGEgY291Y2hlXCI7XG4gICAgICAgIGRpdi5sYXllcklkID0gb2JqLmlkO1xuXG4gICAgICAgIHZhciBjb250ZXh0ID0gdGhpcztcbiAgICAgICAgaWYgKGRpdi5hZGRFdmVudExpc3RlbmVyKSB7XG4gICAgICAgICAgICBkaXYuYWRkRXZlbnRMaXN0ZW5lcihcbiAgICAgICAgICAgICAgICBcImNsaWNrXCIsXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5fb25Ecm9wTGF5ZXJDbGljayhlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApO1xuICAgICAgICB9IGVsc2UgaWYgKGRpdi5hdHRhY2hFdmVudCkge1xuICAgICAgICAgICAgLy8gaW50ZXJuZXQgZXhwbG9yZXJcbiAgICAgICAgICAgIGRpdi5hdHRhY2hFdmVudChcbiAgICAgICAgICAgICAgICBcIm9uY2xpY2tcIixcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICBjb250ZXh0Ll9vbkRyb3BMYXllckNsaWNrKGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZGl2O1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBDcmVhdGlvbiBkZSBsJ2ljb25lIGQnaW5mb3JtYXRpb24gZHUgbGF5ZXIgKERPTSlcbiAgICAgKlxuICAg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gIGlucHV0LnR5cGUgPSBcInJhbmdlXCI7XG4gICAgICAgIGlucHV0LnZhbHVlID0gb3BhY2l0eTtcblxuICAgICAgICAvLyBhZGQgZXZlbnQgZm9yIG9wYWNpdHkgY2hhbmdlXG4gICAgICAgIHZhciBjb250ZXh0ID0gdGhpcztcbiAgICAgICAgaWYgKGlucHV0LmFkZEV2ZW50TGlzdGVuZXIpIHtcbiAgICAgICAgICAgIGlucHV0LmFkZEV2ZW50TGlzdGVuZXIoXG4gICAgICAgICAgICAgICAgXCJjaGFuZ2VcIixcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICBjb250ZXh0Ll9vbkNoYW5nZUxheWVyT3BhY2l0eShlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApO1xuICAgICAgICB9IGVsc2UgaWYgKGlucHV0LmF0dGFjaEV2ZW50KSB7XG4gICAgICAgICAgICAvLyBpbnRlcm5ldCBleHBsb3JlclxuICAgICAgICAgICAgaW5wdXQuYXR0YWNoRXZlbnQoXG4gICAgICAgICAgICAgICAgXCJvbmNoYW5nZVwiLFxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQuX29uQ2hhbmdlTGF5ZXJPcGFjaXR5KGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaW5wdXQuYWRkRXZlbnRMaXN0ZW5lcikge1xuICAgICAgICAgICAgaW5wdXQuYWRkRXZlbnRMaXN0ZW5lcihcbiAgICAgICAgICAgICAgICBcImlucHV0XCIsXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5fb25DaGFuZ2VMYXllck9wYWNpdHkoZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfSBlbH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5ZXJJbmZvUGFuZWxDbG9zZWRcIjtcbiAgICAgICAgICAgIHZhciBsYXllcnMgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKFwiR1BsYXllckluZm9PcGVuZWRcIik7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxheWVycy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGxheWVyc1tpXS5jbGFzc05hbWUgPSBcIkdQbGF5ZXJJbmZvXCI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIGlmIChjbG9zZS5hZGRFdmVudExpc3RlbmVyKSB7XG4gICAgICAgICAgICBjbG9zZS5hZGRFdmVudExpc3RlbmVyKFwiY2xpY2tcIiwgb25DbG9zZUNsaWNrKTtcbiAgICAgICAgfSBlbHNlIGlmIChjbG9zZS5hdHRhY2hFdmVudCkge1xuICAgICAgICAgICAgLy8gaW50ZXJuZXQgZXhwbG9yZXJcbiAgICAgICAgICAgIGNsb3NlLmF0dGFjaEV2ZW50KFwib25jbGlja1wiLCBvbkNsb3NlQ2xpY2spO1xuICAgICAgICB9XG4gICAgICAgIGNvbnRhaW5lci5hcHBlbmRDaGlsZChjbG9zZSk7XG5cbiAgICAgICAgdmFyIGRlc2MgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiZGl2XCIpO1xuICAgICAgICBkZXNjLmlkID0gdGhpcy5fYWRkVUlEKFwiR1BsYXllckluZm9EZXNjcmlwdGlvblwiKTtcbiAgICAgICAgZGVzYy5pbm5lckhUTUwgPSBvYmouZGVzY3JpcHRpb247XG4gICAgICAgIGNvbnRhaW5lci5hcHBlbmRDaGlsZChkZXNjKTtcblxuICAgICAgICBpZiAob2JqLm1ldGFkYXRhKSB7XG4gICAgICAgICAgICB2YXIgbXRkID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcbiAgICAgICAgICAgIG10ZC5pZCA9IHRoaXMuX2FkZFVJRChcIkdQbGF5ZXJJbmZvTWV0YWRhdGFcIik7XG5cbiAgICAgICAgICAgIHZhciBtdGR0aXRsZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XG4gICAgICAgICAgICBtdGR0aXRsZS5jbGFzc05hbWUgPSBcIkdQbGF5ZXJJbmZvU3VidGl0bGVcIjtcbiAgICAgICAgICAgIG10ZHRpdGxlLmlubmVySFRNTCA9IFwiTcOpdGFkb25uw6llc1wiO1xuICAgICAgICAgICAgbXRkLmFwcGVuZENoaWxkKG10ZHRpdGxlKTtcblxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBvYmoubWV0YWRhdGEubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgdXJsbXRkID0gb2JqLm1ldGFkYXRhW2ldLnVybDtcblxuICAgICAgICAgICAgICAgIHZhciBtdGRsaW5rID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcbiAgICAgICAgICAgICAgICBtdGRsaW5rLmNsYXNzTmFtZSA9IFwiR1BsYXllckluZm9MaW5rXCI7XG5cbiAgICAgICAgICAgICAgICB2YXIgcmVmbXRkID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImFcIik7XG4gICAgICAgICAgICAgICAgcmVmbXRkLmhyZWYgPSB1cmxtdGQ7XG4gICAgICAgICAgICAgICAgcmVmbXRkLmlubmVySFRNTCA9IHVybG10ZDtcbiAgICAgICAgICAgICAgICBtdGRsaW5rLmFwcGVuZENoaWxkKHJlZm10ZCk7XG4gICAgICAgICAgICAgICAgbXRkLmFwcGVuZENoaWxkKG10ZGxpbmspO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAob2JqLm1ldGFkYXRhLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgICAgIGNvbnRhaW5lci5hcHBlbmRDaGlsZChtdGQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAg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CkgLyAxMCkgKiBNYXRoLnBvdygxMCwgcy5sZW5ndGggLSAyKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBtaW5TY2FsZSA9IDI3MDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGVnZW5kc1ttaW5TY2FsZV0gPSBvYmoubGVnZW5kc1trXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZm9yICh2YXIgc2NhbGUgaW4gbGVnZW5kcykge1xuICAgICAgICAgICAgICAgIGlmIChsZWdlbmRzLmhhc093blByb3BlcnR5KHNjYWxlKSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdXJsbGdkID0gbGVnZW5kc1tzY2FsZV0udXJsO1xuICAgICAgICAgICAgICAgICAgICAvLyBvbiBuJ2FmZmljaGUgcGFzIGxlcyBsw6lnZW5kZXMgcG9pbnRhbnQgdmVycyBcIm5vbGVnZW5kLmpwZ1wiXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdXJsbGdkID09PSBcInN0cmluZ1wiICYmIHVybGxnZC50b0xvd2VyQ2FzZSgpLmluZGV4T2YoXCJub2xlZ2VuZC5qcGdcIikgPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPIEdQbGF5ZXJJbmZvUG9wdXBcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsZ2RsaW5rID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxnZGxpbmsuY2xhc3NOYW1lID0gXCJHUGxheWVySW5mb0xpbmtcIjtcblxuICAgICAgICAgICAgICAgICAgICAgICAgbWF4U2NhbGUgPSBsZWdlbmRzW3NjYWxlXS5tYXhTY2FsZURlbm9taW5hdG9yIHx8IG1heFNjYWxlO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVmbGdkID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImFcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWZsZ2QuaHJlZiA9IHVybGxnZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZmxnZC5pbm5lckhUTUwgPSBcIkR1IDEvXCIgKyBzY2FsZSArIFwiIGF1IDEvXCIgKyBtYXhTY2FsZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxnZGxpbmsuYXBwZW5kQ2hpbGQocmVmbGdkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxnZC5hcHBlbmRDaGlsZChsZ2RsaW5rKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBsZWdlbmRzW3NjYWxlXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKE9iamVjdC5rZXlzKGxlZ2VuZHMpLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgICAgIGNvbnRhaW5lci5hcHBlbmRDaGlsZChsZ2QpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGNvbnRhaW5lcjtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBMYXllclN3aXRjaGVyRE9NO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/Controls/LayerSwitcherDOM.js\n"); + +/***/ }), + +/***/ "./src/Common/Controls/LocationSelectorDOM.js": +/*!****************************************************!*\ + !*** ./src/Common/Controls/LocationSelectorDOM.js ***! + \****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Utils/GeocodeUtils */ \"./src/Common/Utils/GeocodeUtils.js\");\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getLogger(\"LocationSelectorDOM\");\nvar LocationSelectorDOM = {\n /**\n * Add uuid to the tag ID\n * @param {String} id - id selector\n * @returns {String} uid - id selector with an unique id\n */\n _addUID: function _addUID(id) {\n var uid = this._uid ? id + \"-\" + this._uid : id;\n return uid;\n },\n /**\n * Main container (DOM)\n *\n * @returns {DOMElement} DOM element\n */\n _createMainContainerElement: function _createMainContainerElement() {\n var container = document.createElement(\"div\");\n container.className = this._addUID(\"GPlocationPoint\"); // ceci permet de gerer les groupes de points !\n container.className += \" GPwidget\";\n return container;\n },\n /**\n * Create Container Point\n * see event !\n *\n * @param {Number} id - tag ID\n * @param {Number} display - display\n * @returns {DOMElement} DOM element\n */\n _createLocationPointElement: function _createLocationPointElement(id, display) {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPlocationPoint_\" + id);\n div.className = display ? \"GPflexInput GPlocationStageFlexInput\" : \"GPflexInput GPlocationStageFlexInputHidden\";\n div.style.cssText = \"\";\n return div;\n },\n /**\n * Create Container Point\n * see event !\n *\n * @param {Number} id - tag ID\n * @param {String} text - label\n * @returns {DOMElement} DOM element\n */\n _createLocationPointLabelElement: function _createLocationPointLabelElement(id, text) {\n // contexte d'execution\n var self = this;\n var labelOrigin = document.createElement(\"label\");\n labelOrigin.id = this._addUID(\"GPlocationOriginLabel_\" + id);\n labelOrigin.htmlFor = this._addUID(\"GPlocationOrigin_\" + id);\n labelOrigin.innerHTML = text;\n labelOrigin.addEventListener(\"click\", function (e) {\n var i = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(this.id);\n var points = document.getElementsByClassName(self._addUID(\"GPlocationPoint\"));\n for (var j = 0; j < points.length; j++) {\n var tag = points[j].childNodes[0].id;\n var id = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(tag);\n document.getElementById(self._addUID(\"GPlocationPoint_\" + id)).style.cssText = \"\";\n }\n document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + i)).value = \"\";\n document.getElementById(self._addUID(\"GPlocationOrigin_\" + i)).value = \"\";\n document.getElementById(self._addUID(\"GPlocationPoint_\" + i)).style.cssText = \"\";\n document.getElementById(self._addUID(\"GPlocationOriginPointer_\" + i)).checked = false;\n document.getElementById(self._addUID(\"GPlocationOrigin_\" + i)).className = \"GPlocationOriginVisible\";\n document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + i)).className = \"GPlocationOriginHidden\";\n if (document.getElementById(self._addUID(\"GPlocationStageRemove_\" + i))) {\n document.getElementById(self._addUID(\"GPlocationStageRemove_\" + i)).className = \"GPlocationStageRemove\";\n }\n if (document.getElementById(self._addUID(\"GPlocationStageAdd\"))) {\n document.getElementById(self._addUID(\"GPlocationStageAdd\")).className = \"\";\n }\n // document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + i)).disabled = true;\n self.onLocationClearPointClick(e);\n });\n return labelOrigin;\n },\n /**\n * Create Input AutoComplete Point tag\n *\n * @param {Number} id - tag ID\n * @returns {DOMElement} DOM element\n */\n _createLocationAutoCompleteteInputElement: function _createLocationAutoCompleteteInputElement(id) {\n // contexte d'execution\n var self = this;\n var inputOrigin = document.createElement(\"input\");\n inputOrigin.id = this._addUID(\"GPlocationOrigin_\" + id);\n inputOrigin.className = \"GPlocationOriginVisible\";\n inputOrigin.type = \"text\";\n inputOrigin.placeholder = \"Saisir une adresse\";\n inputOrigin.autocomplete = \"off\";\n inputOrigin.addEventListener(\"keyup\", function (e) {\n var charCode = e.which || e.keyCode;\n if (charCode === 13 || charCode === 10 || charCode === 38 || charCode === 40) {\n return;\n }\n var i = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(this.id);\n if (document.getElementById(self._addUID(\"GPlocationOrigin_\" + i)).value.length > 2) {\n document.getElementById(self._addUID(\"GPlocationAutoCompleteList_\" + i)).style.display = \"block\";\n } else {\n document.getElementById(self._addUID(\"GPlocationAutoCompleteList_\" + i)).style.display = \"none\";\n }\n // gestionnaire d'evenement :\n // on récupère la valeur de saisie pour une requête sur le service d'autocompletion.\n // le resultat de la requête nous permet de recuperer les coordonnées du point...\n self.onAutoCompleteSearchText(e);\n });\n inputOrigin.addEventListener(\"keydown\", function (e) {\n var charCode = e.which || e.keyCode;\n var container = document.getElementById(self._addUID(\"GPlocationAutoCompleteList_\" + id));\n\n // si aucun container !?\n if (!container) {\n return;\n }\n var curr = container.getElementsByClassName(\"GPautoCompleteProposal current\");\n var list = container.getElementsByClassName(\"GPautoCompleteProposal\");\n\n // si aucune suggestion, on ne va pas plus loin !\n var length = list.length;\n if (!length) {\n return;\n }\n var current = null;\n\n // si aucun item courant, on prend le 1er !\n if (!curr.length) {\n current = list[0];\n current.className = \"GPautoCompleteProposal current\";\n current.style.color = \"#000000\";\n current.style[\"background-color\"] = \"#CEDBEF\";\n return;\n } else {\n current = curr[0];\n }\n var index = parseInt(_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(current.id), 10);\n var next = index === length - 1 ? list[0] : list[index + 1];\n var prev = index === 0 ? list[length - 1] : list[index - 1];\n current.style[\"background-color\"] = \"\";\n current.style.color = \"\";\n prev.style[\"background-color\"] = \"\";\n prev.style.color = \"\";\n next.style[\"background-color\"] = \"\";\n next.style.color = \"\";\n switch (charCode) {\n case 38:\n // arrow up\n logger.log(\"arrow up\");\n current.className = \"GPautoCompleteProposal\";\n prev.className = \"GPautoCompleteProposal current\";\n prev.style.color = \"#000000\";\n prev.style[\"background-color\"] = \"#CEDBEF\";\n break;\n case 40:\n // arrow down\n logger.log(\"arrow down\");\n current.className = \"GPautoCompleteProposal\";\n next.className = \"GPautoCompleteProposal current\";\n next.style.color = \"#000000\";\n next.style[\"background-color\"] = \"#CEDBEF\";\n break;\n case 13:\n // enter\n logger.log(\"enter\");\n current.click(e);\n break;\n }\n current.focus();\n });\n return inputOrigin;\n },\n /**\n * Create Input Coordinate Point tag\n *\n * @param {Number} id - tag ID\n * @returns {DOMElement} DOM element\n */\n _createLocationCoordinateInputElement: function _createLocationCoordinateInputElement(id) {\n // contexte d'execution\n var self = this;\n var inputOriginCoord = document.createElement(\"input\");\n inputOriginCoord.id = this._addUID(\"GPlocationOriginCoords_\" + id);\n inputOriginCoord.className = \"GPlocationOriginHidden\";\n inputOriginCoord.type = \"text\";\n inputOriginCoord.disabled = false;\n inputOriginCoord.addEventListener(\"click\", function () {\n var i = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(this.id);\n document.getElementById(self._addUID(\"GPlocationOriginLabel_\" + i)).click();\n });\n return inputOriginCoord;\n },\n /**\n * Create Show Pointer tag\n *\n * @param {Number} id - tag ID\n * @returns {DOMElement} DOM element\n */\n _createLocationPointerShowInputElement: function _createLocationPointerShowInputElement(id) {\n var inputOriginPointer = document.createElement(\"input\");\n inputOriginPointer.id = this._addUID(\"GPlocationOriginPointer_\" + id);\n inputOriginPointer.type = \"checkbox\";\n return inputOriginPointer;\n },\n /**\n * Create Input Pointer tag\n *\n * @param {Number} id - tag ID\n * @returns {DOMElement} DOM element\n */\n _createLocationPointerInputElement: function _createLocationPointerInputElement(id) {\n // contexte d'execution\n var self = this;\n var labelOriginPointer = document.createElement(\"label\");\n labelOriginPointer.id = this._addUID(\"GPlocationOriginPointerImg_\" + id);\n labelOriginPointer.htmlFor = this._addUID(\"GPlocationOriginPointer_\" + id);\n labelOriginPointer.className = \"GPlocationOriginPointerImg\";\n labelOriginPointer.title = \"Pointer un lieu sur la carte\";\n labelOriginPointer.addEventListener(\"click\", function (e) {\n e.preventDefault();\n e.stopPropagation();\n var i = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(this.id);\n var points = document.getElementsByClassName(self._addUID(\"GPlocationPoint\"));\n var j;\n var tag;\n var id;\n for (j = 0; j < points.length; j++) {\n tag = points[j].childNodes[0].id;\n id = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(tag);\n if (i !== id) {\n document.getElementById(self._addUID(\"GPlocationOriginPointer_\" + id)).checked = false;\n if (document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + id)).value === \"Pointer un lieu sur la carte\") {\n document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + id)).value = \"\";\n document.getElementById(self._addUID(\"GPlocationOrigin_\" + id)).className = \"GPlocationOriginVisible\";\n document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + id)).className = \"GPlocationOriginHidden\";\n }\n }\n }\n if (document.getElementById(self._addUID(\"GPlocationOriginPointer_\" + i)).checked) {\n document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + i)).value = \"\";\n for (j = 0; j < points.length; j++) {\n tag = points[j].childNodes[0].id;\n id = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(tag);\n document.getElementById(self._addUID(\"GPlocationPoint_\" + id)).style.cssText = \"\";\n }\n if (document.getElementById(self._addUID(\"GPlocationStageRemove_\" + i))) {\n document.getElementById(self._addUID(\"GPlocationStageRemove_\" + i)).className = \"GPlocationStageRemove\";\n }\n if (document.getElementById(self._addUID(\"GPlocationStageAdd\"))) {\n document.getElementById(self._addUID(\"GPlocationStageAdd\")).className = \"\";\n }\n document.getElementById(self._addUID(\"GPlocationOriginPointer_\" + i)).checked = false;\n document.getElementById(self._addUID(\"GPlocationOrigin_\" + i)).className = \"GPlocationOriginVisible\";\n document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + i)).className = \"GPlocationOriginHidden\";\n } else {\n document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + i)).value = \"Pointer un lieu sur la carte\";\n for (j = 0; j < points.length; j++) {\n tag = points[j].childNodes[0].id;\n id = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(tag);\n if (i === id) {\n document.getElementById(self._addUID(\"GPlocationPoint_\" + id)).style.cssText = \"\";\n } else {\n document.getElementById(self._addUID(\"GPlocationPoint_\" + id)).style.display = \"none\";\n }\n }\n if (document.getElementById(self._addUID(\"GPlocationStageRemove_\" + i))) {\n document.getElementById(self._addUID(\"GPlocationStageRemove_\" + i)).className = \"GPlocationOriginHidden\";\n }\n if (document.getElementById(self._addUID(\"GPlocationStageAdd\"))) {\n document.getElementById(self._addUID(\"GPlocationStageAdd\")).className = \"GPlocationOriginHidden\";\n }\n document.getElementById(self._addUID(\"GPlocationOriginPointer_\" + i)).checked = true;\n document.getElementById(self._addUID(\"GPlocationOrigin_\" + i)).className = \"GPlocationOriginHidden\";\n document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + i)).className = \"GPlocationOriginVisible\";\n document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + i)).disabled = true;\n }\n // gestionnaire d'evenement :\n // on stocke la valeur du point, utilisée pour la requête sur le service de calcul d'itiniraire\n self.onActivateMapPointClick(e);\n });\n return labelOriginPointer;\n },\n /**\n * Create Remove Point tag\n * see event !\n *\n * @param {Number} id - tag ID\n * @returns {DOMElement} DOM element\n */\n _createLocationRemovePointElement: function _createLocationRemovePointElement(id) {\n // contexte d'execution\n var self = this;\n var divRm = document.createElement(\"div\");\n divRm.id = this._addUID(\"GPlocationStageRemove_\" + id);\n divRm.className = \"GPlocationStageRemove\";\n divRm.title = \"Supprimer l'étape\";\n divRm.addEventListener(\"click\", function (e) {\n var points = document.getElementsByClassName(self._addUID(\"GPlocationPoint\"));\n var last = points.length - 1;\n var start = points[0].childNodes[0].id;\n var end = points[last].childNodes[0].id;\n var startID = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(start);\n var endID = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(end);\n if (id !== startID && id !== endID) {\n var i = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(this.id);\n document.getElementById(self._addUID(\"GPlocationPoint_\" + i)).className = \"GPflexInput GPlocationStageFlexInputHidden\";\n document.getElementById(self._addUID(\"GPlocationOrigin_\" + i)).value = \"\";\n document.getElementById(self._addUID(\"GPlocationOrigin_\" + i)).className = \"GPlocationOriginVisible\";\n document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + i)).value = \"\";\n document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + i)).className = \"GPlocationOriginHidden\";\n document.getElementById(self._addUID(\"GPlocationStageAdd\")).style.display = \"\";\n // Moving up exclusions picto\n // var exclusionsPictoTop = document.getElementById(self._addUID(\"GPshowLocationExclusionsPicto\")).style.top;\n // document.getElementById(self._addUID(\"GPshowLocationExclusionsPicto\")).style.top = (parseInt(exclusionsPictoTop) - 33).toString() + \"px\";\n\n // gestionnaire d'evenement :\n // on supprime le point, utilisé pour la requête sur le service d'itiniraire\n self.onLocationRemovePointClick(e);\n }\n });\n return divRm;\n },\n /**\n * Create Add Point tag\n * see event !\n *\n * @returns {DOMElement} DOM element\n */\n _createLocationAddPointElement: function _createLocationAddPointElement() {\n // contexte d'execution\n var self = this;\n var divAdd = document.createElement(\"div\");\n divAdd.id = this._addUID(\"GPlocationStageAdd\");\n divAdd.title = \"Ajouter une étape\";\n divAdd.addEventListener(\"click\", function (e) {\n var lastStage = 1;\n var nbStages = 0;\n var points = document.getElementsByClassName(self._addUID(\"GPlocationPoint\"));\n for (var i = 1; i < points.length - 1; i++) {\n var tag = points[i].childNodes[0].id;\n var id = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(tag);\n if (document.getElementById(self._addUID(\"GPlocationPoint_\" + id))) {\n if (document.getElementById(self._addUID(\"GPlocationPoint_\" + id)).className === \"GPflexInput GPlocationStageFlexInputHidden\") {\n if (lastStage === 1) {\n lastStage = id;\n }\n } else {\n nbStages++;\n }\n }\n }\n // FIXME algo à revoir : lastStage = id hors si id = 300 sur 3 points !?\n if (lastStage < points.length) {\n document.getElementById(self._addUID(\"GPlocationPoint_\" + lastStage)).className = \"GPflexInput GPlocationStageFlexInput\";\n // Moving down exclusions picto\n // var exclusionsPictoTop = document.getElementById(self._addUID(\"GPshowLocationExclusionsPicto\")).style.top;\n // document.getElementById(self._addUID(\"GPshowLocationExclusionsPicto\")).style.top = (parseInt(exclusionsPictoTop) + 33).toString() + \"px\";\n }\n\n if (nbStages === 4) {\n document.getElementById(self._addUID(\"GPlocationStageAdd\")).style.display = \"none\";\n }\n // gestionnaire d'evenement :\n // on ajoute le point, utilisé pour la requête sur le service d'itiniraire\n self.onLocationAddPointClick(e);\n });\n return divAdd;\n },\n /**\n * Create Results autocompletion to the point\n * see event!\n *\n * @param {Number} id - tag ID\n * @returns {DOMElement} DOM element\n */\n _createLocationAutoCompleteResultElement: function _createLocationAutoCompleteResultElement(id) {\n // contexte d'execution\n var self = this;\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPlocationAutoCompleteList_\" + id);\n div.className = \"GPadvancedAutoCompleteList\";\n if (div.addEventListener) {\n div.addEventListener(\"click\", function (e) {\n self.onAutoCompletedResultsItemClick(e);\n document.getElementById(self._addUID(\"GPlocationAutoCompleteList_\" + id)).style.display = \"none\";\n }, false);\n } else if (div.attachEvent) {\n div.attachEvent(\"onclick\", function (e) {\n self.onAutoCompletedResultsItemClick(e);\n document.getElementById(self._addUID(\"GPlocationAutoCompleteList_\" + id)).style.display = \"none\";\n });\n }\n return div;\n },\n /**\n * Autocompletion result to a point.\n * Proposals are dynamically filled in Javascript by autocomplete service\n *\n * TODO formaliser le contenu des reponse\n *\n * @param {Number} id - tag ID\n * @param {Object} location - suggested location result\n * @param {Number} n - number of the point\n */\n _createLocationAutoCompletedLocationElement: function _createLocationAutoCompletedLocationElement(id, location, n) {\n var container = document.getElementById(this._addUID(\"GPlocationAutoCompleteList_\" + id));\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"AutoCompletedLocation_\" + n);\n div.className = \"GPautoCompleteProposal\";\n div.innerHTML = _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getSuggestedLocationFreeform(location);\n container.appendChild(div);\n },\n /**\n * Display Coordinate\n * @param {String} value - a Coordinate\n */\n GPdisplayCoordinate: function GPdisplayCoordinate(value) {\n var points = document.getElementsByClassName(this._addUID(\"GPlocationPoint\"));\n for (var i = 0; i < points.length; i++) {\n var tag = points[i].childNodes[0].id;\n var id1 = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(tag);\n if (document.getElementById(this._addUID(\"GPlocationOriginPointer_\" + id1)).checked) {\n document.getElementById(this._addUID(\"GPlocationOriginCoords_\" + id1)).value = value;\n document.getElementById(this._addUID(\"GPlocationOriginCoords_\" + id1)).disabled = false;\n for (var j = 0; j < points.length; j++) {\n tag = points[j].childNodes[0].id;\n var id2 = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(tag);\n document.getElementById(this._addUID(\"GPlocationPoint_\" + id2)).style.cssText = \"\";\n if (document.getElementById(this._addUID(\"GPlocationStageRemove_\" + id2))) {\n document.getElementById(this._addUID(\"GPlocationStageRemove_\" + id2)).className = \"GPlocationStageRemove\";\n }\n }\n document.getElementById(this._addUID(\"GPlocationOriginPointer_\" + id1)).checked = false;\n if (document.getElementById(this._addUID(\"GPlocationStageAdd\"))) {\n document.getElementById(this._addUID(\"GPlocationStageAdd\")).className = \"\";\n }\n return;\n }\n }\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (LocationSelectorDOM);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ29udHJvbHMvTG9jYXRpb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XBsZXRlUHJvcG9zYWxcIik7XG5cbiAgICAgICAgICAgIC8vIHNpIGF1Y3VuZSBzdWdnZXN0aW9uLCBvbiBuZSB2YSBwYXMgcGx1cyBsb2luICFcbiAgICAgICAgICAgIHZhciBsZW5ndGggPSBsaXN0Lmxlbmd0aDtcbiAgICAgICAgICAgIGlmICghbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgY3VycmVudCA9IG51bGw7XG5cbiAgICAgICAgICAgIC8vIHNpIGF1Y3VuIGl0ZW0gY291cmFudCwgb24gcHJlbmQgbGUgMWVyICFcbiAgICAgICAgICAgIGlmICghY3Vyci5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50ID0gbGlzdFswXTtcbiAgICAgICAgICAgICAgICBjdXJyZW50LmNsYXNzTmFtZSA9IFwiR1BhdXRvQ29tcGxldGVQcm9wb3NhbCBjdXJyZW50XCI7XG4gICAgICAgICAgICAgICAgY3VycmVudC5zdHlsZS5jb2xvciA9IFwiIzAwMDAwMFwiO1xuICAgICAgICAgICAgICAgIGN1cnJlbnQuc3R5bGVbXCJiYWNrZ3JvdW5kLWNvbG9yXCJdID0gXCIjQ0VEQkVGXCI7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50ID0gY3VyclswXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGluZGV4ID0gcGFyc2VJbnQoSUQuaW5kZXgoY3VycmVudC5pZCksIDEwKTtcbiAgICAgICAgICAgIHZhciBuZXh0ID0gKGluZGV4ID09PSBsZW5ndGggLSAxKSA/IGxpc3RbMF0gOiBsaXN0W2luZGV4ICsgMV07XG4gICAgICAgICAgICB2YXIgcHJldiA9IChpbmRleCA9PT0gMCkgPyBsaXN0W2xlbmd0aCAtIDFdIDogbGlzdFtpbmRleCAtIDFdO1xuXG4gICAgICAgICAgICBjdXJyZW50LnN0eWxlW1wiYmFja2dyb3VuZC1jb2xvclwiXSA9IFwiXCI7XG4gICAgICAgICAgICBjdXJyZW50LnN0eWxlLmNvbG9yID0gXCJcIjtcbiAgICAgICAgICAgIHByZXYuc3R5bGVbXCJiYWNrZ3JvdW5kLWNvbG9yXCJdID0gXCJcIjtcbiAgICAgICAgICAgIHByZXYuc3R5bGUuY29sb3IgPSBcIlwiO1xuICAgICAgICAgICAgbmV4dC5zdHlsZVtcImJhY2tncm91bmQtY29sb3JcIl0gPSBcIlwiO1xuICAgICAgICAgICAgbmV4dC5zdHlsZS5jb2xvciA9IFwiXCI7XG5cbiAgICAgICAgICAgIHN3aXRjaCAoY2hhckNvZGUpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDM4OiAvLyBhcnJvdyB1cFxuICAgICAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwiYXJyb3cgdXBcIik7XG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnQuY2xhc3NOYW1lID0gXCJHUGF1dG9Db21wbGV0ZVByb3Bvc2FsXCI7XG4gICAgICAgICAgICAgICAgICAgIHByZXYuY2xhc3NOYW1lID0gXCJHUGF1dG9Db21wbGV0ZVByb3Bvc2FsIGN1cnJlbnRcIjtcbiAgICAgICAgICAgICAgICAgICAgcHJldi5zdHlsZS5jb2xvciA9IFwiIzAwMDAwMFwiO1xuICAgICAgICAgICAgICAgICAgICBwcmV2LnN0eWxlW1wiYmFja2dyb3VuZC1jb2xvclwiXSA9IFwiI0NFREJFRlwiO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIDQwOiAvLyBhcnJvdyBkb3duXG4gICAgICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJhcnJvdyBkb3duXCIpO1xuICAgICAgICAgICAgICAgICAgICBjdXJyZW50LmNsYXNzTmFtZSA9IFwiR1BhdXRvQ29tcGxldGVQcm9wb3NhbFwiO1xuICAgICAgICAgICAgICAgICAgICBuZXh0LmNsYXNzTmFtZSA9IFwiR1BhdXRvQ29tcGxldGVQcm9wb3NhbCBjdXJyZW50XCI7XG4gICAgICAgICAgICAgICAgICAgIG5leHQuc3R5bGUuY29sb3IgPSBcIiMwMDAwMDBcIjtcbiAgICAgICAgICAgICAgICAgICAgbmV4dC5zdHlsZVtcImJhY2tncm91bmQtY29sb3JcIl0gPSBcIiNDRURCRUZcIjtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzogLy8gZW50ZXJcbiAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcImVudGVyXCIpO1xuICAgICAgICAgICAgICAgICAgICBjdXJyZW50LmNsaWNrKGUpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY3VycmVudC5mb2N1cygpO1xuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gaW5wdXRPcmlnaW47XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIENyZWF0ZSBJbnB1dCBDb29yZGluYXRlIFBvaW50IHRhZ1xuICAgICAqXG4gICAgICogQHBhcmFtIHtOdW1iZXJ9IGlkIC0gdGFnIElEXG4gICAgICogQHJldHVybnMge0RPTUVsZW1lbnR9IERPTSBlbGVtZW50XG4gICAgICovXG4gICAgX2NyZWF0ZUxvY2F0aW9uQ29vcmRpbmF0ZUlucHV0RWxlbWVudCA6IGZ1bmN0aW9uIChpZCkge1xuICAgICAgICAvLyBjb250ZXh0ZSBkJ2V4ZWN1dGlvblxuICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XG5cbiAgICAgICAgdmFyIGlucHV0T3JpZ2luQ29vcmQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiaW5wdXRcIik7XG4gICAgICAgIGlucHV0T3JpZ2luQ29vcmQuaWQgPSB0aGlzLl9hZGRVSUQoXCJHUGxv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BhZ2F0aW9uKCk7XG4gICAgICAgICAgICB2YXIgaSA9IElELmluZGV4KHRoaXMuaWQpO1xuICAgICAgICAgICAgdmFyIHBvaW50cyA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoc2VsZi5fYWRkVUlEKFwiR1Bsb2NhdGlvblBvaW50XCIpKTtcbiAgICAgICAgICAgIHZhciBqO1xuICAgICAgICAgICAgdmFyIHRhZztcbiAgICAgICAgICAgIHZhciBpZDtcbiAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBwb2ludHMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICB0YWcgPSBwb2ludHNbal0uY2hpbGROb2Rlc1swXS5pZDtcbiAgICAgICAgICAgICAgICBpZCA9IElELmluZGV4KHRhZyk7XG4gICAgICAgICAgICAgICAgaWYgKGkgIT09IGlkKSB7XG4gICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNlbGYuX2FkZFVJRChcIkdQbG9jYXRpb25PcmlnaW5Qb2ludGVyX1wiICsgaWQpKS5jaGVja2VkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGlmIChkb2N1bWVudC5nZXRFbGVtZW50QnlJZChzZWxmLl9hZGRVSUQoXCJHUGxvY2F0aW9uT3JpZ2luQ29vcmRzX1wiICsgaWQpKS52YWx1ZSA9PT0gXCJQb2ludGVyIHVuIGxpZXUgc3VyIGxhIGNhcnRlXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNlbGYuX2FkZFVJRChcIkdQbG9jYXRpb25PcmlnaW5Db29yZHNfXCIgKyBpZCkpLnZhbHVlID0gXCJcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNlbGYuX2FkZFVJRChcIkdQbG9jYXRpb25PcmlnaW5fXCIgKyBpZCkpLmNsYXNzTmFtZSA9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AgICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgcG9pbnRzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgIHRhZyA9IHBvaW50c1tqXS5jaGlsZE5vZGVzWzBdLmlkO1xuICAgICAgICAgICAgICAgICAgICBpZCA9IElELmluZGV4KHRhZyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpID09PSBpZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoc2VsZi5fYWRkVUlEKFwiR1Bsb2NhdGlvblBvaW50X1wiICsgaWQpKS5zdHlsZS5jc3NUZXh0ID0gXCJcIjtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNlbGYuX2FkZFVJRChcIkdQbG9jYXRpb25Qb2ludF9cIiArIGlkKSkuc3R5bGUuZGlzcGxheSA9IFwibm9uZVwiO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChkb2N1bWVudC5nZXRFbGVtZW50QnlJZChzZWxmLl9hZGRVSUQoXCJHUGxvY2F0aW9uU3RhZ2VSZW1vdmVfXCIgKyBpKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoc2VsZi5fYWRkVUlEKFwiR1Bsb2NhdGlvblN0YWdlUmVtb3ZlX1wiICsgaSkpLmNsYXNzTmFtZSA9IFwiR1Bsb2NhdGlvbk9yaWdpbkhpZGRlblwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoc2VsZi5fYWRkVUlEKFwiR1Bsb2NhdGlvblN0YWdlQWRkXCIpKSkge1xuICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXR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AgICAgIGlmIChsYXN0U3RhZ2UgPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U3RhZ2UgPSBpZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5iU3RhZ2VzKys7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBGSVhNRSBhbGdvIMOgIHJldm9pciA6IGxhc3RTdGFnZSA9IGlkIGhvcnMgc2kgaWQgPSAzMDAgc3VyIDMgcG9pbnRzICE/XG4gICAgICAgICAgICBpZiAobGFzdFN0YWdlIDwgcG9pbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNlbGYuX2FkZFVJRChcIkdQbG9jYXRpb25Qb2ludF9cIiArIGxhc3RTdGFnZSkpLmNsYXNzTmFtZSA9IFwiR1BmbGV4SW5wdXQgR1Bsb2NhdGlvblN0YWdlRmxleElucHV0XCI7XG4gICAgICAgICAgICAgICAgLy8gTW92aW5nIGRvd24gZXhjbHVzaW9ucyBwaWN0b1xuICAgICAgICAgICAgICAgIC8vIHZhciBleGNsdXNpb25zUGljdG9Ub3AgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChzZWxmLl9hZGRVSUQoXCJHUHNob3dMb2NhdGlvbkV4Y2x1c2lvbnNQaWN0b1wiKSkuc3R5bGUudG9wO1xuICAgICAgICAgICAgICAgIC8vIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNlbGYuX2FkZFVJRChcIkdQc2hvd0xvY2F0aW9uRXhjbHVzaW9uc1BpY3RvXCIpKS5zdHlsZS50b3AgPSAocGFyc2VJbnQoZXhjbHVzaW9uc1BpY3RvVG9wKSArIDMzKS50b1N0cmluZygpICsgXCJweFwiO1xuICAgICAgICA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5SWQodGhpcy5fYWRkVUlEKFwiR1Bsb2NhdGlvblN0YWdlUmVtb3ZlX1wiICsgaWQyKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbG9jYXRpb25TdGFnZVJlbW92ZV9cIiArIGlkMikpLmNsYXNzTmFtZSA9IFwiR1Bsb2NhdGlvblN0YWdlUmVtb3ZlXCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQodGhpcy5fYWRkVUlEKFwiR1Bsb2NhdGlvbk9yaWdpblBvaW50ZXJfXCIgKyBpZDEpKS5jaGVja2VkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbG9jYXRpb25TdGFnZUFkZFwiKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQodGhpcy5fYWRkVUlEKFwiR1Bsb2NhdGlvblN0YWdlQWRkXCIpKS5jbGFzc05hbWUgPSBcIlwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBMb2NhdGlvblNlbGVjdG9yRE9NO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/Controls/LocationSelectorDOM.js\n"); + +/***/ }), + +/***/ "./src/Common/Controls/MousePositionDOM.js": +/*!*************************************************!*\ + !*** ./src/Common/Controls/MousePositionDOM.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar MousePositionDOM = {\n /**\n * Add uuid to the tag ID\n * @param {String} id - id selector\n * @returns {String} uid - id selector with an unique id\n */\n _addUID: function _addUID(id) {\n var uid = this._uid ? id + \"-\" + this._uid : id;\n return uid;\n },\n /**\n * Main container (DOM)\n *\n * @returns {DOMElement} DOM element\n */\n _createMainContainerElement: function _createMainContainerElement() {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPmousePosition\");\n container.className = \"GPwidget\";\n return container;\n },\n // ################################################################### //\n // ################### Methods of main container ##################### //\n // ################################################################### //\n\n /**\n * Hidden checkbox for minimizing/maximizing\n *\n * @returns {DOMElement} DOM element\n */\n _createShowMousePositionElement: function _createShowMousePositionElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPshowMousePosition\");\n input.type = \"checkbox\";\n return input;\n },\n /**\n * Show mouse position control\n * @param {Boolean} isDesktop - specifies if the support is desktop or tactile\n *\n * @returns {DOMElement} DOM element\n */\n _createShowMousePositionPictoElement: function _createShowMousePositionPictoElement(isDesktop) {\n // contexte d'execution\n var self = this;\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowMousePositionPicto\");\n label.className = \"GPshowAdvancedToolPicto\";\n label.htmlFor = this._addUID(\"GPshowMousePosition\");\n label.title = \"Afficher les coordonnées du curseur\";\n\n // FIXME detection disponible dans le JS !\n // Detection : test for desktop or tactile\n // var isDesktop = true;\n // var userAgent = window.navigator.userAgent.toLowerCase();\n // if (userAgent.indexOf(\"iphone\") !== -1 ||\n // userAgent.indexOf(\"ipod\") !== -1 ||\n // userAgent.indexOf(\"ipad\") !== -1 ||\n // userAgent.indexOf(\"android\") !== -1 ||\n // userAgent.indexOf(\"mobile\") !== -1 ||\n // userAgent.indexOf(\"blackberry\") !== -1 ||\n // userAgent.indexOf(\"tablet\") !== -1 ||\n // userAgent.indexOf(\"phone\") !== -1 ||\n // userAgent.indexOf(\"touch\") !== -1 ) {\n // isDesktop = false;\n // }\n // if (userAgent.indexOf(\"msie\") !== -1 ||\n // userAgent.indexOf(\"trident\") !== -1) {\n // isDesktop = true;\n // }\n\n // Show map center localisation if panel opened and tactile support\n label.addEventListener(\"click\", function (e) {\n var mapCenterClass = \"\";\n if (!document.getElementById(self._addUID(\"GPshowMousePosition\")).checked && !isDesktop) {\n mapCenterClass = \"GPmapCenterVisible\";\n }\n document.getElementById(\"GPmapCenter\").className = mapCenterClass;\n self.onShowMousePositionClick(e);\n });\n var spanOpen = document.createElement(\"span\");\n spanOpen.id = this._addUID(\"GPshowMousePositionOpen\");\n spanOpen.className = \"GPshowAdvancedToolOpen\";\n label.appendChild(spanOpen);\n return label;\n },\n /**\n * mouse position panel\n *\n * @returns {DOMElement} DOM element\n */\n _createMousePositionPanelElement: function _createMousePositionPanelElement() {\n var panel = document.createElement(\"div\");\n panel.id = this._addUID(\"GPmousePositionPanel\");\n panel.className = \"GPpanel\";\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n // div.appendChild(this._createMousePositionPanelHeaderElement());\n // div.appendChild(this._createMousePositionPanelBasicElement());\n // div.appendChild(this._createShowMousePositionSettingsElement());\n // div.appendChild(this._createMousePositionSettingsElement());\n\n return panel;\n },\n /**\n * Map center localisation (tactile use)\n *\n * @returns {DOMElement} container\n */\n _createMapCenter: function _createMapCenter() {\n var div = document.createElement(\"div\");\n div.id = \"GPmapCenter\";\n div.className = \"\";\n return div;\n },\n // ################################################################### //\n // ####################### Panel container ########################### //\n // ################################################################### //\n\n /**\n * @returns {DOMElement} container\n */\n _createMousePositionPanelHeaderElement: function _createMousePositionPanelHeaderElement() {\n var container = document.createElement(\"div\");\n container.className = \"GPpanelHeader\";\n var divTitle = document.createElement(\"div\");\n divTitle.className = \"GPpanelTitle\";\n divTitle.innerHTML = \"Coordonnées\";\n container.appendChild(divTitle);\n var divClose = document.createElement(\"div\");\n divClose.id = \"GPmousePositionPanelClose\";\n divClose.className = \"GPpanelClose\";\n divClose.title = \"Fermer le panneau\";\n\n // Link panel close / visibility checkbox\n var self = this;\n if (divClose.addEventListener) {\n divClose.addEventListener(\"click\", function () {\n document.getElementById(self._addUID(\"GPshowMousePositionPicto\")).click();\n }, false);\n } else if (divClose.attachEvent) {\n divClose.attachEvent(\"onclick\", function () {\n document.getElementById(self._addUID(\"GPshowMousePositionPicto\")).click();\n });\n }\n container.appendChild(divClose);\n return container;\n },\n /**\n * coordinate panel\n * @param {Boolean} [displayAltitude] - specifies if the altitude panel must be displayed\n * @param {Boolean} [displayCoordinates] - specifies if the coordinates panel must be displayed\n * @param {Boolean} [editCoordinates] - specifies if the coordinates edition is allowed\n * @param {Boolean} [currentProjectionUnits] - specifies if the current projection units\n *\n * FIXME\n * call this._createMousePositionPanelBasicCoordinateElement\n * call this._createMousePositionPanelBasicAltitudeElement\n *\n * @returns {DOMElement} DOM element\n */\n _createMousePositionPanelBasicElement: function _createMousePositionPanelBasicElement(displayAltitude, displayCoordinates, editCoordinates, currentProjectionUnits) {\n // default Values\n displayAltitude = typeof displayAltitude === \"undefined\" ? true : displayAltitude;\n displayCoordinates = typeof displayCoordinates === \"undefined\" ? true : displayCoordinates;\n editCoordinates = typeof editCoordinates === \"undefined\" ? false : editCoordinates;\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPmousePositionBasicPanel\");\n\n // FIXME on devrait decomposer la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n container.appendChild(this._createMousePositionPanelBasicCoordinateElement(displayCoordinates, editCoordinates, currentProjectionUnits));\n container.appendChild(this._createMousePositionPanelEditToolsElement(editCoordinates));\n container.appendChild(this._createMousePositionPanelBasicAltitudeElement(displayAltitude));\n return container;\n },\n /**\n * create coordinate elements\n *\n * @param {String} coordType - (\"Lon\" ou \"Lat\")\n * @param {Boolean} [editCoordinates=false] - specifies if the coordinates edition is allowed\n *\n * @returns {Array} list of DOM elements\n */\n _createCoordinateElement: function _createCoordinateElement(coordType, editCoordinates) {\n var context = this;\n if ([\"Lon\", \"Lat\"].indexOf(coordType) === -1) {\n return [];\n }\n var list = [];\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPmousePosition\" + coordType);\n input.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n input.readOnly = true;\n if (editCoordinates) {\n input.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(true);\n });\n input.addEventListener(\"change\", function (e) {\n this.classList.remove(\"error\");\n var valid = context.validateExtentCoordinate(coordType, this.value, e);\n valid ? this.classList.remove(\"error\") : this.classList.add(\"error\");\n });\n }\n list.push(input);\n var span = document.createElement(\"span\");\n span.className = \"GPmousePositionUnits\";\n list.push(span);\n return list;\n },\n /**\n *\n * @param {String} coordType - (\"Lon\" ou \"Lat\")\n * @param {Boolean} [editCoordinates=false] - specifies if the coordinates edition is allowed\n *\n * @returns {Array} list of DOM elements\n */\n _createDMSCoordinateElement: function _createDMSCoordinateElement(coordType, editCoordinates) {\n if ([\"Lon\", \"Lat\"].indexOf(coordType) === -1) {\n return [];\n }\n var context = this;\n var list = [];\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPmousePosition\" + coordType + \"Degrees\");\n input.className = \"GPSexagesimal\";\n input.setAttribute(\"name\", \"degrees\");\n input.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n input.readOnly = true;\n input.dataset.min = 0;\n input.dataset.max = coordType === \"Lon\" ? 180 : 90;\n if (editCoordinates) {\n input.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(true);\n });\n input.addEventListener(\"change\", function () {\n this.classList.remove(\"error\");\n var valid = context._checkDMSDegrees(coordType, this);\n valid ? this.classList.remove(\"error\") : this.classList.add(\"error\");\n });\n }\n list.push(input);\n var span = document.createElement(\"span\");\n span.className = \"GPmousePositionSexagesimalLabel\";\n span.innerHTML = \"°\";\n list.push(span);\n var input1 = document.createElement(\"input\");\n input1.id = this._addUID(\"GPmousePosition\" + coordType + \"Minutes\");\n input1.className = \"GPSexagesimal\";\n input1.setAttribute(\"name\", \"minutes\");\n input1.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n input1.readOnly = true;\n input1.dataset.min = 0;\n input1.dataset.max = 59;\n if (editCoordinates) {\n input1.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(true);\n });\n input1.addEventListener(\"change\", function () {\n this.classList.remove(\"error\");\n var valid = context._checkDMSElement(this);\n valid ? this.classList.remove(\"error\") : this.classList.add(\"error\");\n });\n }\n list.push(input1);\n var span1 = document.createElement(\"span\");\n span1.className = \"GPmousePositionSexagesimalLabel\";\n span1.innerHTML = \"'\";\n list.push(span1);\n var input2 = document.createElement(\"input\");\n input2.id = this._addUID(\"GPmousePosition\" + coordType + \"Seconds\");\n input2.className = \"GPSexagesimalsec\";\n input2.setAttribute(\"name\", \"seconds\");\n input2.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n input2.readOnly = true;\n input2.dataset.min = 0;\n input2.dataset.max = 59;\n if (editCoordinates) {\n input2.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(true);\n });\n input2.addEventListener(\"change\", function () {\n this.classList.remove(\"error\");\n var valid = context._checkDMSElement(this, true);\n valid ? this.classList.remove(\"error\") : this.classList.add(\"error\");\n });\n }\n list.push(input2);\n var span2 = document.createElement(\"span\");\n span2.className = \"GPmousePositionSexagesimalLabel\";\n span2.innerHTML = \"''\";\n list.push(span2);\n var select = document.createElement(\"select\");\n select.id = this._addUID(\"GPmousePosition\" + coordType + \"Direction\");\n select.className = \"GPmousePositionDirection\";\n select.setAttribute(\"name\", \"direction\");\n select.disabled = true;\n var option = document.createElement(\"option\");\n option.value = coordType === \"Lon\" ? \"E\" : \"N\";\n option.innerHTML = coordType === \"Lon\" ? \"E\" : \"N\";\n select.appendChild(option);\n var option1 = document.createElement(\"option\");\n option1.value = coordType === \"Lon\" ? \"O\" : \"S\";\n option1.innerHTML = coordType === \"Lon\" ? \"O\" : \"S\";\n select.appendChild(option1);\n list.push(select);\n return list;\n },\n /**\n * @param {Boolean} [display=false] - specifies if the coordinates panel must be displayed\n * @param {Boolean} [editCoordinates] - specifies if the coordinates edition is allowed\n * @param {Boolean} [currentProjectionUnits] - specifies if the current projection units\n *\n * @returns {DOMElement} container\n */\n _createMousePositionPanelBasicCoordinateElement: function _createMousePositionPanelBasicCoordinateElement(display, editCoordinates, currentProjectionUnits) {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPmousePositionCoordinate\");\n div.style.display = display ? \"block\" : \"none\";\n\n // latitude\n var divLat = document.createElement(\"div\");\n var spanLat = document.createElement(\"span\");\n spanLat.className = \"GPmousePositionLabel\";\n spanLat.id = this._addUID(\"GPmousePositionLatLabel\");\n spanLat.innerHTML = \"Latitude : \";\n divLat.appendChild(spanLat);\n var span = document.createElement(\"span\");\n span.id = this._addUID(\"GPmousePositionLatCoordinate\");\n var arrayCoords;\n if (currentProjectionUnits === \"DMS\") {\n arrayCoords = this._createDMSCoordinateElement(\"Lat\", editCoordinates);\n } else {\n arrayCoords = this._createCoordinateElement(\"Lat\", editCoordinates);\n }\n for (var i = 0; i < arrayCoords.length; i++) {\n span.appendChild(arrayCoords[i]);\n }\n divLat.appendChild(span);\n div.appendChild(divLat);\n\n // longitude\n var divLon = document.createElement(\"div\");\n var spanLon = document.createElement(\"span\");\n spanLon.className = \"GPmousePositionLabel\";\n spanLon.id = this._addUID(\"GPmousePositionLonLabel\");\n spanLon.innerHTML = \"Longitude : \";\n divLon.appendChild(spanLon);\n var span1 = document.createElement(\"span\");\n span1.id = this._addUID(\"GPmousePositionLonCoordinate\");\n var arrayCoords1;\n if (currentProjectionUnits === \"DMS\") {\n arrayCoords1 = this._createDMSCoordinateElement(\"Lon\", editCoordinates);\n } else {\n arrayCoords1 = this._createCoordinateElement(\"Lon\", editCoordinates);\n }\n for (var j = 0; j < arrayCoords1.length; j++) {\n span1.appendChild(arrayCoords1[j]);\n }\n divLon.appendChild(span1);\n div.appendChild(divLon);\n return div;\n },\n /**\n * @param {Boolean} [display=false] - specifies if the altitude panel must be displayed\n *\n * @returns {DOMElement} container\n */\n _createMousePositionPanelBasicAltitudeElement: function _createMousePositionPanelBasicAltitudeElement(display) {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPmousePositionAltitude\");\n div.style.display = display ? \"block\" : \"none\";\n var spanLabel = document.createElement(\"span\");\n spanLabel.className = \"GPmousePositionLabel\";\n spanLabel.innerHTML = \"Altitude : \";\n div.appendChild(spanLabel);\n var spanAlt = document.createElement(\"span\");\n spanAlt.className = \"GPmousePositionCoords\";\n spanAlt.id = this._addUID(\"GPmousePositionAlt\");\n spanAlt.innerHTML = \"...\";\n div.appendChild(spanAlt);\n var spanUnits = document.createElement(\"span\");\n spanUnits.className = \"GPmousePositionAltitudeUnits\";\n spanUnits.innerHTML = \"m\";\n div.appendChild(spanUnits);\n return div;\n },\n /**\n * @param {Boolean} [editCoordinates=false] - specifies if the coordinates edition is allowed\n *\n * @returns {DOMElement} container\n */\n _createMousePositionPanelEditToolsElement: function _createMousePositionPanelEditToolsElement(editCoordinates) {\n var context = this;\n var div = document.createElement(\"div\");\n div.className = \"GPmousePositionPanelEditTools\";\n div.id = this._addUID(\"GPmousePositionPanelEditTools\");\n if (!editCoordinates) {\n div.style.display = \"none\";\n }\n var span1 = document.createElement(\"span\");\n span1.className = \"GPmousePositionEditTool\";\n span1.id = this._addUID(\"GPmousePositionLocate\");\n span1.title = editCoordinates === true ? \"Cliquer pour saisir des coordonnées\" : \"\";\n if (editCoordinates) {\n span1.addEventListener(\"click\", function () {\n context.onMousePositionEditModeLocateClick();\n });\n }\n div.appendChild(span1);\n var span2 = document.createElement(\"span\");\n span2.className = \"GPmousePositionEditTool\";\n span2.id = this._addUID(\"GPmousePositionCloseEdit\");\n span2.title = \"Quitter la saisie des coordonnées\";\n span2.style.display = \"none\";\n if (editCoordinates) {\n span2.addEventListener(\"click\", function () {\n context.onMousePositionEditModeClick(false);\n });\n }\n div.appendChild(span2);\n return div;\n },\n // ################################################################### //\n // #################### Settings container ########################### //\n // ################################################################### //\n\n /**\n * @param {Boolean} [display=false] - specifies if the settings panel must be displayed\n *\n * @returns {DOMElement[]} array containing input and label elements\n */\n _createShowMousePositionSettingsElement: function _createShowMousePositionSettingsElement(display) {\n var list = [];\n var context = this;\n var input = document.createElement(\"input\");\n input.type = \"checkbox\";\n input.id = this._addUID(\"GPshowMousePositionSettings\");\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowMousePositionSettingsPicto\");\n label.htmlFor = this._addUID(\"GPshowMousePositionSettings\");\n label.title = \"Réglages\";\n label.className = \"GPshowMoreOptionsImage GPshowMoreOptions GPshowMousePositionSettingsPicto\"; // FIXME classname and id ?\n label.style.display = display ? \"block\" : \"none\";\n if (label.addEventListener) {\n label.addEventListener(\"click\", function (e) {\n if (typeof context.onShowMousePositionSettingsClick === \"function\") {\n context.onShowMousePositionSettingsClick(e);\n }\n }, false);\n } else if (label.attachEvent) {\n label.attachEvent(\"onclick\", function (e) {\n if (typeof context.onShowMousePositionSettingsClick === \"function\") {\n context.onShowMousePositionSettingsClick(e);\n }\n });\n }\n list.push(input);\n list.push(label);\n return list;\n },\n /**\n * settings panel\n * @param {Boolean} [display=true] - specifies if the settings panel must be displayed\n *\n * FIXME\n * don't call this._createMousePositionSettingsSystemsElement\n * don't call this._createMousePositionSettingsUnitsElement\n *\n * @returns {DOMElement} DOM element\n */\n _createMousePositionSettingsElement: function _createMousePositionSettingsElement(display) {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPmousePositionSettings\");\n container.style.display = display === undefined || display ? \"block\" : \"none\";\n var span = document.createElement(\"span\");\n span.className = \"GPmousePositionSettingsLabel\";\n span.innerHTML = \"Système de référence\";\n container.appendChild(span);\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n // FIXME tableau statique !\n // var systems = [\n // {\n // code : \"GEOGRAPHIC\",\n // label : \"Géographique\"\n // },\n // {\n // code : \"MERCATOR\",\n // label : \"Mercator\"\n // },\n // {\n // code : \"LAMB93\",\n // label : \"Lambert 93\"\n // },\n // {\n // code : \"LAMB2E\",\n // label : \"Lambert II étendu\"\n // }\n // ];\n //\n // var selectSystem = this._createMousePositionSettingsSystemsElement(systems);\n //\n // container.appendChild(selectSystem);\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n // FIXME tableau statique !\n // var units = [\n // {\n // code : \"DEC\",\n // label : \"degrés décimaux\",\n // },\n // {\n // code : \"DMS\",\n // label : \"degrés sexagésimaux\",\n // },\n // {\n // code : \"RAD\",\n // label : \"radians\",\n // },\n // {\n // code : \"GON\",\n // label : \"grades\"\n // }\n // ];\n //\n // var selectUnits = this._createMousePositionSettingsUnitsElement(units);\n //\n // container.appendChild(selectUnits);\n\n return container;\n },\n /**\n * @param {Object[]} systems - list of systems\n *\n * @returns {DOMElement} DOM element select\n */\n _createMousePositionSettingsSystemsElement: function _createMousePositionSettingsSystemsElement(systems) {\n // contexte d'execution\n var context = this;\n var selectSystem = document.createElement(\"select\");\n selectSystem.id = this._addUID(\"GPmousePositionProjectionSystem\");\n selectSystem.className = \"GPinputSelect GPmousePositionSettingsSelect\";\n selectSystem.addEventListener(\"change\", function (e) {\n context.onMousePositionProjectionSystemChange(e);\n });\n selectSystem.addEventListener(\"mouseover\", function (e) {\n // FIXME mettre une condition si target === option\n if (e.target.nodeName !== \"OPTION\") {\n context.onMousePositionProjectionSystemMouseOver(e);\n }\n });\n for (var i = 0; i < systems.length; i++) {\n var obj = systems[i];\n var option = document.createElement(\"option\");\n option.value = obj.code;\n option.text = obj.label || i;\n // option.label = obj.label;\n selectSystem.appendChild(option);\n }\n return selectSystem;\n },\n /**\n * @param {Object[]} units - list of units\n *\n * @returns {DOMElement} DOM element select\n */\n _createMousePositionSettingsUnitsElement: function _createMousePositionSettingsUnitsElement(units) {\n // contexte d'execution\n var context = this;\n var selectUnits = document.createElement(\"select\");\n selectUnits.id = this._addUID(\"GPmousePositionProjectionUnits\");\n selectUnits.className = \"GPinputSelect GPmousePositionSettingsSelect\";\n selectUnits.addEventListener(\"change\", function (e) {\n context.onMousePositionProjectionUnitsChange(e);\n });\n for (var j = 0; j < units.length; j++) {\n var obj = units[j];\n var option = document.createElement(\"option\");\n option.value = obj.code ? obj.code : j;\n option.text = obj.label || j;\n // option.label = obj.label;\n selectUnits.appendChild(option);\n }\n return selectUnits;\n },\n /**\n * @param {String} [currentProjectionType=\"Metric\"] - \"Geographical\" or \"Metric\"\n */\n _resetLabelElements: function _resetLabelElements(currentProjectionType) {\n // Changement des labels dans le formulaire de saisie\n var spanLat = document.getElementById(this._addUID(\"GPmousePositionLatLabel\"));\n spanLat.innerHTML = currentProjectionType === \"Geographical\" ? \"Latitude :\" : \"X :\";\n var spanLon = document.getElementById(this._addUID(\"GPmousePositionLonLabel\"));\n spanLon.innerHTML = currentProjectionType === \"Geographical\" ? \"Longitude :\" : \"Y :\";\n },\n /**\n * @param {String} currentProjectionUnits - projection units\n */\n _resetUnitElements: function _resetUnitElements(currentProjectionUnits) {\n var value = \"\";\n if (currentProjectionUnits === \"M\" || currentProjectionUnits === \"KM\") {\n value = currentProjectionUnits.toLowerCase();\n }\n var elts = document.getElementsByClassName(\"GPmousePositionUnits\");\n for (var e = 0; e < elts.length; e++) {\n elts[e].innerHTML = value;\n }\n },\n /**\n * @param {Boolean} editCoordinates - edit coordinates option\n * @param {String} currentProjectionType - current projection type\n * @param {String} currentProjectionUnits - current projection unit\n */\n _resetCoordinateElements: function _resetCoordinateElements(editCoordinates, currentProjectionType, currentProjectionUnits) {\n // Suppression de tous les enfants de GPmousePositionLatCoordinate\n var latElt = document.getElementById(this._addUID(\"GPmousePositionLatCoordinate\"));\n while (latElt.firstChild) {\n latElt.removeChild(latElt.firstChild);\n }\n var arrayCoords;\n if (currentProjectionUnits === \"DMS\") {\n arrayCoords = this._createDMSCoordinateElement(\"Lat\", editCoordinates);\n } else {\n arrayCoords = this._createCoordinateElement(\"Lat\", editCoordinates);\n }\n for (var i = 0; i < arrayCoords.length; i++) {\n latElt.appendChild(arrayCoords[i]);\n }\n\n // Suppression de tous les enfants de GPmousePositionLonCoordinate\n var lonElt = document.getElementById(this._addUID(\"GPmousePositionLonCoordinate\"));\n while (lonElt.firstChild) {\n lonElt.removeChild(lonElt.firstChild);\n }\n var arrayCoords1;\n if (currentProjectionUnits === \"DMS\") {\n arrayCoords1 = this._createDMSCoordinateElement(\"Lon\", editCoordinates);\n } else {\n arrayCoords1 = this._createCoordinateElement(\"Lon\", editCoordinates);\n }\n for (var j = 0; j < arrayCoords1.length; j++) {\n lonElt.appendChild(arrayCoords1[j]);\n }\n\n // FIXME on simule un deplacement ?\n // this.onMapMove();\n },\n\n /**\n * Set/unset editing mode\n *\n * @param {Boolean} editing - active edit coordinates mode\n */\n _setEditMode: function _setEditMode(editing) {\n var locateElt = document.getElementById(this._addUID(\"GPmousePositionLocate\"));\n locateElt.title = editing ? \"Aller à la position ...\" : \"Cliquer pour saisir des coordonnées\";\n var closeEditElt = document.getElementById(this._addUID(\"GPmousePositionCloseEdit\"));\n closeEditElt.style.display = editing ? \"inline-block\" : \"none\";\n var selector = \"div[id^=\" + this._addUID(\"GPmousePositionCoordinate\") + \"]\";\n var inputs = document.querySelectorAll(selector + \" input\");\n for (var i = 0; i < inputs.length; i++) {\n inputs[i].readOnly = !editing;\n if (editing) {\n inputs[i].value = \"\";\n inputs[i].classList.remove(\"error\");\n }\n }\n var selects = document.querySelectorAll(selector + \" select\");\n for (var j = 0; j < selects.length; j++) {\n selects[j].disabled = !editing;\n }\n },\n /**\n *\n * @param {DOMElement} input - input element\n * @param {Boolean} isFloat - check for float value\n *\n * @returns {Boolean} true if input value is within bounds\n */\n _checkDMSElement: function _checkDMSElement(input, isFloat) {\n var b = isFloat !== undefined;\n var value = input.value;\n if (b) {\n value = value.replace(\",\", \".\");\n }\n if (isNaN(value)) {\n return false;\n }\n var v = parseFloat(value);\n if (!b && (v | 0) !== v) {\n // is it an integer\n return false;\n }\n var min = Number(input.dataset.min);\n var max = Number(input.dataset.max);\n return v >= min && v <= max;\n },\n /**\n * @param {String} coordType - \"Lon\" or \"Lat\"\n * @param {DOMElement} input - input element\n *\n * @returns {Boolean} true if input value is within bounds\n */\n _checkDMSDegrees: function _checkDMSDegrees(coordType, input) {\n if (isNaN(input.value)) {\n return false;\n }\n var v = parseFloat(input.value);\n if ((v | 0) !== v) {\n // is it an integer\n return false;\n }\n var min = Number(input.dataset.min);\n var max = Number(input.dataset.max);\n if (v < min || v > max) {\n return false;\n }\n var inputMinutes = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Minutes\"));\n var inputSeconds = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Seconds\"));\n if (v >= max) {\n inputMinutes.dataset.max = 0;\n inputSeconds.dataset.max = 0;\n } else {\n inputMinutes.dataset.max = 59;\n inputSeconds.dataset.max = 59.9999;\n }\n return true;\n },\n // ################################################################### //\n // ####################### handlers Event ############################ //\n // ################################################################### //\n\n /**\n * Function displaying coordinates from cursor position (desktop)\n * or map center (tactile)\n * @param {Object} coordinate - coordinates\n */\n GPdisplayCoords: function GPdisplayCoords(coordinate) {\n // Compute coords in case of cursor position (desktop)\n if (coordinate) {\n var labelLon = document.getElementById(this._addUID(\"GPmousePositionLonLabel\"));\n var labelLat = document.getElementById(this._addUID(\"GPmousePositionLatLabel\"));\n if (coordinate.x || coordinate.y) {\n labelLat.innerHTML = \"X : \";\n labelLon.innerHTML = \"Y : \";\n } else if (coordinate.e || coordinate.n) {\n labelLat.innerHTML = \"E : \";\n labelLon.innerHTML = \"N : \";\n } else {\n labelLat.innerHTML = \"Latitude : \";\n labelLon.innerHTML = \"Longitude : \";\n }\n if (_typeof(coordinate.lat) === \"object\" && _typeof(coordinate.lng) === \"object\") {\n var parts = {\n lng: \"Lon\",\n lat: \"Lat\"\n };\n var units = [\"Degrees\", \"Minutes\", \"Seconds\"];\n for (var p in parts) {\n for (var u = 0; u < units.length; ++u) {\n var selector = \"GPmousePosition\" + parts[p] + units[u];\n var elt = document.getElementById(this._addUID(selector));\n var key = units[u].charAt(0).toLowerCase();\n elt.value = coordinate[p][key];\n }\n }\n // directions\n document.getElementById(this._addUID(\"GPmousePositionLonDirection\")).value = coordinate.lng.direction;\n document.getElementById(this._addUID(\"GPmousePositionLatDirection\")).value = coordinate.lat.direction;\n } else {\n var elLat = document.getElementById(this._addUID(\"GPmousePositionLat\"));\n var elLon = document.getElementById(this._addUID(\"GPmousePositionLon\"));\n elLat.value = coordinate.x || coordinate.lat || coordinate.e || \"0\";\n elLon.value = coordinate.y || coordinate.lng || coordinate.lon || coordinate.n || \"0\";\n\n // les unites\n var unit = coordinate.unit === undefined ? \"\" : coordinate.unit;\n var elements = document.getElementsByClassName(\"GPmousePositionUnits\");\n for (var n = 0; n < elements.length; ++n) {\n elements[n].innerHTML = unit;\n }\n }\n }\n },\n /**\n * Function displaying altitude from cursor position (desktop)\n * or map center (tactile)\n * @param {Object} coordinate - coordinates\n * @param {Number} altitudeTimeoutDelay - when the mouse stop moving, delay before the altitude request is launched\n * @param {Number} noDataValue - the no data value\n * @param {Number} noDataValueTolerance - the no data value tolerance\n */\n GPdisplayElevation: function GPdisplayElevation(coordinate, altitudeTimeoutDelay, noDataValue, noDataValueTolerance) {\n // contexte d'execution\n var self = this;\n\n // Latency for altitude request\n var altitudeTimeout;\n if (!altitudeTimeoutDelay) {\n altitudeTimeoutDelay = 500;\n }\n clearTimeout(altitudeTimeout);\n document.getElementById(this._addUID(\"GPmousePositionAlt\")).innerHTML = \"...\";\n if (noDataValue == null) {\n noDataValue = -99999;\n }\n if (noDataValueTolerance == null) {\n noDataValueTolerance = 99980;\n }\n var maxThreshold = noDataValue + noDataValueTolerance;\n var minThreshold = noDataValue - noDataValueTolerance;\n\n // Compute coords in case of cursor position (desktop)\n if (coordinate) {\n // If no altitude panel, don't call altitude request\n if (document.getElementById(this._addUID(\"GPmousePositionAltitude\"))) {\n altitudeTimeout = setTimeout(function () {\n self.onRequestAltitude(coordinate, function (z) {\n if (minThreshold < z && z < maxThreshold) {\n self.GPresetElevation();\n } else {\n document.getElementById(self._addUID(\"GPmousePositionAlt\")).innerHTML = z;\n }\n });\n }, altitudeTimeoutDelay);\n }\n }\n },\n /**\n * Function reseting altitude value\n */\n GPresetElevation: function GPresetElevation() {\n if (document.getElementById(this._addUID(\"GPmousePositionAltitude\"))) {\n document.getElementById(this._addUID(\"GPmousePositionAlt\")).innerHTML = \"---\";\n }\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (MousePositionDOM);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ29udHJvbHMvTW91c2VQb3NpdGlvbkRPTS5qcz8xNjljIl0sIm5hbWVzIjpbIk1vdXNlUG9zaXRpb25ET00iLCJfYWRkVUlEIiwiaWQiLCJ1aWQiLCJfdWlkIiwiX2NyZWF0ZU1haW5Db250YWluZXJFbGVtZW50IiwiY29udGFpbmVyIiwiZG9jdW1lbnQiLCJjcmVhdGVFbGVtZW50IiwiY2xhc3NOYW1lIiwiX2NyZWF0ZVNob3dNb3VzZVBvc2l0aW9uRWxlbWVudCIsImlucHV0IiwidHlwZSIsIl9jcmVhdGVTaG93TW91c2VQb3NpdGlvblBpY3RvRWxlbWVudCIsImlzRGVza3RvcCIsInNlbGYiLCJsYWJlbCIsImh0bWxGb3IiLCJ0aXRsZSIsImFkZEV2ZW50TGlzdGVuZXIiLCJlIiwibWFwQ2VudGVyQ2xhc3MiLCJnZXRFbGVtZW50QnlJZCIsImNoZWNrZWQiLCJvblNob3dNb3VzZVBvc2l0aW9uQ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IC8vICAgICB9LFxuICAgICAgICAvLyAgICAge1xuICAgICAgICAvLyAgICAgICAgIGNvZGUgOiBcIkxBTUIyRVwiLFxuICAgICAgICAvLyAgICAgICAgIGxhYmVsIDogXCJMYW1iZXJ0IElJIMOpdGVuZHVcIlxuICAgICAgICAvLyAgICAgfVxuICAgICAgICAvLyBdO1xuICAgICAgICAvL1xuICAgICAgICAvLyB2YXIgc2VsZWN0U3lzdGVtID0gdGhpcy5fY3JlYXRlTW91c2VQb3NpdGlvblNldHRpbmdzU3lzdGVtc0VsZW1lbnQoc3lzdGVtcyk7XG4gICAgICAgIC8vXG4gICAgICAgIC8vIGNvbnRhaW5lci5hcHBlbmRDaGlsZChzZWxlY3RTeXN0ZW0pO1xuXG4gICAgICAgIC8vIEZJWE1FIG9uIGRlY29tcG9zZSBsYSBmb25jdGlvbiBwb3VyIGxlcyBiZXNvaW5zIGR1IGNvbnRyb2xlLFxuICAgICAgICAvLyBvbiBham91dGVyYSBjZXMgY2hpbGRzIMOgIGxhIG1haW4uLi5cbiAgICAgICAgLy8gRklYTUUgdGFibGVhdSBzdGF0aXF1ZSAhXG4gICAgICAgIC8vIHZhciB1bml0cyA9IFtcbiAgICAgICAgLy8gICAgIHtcbiAgICAgICAgLy8gICAgICAgICBjb2RlIDogXCJERUNcIixcbiAgICAgICAgLy8gICAgICAgICBsYWJlbCA6IFwiZGVncsOpcyBkw6ljaW1hdXhcIixcbiAgICAgICAgLy8gICAgIH0sXG4gICAgICAgIC8vICAgICB7XG4gICAgICAgIC8vICAgICAgICAgY29kZSA6IFwiRE1TXCIsXG4gICAgICAgIC8vICAgICAgICAgbGFiZWwgOiBcImRlZ3LDqXMgc2V4YWfDqXNpbWF1eFwiLFxuICAgICAgICAvLyAgICAgfSxcbiAgICAgICAgLy8gICAgIHtcbiAgICAgICAgLy8gICAgICAgICBjb2RlIDogXCJSQURcIixcbiAgICAgICAgLy8gICAgICAgICBsYWJlbCA6IFwicmFkaWFuc1wiLFxuICAgICAgIC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RCeUlkKHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkxvbkxhYmVsXCIpKTtcbiAgICAgICAgICAgIHZhciBsYWJlbExhdCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkxhdExhYmVsXCIpKTtcblxuICAgICAgICAgICAgaWYgKGNvb3JkaW5hdGUueCB8fCBjb29yZGluYXRlLnkpIHtcbiAgICAgICAgICAgICAgICBsYWJlbExhdC5pbm5lckhUTUwgPSBcIlggOiBcIjtcbiAgICAgICAgICAgICAgICBsYWJlbExvbi5pbm5lckhUTUwgPSBcIlkgOiBcIjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY29vcmRpbmF0ZS5lIHx8IGNvb3JkaW5hdGUubikge1xuICAgICAgICAgICAgICAgIGxhYmVsTGF0LmlubmVySFRNTCA9IFwiRSA6IFwiO1xuICAgICAgICAgICAgICAgIGxhYmVsTG9uLmlubmVySFRNTCA9IFwiTiA6IFwiO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsYWJlbExhdC5pbm5lckhUTUwgPSBcIkxhdGl0dWRlIDogXCI7XG4gICAgICAgICAgICAgICAgbGFiZWxMb24uaW5uZXJIVE1MID0gXCJMb25naXR1ZGUgOiBcIjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBjb29yZGluYXRlLmxhdCA9PT0gXCJvYmplY3RcIiAmJiB0eXBlb2YgY29vcmRpbmF0ZS5sbmcgPT09IFwib2JqZWN0XCIpIHtcbiAgICAgICAgICAgICAgICB2YXIgcGFydHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGxuZyA6IFwiTG9uXCIsXG4gICAgICAgICAgICAgICAgICAgIGxhdCA6IFwiTGF0XCJcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHZhciB1bml0cyA9IFtcIkRlZ3JlZXNcIiwgXCJNaW51dGVzXCIsIFwiU2Vjb25kc1wiXTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBwIGluIHBhcnRzKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIHUgPSAwOyB1IDwgdW5pdHMubGVuZ3RoOyArK3UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzZWxlY3RvciA9IFwiR1Btb3VzZVBvc2l0aW9uXCIgKyBwYXJ0c1twXSArIHVuaXRzW3VdO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVsdCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChzZWxlY3RvcikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGtleSA9IHVuaXRzW3VdLmNoYXJBdCgwKS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWx0LnZhbHVlID0gY29vcmRpbmF0ZVtwXVtrZXldO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIGRpcmVjdGlvbnNcbiAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCh0aGlzLl9hZGRVSUQoXCJHUG1vdXNlUG9zaXRpb25Mb25EaXJlY3Rpb25cIikpLnZhbHVlID0gY29vcmRpbmF0ZS5sbmcuZGlyZWN0aW9uO1xuICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkxhdERpcmVjdGlvblwiKSkudmFsdWUgPSBjb29yZGluYXRlLmxhdC5kaXJlY3Rpb247XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBlbExhdCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkxhdFwiKSk7XG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ICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSwgYWx0aXR1ZGVUaW1lb3V0RGVsYXkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIEZ1bmN0aW9uIHJlc2V0aW5nIGFsdGl0dWRlIHZhbHVlXG4gICAgICovXG4gICAgR1ByZXNldEVsZXZhdGlvbiA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbW91c2VQb3NpdGlvbkFsdGl0dWRlXCIpKSkge1xuICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQodGhpcy5fYWRkVUlEKFwiR1Btb3VzZVBvc2l0aW9uQWx0XCIpKS5pbm5lckhUTUwgPSBcIi0tLVwiO1xuICAgICAgICB9XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgTW91c2VQb3NpdGlvbkRPTTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/Controls/MousePositionDOM.js\n"); + +/***/ }), + +/***/ "./src/Common/Controls/ProfileElevationPathDOM.js": +/*!********************************************************!*\ + !*** ./src/Common/Controls/ProfileElevationPathDOM.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* globals AmCharts, d3 */\n\n/**\n * @module ProfileElevationPathDOM\n * @alias [private] ProfileElevationPathDOM\n * @description\n * create DOM element\n */\nvar ProfileElevationPathDOM = {\n /**\n * Gets a css property from an element\n *\n * @private\n * @param {HTMLElement} element The element to get the property from\n * @param {String} property The css property\n * @returns {String} The value of the property\n *\n * @see https://stackoverflow.com/questions/7444451/how-to-get-the-actual-rendered-font-when-its-not-defined-in-css\n */\n _getCssProperty: function _getCssProperty(element, property) {\n return window.getComputedStyle(element, null).getPropertyValue(property);\n },\n /**\n * Uses canvas.measureText to compute and return the width of the given text of given font in pixels.\n *\n * @private\n * @param {String} text The text to be rendered.\n * @param {HTMLElement} container The container of the text\n * @param {String} font The font of the container if known, format: 'weight size familiy'\n * @returns {Number} The width of the text\n *\n * @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393\n */\n _getTextWidth: function _getTextWidth(text, container) {\n var font = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n // re-use canvas object for better performance\n var canvas = /** ts-syntax */this.canvas || (this.canvas = document.createElement(\"canvas\"));\n var context = canvas.getContext(\"2d\");\n if (font === null) {\n context.font = \"\".concat(this._getCssProperty(container, \"font-weight\"), \" \").concat(this._getCssProperty(container, \"font-size\"), \" \").concat(this._getCssProperty(container, \"font-family\"));\n } else {\n context.font = font;\n }\n var metrics = context.measureText(text);\n return metrics.width;\n },\n /**\n * Converts a data point z to svg y coord\n *\n * @private\n * @param {Object} z The z to convert.\n * @param {Number} pathHeight The height of the path in the svg container in px\n * @param {Number} minGraphZ Min z of the graph\n * @param {Number} pxPerMZ Number of pixels per meter for the z (y) axis\n * @returns {Number} The y svg coordinate of the point\n *\n */\n _dataZToSvgY: function _dataZToSvgY(z, pathHeight, minGraphZ, pxPerMZ) {\n return pathHeight - (z - minGraphZ) * pxPerMZ - 0.5;\n },\n /**\n * Converts a data point dist value to svg x coord\n *\n * @private\n * @param {Number} dist The dist to convert\n * @param {Number} svgWidth The witdth of the svg container in px\n * @param {Number} pathWidth The witdth of the path in the svg container in px\n * @param {Number} pxPerMX Number of pixels per meter for the x axis\n * @returns {Array} The x svg coordinate of the point\n *\n */\n _dataDistToSvgX: function _dataDistToSvgX(dist, svgWidth, pathWidth, pxPerMX) {\n return svgWidth - pathWidth + dist * pxPerMX;\n },\n /**\n * Converts a svg x coord to dist value\n *\n * @private\n * @param {Number} svgX The dist to convert\n * @param {Number} svgWidth The witdth of the svg container in px\n * @param {Number} pathWidth The witdth of the path in the svg container in px\n * @param {Number} pxPerMX Number of pixels per meter for the x axis\n * @returns {Array} The dist value\n *\n */\n _svgXToDataDist: function _svgXToDataDist(svgX, svgWidth, pathWidth, pxPerMX) {\n return (svgX + pathWidth - svgWidth) / pxPerMX;\n },\n /**\n * Returns the index of value if it were inserted in sorted (by dist) array of data points.\n *\n * @private\n * @param {Array} array Sorted array of data points (with dist property)\n * @param {Number} value Value to test the index of.\n * @returns {Number} The index the value would have.\n *\n */\n _arrayBisect: function _arrayBisect(array, value) {\n var idx;\n if (array.length === 0) {\n return 0;\n }\n for (idx = 0; idx < array.length; idx++) {\n if (value < array[idx].dist) {\n return idx;\n }\n }\n return idx - 1;\n },\n /**\n * Display Profile function used by default : no additonal framework needed.\n *\n * @public\n * @param {Object} data - elevations values for profile\n * @param {HTMLElement} container - html container where to display profile\n * @param {Object} context - this control object\n * @param {Object} className - calling class (ie ElevationPath)\n * @returns {DOMElement} profil container\n */\n displayProfileByDefault: function displayProfileByDefault(data, container, context, className) {\n var self = context;\n if (!container) {\n return;\n }\n if (!data) {\n return;\n }\n\n // on nettoie toujours...\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n var margin = {\n top: 25,\n right: 15,\n bottom: 10,\n left: 10\n };\n var _displayProfileOptions = self.options.displayProfileOptions;\n var _points = data.points;\n var sortedElev = JSON.parse(JSON.stringify(_points));\n sortedElev.sort(function (e1, e2) {\n return e1.z - e2.z;\n });\n var minZ = sortedElev[0].z;\n var maxZ = sortedElev[sortedElev.length - 1].z;\n var dist = data.distance;\n var distUnit = \"m\";\n var widgetDiv = document.createElement(\"div\");\n widgetDiv.id = \"profileElevationByDefault\";\n container.appendChild(widgetDiv);\n\n // Détermination des tailles en pixels des éléments du widget\n var clientWidth = window.getComputedStyle(container).getPropertyValue(\"width\").replace(/px/, \"\");\n var clientHeight = window.getComputedStyle(container).getPropertyValue(\"height\").replace(/px/, \"\");\n var widgetHeigth = clientHeight - margin.top - margin.bottom;\n var widgetWidth = clientWidth - margin.left - margin.right;\n // const widgetHeigth = container.clientHeight - margin.top - margin.bottom;\n // const widgetWidth = container.clientWidth - margin.left - margin.right;\n\n var zLabelWidth = 17;\n var zGradWidth = this._getTextWidth(Math.round(maxZ).toLocaleString() + \",88\", container, \"400 10 Verdana\");\n var xLabelHeight = 17;\n var xGradHeight = 15;\n var minZguideHeigth = 15;\n var minXguideWidth = this._getTextWidth(Math.round(dist).toLocaleString() + \",5\", container);\n var minNumXGuides = 1;\n var pathHeight = widgetHeigth - xLabelHeight - xGradHeight;\n var pathWidth = widgetWidth - zLabelWidth - zGradWidth;\n var elevationSvg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n elevationSvg.id = \"profileElevationByDefaultSvg\";\n elevationSvg.setAttribute(\"style\", \"display: block; margin: auto; overflow: visible; position: absolute; left: 10px;\");\n elevationSvg.setAttribute(\"viewBox\", \"0 0 \".concat(clientWidth, \" \").concat(clientHeight));\n elevationSvg.setAttribute(\"width\", \"100%\");\n elevationSvg.setAttribute(\"height\", \"100%\");\n\n // Détermination des guides en ordonnée :\n var maxNumZguides = Math.floor(pathHeight / minZguideHeigth);\n var gradZ;\n // Traitement du cas altitude max = altitude min\n if (maxZ === minZ) {\n gradZ = 0.1;\n } else {\n gradZ = Math.pow(10, Math.ceil(Math.log((maxZ - minZ) / maxNumZguides) / Math.log(10))) / 2;\n }\n var minGraphZ = Math.floor(minZ / gradZ) * gradZ;\n var maxGraphZ = Math.ceil(maxZ / gradZ) * gradZ;\n // cas où le path atteint pile les graduations extremes : ajout d'une gradiation\n if (maxGraphZ === maxZ) {\n maxGraphZ += gradZ;\n }\n // cas où gradZ < 1 : nombres flottants capricieux...\n minGraphZ = Math.round(minGraphZ * 100) / 100;\n maxGraphZ = Math.round(maxGraphZ * 100) / 100;\n var numZguides = Math.round((maxGraphZ - minGraphZ) / gradZ);\n\n // Si plus de guides que le max, on passe à une graduation de 10**x en 10**x (et non 10**x / 2)\n if (numZguides + 1 > maxNumZguides) {\n gradZ = Math.pow(10, Math.ceil(Math.log((maxZ - minZ) / maxNumZguides) / Math.log(10)));\n minGraphZ = Math.floor(minZ / gradZ) * gradZ;\n maxGraphZ = Math.ceil(maxZ / gradZ) * gradZ;\n // cas où le path atteint pile les graduations extremes : ajout d'une gradiation\n if (maxGraphZ === maxZ) {\n maxGraphZ += gradZ;\n }\n // cas où gradZ < 1 : nombres flottants capricieux...\n minGraphZ = Math.round(minGraphZ * 100) / 100;\n maxGraphZ = Math.round(maxGraphZ * 100) / 100;\n numZguides = Math.floor((maxGraphZ - minGraphZ) / gradZ);\n }\n numZguides = Math.max(Math.round(numZguides), 1);\n var axisZ = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n axisZ.setAttribute(\"class\", \"profile-z-vertical\");\n var guidesZ = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n var gradZyOffsetPx = pathHeight / numZguides;\n var pxPerMZ;\n // Traitement du cas altitude max = altitude min\n if (maxZ === minZ) {\n pxPerMZ = pathHeight / 0.2;\n } else {\n pxPerMZ = pathHeight / (maxGraphZ - minGraphZ);\n }\n var gradZtext;\n var yTextTranslation;\n var yStrokeTranslation;\n var gradZstroke;\n var gradZpath;\n var gradZgrad;\n // Ajout des graduations au graphique\n for (var i = 0; i <= numZguides; i++) {\n gradZtext = document.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\n gradZtext.setAttribute(\"class\", \"profile-z-graduation\");\n gradZtext.setAttribute(\"font-family\", \"Verdana\");\n gradZtext.setAttribute(\"font-size\", \"10px\");\n gradZtext.setAttribute(\"fill\", \"#5E5E5E\");\n // Cas où gradZ < 1 : nombres flottants capricieux...\n // Le Math.round est pour éviter des ennuis du genre 3 * 0.1 = 0.300000000000004\n gradZtext.textContent = (Math.round(100 * (minGraphZ + i * gradZ)) / 100).toLocaleString();\n yTextTranslation = pathHeight - i * gradZyOffsetPx;\n gradZtext.setAttribute(\"transform\", \"translate(\".concat(zLabelWidth + zGradWidth - 8, \", \").concat(yTextTranslation + 5, \")\"));\n gradZtext.setAttribute(\"text-anchor\", \"end\");\n axisZ.appendChild(gradZtext);\n yStrokeTranslation = Math.round(yTextTranslation) - 0.5;\n gradZstroke = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n gradZpath = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n gradZpath.setAttribute(\"cs\", \"100,100\");\n gradZpath.setAttribute(\"stroke-width\", \"1\");\n if (i !== 0) {\n gradZpath.setAttribute(\"stroke-opacity\", \"0.2\");\n } else {\n gradZpath.setAttribute(\"stroke-opacity\", \"1\");\n }\n gradZpath.setAttribute(\"stroke\", \"#000000\");\n gradZpath.setAttribute(\"fill\", \"none\");\n gradZpath.setAttribute(\"d\", \"M\".concat(zLabelWidth + zGradWidth, \",\").concat(yStrokeTranslation, \" L\").concat(pathWidth + zLabelWidth + zGradWidth, \",\").concat(yStrokeTranslation));\n gradZgrad = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n gradZgrad.setAttribute(\"cs\", \"100,100\");\n gradZgrad.setAttribute(\"stroke-width\", \"1\");\n gradZgrad.setAttribute(\"stroke-opacity\", \"1\");\n gradZgrad.setAttribute(\"stroke\", \"#000000\");\n gradZgrad.setAttribute(\"fill\", \"none\");\n gradZgrad.setAttribute(\"d\", \"M\".concat(zLabelWidth + zGradWidth, \",\").concat(yStrokeTranslation, \" L\").concat(zLabelWidth + zGradWidth + 5, \",\").concat(yStrokeTranslation));\n gradZgrad.setAttribute(\"transform\", \"translate(-5, 0)\");\n gradZstroke.appendChild(gradZgrad);\n gradZstroke.appendChild(gradZpath);\n guidesZ.appendChild(gradZstroke);\n }\n var axisZLegend = document.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\n axisZLegend.setAttribute(\"class\", \"profile-z-legend\");\n axisZLegend.setAttribute(\"font-family\", \"Verdana\");\n axisZLegend.setAttribute(\"font-size\", \"11px\");\n axisZLegend.setAttribute(\"fill\", \"#5E5E5E\");\n axisZLegend.textContent = \"Altitude (m)\";\n axisZLegend.setAttribute(\"transform\", \"translate(\".concat(zLabelWidth - 8, \", \").concat(Math.round(pathHeight / 2), \") rotate(-90)\"));\n axisZLegend.setAttribute(\"text-anchor\", \"middle\");\n axisZ.appendChild(axisZLegend);\n elevationSvg.appendChild(axisZ);\n elevationSvg.appendChild(guidesZ);\n\n // Détermination des guides en abscisse :\n // Passage éventuel en km\n if (dist > 2000) {\n dist /= 1000;\n distUnit = \"km\";\n }\n var maxNumXguides = Math.floor(pathWidth / minXguideWidth);\n var gradX = Math.pow(10, Math.ceil(Math.log(dist / maxNumXguides) / Math.log(10))) / 2;\n var maxGraphX = dist;\n\n // Si plus de guides que le max, on passe à une graduation de 10**x en 10**x (et non 10**x / 2)\n var numXguides = Math.floor(maxGraphX / gradX);\n if (numXguides > maxNumXguides) {\n gradX = Math.pow(10, Math.ceil(Math.log(dist / maxNumXguides) / Math.log(10)));\n numXguides = Math.floor(maxGraphX / gradX);\n } else if (numXguides < minNumXGuides) {\n gradX = Math.pow(10, Math.ceil(Math.log(dist / maxNumXguides) / Math.log(10)) - 1);\n numXguides = Math.floor(maxGraphX / gradX);\n }\n numXguides = Math.max(numXguides, 1);\n var lastGradX = gradX * numXguides;\n var axisX = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n axisX.setAttribute(\"class\", \"profile-x-vertical\");\n var guidesX = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n\n // Décalage des graduations pour que la dernière corresponde à la distance max\n var pxPerMX = pathWidth / maxGraphX;\n var xOffset = (maxGraphX - lastGradX) * pxPerMX;\n var gradXxOffsetPx = Math.round((pathWidth - xOffset) / numXguides);\n var gradXtext;\n var xTextTranslation;\n var xStrokeTranslation;\n var gradXstroke;\n var gradXpath;\n var gradXgrad;\n // Ajout des graduations au graphique\n for (var _i = 0; _i <= numXguides + 1; _i++) {\n gradXtext = document.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\n gradXtext.setAttribute(\"class\", \"profile-x-graduation\");\n gradXtext.setAttribute(\"font-family\", \"Verdana\");\n gradXtext.setAttribute(\"font-size\", \"10px\");\n gradXtext.setAttribute(\"fill\", \"#5E5E5E\");\n\n // Exclusion du cas de la dernière graduation : correspond à la distance max : pas de texte\n if (_i !== numXguides + 1) {\n // Cas où gradX < 1 : nombres flottants capricieux...\n gradXtext.textContent = (Math.round(100 * _i * gradX) / 100).toLocaleString();\n }\n xTextTranslation = zLabelWidth + zGradWidth + _i * gradXxOffsetPx;\n // Cas de la dernière graduation : correspond à la distance max\n if (_i === numXguides + 1) {\n xTextTranslation = zLabelWidth + zGradWidth + pathWidth;\n }\n gradXtext.setAttribute(\"transform\", \"translate(\".concat(xTextTranslation, \", \").concat(pathHeight + xGradHeight + 5, \")\"));\n gradXtext.setAttribute(\"text-anchor\", \"middle\");\n axisX.appendChild(gradXtext);\n xStrokeTranslation = xTextTranslation - 0.5;\n gradXstroke = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n gradXpath = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n gradXpath.setAttribute(\"cs\", \"100,100\");\n gradXpath.setAttribute(\"stroke-width\", \"1\");\n if (_i !== 0) {\n gradXpath.setAttribute(\"stroke-opacity\", \"0.2\");\n } else {\n gradXpath.setAttribute(\"stroke-opacity\", \"1\");\n }\n gradXpath.setAttribute(\"stroke\", \"#000000\");\n gradXpath.setAttribute(\"fill\", \"none\");\n gradXpath.setAttribute(\"d\", \"M\".concat(xStrokeTranslation, \",\").concat(pathHeight, \" L\").concat(xStrokeTranslation, \",0\"));\n gradXgrad = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n gradXgrad.setAttribute(\"cs\", \"100,100\");\n gradXgrad.setAttribute(\"stroke-width\", \"1\");\n gradXgrad.setAttribute(\"stroke-opacity\", \"1\");\n gradXgrad.setAttribute(\"stroke\", \"#000000\");\n gradXgrad.setAttribute(\"fill\", \"none\");\n gradXgrad.setAttribute(\"d\", \"M\".concat(xStrokeTranslation, \",\").concat(pathHeight, \" L\").concat(xStrokeTranslation, \",\").concat(pathHeight - 5));\n gradXgrad.setAttribute(\"transform\", \"translate(0, 5)\");\n gradXstroke.appendChild(gradXgrad);\n gradXstroke.appendChild(gradXpath);\n guidesX.appendChild(gradXstroke);\n }\n var axisXLegend = document.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\n axisXLegend.setAttribute(\"class\", \"profile-x-legend\");\n axisXLegend.setAttribute(\"font-family\", \"Verdana\");\n axisXLegend.setAttribute(\"font-size\", \"11px\");\n axisXLegend.setAttribute(\"fill\", \"#5E5E5E\");\n axisXLegend.textContent = \"Distance (\".concat(distUnit, \")\");\n axisXLegend.setAttribute(\"transform\", \"translate(\".concat(zLabelWidth + zGradWidth + pathWidth / 2, \", \").concat(pathHeight + xGradHeight + xLabelHeight + 3, \")\"));\n axisXLegend.setAttribute(\"text-anchor\", \"middle\");\n axisX.appendChild(axisXLegend);\n elevationSvg.appendChild(axisX);\n elevationSvg.appendChild(guidesX);\n var elevationPathG = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n var factor = 1;\n if (distUnit === \"km\") {\n factor = 1000;\n }\n var pointX = this._dataDistToSvgX(_points[0].dist / factor, widgetWidth, pathWidth, pxPerMX);\n var pointY = this._dataZToSvgY(_points[0].z, pathHeight, minGraphZ, pxPerMZ);\n var pathD = \"M\".concat(pointX, \",\").concat(pointY);\n for (var _i2 = 1; _i2 < _points.length; _i2++) {\n pointX = this._dataDistToSvgX(_points[_i2].dist / factor, widgetWidth, pathWidth, pxPerMX);\n pointY = this._dataZToSvgY(_points[_i2].z, pathHeight, minGraphZ, pxPerMZ);\n pathD += \" L\".concat(pointX, \",\").concat(pointY);\n }\n var pathPath = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n pathPath.setAttribute(\"cs\", \"100,100\");\n pathPath.setAttribute(\"stroke-width\", \"1\");\n pathPath.setAttribute(\"stroke-opacity\", \"1\");\n pathPath.setAttribute(\"stroke\", \"#0B6BA7\");\n pathPath.setAttribute(\"fill\", \"none\");\n pathPath.setAttribute(\"d\", pathD);\n\n // Fermeture du path pour le fill\n pathD += \" L\".concat(pointX, \",\").concat(pathHeight);\n pathD += \" L\".concat(widgetWidth - pathWidth, \",\").concat(pathHeight);\n var pathFill = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n pathFill.setAttribute(\"cs\", \"100,100\");\n pathFill.setAttribute(\"stroke-width\", \"1\");\n pathFill.setAttribute(\"stroke-opacity\", \"0\");\n pathFill.setAttribute(\"stroke\", \"#000000\");\n pathFill.setAttribute(\"fill\", \"#00B798\");\n pathFill.setAttribute(\"fill-opacity\", \"0.4\");\n pathFill.setAttribute(\"d\", pathD);\n elevationPathG.appendChild(pathPath);\n elevationPathG.appendChild(pathFill);\n elevationSvg.appendChild(elevationPathG);\n\n // Mise en place de l'écouteur d'évènement : pour l'affichage dynamique\n var dynamicsG = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n // Pour écouter la position de la souris\n var pathRectangle = document.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n pathRectangle.setAttribute(\"width\", pathWidth);\n pathRectangle.setAttribute(\"height\", pathHeight);\n pathRectangle.setAttribute(\"transform\", \"translate(\".concat(widgetWidth - pathWidth, \",0)\"));\n pathRectangle.setAttribute(\"visibility\", \"hidden\");\n pathRectangle.setAttribute(\"pointer-events\", \"all\");\n var sortedDist = JSON.parse(JSON.stringify(_points));\n sortedDist.sort(function (e1, e2) {\n return e1.dist - e2.dist;\n });\n var focusLineX = document.createElementNS(\"http://www.w3.org/2000/svg\", \"line\");\n focusLineX.setAttribute(\"id\", \"focusLineX\");\n focusLineX.setAttribute(\"class\", \"focusLine-default\");\n focusLineX.setAttribute(\"fill\", \"none\");\n focusLineX.setAttribute(\"stroke\", \"#F90\");\n focusLineX.setAttribute(\"stroke-width\", \"0.5px\");\n focusLineX.setAttribute(\"visibility\", \"hidden\");\n var focusLineY = document.createElementNS(\"http://www.w3.org/2000/svg\", \"line\");\n focusLineY.setAttribute(\"id\", \"focusLineY\");\n focusLineY.setAttribute(\"class\", \"focusLine-default\");\n focusLineY.setAttribute(\"fill\", \"none\");\n focusLineY.setAttribute(\"stroke\", \"#F90\");\n focusLineY.setAttribute(\"stroke-width\", \"0.5px\");\n focusLineY.setAttribute(\"visibility\", \"hidden\");\n var focusCircle = document.createElementNS(\"http://www.w3.org/2000/svg\", \"circle\");\n focusCircle.setAttribute(\"id\", \"focusCircle\");\n focusCircle.setAttribute(\"r\", 4);\n focusCircle.setAttribute(\"class\", \"circle-default focusCircle-default\");\n focusCircle.setAttribute(\"fill\", \"#F90\");\n focusCircle.setAttribute(\"visibility\", \"hidden\");\n dynamicsG.appendChild(focusCircle);\n dynamicsG.appendChild(focusLineX);\n dynamicsG.appendChild(focusLineY);\n\n // Tooltip\n var tooltipDiv = document.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\n var altiSpan = document.createElementNS(\"http://www.w3.org/2000/svg\", \"tspan\");\n var slopeSpan = document.createElementNS(\"http://www.w3.org/2000/svg\", \"tspan\");\n var coordsSpan = document.createElementNS(\"http://www.w3.org/2000/svg\", \"tspan\");\n tooltipDiv.setAttribute(\"style\", \"text-align:center; max-width:220px; font-size:10px; color:#000000; font-family:Verdana; z-index:50;\");\n tooltipDiv.style.pointerEvents = \"none\";\n tooltipDiv.style.position = \"fixed\";\n // tooltipDiv.classList.add(\"tooltipInit\");\n // IE...\n tooltipDiv.setAttribute(\"class\", \"tooltipInit\");\n tooltipDiv.setAttribute(\"text-anchor\", \"middle\");\n widgetDiv.appendChild(tooltipDiv);\n altiSpan.setAttribute(\"class\", \"altiPathValue\");\n altiSpan.setAttribute(\"x\", \"0\");\n altiSpan.setAttribute(\"dy\", \"-.7em\");\n slopeSpan.setAttribute(\"class\", \"altiPathValue\");\n slopeSpan.setAttribute(\"x\", \"0\");\n slopeSpan.setAttribute(\"dy\", \"1em\");\n coordsSpan.setAttribute(\"class\", \"altiPathCoords\");\n coordsSpan.setAttribute(\"x\", \"0\");\n coordsSpan.setAttribute(\"dy\", \"1em\");\n tooltipDiv.appendChild(altiSpan);\n if (_displayProfileOptions.currentSlope) {\n tooltipDiv.appendChild(slopeSpan);\n }\n tooltipDiv.appendChild(coordsSpan);\n var tooltipG = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n dynamicsG.appendChild(tooltipG);\n var tooltipBubble = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n tooltipBubble.setAttribute(\"cs\", \"100,100\");\n tooltipBubble.setAttribute(\"fill\", \"#FFFFFF\");\n tooltipBubble.setAttribute(\"stroke\", \"#CCCCCC\");\n tooltipBubble.setAttribute(\"fill-opacity\", \"0.8\");\n tooltipBubble.setAttribute(\"stroke-width\", \"1\");\n tooltipBubble.setAttribute(\"stroke-opacity\", \"1\");\n var tooltipBubbleShadow = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n tooltipBubbleShadow.setAttribute(\"cs\", \"100,100\");\n tooltipBubbleShadow.setAttribute(\"fill\", \"#FFFFFF\");\n tooltipBubbleShadow.setAttribute(\"stroke\", \"#000000\");\n tooltipBubbleShadow.setAttribute(\"fill-opacity\", \"0\");\n tooltipBubbleShadow.setAttribute(\"stroke-width\", \"1\");\n tooltipBubbleShadow.setAttribute(\"stroke-opacity\", \"0.4\");\n tooltipBubbleShadow.setAttribute(\"transform\", \"translate(1,1)\");\n tooltipG.appendChild(tooltipBubbleShadow);\n tooltipG.appendChild(tooltipBubble);\n tooltipG.appendChild(tooltipDiv);\n\n // tooltipG.classList.add(\"tooltipInit\");\n // IE... deprecated\n tooltipG.setAttribute(\"class\", \"tooltipInit\");\n tooltipG.style.pointerEvents = \"none\";\n function onMouseOver() {\n focusLineX.setAttribute(\"visibility\", \"visible\");\n focusLineY.setAttribute(\"visibility\", \"visible\");\n focusCircle.setAttribute(\"visibility\", \"visible\");\n className.__createProfileMarker(self, _points[0]);\n\n // tooltips\n // tooltipDiv.classList.remove(\"tooltipInit\");\n // tooltipG.classList.remove(\"tooltipInit\");\n // tooltipDiv.classList.remove(\"tooltipFadeOut\");\n // tooltipG.classList.remove(\"tooltipFadeOut\");\n // tooltipDiv.classList.add(\"tooltipFadeIn\");\n // tooltipG.classList.add(\"tooltipFadeIn\");\n // IE... deprecated\n tooltipDiv.setAttribute(\"class\", \"tooltipFadeIn\");\n tooltipG.setAttribute(\"class\", \"tooltipFadeIn\");\n }\n function onMouseOut() {\n focusLineX.setAttribute(\"visibility\", \"hidden\");\n focusLineY.setAttribute(\"visibility\", \"hidden\");\n focusCircle.setAttribute(\"visibility\", \"hidden\");\n className.__removeProfileMarker(self);\n // tooltips\n // tooltipDiv.classList.remove(\"tooltipFadeIn\");\n // tooltipG.classList.remove(\"tooltipFadeIn\");\n // tooltipDiv.classList.add(\"tooltipFadeOut\");\n // tooltipG.classList.add(\"tooltipFadeOut\");\n // IE... deprecated\n tooltipDiv.setAttribute(\"class\", \"tooltipFadeOut\");\n tooltipG.setAttribute(\"class\", \"tooltipFadeOut\");\n }\n function onMouseMove(e) {\n var mousePoint = elevationSvg.createSVGPoint();\n mousePoint.x = e.clientX;\n mousePoint.y = e.clientY;\n var svgMousePoint = mousePoint.matrixTransform(elevationSvg.getScreenCTM().inverse());\n var mouseDist = this._svgXToDataDist(svgMousePoint.x, widgetWidth, pathWidth, pxPerMX) * factor;\n\n // Math.max pour éviter de sortir de l'array\n var distIndex = Math.max(1, this._arrayBisect(sortedDist, mouseDist));\n var d0 = _points[distIndex - 1];\n var d1 = _points[distIndex];\n var d = d0;\n if (mouseDist - d0.dist > d1.dist - mouseDist) {\n d = d1;\n }\n var focusX = this._dataDistToSvgX(d.dist / factor, widgetWidth, pathWidth, pxPerMX);\n var focusY = this._dataZToSvgY(d.z, pathHeight, minGraphZ, pxPerMZ);\n\n // Mise à jour des éléments graphiques\n focusCircle.setAttribute(\"cx\", focusX);\n focusCircle.setAttribute(\"cy\", focusY);\n focusLineX.setAttribute(\"x1\", focusX);\n focusLineX.setAttribute(\"y1\", pathHeight);\n focusLineX.setAttribute(\"x2\", focusX);\n focusLineX.setAttribute(\"y2\", 0);\n focusLineY.setAttribute(\"x1\", zLabelWidth + zGradWidth);\n focusLineY.setAttribute(\"y1\", focusY);\n focusLineY.setAttribute(\"x2\", pathWidth + zLabelWidth + zGradWidth);\n focusLineY.setAttribute(\"y2\", focusY);\n className.__updateProfileMarker(self, d);\n\n // Mise à jour du tooltip\n var altiSpanTxt = \"Altitude : \".concat(d.z.toLocaleString(), \" m\");\n var slopeSpanTxt = \"Pente : \".concat(d.slope, \" %\");\n var coordsSpanTxt = \"(lat : \".concat(d.lat.toLocaleString(), \" / lon : \").concat(d.lon.toLocaleString(), \")\");\n altiSpan.innerHTML = altiSpanTxt;\n slopeSpan.innerHTML = slopeSpanTxt;\n coordsSpan.innerHTML = coordsSpanTxt;\n var tooltipTextWidth = Math.max(this._getTextWidth(coordsSpanTxt, coordsSpan), this._getTextWidth(altiSpanTxt, altiSpan));\n var toolTipBubbleD;\n if (d.dist > dist * factor / 2) {\n toolTipBubbleD = \"M -0.5 -0.5 l -6 6 l 0 16 l -\".concat(tooltipTextWidth + 10, \" 0 l 0 -44 l \").concat(tooltipTextWidth + 10, \" 0 l 0 16 l 6 6\");\n tooltipDiv.setAttribute(\"transform\", \"translate(\".concat(-(tooltipTextWidth / 2 + 12), \",0)\")); // IE11 !\n } else if (d.dist <= dist * factor / 2) {\n toolTipBubbleD = \"M -0.5 -0.5 l 6 6 l 0 16 l \".concat(tooltipTextWidth + 10, \" 0 l 0 -44 l -\").concat(tooltipTextWidth + 10, \" 0 l 0 16 l -6 6\");\n // Largeur de la fleche de la bulle du tooltip\n tooltipDiv.setAttribute(\"transform\", \"translate(\".concat(tooltipTextWidth / 2 + 12, \",0)\")); // IE11 !\n }\n\n tooltipBubble.setAttribute(\"d\", toolTipBubbleD);\n tooltipBubbleShadow.setAttribute(\"d\", toolTipBubbleD);\n tooltipG.setAttribute(\"transform\", \"translate(\".concat(focusX, \",\").concat(focusY, \")\")); // IE11 !\n tooltipG.style.transform = \"translate(\".concat(focusX, \"px,\").concat(focusY, \"px)\");\n }\n pathRectangle.addEventListener(\"pointerover\", onMouseOver);\n pathRectangle.addEventListener(\"pointerout\", onMouseOut);\n pathRectangle.addEventListener(\"pointermove\", onMouseMove.bind(this));\n dynamicsG.appendChild(pathRectangle);\n elevationSvg.appendChild(dynamicsG);\n widgetDiv.appendChild(elevationSvg);\n return container;\n },\n /**\n * Display Profile without graphical rendering (raw service response)\n *\n * @public\n * @param {Object} data - elevations values for profile\n * @param {HTMLElement} container - html container where to display profile\n * @param {Object} context - this control object\n * @param {Object} className - calling class (ie ElevationPath)\n * @returns {DOMElement} profil container\n */\n displayProfileRaw: function displayProfileRaw(data, container, context, className) {\n if (!container) {\n return;\n }\n\n // on nettoie toujours...\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n var _points = data && data.points ? data.points : {};\n var div = document.createElement(\"textarea\");\n div.id = \"profilElevationResults\";\n div.rows = 10;\n div.cols = 50;\n div.style.width = \"100%\";\n div.innerHTML = JSON.stringify(_points, undefined, 4);\n div.addEventListener(\"mouseover\", function (e) {\n className.__customRawProfileMouseOverEvent(context, e);\n });\n\n // TODO\n // for (var i = 0; i < _points.length; i++) {\n // var point = _points[i];\n // var divC = document.createElement(\"code\");\n // divC.id = \"point_\" + i;\n // divC.innerHTML = JSON.stringify(point, undefined, 4);\n // div.appendChild(divC);\n // divC.addEventListener(\"mouseover\", function (e) {\n // className.__customRawProfileMouseOverEvent(context, e);\n // });\n // }\n\n container.appendChild(div);\n return container;\n },\n /**\n * Display Profile using D3 javascript framework. This method needs D3 libraries to be loaded.\n *\n * @public\n * @param {Object} data - elevations values for profile\n * @param {HTMLElement} container - html container where to display profile\n * @param {Object} context - this control object\n * @param {Object} className - calling class (ie ElevationPath)\n * @returns {DOMElement} profil container\n */\n displayProfileLibD3: function displayProfileLibD3(data, container, context, className) {\n var self = context;\n if (!container) {\n return;\n }\n if (!data) {\n return;\n }\n\n // on nettoie toujours...\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n var _points = data.points;\n if (data.distance > 2000) {\n data.unit = \"km\";\n for (var i = 0; i < _points.length; i++) {\n _points[i].dist /= 1000;\n }\n }\n var _displayProfileOptions = self.options.displayProfileOptions;\n var margin = {\n top: 20,\n right: 20,\n bottom: 30,\n left: 40\n };\n var widgetWidth = window.getComputedStyle(container).getPropertyValue(\"width\");\n var widgetHeigth = window.getComputedStyle(container).getPropertyValue(\"height\");\n var width = widgetWidth.replace(/px/, \"\") - margin.left - margin.right;\n var height = widgetHeigth.replace(/px/, \"\") - margin.top - margin.bottom;\n var x = d3.scale.linear().range([0, width]);\n var y = d3.scale.linear().range([height, 0]);\n var xAxis = d3.svg.axis().scale(x).orient(\"bottom\").ticks(5);\n var yAxis = d3.svg.axis().scale(y).orient(\"left\").ticks(5);\n var line = d3.svg.line().interpolate(\"basis\").x(function (d) {\n return x(d.dist);\n }).y(function (d) {\n return y(d.z);\n });\n var area = d3.svg.area().interpolate(\"basis\").x(function (d) {\n return x(d.dist);\n }).y0(height).y1(function (d) {\n return y(d.z);\n });\n var svg = d3.select(container).append(\"svg\").attr(\"width\", width + margin.left + margin.right).attr(\"height\", height + margin.top + margin.bottom).append(\"g\").attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");\n var xDomain = d3.extent(_points, function (d) {\n return d.dist;\n });\n x.domain(xDomain);\n var yDomain = [0, d3.max(_points, function (d) {\n return d.z;\n })];\n y.domain(yDomain);\n svg.append(\"path\").datum(_points).attr(\"class\", \"area-d3\").attr(\"d\", area);\n svg.append(\"g\").attr(\"class\", \"x axis-d3\").attr(\"transform\", \"translate(0,\" + height + \")\").call(xAxis).append(\"text\").attr(\"y\", -15).attr(\"dy\", \".71em\").attr(\"x\", width).text(\"Distance (\" + data.unit + \")\");\n svg.append(\"g\").attr(\"class\", \"y axis-d3\").call(yAxis).append(\"text\").attr(\"transform\", \"rotate(-90)\").attr(\"y\", 6).attr(\"dy\", \".71em\").text(\"Altitude (m)\");\n svg.append(\"g\").attr(\"class\", \"grid-d3 vertical\").attr(\"transform\", \"translate(0,\" + height + \")\").call(xAxis.orient(\"bottom\").tickSize(-height, 0, 0).tickFormat(\"\"));\n svg.append(\"g\").attr(\"class\", \"grid-d3 horizontal\").call(yAxis.orient(\"left\").tickSize(-width, 0, 0).tickFormat(\"\"));\n svg.append(\"path\").datum(_points).attr(\"class\", \"line-d3\").attr(\"d\", line);\n svg.selectAll(\"circle\").data(_points).enter().append(\"circle\").attr(\"cx\", function (d) {\n return x(d.dist);\n }).attr(\"cy\", function (d) {\n return y(d.z);\n }).attr(\"r\", 0).attr(\"class\", \"circle-d3\");\n var focus = svg.append(\"g\").style(\"display\", \"none\");\n focus.append(\"line\").attr(\"id\", \"focusLineX\").attr(\"class\", \"focusLine-d3\");\n focus.append(\"line\").attr(\"id\", \"focusLineY\").attr(\"class\", \"focusLine-d3\");\n focus.append(\"circle\").attr(\"id\", \"focusCircle\").attr(\"r\", 4).attr(\"class\", \"circle-d3 focusCircle-d3\");\n var div = d3.select(container).append(\"div\").attr(\"class\", \"tooltip-d3\").style(\"opacity\", 0);\n var bisectDist = d3.bisector(function (d) {\n return d.dist;\n }).left;\n svg.append(\"rect\").attr(\"class\", \"overlay-d3\").attr(\"width\", width).attr(\"height\", height).on(\"mouseover\", function () {\n focus.style(\"display\", null);\n className.__createProfileMarker(self, _points[0]);\n }).on(\"mouseout\", function () {\n focus.style(\"display\", \"none\");\n className.__removeProfileMarker(self);\n\n // tooltips\n div.transition().duration(500).style(\"opacity\", 0);\n }).on(\"mousemove\", function () {\n var m = d3.mouse(this);\n var distance = x.invert(m[0]);\n // Math.max pour éviter de sortir de l'array\n var i = Math.max(1, bisectDist(_points, distance));\n var d0 = _points[i - 1];\n var d1 = _points[i];\n var d = distance - d0[0] > d1[0] - distance ? d1 : d0;\n var xc = x(d.dist);\n var yc = y(d.z);\n focus.select(\"#focusCircle\").attr(\"cx\", xc).attr(\"cy\", yc);\n focus.select(\"#focusLineX\").attr(\"x1\", xc).attr(\"y1\", y(yDomain[0])).attr(\"x2\", xc).attr(\"y2\", y(yDomain[1]));\n focus.select(\"#focusLineY\").attr(\"x1\", x(xDomain[0])).attr(\"y1\", yc).attr(\"x2\", x(xDomain[1])).attr(\"y2\", yc);\n className.__updateProfileMarker(self, d);\n\n // tooltips\n div.transition().duration(200).style(\"opacity\", 0.9);\n var _message = \"\";\n _message += \" Altitude : \" + d.z + \" m\";\n if (_displayProfileOptions.currentSlope) {\n _message += \"
    Pente : \" + d.slope + \" %\";\n }\n _message += \"
    (Lat : \" + d.lat + \"/ Lon : \" + d.lon + \")\";\n div.html(_message).style(\"left\", d3.event.pageX + \"px\").style(\"top\", d3.event.pageY - 28 + \"px\");\n });\n\n // return d3.selectAll(\"rect.overlay\")[0][0];\n return svg;\n },\n /**\n * Display Profile using Amcharts framework. This method needs AmCharts libraries to be loaded.\n *\n * @public\n * @param {Object} data - elevations values for profile\n * @param {HTMLElement} container - html container where to display profile\n * @param {Object} context - this control object\n * @param {Object} className - calling class (ie ElevationPath)\n * @returns {DOMElement} profil container\n */\n displayProfileLibAmCharts: function displayProfileLibAmCharts(data, container, context, className) {\n var self = context;\n if (!container) {\n return;\n }\n if (!data) {\n return;\n }\n var _points = data.points;\n var ballonText = \"[[title]] : [[value]]m
    \";\n var currentSlope = self.options.displayProfileOptions.currentSlope;\n if (currentSlope) {\n ballonText += \"Pente : [[slope]] %
    \";\n }\n ballonText += \"(Lat: [[lat]] / Lon:[[lon]])\";\n AmCharts.addInitHandler(function () {});\n if (data.distance > 2000) {\n data.unit = \"km\";\n for (var i = 0; i < _points.length; i++) {\n _points[i].dist /= 1000;\n }\n }\n for (var _i3 = 0; _i3 < _points.length; _i3++) {\n var dist = _points[_i3].dist;\n var coeffArrond = 100;\n if (dist > 100) {\n coeffArrond = 1;\n } else if (dist > 10) {\n coeffArrond = 10;\n }\n\n // Correction arrondi distance totale\n dist = Math.round(dist * coeffArrond) / coeffArrond;\n _points[_i3].dist = dist;\n }\n var settings = {\n type: \"serial\",\n pathToImages: \"http://cdn.amcharts.com/lib/3/images/\",\n categoryField: \"dist\",\n autoMarginOffset: 0,\n marginRight: 10,\n marginTop: 10,\n startDuration: 0,\n color: \"#5E5E5E\",\n fontSize: 8,\n theme: \"light\",\n thousandsSeparator: \"\",\n numberFormatter: {\n precision: -1,\n decimalSeparator: \",\",\n thousandsSeparator: \" \"\n },\n categoryAxis: {\n color: \"#5E5E5E\",\n gridPosition: \"start\",\n minHorizontalGap: 40,\n tickPosition: \"start\",\n title: \"Distance (\" + data.unit + \")\",\n titleColor: \"#5E5E5E\",\n labelOffset: 0,\n startOnAxis: true\n },\n chartCursor: {\n animationDuration: 0,\n bulletsEnabled: true,\n bulletSize: 10,\n categoryBalloonEnabled: false,\n cursorColor: \"#F90\",\n graphBulletAlpha: 1,\n graphBulletSize: 1,\n zoomable: false\n },\n trendLines: [],\n graphs: [{\n balloonColor: \"#CCCCCC\",\n balloonText: ballonText,\n bullet: \"round\",\n bulletAlpha: 0,\n bulletBorderColor: \"#FFF\",\n bulletBorderThickness: 2,\n bulletColor: \"#F90\",\n bulletSize: 6,\n hidden: false,\n id: \"AmGraph-1\",\n fillAlphas: 0.4,\n fillColors: \"#C77A04\",\n lineAlpha: 1,\n lineColor: \"#C77A04\",\n lineThickness: 1,\n title: \"Altitude\",\n valueField: \"z\"\n }],\n guides: [],\n valueAxes: [{\n id: \"ValueAxis-1\",\n minVerticalGap: 20,\n title: \"Altitude (m)\"\n }],\n balloon: {\n borderColor: \"#CCCCCC\",\n borderThickness: 1,\n fillColor: \"#FFFFFF\",\n showBullet: true\n },\n titles: [],\n allLabels: [],\n dataProvider: _points\n };\n var _containerProfile = AmCharts.makeChart(container, settings);\n _containerProfile.addListener(\"changed\", function (e) {\n var obj = e.chart.dataProvider[e.index];\n className.__updateProfileMarker(self, obj);\n });\n return _containerProfile;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ProfileElevationPathDOM);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ29udHJvbHMvUHJvZmlsZUVsZXZhdGlvblBhdGhET00uanM/Yjc5OSJdLCJuYW1lcyI6WyJQcm9maWxlRWxldmF0aW9uUGF0aERPTSIsIl9nZXRDc3NQcm9wZXJ0eSIsImVsZW1lbnQiLCJwcm9wZXJ0eSIsIndpbmRvdyIsImdldENvbXB1dGVkU3R5bGUiLCJnZXRQcm9wZXJ0eVZhbHVlIiwiX2dldFRleHRXaWR0aCIsInRleHQiLCJjb250YWluZXIiLCJmb250IiwiYXJndW1lbnRzIiwibGVuZ3RoIiwidW5kZWZpbmVkIiwiY2FudmFzIiwiZG9jdW1lbnQiLCJjcmVhdGVFbGVtZW50IiwiY29udGV4dCIsImdldENvbnRleHQiLCJjb25jYXQiLCJtZXRyaWNzIiwibWVhc3VyZVRleHQiLCJ3aWR0aCIsIl9kYXRhWlRvU3ZnWSIsInoiLCJwYXRoSGVpZ2h0IiwibWluR3JhcGhaIiwicHhQZXJNWiIsIl9kYXRhRGlzdFRvU3ZnWCIsImRpc3QiLCJzdmdXaWR0aCIsInBhdGhXaWR0aCIsInB4UGVyTVgiLCJfc3ZnWFRvRGF0YURpc3QiLCJzdmdYIiwiX2FycmF5QmlzZWN0IiwiYXJyYXkiLCJ2YWx1ZSIsImlkeCIsImRpc3BsYXlQcm9maWxlQnlEZWZhdWx0IiwiZGF0YSIsImNsYXNzTmFtZSIsInNlbGYiLCJmaXJzdENoaWxkIiwicmVtb3ZlQ2hpbGQiLCJtYXJnaW4iLCJ0b3AiLCJyaWdodCIsImJvdHRvbSIsImxlZnQiLCJfZGlzcGxheVByb2ZpbGVPcHRpb25zIiwib3B0aW9ucyIsImRpc3BsYXlQcm9maWxlT3B0aW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zZWQgYnkgZGVmYXVsdCA6IG5vIGFkZGl0b25hbCBmcmFtZXdvcmsgbmVlZGVkLlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBkYXRhIC0gZWxldmF0aW9ucyB2YWx1ZXMgZm9yIHByb2ZpbGVcbiAgICAgKiBAcGFyYW0ge0hUTUxFbGVtZW50fSBjb250YWluZXIgLSBodG1sIGNvbnRhaW5lciB3aGVyZSB0byBkaXNwbGF5IHByb2ZpbGVcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gY29udGV4dCAtIHRoaXMgY29udHJvbCBvYmplY3RcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gY2xhc3NOYW1lIC0gY2FsbGluZyBjbGFzcyAoaWUgRWxldmF0aW9uUGF0aClcbiAgICAgKiBAcmV0dXJucyB7RE9NRWxlbWVudH0gcHJvZmlsIGNvbnRhaW5lclxuICAgICAqL1xuICAgIGRpc3BsYXlQcm9maWxlQnlEZWZhdWx0IDogZnVuY3Rpb24gKGRhdGEsIGNvbnRhaW5lciwgY29udGV4dCwgY2xhc3NOYW1lKSB7XG4gICAgICAgIHZhciBzZWxmID0gY29udGV4dDtcblxuICAgICAgICBpZiAoIWNvbnRhaW5lcikge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFkYXRhKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBvbiBuZXR0b2llIHRvdWpvdXJzLi4uXG4gICAgICAgIHdoaWxlIChjb250YWluZXIuZmlyc3RDaGlsZCkge1xuICAgICAgICAgICAgY29udGFpbmVyLnJlbW92ZUNoaWxkKGNvbnRhaW5lci5maXJzdENoaWxkKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IG1hcmdpbiA9IHtcbiAgICAgICAgICAgIHRvcCA6IDI1LFxuICAgICAgICAgICAgcmlnaHQgOiAxNSxcbiAgICA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Rpb24gZGUgMTAqKnggZW4gMTAqKnggKGV0IG5vbiAxMCoqeCAvIDIpXG4gICAgICAgIGlmIChudW1aZ3VpZGVzICsgMSA+IG1heE51bVpndWlkZXMpIHtcbiAgICAgICAgICAgIGdyYWRaID0gTWF0aC5wb3coMTAsIChNYXRoLmNlaWwoTWF0aC5sb2coKG1heFogLSBtaW5aKSAvIG1heE51bVpndWlkZXMpIC8gTWF0aC5sb2coMTApKSkpO1xuICAgICAgICAgICAgbWluR3JhcGhaID0gTWF0aC5mbG9vcihtaW5aIC8gZ3JhZFopICogZ3JhZFo7XG4gICAgICAgICAgICBtYXhHcmFwaFogPSBNYXRoLmNlaWwobWF4WiAvIGdyYWRaKSAqIGdyYWRaO1xuICAgICAgICAgICAgLy8gY2FzIG/DuSBsZSBwYXRoIGF0dGVpbnQgcGlsZSBsZXMgZ3JhZHVhdGlvbnMgZXh0cmVtZXMgOiBham91dCBkJ3VuZSBncmFkaWF0aW9uXG4gICAgICAgICAgICBpZiAobWF4R3JhcGhaID09PSBtYXhaKSB7XG4gICAgICAgICAgICAgICAgbWF4R3JhcGhaICs9IGdyYWRaO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gY2FzIG/DuSBncmFkWiA8IDEgOiBub21icmVzIGZsb3R0YW50cyBjYXByaWNpZXV4Li4uXG4gICAgICAgICAgICBtaW5HcmFwaFogPSBNYXRoLnJvdW5kKG1pbkdyYXBoWiAqIDEwMCkgLyAxMDA7XG4gICAgICAgICAgICBtYXhHcmFwaFogPSBNYXRoLnJvdW5kKG1heEdyYXBoWiAqIDEwMCkgLyAxMDA7XG4gICAgICAgICAgICBudW1aZ3VpZGVzID0gTWF0aC5mbG9vcigobWF4R3JhcGhaIC0gbWluR3JhcGhaKSAvIGdyYWRaKTtcbiAgICAgICAgfVxuXG4gICAgICAgIG51bVpndWlkZXMgPSBNYXRoLm1heChNYXRoLnJvdW5kKG51bVpndWlkZXMpLCAxKTtcblxuICAgICAgICBjb25zdCBheGlz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IG1hcmdpbi50b3AgLSBtYXJnaW4uYm90dG9tO1xuXG4gICAgICAgIHZhciB4ID0gZDMuc2NhbGUubGluZWFyKClcbiAgICAgICAgICAgIC5yYW5nZShbMCwgd2lkdGhdKTtcblxuICAgICAgICB2YXIgeSA9IGQzLnNjYWxlLmxpbmVhcigpXG4gICAgICAgICAgICAucmFuZ2UoW2hlaWdodCwgMF0pO1xuXG4gICAgICAgIHZhciB4QXhpcyA9IGQzLnN2Zy5heGlzKClcbiAgICAgICAgICAgIC5zY2FsZSh4KVxuICAgICAgICAgICAgLm9yaWVudChcImJvdHRvbVwiKVxuICAgICAgICAgICAgLnRpY2tzKDUpO1xuXG4gICAgICAgIHZhciB5QXhpcyA9IGQzLnN2Zy5heGlzKClcbiAgICAgICAgICAgIC5zY2FsZSh5KVxuICAgICAgICAgICAgLm9yaWVudChcImxlZnRcIilcbiAgICAgICAgICAgIC50aWNrcyg1KTtcblxuICAgICAgICB2YXIgbGluZSA9IGQzLnN2Zy5saW5lKClcbiAgICAgICAgICAgIC5pbnRlcnBvbGF0ZShcImJhc2lzXCIpXG4gICAgICAgICAgICAueChmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB4KGQuZGlzdCk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLnkoZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4geShkLnopO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgdmFyIGFyZWEgPSBkMy5zdmcuYXJlYSgpXG4gICAgICAgICAgICAuaW50ZXJwb2xhdGUoXCJiYXNpc1wiKVxuICAgICAgICAgICAgLngoZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4geChkLmRpc3QpO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC55MChoZWlnaHQpXG4gICAgICAgICAgICAueTEoZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4geShkLnopO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgdmFyIHN2ZyA9IGQzLnNlbGVjdChjb250YWluZXIpXG4gICAgICAgICAgICAuYXBwZW5kKFwic3ZnXCIpXG4gICAgICAgICAgICAuYXR0cihcIndpZHRoXCIsIHdpZHRoICsgbWFyZ2luLmxlZnQgKyBtYXJnaW4ucmlnaHQpXG4gICAgICAgICAgICAuYXR0cihcImhlaWdodFwiLCBoZWlnaHQgKyBtYXJnaW4udG9wICsgbWFyZ2luLmJvdHRvbSlcbiAgICAgICAgICAgIC5hcHBlbmQoXCJnXCIpXG4gICAgICAgICAgICAuYXR0cihcInRyYW5zZm9ybVwiLCBcInRyYW5zbGF0ZShcIiArIG1hcmdpbi5sZWZ0ICsgXCIsXCIgKyBtYXJnaW4udG9wICsgXCIpXCIpO1xuXG4gICAgICAgIHZhciB4RG9tYWluID0gZDMuZXh0ZW50KF9wb2ludHMsIGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICByZXR1cm4gZC5kaXN0O1xuICAgICAgICB9KTtcbiAgICAgICAgeC5kb21haW4oeERvbWFpbik7XG5cbiAgICAgICAgdmFyIHlEb21haW4gPSBbXG4gICAgICAgICAgICAwLFxuICAgICAgICAgICAgZDMubWF4KF9wb2ludHMsIGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGQuejtcbiAgICAgICAgICAgIH0pXG4gICAgICAgIF07XG4gICAgICAgIHkuZG9tYWluKHlEb21haW4pO1xuXG4gICAgICAgIHN2Zy5hcHBlbmQoXCJwYXRoXCIpXG4gICAgICAgICAgICAuZGF0dW0oX3BvaW50cylcbiAgICAgICAgICAgIC5hdHRyKFwiY2xhc3NcIiwgXCJhcmVhLWQzXCIpXG4gICAgICAgICAgICAuYXR0cihcImRcIiwgYXJlYSk7XG5cbiAgICAgICAgc3ZnLmFwcGVuZChcImdcIilcbiAgICAgICAgICAgIC5hdHRyKFwiY2xhc3NcIiwgXCJ4IGF4aXMtZDNcIilcbiAgICAgICAgICAgIC5hdHRyKFwidHJhbnNmb3JtXCIsIFwidHJhbnNsYXRlKDAsXCIgKyBoZWlnaHQgKyBcIilcIilcbiAgICAgICAgICAgIC5jYWxsKHhBeGlzKVxuICAgICAgICAgICAgLmFwcGVuZChcInRleHRcIilcbiAgICAgICAgICAgIC5hdHRyKFwieVwiLCAtMTUpXG4gICAgICAgICAgICAuYXR0cihcImR5XCIsIFwiLjcxZW1cIilcbiAgICAgICAgICAgIC5hdHRyKFwieFwiLCB3aWR0aClcbiAgICAgICAgICAgIC50ZXh0KFwiRGlzdGFuY2UgKFwiICsgZGF0YS51bml0ICsgXCIpXCIpO1xuXG4gICAgICAgIHN2Zy5hcHBlbmQoXCJnXCIpXG4gICAgICAgICAgICAuYXR0cihcImNsYXNzXCIsIFwieSBheGlzLWQzXCIpXG4gICAgICAgICAgICAuY2FsbCh5QXhpcylcbiAgICAgICAgICAgIC5hcHBlbmQoXCJ0ZXh0XCIpXG4gICAgICAgICAgICAuYXR0cihcInRyYW5zZm9ybVwiLCBcInJvdGF0ZSgtOTApXCIpXG4gICAgICAgICAgICAuYXR0cihcInlcIiwgNilcbiAgICAgICAgICAgIC5hdHRyKFwiZHlcIiwgXCIuNzFlbVwiKVxuICAgICAgICAgICAgLnRleHQoXCJBbHRpdHVkZSAobSlcIik7XG5cbiAgICAgICAgc3ZnLmFwcGVuZChcImdcIilcbiAgICAgICAgICAgIC5hdHRyKFwiY2xhc3NcIiwgXCJncmlkLWQzIHZlcnRpY2FsXCIpXG4gICAgICAgICAgICAuYXR0cihcInRyYW5zZm9ybVwiLCBcInRyYW5zbGF0ZSgwLFwiICsgaGVpZ2h0ICsgXCIpXCIpXG4gICAgICAgICAgICAuY2FsbCh4QXhpc1xuICAgICAgICAgICAgICAgIC5vcmllbnQoXCJib3R0b21cIilcbiAgICAgICAgICAgICAgICAudGlja1NpemUoLWhlaWdodCwgMCwgMClcbiAgICAgICAgICAgICAgICAudGlja0Zvcm1hdChcIlwiKVxuICAgICAgICAgICAgKTtcblxuICAgICAgICBzdmcuYXBwZW5kKFwiZ1wiKVxuICAgICAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBcImdyaWQtZDMgaG9yaXpvbnRhbFwiKVxuICAgICAgICAgICAgLmNhbGwoeUF4aXNcbiAgICAgICAgICAgICAgICAub3JpZW50KFwibGVmdFwiKVxuICAgICAgICAgICAgICAgIC50aWNrU2l6ZSgtd2lkdGgsIDAsIDApXG4gICAgICAgICAgICAgICAgLnRpY2tGb3JtYXQoXCJcIilcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgc3ZnLmFwcGVuZChcInBhdGhcIilcbiAgICAgICAgICAgIC5kYXR1bShfcG9pbnRzKVxuICAgICAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBcImxpbmUtZDNcIilcbiAgICAgICAgICAgIC5hdHRyKFwiZFwiLCBsaW5lKTtcblxuICAgICAgICBzdmcuc2VsZWN0QWxsKFwiY2lyY2xlXCIpXG4gICAgICAgICAgICAuZGF0YShfcG9pbnRzKVxuICAgICAgICAgICAgLmVudGVyKClcbiAgICAgICAgICAgIC5hcHBlbmQoXCJjaXJjbGVcIilcbiAgICAgICAgICAgIC5hdHRyKFwiY3hcIiwgZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4geChkLmRpc3QpO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5hdHRyKFwiY3lcIiwgZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4geShkLnopO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5hdHRyKFwiclwiLCAwKVxuICAgICAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBcImNpcmNsZS1kM1wiKTtcblxuICAgICAgICB2YXIgZm9jdXMgPSBzdmcuYXBwZW5kKFwiZ1wiKS5zdHlsZShcImRpc3BsYXlcIiwgXCJub25lXCIpO1xuXG4gICAgICAgIGZvY3VzLmFwc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B7XG4gICAgICAgICAgICAgICAgZm9jdXMuc3R5bGUoXCJkaXNwbGF5XCIsIG51bGwpO1xuICAgICAgICAgICAgICAgIGNsYXNzTmFtZS5fX2NyZWF0ZVByb2ZpbGVNYXJrZXIoc2VsZiwgX3BvaW50c1swXSk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKFwibW91c2VvdXRcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGZvY3VzLnN0eWxlKFwiZGlzcGxheVwiLCBcIm5vbmVcIik7XG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lLl9fcmVtb3ZlUHJvZmlsZU1hcmtlcihzZWxmKTtcblxuICAgICAgICAgICAgICAgIC8vIHRvb2x0aXBzXG4gICAgICAgICAgICAgICAgZGl2LnRyYW5zaXRpb24oKVxuICAgICAgICAgICAgICAgICAgICAuZHVyYXRpb24oNTAwKVxuICAgICAgICAgICAgICAgICAgICAuc3R5bGUoXCJvcGFjaXR5XCIsIDApO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbihcIm1vdXNlbW92ZVwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgdmFyIG0gPSBkMy5tb3VzZSh0aGlzKTtcbiAgICAgICAgICAgICAgICB2YXIgZGlzdGFuY2UgPSB4LmludmVydChtWzBdKTtcbiAgICAgICAgICAgICAgICAvLyBNYXRoLm1heCBwb3VyIMOpdml0ZXIgZGUgc29ydGlyIGRlIGwnYXJyYXlcbiAgICAgICAgICAgICAgICB2YXIgaSA9IE1hdGgubWF4KDEsIGJpc2VjdERpc3QoX3BvaW50cywgZGlzdGFuY2UpKTtcblxuICAgICAgICAgICAgICAgIHZhciBkMCA9IF9wb2ludHNbaSAtIDFdO1xuICAgICAgICAgICAgICAgIHZhciBkMSA9IF9wb2ludHNbaV07XG4gICAgICAgICAgICAgICAgdmFyIGQgPSBkaXN0YW5jZSAtIGQwWzBdID4gZDFbMF0gLSBkaXN0YW5jZSA/IGQxIDogZDA7XG5cbiAgICAgICAgICAgICAgICB2YXIgeGMgPSB4KGQuZGlzdCk7XG4gICAgICAgICAgICAgICAgdmFyIHljID0geShkLnopO1xuXG4gICAgICAgICAgICAgICAgZm9jdXMuc2VsZWN0KFwiI2ZvY3VzQ2lyY2xlXCIpXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKFwiY3hcIiwgeGMpXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKFwiY3lcIiwgeWMpO1xuICAgICAgICAgICAgICAgIGZvY3VzLnNlbGVjdChcIiNmb2N1c0xpbmVYXCIpXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKFwieDFcIiwgeGMpLmF0dHIoXCJ5MVwiLCB5KHlEb21haW5bMF0pKVxuICAgICAgICAgICAgICAgICAgICAuYXR0cihcIngyXCIsIHhjKS5hdHRyKFwieTJcIiwgeSh5RG9tYWluWzFdKSk7XG4gICAgICAgICAgICAgICAgZm9jdXMuc2VsZWN0KFwiI2ZvY3VzTGluZVlcIilcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJ4MVwiLCB4KHhEb21haW5bMF0pKS5hdHRyKFwieTFcIiwgeWMpXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKFwieDJcIiwgeCh4RG9tYWluWzFdKSkuYXR0cihcInkyXCIsIHljKTtcblxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZS5fX3VwZGF0ZVByb2ZpbGVNYXJrZXIoc2VsZiwgZCk7XG5cbiAgICAgICAgICAgICAgICAvLyB0b29sdGlwc1xuICAgICAgICAgICAgICAgIGRpdi50cmFuc2l0aW9uKClcbiAgICAgICAgICAgICAgICAgICAgLmR1cmF0aW9uKDIwMClcbiAgICAgICAgICAgICAgICAgICAgLnN0eWxlKFwib3BhY2l0eVwiLCAwLjkpO1xuXG4gICAgICAgICAgICAgICAgdmFyIF9tZXNzYWdlID0gXCJcIjtcbiAgICAgICAgICAgICAgICBfbWVzc2FnZSArPSBcIiBBbHRpdHVkZSA6IFwiICsgZC56ICsgXCIgbVwiO1xuICAgICAgICAgICAgICAgIGlmIChfZGlzcGxheVByb2ZpbGVPcHRpb25zLmN1cnJlbnRTbG9wZSkge1xuICAgICAgICAgICAgICAgICAgICBfbWVzc2FnZSArPSBcIjxici8+IFBlbnRlIDogXCIgKyBkLnNsb3BlICsgXCIgJVwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBfbWVzc2FnZSArPSBcIjxici8+IChMYXQgOiBcIiArIGQubGF0ICsgXCIvIExvbiA6IFwiICsgZC5sb24gKyBcIilcIjtcblxuICAgICAgICAgICAgICAgIGRpdi5odG1sKF9tZXNzYWdlKVxuICAgICAgICAgICAgICAgICAgICAuc3R5bGUoXCJsZWZ0XCIsIChkMy5ldmVudC5wYWdlWCkgKyBcInB4XCIpXG4gICAgICAgICAgICAgICAgICAgIC5zdHlsZShcInRvcFwiLCAoZDMuZXZlbnQucGFnZVkgLSAyOCkgKyBcInB4XCIpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gcmV0dXJuIGQzLnNlbGVjdEFsbChcInJlY3Qub3ZlcmxheVwiKVswXVswXTtcbiAgICAgICAgcmV0dXJuIHN2ZztcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogRGlzcGxheSBQcm9maWxlIHVzaW5nIEFtY2hhcnRzIGZyYW1ld29yay4gVGhpcyBtZXRob2QgbmVlZHMgQW1DaGFydHMgbGlicmFyaWVzIHRvIGJlIGxvYWRlZC5cbiAgICAgKlxuICAgICAqIEBwdWJsaWNcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gZGF0YSAtIGVsZXZhdGlvbnMgdmFsdWVzIGZvciBwcm9maWxlXG4gICAgICogQHBhcmFtIHtIVE1MRWxlbWVudH0gY29udGFpbmVyIC0gaHRtbCBjb250YWluZXIgd2hlcmUgdG8gZGlzcGxheSBwcm9maWxlXG4gICAgICogQHBhcmFtIHtPYmplY3R9IGNvbnRleHQgLSB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dEhhbmRsZXIoZnVuY3Rpb24gKCkge30pO1xuXG4gICAgICAgIGlmIChkYXRhLmRpc3RhbmNlID4gMjAwMCkge1xuICAgICAgICAgICAgZGF0YS51bml0ID0gXCJrbVwiO1xuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBfcG9pbnRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgX3BvaW50c1tpXS5kaXN0IC89IDEwMDA7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IF9wb2ludHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBkaXN0ID0gX3BvaW50c1tpXS5kaXN0O1xuICAgICAgICAgICAgdmFyIGNvZWZmQXJyb25kID0gMTAwO1xuICAgICAgICAgICAgaWYgKGRpc3QgPiAxMDApIHtcbiAgICAgICAgICAgICAgICBjb2VmZkFycm9uZCA9IDE7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGRpc3QgPiAxMCkge1xuICAgICAgICAgICAgICAgIGNvZWZmQXJyb25kID0gMTA7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIENvcnJlY3Rpb24gYXJyb25kaSBkaXN0YW5jZSB0b3RhbGVcbiAgICAgICAgICAgIGRpc3QgPSBNYXRoLnJvdW5kKGRpc3QgKiBjb2VmZkFycm9uZCkgLyBjb2VmZkFycm9uZDtcbiAgICAgICAgICAgIF9wb2ludHNbaV0uZGlzdCA9IGRpc3Q7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgc2V0dGluZ3MgPSB7XG4gICAgICAgICAgICB0eXBlIDogXCJzZXJpYWxcIixcbiAgICAgICAgICAgIHBhdGhUb0ltYWdlcyA6IFwiaHR0cDovL2Nkbi5hbWNoYXJ0cy5jb20vbGliLzMvaW1hZ2VzL1wiLFxuICAgICAgICAgICAgY2F0ZWdvcnlGaWVsZCA6IFwiZGlzdFwiLFxuICAgICAgICAgICAgYXV0b01hcmdpbk9mZnNldCA6IDAsXG4gICAgICAgICAgICBtYXJnaW5SaWdodCA6IDEwLFxuICAgICAgICAgICAgbWFyZ2luVG9wIDogMTAsXG4gICAgICAgICAgICBzdGFydER1cmF0aW9uIDogMCxcbiAgICAgICAgICAgIGNvbG9yIDogXCIjNUU1RTVFXCIsXG4gICAgICAgICAgICBmb250U2l6ZSA6IDgsXG4gICAgICAgICAgICB0aGVtZSA6IFwibGlnaHRcIixcbiAgICAgICAgICAgIHRob3VzYW5kc1NlcGFyYXRvciA6IFwiXCIsXG4gICAgICAgICAgICBudW1iZXJGb3JtYXR0ZXIgOiB7XG4gICAgICAgICAgICAgICAgcHJlY2lzaW9uIDogLTEsXG4gICAgICAgICAgICAgICAgZGVjaW1hbFNlcGFyYXRvciA6IFwiLFwiLFxuICAgICAgICAgICAgICAgIHRob3VzYW5kc1NlcGFyYXRvciA6IFwiIFwiXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY2F0ZWdvcnlBeGlzIDoge1xuICAgICAgICAgICAgICAgIGNvbG9yIDogXCIjNUU1RTVFXCIsXG4gICAgICAgICAgICAgICAgZ3JpZFBvc2l0aW9uIDogXCJzdGFydFwiLFxuICAgICAgICAgICAgICAgIG1pbkhvcml6b250YWxHYXAgOiA0MCxcbiAgICAgICAgICAgICAgICB0aWNrUG9zaXRpb24gOiBcInN0YXJ0XCIsXG4gICAgICAgICAgICAgICAgdGl0bGUgOiBcIkRpc3RhbmNlIChcIiArIGRhdGEudW5pdCArIFwiKVwiLFxuICAgICAgICAgICAgICAgIHRpdGxlQ29sb3IgOiBcIiM1RTVFNUVcIixcbiAgICAgICAgICAgICAgICBsYWJlbE9mZnNldCA6IDAsXG4gICAgICAgICAgICAgICAgc3RhcnRPbkF4aXMgOiB0cnVlXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY2hhcnRDdXJzb3IgOiB7XG4gICAgICAgICAgICAgICAgYW5pbWF0aW9uRHVyYXRpb24gOiAwLFxuICAgICAgICAgICAgICAgIGJ1bGxldHNFbmFibGVkIDogdHJ1ZSxcbiAgICAgICAgICAgICAgICBidWxsZXRTaXplIDogMTAsXG4gICAgICAgICAgICAgICAgY2F0ZWdvcnlCYWxsb29uRW5hYmxlZCA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIGN1cnNvckNvbG9yIDogXCIjRjkwXCIsXG4gICAgICAgICAgICAgICAgZ3JhcGhCdWxsZXRBbHBoYSA6IDEsXG4gICAgICAgICAgICAgICAgZ3JhcGhCdWxsZXRTaXplIDogMSxcbiAgICAgICAgICAgICAgICB6b29tYWJsZSA6IGZhbHNlXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdHJlbmRMaW5lcyA6IFtdLFxuICAgICAgICAgICAgZ3JhcGhzIDogW3tcbiAgICAgICAgICAgICAgICBiYWxsb29uQ29sb3IgOiBcIiNDQ0NDQ0NcIixcbiAgICAgICAgICAgICAgICBiYWxsb29uVGV4dCA6IGJhbGxvblRleHQsXG4gICAgICAgICAgICAgICAgYnVsbGV0IDogXCJyb3VuZFwiLFxuICAgICAgICAgICAgICAgIGJ1bGxldEFscGhhIDogMCxcbiAgICAgICAgICAgICAgICBidWxsZXRCb3JkZXJDb2xvciA6IFwiI0ZGRlwiLFxuICAgICAgICAgICAgICAgIGJ1bGxldEJvcmRlclRoaWNrbmVzcyA6IDIsXG4gICAgICAgICAgICAgICAgYnVsbGV0Q29sb3IgOiBcIiNGOTBcIixcbiAgICAgICAgICAgICAgICBidWxsZXRTaXplIDogNixcbiAgICAgICAgICAgICAgICBoaWRkZW4gOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBpZCA6IFwiQW1HcmFwaC0xXCIsXG4gICAgICAgICAgICAgICAgZmlsbEFscGhhcyA6IDAuNCxcbiAgICAgICAgICAgICAgICBmaWxsQ29sb3JzIDogXCIjQzc3QTA0XCIsXG4gICAgICAgICAgICAgICAgbGluZUFscGhhIDogMSxcbiAgICAgICAgICAgICAgICBsaW5lQ29sb3IgOiBcIiNDNzdBMDRcIixcbiAgICAgICAgICAgICAgICBsaW5lVGhpY2tuZXNzIDogMSxcbiAgICAgICAgICAgICAgICB0aXRsZSA6IFwiQWx0aXR1ZGVcIixcbiAgICAgICAgICAgICAgICB2YWx1ZUZpZWxkIDogXCJ6XCJcbiAgICAgICAgICAgIH1dLFxuICAgICAgICAgICAgZ3VpZGVzIDogW10sXG4gICAgICAgICAgICB2YWx1ZUF4ZXMgOiBbe1xuICAgICAgICAgICAgICAgIGlkIDogXCJWYWx1ZUF4aXMtMVwiLFxuICAgICAgICAgICAgICAgIG1pblZlcnRpY2FsR2FwIDogMjAsXG4gICAgICAgICAgICAgICAgdGl0bGUgOiBcIkFsdGl0dWRlIChtKVwiXG4gICAgICAgICAgICB9XSxcbiAgICAgICAgICAgIGJhbGxvb24gOiB7XG4gICAgICAgICAgICAgICAgYm9yZGVyQ29sb3IgOiBcIiNDQ0NDQ0NcIixcbiAgICAgICAgICAgICAgICBib3JkZXJUaGlja25lc3MgOiAxLFxuICAgICAgICAgICAgICAgIGZpbGxDb2xvciA6IFwiI0ZGRkZGRlwiLFxuICAgICAgICAgICAgICAgIHNob3dCdWxsZXQgOiB0cnVlXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdGl0bGVzIDogW10sXG4gICAgICAgICAgICBhbGxMYWJlbHMgOiBbXSxcbiAgICAgICAgICAgIGRhdGFQcm92aWRlciA6IF9wb2ludHNcbiAgICAgICAgfTtcblxuICAgICAgICB2YXIgX2NvbnRhaW5lclByb2ZpbGUgPSBBbUNoYXJ0cy5tYWtlQ2hhcnQoY29udGFpbmVyLCBzZXR0aW5ncyk7XG5cbiAgICAgICAgX2NvbnRhaW5lclByb2ZpbGUuYWRkTGlzdGVuZXIoXCJjaGFuZ2VkXCIsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICB2YXIgb2JqID0gZS5jaGFydC5kYXRhUHJvdmlkZXJbZS5pbmRleF07XG4gICAgICAgICAgICBjbGFzc05hbWUuX191cGRhdGVQcm9maWxlTWFya2VyKHNlbGYsIG9iaik7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBfY29udGFpbmVyUHJvZmlsZTtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBQcm9maWxlRWxldmF0aW9uUGF0aERPTTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/Controls/ProfileElevationPathDOM.js\n"); + +/***/ }), + +/***/ "./src/Common/Controls/ReverseGeocodingDOM.js": +/*!****************************************************!*\ + !*** ./src/Common/Controls/ReverseGeocodingDOM.js ***! + \****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nvar ReverseGeocodingDOM = {\n /**\n * Add uuid to the tag ID\n * @param {String} id - id selector\n * @returns {String} uid - id selector with an unique id\n */\n _addUID: function _addUID(id) {\n var uid = this._uid ? id + \"-\" + this._uid : id;\n return uid;\n },\n /**\n * Main container (DOM)\n *\n * @returns {DOMElement} DOM element\n */\n _createMainContainerElement: function _createMainContainerElement() {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPreverseGeocoding\");\n container.className = \"GPwidget\";\n return container;\n },\n // ################################################################### //\n // ################### Methods of main container ##################### //\n // ################################################################### //\n\n /**\n * Hidden checkbox for minimizing/maximizing\n *\n * @returns {DOMElement} DOM element\n */\n _createShowReverseGeocodingElement: function _createShowReverseGeocodingElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPshowReverseGeocoding\");\n input.type = \"checkbox\";\n return input;\n },\n /**\n * Show ReverseGeocoding\n *\n * @returns {DOMElement} DOM element\n */\n _createShowReverseGeocodingPictoElement: function _createShowReverseGeocodingPictoElement() {\n // contexte d'execution\n var self = this;\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowReverseGeocodingPicto\");\n label.className = \"GPshowAdvancedToolPicto\";\n label.htmlFor = this._addUID(\"GPshowReverseGeocoding\");\n label.title = \"Ouvrir la recherche inverse\";\n\n // Close all results and panels when minimizing the widget\n if (label.addEventListener) {\n label.addEventListener(\"click\", function () {\n self.onShowReverseGeocodingClick();\n });\n } else if (label.attachEvent) {\n label.attachEvent(\"onclick\", function () {\n self.onShowReverseGeocodingClick();\n });\n }\n var spanOpen = document.createElement(\"span\");\n spanOpen.id = this._addUID(\"GPshowReverseGeocodingOpen\");\n spanOpen.className = \"GPshowAdvancedToolOpen\";\n label.appendChild(spanOpen);\n return label;\n },\n /**\n * Create Waiting Panel\n *\n * @returns {DOMElement} DOM element\n */\n _createReverseGeocodingWaitingElement: function _createReverseGeocodingWaitingElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPreverseGeocodingCalcWaitingContainer\");\n div.className = \"GPreverseGeocodingCalcWaitingContainerHidden\";\n var p = document.createElement(\"p\");\n p.className = \"GPreverseGeocodingCalcWaiting\";\n p.innerHTML = \"Recherche en cours...\";\n div.appendChild(p);\n return div;\n },\n /**\n * Reverse geocoding results panel element.\n *\n * @returns {DOMElement} DOM element\n */\n _createReverseGeocodingResultsPanelElement: function _createReverseGeocodingResultsPanelElement() {\n var resultsPanelDiv = document.createElement(\"div\");\n resultsPanelDiv.id = this._addUID(\"GPreverseGeocodingResultsPanel\");\n resultsPanelDiv.className = \"GPpanel GPreverseGeocodingComponentHidden\";\n return resultsPanelDiv;\n },\n /**\n * Reverse geocoding results list.\n *\n * @returns {DOMElement} DOM element\n */\n _createReverseGeocodingResultsListElement: function _createReverseGeocodingResultsListElement() {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPreverseGeocodingResultsList\");\n // Results are dynamically filled in Javascript by reverse geocoding service\n return container;\n },\n /**\n * Add Result\n * (results dynamically generate !)\n *\n * @param {String} locationDescription - reverse geocoded location results\n * @param {Number} id - ID\n */\n _createReverseGeocodingResultElement: function _createReverseGeocodingResultElement(locationDescription, id) {\n // contexte\n var context = this;\n var container = document.getElementById(this._addUID(\"GPreverseGeocodingResultsList\"));\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"ReverseGeocodedLocation_\" + id);\n div.className = \"GPautoCompleteProposal\";\n div.innerHTML = locationDescription;\n div.title = locationDescription;\n if (div.addEventListener) {\n div.addEventListener(\"mouseover\", function (e) {\n context.onReverseGeocodingResultMouseOver(e);\n });\n div.addEventListener(\"mouseout\", function (e) {\n context.onReverseGeocodingResultMouseOut(e);\n });\n div.addEventListener(\"click\", function (e) {\n if (typeof context.onReverseGeocodingResultClick === \"function\") {\n context.onReverseGeocodingResultClick(e);\n }\n });\n } else if (div.attachEvent) {\n div.attachEvent(\"onmouseover\", function (e) {\n context.onReverseGeocodingResultMouseOver(e);\n });\n div.attachEvent(\"onmouseout\", function (e) {\n context.onReverseGeocodingResultMouseOut(e);\n });\n div.attachEvent(\"onclick\", function (e) {\n if (typeof context.onReverseGeocodingResultClick === \"function\") {\n context.onReverseGeocodingResultClick(e);\n }\n });\n }\n container.appendChild(div);\n },\n // ################################################################### //\n // ######################### Inputs panel ############################ //\n // ################################################################### //\n\n /**\n * Create Container Panel\n *\n * @returns {DOMElement} DOM element\n */\n _createReverseGeocodingPanelElement: function _createReverseGeocodingPanelElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPreverseGeocodingPanel\");\n div.className = \"GPpanel\";\n return div;\n },\n /**\n * Create Header Panel\n *\n * @returns {DOMElement} DOM element\n */\n _createReverseGeocodingPanelHeaderElement: function _createReverseGeocodingPanelHeaderElement() {\n var container = document.createElement(\"div\");\n container.className = \"GPpanelHeader\";\n // info: on sépare les appels pour la création du picto de retour,\n // du titre et de la croix de fermeture pour les récupérer dans le composant\n return container;\n },\n /**\n * Create return picto in panel header\n *\n * @returns {DOMElement} DOM element\n */\n _createReverseGeocodingPanelReturnPictoElement: function _createReverseGeocodingPanelReturnPictoElement() {\n // contexte\n var self = this;\n var divNew = document.createElement(\"div\");\n divNew.id = this._addUID(\"GPreverseGeocodingReturnPicto\");\n divNew.title = \"Nouvelle recherche\";\n divNew.className = \"GPreverseGeocodingReturnPictoHidden\";\n if (divNew.addEventListener) {\n divNew.addEventListener(\"click\", function (e) {\n document.getElementById(self._addUID(\"GPreverseGeocodingResultsPanel\")).className = \"GProuteComponentHidden\";\n document.getElementById(self._addUID(\"GPreverseGeocodingForm\")).className = \"\";\n document.getElementById(self._addUID(\"GPreverseGeocodingHeaderTitle\")).innerHTML = \"Recherche inverse\";\n document.getElementById(self._addUID(\"GPreverseGeocodingReturnPicto\")).className = \"GPreverseGeocodingReturnPictoHidden\";\n self.onGPreverseGeocodingReturnPictoClick(e);\n });\n } else if (divNew.attachEvent) {\n divNew.attachEvent(\"onclick\", function (e) {\n document.getElementById(self._addUID(\"GPreverseGeocodingResultsPanel\")).className = \"GProuteComponentHidden\";\n document.getElementById(self._addUID(\"GPreverseGeocodingForm\")).className = \"\";\n document.getElementById(self._addUID(\"GPreverseGeocodingHeaderTitle\")).innerHTML = \"Recherche inverse\";\n document.getElementById(self._addUID(\"GPreverseGeocodingReturnPicto\")).className = \"GPreverseGeocodingReturnPictoHidden\";\n self.onGPreverseGeocodingReturnPictoClick(e);\n });\n }\n return divNew;\n },\n /**\n * Create Header Title Panel\n *\n * @returns {DOMElement} DOM element\n */\n _createReverseGeocodingPanelTitleElement: function _createReverseGeocodingPanelTitleElement() {\n var div = document.createElement(\"div\");\n div.className = \"GPpanelTitle\";\n div.id = this._addUID(\"GPreverseGeocodingHeaderTitle\");\n div.innerHTML = \"Recherche inverse\";\n return div;\n },\n /**\n * Create Header close div\n *\n * @returns {DOMElement} DOM element\n */\n _createReverseGeocodingPanelCloseElement: function _createReverseGeocodingPanelCloseElement() {\n // contexte\n var self = this;\n var divClose = document.createElement(\"div\");\n divClose.id = this._addUID(\"GPreverseGeocodingPanelClose\");\n divClose.className = \"GPpanelClose\";\n divClose.title = \"Fermer le panneau\";\n\n // Link panel close / visibility checkbox\n if (divClose.addEventListener) {\n divClose.addEventListener(\"click\", function () {\n document.getElementById(self._addUID(\"GPshowReverseGeocodingPicto\")).click();\n }, false);\n } else if (divClose.attachEvent) {\n divClose.attachEvent(\"onclick\", function () {\n document.getElementById(self._addUID(\"GPshowReverseGeocodingPicto\")).click();\n });\n }\n return divClose;\n },\n /**\n * Create Form\n * see event !\n *\n * @returns {DOMElement} DOM element\n */\n _createReverseGeocodingPanelFormElement: function _createReverseGeocodingPanelFormElement() {\n // contexte d'execution\n var self = this;\n var form = document.createElement(\"form\");\n form.id = this._addUID(\"GPreverseGeocodingForm\");\n if (form.addEventListener) {\n form.addEventListener(\"submit\", function (e) {\n e.preventDefault();\n self.onReverseGeocodingSubmit();\n });\n } else if (form.attachEvent) {\n form.attachEvent(\"onsubmit\", function (e) {\n e.preventDefault();\n self.onReverseGeocodingSubmit();\n });\n }\n return form;\n },\n // ################################################################### //\n // ####################### Choice mode into form ##################### //\n // ################################################################### //\n\n /**\n * Create Container to Mode choice geocoding type\n *\n * @param {Array} resources - geocoding resources to be displayed (and used)\n * @returns {DOMElement} DOM element\n */\n _createReverseGeocodingFormModeChoiceGeocodingTypeElement: function _createReverseGeocodingFormModeChoiceGeocodingTypeElement(resources) {\n // contexte d'execution\n var context = this;\n var div = document.createElement(\"div\");\n div.className = \"GPflexInput\";\n var label = document.createElement(\"label\");\n label.className = \"GPreverseGeocodingCodeLabel\";\n label.innerHTML = \"Recherche par\";\n label.title = \"Recherche par\";\n div.appendChild(label);\n var select = document.createElement(\"select\");\n select.className = \"GPreverseGeocodingCode\";\n // gestionnaire d'evenement : on stocke la valeur du type de geocodage,\n // utilisé dans la requête de géocodage inverse\n if (select.addEventListener) {\n select.addEventListener(\"change\", function (e) {\n context.onReverseGeocodingTypeChange(e);\n });\n } else if (select.attachEvent) {\n select.attachEvent(\"onchange\", function (e) {\n context.onReverseGeocodingTypeChange(e);\n });\n }\n\n // on prend soit les valeurs passées par l'utilisateur, soit des valeurs par défaut\n if (!resources || !Array.isArray(resources)) {\n resources = [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"];\n }\n for (var i = 0; i < resources.length; i++) {\n switch (resources[i]) {\n case \"PositionOfInterest\":\n var POIOption = document.createElement(\"option\");\n POIOption.value = \"PositionOfInterest\";\n POIOption.text = \"Lieux/toponymes\";\n select.appendChild(POIOption);\n break;\n case \"StreetAddress\":\n var SAOption = document.createElement(\"option\");\n SAOption.value = \"StreetAddress\";\n SAOption.text = \"Adresses\";\n select.appendChild(SAOption);\n break;\n case \"CadastralParcel\":\n var CPOption = document.createElement(\"option\");\n CPOption.value = \"CadastralParcel\";\n CPOption.text = \"Parcelles cadastrales\";\n select.appendChild(CPOption);\n break;\n default:\n break;\n }\n }\n div.appendChild(select);\n return div;\n },\n /**\n * Create Container to Mode choice geocoding delimitation\n *\n * @param {Array} delimitations - geocoding delimitations to be displayed (and used)\n * @returns {DOMElement} DOM element\n */\n _createReverseGeocodingFormModeChoiceGeocodingDelimitationElement: function _createReverseGeocodingFormModeChoiceGeocodingDelimitationElement(delimitations) {\n // contexte d'execution\n var context = this;\n var div = document.createElement(\"div\");\n div.className = \"GPflexInput\";\n var label = document.createElement(\"label\");\n label.className = \"GPreverseGeocodingCodeLabel\";\n label.innerHTML = \"Délimitation\";\n label.title = \"Délimitation\";\n div.appendChild(label);\n var select = document.createElement(\"select\");\n select.className = \"GPreverseGeocodingCode\";\n // gestionnaire d'evenement : on stocke la valeur du type de délimitation,\n // et on modifie l'événement de pointage sur la carte en fonction\n if (select.addEventListener) {\n select.addEventListener(\"change\", function (e) {\n context.onReverseGeocodingDelimitationChange(e);\n });\n } else if (select.attachEvent) {\n select.attachEvent(\"onchange\", function (e) {\n context.onReverseGeocodingDelimitationChange(e);\n });\n }\n\n // on prend soit les valeurs passées par l'utilisateur, soit des valeurs par défaut\n if (!delimitations || !Array.isArray(delimitations)) {\n delimitations = [\"Point\", \"Circle\", \"Extent\"];\n }\n for (var i = 0; i < delimitations.length; i++) {\n switch (delimitations[i].toLowerCase()) {\n case \"point\":\n var pointOption = document.createElement(\"option\");\n pointOption.value = \"point\";\n pointOption.text = \"Pointer un lieu\";\n select.appendChild(pointOption);\n break;\n case \"circle\":\n var circleOption = document.createElement(\"option\");\n circleOption.value = \"circle\";\n circleOption.text = \"Dessiner un cercle\";\n select.appendChild(circleOption);\n break;\n case \"extent\":\n var extentOption = document.createElement(\"option\");\n extentOption.value = \"extent\";\n extentOption.text = \"Dessiner une emprise\";\n select.appendChild(extentOption);\n break;\n default:\n break;\n }\n }\n div.appendChild(select);\n return div;\n },\n // ################################################################### //\n // ########################### Submit Form ########################### //\n // ################################################################### //\n\n /**\n * Create Submit Form Element\n *\n * @returns {DOMElement} DOM element\n */\n _createReverseGeocodingSubmitFormElement: function _createReverseGeocodingSubmitFormElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPreverseGeocodingSubmit\");\n input.className = \"GPinputSubmit\";\n input.type = \"submit\";\n input.value = \"Rechercher\";\n return input;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ReverseGeocodingDOM);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ29udHJvbHMvUmV2ZXJzZUdlb2NvZGluZ0RPTS5qcz9hMzU2Il0sIm5hbWVzIjpbIlJldmVyc2VHZW9jb2RpbmdET00iLCJfYWRkVUlEIiwiaWQiLCJ1aWQiLCJfdWlkIiwiX2NyZWF0ZU1haW5Db250YWluZXJFbGVtZW50IiwiY29udGFpbmVyIiwiZG9jdW1lbnQiLCJjcmVhdGVFbGVtZW50IiwiY2xhc3NOYW1lIiwiX2NyZWF0ZVNob3dSZXZlcnNlR2VvY29kaW5nRWxlbWVudCIsImlucHV0IiwidHlwZSIsIl9jcmVhdGVTaG93UmV2ZXJzZUdlb2NvZGluZ1BpY3RvRWxlbWVudCIsInNlbGYiLCJsYWJlbCIsImh0bWxGb3IiLCJ0aXRs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RvXCIpKS5jbGljaygpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZGl2Q2xvc2U7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIENyZWF0ZSBGb3JtXG4gICAgICogc2VlIGV2ZW50ICFcbiAgICAgKlxuICAgICAqIEByZXR1cm5zIHtET01FbGVtZW50fSBET00gZWxlbWVudFxuICAgICAqL1xuICAgIF9jcmVhdGVSZXZlcnNlR2VvY29kaW5nUGFuZWxGb3JtRWxlbWVudCA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgLy8gY29udGV4dGUgZCdleGVjdXRpb25cbiAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuXG4gICAgICAgIHZhciBmb3JtID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImZvcm1cIik7XG4gICAgICAgIGZvcm0uaWQgPSB0aGlzLl9hZGRVSUQoXCJHUHJldmVyc2VHZW9jb2RpbmdGb3JtXCIpO1xuXG4gICAgICAgIGlmIChmb3JtLmFkZEV2ZW50TGlzdGVuZXIpIHtcbiAgICAgICAgICAgIGZvcm0uYWRkRXZlbnRMaXN0ZW5lcihcInN1Ym1pdFwiLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBzZWxmLm9uUmV2ZXJzZUdlb2NvZGluZ1N1Ym1pdCgpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSBpZiAoZm9ybS5hdHRhY2hFdmVudCkge1xuICAgICAgICAgICAgZm9ybS5hdHRhY2hFdmVudChcIm9uc3VibWl0XCIsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHNlbGYub25SZXZlcnNlR2VvY29kaW5nU3VibWl0KCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG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AgICAgICAgICAgICAgICAgICAgc2VsZWN0LmFwcGVuZENoaWxkKFNBT3B0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSBcIkNhZGFzdHJhbFBhcmNlbFwiOlxuICAgICAgICAgICAgICAgICAgICB2YXIgQ1BPcHRpb24gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwib3B0aW9uXCIpO1xuICAgICAgICAgICAgICAgICAgICBDUE9wdGlvbi52YWx1ZSA9IFwiQ2FkYXN0cmFsUGFyY2VsXCI7XG4gICAgICAgICAgICAgICAgICAgIENQT3B0aW9uLnRleHQgPSBcIlBhcmNlbGxlcyBjYWRhc3RyYWxlc1wiO1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3QuYXBwZW5kQ2hpbGQoQ1BPcHRpb24pO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGRpdi5hcHBlbmRDaGlsZChzZWxlY3QpO1xuXG4gICAgICAgIHJldHVybiBkaXY7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIENyZWF0ZSBDb250YWluZXIgdG8gTW9kZSBjaG9pY2UgZ2VvY29kaW5nIGRlbGltaXRhdGlvblxuICAgICAqXG4gICAgICogQHBhcmFtIHtBcnJheX0gZGVsaW1pdGF0aW9ucyAtIGdlb2NvZGluZyBkZWxpbWl0YXRpb25zIHRvIGJlIGRpc3BsYXllZCAoYW5kIHVzZWQpXG4gICAgICogQHJldHVybnMge0RPTUVsZW1lbnR9IERPTSBlbGVtZW50XG4gICAgICovXG4gICAgX2NyZWF0ZVJldmVyc2VHZW9jb2RpbmdGb3JtTW9kZUNob2ljZUdlb2NvZGluZ0RlbGltaXRhdGlvbkVsZW1lbnQgOiBmdW5jdGlvbiAoZGVsaW1pdG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C5hcHBlbmRDaGlsZChwb2ludE9wdGlvbik7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJjaXJjbGVcIjpcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNpcmNsZU9wdGlvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJvcHRpb25cIik7XG4gICAgICAgICAgICAgICAgICAgIGNpcmNsZU9wdGlvbi52YWx1ZSA9IFwiY2lyY2xlXCI7XG4gICAgICAgICAgICAgICAgICAgIGNpcmNsZU9wdGlvbi50ZXh0ID0gXCJEZXNzaW5lciB1biBjZXJjbGVcIjtcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0LmFwcGVuZENoaWxkKGNpcmNsZU9wdGlvbik7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJleHRlbnRcIjpcbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4dGVudE9wdGlvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJvcHRpb25cIik7XG4gICAgICAgICAgICAgICAgICAgIGV4dGVudE9wdGlvbi52YWx1ZSA9IFwiZXh0ZW50XCI7XG4gICAgICAgICAgICAgICAgICAgIGV4dGVudE9wdGlvbi50ZXh0ID0gXCJEZXNzaW5lciB1bmUgZW1wcmlzZVwiO1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3QuYXBwZW5kQ2hpbGQoZXh0ZW50T3B0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBkaXYuYXBwZW5kQ2hpbGQoc2VsZWN0KTtcblxuICAgICAgICByZXR1cm4gZGl2O1xuICAgIH0sXG5cbiAgICAvLyAjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIC8vXG4gICAgLy8gIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIFN1Ym1pdCBGb3JtICMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyAvL1xuICAgIC8vICMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMgLy9cblxuICAgIC8qKlxuICAgICAqIENyZWF0ZSBTdWJtaXQgRm9ybSBFbGVtZW50XG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7RE9NRWxlbWVudH0gRE9NIGVsZW1lbnRcbiAgICAgKi9cbiAgICBfY3JlYXRlUmV2ZXJzZUdlb2NvZGluZ1N1Ym1pdEZvcm1FbGVtZW50IDogZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgaW5wdXQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiaW5wdXRcIik7XG4gICAgICAgIGlucHV0LmlkID0gdGhpcy5fYWRkVUlEKFwiR1ByZXZlcnNlR2VvY29kaW5nU3VibWl0XCIpO1xuICAgICAgICBpbnB1dC5jbGFzc05hbWUgPSBcIkdQaW5wdXRTdWJtaXRcIjtcbiAgICAgICAgaW5wdXQudHlwZSA9IFwic3VibWl0XCI7XG4gICAgICAgIGlucHV0LnZhbHVlID0gXCJSZWNoZXJjaGVyXCI7XG5cbiAgICAgICAgcmV0dXJuIGlucHV0O1xuICAgIH1cblxufTtcblxuZXhwb3J0IGRlZmF1bHQgUmV2ZXJzZUdlb2NvZGluZ0RPTTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/Controls/ReverseGeocodingDOM.js\n"); + +/***/ }), + +/***/ "./src/Common/Controls/RouteDOM.js": +/*!*****************************************!*\ + !*** ./src/Common/Controls/RouteDOM.js ***! + \*****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/GeocodeUtils */ \"./src/Common/Utils/GeocodeUtils.js\");\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getLogger(\"RouteDOM\");\nvar RouteDOM = {\n /**\n * Add uuid to the tag ID\n * @param {String} id - id selector\n * @returns {String} uid - id selector with an unique id\n */\n _addUID: function _addUID(id) {\n var uid = this._uid ? id + \"-\" + this._uid : id;\n return uid;\n },\n /**\n * Main container (DOM)\n *\n * @returns {DOMElement} DOM element\n */\n _createMainContainerElement: function _createMainContainerElement() {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GProute\");\n container.className = \"GPwidget\";\n return container;\n },\n // ################################################################### //\n // ################# Methods to display Main Panel ################### //\n // ################################################################### //\n\n /**\n * Hidden checkbox for minimizing/maximizing panel\n *\n * @returns {DOMElement} DOM element\n */\n _createShowRouteElement: function _createShowRouteElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPshowRoute\");\n input.type = \"checkbox\";\n return input;\n },\n /**\n * Show route control\n * see event !\n *\n * @returns {DOMElement} DOM element\n */\n _createShowRoutePictoElement: function _createShowRoutePictoElement() {\n // contexte d'execution\n var context = this;\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowRoutePicto\");\n label.className = \"GPshowAdvancedToolPicto\";\n label.htmlFor = this._addUID(\"GPshowRoute\");\n label.title = \"Ouvrir le calcul d'itinéraire\";\n\n // gestionnaire d'evenement :\n // on ouvre le menu de saisie du calcul d'itiniraire\n // L'ouverture/Fermeture permet de faire le menage\n // (reinitialisation)\n if (label.addEventListener) {\n label.addEventListener(\"click\", function (e) {\n context.onShowRoutePanelClick(e);\n });\n } else if (label.attachEvent) {\n label.attachEvent(\"onclick\", function (e) {\n context.onShowRoutePanelClick(e);\n });\n }\n var spanOpen = document.createElement(\"span\");\n spanOpen.id = this._addUID(\"GPshowRouteOpen\");\n spanOpen.className = \"GPshowAdvancedToolOpen\";\n label.appendChild(spanOpen);\n return label;\n },\n // ################################################################### //\n // ################## Methods to display Inputs Panel ################ //\n // ################################################################### //\n\n /**\n * Create Container Panel\n *\n * FIXME\n * don't call this._createRoutePanelHeaderElement\n * don't call this._createRoutePanelFormElement\n * don't call this._createRoutePanelResultsElement\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelElement: function _createRoutePanelElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GProutePanel\");\n div.className = \"GPpanel\";\n\n // div.appendChild(this._createRoutePanelHeaderElement());\n // div.appendChild(this._createRoutePanelFormElement());\n // div.appendChild(this._createRoutePanelResultsElement());\n\n return div;\n },\n /**\n * Create Header Panel\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelHeaderElement: function _createRoutePanelHeaderElement() {\n // contexte d'execution\n var self = this;\n var container = document.createElement(\"div\");\n container.className = \"GPpanelHeader\";\n var div = document.createElement(\"div\");\n div.className = \"GPpanelTitle\";\n div.innerHTML = \"Calcul d'itinéraire\";\n container.appendChild(div);\n var divClose = document.createElement(\"div\");\n divClose.id = this._addUID(\"GProutePanelClose\");\n divClose.className = \"GPpanelClose\";\n divClose.title = \"Masquer le panneau\";\n\n // Link panel close / visibility checkbox\n if (divClose.addEventListener) {\n divClose.addEventListener(\"click\", function () {\n document.getElementById(self._addUID(\"GPshowRoutePicto\")).click();\n }, false);\n } else if (divClose.attachEvent) {\n divClose.attachEvent(\"onclick\", function () {\n document.getElementById(self._addUID(\"GPshowRoutePicto\")).click();\n });\n }\n container.appendChild(divClose);\n return container;\n },\n /**\n * Create Form\n * see evenement !\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelFormElement: function _createRoutePanelFormElement() {\n // contexte d'execution\n var self = this;\n var form = document.createElement(\"form\");\n form.id = this._addUID(\"GProuteForm\");\n form.setAttribute(\"onkeypress\", \"return event.keyCode != 13;\"); // FIXME hack pour desactiver l'execution via 'enter' au clavier !\n\n form.addEventListener(\"submit\", function (e) {\n logger.log(e);\n e.preventDefault();\n\n // points\n var points = document.getElementsByClassName(self._addUID(\"GPlocationPoint\"));\n\n // Must have at least two origin points\n var start = points[0].childNodes[0].id;\n var end = points[points.length - 1].childNodes[0].id;\n var startID = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(start);\n var endID = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(end);\n if (document.getElementById(self._addUID(\"GPlocationOrigin_\" + startID)).value === \"\" && document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + startID)).value === \"\" || document.getElementById(self._addUID(\"GPlocationOrigin_\" + endID)).value === \"\" && document.getElementById(self._addUID(\"GPlocationOriginCoords_\" + endID)).value === \"\") {\n return false;\n }\n\n // Send stages to results panel\n self._addRouteResultsStagesValuesElement(points);\n\n // on peut récuperer les valeurs utiles pour les transmettre au service d'iti...\n // - le mode de calcul\n // - le mode de transport\n // - les exclusions\n // Les points sont déjà stockés dans l'application.\n\n // computation mode params\n var modeComputation = null;\n if (document.getElementById(self._addUID(\"GProuteComputationSelect\"))) {\n var select = document.getElementById(self._addUID(\"GProuteResultsComputationSelect\"));\n select.selectedIndex = document.getElementById(self._addUID(\"GProuteComputationSelect\")).selectedIndex;\n modeComputation = select.options[select.selectedIndex].value;\n }\n\n // transport mode params\n var modeTransport = null;\n // voiture ?\n if (document.getElementById(self._addUID(\"GProuteTransportCar\"))) {\n if (document.getElementById(self._addUID(\"GProuteTransportCar\")).checked) {\n modeTransport = document.getElementById(self._addUID(\"GProuteTransportCar\")).value;\n }\n }\n // pieton ?\n if (document.getElementById(self._addUID(\"GProuteTransportPedestrian\"))) {\n if (document.getElementById(self._addUID(\"GProuteTransportPedestrian\")).checked) {\n modeTransport = document.getElementById(self._addUID(\"GProuteTransportPedestrian\")).value;\n }\n }\n\n // exclusions params\n var exclusions = [];\n var exclusionsElement = document.getElementsByClassName(\"GProuteExclusionsOption\");\n for (var j = 0; j < exclusionsElement.length; j++) {\n var id = exclusionsElement[j].htmlFor;\n var el = document.getElementById(id);\n if (!el.checked) {\n exclusions.push(el.value);\n }\n }\n self.onRouteComputationSubmit({\n computation: modeComputation,\n transport: modeTransport,\n exclusions: exclusions\n });\n\n // FIXME mise à jour du controle dans le composant JS !\n // document.getElementById(self._addUID(\"GProuteForm\")).className = \"GProuteComponentHidden\";\n // document.getElementById(self._addUID(\"GProuteResultsPanel\")).className = \"\";\n\n return false;\n });\n return form;\n },\n /**\n * Create Results Panel\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelResultsElement: function _createRoutePanelResultsElement() {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GProuteResultsPanel\");\n container.className = \"GProuteComponentHidden\";\n container.appendChild(this._createRouteResultsStagesElement());\n container.appendChild(this._createRouteResultsElement());\n var divBorderUp = document.createElement(\"div\");\n divBorderUp.className = \"GPfakeBorder GPfakeBorderLeft\";\n container.appendChild(divBorderUp);\n container.appendChild(this._createRouteShowResultsDetailsElement());\n var labelShow = document.createElement(\"label\");\n labelShow.htmlFor = this._addUID(\"GProuteResultsShowDetails\");\n labelShow.innerHTML = \"Afficher le détail\";\n container.appendChild(labelShow);\n var labelHide = document.createElement(\"label\");\n labelHide.htmlFor = this._addUID(\"GProuteResultsShowDetails\");\n labelHide.innerHTML = \"Masquer le détail\";\n container.appendChild(labelHide);\n var divBorderDown = document.createElement(\"div\");\n divBorderDown.className = \"GPfakeBorder\";\n container.appendChild(divBorderDown);\n container.appendChild(this._createRouteResultsDetailsElement());\n return container;\n },\n /**\n * Create Waiting Panel\n *\n * @returns {DOMElement} DOM element\n */\n _createRouteWaitingElement: function _createRouteWaitingElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GProuteCalcWaitingContainer\");\n div.className = \"GProuteCalcWaitingContainerHidden\";\n var p = document.createElement(\"p\");\n p.className = \"GProuteCalcWaiting\";\n p.innerHTML = \"Calcul en cours...\";\n div.appendChild(p);\n return div;\n },\n // ################################################################### //\n // ############### Methods to the window results ##################### //\n // ################################################################### //\n\n /**\n * Create Results Stages\n * (results dynamically generate !)\n *\n * @returns {DOMElement} DOM element\n */\n _createRouteResultsStagesElement: function _createRouteResultsStagesElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GProuteResultsStages\");\n return div;\n },\n /**\n * Add Stages Results\n *\n * @param {DOMElement} points - list of points\n */\n _addRouteResultsStagesValuesElement: function _addRouteResultsStagesValuesElement(points) {\n document.getElementById(this._addUID(\"GProuteResultsStages\")).innerHTML = \"\";\n for (var i = 0; i < points.length; i++) {\n var tag = points[i].childNodes[0].id;\n var id = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(tag);\n if (document.getElementById(this._addUID(\"GPlocationPoint_\" + id)).className === \"GPflexInput GPlocationStageFlexInput\") {\n var resultStage = document.createElement(\"div\");\n resultStage.className = \"GProuteResultsStages\";\n var resultStageLabel = document.createElement(\"div\");\n resultStageLabel.className = \"GProuteResultStageLabel\";\n resultStageLabel.innerHTML = document.getElementById(this._addUID(\"GPlocationOriginLabel_\" + id)).innerHTML + \" :\";\n resultStage.appendChild(resultStageLabel);\n var resultStageValue = document.createElement(\"div\");\n resultStageValue.className = \"GProuteResultStageValue\";\n var elementCoords = document.getElementById(this._addUID(\"GPlocationOriginCoords_\" + id));\n var stageCoords = elementCoords.value;\n var visible = elementCoords.className === \"GPlocationOriginVisible\";\n if (stageCoords !== null && stageCoords !== \"\" && visible) {\n resultStageValue.innerHTML = stageCoords;\n } else {\n resultStageValue.innerHTML = document.getElementById(this._addUID(\"GPlocationOrigin_\" + id)).value;\n }\n resultStage.appendChild(resultStageValue);\n if (resultStageValue.innerHTML !== \"\") {\n document.getElementById(this._addUID(\"GProuteResultsStages\")).appendChild(resultStage);\n }\n }\n }\n },\n /**\n * Create Show Results\n * see event!\n *\n * @returns {DOMElement} DOM element\n */\n _createRouteResultsElement: function _createRouteResultsElement() {\n // contexte\n var self = this;\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GProuteResults\");\n\n // FIXME Route results are dynamically filled in Javascript by route service\n var divValue = document.createElement(\"div\");\n divValue.id = this._addUID(\"GProuteResultsValues\");\n container.appendChild(divValue);\n var divMode = document.createElement(\"div\");\n divMode.id = this._addUID(\"GProuteResultsMode\");\n var select = document.createElement(\"select\");\n select.id = this._addUID(\"GProuteResultsComputationSelect\");\n select.className = \"GPinputSelect\";\n // gestionnaire d'evenement :\n // on stocke la valeur du mode de calcul, et on relance le calcul d'itiniraire\n select.addEventListener(\"change\", function (e) {\n self.onRouteModeComputationChangeAndRun(e);\n });\n var computes = [{\n code: \"fastest\",\n label: \"Plus rapide\"\n }, {\n code: \"shortest\",\n label: \"Plus court\"\n }];\n for (var i = 0; i < computes.length; i++) {\n var option = document.createElement(\"option\");\n option.value = computes[i].code;\n option.text = computes[i].label;\n select.appendChild(option);\n }\n divMode.appendChild(select);\n container.appendChild(divMode);\n var divNew = document.createElement(\"div\");\n divNew.id = this._addUID(\"GProuteResultsNew\");\n divNew.title = \"Modifier le calcul\";\n divNew.addEventListener(\"click\", function (e) {\n document.getElementById(self._addUID(\"GProuteResultsPanel\")).className = \"GProuteComponentHidden\";\n document.getElementById(self._addUID(\"GProuteForm\")).className = \"\";\n self.onShowRouteResultsNewClick(e);\n });\n container.appendChild(divNew);\n return container;\n },\n /**\n * Add Results Duration and Distance\n * (results dynamically generate !)\n * see event!\n * @param {Number} distance - distance\n * @param {Number} duration - duration\n * @param {Function} fconvert - fconvert\n *\n * @returns {DOMElement} DOM element\n */\n _addRouteResultsValuesElement: function _addRouteResultsValuesElement(distance, duration, fconvert) {\n var div = document.getElementById(this._addUID(\"GProuteResultsValues\"));\n\n // clean !\n if (div.childElementCount) {\n while (div.firstChild) {\n div.removeChild(div.firstChild);\n }\n }\n var containerDistance = document.createElement(\"div\");\n containerDistance.className = \"GProuteResultsValue\";\n var labelDistance = document.createElement(\"label\");\n labelDistance.className = \"GProuteResultsValueLabel\";\n labelDistance.innerHTML = \"Distance :\";\n containerDistance.appendChild(labelDistance);\n var distanceLabel = 0;\n var isKm = parseInt(distance / 1000, 10);\n if (!isKm) {\n distanceLabel = Math.round(distance) + \" m\";\n } else {\n var distanceArrondi = Math.round(distance);\n distanceArrondi = distanceArrondi / 1000;\n distanceLabel = distanceArrondi + \" km\";\n }\n var divDistance = document.createElement(\"div\");\n divDistance.id = this._addUID(\"GProuteResultsValueDist\");\n divDistance.innerHTML = distanceLabel;\n containerDistance.appendChild(divDistance);\n div.appendChild(containerDistance);\n var containerDuration = document.createElement(\"div\");\n containerDuration.className = \"GProuteResultsValue\";\n var labelDuration = document.createElement(\"label\");\n labelDuration.className = \"GProuteResultsValueLabel\";\n labelDuration.innerHTML = \"Durée :\";\n containerDuration.appendChild(labelDuration);\n var divDuration = document.createElement(\"div\");\n divDuration.id = this._addUID(\"GProuteResultsValueDist\");\n divDuration.innerHTML = fconvert(duration);\n containerDuration.appendChild(divDuration);\n div.appendChild(containerDuration);\n return div;\n },\n /**\n * Create Show Results Details\n *\n * @returns {DOMElement} DOM element\n */\n _createRouteShowResultsDetailsElement: function _createRouteShowResultsDetailsElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GProuteResultsShowDetails\");\n input.type = \"checkbox\";\n return input;\n },\n /**\n * Create Results Details\n *\n * @returns {DOMElement} DOM element\n */\n _createRouteResultsDetailsElement: function _createRouteResultsDetailsElement() {\n // \n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GProuteResultsDetails\");\n return div;\n },\n /**\n * Add Results Details\n * (results dynamically generate !)\n * @param {Object[]} instructions - instructions\n * @param {Function} fconvert - fconvert\n *\n * @returns {DOMElement} DOM element\n */\n _addRouteResultsDetailsElement: function _addRouteResultsDetailsElement(instructions, fconvert) {\n // contexte\n var context = this;\n var div = document.getElementById(this._addUID(\"GProuteResultsDetails\"));\n\n // clean !\n if (div.childElementCount) {\n while (div.firstChild) {\n div.removeChild(div.firstChild);\n }\n }\n\n // calcul des valeurs cumulé !\n var distanceCumul = 0;\n var durationCumul = 0;\n\n /* jshint -W083 */\n for (var i = 0; i < instructions.length; i++) {\n var id = i + 1;\n var o = instructions[i];\n var divNum = document.createElement(\"div\");\n divNum.className = \"GProuteResultsDetailsNumber\";\n divNum.innerHTML = id + \".\";\n div.appendChild(divNum);\n durationCumul += parseFloat(o.duration);\n distanceCumul += parseFloat(o.distance);\n var distance = 0;\n var isCumulKm = parseInt(distanceCumul / 1000, 10);\n if (!isCumulKm) {\n distance = Math.round(distanceCumul) + \" m\";\n } else {\n var distanceArrondi = Math.round(distanceCumul);\n distanceArrondi = distanceArrondi / 1000;\n distance = distanceArrondi + \" km\";\n }\n var divIns = document.createElement(\"div\");\n divIns.className = \"GProuteResultsDetailsInstruction\";\n divIns.id = this._addUID(\"GProuteResultsDetailsInstruction_\" + id);\n divIns.title = \"distance : \" + distance + \" / \" + \"temps : \" + fconvert(durationCumul);\n divIns.innerHTML = o.instruction;\n divIns.addEventListener(\"mouseover\", function (e) {\n context.onRouteResultsDetailsMouseOver(e);\n });\n divIns.addEventListener(\"mouseout\", function (e) {\n context.onRouteResultsDetailsMouseOut(e);\n });\n divIns.addEventListener(\"click\", function (e) {\n // mode mobile !\n if (typeof context.onRouteResultsDetailsClick === \"function\") {\n context.onRouteResultsDetailsClick(e);\n }\n });\n div.appendChild(divIns);\n }\n return div;\n },\n // ################################################################### //\n // ################### Methods to the form points #################### //\n // ################# OVERWRITTEN BY LOCATIONSELECTOR ! ################# //\n\n /**\n * Create Point\n * see event !\n * OVERWRITTEN BY LOCATIONSELECTOR !\n * (version initial without LOCATIONSELECTOR PLUGIN)\n * @param {Integer} n - n\n * @param {String} text - text\n * @param {Boolean} visibility - visibility\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelFormPointElement: function _createRoutePanelFormPointElement(n, text, visibility) {\n // contexte d'execution\n var context = this;\n var div = document.createElement(\"div\");\n div.id = \"GProutePoint\" + n;\n div.className = visibility ? \"GPflexInput GProuteStageFlexInput\" : \"GPflexInput GProuteStageFlexInputHidden\";\n var labelOrigin = document.createElement(\"label\");\n labelOrigin.id = \"GProuteOriginLabel\" + n;\n labelOrigin.htmlFor = \"GProuteOrigin\" + n;\n labelOrigin.innerHTML = text;\n labelOrigin.addEventListener(\"click\", function () {\n var i = this.id.charAt(this.id.length - 1);\n document.getElementById(\"GProuteOriginCoords\" + i).value = \"\";\n for (var j = 1; j < 8; j++) {\n document.getElementById(\"GProutePoint\" + j).style.display = \"flex\";\n }\n document.getElementById(\"GProuteForm\").className = \"\";\n document.getElementById(\"GProuteOriginPointer\" + i).checked = false;\n document.getElementById(\"GProuteOrigin\" + i).className = \"GProuteOriginVisible\";\n document.getElementById(\"GProuteOriginCoords\" + i).className = \"GProuteOriginHidden\";\n });\n div.appendChild(labelOrigin);\n var inputOrigin = document.createElement(\"input\");\n inputOrigin.id = \"GProuteOrigin\" + n;\n inputOrigin.className = \"GProuteOriginVisible\";\n inputOrigin.type = \"text\";\n inputOrigin.placeholder = \"Saisir une adresse\";\n inputOrigin.addEventListener(\"keyup\", function (e) {\n var charCode = e.which || e.keyCode;\n if (charCode === 13 || charCode === 10) {\n return;\n }\n var i = this.id.charAt(this.id.length - 1);\n if (document.getElementById(\"GProuteOrigin\" + i).value.length > 2) {\n document.getElementById(\"GProuteAutoCompleteList\" + i).style.display = \"block\";\n } else {\n document.getElementById(\"GProuteAutoCompleteList\" + i).style.display = \"none\";\n }\n // gestionnaire d'evenement :\n // on récupère la valeur de saisie pour une requête sur le service d'autocompletion.\n // le resultat de la requête nous permet de recuperer les coordonnées du point...\n context.onAutoCompleteSearchText(e);\n });\n inputOrigin.addEventListener(\"blur\", function () {\n var i = this.id.charAt(this.id.length - 1);\n document.getElementById(\"GProuteAutoCompleteList\" + i).style.display = \"none\";\n });\n div.appendChild(inputOrigin);\n var inputOriginCoord = document.createElement(\"input\");\n inputOriginCoord.id = \"GProuteOriginCoords\" + n;\n inputOriginCoord.className = \"GProuteOriginHidden\";\n inputOriginCoord.type = \"text\";\n inputOriginCoord.disabled = true;\n div.appendChild(inputOriginCoord);\n var inputOriginPointer = document.createElement(\"input\");\n inputOriginPointer.id = \"GProuteOriginPointer\" + n;\n inputOriginPointer.type = \"checkbox\";\n div.appendChild(inputOriginPointer);\n var labelOriginPointer = document.createElement(\"label\");\n labelOriginPointer.id = \"GProuteOriginPointerImg\" + n;\n labelOriginPointer.htmlFor = \"GProuteOriginPointer\" + n;\n labelOriginPointer.className = \"GProuteOriginPointerImg\";\n labelOriginPointer.title = \"Pointer un lieu sur la carte\";\n labelOriginPointer.addEventListener(\"click\", function (evt) {\n evt.preventDefault();\n evt.stopPropagation();\n var i = this.id.charAt(this.id.length - 1);\n var j;\n for (j = 1; j < 8; j++) {\n if (i !== j) {\n document.getElementById(\"GProuteOriginPointer\" + j).checked = false;\n if (document.getElementById(\"GProuteOriginCoords\" + j).value === \"Pointer un lieu sur la carte\") {\n document.getElementById(\"GProuteOriginCoords\" + j).value = \"\";\n document.getElementById(\"GProuteOrigin\" + j).className = \"GProuteOriginVisible\";\n document.getElementById(\"GProuteOriginCoords\" + j).className = \"GProuteOriginHidden\";\n }\n }\n }\n if (document.getElementById(\"GProuteOriginPointer\" + i).checked) {\n document.getElementById(\"GProuteOriginCoords\" + i).value = \"\";\n for (j = 1; j < 8; j++) {\n document.getElementById(\"GProutePoint\" + j).style.display = \"flex\";\n }\n document.getElementById(\"GProuteForm\").className = \"\";\n document.getElementById(\"GProuteOriginPointer\" + i).checked = false;\n document.getElementById(\"GProuteOrigin\" + i).className = \"GProuteOriginVisible\";\n document.getElementById(\"GProuteOriginCoords\" + i).className = \"GProuteOriginHidden\";\n } else {\n document.getElementById(\"GProuteOriginCoords\" + i).value = \"Pointer un lieu sur la carte\";\n for (j = 1; j < 8; j++) {\n if (i === j) {\n document.getElementById(\"GProutePoint\" + j).style.display = \"flex\";\n } else {\n document.getElementById(\"GProutePoint\" + j).style.display = \"none\";\n }\n }\n document.getElementById(\"GProuteForm\").className = \"GProuteFormMini\";\n document.getElementById(\"GProuteOriginPointer\" + i).checked = true;\n document.getElementById(\"GProuteOrigin\" + i).className = \"GProuteOriginHidden\";\n document.getElementById(\"GProuteOriginCoords\" + i).className = \"GProuteOriginVisible\";\n }\n // gestionnaire d'evenement :\n // on stocke la valeur du point, utilisée pour la requête sur le service de calcul d'itiniraire\n context.onRouteMapPointClick(evt);\n });\n div.appendChild(labelOriginPointer);\n return div;\n },\n /**\n * Create Remove Point tag\n * see event !\n * OVERWRITTEN BY LOCATIONSELECTOR !\n * (version initial without LOCATIONSELECTOR PLUGIN)\n * @param {Integer} n - n\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelFormRemoveStageElement: function _createRoutePanelFormRemoveStageElement(n) {\n // contexte d'execution\n var context = this;\n var divRm = document.createElement(\"div\");\n divRm.id = \"GProuteStageRemove\" + n;\n divRm.className = \"GProuteStageRemove\";\n divRm.title = \"Supprimer l'étape\";\n if (n !== 1 && n !== 7) {\n divRm.addEventListener(\"click\", function (e) {\n var i = this.id.charAt(this.id.length - 1);\n document.getElementById(\"GProutePoint\" + i).className = \"GPflexInput GProuteStageFlexInputHidden\";\n document.getElementById(\"GProuteOrigin\" + i).value = \"\";\n document.getElementById(\"GProuteOrigin\" + i).className = \"GProuteOriginVisible\";\n document.getElementById(\"GProuteOriginCoords\" + i).value = \"\";\n document.getElementById(\"GProuteOriginCoords\" + i).className = \"GProuteOriginHidden\";\n document.getElementById(\"GProuteStageAdd\").style.display = \"\";\n // Moving up exclusions picto\n // var exclusionsPictoTop = document.getElementById(\"GPshowRouteExclusionsPicto\").style.top;\n // document.getElementById(\"GPshowRouteExclusionsPicto\").style.top = (parseInt(exclusionsPictoTop, 10) - 33).toString() + \"px\";\n // gestionnaire d'evenement :\n // on supprime le point, utilisé pour la requête sur le service d'itiniraire\n context.onRouteRemovePointClick(e);\n });\n }\n return divRm;\n },\n /**\n * Create Add Point tag\n * see event !\n * OVERWRITTEN BY LOCATIONSELECTOR !\n * (version initial without LOCATIONSELECTOR PLUGIN)\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelFormAddStageElement: function _createRoutePanelFormAddStageElement() {\n // contexte d'execution\n var context = this;\n var divAdd = document.createElement(\"div\");\n divAdd.id = \"GProuteStageAdd\";\n divAdd.title = \"Ajouter une étape\";\n divAdd.addEventListener(\"click\", function (e) {\n var lastStage = 1;\n var nbStages = 0;\n for (var i = 2; i < 7; i++) {\n if (document.getElementById(\"GProutePoint\" + i).className === \"GPflexInput GProuteStageFlexInputHidden\") {\n if (lastStage === 1) {\n lastStage = i;\n }\n } else {\n nbStages++;\n }\n }\n if (lastStage < 7) {\n document.getElementById(\"GProutePoint\" + lastStage).className = \"GPflexInput GProuteStageFlexInput\";\n // Moving down exclusions picto\n // var exclusionsPictoTop = document.getElementById(\"GPshowRouteExclusionsPicto\").style.top;\n // document.getElementById(\"GPshowRouteExclusionsPicto\").style.top = (parseInt(exclusionsPictoTop, 10) + 33).toString() + \"px\";\n }\n\n if (nbStages === 4) {\n document.getElementById(\"GProuteStageAdd\").style.display = \"none\";\n }\n // gestionnaire d'evenement :\n // on ajoute le point, utilisé pour la requête sur le service d'itiniraire\n context.onRouteAddPointClick(e);\n });\n return divAdd;\n },\n /**\n * Create Results autocompletion to the point\n * see event!\n * OVERWRITTEN BY LOCATIONSELECTOR !\n * (version initial without LOCATIONSELECTOR PLUGIN)\n * @param {Integer} n - n\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelFormAutoCompleteListElement: function _createRoutePanelFormAutoCompleteListElement(n) {\n // contexte d'execution\n var context = this;\n var div = document.createElement(\"div\");\n div.id = \"GProuteAutoCompleteList\" + n;\n div.className = \"GPadvancedAutoCompleteList\";\n if (div.addEventListener) {\n div.addEventListener(\"click\", function (e) {\n context.onAutoCompletedResultsItemClick(e);\n document.getElementById(\"GProuteAutoCompleteList\" + n).style.display = \"none\";\n }, false);\n } else if (div.attachEvent) {\n div.attachEvent(\"onclick\", function (e) {\n context.onAutoCompletedResultsItemClick(e);\n document.getElementById(\"GProuteAutoCompleteList\" + n).style.display = \"none\";\n });\n }\n\n // Proposals are dynamically filled in Javascript by autocomplete service\n //
    ...
    \n\n return div;\n },\n /**\n * Autocompletion result to a point.\n * Proposals are dynamically filled in Javascript by autocomplete service\n * OVERWRITTEN BY LOCATIONSELECTOR !\n * (version initial without LOCATIONSELECTOR PLUGIN)\n *\n *\n * @param {Object} location - suggested location results\n * @param {Number} n - number of the point\n * @param {Number} id - ID\n */\n _createRouteAutoCompletedLocationElement: function _createRouteAutoCompletedLocationElement(location, n, id) {\n var container = document.getElementById(\"GProuteAutoCompleteList\" + n);\n var div = document.createElement(\"div\");\n div.id = \"AutoCompletedLocation\" + id;\n div.className = \"GPautoCompleteProposal\";\n div.innerHTML = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getSuggestedLocationFreeform(location);\n container.appendChild(div);\n },\n // ################################################################### //\n // ############## Methods to the choice mode into form ############### //\n // ################################################################### //\n\n /**\n * Create Container to Mode choice transport\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelFormModeChoiceElement: function _createRoutePanelFormModeChoiceElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GProuteModeChoice\");\n\n // div.appendChild(this._createRoutePanelFormModeChoiceTransportElement());\n // div.appendChild(this._createRoutePanelFormModeChoiceComputeElement());\n\n return div;\n },\n /**\n * Create Mode choice transport\n * see event !\n * FIXME event not useful\n * @param {String[]} transports - transports\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelFormModeChoiceTransportElement: function _createRoutePanelFormModeChoiceTransportElement(transports) {\n // contexte d'execution\n var context = this;\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GProuteTransportChoice\");\n var span = document.createElement(\"span\");\n span.className = \"GProuteModeLabel\";\n span.innerHTML = \"Mode de transport\";\n div.appendChild(span);\n\n /* jshint -W083 */\n for (var i = 0; i < transports.length; i++) {\n var transport = transports[i];\n if (transport === \"Voiture\") {\n var inputCar = document.createElement(\"input\");\n inputCar.id = this._addUID(\"GProuteTransportCar\");\n inputCar.type = \"radio\";\n inputCar.name = \"GProuteTransport\";\n inputCar.value = \"Voiture\";\n if (i === 0) {\n inputCar.checked = true;\n }\n // gestionnaire d'evenement :\n // on stocke le mode de transport,\n // utilisation pour la requête sur le service de calcul d'itiniraire\n if (inputCar.addEventListener) {\n inputCar.addEventListener(\"change\", function (e) {\n context.onRouteModeTransportChange(e);\n });\n } else if (inputCar.attachEvent) {\n inputCar.attachEvent(\"onchange\", function (e) {\n context.onRouteModeTransportChange(e);\n });\n }\n div.appendChild(inputCar);\n var labelCar = document.createElement(\"label\");\n labelCar.className = \"GProuteTransportImg\";\n labelCar.htmlFor = this._addUID(\"GProuteTransportCar\");\n labelCar.title = \"Voiture\";\n div.appendChild(labelCar);\n }\n if (transport === \"Pieton\") {\n var inputPedestrian = document.createElement(\"input\");\n inputPedestrian.id = this._addUID(\"GProuteTransportPedestrian\");\n inputPedestrian.type = \"radio\";\n inputPedestrian.name = \"GProuteTransport\";\n inputPedestrian.value = \"Pieton\";\n if (i === 0) {\n inputPedestrian.checked = true;\n }\n // gestionnaire d'evenement :\n // on stocke le mode de transport,\n // utilisation pour la requête sur le service de calcul d'itiniraire\n if (inputPedestrian.addEventListener) {\n inputPedestrian.addEventListener(\"change\", function (e) {\n context.onRouteModeTransportChange(e);\n });\n } else if (inputPedestrian.attachEvent) {\n inputPedestrian.attachEvent(\"onchange\", function (e) {\n context.onRouteModeTransportChange(e);\n });\n }\n div.appendChild(inputPedestrian);\n var labelPedestrian = document.createElement(\"label\");\n labelPedestrian.className = \"GProuteTransportImg\";\n labelPedestrian.htmlFor = this._addUID(\"GProuteTransportPedestrian\");\n labelPedestrian.title = \"Piéton\";\n div.appendChild(labelPedestrian);\n }\n }\n return div;\n },\n /**\n * Create Mode choice computation\n * see event!\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelFormModeChoiceComputeElement: function _createRoutePanelFormModeChoiceComputeElement() {\n // contexte d'execution\n var context = this;\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GProuteComputationChoice\");\n var label = document.createElement(\"label\");\n label.htmlFor = this._addUID(\"GProuteComputationSelect\");\n label.innerHTML = \"Mode de calcul\";\n var span = document.createElement(\"span\");\n span.className = \"GProuteModeLabel\";\n span.appendChild(label);\n div.appendChild(span);\n var select = document.createElement(\"select\");\n select.id = this._addUID(\"GProuteComputationSelect\");\n select.className = \"GPinputSelect\";\n // gestionnaire d'evenement :\n // on stocke la valeur du mode de calcul,\n // utilisation pour la requête sur le service de calcul d'itiniraire\n select.addEventListener(\"change\", function (e) {\n context.onRouteModeComputationChange(e);\n });\n var computes = [{\n code: \"fastest\",\n label: \"Plus rapide\"\n }, {\n code: \"shortest\",\n label: \"Plus court\"\n }];\n for (var i = 0; i < computes.length; i++) {\n var option = document.createElement(\"option\");\n option.value = computes[i].code;\n option.text = computes[i].label;\n select.appendChild(option);\n }\n div.appendChild(select);\n return div;\n },\n // ################################################################### //\n // ################# Methods to the choice exclusions ################ //\n // ################################################################### //\n\n /**\n * Hidden checkbox for minimizing/maximizing Exclusions Options\n *\n * @returns {DOMElement} DOM element\n */\n _createShowRouteExclusionsElement: function _createShowRouteExclusionsElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPshowRouteExclusions\");\n input.type = \"checkbox\";\n return input;\n },\n /**\n * Label to Exclusions Options\n * see event !\n * FIXME event not useful\n *\n * @returns {DOMElement} DOM element\n */\n _createShowRouteExclusionsPictoElement: function _createShowRouteExclusionsPictoElement() {\n // contexte d'execution\n var context = this;\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowRouteExclusionsPicto\");\n label.className = \"GPshowMoreOptionsImage GPshowMoreOptions GPshowRouteExclusionsPicto\";\n label.htmlFor = this._addUID(\"GPshowRouteExclusions\");\n label.title = \"Exclusions\";\n // label.style.top = \"185px\";\n\n // gestionnaire d'evenement :\n // on ouvre le menu des options des exclusions\n if (label.addEventListener) {\n label.addEventListener(\"click\", function (e) {\n context.onShowRouteExclusionsClick(e);\n });\n } else if (label.attachEvent) {\n label.attachEvent(\"onclick\", function (e) {\n context.onShowRouteExclusionsClick(e);\n });\n }\n return label;\n },\n /**\n * Create Container to Exclusions\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelFormExclusionsElement: function _createRoutePanelFormExclusionsElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GProuteExclusions\");\n var span = document.createElement(\"span\");\n span.className = \"GProuteExclusionsLabel\";\n span.innerHTML = \"Passages autorisés\";\n div.appendChild(span);\n\n // div.appendChild(this._createRoutePanelFormExclusionOptionsElement());\n\n return div;\n },\n /**\n * Create Exclusions Options\n * see event !\n * FIXME event not useful\n * @param {Object[]} exclusions - exclusions\n *\n * @returns {DOMElement} DOM element\n */\n _createRoutePanelFormExclusionOptionsElement: function _createRoutePanelFormExclusionOptionsElement(exclusions) {\n // contexte d'execution\n var context = this;\n var div = document.createElement(\"div\");\n div.className = \"GProuteExclusionsOptions\";\n\n /* jshint -W083 */\n for (var value in exclusions) {\n if (exclusions.hasOwnProperty(value)) {\n var status = exclusions[value];\n switch (value) {\n case \"toll\":\n var inputToll = document.createElement(\"input\");\n inputToll.id = this._addUID(\"GProuteExclusionsToll\");\n inputToll.type = \"checkbox\";\n inputToll.value = \"Toll\";\n inputToll.checked = !status;\n // gestionnaire d'evenement :\n // on stocke l'exclusion,\n // utilisation pour la requête sur le service de calcul d'itiniraire\n if (inputToll.addEventListener) {\n inputToll.addEventListener(\"change\", function (e) {\n context.onRouteExclusionsChange(e);\n });\n } else if (inputToll.attachEvent) {\n inputToll.attachEvent(\"onchange\", function (e) {\n context.onRouteExclusionsChange(e);\n });\n }\n div.appendChild(inputToll);\n var labelToll = document.createElement(\"label\");\n labelToll.className = \"GProuteExclusionsOption\";\n labelToll.htmlFor = this._addUID(\"GProuteExclusionsToll\");\n labelToll.innerHTML = \"Péages\";\n div.appendChild(labelToll);\n break;\n case \"tunnel\":\n var inputTunnel = document.createElement(\"input\");\n inputTunnel.id = this._addUID(\"GProuteExclusionsTunnel\");\n inputTunnel.type = \"checkbox\";\n inputTunnel.value = \"Tunnel\";\n inputTunnel.checked = !status;\n // gestionnaire d'evenement :\n // on stocke l'exclusion,\n // utilisation pour la requête sur le service de calcul d'itiniraire\n if (inputTunnel.addEventListener) {\n inputTunnel.addEventListener(\"change\", function (e) {\n context.onRouteExclusionsChange(e);\n });\n } else if (inputTunnel.attachEvent) {\n inputTunnel.attachEvent(\"onchange\", function (e) {\n context.onRouteExclusionsChange(e);\n });\n }\n div.appendChild(inputTunnel);\n var labelTunnel = document.createElement(\"label\");\n labelTunnel.className = \"GProuteExclusionsOption\";\n labelTunnel.htmlFor = this._addUID(\"GProuteExclusionsTunnel\");\n labelTunnel.innerHTML = \"Tunnels\";\n div.appendChild(labelTunnel);\n break;\n case \"bridge\":\n var inputBridge = document.createElement(\"input\");\n inputBridge.id = this._addUID(\"GProuteExclusionsBridge\");\n inputBridge.type = \"checkbox\";\n inputBridge.value = \"Bridge\";\n inputBridge.checked = !status;\n // gestionnaire d'evenement :\n // on stocke l'exclusion,\n // utilisation pour la requête sur le service de calcul d'itiniraire\n if (inputBridge.addEventListener) {\n inputBridge.addEventListener(\"change\", function (e) {\n context.onRouteExclusionsChange(e);\n });\n } else if (inputBridge.attachEvent) {\n inputBridge.attachEvent(\"onchange\", function (e) {\n context.onRouteExclusionsChange(e);\n });\n }\n div.appendChild(inputBridge);\n var labelBridge = document.createElement(\"label\");\n labelBridge.className = \"GProuteExclusionsOption\";\n labelBridge.htmlFor = this._addUID(\"GProuteExclusionsBridge\");\n labelBridge.innerHTML = \"Ponts\";\n div.appendChild(labelBridge);\n break;\n }\n }\n }\n return div;\n },\n // ################################################################### //\n // ############################### Submit Form ####################### //\n // ################################################################### //\n\n /**\n * Create Submit Form Element\n *\n * @returns {DOMElement} DOM element\n */\n _createRouteSubmitFormElement: function _createRouteSubmitFormElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GProuteSubmit\");\n input.className = \"GPinputSubmit\";\n input.type = \"submit\";\n input.value = \"Calculer\";\n return input;\n },\n // ################################################################### //\n // ############################### Reset picto ####################### //\n // ################################################################### //\n\n /**\n * Create Reset Picto Element\n *\n * @returns {DOMElement} DOM element\n */\n _createRouteFormResetElement: function _createRouteFormResetElement() {\n var self = this;\n var divReset = document.createElement(\"div\");\n divReset.id = this._addUID(\"GProuteReset\");\n divReset.title = \"Réinitialiser les paramètres\";\n divReset.addEventListener(\"click\", function (e) {\n self.onRouteResetClick(e);\n });\n return divReset;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (RouteDOM);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ29udHJvbHMvUm91dGVET00uanM/NjFmZCJdLCJuYW1lcyI6WyJsb2dnZXIiLCJMb2dnZXIiLCJnZXRMb2dnZXIiLCJSb3V0ZURPTSIsIl9hZGRVSUQiLCJpZCIsInVpZCIsIl91aWQiLCJfY3JlYXRlTWFpbkNvbnRhaW5lckVsZW1lbnQiLCJjb250YWluZXIiLCJkb2N1bWVudCIsImNyZWF0ZUVsZW1lbnQiLCJjbGFzc05hbWUiLCJfY3JlYXRlU2hvd1JvdXRlRWxlbWVudC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cbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcblxuICAgICAgICAgICAgLy8gcG9pbnRzXG4gICAgICAgICAgICB2YXIgcG9pbnRzID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZShzZWxmLl9hZGRVSUQoXCJHUGxvY2F0aW9uUG9pbnRcIikpO1xuXG4gICAgICAgICAgICAvLyBNdXN0IGhhdmUgYXQgbGVhc3QgdHdvIG9yaWdpbiBwb2ludHNcbiAgICAgICAgICAgIHZhciBzdGFydCA9IHBvaW50c1swXS5jaGlsZE5vZGVzWzBdLmlkO1xuICAgICAgICAgICAgdmFyIGVuZCA9IHBvaW50c1twb2ludHMubGVuZ3RoIC0gMV0uY2hpbGROb2Rlc1swXS5pZDtcbiAgICAgICAgICAgIHZhciBzdGFydElEID0gSUQuaW5kZXgoc3RhcnQpO1xuICAgICAgICAgICAgdmFyIGVuZElEID0gSUQuaW5kZXgoZW5kKTtcblxuICAgICAgICAgICAgaWYgKChkb2N1bWVudC5nZXRFbGVtZW50QnlJZChzZWxmLl9hZGRVSUQoXCJHUGxvY2F0aW9uT3JpZ2luX1wiICsgc3RhcnRJRCkpLnZhbHVlID09PSBcIlwiICYmXG4gICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNlbGYuX2FkZFVJRChcIkdQbG9jYXRpb25PcmlnaW5Db29yZHNfXCIgKyBzdGFydElEKSkudmFsdWUgPT09IFwiXCIpIHx8XG4gICAgICAgICAgICAgICAgKGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNlbGYuX2FkZFVJRChcIkdQbG9jYXRpb25PcmlnaW5fXCIgKyBlbmRJRCkpLnZhbHVlID09PSBcIlwiICYmXG4gICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHNlbGYuX2FkZFVJRChcIkdQbG9jYXRpb25PcmlnaW5Db29yZHNfXCIgKyBlbmRJRCkpLnZhbHVlID09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kdQcm91dGVUcmFuc3BvcnRQZWRlc3RyaWFuXCIpKS52YWx1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIGV4Y2x1c2lvbnMgcGFyYW1zXG4gICAgICAgICAgICB2YXIgZXhjbHVzaW9ucyA9IFtdO1xuICAgICAgICAgICAgdmFyIGV4Y2x1c2lvbnNFbGVtZW50ID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZShcIkdQcm91dGVFeGNsdXNpb25zT3B0aW9uXCIpO1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBleGNsdXNpb25zRWxlbWVudC5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIHZhciBpZCA9IGV4Y2x1c2lvbnNFbGVtZW50W2pdLmh0bWxGb3I7XG4gICAgICAgICAgICAgICAgdmFyIGVsID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoaWQpO1xuICAgICAgICAgICAgICAgIGlmICghZWwuY2hlY2tlZCkge1xuICAgICAgICAgICAgICAgICAgICBleGNsdXNpb25zLnB1c2goZWwudmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc2VsZi5vblJvdXRlQ29tcHV0YXRpb25TdWJtaXQoe1xuICAgICAgICAgICAgICAgIGNvbXB1dGF0aW9uIDogbW9kZUNvbXB1dGF0aW9uLFxuICAgICAgICAgICAgICAgIHRyYW5zcG9ydCA6IG1vZGVUcmFuc3BvcnQsXG4gICAgICAgICAgICAgICAgZXhjbHVzaW9ucyA6IGV4Y2x1c2lvbnNcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAvLyBGSVhNRSBtaXNlIMOgIGpvdXIgZHUgY29udHJvbGUgZGFucyBsZSBjb21wb3NhbnQgSlMgIVxuICAgICAgICAgICAgLy8gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoc2VsZi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cyA9IGVsZW1lbnRDb29yZHMudmFsdWU7XG4gICAgICAgICAgICAgICAgdmFyIHZpc2libGUgPSAoZWxlbWVudENvb3Jkcy5jbGFzc05hbWUgPT09IFwiR1Bsb2NhdGlvbk9yaWdpblZpc2libGVcIik7XG4gICAgICAgICAgICAgICAgaWYgKHN0YWdlQ29vcmRzICE9PSBudWxsICYmIHN0YWdlQ29vcmRzICE9PSBcIlwiICYmIHZpc2libGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0U3RhZ2VWYWx1ZS5pbm5lckhUTUwgPSBzdGFnZUNvb3JkcztcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHRTdGFnZVZhbHVlLmlubmVySFRNTCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbG9jYXRpb25PcmlnaW5fXCIgKyBpZCkpLnZhbHVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXN1bHRTdGFnZS5hcHBlbmRDaGlsZChyZXN1bHRTdGFnZVZhbHVlKTtcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0U3RhZ2VWYWx1ZS5pbm5lckhUTUwgIT09IFwiXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQodGhpcy5fYWRkVUlEKFwiR1Byb3V0ZVJlc3VsdHNTdGFnZXNcIikpLmFwcGVuZENoaWxkKHJlc3VsdFN0YWdlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogQ3JlYXRlIFNob3cgUmVzdWx0c1xuICAgICAqIHNlZSBldmVudCFcbiAgICAgKlxuICAgICAqIEByZXR1cm5zIHtET01FbGVtZW50fSBET00gZWxlbWVudFxuICAgICAqL1xuICAgIF9jcmVhdGVSb3V0ZVJlc3Vsd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ZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBjYWxjdWwgZGVzIHZhbGV1cnMgY3VtdWzDqSAhXG4gICAgICAgIHZhciBkaXN0YW5jZUN1bXVsID0gMDtcbiAgICAgICAgdmFyIGR1cmF0aW9uQ3VtdWwgPSAwO1xuXG4gICAgICAgIC8qIGpzaGludCAtVzA4MyAqL1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGluc3RydWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGlkID0gaSArIDE7XG5cbiAgICAgICAgICAgIHZhciBvID0gaW5zdHJ1Y3Rpb25zW2ldO1xuXG4gICAgICAgICAgICB2YXIgZGl2TnVtID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcbiAgICAgICAgICAgIGRpdk51bS5jbGFzc05hbWUgPSBcIkdQcm91dGVSZXN1bHRzRGV0YWlsc051bWJlclwiO1xuICAgICAgICAgICAgZGl2TnVtLmlubmVySFRNTCA9IGlkICsgXCIuXCI7XG4gICAgICAgICAgICBkaXYuYXBwZW5kQ2hpbGQoZGl2TnVtKTtcblxuICAgICAgICAgICAgZHVyYXRpb25DdW11bCArPSBwYXJzZUZsb2F0KG8uZHVyYXRpb24pO1xuICAgICAgICAgICAgZGlzdGFuY2VDdW11bCArPSBwYXJzZUZsb2F0KG8uZGlzdGFuY2UpO1xuXG4gICAgICAgICAgICB2YXIgZGlzdGFuY2UgPSAwO1xuICAgICAgICAgICAgdmFyIGlzQ3VtdWxLbSA9IHBhcnNlSW50KGRpc3RhbmNlQ3VtdWwgLyAxMDAwLCAxMCk7XG4gICAgICAgICAgICBpZiAoIWlzQ3VtdWxLbSkge1xuICAgICAgICAgICAgICAgIGRpc3RhbmNlID0gTWF0aC5yb3VuZChkaXN0YW5jZUN1bXVsKSArIFwiIG1cIjtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIG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KGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiR1Byb3V0ZU9yaWdpbkNvb3Jkc1wiICsgaikudmFsdWUgPT09IFwiUG9pbnRlciB1biBsaWV1IHN1ciBsYSBjYXJ0ZVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQcm91dGVPcmlnaW5Db29yZHNcIiArIGopLnZhbHVlID0gXCJcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiR1Byb3V0ZU9yaWdpblwiICsgaikuY2xhc3NOYW1lID0gXCJHUHJvdXRlT3JpZ2luVmlzaWJsZVwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoXCJHUHJvdXRlT3JpZ2luQ29vcmRzXCIgKyBqKS5jbGFzc05hbWUgPSBcIkdQcm91dGVPcmlnaW5IaWRkZW5cIjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQcm91dGVPcmlnaW5Qb2ludGVyXCIgKyBpKS5jaGVja2VkKSB7XG4gICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoXCJHUHJvdXRlT3JpZ2luQ29vcmRzXCIgKyBpKS52YWx1ZSA9IFwiXCI7XG4gICAgICAgICAgICAgICAgZm9yIChqID0gMTsgaiA8IDg7IGorKykge1xuICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQcm91dGVQb2ludFwiICsgaikuc3R5bGUuZGlzcGxheSA9IFwiZmxleFwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQcm91dGVGb3JtXCIpLmNsYXNzTmFtZSA9IFwiXCI7XG4gICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoXCJHUHJvdXRlT3JpZ2luUG9pbnRlclwiICsgaSkuY2hlY2tlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiR1Byb3V0ZU9yaWdpblwiICsgaSkuY2xhc3NOYW1lID0gXCJHUHJvdXRlT3JpZ2luVmlzaWJsZVwiO1xuICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiR1Byb3V0ZU9yaWdpbkNvb3Jkc1wiICsgaSkuY2xhc3NOYW1lID0gXCJHUHJvdXRlT3JpZ2luSGlkZGVuXCI7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiR1Byb3V0ZU9yaWdpbkNvb3Jkc1wiICsgaSkudmFsdWUgPSBcIlBvaW50ZXIgdW4gbGlldSBzdXIgbGEgY2FydGVcIjtcbiAgICAgICAgICAgICAgICBmb3IgKGogPSAxOyBqIDwgODsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpID09PSBqKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQcm91dGVQb2ludFwiICsgaikuc3R5bGUuZGlzcGxheSA9IFwiZmxleFwiO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoXCJHUHJvdXRlUG9pbnRcIiArIGopLnN0eWxlLmRpc3BsYXkgPSBcIm5vbmVcIjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQcm91d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ICAgICAgICAgICAgICAgIGlucHV0Q2FyLnZhbHVlID0gXCJWb2l0dXJlXCI7XG4gICAgICAgICAgICAgICAgaWYgKGkgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRDYXIuY2hlY2tlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIGdlc3Rpb25uYWlyZSBkJ2V2ZW5lbWVudCA6XG4gICAgICAgICAgICAgICAgLy8gb24gc3RvY2tlIGxlIG1vZGUgZGUgdHJhbnNwb3J0LFxuICAgICAgICAgICAgICAgIC8vIHV0aWxpc2F0aW9uIHBvdXIgbGEgcmVxdcOqdGUgc3VyIGxlIHNlcnZpY2UgZGUgY2FsY3VsIGQnaXRpbmlyYWlyZVxuICAgICAgICAgICAgICAgIGlmIChpbnB1dENhci5hZGRFdmVudExpc3RlbmVyKSB7XG4gICAgICAgICAgICAgICAgICAgIGlucHV0Q2FyLmFkZEV2ZW50TGlzdGVuZXIoXCJjaGFuZ2VcIiwgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQub25Sb3V0ZU1vZGVUcmFuc3BvcnRDaGFuZ2UoZSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXRDYXIuYXR0YWNoRXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRDYXIuYXR0YWNoRXZlbnQoXCJvbmNoYW5nZVwiLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dC5vblJvdXRlTW9kZVRyYW5zcG9ydENoYW5nZShlKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRpdi5hcHBlbmRDaGlsZChpbnB1dENhcik7XG5cbiAgICAgICAgICAgICAgICB2YXIgbGFiZWxDYXIgPSBkb2N1b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50KFwiaW5wdXRcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dFRvbGwuaWQgPSB0aGlzLl9hZGRVSUQoXCJHUHJvdXRlRXhjbHVzaW9uc1RvbGxcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dFRvbGwudHlwZSA9IFwiY2hlY2tib3hcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0VG9sbC52YWx1ZSA9IFwiVG9sbFwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRUb2xsLmNoZWNrZWQgPSAhc3RhdHVzO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZ2VzdGlvbm5haXJlIGQnZXZlbmVtZW50IDpcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9uIHN0b2NrZSBsJ2V4Y2x1c2lvbixcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHV0aWxpc2F0aW9uIHBvdXIgbGEgcmVxdcOqdGUgc3VyIGxlIHNlcnZpY2UgZGUgY2FsY3VsIGQnaXRpbmlyYWlyZVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0VG9sbC5hZGRFdmVudExpc3RlbmVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRUb2xsLmFkZEV2ZW50TGlzdGVuZXIoXCJjaGFuZ2VcIiwgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dC5vblJvdXRlRXhjbHVzaW9uc0NoYW5nZShlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXRUb2xsLmF0dGFjaEV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRUb2xsLmF0dGFjaEV2ZW50KFwib25jaGFuZ2VcIiwgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dC5vblJvdXRlRXhjbHVzaW9uc0NoYW5nZShlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGRpdi5hcHBlbmRDaGlsZChpbnB1dFRvbGwpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGFiZWxUb2xsID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImxhYmVsXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxUb2xsLmNsYXNzTmFtZSA9IFwiR1Byb3V0ZUV4Y2x1c2lvbnNPcHRpb25cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsVG9sbC5odG1sRm9yID0gdGhpcy5fYWRkVUlEKFwiR1Byb3V0ZUV4Y2x1c2lvbnNUb2xsXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxUb2xsLmlubmVySFRNTCA9IFwiUMOpYWdlc1wiO1xuICAgICAgICAgICAgICAgICAgICAgICAgZGl2LmFwcGVuZENoaWxkKGxhYmVsVG9sbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICBjYXNlIFwidHVubmVsXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaW5wdXRUdW5uZWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiaW5wdXRcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dFR1bm5lbC5pZCA9IHRoaXMuX2FkZFVJRChcIkdQcm91dGVFeGNsdXNpb25zVHVubmVsXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRUdW5uZWwudHlwZSA9IFwiY2hlY2tib3hcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0VHVubmVsLnZhbHVlID0gXCJUdW5uZWxcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0VHVubmVsLmNoZWNrZWQgPSAhc3RhdHVzO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZ2VzdGlvbm5haXJlIGQnZXZlbmVtZW50IDpcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9uIHN0b2NrZSBsJ2V4Y2x1c2lvbixcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHV0aWxpc2F0aW9uIHBvdXIgbGEgcmVxdcOqdGUgc3VyIGxlIHNlcnZpY2UgZGUgY2FsY3VsIGQnaXRpbmlyYWlyZVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0VHVubmVsLmFkZEV2ZW50TGlzdGVuZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dFR1bm5lbC5hZGRFdmVudExpc3RlbmVyKFwiY2hhbmdlXCIsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQub25Sb3V0ZUV4Y2x1c2lvbnNDaGFuZ2UoZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0VHVubmVsLmF0dGFjaEV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRUdW5uZWwuYXR0YWNoRXZlbnQoXCJvbmNoYW5nZVwiLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0Lm9uUm91dGVFeGNsdXNpb25zQ2hhbmdlKGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZGl2LmFwcGVuZENoaWxkKGlucHV0VHVubmVsKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxhYmVsVHVubmVsID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImxhYmVsXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxUdW5uZWwuY2xhc3NOYW1lID0gXCJHUHJvdXRlRXhjbHVzaW9uc09wdGlvblwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxUdW5uZWwuaHRtbEZvciA9IHRoaXMuX2FkZFVJRChcIkdQcm91dGVFeGNsdXNpb25zVHVubmVsXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxUdW5uZWwuaW5uZXJIVE1MID0gXCJUdW5uZWxzXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXYuYXBwZW5kQ2hpbGQobGFiZWxUdW5uZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcImJyaWRnZVwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGlucHV0QnJpZGdlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImlucHV0XCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRCcmlkZ2UuaWQgPSB0aGlzLl9hZGRVSUQoXCJHUHJvdXRlRXhjbHVzaW9uc0JyaWRnZVwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0QnJpZGdlLnR5cGUgPSBcImNoZWNrYm94XCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dEJyaWRnZS52YWx1ZSA9IFwiQnJpZGdlXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dEJyaWRnZS5jaGVja2VkID0gIXN0YXR1cztcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGdlc3Rpb25uYWlyZSBkJ2V2ZW5lbWVudCA6XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBvbiBzdG9ja2UgbCdleGNsdXNpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB1dGlsaXNhdGlvbiBwb3VyIGxhIHJlcXXDqnRlIHN1ciBsZSBzZXJ2aWNlIGRlIGNhbGN1bCBkJ2l0aW5pcmFpcmVcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dEJyaWRnZS5hZGRFdmVudExpc3RlbmVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRCcmlkZ2UuYWRkRXZlbnRMaXN0ZW5lcihcImNoYW5nZVwiLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0Lm9uUm91dGVFeGNsdXNpb25zQ2hhbmdlKGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dEJyaWRnZS5hdHRhY2hFdmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0QnJpZGdlLmF0dGFjaEV2ZW50KFwib25jaGFuZ2VcIiwgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dC5vblJvdXRlRXhjbHVzaW9uc0NoYW5nZShlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGRpdi5hcHBlbmRDaGlsZChpbnB1dEJyaWRnZSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsYWJlbEJyaWRnZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJsYWJlbFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsQnJpZGdlLmNsYXNzTmFtZSA9IFwiR1Byb3V0ZUV4Y2x1c2lvbnNPcHRpb25cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsQnJpZGdlLmh0bWxGb3IgPSB0aGlzLl9hZGRVSUQoXCJH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fVxufTtcblxuZXhwb3J0IGRlZmF1bHQgUm91dGVET007XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/Controls/RouteDOM.js\n"); + +/***/ }), + +/***/ "./src/Common/Controls/SearchEngineDOM.js": +/*!************************************************!*\ + !*** ./src/Common/Controls/SearchEngineDOM.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Utils/GeocodeUtils */ \"./src/Common/Utils/GeocodeUtils.js\");\n\n\nvar SearchEngineDOM = {\n /**\n * Add uuid to the tag ID\n * @param {String} id - id selector\n * @returns {String} uid - id selector with an unique id\n */\n _addUID: function _addUID(id) {\n var uid = this._uid ? id + \"-\" + this._uid : id;\n return uid;\n },\n /**\n * Main container (DOM)\n *\n * @returns {DOMElement} DOM element\n */\n _createMainContainerElement: function _createMainContainerElement() {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPsearchEngine\");\n container.className = \"GPwidget\";\n return container;\n },\n // ################################################################### //\n // ################### Methods of main container ##################### //\n // ################################################################### //\n\n /**\n * Hidden checkbox for minimizing/maximizing\n *\n * @returns {DOMElement} DOM element\n */\n _createShowSearchEngineElement: function _createShowSearchEngineElement() {\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPshowSearchEngine\");\n input.type = \"checkbox\";\n return input;\n },\n /**\n * Show search engine\n *\n * @returns {DOMElement} DOM element\n */\n _createShowSearchEnginePictoElement: function _createShowSearchEnginePictoElement() {\n // contexte d'execution\n var self = this;\n var label = document.createElement(\"label\");\n label.id = this._addUID(\"GPshowSearchEnginePicto\");\n label.className = \"GPshowAdvancedToolPicto\";\n label.htmlFor = this._addUID(\"GPshowSearchEngine\");\n label.title = \"Afficher/masquer la recherche par lieux\";\n\n // Close all results and panels when minimizing the widget\n label.addEventListener(\"click\", function () {\n document.getElementById(self._addUID(\"GPautoCompleteList\")).style.display = \"none\";\n document.getElementById(self._addUID(\"GPgeocodeResultsList\")).style.display = \"none\";\n var showAdvancedSearch = document.getElementById(self._addUID(\"GPshowAdvancedSearch\"));\n if (showAdvancedSearch) {\n showAdvancedSearch.style.display = null;\n document.getElementById(self._addUID(\"GPadvancedSearchPanel\")).style.display = \"none\";\n }\n var id = \"#GPsearchInput-\" + self._uid;\n document.querySelector(id + \" input\").disabled = false; // FIXME form[id^=GPsearchInput] = #GPsearchInput ?\n self.onShowSearchEngineClick();\n });\n var spanOpen = document.createElement(\"span\");\n spanOpen.id = this._addUID(\"GPshowSearchEngineOpen\");\n spanOpen.className = \"GPshowAdvancedToolOpen\";\n label.appendChild(spanOpen);\n return label;\n },\n /**\n * Simple search input\n * @param {String} placeholder - placeholder\n *\n * @returns {DOMElement} DOM element\n */\n _createSearchInputElement: function _createSearchInputElement(placeholder) {\n // contexte d'execution\n var self = this;\n var form = document.createElement(\"form\");\n form.id = this._addUID(\"GPsearchInput\");\n // Open geocode results panel when submitting the input\n form.addEventListener(\"submit\", function (e) {\n e.preventDefault();\n document.getElementById(self._addUID(\"GPgeocodeResultsList\")).style.display = \"block\";\n document.getElementById(self._addUID(\"GPautoCompleteList\")).style.display = \"none\";\n // cf. FIXME\n // document.querySelector(\"#GPsearchInput input\").blur ();\n\n // gestionnaire d'evenement :\n // on récupère la valeur de saisie pour requête sur le service de geocodage\n self.onGeocodingSearchSubmit(e);\n return false;\n });\n var input = document.createElement(\"input\");\n input.id = this._addUID(\"GPsearchInputText\");\n input.type = \"text\";\n input.placeholder = placeholder;\n input.autocomplete = \"off\";\n // Manage autocomplete list appearance when filling the address input\n input.addEventListener(\"keyup\", function (e) {\n var charCode = e.which || e.keyCode;\n if (charCode === 13 || charCode === 10 || charCode === 38 || charCode === 40) {\n return;\n }\n document.getElementById(self._addUID(\"GPgeocodeResultsList\")).style.display = \"none\";\n if (input.value.length > 2) {\n document.getElementById(self._addUID(\"GPautoCompleteList\")).style.display = \"block\";\n } else {\n document.getElementById(self._addUID(\"GPautoCompleteList\")).style.display = \"none\";\n }\n // gestionnaire d'evenement :\n // on récupère la valeur de saisie pour requête sur le service d'autocompletion\n self.onAutoCompleteSearchText(e);\n });\n\n // FIXME ce code interfere avec le click sur la liste des suggested locations !\n // input.addEventListener(\"blur\", function(e) {\n // document.getElementById(self._addUID(\"GPautoCompleteList\")).style.display = \"none\";\n // });\n\n input.addEventListener(\"keydown\", function (e) {\n // FIXME\n // l'action clavier 'enter (13)' lance le submit de la form !\n // Ce comportement n'est pas souhaité car le submit execute un geocodage !\n // Il faut donc trouver le moyen d'eviter le submit sur un return venant\n // seulement d'une selection de suggestion...\n\n var charCode = e.which || e.keyCode;\n var container = document.getElementById(self._addUID(\"GPautocompleteResults\"));\n\n // si aucun container !?\n if (!container) {\n return;\n }\n var curr = container.getElementsByClassName(\"GPautoCompleteProposal current\");\n var list = container.getElementsByClassName(\"GPautoCompleteProposal\");\n\n // si aucune suggestion, on ne va pas plus loin !\n var length = list.length;\n if (!length) {\n return;\n }\n var current = null;\n\n // si aucun item courant, on prend le 1er !\n if (!curr.length) {\n current = list[0];\n current.className = \"GPautoCompleteProposal current\";\n current.style.color = \"#000000\";\n current.style[\"background-color\"] = \"#CEDBEF\";\n return;\n } else {\n current = curr[0];\n }\n var index = parseInt(_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__[\"default\"].index(current.id), 10);\n var next = index === length - 1 ? list[0] : list[index + 1];\n var prev = index === 0 ? list[length - 1] : list[index - 1];\n current.style[\"background-color\"] = \"\";\n current.style.color = \"\";\n prev.style[\"background-color\"] = \"\";\n prev.style.color = \"\";\n next.style[\"background-color\"] = \"\";\n next.style.color = \"\";\n switch (charCode) {\n case 38:\n // arrow up\n current.className = \"GPautoCompleteProposal\";\n prev.className = \"GPautoCompleteProposal current\";\n prev.style.color = \"#000000\";\n prev.style[\"background-color\"] = \"#CEDBEF\";\n break;\n case 40:\n // arrow down\n current.className = \"GPautoCompleteProposal\";\n next.className = \"GPautoCompleteProposal current\";\n next.style.color = \"#000000\";\n next.style[\"background-color\"] = \"#CEDBEF\";\n break;\n case 13:\n // enter\n // cf. FIXME\n e.preventDefault();\n current.click(e);\n break;\n }\n current.focus();\n });\n form.appendChild(input);\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPsearchInputReset\");\n // Reset input\n div.addEventListener(\"click\", function () {\n document.getElementById(self._addUID(\"GPsearchInputText\")).value = \"\";\n document.getElementById(self._addUID(\"GPautoCompleteList\")).style.display = \"none\";\n document.getElementById(self._addUID(\"GPgeocodeResultsList\")).style.display = \"none\";\n self.onSearchResetClick();\n });\n form.appendChild(div);\n return form;\n },\n /**\n * Show advanced search panel\n *\n * @returns {DOMElement} DOM element\n */\n _createShowAdvancedSearchElement: function _createShowAdvancedSearchElement() {\n // contexte d'execution\n var self = this;\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPshowAdvancedSearch\");\n div.className = \"GPshowAdvancedToolPicto\";\n div.title = \"Ouvrir la recherche avancée\";\n\n // Open advanced search\n div.addEventListener(\"click\", function () {\n var id = \"#GPsearchInput-\" + self._uid;\n document.querySelector(id + \" input\").disabled = true;\n document.getElementById(self._addUID(\"GPautoCompleteList\")).style.display = \"none\";\n document.getElementById(self._addUID(\"GPgeocodeResultsList\")).style.display = \"none\";\n document.getElementById(self._addUID(\"GPshowAdvancedSearch\")).style.display = \"none\";\n document.getElementById(self._addUID(\"GPadvancedSearchPanel\")).style.display = \"inline-block\";\n });\n var span = document.createElement(\"span\");\n span.id = this._addUID(\"GPshowAdvancedSearchOpen\");\n span.className = \"GPshowAdvancedToolOpen\";\n div.appendChild(span);\n return div;\n },\n /**\n * Advanced search panel\n *\n * FIXME\n * don't call this._createAdvancedSearchPanelHeaderElement\n * don't call this._createAdvancedSearchPanelFormElement\n *\n * @returns {DOMElement} DOM element\n */\n _createAdvancedSearchPanelElement: function _createAdvancedSearchPanelElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPadvancedSearchPanel\");\n div.className = \"GPpanel\";\n div.style.display = \"none\";\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n // div.appendChild(this._createAdvancedSearchPanelHeaderElement ());\n // div.appendChild(this._createAdvancedSearchPanelFormElement ());\n\n return div;\n },\n /**\n * Geocoding results\n *\n * FIXME\n * don't call this._createGeocodeResultsListElement\n *\n * @returns {DOMElement} DOM element\n */\n _createGeocodeResultsElement: function _createGeocodeResultsElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPgeocodeResultsList\");\n div.className = \"GPpanel\";\n div.style.display = \"none\";\n div.appendChild(this._createGeocodeResultsHeaderElement());\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n // div.appendChild(this._createGeocodeResultsListElement ());\n\n return div;\n },\n /**\n * Autocompletion results\n *\n * FIXME\n * don't call this._createAutoCompleteListElement\n *\n * @returns {DOMElement} DOM element\n */\n _createAutoCompleteElement: function _createAutoCompleteElement() {\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GPautoCompleteList\");\n div.className = \"GPautoCompleteList\"; // GPpanel ?\n div.style.display = \"none\";\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n // div.appendChild(this._createAutoCompleteListElement ());\n\n return div;\n },\n // ################################################################### //\n // ################### Autocompletion container ###################### //\n // ################################################################### //\n\n /**\n * Autocompletion results list.\n *\n * @returns {DOMElement} DOM element\n */\n _createAutoCompleteListElement: function _createAutoCompleteListElement() {\n // contexte d'execution\n var self = this;\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPautocompleteResults\");\n if (container.addEventListener) {\n container.addEventListener(\"click\", function (e) {\n self.onAutoCompletedResultsItemClick(e);\n document.getElementById(self._addUID(\"GPautoCompleteList\")).style.display = \"none\";\n }, false);\n } else if (container.attachEvent) {\n container.attachEvent(\"onclick\", function (e) {\n self.onAutoCompletedResultsItemClick(e);\n document.getElementById(self._addUID(\"GPautoCompleteList\")).style.display = \"none\";\n });\n }\n\n // Proposals are dynamically filled in Javascript by autocomplete service\n //
    ...
    \n\n return container;\n },\n /**\n * Autocompletion result.\n * Proposals are dynamically filled in Javascript by autocomplete service\n *\n * TODO formaliser le contenu des reponse\n *\n * @param {Object} location - suggested or geocoded location results\n * @param {Number} id - ID\n */\n _createAutoCompletedLocationElement: function _createAutoCompletedLocationElement(location, id) {\n var container = document.getElementById(this._addUID(\"GPautocompleteResults\"));\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"AutoCompletedLocation_\" + id);\n div.className = \"GPautoCompleteProposal\";\n div.innerHTML = _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getSuggestedLocationFreeform(location);\n if (div.addEventListener) {\n div.addEventListener(\"click\", function (e) {\n container.click(e);\n }, false);\n } else if (div.attachEvent) {\n div.attachEvent(\"onclick\", function (e) {\n container.click(e);\n });\n }\n container.appendChild(div);\n },\n // ################################################################### //\n // ############### Geocoding with advanced container ################# //\n // ################################################################### //\n\n /**\n * @returns {DOMElement} DOM element\n */\n _createAdvancedSearchPanelHeaderElement: function _createAdvancedSearchPanelHeaderElement() {\n // contexte d'execution\n var self = this;\n var container = document.createElement(\"div\");\n container.className = \"GPpanelHeader\";\n var divTitle = document.createElement(\"div\");\n divTitle.className = \"GPpanelTitle\";\n divTitle.innerHTML = \"Recherche avancée\";\n container.appendChild(divTitle);\n var divClose = document.createElement(\"div\");\n divClose.id = this._addUID(\"GPadvancedSearchClose\");\n divClose.className = \"GPpanelClose\";\n divClose.title = \"Fermer la recherche avancée\";\n if (divClose.addEventListener) {\n divClose.addEventListener(\"click\", function () {\n var id = \"#GPsearchInput-\" + self._uid;\n document.querySelector(id + \" input\").disabled = false;\n document.getElementById(self._addUID(\"GPgeocodeResultsList\")).style.display = \"none\";\n document.getElementById(self._addUID(\"GPshowAdvancedSearch\")).style.display = \"inline-block\";\n document.getElementById(self._addUID(\"GPadvancedSearchPanel\")).style.display = \"none\";\n }, false);\n } else if (divClose.attachEvent) {\n divClose.attachEvent(\"onclick\", function () {\n var id = \"#GPsearchInput-\" + self._uid;\n document.querySelector(id + \" input\").disabled = false;\n document.getElementById(self._addUID(\"GPgeocodeResultsList\")).style.display = \"none\";\n document.getElementById(self._addUID(\"GPshowAdvancedSearch\")).style.display = \"inline-block\";\n document.getElementById(self._addUID(\"GPadvancedSearchPanel\")).style.display = \"none\";\n });\n }\n container.appendChild(divClose);\n return container;\n },\n /**\n * @param {Object[]} advancedSearchCodes - codes\n *\n * @returns {DOMElement} DOM element\n */\n _createAdvancedSearchPanelFormElement: function _createAdvancedSearchPanelFormElement(advancedSearchCodes) {\n // contexte d'execution\n var self = this;\n var form = document.createElement(\"form\");\n form.id = this._addUID(\"GPadvancedSearchForm\");\n form.addEventListener(\"submit\", function (e) {\n e.preventDefault();\n // data\n var data = [];\n // liste des attributs de la ressource de geocodage\n var id = \"#GPadvancedSearchFilters-\" + self._uid;\n var matchesFilters = document.querySelectorAll(id + \" > div > div > input\");\n for (var i = 0; i < matchesFilters.length; i++) {\n var element = matchesFilters[i];\n data.push({\n key: element.name,\n value: element.value\n });\n }\n\n // gestionnaire d'evenement :\n // on récupère les valeurs de saisies pour requête sur le service de geocodage\n self.onGeocodingAdvancedSearchSubmit(e, data);\n document.getElementById(self._addUID(\"GPgeocodeResultsList\")).style.display = \"block\";\n return false;\n });\n var div = document.createElement(\"div\");\n div.className = \"GPflexInput\";\n var label = document.createElement(\"label\");\n label.className = \"GPadvancedSearchCodeLabel\";\n label.innerHTML = \"Recherche par\";\n div.appendChild(label);\n var select = this._createAdvancedSearchFormCodeElement(advancedSearchCodes);\n div.appendChild(select);\n\n // FIXME on decompose la fonction pour les besoins du controle,\n // on ajoutera ces childs à la main...\n\n // var filters = this._createAdvancedSearchFormFiltersElement ();\n // form.appendChild(filters);\n\n // var input = this._createAdvancedSearchFormInputElement ();\n // form.appendChild(input);\n\n form.appendChild(div);\n return form;\n },\n /**\n * @param {Object[]} codes - codes\n * @returns {DOMElement} DOM element\n */\n _createAdvancedSearchFormCodeElement: function _createAdvancedSearchFormCodeElement(codes) {\n // contexte d'execution\n var self = this;\n var select = document.createElement(\"select\");\n select.id = this._addUID(\"GPadvancedSearchCode\");\n select.className = \"GPadvancedSearchCode\";\n select.addEventListener(\"change\", function (e) {\n // var idx = e.target.selectedIndex;\n // var value = e.target.options[idx].value;\n // gestionnaire d'evenement :\n // permet de recuperer des informations diverses...\n self.onGeocodingAdvancedSearchCodeChange(e);\n }, false);\n\n // liste statique au cas où des codes n'ont pas été passés en entrée\n if (!codes) {\n codes = [{\n id: \"PositionOfInterest\",\n title: \"Lieux/toponymes\"\n }, {\n id: \"StreetAddress\",\n title: \"Adresses\"\n }, {\n id: \"CadastralParcel\",\n title: \"Parcelles cadastrales\"\n }];\n }\n for (var i = 0; i < codes.length; i++) {\n var option = document.createElement(\"option\");\n option.value = codes[i].id;\n option.text = codes[i].title;\n select.appendChild(option);\n }\n return select;\n },\n /**\n * @returns {DOMElement} DOM element\n */\n _createAdvancedSearchFormInputElement: function _createAdvancedSearchFormInputElement() {\n var input = document.createElement(\"input\");\n input.type = \"submit\";\n input.id = this._addUID(\"GPadvancedSearchSubmit\");\n input.className = \"GPinputSubmit\";\n input.value = \"Chercher\";\n return input;\n },\n /**\n * Filters geocoding.\n *\n * @returns {DOMElement} DOM element\n */\n _createAdvancedSearchFormFiltersElement: function _createAdvancedSearchFormFiltersElement() {\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPadvancedSearchFilters\");\n return container;\n },\n /**\n * Create filter container for resources :\n * \"PositionOfInterest\", \"StreetAddress\", ...\n *\n * @param {String} code - code of geocoding resource\n * @param {Boolean} display - display\n *\n * @returns {DOMElement} DOM element\n */\n _createAdvancedSearchFiltersTableElement: function _createAdvancedSearchFiltersTableElement(code, display) {\n var container = document.createElement(\"div\");\n container.id = this._addUID(code);\n if (!display) {\n container.style.display = \"none\";\n }\n return container;\n },\n /**\n * Create filter attribut for a resource :\n * \"PositionOfInterest\", \"StreetAddress\", ...\n * Research filters are filled in Javascript depending on developer choice\n *\n * @param {Object} filterAttributes - filter attributes :\n * @param {String} filterAttributes.code - code of geocoding resource\n * @param {String} filterAttributes.name - ID\n * @param {String} filterAttributes.title - label\n * @param {String} filterAttributes.description - description\n * @param {String} filterAttributes.value - value\n *\n * @returns {DOMElement} DOM element\n */\n _createAdvancedSearchFiltersAttributElement: function _createAdvancedSearchFiltersAttributElement(filterAttributes) {\n // INFORMATION\n // cette methode peut être appelée si le document n'existe pas, elle\n // permet ainsi de creer une div sans insertion dans le container...\n\n var container = null;\n var name = filterAttributes.name;\n var title = filterAttributes.title;\n var description = filterAttributes.description;\n var code = filterAttributes.code;\n var value = filterAttributes.value;\n var div = document.createElement(\"div\");\n div.className = \"GPflexInput\";\n var label = document.createElement(\"label\");\n label.className = \"GPadvancedSearchFilterLabel\";\n label.htmlFor = name;\n label.title = description || title;\n label.innerHTML = title;\n div.appendChild(label);\n var input = document.createElement(\"input\");\n input.id = name;\n input.className = \"GPadvancedSearchFilterInput\";\n input.type = \"text\";\n input.name = name;\n if (value) {\n if (Array.isArray(value)) {\n var listId = name + \"_list\";\n input.setAttribute(\"list\", listId);\n var dl = document.createElement(\"datalist\");\n dl.id = listId;\n for (var i = 0; i < value.length; ++i) {\n var option = document.createElement(\"option\");\n option.value = value[i];\n dl.appendChild(option);\n }\n div.appendChild(dl);\n } else {\n input.value = value;\n }\n }\n div.appendChild(input);\n container = document.getElementById(this._addUID(code));\n if (container) {\n container.appendChild(div);\n } else {\n // le container, c'est la div !\n container = div;\n }\n return container;\n },\n // ################################################################### //\n // ################## Geocoding results container #################### //\n // ################################################################### //\n\n /**\n * @returns {DOMElement} DOM element\n */\n _createGeocodeResultsHeaderElement: function _createGeocodeResultsHeaderElement() {\n var self = this;\n var container = document.createElement(\"div\");\n container.className = \"GPpanelHeader\";\n var divTitle = document.createElement(\"div\");\n divTitle.className = \"GPpanelTitle\";\n divTitle.innerHTML = \"Résultats de la recherche\";\n container.appendChild(divTitle);\n var divClose = document.createElement(\"div\");\n divClose.id = this._addUID(\"GPgeocodeResultsClose\");\n divClose.className = \"GPpanelClose\";\n divClose.title = \"Fermer la fenêtre de résultats\";\n if (divClose.addEventListener) {\n divClose.addEventListener(\"click\", function () {\n document.getElementById(self._addUID(\"GPgeocodeResultsList\")).style.display = \"none\";\n }, false);\n } else if (divClose.attachEvent) {\n divClose.attachEvent(\"onclick\", function () {\n document.getElementById(self._addUID(\"GPgeocodeResultsList\")).style.display = \"none\";\n });\n }\n container.appendChild(divClose);\n return container;\n },\n /**\n * Geocoding results list.\n *\n * @returns {DOMElement} DOM element\n */\n _createGeocodeResultsListElement: function _createGeocodeResultsListElement() {\n // contexte d'execution\n var self = this;\n var container = document.createElement(\"div\");\n container.id = this._addUID(\"GPgeocodeResults\");\n if (container.addEventListener) {\n container.addEventListener(\"click\", function (e) {\n if (!e.ctrlKey) {\n document.getElementById(self._addUID(\"GPgeocodeResultsList\")).style.display = \"none\";\n }\n self.onGeocodedResultsItemClick(e);\n }, false);\n } else if (container.attachEvent) {\n container.attachEvent(\"onclick\", function (e) {\n if (!e.ctrlKey) {\n document.getElementById(self._addUID(\"GPgeocodeResultsList\")).style.display = \"none\";\n }\n self.onGeocodedResultsItemClick(e);\n });\n }\n // Results are dynamically filled in Javascript by geocoding service\n //
    ...
    \n\n return container;\n },\n /**\n * Geocoding result.\n * Results are dynamically filled in Javascript by geocoding service\n *\n * TODO formaliser le contenu des reponses\n * FIXME formater la reponse en amont !\n *\n * @param {Object} location - suggested or geocoded location results\n * @param {Number} id - ID\n */\n _createGeocodedLocationElement: function _createGeocodedLocationElement(location, id) {\n var container = document.getElementById(this._addUID(\"GPgeocodeResults\"));\n var div = document.createElement(\"div\");\n div.id = this._addUID(\"GeocodedLocation_\" + id);\n div.className = \"GPautoCompleteProposal\";\n if (typeof location === \"string\") {\n div.innerHTML = location;\n } else {\n div.innerHTML = _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getGeocodedLocationFreeform(location);\n }\n container.appendChild(div);\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (SearchEngineDOM);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vQ29udHJvbHMvU2VhcmNoRW5naW5lRE9NLmpzP2ZkYjgiXSwibmFtZXMiOlsiU2VhcmNoRW5naW5lRE9NIiwiX2FkZFVJRCIsImlkIiwidWlkIiwiX3VpZCIsIl9jcmVhdGVNYWluQ29udGFpbmVyRWxlbWVudCIsImNvbnRhaW5lciIsImRvY3VtZW50IiwiY3JlYXRlRWxlbWVudCIsImNsYXNzTmFtZSIsIl9jcmVhdGVTaG93U2VhcmNoRW5naW5lRWxlbWVudCIsImlucHV0IiwidHlwZSIsIl9jcmVhdGVTaG93U2VhcmNoRW5naW5lUGljdG9FbGVtZW50Iiwic2VsZiIsImxhYmVsIiwiaHRtbEZvciIsInRpdGxlIiwiYWRkRXZlbnRMaXN0ZW5lciIsImdldEVsZW1lbnRCeUlkIiwic3R5bGUiLCJkaXNwbGF5Iiwic2hvd0FkdmFuY2VkU2VhcmNoIiwicXVlcnlTZWxlY3RvciIsImRpc2FibGVkIiwib25TaG93U2VhcmNoRW5naW5lQ2xpY2siLCJzcGFuT3BlbiIsImFwcGVuZENoaWxkIiwiX2NyZWF0ZVNlYXJjaElucHV0RWxlbWVudCIsInBsYWNlaG9sZGVyIiwiZm9ybSIsImUiLCJwcmV2ZW50RGVmYXVsdCIsIm9uR2VvY29kaW5nU2VhcmNoU3VibWl0IiwiYXV0b2NvbXBsZXRlIiw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gICAgICAgIC8vIElsIGZhdXQgZG9uYyB0cm91dmVyIGxlIG1veWVuIGQnZXZpdGVyIGxlIHN1Ym1pdCBzdXIgdW4gcmV0dXJuIHZlbmFudFxuICAgICAgICAgICAgLy8gc2V1bGVtZW50IGQndW5lIHNlbGVjdGlvbiBkZSBzdWdnZXN0aW9uLi4uXG5cbiAgICAgICAgICAgIHZhciBjaGFyQ29kZSA9IGUud2hpY2ggfHwgZS5rZXlDb2RlO1xuXG4gICAgICAgICAgICB2YXIgY29udGFpbmVyID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoc2VsZi5fYWRkVUlEKFwiR1BhdXRvY29tcGxldGVSZXN1bHRzXCIpKTtcblxuICAgICAgICAgICAgLy8gc2kgYXVjdW4gY29udGFpbmVyICE/XG4gICAgICAgICAgICBpZiAoIWNvbnRhaW5lcikge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGN1cnIgPSBjb250YWluZXIuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZShcIkdQYXV0b0NvbXBsZXRlUHJvcG9zYWwgY3VycmVudFwiKTtcbiAgICAgICAgICAgIHZhciBsaXN0ID0gY29udGFpbmVyLmdldEVsZW1lbnRzQnlDbGFzc05hbWUoXCJHUGF1dG9Db21wbGV0ZVByb3Bvc2FsXCIpO1xuXG4gICAgICAgICAgICAvLyBzaSBhdWN1bmUgc3VnZ2VzdGlvbiwgb24gbmUgdmEgcGFzIHBsdXMgbG9pbiAhXG4gICAgICAgICAgICB2YXIgbGVuZ3RoID0gbGlzdC5sZW5ndGg7XG4gICAgICAgICAgICBpZiAoIWxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGN1cnJlbnQgPSBudWxsO1xuXG4gICAgICAgICAgICAvLyBzaSBhdWN1biBpdGVtIGNvdXJhbnQsIG9uIHByZW5kIGxlIDFlciAhXG4gICAgICAgICAgICBpZiAoIWN1cnIubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudCA9IGxpc3RbMF07XG4gICAgICAgICAgICAgICAgY3VycmVudC5jbGFzc05hbWUgPSBcIkdQYXV0b0NvbXBsZXRlUHJvcG9zYWwgY3VycmVudFwiO1xuICAgICAgICAgICAgICAgIGN1cnJlbnQuc3R5bGUuY29sb3IgPSBcIiMwMDAwMDBcIjtcbiAgICAgICAgICAgICAgICBjdXJyZW50LnN0eWxlW1wiYmFja2dyb3VuZC1jb2xvclwiXSA9IFwiI0NFREJFRlwiO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY3VycmVudCA9IGN1cnJbMF07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBpbmRleCA9IHBhcnNlSW50KElELmluZGV4KGN1cnJlbnQuaWQpLCAxMCk7XG4gICAgICAgICAgICB2YXIgbmV4dCA9IChpbmRleCA9PT0gbGVuZ3RoIC0gMSkgPyBsaXN0WzBdIDogbGlzdFtpbmRleCArIDFdO1xuICAgICAgICAgICAgdmFyIHByZXYgPSAoaW5kZXggPT09IDApID8gbGlzdFtsZW5ndGggLSAxXSA6IGxpc3RbaW5kZXggLSAxXTtcblxuICAgICAgICAgICAgY3VycmVudC5zdHlsZVtcImJhY2tncm91bmQtY29sb3JcIl0gPSBcIlwiO1xuICAgICAgICAgICAgY3VycmVudC5zdHlsZS5jb2xvciA9IFwiXCI7XG4gICAgICAgICAgICBwcmV2LnN0eWxlW1wiYmFja2dyb3VuZC1jb2xvclwiXSA9IFwiXCI7XG4gICAgICAgICAgICBwcmV2LnN0eWxlLmNvbG9yID0gXCJcIjtcbiAgICAgICAgICAgIG5leHQuc3R5bGVbXCJiYWNrZ3JvdW5kLWNvbG9yXCJdID0gXCJcIjtcbiAgICAgICAgICAgIG5leHQuc3R5bGUuY29sb3IgPSBcIlwiO1xuXG4gICAgICAgICAgICBzd2l0Y2ggKGNoYXJDb2RlKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAzODogLy8gYXJyb3cgdXBcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudC5jbGFzc05hbWUgPSBcIkdQYXV0b0NvbXBsZXRlUHJvcG9zYWxcIjtcbiAgICAgICAgICAgICAgICAgICAgcHJldi5jbGFzc05hbWUgPSBcIkdQYXV0b0NvbXBsZXRlUHJvcG9zYWwgY3VycmVudFwiO1xuICAgICAgICAgICAgICAgICAgICBwcmV2LnN0eWxlLmNvbG9yID0gXCIjMDAwMDAwXCI7XG4gICAgICAgICAgICAgICAgICAgIHByZXYuc3R5bGVbXCJiYWNrZ3JvdW5kLWNvbG9yXCJdID0gXCIjQ0VEQkVGXCI7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgNDA6IC8vIGFycm93IGRvd25cbiAgICAgICAgICAgICAgICAgICAgY3VycmVudC5jbGFzc05hbWUgPSBcIkdQYXV0b0NvbXBsZXRlUHJvcG9zYWxcIjtcbiAgICAgICAgICAgICAgICAgICAgbmV4dC5jbGFzc05hbWUgPSBcIkdQYXV0b0NvbXBsZXRlUHJvcG9zYWwgY3VycmVudFwiO1xuICAgICAgICAgICAgICAgICAgICBuZXh0LnN0eWxlLmNvbG9yID0gXCIjMDAwMDAwXCI7XG4gICAgICAgICAgICAgICAgICAgIG5leHQuc3R5bGVbXCJiYWNrZ3JvdW5kLWNvbG9yXCJdID0gXCIjQ0VEQkVGXCI7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgMTM6IC8vIGVudGVyXG4gICAgICAgICAgICAgICAgICAgIC8vIGNmLiBGSVhNRVxuICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnQuY2xpY2soZSk7XG4gICAgICAgICAgICAgICA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O1xuICAgICAgICAgICAgICAgIGlucHV0LnNldEF0dHJpYnV0ZShcImxpc3RcIiwgbGlzdElkKTtcbiAgICAgICAgICAgICAgICB2YXIgZGwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiZGF0YWxpc3RcIik7XG4gICAgICAgICAgICAgICAgZGwuaWQgPSBsaXN0SWQ7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB2YWx1ZS5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgb3B0aW9uID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcIm9wdGlvblwiKTtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uLnZhbHVlID0gdmFsdWVbaV07XG4gICAgICAgICAgICAgICAgICAgIGRsLmFwcGVuZENoaWxkKG9wdGlvbik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRpdi5hcHBlbmRDaGlsZChkbCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlucHV0LnZhbHVlID0gdmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZGl2LmFwcGVuZENoaWxkKGlucHV0KTtcblxuICAgICAgICBjb250YWluZXIgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCh0aGlzLl9hZGRVSUQoY29kZSkpO1xuXG4gICAgICAgIGlmIChjb250YWluZXIpIHtcbiAgICAgICAgICAgIGNvbnRhaW5lci5hcHBlbmRDaGlsZChkaXYpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gbGUgY29udGFpbmVyLCBjJ2VzdCBsYSBkaXYgIVxuICAgICAgICAgICAgY29udGFpbmVyID0gZGl2O1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGNvbnRhaW5lcjtcbiAgICB9LFxuXG4gICAgLy8gIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy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tZSA9IFwiR1BhdXRvQ29tcGxldGVQcm9wb3NhbFwiO1xuXG4gICAgICAgIGlmICh0eXBlb2YgbG9jYXRpb24gPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgIGRpdi5pbm5lckhUTUwgPSBsb2NhdGlvbjtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGRpdi5pbm5lckhUTUwgPSBHZW9jb2RlVXRpbHMuZ2V0R2VvY29kZWRMb2NhdGlvbkZyZWVmb3JtKGxvY2F0aW9uKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnRhaW5lci5hcHBlbmRDaGlsZChkaXYpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IFNlYXJjaEVuZ2luZURPTTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/Controls/SearchEngineDOM.js\n"); + +/***/ }), + +/***/ "./src/Common/Styles.js": +/*!******************************!*\ + !*** ./src/Common/Styles.js ***! + \******************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS_GPboostRelief_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CSS/GPboostRelief.css */ \"./src/Common/CSS/GPboostRelief.css\");\n/* harmony import */ var _CSS_GPboostRelief_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPboostRelief_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CSS_GPbuildings_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CSS/GPbuildings.css */ \"./src/Common/CSS/GPbuildings.css\");\n/* harmony import */ var _CSS_GPbuildings_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPbuildings_css__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _CSS_GPdrawing_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CSS/GPdrawing.css */ \"./src/Common/CSS/GPdrawing.css\");\n/* harmony import */ var _CSS_GPdrawing_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPdrawing_css__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _CSS_GPelevationPath_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CSS/GPelevationPath.css */ \"./src/Common/CSS/GPelevationPath.css\");\n/* harmony import */ var _CSS_GPelevationPath_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPelevationPath_css__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _CSS_GPgeneralWidget_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CSS/GPgeneralWidget.css */ \"./src/Common/CSS/GPgeneralWidget.css\");\n/* harmony import */ var _CSS_GPgeneralWidget_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPgeneralWidget_css__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _CSS_GPgetFeatureInfo_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CSS/GPgetFeatureInfo.css */ \"./src/Common/CSS/GPgetFeatureInfo.css\");\n/* harmony import */ var _CSS_GPgetFeatureInfo_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPgetFeatureInfo_css__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _CSS_GPisochron_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CSS/GPisochron.css */ \"./src/Common/CSS/GPisochron.css\");\n/* harmony import */ var _CSS_GPisochron_css__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPisochron_css__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _CSS_GPlayerSwitcher_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CSS/GPlayerSwitcher.css */ \"./src/Common/CSS/GPlayerSwitcher.css\");\n/* harmony import */ var _CSS_GPlayerSwitcher_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPlayerSwitcher_css__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _CSS_GPlocation_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CSS/GPlocation.css */ \"./src/Common/CSS/GPlocation.css\");\n/* harmony import */ var _CSS_GPlocation_css__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPlocation_css__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _CSS_GPmeasureArea_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CSS/GPmeasureArea.css */ \"./src/Common/CSS/GPmeasureArea.css\");\n/* harmony import */ var _CSS_GPmeasureArea_css__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPmeasureArea_css__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _CSS_GPmeasureAzimuth_css__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./CSS/GPmeasureAzimuth.css */ \"./src/Common/CSS/GPmeasureAzimuth.css\");\n/* harmony import */ var _CSS_GPmeasureAzimuth_css__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPmeasureAzimuth_css__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _CSS_GPmeasureLength_css__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./CSS/GPmeasureLength.css */ \"./src/Common/CSS/GPmeasureLength.css\");\n/* harmony import */ var _CSS_GPmeasureLength_css__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPmeasureLength_css__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _CSS_GPmeasureToolTip_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./CSS/GPmeasureToolTip.css */ \"./src/Common/CSS/GPmeasureToolTip.css\");\n/* harmony import */ var _CSS_GPmeasureToolTip_css__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPmeasureToolTip_css__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _CSS_GPmousePosition_css__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./CSS/GPmousePosition.css */ \"./src/Common/CSS/GPmousePosition.css\");\n/* harmony import */ var _CSS_GPmousePosition_css__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPmousePosition_css__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _CSS_GPreverseGeocoding_css__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./CSS/GPreverseGeocoding.css */ \"./src/Common/CSS/GPreverseGeocoding.css\");\n/* harmony import */ var _CSS_GPreverseGeocoding_css__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPreverseGeocoding_css__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _CSS_GProute_css__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./CSS/GProute.css */ \"./src/Common/CSS/GProute.css\");\n/* harmony import */ var _CSS_GProute_css__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_CSS_GProute_css__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _CSS_GPsearchEngine_css__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./CSS/GPsearchEngine.css */ \"./src/Common/CSS/GPsearchEngine.css\");\n/* harmony import */ var _CSS_GPsearchEngine_css__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPsearchEngine_css__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _CSS_GPwaiting_css__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./CSS/GPwaiting.css */ \"./src/Common/CSS/GPwaiting.css\");\n/* harmony import */ var _CSS_GPwaiting_css__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPwaiting_css__WEBPACK_IMPORTED_MODULE_17__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vU3R5bGVzLmpzP2QzOWIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBaUM7QUFDRjtBQUNGO0FBQ007QUFDQTtBQUNDO0FBQ047QUFDSztBQUNMO0FBQ0c7QUFDRztBQUNEO0FBQ0M7QUFDRDtBQUNHO0FBQ1g7QUFDTyIsImZpbGUiOiIuL3NyYy9Db21tb24vU3R5bGVzLmpzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFwiLi9DU1MvR1Bib29zdFJlbGllZi5jc3NcIjtcbmltcG9ydCBcIi4vQ1NTL0dQYnVpbGRpbmdzLmNzc1wiO1xuaW1wb3J0IFwiLi9DU1MvR1BkcmF3aW5nLmNzc1wiO1xuaW1wb3J0IFwiLi9DU1MvR1BlbGV2YXRpb25QYXRoLmNzc1wiO1xuaW1wb3J0IFwiLi9DU1MvR1BnZW5lcmFsV2lkZ2V0LmNzc1wiO1xuaW1wb3J0IFwiLi9DU1MvR1BnZXRGZWF0dXJlSW5mby5jc3NcIjtcbmltcG9ydCBcIi4vQ1NTL0dQaXNvY2hyb24uY3NzXCI7XG5pbXBvcnQgXCIuL0NTUy9HUGxheWVyU3dpdGNoZXIuY3NzXCI7XG5pbXBvcnQgXCIuL0NTUy9HUGxvY2F0aW9uLmNzc1wiO1xuaW1wb3J0IFwiLi9DU1MvR1BtZWFzdXJlQXJlYS5jc3NcIjtcbmltcG9ydCBcIi4vQ1NTL0dQbWVhc3VyZUF6aW11dGguY3NzXCI7XG5pbXBvcnQgXCIuL0NTUy9HUG1lYXN1cmVMZW5ndGguY3NzXCI7XG5pbXBvcnQgXCIuL0NTUy9HUG1lYXN1cmVUb29sVGlwLmNzc1wiO1xuaW1wb3J0IFwiLi9DU1MvR1Btb3VzZVBvc2l0aW9uLmNzc1wiO1xuaW1wb3J0IFwiLi9DU1MvR1ByZXZlcnNlR2VvY29kaW5nLmNzc1wiO1xuaW1wb3J0IFwiLi9DU1MvR1Byb3V0ZS5jc3NcIjtcbmltcG9ydCBcIi4vQ1NTL0dQc2VhcmNoRW5naW5lLmNzc1wiO1xuaW1wb3J0IFwiLi9DU1MvR1B3YWl0aW5nLmNzc1wiO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/Styles.js\n"); + +/***/ }), + +/***/ "./src/Common/Utils.js": +/*!*****************************!*\ + !*** ./src/Common/Utils.js ***! + \*****************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/**\n* @module Utils\n* @alias Gp.olUtils\n* @description\n* ...\n*\n* @example\n* detectSupport();\n* assign();\n* mergeParams();\n*/\nvar Utils = {\n /**\n * this method is called by the constructor.\n * this information is useful to switch to touch mode.\n * Detection : test for desktop or tactile\n *\n * @function detectSupport\n * @returns {Boolean} isDesktop - true for desktop userAgent, false for mobile\n */\n detectSupport: function detectSupport() {\n var isDesktop = true;\n var userAgent = window.navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\"iphone\") !== -1 || userAgent.indexOf(\"ipod\") !== -1 || userAgent.indexOf(\"ipad\") !== -1 || userAgent.indexOf(\"android\") !== -1 || userAgent.indexOf(\"mobile\") !== -1 || userAgent.indexOf(\"blackberry\") !== -1 || userAgent.indexOf(\"tablet\") !== -1 || userAgent.indexOf(\"phone\") !== -1 || userAgent.indexOf(\"touch\") !== -1) {\n isDesktop = false;\n }\n if (userAgent.indexOf(\"msie\") !== -1 || userAgent.indexOf(\"trident\") !== -1) {\n isDesktop = true;\n }\n return isDesktop;\n },\n /**\n * Copies all source object members to dest\n *\n * @function assign\n * @param {Object} dest - destination object where properties and method will be copied\n * @param {Object} source - source object from which properties and method will be copied\n * @returns {Object} dest\n */\n assign: function assign(dest, source) {\n dest = dest || {};\n for (var prop in source) {\n if (source.hasOwnProperty(prop)) {\n dest[prop] = source[prop];\n }\n }\n return dest;\n },\n /**\n * Merge two objects parameters (deeper than assign)\n *\n * @function mergeParams\n * @param {Object} dest - destination object where properties and method will be merge\n * @param {Object} source - source object from which properties and method will be merge\n * @param {Boolean} replace - replace destination value by source if exists or not (true by default)\n */\n mergeParams: function mergeParams(dest, source, replace) {\n if (!dest || !source) {\n return;\n }\n if (typeof replace === \"undefined\") {\n replace = true;\n }\n for (var param in source) {\n if (source.hasOwnProperty(param)) {\n if (_typeof(source[param]) === \"object\") {\n if (dest.hasOwnProperty(param)) {\n this.mergeParams(dest[param], source[param], replace);\n } else {\n dest[param] = source[param];\n }\n } else {\n if (dest.hasOwnProperty(param)) {\n if (replace) {\n dest[param] = source[param];\n }\n } else {\n dest[param] = source[param];\n }\n }\n }\n }\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Utils);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vVXRpbHMuanM/MTM1ZSJdLCJuYW1lcyI6WyJVdGlscyIsImRldGVjdFN1cHBvcnQiLCJpc0Rlc2t0b3AiLCJ1c2VyQWdlbnQiLCJ3aW5kb3ciLCJuYXZpZ2F0b3IiLCJ0b0xvd2VyQ2FzZSIsImluZGV4T2YiLCJhc3NpZ24iLCJkZXN0Iiwic291cmNlIiwicHJvcCIsImhhc093blByb3BlcnR5IiwibWVyZ2VQYXJhbXMiLCJyZXBsYWNlIiwicGFyYW0iLCJfdHlwZW9mIl0sIm1hcHBpbmdzIjoiOztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFJQSxLQUFLLEdBQUc7RUFFUjtBQUNKO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0VBQ0lDLGFBQWEsRUFBRyxTQUFBQSxjQUFBLEVBQVk7SUFDeEIsSUFBSUMsU0FBUyxHQUFHLElBQUk7SUFDcEIsSUFBSUMsU0FBUyxHQUFHQyxNQUFNLENBQUNDLFNBQVMsQ0FBQ0YsU0FBUyxDQUFDRyxXQUFXLENBQUMsQ0FBQztJQUV4RCxJQUFJSCxTQUFTLENBQUNJLE9BQU8sQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFDLENBQUMsSUFDbENKLFNBQVMsQ0FBQ0ksT0FBTyxDQUFDLE1BQU0sQ0FBQyxL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G5vdCAodHJ1ZSBieSBkZWZhdWx0KVxuICAgICAqL1xuICAgIG1lcmdlUGFyYW1zIDogZnVuY3Rpb24gKGRlc3QsIHNvdXJjZSwgcmVwbGFjZSkge1xuICAgICAgICBpZiAoIWRlc3QgfHwgIXNvdXJjZSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlb2YgcmVwbGFjZSA9PT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICAgICAgcmVwbGFjZSA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgZm9yICh2YXIgcGFyYW0gaW4gc291cmNlKSB7XG4gICAgICAgICAgICBpZiAoc291cmNlLmhhc093blByb3BlcnR5KHBhcmFtKSkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc291cmNlW3BhcmFtXSA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGVzdC5oYXNPd25Qcm9wZXJ0eShwYXJhbSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWVyZ2VQYXJhbXMoZGVzdFtwYXJhbV0sIHNvdXJjZVtwYXJhbV0sIHJlcGxhY2UpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVzdFtwYXJhbV0gPSBzb3VyY2VbcGFyYW1dO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRlc3QuaGFzT3duUHJvcGVydHkocGFyYW0pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVwbGFjZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3RbcGFyYW1dID0gc291cmNlW3BhcmFtXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc3RbcGFyYW1dID0gc291cmNlW3BhcmFtXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IFV0aWxzO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/Utils.js\n"); + +/***/ }), + +/***/ "./src/Common/Utils/AutoLoadConfig.js": +/*!********************************************!*\ + !*** ./src/Common/Utils/AutoLoadConfig.js ***! + \********************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n\n(function () {\n var scripts = document.getElementsByTagName(\"script\");\n var key = scripts[scripts.length - 1].getAttribute(\"data-key\");\n var url = scripts[scripts.length - 1].getAttribute(\"data-url\");\n var timeout = scripts[scripts.length - 1].getAttribute(\"data-timeout\");\n\n // callback\n var success = function success() {\n // Pas de messages en mode prod\n // console.log(\"GetConfig success!\");\n };\n\n // callback\n var error = function error(e) {\n throw new Error(\"Configuration load failed : \" + e.message);\n };\n if (!key && !url) {\n // pas de message d'information !\n // console.log(\"WARNING : parameters missing 'data-key' and 'data-url', the loading of configuration can not be done !\");\n return;\n }\n var options = {\n apiKey: key,\n sync: true,\n onSuccess: success,\n onFailure: error\n };\n if (url) {\n options.customConfigFile = url;\n options.callbackSuffix = \"\";\n }\n if (timeout) {\n options.timeOut = timeout;\n }\n\n // test d'existance de la varibale globale Gp.Config\n if (!window.Gp) {\n // appel du service\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Services.getConfig(options);\n }\n})();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;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Agb25TdWNjZXNzIDogc3VjY2VzcyxcbiAgICAgICAgb25GYWlsdXJlIDogZXJyb3JcbiAgICB9O1xuXG4gICAgaWYgKHVybCkge1xuICAgICAgICBvcHRpb25zLmN1c3RvbUNvbmZpZ0ZpbGUgPSB1cmw7XG4gICAgICAgIG9wdGlvbnMuY2FsbGJhY2tTdWZmaXggPSBcIlwiO1xuICAgIH1cblxuICAgIGlmICh0aW1lb3V0KSB7XG4gICAgICAgIG9wdGlvbnMudGltZU91dCA9IHRpbWVvdXQ7XG4gICAgfVxuXG4gICAgLy8gdGVzdCBkJ2V4aXN0YW5jZSBkZSBsYSB2YXJpYmFsZSBnbG9iYWxlIEdwLkNvbmZpZ1xuICAgIGlmICghd2luZG93LkdwKSB7XG4gICAgICAgIC8vIGFwcGVsIGR1IHNlcnZpY2VcbiAgICAgICAgR3AuU2VydmljZXMuZ2V0Q29uZmlnKG9wdGlvbnMpO1xuICAgIH1cbn0pKCk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/Utils/AutoLoadConfig.js\n"); + +/***/ }), + +/***/ "./src/Common/Utils/ColorUtils.js": +/*!****************************************!*\ + !*** ./src/Common/Utils/ColorUtils.js ***! + \****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * @module ColorUtils\n * @alias Gp.ColorUtils\n * @description\n * ...\n *\n * @example\n * arrayTorgba();\n * arrayToHex();\n * rgbaToHex();\n * hexToRgba();\n * isHex();\n * isRGB();\n */\nvar ColorUtils = {\n /**\n * Number to hex conversion\n *\n * @param {Number} number - 0-255\n * @returns {String} hex value\n */\n hex: function hex(number) {\n if (number > 255) {\n throw new Error(\"'\" + number + \"'' is greater than 255(0xff);\");\n }\n var str = Number(number).toString(16);\n return (\"0\" + str).slice(-2);\n },\n /**\n * Hexa to number conversion\n *\n * @param {*} hexa 00-FF\n * @returns {Number} number value\n */\n num: function num(hexa) {\n return parseInt(hexa, 16);\n },\n /**\n * Converts an array ([255,255,255,1]) to rgba string\n *\n * @function arrayToRgba\n * @param {Array} values - array of values\n * @returns {String} A color of RGB or RGBA format\n */\n arrayToRgba: function arrayToRgba(values) {\n if (!Array.isArray(values)) {\n throw new Error(\"Not an array !\");\n }\n var red = values[0];\n var green = values[1];\n var blue = values[2];\n var alpha = values[3] || 1;\n var result = \"rgba(\" + red + \", \" + green + \", \" + blue + \", \" + parseFloat(alpha) + \")\";\n return result;\n },\n /**\n * Converts an array ([255,255,255,1]) to #RRGGBBAA\n *\n * @function arrayToHex\n * @param {Array} values - array of values\n * @returns {Object} hex and opacity formated values\n */\n arrayToHex: function arrayToHex(values) {\n if (!Array.isArray(values)) {\n throw new Error(\"Not an array !\");\n }\n var red = values[0];\n var green = values[1];\n var blue = values[2];\n var alpha = values[3];\n var elems = [this.hex(red), this.hex(green), this.hex(blue)];\n var result = {};\n result.hex = \"#\" + elems.join(\"\");\n if (alpha) {\n // elems.push(hex(alpha));\n result.opacity = parseFloat(alpha);\n }\n return result;\n },\n /**\n * Converts rgba string to #RRGGBBAA\n * (Code adapted from : https://gist.github.com/mstssk/afda4ce9e5c335fd79cd)\n *\n * @function rgbaToHex\n * @param {String} rgba - A color of RGB or RGBA format.\n * @returns {Object} hex and opacity formated values\n */\n rgbaToHex: function rgbaToHex(rgba) {\n var regex = /rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(0?.?\\d+)\\s*)?\\)/;\n var parsed = regex.exec(rgba);\n if (!parsed) {\n throw new Error(\"Invalid format: \" + rgba);\n }\n var red = parsed[1];\n var green = parsed[2];\n var blue = parsed[3];\n var alpha = parsed[4];\n var elems = [this.hex(red), this.hex(green), this.hex(blue)];\n var result = {};\n result.hex = \"#\" + elems.join(\"\");\n if (alpha) {\n // elems.push(hex(alpha));\n result.opacity = parseFloat(alpha);\n }\n return result;\n },\n /**\n * Converts hex color and opacity value to rgba string.\n * (Code adapted from : http://stackoverflow.com/a/5624139)\n *\n * @function hexToRgba\n * @param {String} hex - A color value on RGB format (hexa).\n * @param {Number} opacity - A opacity value.\n * @returns {String} A color of RGB or RGBA format\n */\n hexToRgba: function hexToRgba(hex, opacity) {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n if (!hex) {\n throw new Error(\"Invalid format\");\n }\n hex = hex.replace(shorthandRegex, function (m, r, g, b) {\n return r + r + g + g + b + b;\n });\n var rgb = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n rgb = rgb ? {\n r: parseInt(rgb[1], 16),\n g: parseInt(rgb[2], 16),\n b: parseInt(rgb[3], 16)\n } : null;\n var result = rgb ? \"rgba(\" + rgb.r + \", \" + rgb.g + \", \" + rgb.b + \", \" + opacity + \")\" : null;\n return result;\n },\n /**\n * Determine if value is a correct hexa color.\n * @param {*} value - hex color (#FFFFFF)\n * @returns {Boolean} True if value is a hexa color\n */\n isHex: function isHex(value) {\n if (!value) {\n return false;\n }\n if (value.charAt(0) !== \"#\") {\n return false;\n }\n var regex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\n var parsed = regex.exec(value);\n if (!parsed) {\n return false;\n }\n return true;\n },\n /**\n * Determine if value is a correct rgba color.\n * @param {*} value - rgba color (rgba(125,125,125,1))\n * @returns {Boolean} True if value is a rgba color\n */\n isRGB: function isRGB(value) {\n if (!value) {\n return false;\n }\n var regex = /rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(0?.?\\d+)\\s*)?\\)/;\n var parsed = regex.exec(value);\n if (!parsed) {\n return false;\n }\n return true;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ColorUtils);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64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ByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHJlZ2V4ID0gL3JnYmE/XFwoXFxzKihcXGQrKVxccyosXFxzKihcXGQrKVxccyosXFxzKihcXGQrKVxccyooPzosXFxzKigwPy4/XFxkKylcXHMqKT9cXCkvO1xuICAgICAgICB2YXIgcGFyc2VkID0gcmVnZXguZXhlYyh2YWx1ZSk7XG4gICAgICAgIGlmICghcGFyc2VkKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29sb3JVdGlscztcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/Utils/ColorUtils.js\n"); + +/***/ }), + +/***/ "./src/Common/Utils/Config.js": +/*!************************************!*\ + !*** ./src/Common/Utils/Config.js ***! + \************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global) {/**\n * @module Config\n * @alias [private] Config\n * @description\n * ...\n *\n * @example\n * isConfigLoaded();\n */\nvar Config = {\n /**\n * Config\n *\n * @public\n * @type {Object}\n */\n configuration: {},\n /**\n * Check if the configuration is loaded\n *\n * @returns {Boolean} True if Config is loaded, false otherwise\n */\n isConfigLoaded: function isConfigLoaded() {\n // config already loaded !\n if (this.configuration && Object.keys(this.configuration).length !== 0) {\n return true;\n }\n var scope = typeof window !== \"undefined\" ? window : typeof self !== \"undefined\" ? self : typeof global !== \"undefined\" ? global : {};\n if (scope.Gp && scope.Gp.Config && scope.Gp.Config.layers && Object.keys(scope.Gp.Config.layers).length !== 0) {\n /** ts-syntax */this.configuration = scope.Gp.Config;\n return true;\n }\n return false;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Config);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vVXRpbHMvQ29uZmlnLmpzPzdmOTUiXSwibmFtZXMiOlsiQ29uZmlnIiwiY29uZmlndXJhdGlvbiIsImlzQ29uZmlnTG9hZGVkIiwiT2JqZWN0Iiwia2V5cyIsImxlbmd0aCIsInNjb3BlIiwid2luZG93Iiwic2VsZiIsImdsb2JhbCIsIkdwIiwibGF5ZXJzIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUlBLE1BQU0sR0FBRztFQUVUO0FBQ0o7QUFDQTtBQUNBO0FBQ0E7QUFDQTtFQUNJQyxhQUFhLEVBQUcsQ0FBQyxDQUFDO0VBRWxCO0FBQ0o7QUFDQTtBQUNBO0FBQ0E7RUFDSUMsY0FBYyxFQUFHLFNBQUFBLGVBQUEsRUFBWTtJQUN6QjtJQUNBLElBQUksSUFBSSxDQUFDRCxhQUFhLElBQUlFLE1BQU0sQ0FBQ0MsSUFBSSxDQUFDLElBQUksQ0FBQ0gsYUFBYSxDQUFDLENBQUNJLE1BQU0sS0FBSyxDQUFDLEVBQUU7TUFDcEUsT0FBTyxJQUFJO0lBQ2Y7SUFDQSxJQUFJQyxLQUFLLEdBQUcsT0FBT0MsTUFBTSxLQUFLLFdBQVcsR0FBR0EsTUFBTSxHQUFHLE9BQU9DLElBQUksS0FBSyxXQUFXLEdBQUdBLElBQUksR0FBRyxPQUFPQyxNQUFNLEtBQUssV0FBVyxHQUFHQSxNQUFNLEdBQUcsQ0FBQyxDQUFDO0lBQ3JJLElBQUlILEtBQUssQ0FBQ0ksRUFBRSxJQUFJSixLQUFLL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gbG9hZGVkICFcbiAgICAgICAgaWYgKHRoaXMuY29uZmlndXJhdGlvbiAmJiBPYmplY3Qua2V5cyh0aGlzLmNvbmZpZ3VyYXRpb24pLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHNjb3BlID0gdHlwZW9mIHdpbmRvdyAhPT0gXCJ1bmRlZmluZWRcIiA/IHdpbmRvdyA6IHR5cGVvZiBzZWxmICE9PSBcInVuZGVmaW5lZFwiID8gc2VsZiA6IHR5cGVvZiBnbG9iYWwgIT09IFwidW5kZWZpbmVkXCIgPyBnbG9iYWwgOiB7fTtcbiAgICAgICAgaWYgKHNjb3BlLkdwICYmIHNjb3BlLkdwLkNvbmZpZyAmJiBzY29wZS5HcC5Db25maWcubGF5ZXJzICYmIE9iamVjdC5rZXlzKHNjb3BlLkdwLkNvbmZpZy5sYXllcnMpLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgLyoqIHRzLXN5bnRheCAqLyAodGhpcy5jb25maWd1cmF0aW9uKSA9IHNjb3BlLkdwLkNvbmZpZztcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG5cbn07XG5cbmV4cG9ydCBkZWZhdWx0IENvbmZpZztcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/Utils/Config.js\n"); + +/***/ }), + +/***/ "./src/Common/Utils/GeocodeUtils.js": +/*!******************************************!*\ + !*** ./src/Common/Utils/GeocodeUtils.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nvar GeocodeUtils = {\n /**\n * Return the freeform of a structured geocoded item\n *\n * @param {Object} geocodedLocation - Geocoded location\n * @returns {String} freeform string\n */\n getGeocodedLocationFreeform: function getGeocodedLocationFreeform(geocodedLocation) {\n var attributes = geocodedLocation.placeAttributes;\n if (attributes.label) {\n return attributes.label;\n } else if (geocodedLocation.type === \"PositionOfInterest\") {\n return attributes.postcode + \" \" + attributes.toponym;\n } else if (geocodedLocation.type === \"StreetAddress\") {\n return (attributes.housenumber ? attributes.housenumber + \" \" : \"\") + attributes.street + \" \" + (attributes.postcode ? attributes.postcode + \", \" : \"\") + attributes.city;\n } else if (geocodedLocation.type === \"CadastralParcel\") {\n return attributes.id;\n } else {\n return \"...\";\n }\n },\n /**\n * Return the freeform of a structured suggested item\n *\n * @param {Object} suggestedLocation - Suggested location\n * @returns {String} freeform string\n */\n getSuggestedLocationFreeform: function getSuggestedLocationFreeform(suggestedLocation) {\n if (suggestedLocation.fullText) {\n return suggestedLocation.fullText;\n } else {\n var values = [];\n values.push(suggestedLocation.street || \"\");\n values.push(suggestedLocation.postalCode || \"\");\n values.push(suggestedLocation.commune || \"\");\n if (suggestedLocation.type === \"PositionOfInterest\") {\n values.push(suggestedLocation.poi || \"\");\n values.push(suggestedLocation.kind || \"\");\n }\n return values.join(\" - \");\n }\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (GeocodeUtils);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vVXRpbHMvR2VvY29kZVV0aWxzLmpzPzk0ZDMiXSwibmFtZXMiOlsiR2VvY29kZVV0aWxzIiwiZ2V0R2VvY29kZWRMb2NhdGlvbkZyZWVmb3JtIiwiZ2VvY29kZWRMb2NhdGlvbiIsImF0dHJpYnV0ZXMiLCJwbGFjZUF0dHJpYnV0ZXMiLCJsYWJlbCIsInR5cGUiLCJwb3N0Y29kZSIsInRvcG9ueW0iLCJob3VzZW51bWJlciIsInN0cmVldCIsImNpdHkiLCJpZCIsImdldFN1Z2dlc3RlZExvY2F0aW9uRnJlZWZvcm0iLCJz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wdXNoKHN1Z2dlc3RlZExvY2F0aW9uLmtpbmQgfHwgXCJcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdmFsdWVzLmpvaW4oXCIgLSBcIik7XG4gICAgICAgIH1cbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBHZW9jb2RlVXRpbHM7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/Utils/GeocodeUtils.js\n"); + +/***/ }), + +/***/ "./src/Common/Utils/LayerUtils.js": +/*!****************************************!*\ + !*** ./src/Common/Utils/LayerUtils.js ***! + \****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n* @module LayerUtils\n* @alias Gp.LayerUtils\n* @description\n* ...\n*\n* @example\n* getZoomLevelFromScaleDenominator();\n* getAttributions();\n* intersects();\n*/\nvar LayerUtils = {\n /**\n * Obtenir le ZoomLevel à partir du ScaleDenominator\n * @function getZoomLevelFromScaleDenominator\n * @param {Number} scaleDenominator - the scale denominator\n * @param {String} crs - the crs\n *\n * @returns {Integer} zoom level\n */\n getZoomLevelFromScaleDenominator: function getZoomLevelFromScaleDenominator(scaleDenominator, crs) {\n // ------------------------------------------------- //\n // Code issu de l'API Geoportal/Catalogue/Config.js //\n // ------------------------------------------------- //\n // var configuration = Gp.Config;\n // var general = configuration.generalOptions;\n // var layers = configuration.layersContext;\n //\n // for (var tms in general.tileMatrixSets) {\n // var tileMatrixSet = general.tileMatrixSets[tms];\n // // IGN's WMTS bug : epsg:nnnn instead of EPSG:nnnn\n // var crs = tileMatrixSet.supportedCRS = tileMatrixSet.supportedCRS.replace(/epsg/,\"EPSG\");\n //\n // if (!Geoportal.Catalogue.CRSRESOLUTIONS.hasOwnProperty(crs)) {\n // var p= new OpenLayers.Projection(crs);\n // Geoportal.Catalogue.CRSRESOLUTIONS[crs]= [];\n // var matrixIds= tileMatrixSet.matrixIds;\n // for (var i= 0, li= matrixIds.length; i} params.extent - map current geographical extent (EPSG:4326) : [top, left, bottom, right] = [maxy, minx, miny, maxx]\n * @param {Number} params.zoom - map current zoom\n * @param {String} params.crs - map current projection code (ex \"EPSG:2154\")\n * @param {Boolean} params.visibility - layer visibility\n * @param {Gp.Services.Config.Originator} params.originators - resource originators (from Gp.Config.layers[].originators)\n * @returns {Object} attributions - associative array, mapping originators url (keys) with their properties : html attributions elements\n */\n getAttributions: function getAttributions(params) {\n var zoom = params.zoom;\n var attributions = [];\n if (params.originators != null && params.visibility) {\n // drawLogo = boolean, true if attribution should be displayed (zoom, extent), false otherwise\n var drawLogo;\n for (var j = 0, jl = params.originators.length; j < jl; j++) {\n drawLogo = true;\n var originator = params.originators[j];\n var constraints = params.originators[j].constraints || [];\n for (var k = 0, kl = constraints.length; k < kl; k++) {\n var constraint = constraints[k];\n drawLogo = true;\n var minZoomLevel = this.getZoomLevelFromScaleDenominator(constraint.maxScaleDenominator, params.crs);\n var maxZoomLevel = this.getZoomLevelFromScaleDenominator(constraint.minScaleDenominator, params.crs) || 21;\n\n // min zoom constraints\n if (minZoomLevel && minZoomLevel > zoom) {\n drawLogo = false;\n }\n\n // max zoom constraints\n if (drawLogo && maxZoomLevel && maxZoomLevel < zoom) {\n drawLogo = false;\n }\n\n // bbox constraints\n var bbox = constraint.bbox;\n if (drawLogo && bbox) {\n drawLogo = false;\n var viewExtent = params.extent;\n if (viewExtent) {\n var bounds = [bbox.top, bbox.left, bbox.bottom, bbox.right];\n if (this.intersects(viewExtent, bounds)) {\n // at least one constraint matches the map ones\n drawLogo = true;\n break;\n }\n }\n }\n }\n if (drawLogo) {\n // on a un originator qui correspond au zoom et à l'étendue.\n\n var logo = originator.logo;\n var url = originator.url;\n var name = originator.name ? originator.name : \"\";\n var text = originator.attribution;\n var container = document.createElement(\"div\");\n container.className = \"gp-control-attribution\";\n\n // on crée un lien dans tous les cas (même s'il ne pointe pas vers une référence), pour avoir accès à la class CSS (pour surcharge)\n var link = null;\n link = document.createElement(\"a\");\n link.className = \"gp-control-attribution-link\";\n link.target = \"_blank\";\n container.appendChild(link);\n if (url) {\n link.href = url;\n }\n var bImage = !!logo;\n var image = null;\n // si on a un logo, on l'affiche à l'interieur du lien\n if (bImage) {\n image = document.createElement(\"img\");\n if (link) {\n image.className = \"gp-control-attribution-image\";\n link.appendChild(image);\n } else {\n image.className = \"\";\n container.appendChild(image);\n }\n image.src = logo;\n image.title = text || name;\n image.style.height = \"30px\";\n image.style.width = \"30px\";\n } else {\n // sinon, on affiche le nom de l'originator, ou sa description ou l'url.\n if (name) {\n link.textContent = name;\n } else if (text) {\n link.textContent = text;\n } else if (url) {\n link.textContent = url;\n } else {\n link.textContent = \"\";\n }\n }\n attributions.push(container.innerHTML + \" \");\n }\n }\n }\n return attributions;\n },\n /**\n * Determines if one extent (extent1) intersects another (extent2)\n *\n * @function intersects\n * @param {Array.} extent1 - First extent : [top, left, bottom, right] = [maxy, minx, miny, maxx]\n * @param {Array.} extent2 - Second extent : [top, left, bottom, right] = [maxy, minx, miny, maxx]\n * @return {Boolean} intersects - True if the two extents intersect, false otherwise.\n */\n intersects: function intersects(extent1, extent2) {\n var intersectsX = extent1[1] <= extent2[3] && extent2[1] <= extent1[3];\n var intersectsY = extent1[2] <= extent2[0] && extent2[2] <= extent1[0];\n return intersectsX && intersectsY;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (LayerUtils);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vVXRpbHMvTGF5ZXJVdGlscy5qcz85ZjkxIl0sIm5hbWVzIjpbIkxheWVyVXRpbHMiLCJnZXRab29tTGV2ZWxGcm9tU2NhbGVEZW5vbWluYXRvciIsInNjYWxlRGVub21pbmF0b3IiLCJjcnMiLCJyZXNvbHV0aW9uc05hdGl2ZXMiLCJ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nVnIDogZXBzZzpubm5uIGluc3RlYWQgb2YgRVBTRzpubm5uXG4gICAgICAgIC8vICAgICAgICAgdmFyIGNycyA9IHRpbGVNYXRyaXhTZXQuc3VwcG9ydGVkQ1JTID0gdGlsZU1hdHJpeFNldC5zdXBwb3J0ZWRDUlMucmVwbGFjZSgvZXBzZy8sXCJFUFNHXCIpO1xuICAgICAgICAvL1xuICAgICAgICAvLyAgICAgICAgIGlmICghR2VvcG9ydGFsLkNhdGFsb2d1ZS5DUlNSRVNPTFVUSU9OUy5oYXNPd25Qcm9wZXJ0eShjcnMpKSB7XG4gICAgICAgIC8vICAgICAgICAgICAgIHZhciBwPSBuZXcgT3BlbkxheWVycy5Qcm9qZWN0aW9uKGNycyk7XG4gICAgICAgIC8vICAgICAgICAgICAgIEdlb3BvcnRhbC5DYXRhbG9ndWUuQ1JTUkVTT0xVVElPTlNbY3JzXT0gW107XG4gICAgICAgIC8vICAgICAgICAgICAgIHZhciBtYXRyaXhJZHM9IHRpbGVNYXRyaXhTZXQubWF0cml4SWRzO1xuICAgICAgICAvLyAgICAgICAgICAgICBmb3IgKHZhciBpPSAwLCBsaT0gbWF0cml4SWRzLmxlbmd0aDsgaTxsaTsgKytpKSB7XG4gICAgICAgIC8vICAgICAgICAgICAgICAgICB2YXIgbWlkPSBtYXRyaXhJZHNbaV07XG4gICAgICAgIC8vICAgICAgICAgICAgICAgICBHZW9wb3J0YWwuQ2F0YWxvZ3VlLkNSU1JFU09MVVRJT05TW2Nyc10ucHVzaChcbiAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAwLjAwMDI4Km1pZC5zY2FsZURlbm9taW5hdG9yXG4gICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgLyhPcGVuTGF5ZXJzLk1FVEVSU19QRVJfSU5DSCpPcGVuTGF5ZXJzLklOQ0hFU19QRVJfVU5JVFtwLmdldFVuaXRzKCldKSk7XG4gICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgbWlkLnN1cHBvcn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AgICAgICAvLyAgICAgICAgICAgICBmb3IgKHZhciBpPSAwLCBsZW49IGxsUi5sZW5ndGg7IGk8bGVuOyBpKyspIHtcbiAgICAgICAgLy8gICAgICAgICAgICAgICAgIHZhciBwdD0gbmV3IE9wZW5MYXllcnMuTG9uTGF0KGxsUltpXSwgMCk7XG4gICAgICAgIC8vICAgICAgICAgICAgICAgICBwdC50cmFuc2Zvcm0oT3BlbkxheWVycy5Qcm9qZWN0aW9uLkNSUzg0LCBPcGVuTGF5ZXJzLlByb2plY3Rpb24uV2ViTWVyY2F0b3IpO1xuICAgICAgICAvLyAgICAgICAgICAgICAgICAgd21SW2ldPSBwdC5sb247XG4gICAgICAgIC8vICAgICAgICAgICAgIH1cbiAgICAgICAgLy8gICAgICAgICB9XG4gICAgICAgIC8vICAgICAgICAgR2VvcG9ydGFsLkNhdGFsb2d1ZS5SRVNPTFVUSU9OUz0gd21SO1xuICAgICAgICAvL1xuICAgICAgICAvLyAgICAgICAgIHZhciBnZXRSZXNvbHV0aW9uc0Zyb21DUlM9IGZ1bmN0aW9uKGNycykge1xuICAgICAgICAvLyAgICAgICAgICAgICBpZiAoT3BlbkxheWVycy5Qcm9qZWN0aW9uLldlYk1lcmNhdG9yLmlzQWxpYXNPZihjcnMpKSB7XG4gICAgICAgIC8vICAgICAgICAgICAgICAgICByZXR1cm4gd21SO1xuICAgICAgICAvLyAgICAgICAgICAgICB9XG4gICAgICAgIC8vICAgICAgICAgICAgIGlmIChPcGVuTGF5ZXJzLlByb2plY3Rpb24uQ1JTODQuaXNBbGlhc09mKGNycykpIHtcbiAgICAgICAgLy8gICAgICAgICAgICAgICAgIHJldHVybiBsbFI7XG4gICAgICAgIC8vICAgICAgICAgICAgIH1cbiAgICAgICAgLy8gICAgICAgICAgICAgcmV0dXJuIEdlb3BvcnRhbC5DYXRhbG9ndWUuQ1JTUkVTT0xVVElPTlNbY3JzXT9HZW9wb3J0YWwuQ2F0YWxvZ3VlLkNSU1JFU09MVVRJT05TW2Nyc106bnVsbCA7XG4gICAgICAgIC8vICAgICAgICAgfTtcbiAgICAgICAgLy9cbiAgICAgICAgLy8gICAgICAgICB2YXIgcmV0cmlldmVab29tRnJvbVJlc29sdXRpb249IGZ1bmN0aW9uKHJlc29sdXRpb25zLCByZXNvbHV0aW9uKSB7XG4gICAgICAgIC8vICAgICAgICAgICAgIGZvciAodmFyIGk9IDAsIGxpPSByZXNvbHV0aW9ucy5sZW5ndGg7IGk8bGk7IGkrKykge1xuICAgICAgICAvLyAgICAgICAgICAgICAgICAgaWYgKHJlc29sdXRpb25zW2ldLXJlc29sdXRpb24gPD0gcmVzb2x1dGlvbnNbbGktMV0pIHtcbiAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICByZXR1cm4gaTtcbiAgICAgICAgLy8gICAgICAgICAgICAgICAgIH1cbiAgICAgICAgLy8gICAgICAgICAgICAgfVxuICAgICAgICAvLyAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgIC8vICAgICAgICAgfTtcbiAgICAgICAgLy9cbiAgICAgICAgLy8gICAgICAgICB2YXIgZ2V0Wm9vbUxldmVsRnJvbVNjYWxlRGVub21pbmF0b3I9IGZ1bmN0aW9uKHNjYWxlRGVub21pbmF0b3IsY3JzKSB7XG4gICAgICAgIC8vICAgICAgICAgICAgIHZhciByZXNvbHV0aW9uPSBzY2FsZURlbm9taW5hdG9yICogMC4wMDAyODtcbiAgICAgICAgLy8gICAgICAgICAgICAgdmFyIFI9IGdldFJlc29sdXRpb25zRnJvbUNSUyhjcnMpO1xuICAgICAgICAvLyAgICAgICAgICAgICBpZiAoUikge1xuICAgICAgICAvLyAgICAgICAgICAgICAgICAgcmV0dXJuIHJldHJpZXZlWm9vbUZyb21SZXNvbHV0aW9uKFIscmVzb2x1dGlvbik7XG4gICAgICAgIC8vICAgICAgICAgICAgIH1cbiAgICAgICAgLy8gICAgICAgICAgICAgcmVzb2x1dGlvbj0gcmVzb2x1dGlvbi8oT3BlbkxheWVycy5NRVRFUlNfUEVSX0lOQ0ggKiBPcGVuTGF5ZXJzLklOQ0hFU19QRVJfVU5JVFtcImRlZ3JlZXNcIl0pO1xuICAgICAgICAvLyAgICAgICAgICAgICByZXR1cm4gcmV0cmlldmVab29tRnJvbVJlc29sdXRpb24obGxSLHJlc29sdXRpb24pO1xuICAgICAgICAvLyAgICAgICAgIH07XG4gICAgICAgIC8vXG4gICAgICAgIC8vICAgICAgICAgdmFyIGdldFpvb21MZXZlbEZyb21SZXNvbHV0aW9uPSBmdW5jdGlvbihyZXNvbHV0aW9uLGNycyl7XG4gICAgICAgIC8vICAgICAgICAgICAgIHZhciBSPSBnZXRSZXNvbHV0aW9uc0Zyb21DUlMoY3JzKTtcbiAgICAgICAgLy8gICAgICAgICAgICAgaWYgKFIpIHtcbiAgICAgICAgLy8gICAgICAgICAgICAgICAgIHJldHVybiByZXRyaWV2ZVpvb21Gcm9tUmVzb2x1dGlvbihSLHJlc29sdXRpb24pO1xuICAgICAgICAvLyAgICAgICAgICAgICB9XG4gICAgICAgIC8vICAgICAgICAgICAgIHZhciBwdDA9IG5ldyBPcGVuTGF5ZXJzLkxvbkxhdCgwLCAwKTtcbiAgICAgICAgLy8gICAgICAgICAgICAgdmFyIHB0MT0gbmV3IE9wZW5MYXllcnMuTG9uTGF0KDEsIDApO1xuICAgICAgICAvLyAgICAgICAgICAgICBwdDAudHJhbnNmb3JtKG5ldyBPcGVuTGF5ZXJzLlByb2plY3Rpb24oY3JzKSxPcGVuTGF5ZXJzLlByb2plY3Rpb24uQ1JTODQpO1xuICAgICAgICAvLyAgICAgICAgICAgICBwdDEudHJhbnNmb3JtKG5ldyBPcGVuTGF5ZXJzLlByb2plY3Rpb24oY3JzKSxPcGVuTGF5ZXJzLlByb2plY3Rpb24uQ1JTODQpO1xuICAgICAgICAvLyAgICAgICAgICAgICByZXNvbHV0aW9uPSByZXNvbHV0aW9uKihNYXRoLmFicyhwdDEubG9uLXB0MC5sb24pKTtcbiAgICAgICAgLy8gICAgICAgICAgICAgcmV0dXJuIHJldHJpZXZlWm9vbUZyb21SZXNvbHV0aW9uKGxsUixyZXNvbHV0aW9uKTtcbiAgICAgICAgLy8gICAgICAgICB9O1xuXG4gICAgICAgIC8vIHBhciBkZWZhdXQsIG9uIHV0aWxpc2UgbGEgcHJvamVjdGlvbiBXZWJNZXJjYXRvciAoRVBTRzozODU3ID0gUE0pXG4gICAgICAgIC8vIHNvaXQgbGEgbGlzdGUgZGVzIHJlc29sdXRpb25zIG5hdGl2ZXNcbiAgICAgICAgdmFyIHJlc29sdXRpb25zTmF0aXZlcyA9IHt9O1xuICAgICAgICBzd2l0Y2ggKGNycykge1xuICAgICAgICAgICAgY2FzZSBcIkVQU0c6MjE1NFwiOlxuICAgICAgICAgICAgICAgIHJlc29sdXRpb25zTmF0aXZlcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgMCA6IDEwNDU3OS4yMjQ1NDk4OTQsXG4gICAgICAgICAgICAgICAgICAgIDEgOiA1MjI3Ny41MzIzNTM3OTA1LFxuICAgICAgICAgICAgICAgICAgICAyIDogMjYxMzUuNDg3MDc4NTk1NCxcbiAgICAgICAgICAgICAgICAgICAgMyA6IDEzMDY2Ljg5MTM4MTgsXG4gICAgICAgICAgICAgICAgICAgIDQgOiA2NTMzLjIyODYwNDExMzUsXG4gICAgICAgICAgICAgICAgICAgIDUgOiAzMjY2LjU1OTUyNDQ2MjcsXG4gICAgICAgICAgICAgICAgICAgIDYgOiAxNjMzLjI2NjAwNDU5NzQsXG4gICAgICAgICAgICAgICAgICAgIDcgOiA4MTYuNjI5NTU0OTg2LFxuICAgICAgICAgICAgICAgICAgICA4IDogNDA4LjMxMzkxNDY3NjgsXG4gICAgICAgICAgICAgICAgICAgIDkgOiAyMDQuMTU2NzQxNTEwOSxcbiAgICAgICAgICAgICAgICAgICAgMTAgOiAxMDIuMDc4MzE2NzgzMixcbiAgICAgICAgICAgICAgICAgICAgMTEgOiA1MS4wMzkxNDQ4OTY2LFxuICAgICAgICAgICAgICAgICAgICAxMiA6IDI1LjUxOTU2OTA3NDMsXG4gICAgICAgICAgICAgICAgICAgIDEzIDogMTIuNzU5NzgzNjkzNixcbiAgICAgICAgICAgICAgICAgICAgMTQgOiA2LjM3OTg5MTYzNixcbiAgICAgICAgICAgICAgICAgICAgMTUgOiAzLjE4OTk0NTc2NTMsXG4gICAgICAgICAgICAgICAgICAgIDE2IDogMS41OTQ5NzI4Njk1LFxuICAgICAgICAgICAgICAgICAgICAxNyA6IDAuNzk3NDg2NDMxNSxcbiAgICAgICAgICAgICAgICAgICAgMTggOiAwLjM5ODc0MzIxNDksXG4gICAgICAgICAgICAgICAgICAgIDE5IDogMC4xOTkzNzE2MDczLFxuICAgICAgICAgICAgICAgICAgICAyMCA6IDAuMDk5Njg1ODAzNyxcbiAgICAgICAgICAgICAgICAgICAgMjEgOiAwLjA0OTg0MjkwMThcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXNvbHV0aW9uc05hdGl2ZXMgPSB7XG4gICAgICAgICAgICAgICAgICAgIDAgOiAxNTY1NDMuMDMzOTI4MDQxLFxuICAgICAgICAgICAgICAgICAgICAxIDogNzgyNzEuNTE2OTY0MDIwNDgsXG4gICAgICAgICAgICAgICAgICAgIDIgOiAzOTEzNS43NTg0ODIwMTAyMzUsXG4gICAgICAgICAgICAgICAgICAgIDMgOiAxOTU2Ny44NzkyNDEwMDUxMixcbiAgICAgICAgICAgICAgICAgICAgNCA6IDk3ODMuOTM5NjIwNTAyNTYsXG4gICAgICAgICAgICAgICAgICAgIDUgOiA0ODkxLjk2OTgxMDI1MTI4LFxuICAgICAgICAgICAgICAgICAgICA2IDogMjQ0NS45ODQ5MDUxMjU2NCxcbiAgICAgICAgICAgICAgICAgICAgNyA6IDEyMjIuOTkyNDUyNTYyODIsXG4gICAgICAgICAgICAgICAgICAgIDggOiA2MTEuNDk2MjI2MjgxNDEsXG4gICAgICAgICAgICAgICAgICAgIDkgOiAzMDUuNzQ4MTEzMTQwNzA0OCxcbiAgICAgICAgICAgICAgICAgICAgMTAgOiAxNTIuODc0MDU2NTcwMzUyNSxcbiAgICAgICAgICAgICAgICAgICAgMTEgOiA3Ni40MzcwMjgyODUxNzYyNCxcbiAgICAgICAgICAgICAgICAgICAgMTIgOiAzOC4yMTg1MTQxNDI1ODgxMyxcbiAgICAgICAgICAgICAgICAgICAgMTMgOiAxOS4xMDkyNTcwNzEyOTQwNixcbiAgICAgICAgICAgICAgICAgICAgMTQgOiA5LjU1NDYyODUzNTY0NzAzMixcbiAgICAgICAgICAgICAgICAgICAgMTUgOiA0Ljc3NzMxNDI2NzgyMzUxNixcbiAgICAgICAgICAgICAgICAgICAgMTYgOiAyLjM4ODY1NzEzMzkxMTc1OCxcbiAgICAgICAgICAgICAgICAgICAgMTcgOiAxLjE5NDMyODU2Njk1NTg3OSxcbiAgICAgICAgICAgICAgICAgICAgMTggOiAwLjU5NzE2NDI4MzQ3NzkzOTUsXG4gICAgICAgICAgICAgICAgICAgIDE5IDogMC4yOTg1ODIxNDE3Mzg5Njk3LFxuICAgICAgICAgICAgICAgICAgICAyMCA6IDAuMTQ5MjkxMDcwODY5NDg0OSxcbiAgICAgICAgICAgICAgICAgICAgMjEgOiAwLjA3NDY0NTUzNTQzNDc0MjRcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gZ2VzdGlvbiBkZXMgYXV0cmVzIFNSU1xuICAgICAgICAvLyBUT0RPXG4gICAgICAgIC8vIGlmIChjcnMpIHtcbiAgICAgICAgLy8gfVxuXG4gICAgICAgIHZhciByZXNvbHV0aW9uID0gc2NhbGVEZW5vbWluYXRvciAqIDAuMDAwMjg7XG5cbiAgICAgICAgZm9yICh2YXIgaW5kZXggaW4gcmVzb2x1dGlvbnNOYXRpdmVzKSB7XG4gICAgICAgICAgICBpZiAoc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sZW5ndGg7IGsgPCBrbDsgaysrKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb25zdHJhaW50ID0gY29uc3RyYWludHNba107XG4gICAgICAgICAgICAgICAgICAgIGRyYXdMb2dvID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgICAgICB2YXIgbWluWm9vbUxldmVsID0gdGhpcy5nZXRab29tTGV2ZWxGcm9tU2NhbGVEZW5vbWluYXRvcihjb25zdHJhaW50Lm1heFNjYWxlRGVub21pbmF0b3IsIHBhcmFtcy5jcnMpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbWF4Wm9vbUxldmVsID0gdGhpcy5nZXRab29tTGV2ZWxGcm9tU2NhbGVEZW5vbWluYXRvcihjb25zdHJhaW50Lm1pblNjYWxlRGVub21pbmF0b3IsIHBhcmFtcy5jcnMpIHx8IDIxO1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIG1pbiB6b29tIGNvbnN0cmFpbnRzXG4gICAgICAgICAgICAgICAgICAgIGlmIChtaW5ab29tTGV2ZWwgJiYgKG1pblpvb21MZXZlbCA+IHpvb20pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkcmF3TG9nbyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gbWF4IHpvb20gY29uc3RyYWludHNcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRyYXdMb2dvICYmIG1heFpvb21MZXZlbCAmJiAobWF4Wm9vbUxldmVsIDwgem9vbSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRyYXdMb2dvID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAvLyBiYm94IGNvbnN0cmFpbnRzXG4gICAgICAgICAgICAgICAgICAgIHZhciBiYm94ID0gY29uc3RyYWludC5iYm94O1xuICAgICAgICAgICAgICAgICAgICBpZiAoZHJhd0xvZ28gJiYgYmJveCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZHJhd0xvZ28gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWV3RXh0ZW50ID0gcGFyYW1zLmV4dGVudDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2aWV3RXh0ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IFtiYm94LnRvcCwgYmJveC5sZWZ0LCBiYm94LmJvdHRvbSwgYmJveC5yaWdodF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuaW50ZXJzZWN0cyh2aWV3RXh0ZW50LCBib3VuZHMpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGF0IGxlYXN0IG9uZSBjb25zdHJhaW50IG1hdGNoZXMgdGhlIG1hcCBvbmVzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRyYXdMb2dvID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGRyYXdMb2dvKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIG9uIGEgdW4gb3JpZ2luYXRvciBxdWkgY29ycmVzcG9uZCBhdSB6b29tIGV0IMOgIGwnw6l0ZW5kdWUuXG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIGxvZ28gPSBvcmlnaW5hdG9yLmxvZ287XG4gICAgICAgICAgICAgICAgICAgIHZhciB1cmwgPSBvcmlnaW5hdG9yLnVybDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBvcmlnaW5hdG9yLm5hbWUgPyBvcmlnaW5hdG9yLm5hbWUgOiBcIlwiO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdGV4dCA9IG9yaWdpbmF0b3IuYXR0cmlidXRpb247XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lci5jbGFzc05hbWUgPSBcImdwLWNvbnRyb2wtYXR0cmlidXRpb25cIjtcblxuICAgICAgICAgICAgICAgICAgICAvLyBvbiBjcsOpZSB1biBsaWVuIGRhbnMgdG91cyBsZXMgY2FzIChtw6ptZSBzJ2lsIG5lIHBvaW50ZSBwYXMgdmVycyB1bmUgcsOpZsOpcmVuY2UpLCBwb3VyIGF2b2lyIGFjY8OocyDDoCBsYSBjbGFzcyBDU1MgKHBvdXIgc3VyY2hhcmdlKVxuICAgICAgICAgICAgICAgICAgICB2YXIgbGluayA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIGxpbmsgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiYVwiKTtcbiAgICAgICAgICAgICAgICAgICAgbGluay5jbGFzc05hbWUgPSBcImdwLWNvbnRyb2wtYXR0cmlidXRpb24tbGlua1wiO1xuICAgICAgICAgICAgICAgICAgICBsaW5rLnRhcmdldCA9IFwiX2JsYW5rXCI7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lci5hcHBlbmRDaGlsZChsaW5rKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHVybCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGluay5ocmVmID0gdXJsO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIGJJbWFnZSA9ICEhKGxvZ28pO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaW1hZ2UgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAvLyBzaSBvbiBhIHVuIGxvZ28sIG9uIGwnYWZmaWNoZSDDoCBsJ2ludGVyaWV1ciBkdSBsaWVuXG4gICAgICAgICAgICAgICAgICAgIGlmIChiSW1hZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGltYWdlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImltZ1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsaW5rKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1hZ2UuY2xhc3NOYW1lID0gXCJncC1jb250cm9sLWF0dHJpYnV0aW9uLWltYWdlXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluay5hcHBlbmRDaGlsZChpbWFnZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltYWdlLmNsYXNzTmFtZSA9IFwiXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyLmFwcGVuZENoaWxkKGltYWdlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGltYWdlLnNyYyA9IGxvZ287XG4gICAgICAgICAgICAgICAgICAgICAgICBpbWFnZS50aXRsZSA9IHRleHQgfHwgbmFtZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGltYWdlLnN0eWxlLmhlaWdodCA9IFwiMzBweFwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgaW1hZ2Uuc3R5bGUud2lkdGggPSBcIjMwcHhcIjtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNpbm9uLCBvbiBhZmZpY2hlIGxlIG5vbSBkZSBsJ29yaWdpbmF0b3IsIG91IHNhIGRlc2NyaXB0aW9uIG91IGwndXJsLlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rLnRleHRDb250ZW50ID0gbmFtZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGV4dCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsudGV4dENvbnRlbnQgPSB0ZXh0O1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh1cmwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rLnRleHRDb250ZW50ID0gdXJsO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rLnRleHRDb250ZW50ID0gXCJcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0aW9ucy5wdXNoKGNvbnRhaW5lci5pbm5lckhUTUwgKyBcIiBcIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF0dHJpYnV0aW9ucztcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogRGV0ZXJtaW5lcyBpZiBvbmUgZXh0ZW50IChleHRlbnQxKSBpbnRlcnNlY3RzIGFub3RoZXIgKGV4dGVudDIpXG4gICAgICpcbiAgICAgKiBAZnVuY3Rpb24gaW50ZXJzZWN0c1xuICAgICAqIEBwYXJhbSB7QXJyYXkuPEZsb2F0Pn0gZXh0ZW50MSAtIEZpcnN0IGV4dGVudCA6IFt0b3AsIGxlZnQsIGJvdHRvbSwgcmlnaHRdID0gW21heHksIG1pbngsIG1pbnksIG1heHhdXG4gICAgICogQHBhcmFtIHtBcnJheS48RmxvYXQ+fSBleHRlbnQyIC0gU2Vjb25kIGV4dGVudCA6IFt0b3AsIGxlZnQsIGJvdHRvbSwgcmlnaHRdID0gW21heHksIG1pbngsIG1pbnksIG1heHhdXG4gICAgICogQHJldHVybiB7Qm9vbGVhbn0gaW50ZXJzZWN0cyAtIFRydWUgaWYgdGhlIHR3byBleHRlbnRzIGludGVyc2VjdCwgZmFsc2Ugb3RoZXJ3aXNlLlxuICAgICAqL1xuICAgIGludGVyc2VjdHMgOiBmdW5jdGlvbiAoZXh0ZW50MSwgZXh0ZW50Mikge1xuICAgICAgICB2YXIgaW50ZXJzZWN0c1ggPSAoZXh0ZW50MVsxXSA8PSBleHRlbnQyWzNdKSAmJiAoZXh0ZW50MlsxXSA8PSBleHRlbnQxWzNdKTtcbiAgICAgICAgdmFyIGludGVyc2VjdHNZID0gKGV4dGVudDFbMl0gPD0gZXh0ZW50MlswXSkgJiYgKGV4dGVudDJbMl0gPD0gZXh0ZW50MVswXSk7XG4gICAgICAgIHJldHVybiBpbnRlcnNlY3RzWCAmJiBpbnRlcnNlY3RzWTtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBMYXllclV0aWxzO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/Utils/LayerUtils.js\n"); + +/***/ }), + +/***/ "./src/Common/Utils/LoggerByDefault.js": +/*!*********************************************!*\ + !*** ./src/Common/Utils/LoggerByDefault.js ***! + \*********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var loglevel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! loglevel */ \"./node_modules/loglevel/lib/loglevel.js\");\n/* harmony import */ var loglevel__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(loglevel__WEBPACK_IMPORTED_MODULE_0__);\n\n\n/**\n * @module LoggerByDefault\n * @alias [private] LoggerByDefault\n * @description\n * ...\n *\n * @example\n * getLogger();\n * disableAll();\n * enableAll();\n */\nvar LoggerByDefault = {\n /**\n * creation d'un logger statique\n *\n * @function getLogger\n * @param {String} [name=\"default\"] - the logger name\n * @returns {Object} logger\n */\n getLogger: function getLogger(name) {\n // INFO :\n // à la compilation en mode production, on substitue false\n // avec \"true\", ceci desactive les loggers !\n //\n // à la compilation en mode developpement, on substitue false\n // avec \"false\", ceci permet d'avoir les loggers actifs !\n //\n // lors d'une utilisation en module es6, il n'y a pas de substitution de false,\n // les loggers sont donc actifs par defaut !\n //\n // > Substitute global constants configured at compile time\n // cf. webpack.config.js\n // on masque cette constante afin d'eviter \"referenceerror not defined\"\n \"false\".match(/true/) ? loglevel__WEBPACK_IMPORTED_MODULE_0__[\"disableAll\"]() : loglevel__WEBPACK_IMPORTED_MODULE_0__[\"enableAll\"]();\n var logname = name || \"default\";\n return loglevel__WEBPACK_IMPORTED_MODULE_0__[\"getLogger\"](logname);\n },\n /**\n * desactive tous les loggers\n * @function disableAll\n */\n disableAll: function disableAll() {\n var loggers = loglevel__WEBPACK_IMPORTED_MODULE_0__[\"getLoggers\"]();\n for (var key in loggers) {\n if (Object.hasOwnProperty.call(loggers, key)) {\n var logger = loggers[key];\n logger.disableAll();\n }\n }\n },\n /**\n * active tous les loggers\n * @function enableAll\n */\n enableAll: function enableAll() {\n var loggers = loglevel__WEBPACK_IMPORTED_MODULE_0__[\"getLoggers\"]();\n for (var key in loggers) {\n if (Object.hasOwnProperty.call(loggers, key)) {\n var logger = loggers[key];\n logger.enableAll();\n }\n }\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (LoggerByDefault);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vVXRpbHMvTG9nZ2VyQnlEZWZhdWx0LmpzPzVjOTAiXSwibmFtZXMiOlsiTG9nZ2VyQnlEZWZhdWx0IiwiZ2V0TG9nZ2VyIiwibmFtZSIsIm1hdGNoIiwiTG9nIiwibG9nbmFtZSIsImRpc2FibGVBbGwiLCJsb2dnZXJzIiwia2V5IiwiT2JqZWN0IiwiaGFzT3duUHJvcGVydHkiLCJjYWxsIiwibG9nZ2VyIiwiZW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lKTtcbiAgICB9LFxuICAgIC8qKlxuICAgICAqIGRlc2FjdGl2ZSB0b3VzIGxlcyBsb2dnZXJzXG4gICAgICogQGZ1bmN0aW9uIGRpc2FibGVBbGxcbiAgICAgKi9cbiAgICBkaXNhYmxlQWxsIDogZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgbG9nZ2VycyA9IExvZy5nZXRMb2dnZXJzKCk7XG4gICAgICAgIGZvciAoY29uc3Qga2V5IGluIGxvZ2dlcnMpIHtcbiAgICAgICAgICAgIGlmIChPYmplY3QuaGFzT3duUHJvcGVydHkuY2FsbChsb2dnZXJzLCBrZXkpKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgbG9nZ2VyID0gbG9nZ2Vyc1trZXldO1xuICAgICAgICAgICAgICAgIGxvZ2dlci5kaXNhYmxlQWxsKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9LFxuICAgIC8qKlxuICAgICAqIGFjdGl2ZSB0b3VzIGxlcyBsb2dnZXJzXG4gICAgICogQGZ1bmN0aW9uIGVuYWJsZUFsbFxuICAgICAqL1xuICAgIGVuYWJsZUFsbCA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIGxvZ2dlcnMgPSBMb2cuZ2V0TG9nZ2VycygpO1xuICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBsb2dnZXJzKSB7XG4gICAgICAgICAgICBpZiAoT2JqZWN0Lmhhc093blByb3BlcnR5LmNhbGwobG9nZ2Vycywga2V5KSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGxvZ2dlciA9IGxvZ2dlcnNba2V5XTtcbiAgICAgICAgICAgICAgICBsb2dnZXIuZW5hYmxlQWxsKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBMb2dnZXJCeURlZmF1bHQ7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/Utils/LoggerByDefault.js\n"); + +/***/ }), + +/***/ "./src/Common/Utils/MathUtils.js": +/*!***************************************!*\ + !*** ./src/Common/Utils/MathUtils.js ***! + \***************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n* @module MathUtils\n* @alias Gp.MathUtils\n* @description\n* ...\n*\n* @example\n* modulo();\n* decimalToDMS();\n* toInteger();\n* isInteger();\n* toFloat();\n*/\nvar MathUtils = {\n /**\n * Reste de la division euclidienne\n * @function modulo\n * @param {Number} a - divisor\n * @param {Number} b - quotient\n * @returns {Number} Modulo\n */\n modulo: function modulo(a, b) {\n var r = a % b;\n return r * b < 0 ? r + b : r;\n },\n /**\n * Transform degrees, minutes, seconds form decimal degrees -\n * Largely inspired by the private function degreesToStringHDMS from ol/coordinate.js\n *\n * @function decimalToDMS\n * @param {Number} degrees - decimal degrees\n * @param {Array} hemispheres - \"NS\" ou \"EO\"\n * @param {Number} numDigits - number of digits for seconds\n * @returns {Object} DMS coordinate\n */\n decimalToDMS: function decimalToDMS(degrees, hemispheres, numDigits) {\n var normalizedDegrees = this.modulo(degrees + 180, 360) - 180;\n var x = Math.abs(3600 * normalizedDegrees);\n var dflPrecision = numDigits || 0;\n var precision = Math.pow(10, dflPrecision);\n var deg = Math.floor(x / 3600);\n var min = Math.floor((x - deg * 3600) / 60);\n var sec = x - deg * 3600 - min * 60;\n sec = Math.ceil(sec * precision) / precision;\n if (sec >= 60) {\n sec = 0;\n min += 1;\n }\n if (min >= 60) {\n min = 0;\n deg += 1;\n }\n var direction = hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0);\n return {\n d: deg,\n m: min,\n s: sec,\n direction: direction\n };\n },\n /**\n * Converts string to Integer\n *\n * @function toInteger\n * @param {String} s - string number\n * @param {Numeric} base - between 2 and 36\n * @returns {null|Numeric} result\n */\n toInteger: function toInteger(s, base) {\n var _base = base || 10;\n var n = parseInt(s, _base);\n if (!isNaN(n) && isFinite(n)) {\n return n;\n }\n return null;\n },\n /**\n * check if s represents an integer\n *\n * @function isInteger\n * @param {String} s - string number\n * @returns {Boolean} is integer\n */\n isInteger: function isInteger(s) {\n if (isNaN(s)) {\n return false;\n }\n var v = parseFloat(s);\n return (v | 0) === v;\n },\n /**\n * Converts s to float\n *\n * @function toFloat\n * @param {String} s - string number\n * @returns {null|Numeric} result\n */\n toFloat: function toFloat(s) {\n var n = parseFloat(s);\n if (!isNaN(n) && isFinite(n)) {\n return n;\n }\n return null;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (MathUtils);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vVXRpbHMvTWF0aFV0aWxzLmpzPzIzMWUiXSwibmFtZXMiOlsiTWF0aFV0aWxzIiwibW9kdWxvIiwiYSIsImIiLCJyIiwiZGVjaW1hbFRvRE1TIiwiZGVncmVlcyIsImhlbWlzcGhlcmVzIiwibnVtRGlnaXRzIiwibm9ybWFsaXplZERlZ3JlZXMiLCJ4IiwiTWF0aCIsImFicyIsImRmbFByZWNpc2lvbiIsInByZWNpc2lvbiIsInBvdyIsImRlZyIsImZsb29yIiwibWluIiwic2VjIiwiY2VpbCIsImRpcmVjdGlvbiIsImNoYXJBdCIsImQiLCJtIiwicyIsInRvSW50ZWdlciIsImJhc2UiLCJfYmFzZSIsIm4iLCJwYXJzZUludCIsImlzTmFOIiwiaXNGaW5pdGUiLCJpc0ludGVnZXIiLCJ2IiwicGFyc2VGbG9hdCIsInRvRmxvYXQiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFJQSxTQUFTLEdBQUc7RUFDWjtBQUNKO0FBQ0E7QUF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ZsUHJlY2lzaW9uID0gbnVtRGlnaXRzIHx8IDA7XG4gICAgICAgIHZhciBwcmVjaXNpb24gPSBNYXRoLnBvdygxMCwgZGZsUHJlY2lzaW9uKTtcblxuICAgICAgICB2YXIgZGVnID0gTWF0aC5mbG9vcih4IC8gMzYwMCk7XG4gICAgICAgIHZhciBtaW4gPSBNYXRoLmZsb29yKCh4IC0gZGVnICogMzYwMCkgLyA2MCk7XG4gICAgICAgIHZhciBzZWMgPSB4IC0gKGRlZyAqIDM2MDApIC0gKG1pbiAqIDYwKTtcbiAgICAgICAgc2VjID0gTWF0aC5jZWlsKHNlYyAqIHByZWNpc2lvbikgLyBwcmVjaXNpb247XG5cbiAgICAgICAgaWYgKHNlYyA+PSA2MCkge1xuICAgICAgICAgICAgc2VjID0gMDtcbiAgICAgICAgICAgIG1pbiArPSAxO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1pbiA+PSA2MCkge1xuICAgICAgICAgICAgbWluID0gMDtcbiAgICAgICAgICAgIGRlZyArPSAxO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGRpcmVjdGlvbiA9IGhlbWlzcGhlcmVzLmNoYXJBdChub3JtYWxpemVkRGVncmVlcyA8IDAgPyAxIDogMCk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBkIDogZGVnLFxuICAgICAgICAgICAgbSA6IG1pbixcbiAgICAgICAgICAgIHMgOiBzZWMsXG4gICAgICAgICAgICBkaXJlY3Rpb24gOiBkaXJlY3Rpb25cbiAgICAgICAgfTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogQ29udmVydHMgc3RyaW5nIHRvIEludGVnZXJcbiAgICAgKlxuICAgICAqIEBmdW5jdGlvbiB0b0ludGVnZXJcbiAgICAgKiBAcGFyYW0ge1N0cmluZ30gcyAtIHN0cmluZyBudW1iZXJcbiAgICAgKiBAcGFyYW0ge051bWVyaWN9IGJhc2UgLSBiZXR3ZWVuIDIgYW5kIDM2XG4gICAgICogQHJldHVybnMge251bGx8TnVtZXJpY30gcmVzdWx0XG4gICAgICovXG4gICAgdG9JbnRlZ2VyIDogZnVuY3Rpb24gKHMsIGJhc2UpIHtcbiAgICAgICAgdmFyIF9iYXNlID0gYmFzZSB8fCAxMDtcbiAgICAgICAgdmFyIG4gPSBwYXJzZUludChzLCBfYmFzZSk7XG4gICAgICAgIGlmICghaXNOYU4obikgJiYgaXNGaW5pdGUobikpIHtcbiAgICAgICAgICAgIHJldHVybiBuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBjaGVjayBpZiBzIHJlcHJlc2VudHMgYW4gaW50ZWdlclxuICAgICAqXG4gICAgICogQGZ1bmN0aW9uIGlzSW50ZWdlclxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBzIC0gc3RyaW5nIG51bWJlclxuICAgICAqIEByZXR1cm5zIHtCb29sZWFufSBpcyBpbnRlZ2VyXG4gICAgICovXG4gICAgaXNJbnRlZ2VyIDogZnVuY3Rpb24gKHMpIHtcbiAgICAgICAgaWYgKGlzTmFOKHMpKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdiA9IHBhcnNlRmxvYXQocyk7XG4gICAgICAgIHJldHVybiAoKHYgfCAwKSA9PT0gdik7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIENvbnZlcnRzIHMgdG8gZmxvYXRcbiAgICAgKlxuICAgICAqIEBmdW5jdGlvbiB0b0Zsb2F0XG4gICAgICogQHBhcmFtIHtTdHJpbmd9IHMgLSBzdHJpbmcgbnVtYmVyXG4gICAgICogQHJldHVybnMge251bGx8TnVtZXJpY30gcmVzdWx0XG4gICAgICovXG4gICAgdG9GbG9hdCA6IGZ1bmN0aW9uIChzKSB7XG4gICAgICAgIHZhciBuID0gcGFyc2VGbG9hdChzKTtcbiAgICAgICAgaWYgKCFpc05hTihuKSAmJiBpc0Zpbml0ZShuKSkge1xuICAgICAgICAgICAgcmV0dXJuIG47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgTWF0aFV0aWxzO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/Utils/MathUtils.js\n"); + +/***/ }), + +/***/ "./src/Common/Utils/ProxyUtils.js": +/*!****************************************!*\ + !*** ./src/Common/Utils/ProxyUtils.js ***! + \****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n\n\n/**\n* @module ProxyUtils\n* @alias Gp.ProxyUtils\n* @description\n* ...\n*\n* @example\n* proxifyUrl();\n*/\nvar ProxyUtils = {\n /**\n * Ajoute un proxy aux url des couches vecteurs si besoin.\n *\n * @function proxifyUrl\n * @param {String} url - Url to proxify.\n * @param {Object} [proxyOptions] - Object defining proxy options.\n * @param {String} proxyOptions.proxyUrl - Proxy URL.\n * @param {Array.} [proxyOptions.noProxyDomains] - Proxy will not be used for this list of domain names.\n *\n * @returns {String} proxy url\n */\n proxifyUrl: function proxifyUrl(url, proxyOptions) {\n // logger\n\n var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"proxifyUrl\");\n if (!proxyOptions || !proxyOptions.hasOwnProperty(\"proxyUrl\") || proxyOptions.proxyUrl === null || proxyOptions.proxyUrl.trim().length === 0) {\n return url;\n }\n // on regarde si l'url nest pas dans les domaines sans proxy\n if (proxyOptions.noProxyDomains && Array.isArray(proxyOptions.noProxyDomains) && proxyOptions.noProxyDomains.length > 0) {\n for (var i in proxyOptions.noProxyDomains) {\n logger.trace(\"[ProxyUtils] proxifyUrl : analyzing \" + proxyOptions.noProxyDomains[i]);\n if (url.indexOf(proxyOptions.noProxyDomains[i]) !== -1) {\n logger.info(\"[ProxyUtils] proxifyUrl : \" + url + \" found in noProxyDomains list (\" + proxyOptions.noProxyDomains[i] + \").\");\n return url;\n }\n }\n }\n return proxyOptions.proxyUrl + encodeURIComponent(url);\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ProxyUtils);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vVXRpbHMvUHJveHlVdGlscy5qcz8wYmY1Il0sIm5hbWVzIjpbIlByb3h5VXRpbHMiLCJwcm94aWZ5VXJsIiwidXJsIiwicHJveHlPcHRpb25zIiwibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiaGFzT3duUHJvcGVydHkiLCJwcm94eVVybCIsInRyaW0iLCJsZW5ndGgiLCJub1Byb3h5RG9tYWlucyIsIkFycmF5IiwiaXNBcnJheSIsImkiLCJ0cmFjZSIsImluZGV4T2YiLCJpbmZvIiwiZW5jb2RlVVJJQ29tcG9uZW50Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQXdEOztBQUV4RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFJQSxVQUFVLEdBQUc7RUFDYjtBQUNKO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0VBQ0lDLFVBQVUsRUFBRyxTQUFBQSxXQUFVQyxHQUFHLEVBQUVDLFlBQVksRUFBRTtJQUN0Qzs7SUFFQSxJQUFJQyxNQUFNLEdBQUdDLHFFQUFNLENBQUNDLFNBQVMsQ0FBQyxZQUFZLENBQUM7SUFFM0MsSUFBSSxDQUF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cm94eU9wdGlvbnMgfHxcbiAgICAgICAgICAgICFwcm94eU9wdGlvbnMuaGFzT3duUHJvcGVydHkoXCJwcm94eVVybFwiKSB8fFxuICAgICAgICAgICAgcHJveHlPcHRpb25zLnByb3h5VXJsID09PSBudWxsIHx8XG4gICAgICAgICAgICBwcm94eU9wdGlvbnMucHJveHlVcmwudHJpbSgpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIHVybDtcbiAgICAgICAgfVxuICAgICAgICAvLyBvbiByZWdhcmRlIHNpIGwndXJsIG5lc3QgcGFzIGRhbnMgbGVzIGRvbWFpbmVzIHNhbnMgcHJveHlcbiAgICAgICAgaWYgKHByb3h5T3B0aW9ucy5ub1Byb3h5RG9tYWlucyAmJlxuICAgICAgICAgICAgQXJyYXkuaXNBcnJheShwcm94eU9wdGlvbnMubm9Qcm94eURvbWFpbnMpICYmXG4gICAgICAgICAgICBwcm94eU9wdGlvbnMubm9Qcm94eURvbWFpbnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgZm9yICh2YXIgaSBpbiBwcm94eU9wdGlvbnMubm9Qcm94eURvbWFpbnMpIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJbUHJveHlVdGlsc10gcHJveGlmeVVybCA6IGFuYWx5emluZyBcIiArIHByb3h5T3B0aW9ucy5ub1Byb3h5RG9tYWluc1tpXSk7XG4gICAgICAgICAgICAgICAgaWYgKHVybC5pbmRleE9mKHByb3h5T3B0aW9ucy5ub1Byb3h5RG9tYWluc1tpXSkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZ2dlci5pbmZvKFwiW1Byb3h5VXRpbHNdIHByb3hpZnlVcmwgOiBcIiArIHVybCArIFwiIGZvdW5kIGluIG5vUHJveHlEb21haW5zIGxpc3QgKFwiICsgcHJveHlPcHRpb25zLm5vUHJveHlEb21haW5zW2ldICsgXCIpLlwiKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHByb3h5T3B0aW9ucy5wcm94eVVybCArIGVuY29kZVVSSUNvbXBvbmVudCh1cmwpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IFByb3h5VXRpbHM7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Common/Utils/ProxyUtils.js\n"); + +/***/ }), + +/***/ "./src/Common/Utils/Register.js": +/*!**************************************!*\ + !*** ./src/Common/Utils/Register.js ***! + \**************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * @module Register\n * @alias [private] Register\n * @description\n * Register definition for IGNF, and EPSG CRS.\n *\n * @example\n * Gp.Register.IGNF.AMST63\n * // return : \"+title=Amsterdam 1963 +proj=geocent +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\"\n * Gp.Register.get(\"IGNF:AMST63\")\n * // same as Gp.Register.IGNF.AMST63\n */\nvar Register = {\n /**\n * instance already loaded into proj4\n */\n isLoaded: false,\n /**\n * get the definition for a code\n *\n * @function get\n * @param {String} name - ie. EPSG:2154 (Lambert)\n * @returns {Object} definition\n * @example\n * Register.get(\"EPSG:2154\");\n * // \"+title=RGF93 / Lambert-93 +proj=lcc +lat_1=49 ...\"\n */\n get: function get(name) {\n if (name === \"\" || name === null || typeof name === \"undefined\") {\n return;\n }\n var s = name.split(\":\");\n if (s.length !== 2) {\n return;\n }\n var _register = s[0];\n var _code = s[1];\n if (!this.hasOwnProperty(_register)) {\n return;\n }\n if (!this[_register].hasOwnProperty(_code)) {\n return;\n }\n return this[_register][_code];\n },\n /**\n * does projection code exist ?\n *\n * @function exist\n * @param {String} name - ie. EPSG:2154 (Lambert)\n * @returns {Boolean} true/false\n * @example\n * Register.exist(\"EPSG:2154\"); // true\n */\n exist: function exist(name) {\n if (name === \"\" || name === null || typeof name === \"undefined\") {\n return false;\n }\n var s = name.split(\":\");\n if (s.length !== 2) {\n return false;\n }\n var _register = s[0];\n var _code = s[1];\n if (!this.hasOwnProperty(_register)) {\n return false;\n }\n if (!this[_register].hasOwnProperty(_code)) {\n return false;\n }\n return true;\n },\n /**\n * load all defs to proj4\n * @function load\n * @param {Object} Proj4 - proj4 instance\n */\n load: function load(Proj4) {\n // un flag pour savoir si le chargement est déjà realisé\n // (car ceci peut être couteux !)\n if (!this.isLoaded) {\n var registers = [\"IGNF\",\n // exception lors du register IGNF ?\n \"EPSG\", \"CRS\"];\n for (var i = 0; i < registers.length; i++) {\n var _register = registers[i];\n var codes = this[_register];\n for (var _code in codes) {\n if (codes.hasOwnProperty(_code)) {\n var name = _register + \":\" + _code;\n Proj4.defs(name, this.get(name));\n // on enlève la dependance à OpenLayers...\n // la fonction register est donc à appeller afin d'enregistrer\n // les definitions dans OpenLayers :\n // import { get } from \"ol/proj\";\n // import proj4 from \"proj4\";\n // import { register } from \"ol/proj/proj4\";\n // Register.load();\n // // Make projections defined in proj4 (with proj4.defs()) available in OpenLayers.\n // // see ol/proj/proj4.register (https://openlayers.org/en/latest/apidoc/module-ol_proj_proj4.html)\n // register(proj4);\n // console.log(get(\"CRS:84\").getCode()); // \"CRS:84\"\n }\n }\n }\n /** ts-syntax */\n this.isLoaded = true;\n }\n },\n /**\n * load defs by default to proj4\n *\n * include into proj4 :\n * - WGS84\n * - ['EPSG:4326']\n * - ['EPSG:3785'], ['EPSG:3857'], GOOGLE, ['EPSG:900913'], ['EPSG:102113']\n * +\n * - [\"EPSG:2154\"], [\"EPSG:27571\"], [\"EPSG:27572\"], [\"EPSG:27573\"], [\"EPSG:2757\"],\n * - [\"CRS:84\"],\n * - [\"IGNF:LAMB93\"],\n * - [\"IGNF:LAMBE\"], [\"IGNF:LAMB1\"], [\"IGNF:LAMB2\"], [\"IGNF:LAMB3\"], [\"IGNF:LAMB4\"],\n * - [\"IGNF:RGF93G\"],\n * - [\"IGNF:WGS84G\"]\n *\n * @function loadByDefault\n * @param {Object} Proj4 - proj4 instance\n */\n loadByDefault: function loadByDefault(Proj4) {\n // la liste de projections par defaut...\n var registers = {\n EPSG: {\n 2154: Register[\"EPSG\"][\"2154\"],\n 27571: Register[\"EPSG\"][\"27571\"],\n 27572: Register[\"EPSG\"][\"27572\"],\n 27573: Register[\"EPSG\"][\"27573\"],\n 27574: Register[\"EPSG\"][\"27574\"]\n },\n CRS: {\n 84: Register[\"CRS\"][\"84\"]\n },\n IGNF: {\n LAMB93: Register[\"IGNF\"][\"LAMB93\"],\n LAMBE: Register[\"IGNF\"][\"LAMBE\"],\n LAMB1: Register[\"IGNF\"][\"LAMB1\"],\n LAMB2: Register[\"IGNF\"][\"LAMB2\"],\n LAMB3: Register[\"IGNF\"][\"LAMB3\"],\n LAMB4: Register[\"IGNF\"][\"LAMB4\"],\n RGF93G: Register[\"IGNF\"][\"RGF93G\"],\n WGS84G: Register[\"IGNF\"][\"WGS84G\"]\n }\n };\n for (var register in registers) {\n if (registers.hasOwnProperty(register)) {\n var codes = registers[register];\n for (var code in codes) {\n if (codes.hasOwnProperty(code)) {\n var name = register + \":\" + code;\n Proj4.defs(name, codes[code]);\n }\n }\n }\n }\n },\n /**\n * load only a def to proj4\n *\n * @function loadByName\n * @param {Object} Proj4 - proj4 instance\n * @param {String} name - ie. EPSG:2154 (Lambert)\n * @returns {Boolean} true/false\n */\n loadByName: function loadByName(Proj4, name) {\n if (!this.exist(name)) {\n return false;\n }\n try {\n Proj4.defs(name, this.get(name));\n } catch (e) {\n // FIXME message !?\n return false;\n }\n return true;\n },\n /**\n * definitions EPSG\n * @enum\n */\n EPSG: {\n 4978: \"+proj=geocent +datum=WGS84 +units=m +no_defs \",\n 3857: \"+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs\",\n 3785: \"+title=WGS 84 / Pseudo-Mercator (deprecated) +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs\",\n 4149: \"+title=CH1903 +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs \",\n 4150: \"+title=CH1903plus +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs \",\n 4151: \"+title=CHTRF95 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs \",\n 4171: \"+title=RGF93 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs \",\n 4230: \"+title=ED50 +proj=longlat +ellps=intl +no_defs \",\n 4235: \"+title=Guyane Francaise +proj=longlat +ellps=intl +no_defs \",\n 4258: \"+title=ETRS89 +proj=longlat +ellps=GRS80 +no_defs \",\n 4275: \"+title=NTF +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +no_defs \",\n 4322: \"+title=WGS 72 +proj=longlat +ellps=WGS72 +no_defs \",\n 4326: \"+title=WGS 84 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs \",\n 4467: \"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 4470: \"+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs \",\n 4471: \"+proj=utm +zone=38 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 4474: \"+proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs \",\n 4558: \"+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs \",\n 4559: \"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 4621: \"+title=Fort Marigot +proj=longlat +ellps=intl +towgs84=137,248,-430,0,0,0,0 +no_defs \",\n 4622: \"+title=Guadeloupe 1948 +proj=longlat +ellps=intl +no_defs \",\n 4623: \"+title=CSG67 +proj=longlat +ellps=intl +towgs84=-186,230,110,0,0,0,0 +no_defs \",\n 4624: \"+title=RGFG95 +proj=longlat +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +no_defs \",\n 4625: \"+title=Martinique 1938 +proj=longlat +ellps=intl +no_defs \",\n 4626: \"+title=Reunion 1947 +proj=longlat +ellps=intl +no_defs \",\n 4627: \"+title=RGR92 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs \",\n 4628: \"+title=Tahiti 52 +proj=longlat +ellps=intl +towgs84=162,117,154,0,0,0,0 +no_defs \",\n 4629: \"+title=Tahaa 54 +proj=longlat +ellps=intl +no_defs \",\n 4630: \"+title=IGN72 Nuku Hiva +proj=longlat +ellps=intl +no_defs \",\n 4632: \"+title=Combani 1950 +proj=longlat +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +no_defs \",\n 4633: \"+title=IGN56 Lifou +proj=longlat +ellps=intl +no_defs \",\n 4634: \"+title=IGN72 Grand Terre +proj=longlat +ellps=intl +no_defs \",\n 4637: \"+title=Perroud 1950 +proj=longlat +ellps=intl +towgs84=325,154,172,0,0,0,0 +no_defs \",\n 4638: \"+title=Saint Pierre et Miquelon 1950 +proj=longlat +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +no_defs \",\n 4640: \"+title=RRAF 1991 +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs \",\n 4641: \"+title=IGN53 Mare +proj=longlat +ellps=intl +no_defs \",\n 4645: \"+title=RGNC 1991 +proj=longlat +ellps=intl +towgs84=0,0,0,0,0,0,0 +no_defs \",\n 4687: \"+proj=longlat +ellps=GRS80 +no_defs \",\n 4662: \"+title=IGN72 Grande Terre +proj=longlat +ellps=intl +no_defs \",\n 4689: \"+title=IGN63 Hiva Oa +proj=longlat +ellps=intl +no_defs \",\n 4690: \"+title=Tahiti 79 +proj=longlat +ellps=intl +no_defs \",\n 4691: \"+title=Moorea 87 +proj=longlat +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +no_defs \",\n 4692: \"+title=Maupiti 83 +proj=longlat +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +no_defs \",\n 4698: \"+title=IGN 1962 Kerguelen +proj=longlat +ellps=intl +towgs84=145,-187,103,0,0,0,0 +no_defs \",\n 4749: \"+title=RGNC91-93 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs \",\n 4750: \"+title=ST87 Ouvea +proj=longlat +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +no_defs \",\n 4807: \"+title=NTF (Paris) +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +no_defs \",\n 2056: \"+title=CH1903+ / LV95 +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs \",\n 2154: \"+title=RGF93 / Lambert-93 +proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 2213: \"+title=ETRS89 / TM 30 NE +proj=tmerc +lat_0=0 +lon_0=30 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs \",\n 2969: \"+title=Fort Marigot / UTM zone 20N +proj=utm +zone=20 +ellps=intl +towgs84=137,248,-430,0,0,0,0 +units=m +no_defs \",\n 2970: \"+title=Guadeloupe 1948 / UTM zone 20N +proj=utm +zone=20 +ellps=intl +units=m +no_defs \",\n 2971: \"+title=CSG67 / UTM zone 22N +proj=utm +zone=22 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs \",\n 2972: \"+title=RGFG95 / UTM zone 22N +proj=utm +zone=22 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs \",\n 2973: \"+title=Martinique 1938 / UTM zone 20N +proj=utm +zone=20 +ellps=intl +units=m +no_defs \",\n 2975: \"+title=RGR92 / UTM zone 40S +proj=utm +zone=40 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 2976: \"+title=Tahiti 52 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +towgs84=162,117,154,0,0,0,0 +units=m +no_defs \",\n 2977: \"+title=Tahaa 54 / UTM zone 5S +proj=utm +zone=5 +south +ellps=intl +units=m +no_defs \",\n 2978: \"+title=IGN72 Nuku Hiva / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +units=m +no_defs \",\n 2980: \"+title=Combani 1950 / UTM zone 38S +proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs \",\n 2981: \"+title=IGN56 Lifou / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs \",\n 2982: \"+title=IGN72 Grand Terre / UTM zone 58S (deprecated) +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs \",\n 2984: \"+title=RGNC 1991 / Lambert New Caledonia (deprecated) +proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=intl +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 2986: \"+title=Terre Adelie 1950 +proj=stere +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +lat_0=-90.000000000 +lon_0=140.000000000 +lat_ts=-67.000000000 +k=0.96027295 +x_0=300000.000 +y_0=-2299363.482 +units=m +no_defs\",\n 2987: \"+title=Saint Pierre et Miquelon 1950 / UTM zone 21N +proj=utm +zone=21 +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +units=m +no_defs \",\n 2989: \"+title=RRAF 1991 / UTM zone 20N +proj=utm +zone=20 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 2990: \"+title=Reunion 1947 / TM Reunion (deprecated) +proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=50000 +y_0=160000 +ellps=intl +units=m +no_defs \",\n 2995: \"+title=IGN53 Mare / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs \",\n 3038: \"+proj=utm +zone=26 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3039: \"+proj=utm +zone=27 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3040: \"+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3041: \"+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n // 3042 : \"+proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n // 3043 : \"+proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n // 3044 : \"+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3045: \"+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3046: \"+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3047: \"+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3048: \"+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3049: \"+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3050: \"+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3051: \"+proj=utm +zone=39 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3034: \"+title=ETRS89 / ETRS-LCC +proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +units=m +no_defs \",\n 3035: \"+title=ETRS89 / ETRS-LAEA +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs \",\n 3042: \"+title=ETRS89 / ETRS-TM30 +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs \",\n 3043: \"+title=ETRS89 / ETRS-TM31 +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs \",\n 3044: \"+title=ETRS89 / ETRS-TM32 +proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs \",\n 25828: \"+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 25829: \"+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n // 25830 : \"+proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n // 25831 : \"+proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n // 25832 : \"+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 25833: \"+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 25834: \"+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 25835: \"+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 25836: \"+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 25837: \"+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 25838: \"+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3060: \"+title=IGN72 Grande Terre / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs \",\n 3163: \"+title=RGNC91-93 / Lambert New Caledonia +proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3164: \"+title=ST87 Ouvea / UTM zone 58S +proj=utm +zone=58 +south +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +units=m +no_defs \",\n 3165: \"+title=NEA74 Noumea / Noumea Lambert +proj=lcc +lat_1=-22.24469175 +lat_2=-22.29469175 +lat_0=-22.26969175 +lon_0=166.44242575 +x_0=0.66 +y_0=1.02 +ellps=intl +units=m +no_defs \",\n 3166: \"+title=NEA74 Noumea / Noumea Lambert 2 +proj=lcc +lat_1=-22.24472222222222 +lat_2=-22.29472222222222 +lat_0=-22.26972222222222 +lon_0=166.4425 +x_0=8.313000000000001 +y_0=-2.354 +ellps=intl +units=m +no_defs \",\n 3169: \"+title=RGNC91-93 / UTM zone 57S +proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3170: \"+title=RGNC91-93 / UTM zone 58S +proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3171: \"+title=RGNC91-93 / UTM zone 59S +proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs \",\n 3172: \"+title=IGN53 Mare / UTM zone 59S +proj=utm +zone=59 +south +ellps=intl +units=m +no_defs \",\n 3296: \"+title=RGPF / UTM zone 5S +proj=utm +zone=5 +south +ellps=GRS80 +units=m +no_defs \",\n 3297: \"+title=RGPF / UTM zone 6S +proj=utm +zone=6 +south +ellps=GRS80 +units=m +no_defs \",\n 3298: \"+title=RGPF / UTM zone 7S +proj=utm +zone=7 +south +ellps=GRS80 +units=m +no_defs \",\n 3299: \"+title=RGPF / UTM zone 8S +proj=utm +zone=8 +south +ellps=GRS80 +units=m +no_defs \",\n 3302: \"+title=IGN63 Hiva Oa / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +units=m +no_defs \",\n 3303: \"+title=Fatu Iva 72 / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +towgs84=347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074 +units=m +no_defs \",\n 3304: \"+title=Tahiti 79 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +units=m +no_defs \",\n 3305: \"+title=Moorea 87 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +units=m +no_defs \",\n 3306: \"+title=Maupiti 83 / UTM zone 5S +proj=utm +zone=5 +south +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +units=m +no_defs \",\n 3312: \"+title=CSG67 / UTM zone 21N +proj=utm +zone=21 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs \",\n 3313: \"+title=RGFG95 / UTM zone 21N +proj=utm +zone=21 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs \",\n 3336: \"+title=IGN 1962 Kerguelen / UTM zone 42S +proj=utm +zone=42 +south +ellps=intl +towgs84=145,-187,103,0,0,0,0 +units=m +no_defs \",\n 3395: \"+title=WGS 84 / World Mercator +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 3727: \"+title=Reunion 1947 / TM Reunion +proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=160000 +y_0=50000 +ellps=intl +units=m +no_defs \",\n 21781: \"+title=CH1903 / LV03 +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs \",\n 25830: \"+title=ETRS89 / UTM zone 30N +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs \",\n 25831: \"+title=ETRS89 / UTM zone 31N +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs \",\n 25832: \"+title=ETRS89 / UTM zone 32N +proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs \",\n 27561: \"+title=NTF (Paris) / Lambert Nord France +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27562: \"+title=NTF (Paris) / Lambert Centre France +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27563: \"+title=NTF (Paris) / Lambert Sud France +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27564: \"+title=NTF (Paris) / Lambert Corse +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27571: \"+title=NTF (Paris) / Lambert zone I +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27572: \"+title=NTF (Paris) / Lambert zone II +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27573: \"+title=NTF (Paris) / Lambert zone III +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27574: \"+title=NTF (Paris) / Lambert zone IV +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27581: \"+title=NTF (Paris) / France I (deprecated) +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27582: \"+title=NTF (Paris) / France II (deprecated) +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27583: \"+title=NTF (Paris) / France III (deprecated) +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27584: \"+title=NTF (Paris) / France IV (deprecated) +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27591: \"+title=NTF (Paris) / Nord France (deprecated) +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27592: \"+title=NTF (Paris) / Centre France (deprecated) +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27593: \"+title=NTF (Paris) / Sud France (deprecated) +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 27594: \"+title=NTF (Paris) / Corse (deprecated) +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs \",\n 32601: \"+proj=utm +zone=1 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32602: \"+proj=utm +zone=2 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32603: \"+proj=utm +zone=3 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32604: \"+proj=utm +zone=4 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32605: \"+proj=utm +zone=5 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32606: \"+proj=utm +zone=6 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32607: \"+proj=utm +zone=7 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32608: \"+proj=utm +zone=8 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32609: \"+proj=utm +zone=9 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32610: \"+proj=utm +zone=10 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32611: \"+proj=utm +zone=11 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32612: \"+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32613: \"+proj=utm +zone=13 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32614: \"+proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32615: \"+proj=utm +zone=15 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32616: \"+proj=utm +zone=16 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32617: \"+proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32618: \"+proj=utm +zone=18 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32619: \"+proj=utm +zone=19 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32620: \"+proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32621: \"+proj=utm +zone=21 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32622: \"+proj=utm +zone=22 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32623: \"+proj=utm +zone=23 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32624: \"+proj=utm +zone=24 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32625: \"+proj=utm +zone=25 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32626: \"+proj=utm +zone=26 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32627: \"+proj=utm +zone=27 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32628: \"+proj=utm +zone=28 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32629: \"+proj=utm +zone=29 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32630: \"+proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32631: \"+proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32632: \"+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32633: \"+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32634: \"+proj=utm +zone=34 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32635: \"+proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32636: \"+proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32637: \"+proj=utm +zone=37 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32638: \"+proj=utm +zone=38 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32639: \"+proj=utm +zone=39 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32640: \"+proj=utm +zone=40 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32641: \"+proj=utm +zone=41 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32642: \"+proj=utm +zone=42 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32643: \"+proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32644: \"+proj=utm +zone=44 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32645: \"+proj=utm +zone=45 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32646: \"+proj=utm +zone=46 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32647: \"+proj=utm +zone=47 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32648: \"+proj=utm +zone=48 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32649: \"+proj=utm +zone=49 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32650: \"+proj=utm +zone=50 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32651: \"+proj=utm +zone=51 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32652: \"+proj=utm +zone=52 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32653: \"+proj=utm +zone=53 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32654: \"+proj=utm +zone=54 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32655: \"+proj=utm +zone=55 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32656: \"+proj=utm +zone=56 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32657: \"+proj=utm +zone=57 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32658: \"+proj=utm +zone=58 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32659: \"+proj=utm +zone=59 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32660: \"+proj=utm +zone=60 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32661: \"+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32662: \"+title=WGS 84 / Plate Carree +proj=eqc +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32701: \"+proj=utm +zone=1 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32702: \"+proj=utm +zone=2 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32703: \"+proj=utm +zone=3 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32704: \"+proj=utm +zone=4 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32705: \"+proj=utm +zone=5 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32706: \"+proj=utm +zone=6 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32707: \"+proj=utm +zone=7 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32708: \"+proj=utm +zone=8 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32709: \"+proj=utm +zone=9 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32710: \"+proj=utm +zone=10 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32711: \"+proj=utm +zone=11 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32712: \"+proj=utm +zone=12 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32713: \"+proj=utm +zone=13 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32714: \"+proj=utm +zone=14 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32715: \"+proj=utm +zone=15 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32716: \"+proj=utm +zone=16 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32717: \"+proj=utm +zone=17 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32718: \"+proj=utm +zone=18 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32719: \"+proj=utm +zone=19 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32720: \"+proj=utm +zone=20 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32721: \"+proj=utm +zone=21 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32722: \"+proj=utm +zone=22 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32723: \"+proj=utm +zone=23 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32724: \"+proj=utm +zone=24 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32725: \"+proj=utm +zone=25 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32726: \"+proj=utm +zone=26 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32727: \"+proj=utm +zone=27 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32728: \"+proj=utm +zone=28 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32729: \"+proj=utm +zone=29 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32730: \"+proj=utm +zone=30 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32731: \"+proj=utm +zone=31 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32732: \"+proj=utm +zone=32 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32733: \"+proj=utm +zone=33 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32734: \"+proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32735: \"+proj=utm +zone=35 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32736: \"+proj=utm +zone=36 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32737: \"+proj=utm +zone=37 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32738: \"+proj=utm +zone=38 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32739: \"+proj=utm +zone=39 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32740: \"+proj=utm +zone=40 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32741: \"+proj=utm +zone=41 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32742: \"+proj=utm +zone=42 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32743: \"+proj=utm +zone=43 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32744: \"+proj=utm +zone=44 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32745: \"+proj=utm +zone=45 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32746: \"+proj=utm +zone=46 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32747: \"+proj=utm +zone=47 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32748: \"+proj=utm +zone=48 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32749: \"+proj=utm +zone=49 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32750: \"+proj=utm +zone=50 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32751: \"+proj=utm +zone=51 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32752: \"+proj=utm +zone=52 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32753: \"+proj=utm +zone=53 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32754: \"+proj=utm +zone=54 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32755: \"+proj=utm +zone=55 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32756: \"+proj=utm +zone=56 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32757: \"+proj=utm +zone=57 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32758: \"+proj=utm +zone=58 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32759: \"+proj=utm +zone=59 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32760: \"+proj=utm +zone=60 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 32761: \"+proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs \",\n 310024802: \"+title=Geoportail - France metropolitaine +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=46.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 310915814: \"+title=Geoportail - Antilles francaises +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 310486805: \"+title=Geoportail - Guyane +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=4.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 310700806: \"+title=Geoportail - Reunion et dependances +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-21.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 310702807: \"+title=Geoportail - Mayotte +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-12.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 310706808: \"+title=Geoportail - Saint-Pierre et Miquelon +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=47.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 310547809: \"+title=Geoportail - Nouvelle-Caledonie +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-22.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 310642810: \"+title=Geoportail - Wallis et Futuna +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-14.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 310032811: \"+title=Geoportail - Polynesie francaise +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 310642812: \"+title=Geoportail - Kerguelen +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-49.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 310642801: \"+title=Geoportail - Crozet +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-46.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 310642813: \"+title=Geoportail - Amsterdam et Saint-Paul +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-38.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 310642901: \"+title=Geoportail - Monde +proj=mill +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lon_0=0.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n 5489: \"+title=RGAF09 geographiques (dms) +proj=longlat +nadgrids=@null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137 +rf=298.257222101 +units=m +no_defs\",\n 5490: \"+title=RGAF09 UTM Nord Fuseau 20 +proj=tmerc +nadgrids=@null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137 +rf=298.257222101 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\"\n },\n /**\n * definitions CRS\n * @enum\n */\n CRS: {\n 84: \"+title=WGS 84 longitude-latitude +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs \"\n },\n /**\n * definitions IGNF\n * @enum\n */\n IGNF: {\n AMST63: \"+title=Amsterdam 1963 +proj=geocent +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n CROZ63: \"+title=Crozet 1963 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n CSG67: \"+title=Guyane CSG67 +proj=geocent +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n ED50: \"+title=ED50 +proj=geocent +towgs84=-84.0000,-97.0000,-117.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n ETRS89: \"+title=Systeme de reference terrestre Europeen (1989) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n GUAD48: \"+title=Guadeloupe Ste Anne +proj=geocent +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n GUADFM49: \"+title=Guadeloupe Fort Marigot +proj=geocent +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n IGN63: \"+title=IGN 1963 (Hiva Oa, Tahuata, Mohotani) +proj=geocent +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n IGN72: \"+title=IGN 1972 Grande-Terre / Ile des Pins +proj=geocent +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n KERG62CAR: \"+title=Kerguelen - K0 +proj=geocent +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n MART38: \"+title=Martinique Fort-Desaix +proj=geocent +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n MAYO50: \"+title=Mayotte Combani +proj=geocent +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n MOOREA87: \"+title=Moorea 1987 +proj=geocent +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n NTF: \"+title=Nouvelle Triangulation Francaise +proj=geocent +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +units=m +no_defs\",\n NUKU72: \"+title=IGN 1972 Nuku Hiva +proj=geocent +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n REUN47: \"+title=Reunion 1947 +proj=geocent +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n RGF93: \"+title=Reseau geodesique francais 1993 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGFG95: \"+title=Reseau geodesique francais de Guyane 1995 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGM04: \"+title=RGM04 (Reseau Geodesique de Mayotte 2004) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGNC: \"+title=Reseau Geodesique de Nouvelle-Caledonie +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGPF: \"+title=RGPF (Reseau Geodesique de Polynesie Francaise) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGR92: \"+title=Reseau geodesique Reunion 1992 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGSPM06: \"+title=Reseau Geodesique Saint-Pierre-et-Miquelon (2006) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGTAAF07: \"+title=Reseau Geodesique des TAAF (2007) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RRAF91: \"+title=RRAF 1991 (Reseau de Reference des Antilles Francaises) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n STPL69: \"+title=Saint-Paul 1969 +proj=geocent +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n STPM50: \"+title=St Pierre et Miquelon 1950 +proj=geocent +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +units=m +no_defs\",\n TAHAA: \"+title=Raiatea - Tahaa 51-54 (Tahaa, Base Terme Est) +proj=geocent +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n TAHI79: \"+title=IGN79 (Tahiti) Iles de la Societe +proj=geocent +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n TERA50: \"+title=Pointe Geologie - Perroud 1950 +proj=geocent +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n WALL78: \"+title=Wallis-Uvea 1978 (MOP78) +proj=geocent +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n WGS72: \"+title=World Geodetic System 1972 +proj=geocent +towgs84=0.0000,12.0000,6.0000 +a=6378135.0000 +rf=298.2600000000000 +units=m +no_defs\",\n WGS84: \"+title=World Geodetic System 1984 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n AMST63GEO: \"+title=Amsterdam 1963 +proj=longlat +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n CROZ63GEO: \"+title=Crozet 1963 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n CSG67GEO: \"+title=Guyane CSG67 +proj=longlat +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n ED50G: \"+title=ED50 +proj=longlat +towgs84=-84.0000,-97.0000,-117.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n GUAD48GEO: \"+title=Guadeloupe Ste Anne +proj=longlat +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n GUADFM49GEO: \"+title=Guadeloupe Fort Marigot +proj=longlat +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n IGN63GEO: \"+title=IGN 1963 (Hiva Oa, Tahuata, Mohotani) +proj=longlat +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n IGN72GEO: \"+title=IGN 1972 Grande-Terre / Ile des Pins +proj=longlat +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n KERG62GEO: \"+title=Kerguelen - K0 +proj=longlat +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n MART38GEO: \"+title=Martinique Fort-Desaix +proj=longlat +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n MAYO50GEO: \"+title=Mayotte Combani +proj=longlat +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n MOOREA87GEO: \"+title=Moorea 1987 +proj=longlat +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n NTFG: \"+title=Nouvelle Triangulation Francaise Greenwich degres sexagesimaux +proj=longlat +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +units=m +no_defs\",\n NTFP: \"+title=Nouvelle Triangulation Francaise Paris grades +proj=longlat +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +units=m +no_defs\",\n NUKU72GEO: \"+title=IGN 1972 Nuku Hiva +proj=longlat +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n REUN47GEO: \"+title=Reunion 1947 +proj=longlat +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n RGF93G: \"+title=Reseau geodesique francais 1993 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGFG95GEO: \"+title=Reseau geodesique francais de Guyane 1995 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGM04GEO: \"+title=RGM04 (Reseau Geodesique de Mayotte 2004) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGNCGEO: \"+title=Reseau Geodesique de Nouvelle-Caledonie +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGPFGEO: \"+title=RGPF (Reseau Geodesique de Polynesie Francaise) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGR92GEO: \"+title=Reseau geodesique de la Reunion 1992 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGSPM06GEO: \"+title=Saint-Pierre-et-Miquelon (2006) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n RGTAAF07G: \"+title=Reseau Geodesique des TAAF (2007) (dms) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n STPL69GEO: \"+title=Saint-Paul 1969 +proj=longlat +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n STPM50GEO: \"+title=St Pierre et Miquelon 1950 +proj=longlat +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +units=m +no_defs\",\n TAHAAGEO: \"+title=Raiatea - Tahaa 51-54 (Tahaa, Base Terme Est) +proj=longlat +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n TAHI79GEO: \"+title=IGN79 (Tahiti) Iles de la Societe +proj=longlat +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n TERA50G: \"+title=Pointe Geologie - Perroud 1950 +proj=longlat +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n WALL78GEO: \"+title=Wallis - Uvea 1978 (MOP78) +proj=longlat +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs\",\n WGS72G: \"+title=WGS72 +proj=longlat +towgs84=0.0000,12.0000,6.0000 +a=6378135.0000 +rf=298.2600000000000 +units=m +no_defs\",\n WGS84G: \"+title=World Geodetic System 1984 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n WGS84RRAFGEO: \"+title=Reseau de reference des Antilles francaises (1988-1991) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n XGEO: \"+title=Systeme CIO-BIH +proj=longlat +towgs84=0.0000,0.0000,0.5000,0.0000,0.0000,0.0140,-0.100000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n AMST63UTM43S: \"+title=Amsterdam 1963 UTM fuseau 43 Sud +proj=tmerc +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n CROZ63UTM39S: \"+title=Crozet 1963 +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n CSG67UTM21: \"+title=Guyane CSG67 UTM fuseau 21 +proj=tmerc +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n CSG67UTM22: \"+title=Guyane CSG67 UTM fuseau 22 +proj=tmerc +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n GEOPORTALANF: \"+title=Geoportail - Antilles francaises +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n GEOPORTALASP: \"+title=Geoportail - Amsterdam et Saint-Paul +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-38.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n GEOPORTALCRZ: \"+title=Geoportail - Crozet +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-46.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n GEOPORTALFXX: \"+title=Geoportail - France metropolitaine +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=46.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n GEOPORTALGUF: \"+title=Geoportail - Guyane +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=4.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n GEOPORTALKER: \"+title=Geoportail - Kerguelen +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-49.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n GEOPORTALMYT: \"+title=Geoportail - Mayotte +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-12.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n GEOPORTALNCL: \"+title=Geoportail - Nouvelle-Caledonie +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-22.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n GEOPORTALPYF: \"+title=Geoportail - Polynesie francaise +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n GEOPORTALREU: \"+title=Geoportail - Reunion et dependances +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-21.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n GEOPORTALSPM: \"+title=Geoportail - Saint-Pierre et Miquelon +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=47.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n GEOPORTALWLF: \"+title=Geoportail - Wallis et Futuna +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-14.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n GUAD48UTM20: \"+title=Guadeloupe Ste Anne +proj=tmerc +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n GUADFM49U20: \"+title=Guadeloupe Fort Marigot +proj=tmerc +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n IGN63UTM7S: \"+title=IGN 1963 - Hiva Oa, Tahuata, Mohotani - UTM fuseau 7 Sud +proj=tmerc +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n IGN72UTM58S: \"+title=IGN 1972 - UTM fuseau 58 Sud +proj=tmerc +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=165.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n KERG62UTM42S: \"+title=Kerguelen 1962 +proj=tmerc +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=69.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n LAMB1: \"+title=Lambert I +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=49.500000000 +lon_0=0.000000000 +k_0=0.99987734 +lat_1=49.500000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs\",\n LAMB1C: \"+title=Lambert I Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=49.500000000 +lon_0=0.000000000 +k_0=0.99987734 +lat_1=49.500000000 +x_0=600000.000 +y_0=1200000.000 +units=m +no_defs\",\n LAMB2: \"+title=Lambert II +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs\",\n LAMB2C: \"+title=Lambert II Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=2200000.000 +units=m +no_defs\",\n LAMB3: \"+title=Lambert III +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=44.100000000 +lon_0=0.000000000 +k_0=0.99987750 +lat_1=44.100000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs\",\n LAMB3C: \"+title=Lambert III Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=44.100000000 +lon_0=0.000000000 +k_0=0.99987750 +lat_1=44.100000000 +x_0=600000.000 +y_0=3200000.000 +units=m +no_defs\",\n LAMB4: \"+title=Lambert IV +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=42.165000000 +lon_0=0.000000000 +k_0=0.99994471 +lat_1=42.165000000 +x_0=234.358 +y_0=185861.369 +units=m +no_defs\",\n LAMB4C: \"+title=Lambert IV Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=42.165000000 +lon_0=0.000000000 +k_0=0.99994471 +lat_1=42.165000000 +x_0=234.358 +y_0=4185861.369 +units=m +no_defs\",\n LAMB93: \"+title=Lambert 93 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=46.500000000 +lon_0=3.000000000 +lat_1=44.000000000 +lat_2=49.000000000 +x_0=700000.000 +y_0=6600000.000 +units=m +no_defs\",\n RGF93CC42: \"+title=Lambert conique conforme Zone 1 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=42.000000000 +lon_0=3.000000000 +lat_1=41.200000000 +lat_2=42.800000000 +x_0=1700000.000 +y_0=1200000.000 +units=m +no_defs\",\n RGF93CC43: \"+title=Lambert conique conforme Zone 2 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=43.000000000 +lon_0=3.000000000 +lat_1=42.200000000 +lat_2=43.800000000 +x_0=1700000.000 +y_0=2200000.000 +units=m +no_defs\",\n RGF93CC44: \"+title=Lambert conique conforme Zone 3 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=44.000000000 +lon_0=3.000000000 +lat_1=43.200000000 +lat_2=44.800000000 +x_0=1700000.000 +y_0=3200000.000 +units=m +no_defs\",\n RGF93CC45: \"+title=Lambert conique conforme Zone 4 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=45.000000000 +lon_0=3.000000000 +lat_1=44.200000000 +lat_2=45.800000000 +x_0=1700000.000 +y_0=4200000.000 +units=m +no_defs\",\n RGF93CC46: \"+title=Lambert conique conforme Zone 5 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=46.000000000 +lon_0=3.000000000 +lat_1=45.200000000 +lat_2=46.800000000 +x_0=1700000.000 +y_0=5200000.000 +units=m +no_defs\",\n RGF93CC47: \"+title=Lambert conique conforme Zone 6 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=47.000000000 +lon_0=3.000000000 +lat_1=46.200000000 +lat_2=47.800000000 +x_0=1700000.000 +y_0=6200000.000 +units=m +no_defs\",\n RGF93CC48: \"+title=Lambert conique conforme Zone 7 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=48.000000000 +lon_0=3.000000000 +lat_1=47.200000000 +lat_2=48.800000000 +x_0=1700000.000 +y_0=7200000.000 +units=m +no_defs\",\n RGF93CC49: \"+title=Lambert conique conforme Zone 8 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=49.000000000 +lon_0=3.000000000 +lat_1=48.200000000 +lat_2=49.800000000 +x_0=1700000.000 +y_0=8200000.000 +units=m +no_defs\",\n RGF93CC50: \"+title=Lambert conique conforme Zone 9 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=50.000000000 +lon_0=3.000000000 +lat_1=49.200000000 +lat_2=50.800000000 +x_0=1700000.000 +y_0=9200000.000 +units=m +no_defs\",\n LAMBE: \"+title=Lambert II etendu +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=2200000.000 +units=m +no_defs\",\n MART38UTM20: \"+title=Martinique Fort-Desaix +proj=tmerc +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n MAYO50UTM38S: \"+title=Mayotte Combani +proj=tmerc +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n MILLER: \"+title=Geoportail - Monde +proj=mill +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lon_0=0.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs\",\n MOOREA87U6S: \"+title=Moorea 1987 - UTM fuseau 6 Sud +proj=tmerc +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n NUKU72U7S: \"+title=IGN 1972 Nuku Hiva - UTM fuseau 7 Sud +proj=tmerc +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n // REUN47GAUSSL : \"+title=Reunion Gauss Laborde +proj=gstmerc +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=-21.116666667 +lon_0=55.533333333 +k_0=1.00000000 +x_0=160000.000 +y_0=50000.000 +units=m +no_defs\",\n RGM04UTM38S: \"+title=UTM fuseau 38 Sud (Reseau Geodesique de Mayotte 2004) +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n RGNCUTM57S: \"+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 57 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=159.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n RGNCUTM58S: \"+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 58 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=165.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n RGNCUTM59S: \"+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 59 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=171.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n RGPFUTM5S: \"+title=RGPF - UTM fuseau 5 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-153.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n RGPFUTM6S: \"+title=RGPF - UTM fuseau 6 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n RGPFUTM7S: \"+title=RGPF - UTM fuseau 7 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n RGR92UTM40S: \"+title=RGR92 UTM fuseau 40 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n RGSPM06U21: \"+title=Saint-Pierre-et-Miquelon (2006) UTM Fuseau 21 Nord +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n STPL69UTM43S: \"+title=Saint-Paul 1969 UTM fuseau 43 Sud +proj=tmerc +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n STPM50UTM21: \"+title=St Pierre et Miquelon 1950 +proj=tmerc +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n TAHAAUTM05S: \"+title=Tahaa 1951 +proj=tmerc +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-153.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n TAHI51UTM06S: \"+title=Tahiti-Terme Nord UTM fuseau 6 Sud +proj=tmerc +towgs84=162.0000,117.0000,154.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n TAHI79UTM6S: \"+title=Tahiti 1979 +proj=tmerc +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n TERA50STEREO: \"+title=Terre Adelie 1950 +proj=stere +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +lat_0=-90.000000000 +lon_0=140.000000000 +lat_ts=-67 +k=0.96027295 +x_0=300000.000 +y_0=-2299363.482 +units=m +no_defs\",\n UTM01SW84: \"+title=World Geodetic System 1984 UTM fuseau 01 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-177.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n UTM20W84GUAD: \"+title=World Geodetic System 1984 UTM fuseau 20 Nord-Guadeloupe +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM20W84MART: \"+title=World Geodetic System 1984 UTM fuseau 20 Nord-Martinique +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM22RGFG95: \"+title=RGFG95 UTM fuseau 22 Nord-Guyane +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM39SW84: \"+title=World Geodetic System 1984 UTM fuseau 39 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n UTM42SW84: \"+title=World Geodetic System 1984 UTM fuseau 42 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=69.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n UTM43SW84: \"+title=World Geodetic System 1984 UTM fuseau 43 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n WALL78UTM1S: \"+title=Wallis-Uvea 1978 (MOP78) UTM 1 SUD +proj=tmerc +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-177.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs\",\n ETRS89GEO: \"+title=ETRS89 geographiques (dms) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs\",\n ETRS89LAEA: \"+title=ETRS89 Lambert Azimutal Equal Area +proj=laea +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=52.000000000 +lon_0=10.000000000 +x_0=4321000.000 +y_0=3210000.000 +units=m +no_defs\",\n ETRS89LCC: \"+title=ETRS89 Lambert Conformal Conic +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=52.000000000 +lon_0=9.999999995 +lat_1=35.000000000 +lat_2=65.000000000 +x_0=4000000.000 +y_0=2800000.000 +units=m +no_defs\",\n UTM26ETRS89: \"+title=Europe - de 30d a 24d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-27.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM27ETRS89: \"+title=Europe - de 24d a 18d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-21.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM28ETRS89: \"+title=Europe - de 18d a 12d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-15.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM29ETRS89: \"+title=Europe - de 12d a 6d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-9.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM30ETRS89: \"+title=Europe - de -6d a 0d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-3.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM31ETRS89: \"+title=Europe - de 0d a 6d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=3.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM32ETRS89: \"+title=Europe - de 6d a 12d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=9.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM33ETRS89: \"+title=Europe - de 12d a 18d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=15.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM34ETRS89: \"+title=Europe - de 18d a 24d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=21.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM35ETRS89: \"+title=Europe - de 24d a 30d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=27.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM36ETRS89: \"+title=Europe - de 30d a 36d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=33.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM37ETRS89: \"+title=Europe - de 36d a 42d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=39.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\",\n UTM38ETRS89: \"+title=Europe - de 42d a 48d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs\"\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Register);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vVXRpbHMvUmVnaXN0ZXIuanM/ODMzNiJdLCJuYW1lcyI6WyJSZWdpc3RlciIsImlzTG9hZGVkIiwiZ2V0IiwibmFtZSIsInMiLCJzcGxpdCIsImxlbmd0aCIsIl9yZWdpc3RlciIsIl9jb2RlIiwiaGFzT3duUHJvcGVydHkiLCJleGlzdCIsImxvYWQiLCJQcm9qNCIsInJlZ2lzdGVycyIsImkiLCJjb2RlcyIsImRlZnMiLCJsb2FkQnlEZWZhdWx0IiwiRVBTRyIsIkNSUyIsIklHTkYiLCJMQU1COTMiLCJMQU1CRSIsIkxBTUIxIiwiTEFNQjIiLCJMQU1CMyIsIkxBTUI0IiwiUkdGOTNHIiwiV0dTODRHIiwicmVnaXN0ZXIiLCJjb2RlIiwibG9hZEJ5TmFtZSIsImUiLCJBTVNUNjMiLCJDUk9aNjMiLCJDU0c2NyIsIkVENTAiLCJFVFJTODkiLCJHVUFENDgiLCJHVUFERk00OSIsIklHTjYzIiwiSUdONzIiLCJLRVJHNjJDQVIiLCJNQVJUMzgiLCJNQVlPNTAiLCJNT09SRUE4NyIsIk5URiIsIk5VS1U3MiIsIlJFVU40NyIsIlJHRjkzIiwiUkdGRzk1IiwiUkdNMDQiLCJSR05DIiwiUkdQRiIsIlJHUjkyIiwiUkdTUE0wNiIsIlJHVEFBRjA3IiwiUlJBRjkxIiwiU1RQTDY5IiwiU1RQTTUwIiwiVEFIQUEiLCJUQUhJNzkiLCJURVJBNTAiLCJXQUxMNzgiLCJXR1M3MiIsIldHUzg0IiwiQU1TVDYzR0VPIiwiQ1JPWjYzR0VPIiwiQ1NHNjdHRU8iLCJFRDUwRyIsIkdVQUQ0OEdFTyIsIkdVQURG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BpbnRvIHByb2o0XG4gICAgICovXG4gICAgaXNMb2FkZWQgOiBmYWxzZSxcblxuICAgIC8qKlxuICAgICAqIGdldCB0aGUgZGVmaW5pdGlvbiBmb3IgYSBjb2RlXG4gICAgICpcbiAgICAgKiBAZnVuY3Rpb24gZ2V0XG4gICAgICogQHBhcmFtIHtTdHJpbmd9IG5hbWUgLSBpZS4gRVBTRzoyMTU0IChMYW1iZXJ0KVxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IGRlZmluaXRpb25cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIFJlZ2lzdGVyLmdldChcIkVQU0c6MjE1NFwiKTtcbiAgICAgKiAvLyBcIit0aXRsZT1SR0Y5MyAvIExhbWJlcnQtOTMgK3Byb2o9bGNjICtsYXRfMT00OSAuLi5cIlxuICAgICAqL1xuICAgIGdldCA6IGZ1bmN0aW9uIChuYW1lKSB7XG4gICAgICAgIGlmIChuYW1lID09PSBcIlwiIHx8IG5hbWUgPT09IG51bGwgfHwgdHlwZW9mIG5hbWUgPT09IFwidW5kZWZpbmVkXCIpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBzID0gbmFtZS5zcGxpdChcIjpcIik7XG4gICAgICAgIGlmIChzLmxlbmd0aCAhPT0gMikge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIF9yZWdpc3RlciA9IHNbMF07XG4gICAgICAgIHZhciBfY29kZSA9IHNbMV07XG5cbiAgICAgICAgaWYgKCF0aGlzLmhhc093blByb3BlcnR5KF9yZWdpc3RlcikpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdGhpc1tfcmVnaXN0ZXJdLmhhc093blByb3BlcnR5KF9jb2RlKSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRoaXNbX3JlZ2lzdGVyXVtfY29kZV07XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIGRvZXMgcHJvamVjdGlvbiBjb2RlIGV4aXN0ID9cbiAgICAgKlxuICAgICAqIEBmdW5jdGlvbiBleGlzdFxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBuYW1lIC0gaWUuIEVQU0c6MjE1NCAoTGFtYmVydClcbiAgICAgKiBAcmV0dXJucyB7Qm9vbGVhbn0gdHJ1ZS9mYWxzZVxuICAgICAqIEBleGFtcGxlXG4gICAgICogUmVnaXN0ZXIuZXhpc3QoXCJFUFNHOjIxNTRcIik7IC8vIHRydWVcbiAgICAgKi9cbiAgICBleGlzdCA6IGZ1bmN0aW9uIChuYW1lKSB7XG4gICAgICAgIGlmIChuYW1lID09PSBcIlwiIHx8IG5hbWUgPT09IG51bGwgfHwgdHlwZW9mIG5hbWUgPT09IFwidW5kZWZpbmVkXCIpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBzID0gbmFtZS5zcGxpdChcIjpcIik7XG4gICAgICAgIGlmIChzLmxlbmd0aCAhPT0gMikge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIF9yZWdpc3RlciA9IHNbMF07XG4gICAgICAgIHZhciBfY29kZSA9IHNbMV07XG5cbiAgICAgICAgaWYgKCF0aGlzLmhhc093blByb3BlcnR5KF9yZWdpc3RlcikpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdGhpc1tfcmVnaXN0ZXJdLmhhc093blByb3BlcnR5KF9jb2RlKSkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIGxvYWQgYWxsIGRlZnMgdG8gcHJvajRcbiAgICAgKiBAZnVuY3Rpb24gbG9hZFxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBQcm9qNCAtIHByb2o0IGluc3RhbmNlXG4gICAgICovXG4gICAgbG9hZCA6IGZ1bmN0aW9uIChQcm9qNCkge1xuICAgICAgICAvLyB1biBmbGFnIHBvdXIgc2F2b2lyIHNpIGxlIGNoYXJnZW1lbnQgZXN0IGTDqWrDoCByZWFsaXPDqVxuICAgICAgICAvLyAoY2FyIGNlY2kgcGV1dCDDqnRyZSBjb3V0ZXV4ICEpXG4gICAgICAgIGlmICghdGhpcy5pc0xvYWRlZCkge1xuICAgICAgICAgICAgdmFyIHJlZ2lzdGVycyA9IFtcbiAgICAgICAgICAgICAgICBcIklHTkZcIiwgLy8gZXhjZXB0aW9uIGxvcnMgZHUgcmVnaXN0ZXIgSUdORiA/XG4gICAgICAgICAgICAgICAgXCJFUFNHXCIsXG4gICAgICAgICAgICAgICAgXCJDUlNcIlxuICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcmVnaXN0ZXJzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIF9yZWdpc3RlciA9IHJlZ2lzdGVyc1tpXTtcbiAgICAgICAgICAgICAgICB2YXIgY29kZXMgPSB0aGlzW19yZWdpc3Rlcl07XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgX2NvZGUgaW4gY29kZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvZGVzLmhhc093blByb3BlcnR5KF9jb2RlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBfcmVnaXN0ZXIgKyBcIjpcIiArIF9jb2RlO1xuICAgICAgICAgICAgICAgICAgICAgICAgUHJvajQuZGVmcyhuYW1lLCB0aGlzLmdldChuYW1lKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBvbiBlbmzDqHZlIGxhIGRlcGVuZGFuY2Ugw6AgT3BlbkxheWVycy4uLlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbGEgZm9uY3Rpb24gcmVnaXN0ZXIgZXN0IGRvbmMgw6AgYXBwZWxsZXIgYWZpbiBkJ2VucmVnaXN0cmVyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsZXMgZGVmaW5pdGlvbnMgZGFucyBPcGVuTGF5ZXJzIDpcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vICBpbXBvcnQgeyBnZXQgfSBmcm9tIFwib2wvcHJvalwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gIGltcG9ydCBwcm9qNCBmcm9tIFwicHJvajRcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vICBpbXBvcnQgeyByZWdpc3RlciB9IGZyb20gXCJvbC9wcm9qL3Byb2o0XCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgIFJlZ2lzdGVyLmxvYWQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgLy8gTWFrZSBwcm9qZWN0aW9ucyBkZWZpbmVkIGluIHByb2o0ICh3aXRoIHByb2o0LmRlZnMoKSkgYXZhaWxhYmxlIGluIE9wZW5MYXllcnMuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgIC8vIHNlZSBvbC9wcm9qL3Byb2o0LnJlZ2lzdGVyIChodHRwczovL29wZW5sYXllcnMub3JnL2VuL2xhdGVzdC9hcGlkb2MvbW9kdWxlLW9sX3Byb2pfcHJvajQuaHRtbClcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgcmVnaXN0ZXIocHJvajQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICBjb25zb2xlLmxvZyhnZXQoXCJDUlM6ODRcIikuZ2V0Q29kZSgpKTsgLy8gXCJDUlM6ODRcIlxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLyoqIHRzLXN5bnRheCAqLy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xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIGZvciAodmFyIHJlZ2lzdGVyIGluIHJlZ2lzdGVycykge1xuICAgICAgICAgICAgaWYgKHJlZ2lzdGVycy5oYXNPd25Qcm9wZXJ0eShyZWdpc3RlcikpIHtcbiAgICAgICAgICAgICAgICB2YXIgY29kZXMgPSByZWdpc3RlcnNbcmVnaXN0ZXJdO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGNvZGUgaW4gY29kZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvZGVzLmhhc093blByb3BlcnR5KGNvZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IHJlZ2lzdGVyICsgXCI6XCIgKyBjb2RlO1xuICAgICAgICAgICAgICAgICAgICAgICAgUHJvajQuZGVmcyhuYW1lLCBjb2Rlc1tjb2RlXSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogbG9hZCBvbmx5IGEgZGVmIHRvIHByb2o0XG4gICAgICpcbiAgICAgKiBAZnVuY3Rpb24gbG9hZEJ5TmFtZVxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBQcm9qNCAtIHByb2o0IGluc3RhbmNlXG4gICAgICogQHBhcmFtIHtTdHJpbmd9IG5hbWUgLSBpZS4gRVBTRzoyMTU0IChMYW1iZXJ0KVxuICAgICAqIEByZXR1cm5zIHtCb29sZWFufSB0cnVlL2ZhbHNlXG4gICAgICovXG4gICAgbG9hZEJ5TmFtZSA6IGZ1bmN0aW9uIChQcm9qNCwgbmFtZSkge1xuICAgICAgICBpZiAoIXRoaXMuZXhpc3QobmFtZSkpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBQcm9qNC5kZWZzK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m9qPXV0bSArem9uZT03ICtzb3V0aCArZWxscHM9V0dTODQgK2RhdHVtPVdHUzg0ICt1bml0cz1tICtub19kZWZzIFwiLFxuICAgICAgICAzMjcwOCA6IFwiK3Byb2o9dXRtICt6b25lPTggK3NvdXRoICtlbGxwcz1XR1M4NCArZGF0dW09V0dTODQgK3VuaXRzPW0gK25vX2RlZnMgXCIsXG4gICAgICAgIDMyNzA5IDogXCIrcHJvaj11dG0gK3pvbmU9OSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MTAgOiBcIitwcm9qPXV0bSArem9uZT0xMCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MTEgOiBcIitwcm9qPXV0bSArem9uZT0xMSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MTIgOiBcIitwcm9qPXV0bSArem9uZT0xMiArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MTMgOiBcIitwcm9qPXV0bSArem9uZT0xMyArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MTQgOiBcIitwcm9qPXV0bSArem9uZT0xNCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MTUgOiBcIitwcm9qPXV0bSArem9uZT0xNSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MTYgOiBcIitwcm9qPXV0bSArem9uZT0xNiArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MTcgOiBcIitwcm9qPXV0bSArem9uZT0xNyArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MTggOiBcIitwcm9qPXV0bSArem9uZT0xOCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MTkgOiBcIitwcm9qPXV0bSArem9uZT0xOSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MjAgOiBcIitwcm9qPXV0bSArem9uZT0yMCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MjEgOiBcIitwcm9qPXV0bSArem9uZT0yMSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MjIgOiBcIitwcm9qPXV0bSArem9uZT0yMiArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MjMgOiBcIitwcm9qPXV0bSArem9uZT0yMyArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MjQgOiBcIitwcm9qPXV0bSArem9uZT0yNCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MjUgOiBcIitwcm9qPXV0bSArem9uZT0yNSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MjYgOiBcIitwcm9qPXV0bSArem9uZT0yNiArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MjcgOiBcIitwcm9qPXV0bSArem9uZT0yNyArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MjggOiBcIitwcm9qPXV0bSArem9uZT0yOCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MjkgOiBcIitwcm9qPXV0bSArem9uZT0yOSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MzAgOiBcIitwcm9qPXV0bSArem9uZT0zMCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MzEgOiBcIitwcm9qPXV0bSArem9uZT0zMSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MzIgOiBcIitwcm9qPXV0bSArem9uZT0zMiArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MzMgOiBcIitwcm9qPXV0bSArem9uZT0zMyArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MzQgOiBcIitwcm9qPXV0bSArem9uZT0zNCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MzUgOiBcIitwcm9qPXV0bSArem9uZT0zNSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MzYgOiBcIitwcm9qPXV0bSArem9uZT0zNiArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MzcgOiBcIitwcm9qPXV0bSArem9uZT0zNyArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MzggOiBcIitwcm9qPXV0bSArem9uZT0zOCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3MzkgOiBcIitwcm9qPXV0bSArem9uZT0zOSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NDAgOiBcIitwcm9qPXV0bSArem9uZT00MCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NDEgOiBcIitwcm9qPXV0bSArem9uZT00MSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NDIgOiBcIitwcm9qPXV0bSArem9uZT00MiArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NDMgOiBcIitwcm9qPXV0bSArem9uZT00MyArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NDQgOiBcIitwcm9qPXV0bSArem9uZT00NCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NDUgOiBcIitwcm9qPXV0bSArem9uZT00NSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NDYgOiBcIitwcm9qPXV0bSArem9uZT00NiArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NDcgOiBcIitwcm9qPXV0bSArem9uZT00NyArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NDggOiBcIitwcm9qPXV0bSArem9uZT00OCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NDkgOiBcIitwcm9qPXV0bSArem9uZT00OSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NTAgOiBcIitwcm9qPXV0bSArem9uZT01MCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NTEgOiBcIitwcm9qPXV0bSArem9uZT01MSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NTIgOiBcIitwcm9qPXV0bSArem9uZT01MiArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NTMgOiBcIitwcm9qPXV0bSArem9uZT01MyArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NTQgOiBcIitwcm9qPXV0bSArem9uZT01NCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NTUgOiBcIitwcm9qPXV0bSArem9uZT01NSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NTYgOiBcIitwcm9qPXV0bSArem9uZT01NiArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NTcgOiBcIitwcm9qPXV0bSArem9uZT01NyArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NTggOiBcIitwcm9qPXV0bSArem9uZT01OCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NTkgOiBcIitwcm9qPXV0bSArem9uZT01OSArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NjAgOiBcIitwcm9qPXV0bSArem9uZT02MCArc291dGggK2VsbHBzPVdHUzg0ICtkYXR1bT1XR1M4NCArdW5pdHM9bSArbm9fZGVmcyBcIixcbiAgICAgICAgMzI3NjEgOiBcIitwcm9qPXN0ZXJlICtsYXRfMD0tOTAgK2xhdF90cz0tOTAgK2xvbl8wPTAgK2s9MC45OTQgK3hfMD0yMDAwMDAwICt5XzA9MjAwMDAwMCArZWxscHM9V0dTODQgK2RhdHVtPVdH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js\n"); + +/***/ }), + +/***/ "./src/Common/Utils/SearchEngineUtils.js": +/*!***********************************************!*\ + !*** ./src/Common/Utils/SearchEngineUtils.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * @module SearchEngineUtils\n * @alias [private] SearchEngineUtils\n * @description\n * ...\n *\n * @example\n * advancedSearchFiltersByDefault();\n * zoomToResultsByDefault();\n */\nvar SearchEngineUtils = {\n /**\n * Advanced Search Filters by default\n * @function advancedSearchFiltersByDefault\n */\n advancedSearchFiltersByDefault: {\n PositionOfInterest: [{\n name: \"category\",\n title: \"Type\",\n value: [\"cimetière\", \"aérodrome\", \"réservoir\", \"administratif\", \"construction linéaire\", \"construction ponctuelle\", \"construction surfacique\", \"cours d'eau\", \"détail hydrographique\", \"détail orographique\", \"équipement de transport\", \"plan d'eau\", \"poste de transformation\", \"terrain de sport\", \"transport par câble\", \"zone d'activité ou d'intérêt\", \"zone d'habitation\", \"lieu-dit non habité\"]\n }, {\n name: \"postcode\",\n title: \"Code postal\"\n }, {\n name: \"citycode\",\n title: \"Code INSEE\"\n }],\n StreetAddress: [{\n name: \"city\",\n title: \"Ville\"\n }, {\n name: \"postcode\",\n title: \"Code postal\"\n }, {\n name: \"citycode\",\n title: \"Code INSEE\"\n }],\n CadastralParcel: [{\n name: \"departmentcode\",\n title: \"Code département (INSEE)\",\n description: \"Code INSEE du département (ex: 01, 94)\"\n }, {\n name: \"municipalitycode\",\n title: \"Code commune (INSEE)\",\n description: \"Code INSEE de la commune : 3 chiffres (ex: 067)\"\n }, {\n name: \"city\",\n title: \"Nom commune\",\n description: \"Nom de la commune\"\n }, {\n name: \"oldmunicipalitycode\",\n title: \"Commune absorbée\",\n description: \"Commune absorbée : 3 chiffres (ex: 000, 001)\"\n }, {\n name: \"districtcode\",\n title: \"Arrondissement\",\n description: \"Arrondissement : 3 chiffres (ex: 004, 012)\"\n }, {\n name: \"section\",\n title: \"Section\",\n description: \"Section Cadastrale : 2 caractères (chiffre et/ou lettre)\"\n }, {\n name: \"number\",\n title: \"Numéro\",\n description: \"Numéro de la parcelle : 4 chiffres (ex: 0041, 0250)\"\n }, {\n name: \"sheet\",\n title: \"Feuille\",\n description: \"Numéro de la feuille cadastrale\"\n }]\n },\n /**\n * Provides default zoom based on results.\n *\n * @function zoomToResultsByDefault\n * @param {Object} info - location information\n * @returns {Integer} zoom level\n */\n zoomToResultsByDefault: function zoomToResultsByDefault(info) {\n // FIXME\n // la classification du geocodage est differente de l'importance de l'autocompletion !\n\n var zoom = 15;\n var service = info.service;\n var fields = info.fields;\n var type = info.type;\n var importance = {\n 1: 11,\n 2: 12,\n 3: 13,\n 4: 14,\n 5: 15,\n 6: 16,\n 7: 17,\n 8: 17\n };\n\n // AutoCompletion POI\n if (service === \"SuggestedLocation\") {\n if (type === \"PositionOfInterest\") {\n zoom = importance[fields.classification];\n }\n }\n\n // Geocodage POI\n if (service === \"GeocodedLocation\") {\n if (type === \"PositionOfInterest\") {\n zoom = importance[fields.importance] || 14; // au cas où la recherche est en freeform !\n }\n }\n\n if (type === \"StreetAddress\") {\n zoom = 17;\n }\n if (type === \"CadastralParcel\") {\n zoom = 17;\n }\n return zoom;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (SearchEngineUtils);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vVXRpbHMvU2VhcmNoRW5naW5lVXRpbHMuanM/ZDcwZiJdLCJuYW1lcyI6WyJTZWFyY2hFbmdpbmVVdGlscyIsImFkdmFuY2VkU2VhcmNoRmlsdGVyc0J5RGVmYXVsdCIsIlBvc2l0aW9uT2ZJbnRlcmVzdCIsIm5hbWUiLCJ0aXRsZSIsInZhbHVlIiwiU3RyZWV0QWRkcmVzcyIsIkNhZGFzdHJh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iAgICAgICAgICAgICAgICAgICAgXCJjb25zdHJ1Y3Rpb24gc3VyZmFjaXF1ZVwiLFxuICAgICAgICAgICAgICAgICAgICBcImNvdXJzIGQnZWF1XCIsXG4gICAgICAgICAgICAgICAgICAgIFwiZMOpdGFpbCBoeWRyb2dyYXBoaXF1ZVwiLFxuICAgICAgICAgICAgICAgICAgICBcImTDqXRhaWwgb3JvZ3JhcGhpcXVlXCIsXG4gICAgICAgICAgICAgICAgICAgIFwiw6lxdWlwZW1lbnQgZGUgdHJhbnNwb3J0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwicGxhbiBkJ2VhdVwiLFxuICAgICAgICAgICAgICAgICAgICBcInBvc3RlIGRlIHRyYW5zZm9ybWF0aW9uXCIsXG4gICAgICAgICAgICAgICAgICAgIFwidGVycmFpbiBkZSBzcG9ydFwiLFxuICAgICAgICAgICAgICAgICAgICBcInRyYW5zcG9ydCBwYXIgY8OiYmxlXCIsXG4gICAgICAgICAgICAgICAgICAgIFwiem9uZSBkJ2FjdGl2aXTDqSBvdSBkJ2ludMOpcsOqdFwiLFxuICAgICAgICAgICAgICAgICAgICBcInpvbmUgZCdoYWJpdGF0aW9uXCIsXG4gICAgICAgICAgICAgICAgICAgIFwibGlldS1kaXQgbm9uIGhhYml0w6lcIlxuICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBuYW1lIDogXCJwb3N0Y29kZVwiLFxuICAgICAgICAgICAgICAgIHRpdGxlIDogXCJDb2RlIHBvc3RhbFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgbmFtZSA6IFwiY2l0eWNvZGVcIixcbiAgICAgICAgICAgICAgICB0aXRsZSA6IFwiQ29kZSBJTlNFRVwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFN0cmVldEFkZHJlc3MgOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgbmFtZSA6IFwiY2l0eVwiLFxuICAgICAgICAgICAgICAgIHRpdGxlIDogXCJWaWxsZVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgbmFtZSA6IFwicG9zdGNvZGVcIixcbiAgICAgICAgICAgICAgICB0aXRsZSA6IFwiQ29kZSBwb3N0YWxcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIG5hbWUgOiBcImNpdHljb2RlXCIsXG4gICAgICAgICAgICAgICAgdGl0bGUgOiBcIkNvZGUgSU5TRUVcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBDYWRhc3RyYWxQYXJjZWwgOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgbmFtZSA6IFwiZGVwYXJ0bWVudGNvZGVcIixcbiAgICAgICAgICAgICAgICB0aXRsZSA6IFwiQ29kZSBkw6lwYXJ0ZW1lbnQgKElOU0VFKVwiLFxuICAgICAgICAgICAgICAgIGRlc2NyaXB0aW9uIDogXCJDb2RlIElOU0VFIGR1IGTDqXBhcnRlbWVudCAoZXg6IDAxLCA5NClcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIG5hbWUgOiBcIm11bmljaXBhbGl0eWNvZGVcIixcbiAgICAgICAgICAgICAgICB0aXRsZSA6IFwiQ29kZSBjb21tdW5lIChJTlNFRSlcIixcbiAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiA6IFwiQ29kZSBJTlNFRSBkZSBsYSBjb21tdW5lIDogMyBjaGlmZnJlcyAoZXg6IDA2NylcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIG5hbWUgOiBcImNpdHlcIixcbiAgICAgICAgICAgICAgICB0aXRsZSA6IFwiTm9tIGNvbW11bmVcIixcbiAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiA6IFwiTm9tIGRlIGxhIGNvbW11bmVcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIG5hbWUgOiBcIm9sZG11bmljaXBhbGl0eWNvZGVcIixcbiAgICAgICAgICAgICAgICB0aXRsZSA6IFwiQ29tbXVuZSBhYnNvcmLDqWVcIixcbiAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiA6IFwiQ29tbXVuZSBhYnNvcmLDqWUgOiAzIGNoaWZmcmVzIChleDogMDAwLCAwMDEpXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBuYW1lIDogXCJkaXN0cmljdGNvZGVcIixcbiAgICAgICAgICAgICAgICB0aXRsZSA6IFwiQXJyb25kaXNzZW1lbnRcIixcbiAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiA6IFwiQXJyb25kaXNzZW1lbnQgOiAzIGNoaWZmcmVzIChleDogMDA0LCAwMTIpXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBuYW1lIDogXCJzZWN0aW9uXCIsXG4gICAgICAgICAgICAgICAgdGl0bGUgOiBcIlNlY3Rpb25cIixcbiAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiA6IFwiU2VjdGlvbiBDYWRhc3RyYWxlIDogMiBjYXJhY3TDqHJlcyAoY2hpZmZyZSBldC9vdSBsZXR0cmUpXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBuYW1lIDogXCJudW1iZXJcIixcbiAgICAgICAgICAgICAgICB0aXRsZSA6IFwiTnVtw6lyb1wiLFxuICAgICAgICAgICAgICAgIGRlc2NyaXB0aW9uIDogXCJOdW3DqXJvIGRlIGxhIHBhcmNlbGxlIDogNCBjaGlmZnJlcyAoZXg6IDAwNDEsIDAyNTApXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBuYW1lIDogXCJzaGVldFwiLFxuICAgICAgICAgICAgICAgIHRpdGxlIDogXCJGZXVpbGxlXCIsXG4gICAgICAgICAgICAgICAgZGVzY3JpcHRpb24gOiBcIk51bcOpcm8gZGUgbGEgZmV1aWxsZSBjYWRhc3RyYWxlXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXVxuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBQcm92aWRlcyBkZWZhdWx0IHpvb20gYmFzZWQgb24gcmVzdWx0cy5cbiAgICAgKlxuICAgICAqIEBmdW5jdGlvbiB6b29tVG9SZXN1bHRzQnlEZWZhdWx0XG4gICAgICogQHBhcmFtIHtPYmplY3R9IGluZm8gLSBsb2NhdGlvbiBpbmZvcm1hdGlvblxuICAgICAqIEByZXR1cm5zIHtJbnRlZ2VyfSB6b29tIGxldmVsXG4gICAgICovXG4gICAgem9vbVRvUmVzdWx0c0J5RGVmYXVsdCA6IGZ1bmN0aW9uIChpbmZvKSB7XG4gICAgICAgIC8vIEZJWE1FXG4gICAgICAgIC8vIGxhIGNsYXNzaWZpY2F0aW9uIGR1IGdlb2NvZGFnZSBlc3QgZGlmZmVyZW50ZSBkZSBsJ2ltcG9ydGFuY2UgZGUgbCdhdXRvY29tcGxldGlvbiAhXG5cbiAgICAgICAgdmFyIHpvb20gPSAxNTtcblxuICAgICAgICB2YXIgc2VydmljZSA9IGluZm8uc2VydmljZTtcbiAgICAgICAgdmFyIGZpZWxkcyA9IGluZm8uZmllbGRzO1xuICAgICAgICB2YXIgdHlwZSA9IGluZm8udHlwZTtcblxuICAgICAgICB2YXIgaW1wb3J0YW5jZSA9IHtcbiAgICAgICAgICAgIDEgOiAxMSxcbiAgICAgICAgICAgIDIgOiAxMixcbiAgICAgICAgICAgIDMgOiAxMyxcbiAgICAgICAgICAgIDQgOiAxNCxcbiAgICAgICAgICAgIDUgOiAxNSxcbiAgICAgICAgICAgIDYgOiAxNixcbiAgICAgICAgICAgIDcgOiAxNyxcbiAgICAgICAgICAgIDggOiAxN1xuICAgICAgICB9O1xuXG4gICAgICAgIC8vIEF1dG9Db21wbGV0aW9uIFBPSVxuICAgICAgICBpZiAoc2VydmljZSA9PT0gXCJTdWdnZXN0ZWRMb2NhdGlvblwiKSB7XG4gICAgICAgICAgICBpZiAodHlwZSA9PT0gXCJQb3NpdGlvbk9mSW50ZXJlc3RcIikge1xuICAgICAgICAgICAgICAgIHpvb20gPSBpbXBvcnRhbmNlW2ZpZWxkcy5jbGFzc2lmaWNhdGlvbl07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW9jb2RhZ2UgUE9JXG4gICAgICAgIGlmIChzZXJ2aWNlID09PSBcIkdlb2NvZGVkTG9jYXRpb25cIikge1xuICAgICAgICAgICAgaWYgKHR5cGUgPT09IFwiUG9zaXRpb25PZkludGVyZXN0XCIpIHtcbiAgICAgICAgICAgICAgICB6b29tID0gaW1wb3J0YW5jZVtmaWVsZHMuaW1wb3J0YW5jZV0gfHwgMTQ7IC8vIGF1IGNhcyBvw7kgbGEgcmVjaGVyY2hlIGVzdCBlbiBmcmVlZm9ybSAhXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZSA9PT0gXCJTdHJlZXRBZGRyZXNzXCIpIHtcbiAgICAgICAgICAgIHpvb20gPSAxNztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0eXBlID09PSBcIkNhZGFzdHJhbFBhcmNlbFwiKSB7XG4gICAgICAgICAgICB6b29tID0gMTc7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gem9vbTtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBTZWFyY2hFbmdpbmVVdGlscztcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Common/Utils/SearchEngineUtils.js\n"); + +/***/ }), + +/***/ "./src/Common/Utils/SelectorID.js": +/*!****************************************!*\ + !*** ./src/Common/Utils/SelectorID.js ***! + \****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * @module SelectorID\n * @alias [private] SelectorID\n * @description\n * formalisme d'un tag ID :\n * -> NAME(_ORDER)-1460636385836\n *\n * @example\n * Ex.\n * GProutePoints-1460636385836\n * GProutePoint_10-1460636385836\n */\nvar SelectorID = {\n /**\n * Construction d'un identifiant statique basé sur le timestamp,\n * et qui s'incremente de +1 à chaque appel\n * @function generate\n */\n generate: function () {\n var timestamp = Math.floor(Date.now());\n return function () {\n return timestamp++;\n };\n }(),\n /**\n * nom du tag\n * @function name\n * @param {String} id - the id\n * @returns {String} index\n */\n name: function name(id) {\n var name = null;\n var i = id.lastIndexOf(\"-\");\n if (i === -1) {\n name = id;\n } else {\n name = id.substring(0, i);\n }\n return name;\n },\n /**\n * numero d'identifiant du tag\n *\n * @function index\n * @param {String} id - the id\n * @returns {String} index\n */\n index: function index(id) {\n var index = null;\n var name = this.name(id);\n // if (name !== id) {\n var i = name.lastIndexOf(\"_\");\n if (i !== -1) {\n index = name.substring(i + 1);\n }\n // }\n\n return index;\n },\n /**\n * uuid du tag\n *\n * @function uuid\n * @param {String} id - the id\n * @returns {String} uuid\n */\n uuid: function uuid(id) {\n var uuid = null;\n var i = id.lastIndexOf(\"-\");\n if (i !== -1) {\n uuid = parseInt(id.substring(i + 1), 10);\n }\n return uuid;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (SelectorID);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9Db21tb24vVXRpbHMvU2VsZWN0b3JJRC5qcz9lNmM1Il0sIm5hbWVzIjpbIlNlbGVjdG9ySUQiLCJnZW5lcmF0ZSIsInRpbWVzdGFtcCIsIk1hdGgiLCJmbG9vciIsIkRhdGUiLCJub3ciLCJuYW1lIiwiaWQiLCJpIiwibGFzdEluZGV4T2YiLCJzdWJzdHJpbmciLCJpbmRleCIsInV1aWQiLCJwYXJzZUludCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QU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XG4gICAgICovXG4gICAgaW5kZXggOiBmdW5jdGlvbiAoaWQpIHtcbiAgICAgICAgdmFyIGluZGV4ID0gbnVsbDtcblxuICAgICAgICB2YXIgbmFtZSA9IHRoaXMubmFtZShpZCk7XG4gICAgICAgIC8vIGlmIChuYW1lICE9PSBpZCkge1xuICAgICAgICB2YXIgaSA9IG5hbWUubGFzdEluZGV4T2YoXCJfXCIpO1xuICAgICAgICBpZiAoaSAhPT0gLTEpIHtcbiAgICAgICAgICAgIGluZGV4ID0gbmFtZS5zdWJzdHJpbmcoaSArIDEpO1xuICAgICAgICB9XG4gICAgICAgIC8vIH1cblxuICAgICAgICByZXR1cm4gaW5kZXg7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHV1aWQgZHUgdGFnXG4gICAgICpcbiAgICAgKiBAZnVuY3Rpb24gdXVpZFxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBpZCAtIHRoZSBpZFxuICAgICAqIEByZXR1cm5zIHtTdHJpbmd9IHV1aWRcbiAgICAgKi9cbiAgICB1dWlkIDogZnVuY3Rpb24gKGlkKSB7XG4gICAgICAgIHZhciB1dWlkID0gbnVsbDtcblxuICAgICAgICB2YXIgaSA9IGlkLmxhc3RJbmRleE9mKFwiLVwiKTtcbiAgICAgICAgaWYgKGkgIT09IC0xKSB7XG4gICAgICAgICAgICB1dWlkID0gcGFyc2VJbnQoaWQuc3Vic3RyaW5nKGkgKyAxKSwgMTApO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHV1aWQ7XG4gICAgfVxuXG59O1xuXG5leHBvcnQgZGVmYXVsdCBTZWxlY3RvcklEO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Common/Utils/SelectorID.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/CRS/CRS.js": +/*!********************************!*\ + !*** ./src/Leaflet/CRS/CRS.js ***! + \********************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var proj4__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! proj4 */ \"./node_modules/proj4/dist/proj4-src.js-exposed\");\n/* harmony import */ var proj4__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(proj4__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var proj4leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! proj4leaflet */ \"./node_modules/proj4leaflet/src/proj4leaflet.js\");\n/* harmony import */ var proj4leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(proj4leaflet__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/Register */ \"./src/Common/Utils/Register.js\");\n/* harmony import */ var _EPSG2154__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./EPSG2154 */ \"./src/Leaflet/CRS/EPSG2154.js\");\n/* harmony import */ var _EPSG27572__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./EPSG27572 */ \"./src/Leaflet/CRS/EPSG27572.js\");\n/* harmony import */ var _EPSG4326__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./EPSG4326 */ \"./src/Leaflet/CRS/EPSG4326.js\");\n\n\n\n\n\n\n\n/** autoload function */\n(function () {\n // load all defs into proj4\n _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__[\"default\"].load(proj4__WEBPACK_IMPORTED_MODULE_0___default.a);\n})();\n\n/**\n * CRS (Coordinate Reference Systems) Factory to create L.Proj.CRS instances.\n *\n * @module CRS\n * @alias L.geoportalCRS\n * @abstract\n * @example\n * var map = L.Map('divmap', {\n * crs : L.geoportalCRS.EPSG2154\n * }).setView();\n *\n * var lyr = L.geoportalLayer.WMTS(\n * {\n * layer : \"ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93\"\n * },\n * {\n * opacity : 1,\n * transparent : true,\n * minZoom : 1,\n * maxZoom : 21\n * ...\n * });\n *\n * lyr.addTo(map); // ou map.addLayer(lyr);\n */\n/** @type {L.geoportalCRS} */\nvar CRS = {\n /**\n * Lambert 93 (\"EPSG:2154\") CRS definition to be used with Leaflet.\n *\n * @method EPSG2154\n * @static\n * @alias L.geoportalCRS.EPSG2154\n * @returns {EPSG2154} epsg code\n */\n EPSG2154: function EPSG2154() {\n return _EPSG2154__WEBPACK_IMPORTED_MODULE_3__[\"default\"].build();\n },\n /**\n * CRS : Lambert 2 extened\n *\n * @method EPSG27572\n * @static\n * @alias L.geoportalCRS.EPSG27572\n * @returns {EPSG27572} epsg code\n */\n EPSG27572: function EPSG27572() {\n return _EPSG27572__WEBPACK_IMPORTED_MODULE_4__[\"default\"].build();\n },\n /**\n * CRS : EPSG4326\n *\n * @ignore\n * @method EPSG4326\n * @static\n * @alias L.geoportalCRS.EPSG4326\n * @returns {EPSG4326} epsg code\n */\n EPSG4326: function EPSG4326() {\n return _EPSG4326__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build();\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (CRS);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NSUy9DUlMuanM/YWQ4YSJdLCJuYW1lcyI6WyJSZWdpc3RlciIsImxvYWQiLCJQcm9qNCIsIkNSUyIsIkVQU0cyMTU0IiwiRXBzZzIxNTQiLCJidWlsZCIsIkVQU0cyNzU3MiIsIkVwc2cyNzU3MiIsIkVQU0c0MzI2IiwiRXBzZzQzMjYiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUEwQjtBQUNKO0FBQz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2XG4gICAgICogQHJldHVybnMge0VQU0c0MzI2fSBlcHNnIGNvZGVcbiAgICAgKi9cbiAgICBFUFNHNDMyNiA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIEVwc2c0MzI2LmJ1aWxkKCk7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ1JTO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/CRS/CRS.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/CRS/EPSG2154.js": +/*!*************************************!*\ + !*** ./src/Leaflet/CRS/EPSG2154.js ***! + \*************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Utils/Config */ \"./src/Common/Utils/Config.js\");\n/* harmony import */ var _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/Register */ \"./src/Common/Utils/Register.js\");\n\n\n\n\n/**\n * @classdesc\n *\n * Leaflet Lambert 93 (EPSG:2154) ICRS compatible definition.\n *\n * @module\n * @alias L.geoportalCRS.EPSG2154\n * @example\n * var map = L.Map('divmap', {\n * crs : L.geoportalCRS.EPSG2154\n * }).setView();\n * var lyr = L.geoportalLayer.WMTS(\n * {\n * layer : \"ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93\"\n * });\n *\n * lyr.addTo(map); // ou map.addLayer(lyr);\n */\n/** @type {L.geoportalCRS.EPSG2154} */\nvar EPSG2154 = {\n /**\n * instance\n *\n * @private\n */\n instance: null,\n /**\n * execution\n *\n * @returns {Object} instance\n * @private\n */\n build: function build() {\n // singleton\n if (!this.instance) {\n var crs = new leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Proj.CRS(\"EPSG:2154\", _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get(\"EPSG:2154\"), {\n resolutions: this._getResolutions(),\n origin: this._getOrigin()\n });\n this.instance = crs;\n }\n return this.instance;\n },\n /**\n * resolutions\n *\n * @returns {Number[]} resolutions\n * @private\n */\n _getResolutions: function _getResolutions() {\n var resolutions = [];\n // resolutions issues de la configuration\n if (_Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isConfigLoaded()) {\n var o = _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__[\"default\"].configuration.getTMSConf(\"LAMB93\");\n resolutions = o.nativeResolutions;\n }\n if (resolutions.length) {\n return resolutions;\n }\n\n // resolution par defaut\n return [104579.22454989408, 52277.53235379051, 26135.487078595408, 13066.891381800004, 6533.228604113456, 3266.5595244626675, 1633.2660045974187, 816.6295549860224, 408.31391467683596, 204.15674151090204, 102.07831678324082, 51.0391448966112, 25.519569074269395, 12.759783693647506, 6.379891635966491, 3.18994576530532, 1.5949728694977277, 0.7974864315474559, 0.398743214900604, 0.19937160727567999, 0.099685803696052, 0.049842901818919996];\n },\n /**\n * origine\n *\n * @returns {Number[]} origin\n * @private\n */\n _getOrigin: function _getOrigin() {\n return [0, 12000000];\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (EPSG2154);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NSUy9FUFNHMjE1NC5qcz9lZjFmIl0sIm5hbWVzIjpbIkVQU0cyMTU0IiwiaW5zdGFuY2UiLCJidWlsZCIsImNycyIsIkwiLCJQcm9qIi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udWxsLFxuXG4gICAgLyoqXG4gICAgICogZXhlY3V0aW9uXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBpbnN0YW5jZVxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgYnVpbGQgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIC8vIHNpbmdsZXRvblxuICAgICAgICBpZiAoIXRoaXMuaW5zdGFuY2UpIHtcbiAgICAgICAgICAgIHZhciBjcnMgPSBuZXcgTC5Qcm9qLkNSUyhcIkVQU0c6MjE1NFwiLFxuICAgICAgICAgICAgICAgIFJlZ2lzdGVyLmdldChcIkVQU0c6MjE1NFwiKSwge1xuICAgICAgICAgICAgICAgICAgICByZXNvbHV0aW9ucyA6IHRoaXMuX2dldFJlc29sdXRpb25zKCksXG4gICAgICAgICAgICAgICAgICAgIG9yaWdpbiA6IHRoaXMuX2dldE9yaWdpbigpXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB0aGlzLmluc3RhbmNlID0gY3JzO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRoaXMuaW5zdGFuY2U7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHJlc29sdXRpb25zXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7TnVtYmVyW119IHJlc29sdXRpb25zXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBfZ2V0UmVzb2x1dGlvbnMgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciByZXNvbHV0aW9ucyA9IFtdO1xuICAgICAgICAvLyByZXNvbHV0aW9ucyBpc3N1ZXMgZGUgbGEgY29uZmlndXJhdGlvblxuICAgICAgICBpZiAoQ29uZmlnLmlzQ29uZmlnTG9hZGVkKCkpIHtcbiAgICAgICAgICAgIHZhciBvID0gQ29uZmlnLmNvbmZpZ3VyYXRpb24uZ2V0VE1TQ29uZihcIkxBTUI5M1wiKTtcbiAgICAgICAgICAgIHJlc29sdXRpb25zID0gby5uYXRpdmVSZXNvbHV0aW9ucztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChyZXNvbHV0aW9ucy5sZW5ndGgpIHtcbiAgICAgICAgICAgIHJldHVybiByZXNvbHV0aW9ucztcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHJlc29sdXRpb24gcGFyIGRlZmF1dFxuICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgMTA0NTc5LjIyNDU0OTg5NDA4LFxuICAgICAgICAgICAgNTIyNzcuNTMyMzUzNzkwNTEsXG4gICAgICAgICAgICAyNjEzNS40ODcwNzg1OTU0MDgsXG4gICAgICAgICAgICAxMzA2Ni44OTEzODE4MDAwMDQsXG4gICAgICAgICAgICA2NTMzLjIyODYwNDExMzQ1NixcbiAgICAgICAgICAgIDMyNjYuNTU5NTI0NDYyNjY3NSxcbiAgICAgICAgICAgIDE2MzMuMjY2MDA0NTk3NDE4NyxcbiAgICAgICAgICAgIDgxNi42Mjk1NTQ5ODYwMjI0LFxuICAgICAgICAgICAgNDA4LjMxMzkxNDY3NjgzNTk2LFxuICAgICAgICAgICAgMjA0LjE1Njc0MTUxMDkwMjA0LFxuICAgICAgICAgICAgMTAyLjA3ODMxNjc4MzI0MDgyLFxuICAgICAgICAgICAgNTEuMDM5MTQ0ODk2NjExMixcbiAgICAgICAgICAgIDI1LjUxOTU2OTA3NDI2OTM5NSxcbiAgICAgICAgICAgIDEyLjc1OTc4MzY5MzY0NzUwNixcbiAgICAgICAgICAgIDYuMzc5ODkxNjM1OTY2NDkxLFxuICAgICAgICAgICAgMy4xODk5NDU3NjUzMDUzMixcbiAgICAgICAgICAgIDEuNTk0OTcyODY5NDk3NzI3NyxcbiAgICAgICAgICAgIDAuNzk3NDg2NDMxNTQ3NDU1OSxcbiAgICAgICAgICAgIDAuMzk4NzQzMjE0OTAwNjA0LFxuICAgICAgICAgICAgMC4xOTkzNzE2MDcyNzU2Nzk5OSxcbiAgICAgICAgICAgIDAuMDk5Njg1ODAzNjk2MDUyLFxuICAgICAgICAgICAgMC4wNDk4NDI5MDE4MTg5MTk5OTZcbiAgICAgICAgXTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogb3JpZ2luZVxuICAgICAqXG4gICAgICogQHJldHVybnMge051bWJlcltdfSBvcmlnaW5cbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIF9nZXRPcmlnaW4gOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiBbMCwgMTIwMDAwMDBdO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEVQU0cyMTU0O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/CRS/EPSG2154.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/CRS/EPSG27572.js": +/*!**************************************!*\ + !*** ./src/Leaflet/CRS/EPSG27572.js ***! + \**************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Utils/Config */ \"./src/Common/Utils/Config.js\");\n/* harmony import */ var _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/Register */ \"./src/Common/Utils/Register.js\");\n\n\n\n\n/**\n *\n * Projection Lambert 2 étendu\n *\n * @module\n * @alias L.geoportalCRS.EPSG27572\n * @example\n * var map = L.Map('divmap', {\n * crs : L.geoportalCRS.EPSG27572\n * }).setView();\n * var lyr = L.geoportalLayer.WMTS(\n * {\n * layer : \"ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93\",\n * apiKey : \"wqxljfvklsdhvlfkjqfmlq787645\"\n * },\n * {\n * attribution : \"test for layer ORTHOIMAGERY\",\n * opacity : 1,\n * transparent : true,\n * minZoom : 1,\n * maxZoom : 21\n * ...\n * });\n *\n * lyr.addTo(map); // ou map.addLayer(lyr);\n */\n/** @type {L.geoportalCRS.EPSG27572} */\nvar EPSG27572 = {\n /**\n * instance\n *\n * @private\n */\n instance: null,\n /**\n * execution\n *\n * @returns {Object} instance\n * @private\n */\n build: function build() {\n // singleton\n if (!this.instance) {\n var crs = new leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Proj.CRS(\"EPSG:27572\", _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get(\"EPSG:27572\"), {\n resolutions: this._getResolutions(),\n origin: this._getOrigin()\n });\n this.instance = crs;\n }\n return this.instance;\n },\n /**\n * resolutions\n *\n * @returns {Number[]} resolutions\n * @private\n */\n _getResolutions: function _getResolutions() {\n var resolutions = [];\n // resolutions issues de la configuration\n if (_Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isConfigLoaded()) {\n var o = _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__[\"default\"].configuration.getTMSConf(\"LAMB2E\");\n if (o && Object.keys(o).length) {\n resolutions = o.nativeResolutions;\n }\n }\n if (resolutions.length) {\n return resolutions;\n }\n\n // FIXME resolution par defaut ???\n return [104579.22454989408, 52277.53235379051, 26135.487078595408, 13066.891381800004, 6533.228604113456, 3266.5595244626675, 1633.2660045974187, 816.6295549860224, 408.31391467683596, 204.15674151090204, 102.07831678324082, 51.0391448966112, 25.519569074269395, 12.759783693647506, 6.379891635966491, 3.18994576530532, 1.5949728694977277, 0.7974864315474559, 0.398743214900604, 0.19937160727567999, 0.099685803696052, 0.049842901818919996];\n },\n /**\n * origine\n *\n * @returns {Number[]} origin\n * @private\n */\n _getOrigin: function _getOrigin() {\n return [0, 12000000];\n }\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AgICAgIGFwaUtleSA6IFwid3F4bGpmdmtsc2Rodmxma2pxZm1scTc4NzY0NVwiXG4gKiAgICB9LFxuICogICAge1xuICogICAgICBhdHRyaWJ1dGlvbiA6IFwidGVzdCBmb3IgbGF5ZXIgT1JUSE9JTUFHRVJZXCIsXG4gKiAgICAgIG9wYWNpdHkgOiAxLFxuICogICAgICB0cmFuc3BhcmVudCA6IHRydWUsXG4gKiAgICAgIG1pblpvb20gOiAxLFxuICogICAgICBtYXhab29tIDogMjFcbiAqICAgICAgLi4uXG4gKiAgICB9KTtcbiAqXG4gKiAgbHlyLmFkZFRvKG1hcCk7IC8vIG91IG1hcC5hZGRMYXllcihseXIpO1xuICovXG4vKiogQHR5cGUge0wuZ2VvcG9ydGFsQ1JTLkVQU0cyNzU3Mn0gKi9cbnZhciBFUFNHMjc1NzIgPSB7XG5cbiAgICAvKipcbiAgICAgKiBpbnN0YW5jZVxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBpbnN0YW5jZSA6IG51bGwsXG5cbiAgICAvKipcbiAgICAgKiBleGVjdXRpb25cbiAgICAgKlxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IGluc3RhbmNlXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBidWlsZCA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgLy8gc2luZ2xldG9uXG4gICAgICAgIGlmICghdGhpcy5pbnN0YW5jZSkge1xuICAgICAgICAgICAgdmFyIGNycyA9IG5ldyBMLlByb2ouQ1JTKFwiRVBTRzoyNzU3MlwiLFxuICAgICAgICAgICAgICAgIFJlZ2lzdGVyLmdldChcIkVQU0c6Mjc1NzJcIiksIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x1dGlvbnMgOiB0aGlzLl9nZXRSZXNvbHV0aW9ucygpLFxuICAgICAgICAgICAgICAgICAgICBvcmlnaW4gOiB0aGlzLl9nZXRPcmlnaW4oKVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdGhpcy5pbnN0YW5jZSA9IGNycztcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLmluc3RhbmNlO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiByZXNvbHV0aW9uc1xuICAgICAqXG4gICAgICogQHJldHVybnMge051bWJlcltdfSByZXNvbHV0aW9uc1xuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgX2dldFJlc29sdXRpb25zIDogZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgcmVzb2x1dGlvbnMgPSBbXTtcbiAgICAgICAgLy8gcmVzb2x1dGlvbnMgaXNzdWVzIGRlIGxhIGNvbmZpZ3VyYXRpb25cbiAgICAgICAgaWYgKENvbmZpZy5pc0NvbmZpZ0xvYWRlZCgpKSB7XG4gICAgICAgICAgICB2YXIgbyA9IENvbmZpZy5jb25maWd1cmF0aW9uLmdldFRNU0NvbmYoXCJMQU1CMkVcIik7XG4gICAgICAgICAgICBpZiAobyAmJiBPYmplY3Qua2V5cyhvKS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICByZXNvbHV0aW9ucyA9IG8ubmF0aXZlUmVzb2x1dGlvbnM7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocmVzb2x1dGlvbnMubGVuZ3RoKSB7XG4gICAgICAgICAgICByZXR1cm4gcmVzb2x1dGlvbnM7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBGSVhNRSByZXNvbHV0aW9uIHBhciBkZWZhdXQgPz8/XG4gICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAxMDQ1NzkuMjI0NTQ5ODk0MDgsXG4gICAgICAgICAgICA1MjI3Ny41MzIzNTM3OTA1MSxcbiAgICAgICAgICAgIDI2MTM1LjQ4NzA3ODU5NTQwOCxcbiAgICAgICAgICAgIDEzMDY2Ljg5MTM4MTgwMDAwNCxcbiAgICAgICAgICAgIDY1MzMuMjI4NjA0MTEzNDU2LFxuICAgICAgICAgICAgMzI2Ni41NTk1MjQ0NjI2Njc1LFxuICAgICAgICAgICAgMTYzMy4yNjYwMDQ1OTc0MTg3LFxuICAgICAgICAgICAgODE2LjYyOTU1NDk4NjAyMjQsXG4gICAgICAgICAgICA0MDguMzEzOTE0Njc2ODM1OTYsXG4gICAgICAgICAgICAyMDQuMTU2NzQxNTEwOTAyMDQsXG4gICAgICAgICAgICAxMDIuMDc4MzE2NzgzMjQwODIsXG4gICAgICAgICAgICA1MS4wMzkxNDQ4OTY2MTEyLFxuICAgICAgICAgICAgMjUuNTE5NTY5MDc0MjY5Mzk1LFxuICAgICAgICAgICAgMTIuNzU5NzgzNjkzNjQ3NTA2LFxuICAgICAgICAgICAgNi4zNzk4OTE2MzU5NjY0OTEsXG4gICAgICAgICAgICAzLjE4OTk0NTc2NTMwNTMyLFxuICAgICAgICAgICAgMS41OTQ5NzI4Njk0OTc3Mjc3LFxuICAgICAgICAgICAgMC43OTc0ODY0MzE1NDc0NTU5LFxuICAgICAgICAgICAgMC4zOTg3NDMyMTQ5MDA2MDQsXG4gICAgICAgICAgICAwLjE5OTM3MTYwNzI3NTY3OTk5LFxuICAgICAgICAgICAgMC4wOTk2ODU4MDM2OTYwNTIsXG4gICAgICAgICAgICAwLjA0OTg0MjkwMTgxODkxOTk5NlxuICAgICAgICBdO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBvcmlnaW5lXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7TnVtYmVyW119IG9yaWdpblxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgX2dldE9yaWdpbiA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIFswLCAxMjAwMDAwMF07XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgRVBTRzI3NTcyO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/CRS/EPSG27572.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/CRS/EPSG4326.js": +/*!*************************************!*\ + !*** ./src/Leaflet/CRS/EPSG4326.js ***! + \*************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Utils/Config */ \"./src/Common/Utils/Config.js\");\n/* harmony import */ var _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/Register */ \"./src/Common/Utils/Register.js\");\n\n\n\n\n// FIXME prototype\n// il ne fonctionne pas car les bbox ne sont pas bien formatées !?\n// > BBOX=xmin,ymin,xmax,ymax --> conversion en EPSG --> BBOX=ymin,xmin,ymax,xmax\n// cf. methode L.TileLayer.WMS.getTileUrl()\n// > inversion des coordonnées si crs = L.CRS.EPSG4326\n// il faudrait donc surcharger cette methode afin qu'elle prenne en compte la condition suivante :\n// > crs.code = \"EPSG:4326\"\n\n/**\n * Projection Geographic (EPSG:4326)\n * (PROTOTYPE)\n *\n * @ignore\n * @module\n * @alias L.geoportalCRS.EPSG2154\n * @returns {L.Proj.CRS}\n * @example\n * var map = L.Map('divmap', {\n * crs : L.geoportalCRS.EPSG4326 // ou L.CRS.EPSG4326\n * }).setView();\n * var lyr = L.geoportalLayer.WMTS(\n * {\n * layer : \"ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO\",\n * apiKey : \"wqxljfvklsdhvlfkjqfmlq787645\"\n * },\n * {\n * attribution : \"test for layer ORTHOIMAGERY\",\n * opacity : 1,\n * transparent : true,\n * minZoom : 1,\n * maxZoom : 21\n * ...\n * });\n *\n * lyr.addTo(map); // ou map.addLayer(lyr);\n */\n/** @type {L.geoportalCRS.EPSG4326} */\nvar EPSG4326 = {\n /**\n * instance\n *\n * @private\n */\n instance: null,\n /**\n * execution\n *\n * @returns {Object} instance\n * @private\n */\n build: function build() {\n // singleton\n if (!this.instance) {\n var crs = new leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Proj.CRS(\"EPSG:4326\", _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get(\"EPSG:4326\"), {\n resolutions: this._getResolutions(),\n origin: [-180, 90] // ???\n });\n\n this.instance = crs;\n }\n return this.instance;\n },\n /**\n * resolutions\n *\n * @returns {Number[]} resolutions\n * @private\n */\n _getResolutions: function _getResolutions() {\n var resolutions = [];\n // resolutions issues de la configuration\n if (_Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isConfigLoaded()) {\n var o = _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__[\"default\"].configuration.getTMSConf(\"WGS84G\");\n resolutions = o.nativeResolutions;\n }\n if (resolutions.length) {\n return resolutions;\n }\n return [1.40625, 0.703125, 0.3515625, 0.17578125, 0.087890625, 0.0439453125, 0.02197265625, 0.010986328125, 0.0054931640625, 0.00274658203125, 0.001373291015625, 0.0006866455078125, 0.00034332275390625, 0.000171661376953126, 0.0000858306884765628, 0.0000429153442382813, 0.0000214576721191407, 0.0000107288360595703, 0.00000536441802978517, 0.00000268220901489259, 0.0000013411045074463, 0.000000670552253723145, 0.00000033527612686157];\n },\n /**\n * origine\n *\n * @private\n */\n _getOrigin: function _getOrigin() {}\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (EPSG4326);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NSUy9FUFNHNDMyNi5qcz83MjkxIl0sIm5hbWVzIjpbIkVQU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4gICAgICAgIGlmICghdGhpcy5pbnN0YW5jZSkge1xuICAgICAgICAgICAgdmFyIGNycyA9IG5ldyBMLlByb2ouQ1JTKFwiRVBTRzo0MzI2XCIsXG4gICAgICAgICAgICAgICAgUmVnaXN0ZXIuZ2V0KFwiRVBTRzo0MzI2XCIpLCB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdXRpb25zIDogdGhpcy5fZ2V0UmVzb2x1dGlvbnMoKSxcbiAgICAgICAgICAgICAgICAgICAgb3JpZ2luIDogWy0xODAsIDkwXSAvLyA/Pz9cbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgdGhpcy5pbnN0YW5jZSA9IGNycztcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLmluc3RhbmNlO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiByZXNvbHV0aW9uc1xuICAgICAqXG4gICAgICogQHJldHVybnMge051bWJlcltdfSByZXNvbHV0aW9uc1xuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgX2dldFJlc29sdXRpb25zIDogZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgcmVzb2x1dGlvbnMgPSBbXTtcbiAgICAgICAgLy8gcmVzb2x1dGlvbnMgaXNzdWVzIGRlIGxhIGNvbmZpZ3VyYXRpb25cbiAgICAgICAgaWYgKENvbmZpZy5pc0NvbmZpZ0xvYWRlZCgpKSB7XG4gICAgICAgICAgICB2YXIgbyA9IENvbmZpZy5jb25maWd1cmF0aW9uLmdldFRNU0NvbmYoXCJXR1M4NEdcIik7XG4gICAgICAgICAgICByZXNvbHV0aW9ucyA9IG8ubmF0aXZlUmVzb2x1dGlvbnM7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocmVzb2x1dGlvbnMubGVuZ3RoKSB7XG4gICAgICAgICAgICByZXR1cm4gcmVzb2x1dGlvbnM7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgMS40MDYyNSx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FNHNDMyNjtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/CRS/EPSG4326.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/CSS/Controls/ElevationPath/GPelevationPathLeaflet.css": +/*!***************************************************************************!*\ + !*** ./src/Leaflet/CSS/Controls/ElevationPath/GPelevationPathLeaflet.css ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NTUy9Db250cm9scy9FbGV2YXRpb25QYXRoL0dQZWxldmF0aW9uUGF0aExlYWZsZXQuY3NzP2QxMmUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvTGVhZmxldC9DU1MvQ29udHJvbHMvRWxldmF0aW9uUGF0aC9HUGVsZXZhdGlvblBhdGhMZWFmbGV0LmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/CSS/Controls/ElevationPath/GPelevationPathLeaflet.css\n"); + +/***/ }), + +/***/ "./src/Leaflet/CSS/Controls/Isochrone/GPisochronLeaflet.css": +/*!******************************************************************!*\ + !*** ./src/Leaflet/CSS/Controls/Isochrone/GPisochronLeaflet.css ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NTUy9Db250cm9scy9Jc29jaHJvbmUvR1Bpc29jaHJvbkxlYWZsZXQuY3NzP2Q1N2IiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvTGVhZmxldC9DU1MvQ29udHJvbHMvSXNvY2hyb25lL0dQaXNvY2hyb25MZWFmbGV0LmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/CSS/Controls/Isochrone/GPisochronLeaflet.css\n"); + +/***/ }), + +/***/ "./src/Leaflet/CSS/Controls/LayerSwitcher/GPlayerSwitcherLeaflet.css": +/*!***************************************************************************!*\ + !*** ./src/Leaflet/CSS/Controls/LayerSwitcher/GPlayerSwitcherLeaflet.css ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NTUy9Db250cm9scy9MYXllclN3aXRjaGVyL0dQbGF5ZXJTd2l0Y2hlckxlYWZsZXQuY3NzPzRmNDkiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvTGVhZmxldC9DU1MvQ29udHJvbHMvTGF5ZXJTd2l0Y2hlci9HUGxheWVyU3dpdGNoZXJMZWFmbGV0LmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/CSS/Controls/LayerSwitcher/GPlayerSwitcherLeaflet.css\n"); + +/***/ }), + +/***/ "./src/Leaflet/CSS/Controls/LocationSelector/GPlocationLeaflet.css": +/*!*************************************************************************!*\ + !*** ./src/Leaflet/CSS/Controls/LocationSelector/GPlocationLeaflet.css ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NTUy9Db250cm9scy9Mb2NhdGlvblNlbGVjdG9yL0dQbG9jYXRpb25MZWFmbGV0LmNzcz8wNjk0Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIiwiZmlsZSI6Ii4vc3JjL0xlYWZsZXQvQ1NTL0NvbnRyb2xzL0xvY2F0aW9uU2VsZWN0b3IvR1Bsb2NhdGlvbkxlYWZsZXQuY3NzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/CSS/Controls/LocationSelector/GPlocationLeaflet.css\n"); + +/***/ }), + +/***/ "./src/Leaflet/CSS/Controls/MousePosition/GPmousePositionLeaflet.css": +/*!***************************************************************************!*\ + !*** ./src/Leaflet/CSS/Controls/MousePosition/GPmousePositionLeaflet.css ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NTUy9Db250cm9scy9Nb3VzZVBvc2l0aW9uL0dQbW91c2VQb3NpdGlvbkxlYWZsZXQuY3NzPzgyNDYiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvTGVhZmxldC9DU1MvQ29udHJvbHMvTW91c2VQb3NpdGlvbi9HUG1vdXNlUG9zaXRpb25MZWFmbGV0LmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/CSS/Controls/MousePosition/GPmousePositionLeaflet.css\n"); + +/***/ }), + +/***/ "./src/Leaflet/CSS/Controls/ReverseGeocoding/GPreverseGeocodingLeaflet.css": +/*!*********************************************************************************!*\ + !*** ./src/Leaflet/CSS/Controls/ReverseGeocoding/GPreverseGeocodingLeaflet.css ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NTUy9Db250cm9scy9SZXZlcnNlR2VvY29kaW5nL0dQcmV2ZXJzZUdlb2NvZGluZ0xlYWZsZXQuY3NzP2I2YzEiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiLi9zcmMvTGVhZmxldC9DU1MvQ29udHJvbHMvUmV2ZXJzZUdlb2NvZGluZy9HUHJldmVyc2VHZW9jb2RpbmdMZWFmbGV0LmNzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/CSS/Controls/ReverseGeocoding/GPreverseGeocodingLeaflet.css\n"); + +/***/ }), + +/***/ "./src/Leaflet/CSS/Controls/Route/GProuteLeaflet.css": +/*!***********************************************************!*\ + !*** ./src/Leaflet/CSS/Controls/Route/GProuteLeaflet.css ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NTUy9Db250cm9scy9Sb3V0ZS9HUHJvdXRlTGVhZmxldC5jc3M/NjNjMCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiIuL3NyYy9MZWFmbGV0L0NTUy9Db250cm9scy9Sb3V0ZS9HUHJvdXRlTGVhZmxldC5jc3MuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Leaflet/CSS/Controls/Route/GProuteLeaflet.css\n"); + +/***/ }), + +/***/ "./src/Leaflet/CSS/Controls/SearchEngine/GPsearchEngineLeaflet.css": +/*!*************************************************************************!*\ + !*** ./src/Leaflet/CSS/Controls/SearchEngine/GPsearchEngineLeaflet.css ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NTUy9Db250cm9scy9TZWFyY2hFbmdpbmUvR1BzZWFyY2hFbmdpbmVMZWFmbGV0LmNzcz9hYzQ1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIiwiZmlsZSI6Ii4vc3JjL0xlYWZsZXQvQ1NTL0NvbnRyb2xzL1NlYXJjaEVuZ2luZS9HUHNlYXJjaEVuZ2luZUxlYWZsZXQuY3NzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/CSS/Controls/SearchEngine/GPsearchEngineLeaflet.css\n"); + +/***/ }), + +/***/ "./src/Leaflet/CSS/GPgeneralWidgetLeaflet.css": +/*!****************************************************!*\ + !*** ./src/Leaflet/CSS/GPgeneralWidgetLeaflet.css ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NTUy9HUGdlbmVyYWxXaWRnZXRMZWFmbGV0LmNzcz82MDExIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIiwiZmlsZSI6Ii4vc3JjL0xlYWZsZXQvQ1NTL0dQZ2VuZXJhbFdpZGdldExlYWZsZXQuY3NzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/CSS/GPgeneralWidgetLeaflet.css\n"); + +/***/ }), + +/***/ "./src/Leaflet/Controls/Controls.js": +/*!******************************************!*\ + !*** ./src/Leaflet/Controls/Controls.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LayerSwitcher */ \"./src/Leaflet/Controls/LayerSwitcher.js\");\n/* harmony import */ var _Isocurve__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Isocurve */ \"./src/Leaflet/Controls/Isocurve.js\");\n/* harmony import */ var _MousePosition__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MousePosition */ \"./src/Leaflet/Controls/MousePosition.js\");\n/* harmony import */ var _ReverseGeocoding__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ReverseGeocoding */ \"./src/Leaflet/Controls/ReverseGeocoding.js\");\n/* harmony import */ var _Route__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Route */ \"./src/Leaflet/Controls/Route.js\");\n/* harmony import */ var _SearchEngine__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SearchEngine */ \"./src/Leaflet/Controls/SearchEngine.js\");\n/* harmony import */ var _ElevationPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ElevationPath */ \"./src/Leaflet/Controls/ElevationPath.js\");\n/* harmony import */ var _Logo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Logo */ \"./src/Leaflet/Controls/Logo.js\");\n\n\n\n\n\n\n\n\n\n/**\n * Geoportal Controls Factory to be used together with Leaflet Maps.\n *\n * @module Controls\n * @alias L.geoportalControl\n * @example\n * var layerSwitcher = L.geoportalControl.LayerSwitcher(options);\n */\nvar Controls = {\n /**\n * Factory function for LayerSwitcher Control creation.\n *\n * @method LayerSwitcher\n * @static\n * @alias L.geoportalControl.LayerSwitcher\n * @param {Object} options - options for function call.\n * @param {String} [options.position] - position of component into the map, 'topleft' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values.\n * @param {Boolean} [options.collapsed = true] - collapse mode, false by default\n * @param {Array} [options.layers] - list of layers to be configured. Each array element is an object, with following properties :\n * @param {Object} [options.layers.layer] - layer object\n * @param {Boolean} [options.layers.display] - display layer in widget layer list\n * @param {Object} [options.layers.config] - layer display config\n * @param {String} [options.layers.config.visibility] - layer visibility on map\n * @param {String} [options.layers.config.title] - layer alias, to be displayed in widget layer list. E.g. : \"Cartes IGN\"\n * @param {String} [options.layers.config.description] - layer description, to be displayed on title hover, or in layer information panel.\n * @param {String} [options.layers.config.quicklookUrl] - link to a quick look image for this layer.\n * @param {Array} [options.layers.config.legends] - array of layer legends. Each array element is an object, with following properties :\n * - url (String, mandatory) : link to a legend\n * - minScaleDenominator (Number, optional) : min scale denominator for legend validity.\n * @param {Array} [options.layers.config.metadata] - array of layer metadata. Each array element is an object, with property url (String, mandatory) : link to a metadata\n * @returns {L.geoportalControl.LayerSwitcher} - LayerSwitcher Object\n * @example\n * layers = [\n * {\n * layer : wms1,\n * display : false,\n * config : {\n * title : \"test layer name 1\",\n * description : \"test layer desc 1\",\n * }\n * }\n * ];\n *\n * options = {\n * position : \"topright\",\n * collapsed : true,\n * layers : layers\n * };\n *\n * var layerSwitcher = L.geoportalControl.LayerSwitcher(options);\n */\n LayerSwitcher: function LayerSwitcher(options) {\n return new _LayerSwitcher__WEBPACK_IMPORTED_MODULE_0__[\"default\"](options);\n },\n /**\n * Factory function for Isocurve Control creation.\n *\n * @method Isocurve\n * @static\n * @alias L.geoportalControl.Isocurve\n * @param {Object} options - Isocurve control options\n * @param {String} [options.apiKey] - API key for services call (isocurve and autocomplete services). The key \"calcul\" is used by default.\n * @param {String} [options.position] - position of component into the map, 'topleft' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values.\n * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Object} [options.exclusions = {\"toll\" : false, \"tunnel\" : false, \"bridge\" : false}] - list of exclusions with status (true = checked), by default : [\"toll\":false, \"tunnel\":false, \"bridge\":false].\n * @param {Array} [options.graphs = [\"Voiture\", \"Pieton\"]] - list of graph resources to be used for isocurve calculation, by default : [\"Voiture\", \"Pieton\"]. The first element is selected.\n * @param {Array} [options.methods = [\"time\", \"distance\"]] - list of methods, by default : [\"time\", \"distance\"]. The first element is selected by default.\n * @param {Array} [options.directions = [\"departure\", \"arrival\"]] - list of directions to be displayed, by default : [\"departure\", \"arrival\"]. The first element is selected by default.\n * Directions enable to specify if input location point will be used as a departure point (\"departure\") or as an arrival point (\"arrival\")\n * @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding\n * @param {Object} [options.isocurveOptions = {}] - isocurve service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~isoCurve Gp.Services.isoCurve}\n * @param {Object} [options.autocompleteOptions = {}] - autocomplete service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~autoComplete Gp.Services.autoComplete}\n * @returns {L.geoportalControl.Isocurve} - Isocurve Object\n * @example\n * var iso = L.geoportalControl.Isocurve({\n * collapsed : false\n * methods : [\"time\", \"distance\"],\n * exclusions : {\n * toll : true,\n * bridge : false,\n * tunnel : true\n * },\n * graphs : [\"Pieton\", \"Voiture\"],\n * isocurveOptions : {},\n * autocompleteOptions : {}\n * });\n */\n Isocurve: function Isocurve(options) {\n return new _Isocurve__WEBPACK_IMPORTED_MODULE_1__[\"default\"](options);\n },\n /**\n * Factory function for Geoportal MousePosition Control creation.\n *\n * @method MousePosition\n * @static\n * @alias L.geoportalControl.MousePosition\n * @param {Object} options - options for function call.\n * @param {String} [options.apiKey] - API key. The \"calcul\" key is used by default.\n * @param {String} [options.position] - position of component into the map, 'bottomleft' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values.\n * @param {Boolean} [options.collapsed = true] - collapse mode, false by default\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Array} [options.systems] - list of projection systems, GEOGRAPHIC, MERCATOR, LAMB93 and LAMB2E by default\n * Each array element (=system) is an object with following properties :\n * @param {String} options.systems.crs - Proj4 crs alias (from proj4 defs). e.g. : \"EPSG:4326\". Required\n * @param {String} [options.systems.label] - CRS label to be displayed in control. Default is crs code (e.g. \"EPSG:4326\")\n * @param {String} [options.systems.type] - CRS units type for coordinates conversion : \"Geographical\" or \"Metric\". Default: \"Metric\"\n * @param {Object} [options.systems.geoBBox] - Aera covered by the system (WGS84 coordinates).\n * @param {Number} options.systems.geoBBox.right - Right bound.\n * @param {Number} options.systems.geoBBox.left - Left bound.\n * @param {Number} options.systems.geoBBox.top - Top bound.\n * @param {Number} options.systems.geoBBox.bottom - Bottom bound.\n * @param {Array} [options.units] - list of units by system, Geographical and Metric by default\n * Values may be \"DEC\" (decimal degrees), \"DMS\" (sexagecimal), \"RAD\" (radians) and \"GON\" (grades) for geographical coordinates,\n * and \"M\" or \"KM\" for metric coordinates\n * @param {Boolean} [options.displayAltitude = true] - active/desactivate the altitude panel, if desactivate, have just the coordinate panel, true by default\n * @param {Boolean} [options.displayCoordinates = true] - active/desactivate the coordinate panel, if desactivate, have just the altitude panel, true by default\n * @param {Boolean} [options.editCoordinates = false] - If true, coordinates from the MousePosition control can be edited by users to re-center the view. False by default.\n * @param {Object} [options.altitude] - elevation configuration\n * @param {Object} [options.altitude.serviceOptions] - options of elevation service. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~getAltitude Gp.Services.getAltitude}\n * @param {Number} [options.altitude.responseDelay] - latency for altitude request, 500 ms by default\n * @param {Number} [options.altitude.triggerDelay] - immobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default\n * @param {Number} [options.altitude.noDataValue] - value used for altitude service no data (default is -99999). In this case, \"---m\" will be displayed instead of \"-99999m\"\n * @param {Number} [options.altitude.noDataValueTolerance] - tolerance for no data value :\n * values in [noDataValue - noDataValueTolerance ; noDataValue + noDataValueTolerance] interval will not be displayed, but \"---m\" will be displayed instead.\n * Default is 90000\n * @returns {L.geoportalControl.MousePosition} - MousePosition Object\n * @example\n * var MousePosition = L.geoportalControl.MousePosition({\n * position : 'bottomleft',\n * collapsed : false,\n * displayAltitude : true,\n * editCoordinates : false,\n * altitude : {\n * triggerDelay : 100,\n * responseDelay : 500,\n * noDataValue : -99999,\n * noDataValueTolerance : 90000,\n * serviceOptions : {}\n * },\n * systems : [\n * {\n * crs : L.CRS.EPSG4326,\n * label : \"Lon,Lat\",\n * type : \"Geographical\"\n * },\n * {\n * crs : L.geoportalCRS.EPSG2154,\n * label : \"Lambert 93\",\n * type : \"Metric\"\n * }\n * ],\n * units : [\"DEC\", \"DMS\"]\n * });\n */\n MousePosition: function MousePosition(options) {\n return new _MousePosition__WEBPACK_IMPORTED_MODULE_2__[\"default\"](options);\n },\n /**\n * Factory function for Geoportal ReverseGeocode Control creation.\n *\n * @method ReverseGeocode\n * @static\n * @alias L.geoportalControl.ReverseGeocode\n * @extends {L.Control}\n * @param {Object} options - ReverseGeocoding control options\n * @param {String} [options.apiKey] - API key for services call (reverse geocode service). The \"calcul\" key is used by default.\n * @param {String} [options.position] - position of component into the map, 'topleft' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values.\n * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Array} [options.resources = [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"]] - resources for geocoding, by default : [\"StreetAddress\", \"PositionOfInterest\"]\n * @param {Array} [options.delimitations = [\"Point\", \"Circle\", \"Extent\"]] - delimitations for reverse geocoding, by default : [\"Point\", \"Circle\", \"Extent\"]\n * @param {Object} [options.ReverseGeocodeOptions = {}] - reverse geocode service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~reverseGeocode Gp.Services.reverseGeocode} to know all reverse geocode options.\n * @returns {L.geoportalControl.ReverseGeocode} - ReverseGeocode Object\n * @fires reverse:onclickresult\n * @example\n * var reverse = L.geoportalControl.ReverseGeocode({\n * collapsed : false,\n * position : \"topright\",\n * resources : [\"StreetAddress\", \"PositionOfInterest\"],\n * delimitations : [\"Point\", \"Circle\"],\n * reverseGeocodeOptions : {}\n * });\n * reverse.on(\"reverse:onclickresult\", function (e) {\n * console.log(e.data):\n * });\n */\n ReverseGeocode: function ReverseGeocode(options) {\n return new _ReverseGeocoding__WEBPACK_IMPORTED_MODULE_3__[\"default\"](options);\n },\n /**\n * Factory function for Geoportal Route Control creation.\n *\n * @method Route\n * @static\n * @alias L.geoportalControl.Route\n * @extends {L.Control}\n * @param {Object} options - options for function call.\n * @param {String} [options.apiKey] - API key. The \"calcul\" key is used by default.\n * @param {String} [options.position = \"topleft\"] - position of component into the map, 'topleft' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values.\n * @param {Boolean} [options.collapsed = false] - collapse mode, false by default\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding when entering points.\n * Active by default. But, you can disable it when entering with the \"ctrl\" key on the keyboard\n * @param {Object} [options.exclusions = {\"toll\" : false, \"tunnel\" : false, \"bridge\" : false}] - list of exclusions with status\n * @param {Array} [options.graphs = [\"Voiture\", \"Pieton\"]] - list of resources, by default : [\"Voiture\", \"Pieton\"], and the first element is selected.\n * @param {Object} [options.autocompleteOptions = {}] - options of autocomplete service. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~autoComplete Gp.Services.autoComplete}\n * @param {Object} [options.routeOptions = {}] - options of route service. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~route Gp.Services.route}\n * @returns {L.geoportalControl.Route} - Route Object\n * @example\n * var route = L.geoportalControl.Route({\n * position : \"topright\",\n * collapsed : true,\n * exclusions : {\n * \"toll\" : true,\n * \"bridge\" : false,\n * \"tunnel\" : true\n * },\n * graphs : ['Pieton', 'Voiture'],\n * autocompleteOptions : {},\n * routeOptions : {}\n * });\n */\n Route: function Route(options) {\n return new _Route__WEBPACK_IMPORTED_MODULE_4__[\"default\"](options);\n },\n /**\n * Factory function for Geoportal SearchEngine Control creation.\n *\n * @method SearchEngine\n * @static\n * @alias L.geoportalControl.SearchEngine\n * @extends {L.Control}\n * @param {Object} options - control options\n * @param {String} [options.apiKey] - API key. The \"calcul\" key is used by default.\n * @param {Boolean} [options.collapsed = false] - collapse mode\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {String} [options.position = \"topleft\"] - position of component into the map. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values.\n * @param {String} [options.placeholder = \"Rechercher un lieu, une adresse\"] - set placeholder in search bar\n * @param {Boolean} [options.displayMarker = true] - set a marker on search result\n * @param {String|Object} [options.markerStyle = \"blue\"] - set a marker style. Currently possible values are \"blue\" (default value), \"orange\", \"red\" and \"green\". But you can use an L.Icon object (see {@link http://leafletjs.com/reference-1.2.0.html#icon L.Icon })\n * @param {Boolean} [options.displayInfo = true] - get informations on popup marker\n * @param {String|Numeric|Function} [options.zoomTo] - zoom to results, by default, current zoom.\n * possible values : \"auto\", any fixed zoom level or a function retruning a zoom :\n *\n * ```\n * zoomTo : function (info) {\n * // do some stuff...\n * return zoom; // required : return the zoom level !\n * }\n *\n * With parameter 'info' : {\n * type : \"PositionOfInterest\" | \"StreetAddress\" | ...\n * service : \"SuggestedLocation\" | \"GeocodedLocation\"\n * fields : { // fields of service response }\n * }\n * ```\n * @param {String} [options.apiKey] - API key. The \"calcul\" key is used by default.\n * @param {Object} [options.resources] - resources to be used by geocode and autocompletion services, by default : [\"StreetAddress\", \"PositionOfInterest\"]\n * @param {Boolean} [options.displayAdvancedSearch] - False to disable advanced search tools (it will not be displayed). Default is true (displayed)\n * @param {Object} [options.advancedSearch] - advanced search for geocoding (filters)\n * @param {Object} [options.geocodeOptions] - options of geocode service. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~geocode Gp.Services.geocode}\n * @param {Object} [options.autocompleteOptions] - options of autocomplete service. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~autoComplete Gp.Services.autoComplete}\n * @param {Object} [options.autocompleteOptions.serviceOptions] - options of autocomplete service\n * @param {Boolean} [options.autocompleteOptions.triggerGeocode = false] - trigger a geocoding request if the autocompletion does not return any suggestions, false by default\n * @param {Number} [options.autocompleteOptions.triggerDelay = 1000] - waiting time before sending the geocoding request, 1000ms by default\n * @returns {L.geoportalControl.SearchEngine} - SearchEngine Object\n * @fires searchengine:autocomplete:click\n * @fires searchengine:geocode:click\n * @example\n * var SearchEngine = L.geoportalControl.SearchEngine({\n * position : \"topright\",\n * collapsed : true,\n * zoomTo : \"auto\",\n * displayInfo : true,\n * displayAdvancedSearch : true,\n * resources : [\"PositionOfInterest\", \"StreetAddress\"],\n * advancedSearch : {\n * PositionOfInterest : [{name : \"municipality\", title : \"Ville\"}],\n * StreetAddress : [{...}],\n * CadastralParcel : null,\n * },\n * apiKey : \"zfgzrgffg57rfg8ar7gr4g5r4\",\n * geocodeOptions : {},\n * autocompleteOptions : {}\n * });\n * SearchEngine.on(\"searchengine:autocomplete:click\", function (e) {\n * console.log(e.data):\n * });\n * SearchEngine.on(\"searchengine:geocode:click\", function (e) {\n * console.log(e.data):\n * });\n */\n SearchEngine: function SearchEngine(options) {\n return new _SearchEngine__WEBPACK_IMPORTED_MODULE_5__[\"default\"](options);\n },\n /**\n * Factory function for ElevationPath Control creation.\n *\n * @method ElevationPath\n * @static\n * @alias L.geoportalControl.ElevationPath\n * @param {Object} options - options for function call.\n * @param {String} [options.apiKey] - API key for elevation service call, mandatory if configuration service has not been loaded in advance. See {@link https://github.com/IGNF/geoportal-extensions/blob/master/README-leaflet.md#user-content-config \"Configuration de l'accès à la plateforme Géoportail\" documentation chapter} for more information.\n * @param {String} [options.position] - position of component into the map, 'topleft' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.active = false] - specify if control should be actived at startup. Default is false.\n * @param {Object} [options.stylesOptions = DEFAULT_STYLES] - Styles to use when drawing. see [leaflet options](http://leafletjs.com/reference.html#path-options) for available properties.\n * @param {Object} [options.elevationPathOptions = {}] - elevation path service options. See {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~getAltitude options} for available options\n * @param {Object} [options.displayProfileOptions = {}] - profile options.\n * @param {Function} [options.displayProfileOptions.apply] - function to display profile if you want to cutomise it. By default, [DISPLAY_PROFILE_BY_DEFAULT()](./L.geoportalControl.ElevationPath.html#.DISPLAY_PROFILE_BY_DEFAULT) is used. Helper functions to use with D3 [DISPLAY_PROFILE_LIB_D3()](./L.geoportalControl.ElevationPath.html#.DISPLAY_PROFILE_LIB_D3) or AmCharts [DISPLAY_PROFILE_LIB_AMCHARTS()](./L.geoportalControl.ElevationPath.html#.DISPLAY_PROFILE_LIB_AMCHARTS) frameworks are also provided. You may also provide your own function.\n * @param {Object} [options.displayProfileOptions.target] - DOM container to use to display the profile.\n * @param {Boolean} [options.displayProfileOptions.greaterSlope = true] - display the greater slope into the graph\n * @param {Boolean} [options.displayProfileOptions.meanSlope = true] - display the mean slope into the graph\n * @param {Boolean} [options.displayProfileOptions.ascendingElevation = true] - display the ascending elevation into the graph\n * @param {Boolean} [options.displayProfileOptions.descendingElevation = true] - display the descending elevation into the graph\n * @param {Boolean} [options.displayProfileOptions.currentSlope = true] - display current slope value on profile mouseover\n *\n * @returns {L.geoportalControl.ElevationPath} - ElevationPath Object\n * @example\n * var e = L.geoportalControl.ElevationPath({\n * active : false\n * position : \"topleft\"\n * stylesOptions : {},\n * elevationPathOptions : {},\n * displayProfileOptions : {\n * apply : L.geoportalControl.DISPLAY_PROFILE_LIB_AMCHARTS\n * target : null, // by default\n * meanSlope : true, // by default\n * greaterSlope : true, // by default\n * ascendingElevation : false,\n * descendingElevation : false,\n * currentSlope : false\n * }\n * });\n */\n ElevationPath: function ElevationPath(options) {\n return new _ElevationPath__WEBPACK_IMPORTED_MODULE_6__[\"default\"](options);\n },\n /**\n * Control Logo\n *\n * @private\n * @method Logo\n * @extends {L.Control}\n * @alias L.geoportalControl.Logo\n * @param {Object} options - options for function call.\n * @param {String} options.position - 'topright' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values.\n * @param {String} options.url - URL\n * @param {String} options.text - text\n * @param {String} options.picto - picto\n * @param {String|Object} options.size - picto size\n * @returns {Logo} - Logo Object\n * @example\n * var map = L.map('map').setView([48, 2], 4);\n * var logo = L.geoportalControl.Logo({\n * position : \"topright\",\n * picto : \"http://www.ign.fr/logo-ign.jpg\",\n * url : \"http://www.ign.fr\",\n * text : \"© IGN\"\n * size : {width : '50px', height : '30px'}\n * });\n * logo.addTo(map);\n */\n Logo: function Logo(options) {\n return new _Logo__WEBPACK_IMPORTED_MODULE_7__[\"default\"](options);\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Controls);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL0NvbnRyb2xzLmpzPzYxOGIiXSwibmFtZXMiOlsiQ29udHJvbHMiLCJMYXllclN3aXRjaGVyIiwib3B0aW9ucyIsIklzb2N1cnZlIiwiTW91c2VQb3NpdGlvbiIsIlJldmVyc2VHZW9jb2RlIiwiUmV2ZXJzZUdlb2NvZGluZyIsIlJvdXRlIiwiU2VhcmNoRW5naW5lIiwiRWxldmF0aW9uUGF0aCIsIkxvZ28iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUE0QztBQUNWO0FBQ1U7QUFDTTtBQUN0QjtBQUNjO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ayB0byBhIGxlZ2VuZFxuICAgICAqICAgICAgLSBtaW5TY2FsZURlbm9taW5hdG9yIChOdW1iZXIsIG9wdGlvbmFsKSA6IG1pbiBzY2FsZSBkZW5vbWluYXRvciBmb3IgbGVnZW5kIHZhbGlkaXR5LlxuICAgICAqIEBwYXJhbSB7QXJyYXl9IFtvcHRpb25zLmxheWVycy5jb25maWcubWV0YWRhdGFdIC0gYXJyYXkgb2YgbGF5ZXIgbWV0YWRhdGEuIEVhY2ggYXJyYXkgZWxlbWVudCBpcyBhbiBvYmplY3QsIHdpdGggcHJvcGVydHkgdXJsIChTdHJpbmcsIG1hbmRhdG9yeSkgOiBsaW5rIHRvIGEgbWV0YWRhdGFcbiAgICAgKiBAcmV0dXJucyB7TC5nZW9wb3J0YWxDb250cm9sLkxheWVyU3dpdGNoZXJ9IC0gTGF5ZXJTd2l0Y2hlciBPYmplY3RcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqICBsYXllcnMgPSBbXG4gICAgICogICAgICB7XG4gICAgICogICAgICAgICAgbGF5ZXIgOiB3bXMxLFxuICAgICAqICAgICAgICAgIGRpc3BsYXkgOiBmYWxzZSxcbiAgICAgKiAgICAgICAgICBjb25maWcgOiB7XG4gICAgICogICAgICAgICAgICAgIHRpdGxlIDogXCJ0ZXN0IGxheWVyIG5hbWUgMVwiLFxuICAgICAqICAgICAgICAgICAgICBkZXNjcmlwdGlvbiA6IFwidGVzdCBsYXllciBkZXNjIDFcIixcbiAgICAgKiAgICAgICAgICB9XG4gICAgICogICAgICB9XG4gICAgICogIF07XG4gICAgICpcbiAgICAgKiAgb3B0aW9ucyA9IHtcbiAgICAgKiAgICAgIHBvc2l0aW9uIDogXCJ0b3ByaWdodFwiLFxuICAgICAqICAgICAgY29sbGFwc2VkIDogdHJ1ZSxcbiAgICAgKiAgICAgIGxheWVycyA6IGxheWVyc1xuICAgICAqICB9O1xuICAgICAqXG4gICAgICogIHZhciBsYXllclN3aXRjaGVyID0gTC5nZW9wb3J0YW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GUtU2VydmljZXMuaHRtbCN+YXV0b0NvbXBsZXRlIEdwLlNlcnZpY2VzLmF1dG9Db21wbGV0ZX1cbiAgICAgKiBAcmV0dXJucyB7TC5nZW9wb3J0YWxDb250cm9sLklzb2N1cnZlfSAtIElzb2N1cnZlIE9iamVjdFxuICAgICAqIEBleGFtcGxlXG4gICAgICogIHZhciBpc28gPSBMLmdlb3BvcnRhbENvbnRyb2wuSXNvY3VydmUoe1xuICAgICAqICAgICAgY29sbGFwc2VkIDogZmFsc2VcbiAgICAgKiAgICAgIG1ldGhvZHMgOiBbXCJ0aW1lXCIsIFwiZGlzdGFuY2VcIl0sXG4gICAgICogICAgICBleGNsdXNpb25zIDoge1xuICAgICAqICAgICAgICAgdG9sbCA6IHRydWUsXG4gICAgICogICAgICAgICBicmlkZ2UgOiBmYWxzZSxcbiAgICAgKiAgICAgICAgIHR1bm5lbCA6IHRydWVcbiAgICAgKiAgICAgIH0sXG4gICAgICogICAgICBncmFwaHMgOiBbXCJQaWV0b25cIiwgXCJWb2l0dXJlXCJdLFxuICAgICAqICAgICAgaXNvY3VydmVPcHRpb25zIDoge30sXG4gICAgICogICAgICBhdXRvY29tcGxldGVPcHRpb25zIDoge31cbiAgICAgKiAgfSk7XG4gICAgICovXG4gICAgSXNvY3VydmUgOiBmdW5jdGlvbiAob3B0aW9ucykge1xuICAgICAgICByZXR1cm4gbmV3IElzb2N1cnZlKG9wdGlvbnMpO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBGYWN0b3J5IGZ1bmN0aW9uIGZvciBHZW9wb3J0YWwgTW91c2VQb3NpdGlvbiBDb250cm9sIGNyZWF0aW9uLlxuICAgICAqXG4gICAgICogQG1ldGhvZCBNb3VzZVBvc2l0aW9uXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBhbGlhcyBMLmdlb3BvcnRhbENvbnRyb2wuTW91c2VQb3NpdGlvblxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvcHRpb25zIC0gb3B0aW9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CIsXG4gICAgICogICB1cmwgOiBcImh0dHA6Ly93d3cuaWduLmZyXCIsXG4gICAgICogICB0ZXh0IDogXCLCqSBJR05cIlxuICAgICAqICAgc2l6ZSA6IHt3aWR0aCA6ICc1MHB4JywgaGVpZ2h0IDogJzMwcHgnfVxuICAgICAqIH0pO1xuICAgICAqIGxvZ28uYWRkVG8obWFwKTtcbiAgICAgKi9cbiAgICBMb2dvIDogZnVuY3Rpb24gKG9wdGlvbnMpIHtcbiAgICAgICAgcmV0dXJuIG5ldyBMb2dvKG9wdGlvbnMpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IENvbnRyb2xzO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/Controls.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Controls/ElevationPath.js": +/*!***********************************************!*\ + !*** ./src/Leaflet/Controls/ElevationPath.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var leaflet_draw__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! leaflet-draw */ \"./node_modules/leaflet-draw/dist/leaflet.draw-src.js\");\n/* harmony import */ var leaflet_draw__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(leaflet_draw__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Utils/PositionFormater */ \"./src/Leaflet/Controls/Utils/PositionFormater.js\");\n/* harmony import */ var _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Utils/IconDefault */ \"./src/Leaflet/Controls/Utils/IconDefault.js\");\n/* harmony import */ var _Common_Controls_ElevationPathDOM__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/Controls/ElevationPathDOM */ \"./src/Common/Controls/ElevationPathDOM.js\");\n/* harmony import */ var _Common_Controls_ProfileElevationPathDOM__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Common/Controls/ProfileElevationPathDOM */ \"./src/Common/Controls/ProfileElevationPathDOM.js\");\n/* globals AmCharts, d3 */\n\n\n\n\n\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getLogger(\"ElevationPath\");\n\n/**\n * @classdesc\n *\n * Leaflet Control Class to compute and display Profil Elevation.\n *\n * Use {@link module:Controls.ElevationPath L.geoportalControl.ElevationPath()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.Control native class.\n *\n * @namespace\n * @alias L.geoportalControl.ElevationPath\n */\nvar ElevationPath = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends L.geoportalControl.ElevationPath.prototype */{\n includes: _Common_Controls_ElevationPathDOM__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n /**\n * Options du service\n *\n * @private\n */\n options: {\n position: \"topleft\",\n active: false,\n elevationPathOptions: {},\n stylesOptions: {},\n displayProfileOptions: {\n greaterSlope: true,\n meanSlope: true,\n ascendingElevation: true,\n descendingElevation: true,\n currentSlope: true,\n apply: null,\n target: null\n }\n },\n /**\n * @constructor ElevationPath\n *\n * @private\n * @param {Object} options - ElevationPath control options\n * @param {String} [options.apiKey] - API key for services call (isocurve and autocomplete services). The \"calcul\" key is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.active] - Specify if widget has to be actived to drawing (true) or not (false) on map loading. Default is false.\n * @param {Object} [options.elevationPathOptions = {}] - elevation service options. See {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~getAltitude Gp.Services.getAltitude()} to know all elevation options\n * @param {Object} [options.displayProfileOptions = {}] - profile options.\n * @param {Function} [options.displayProfileOptions.apply] - function to display profil panel.\n * @param {Object} [options.displayProfileOptions.target] - container DOM for the profil panel.\n * @param {Boolean} [options.displayProfileOptions.greaterSlope = true] - display the greater slope into the graph\n * @param {Boolean} [options.displayProfileOptions.meanSlope = true] - display the mean slope into the graph\n * @param {Boolean} [options.displayProfileOptions.ascendingElevation = true] - display the ascending elevation into the graph\n * @param {Boolean} [options.displayProfileOptions.descendingElevation = true] - display the descending elevation into the graph\n * @param {Boolean} [options.displayProfileOptions.currentSlope = true] - display current slope value on profile mouseover\n *\n * @example\n * var e = L.geoportalControl.ElevationPath({\n * active : false,\n * stylesOptions : {},\n * elevationPathOptions : {},\n * displayProfileOptions : {\n * apply : null,\n * target : null\n * }\n * });\n * Exemples :\n * - displayProfileOptions.apply : null\n * - displayProfileOptions.apply : function (elevations, container, context) { // do some stuff... }\n * - displayProfileOptions.apply : ol.control.ElevationPath.DISPLAY_PROFILE_{LIB_AMCHARTS | LIB_D3 | RAW}\n * (detect auto lib. : d3 / AmCharts)\n */\n initialize: function initialize(options) {\n // on transmet les options au controle\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.setOptions(this, options);\n\n // uuid\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__[\"default\"].generate();\n\n // initialisation\n this._initDisplayProfileOptions();\n\n // les container\n this._showContainer = null;\n this._pictoContainer = null;\n this._panelContainer = null;\n this._profilContainer = null;\n this._waitingContainer = null;\n this._infoContainer = null;\n\n // timer sur la fenetre d'informations des données\n this._timerHdlr = null;\n\n // detection si le panneau est reduit\n this._reducePanel = false;\n\n // couche vectorielle dans laquelle seront saisis les points (features ci-dessus)\n this._featuresLayer = null;\n this._lastIdLayer = 0;\n this._currentIdLayer = 0;\n this._currentFeature = null;\n\n // graph\n this._profile = null;\n this._marker = null;\n\n // geometry à transmettre au service : { lon : [], lat : []}\n this._geometry = null;\n\n // distance du segment\n this._distance = 0;\n\n // data elevations\n this._data = {};\n },\n /**\n * this method is called by this.addTo(map) when the control is added on the map\n * and fills variable 'this._container = this.onAdd(map)',\n * and create or disable events on map.\n *\n * @param {Object} map - the map\n *\n * @returns {DOMElement} DOM element\n * @private\n */\n onAdd: function onAdd(map) {\n // initialisation du DOM du composant\n var container = this._container = this._initLayout();\n if (map) {\n // lors de l'ajout à la map, on active la saisie du point,\n // mais seulement si le widget est ouvert\n if (this.options.active) {\n if (this._profile === null) {\n this._panelContainer.style.display = \"none\";\n // this._panelContainer.style.visibility = \"hidden\";\n }\n\n this._activateMapInteraction(map);\n }\n }\n\n // deactivate of events that may interfere with the map\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container);\n return container;\n },\n /**\n * TODO this method is called when the control is removed from the map\n * and removes events on map.\n *\n * @private\n */\n onRemove: function onRemove( /* map */) {},\n // ################################################################### //\n // ####################### init application ########################## //\n // ################################################################### //\n\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initDisplayProfileOptions: function _initDisplayProfileOptions() {\n // gestion de l'affichage du profil\n var _profileOpts = this.options.displayProfileOptions;\n\n // gestion de la fonction du profil\n var displayFunction = _profileOpts.apply;\n _profileOpts.apply = typeof displayFunction === \"function\" ? displayFunction : ElevationPath.DISPLAY_PROFILE_BY_DEFAULT;\n\n // gestion du container du profil\n var displayContainer = _profileOpts.target;\n _profileOpts.target = typeof displayContainer !== \"undefined\" ? displayContainer : null;\n\n // les autres options\n var _protoOpts = Object.getPrototypeOf(this.options);\n if (typeof _profileOpts.meanSlope === \"undefined\") {\n _profileOpts.meanSlope = _protoOpts.displayProfileOptions.meanSlope;\n }\n if (typeof _profileOpts.greaterSlope === \"undefined\") {\n _profileOpts.greaterSlope = _protoOpts.displayProfileOptions.greaterSlope;\n }\n if (typeof _profileOpts.ascendingElevation === \"undefined\") {\n _profileOpts.ascendingElevation = _protoOpts.displayProfileOptions.ascendingElevation;\n }\n if (typeof _profileOpts.descendingElevation === \"undefined\") {\n _profileOpts.descendingElevation = _protoOpts.displayProfileOptions.descendingElevation;\n }\n if (typeof _profileOpts.currentSlope === \"undefined\") {\n _profileOpts.currentSlope = _protoOpts.displayProfileOptions.currentSlope;\n }\n },\n // ################################################################### //\n // ########################### init dom ############################## //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd(map)\n * and initialize the container HTMLElement\n *\n * @returns {DOMElement} DOM element\n * @private\n */\n _initLayout: function _initLayout() {\n // create main container\n var container = this._createMainContainerElement();\n var inputShow = this._showContainer = this._createShowElevationPathElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (this.options.active) {\n this._showContainer.checked = true;\n }\n var picto = this._pictoContainer = this._createShowElevationPathPictoElement();\n container.appendChild(picto);\n\n // panneau\n var panel = this._panelContainer = this._createElevationPathPanelElement();\n\n // header\n var header = this._createElevationPathPanelHeaderElement();\n panel.appendChild(header);\n\n // profil\n var profil = this._profilContainer = this._createElevationPathPanelProfilElement();\n panel.appendChild(profil);\n\n // waiting\n var waiting = this._waitingContainer = this._createElevationPathWaitingElement();\n panel.appendChild(waiting);\n\n // info\n var info = this._infoContainer = this._createElevationPathInformationsElement();\n panel.appendChild(info);\n container.appendChild(panel);\n return container;\n },\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on '' picto\n * and ...\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onShowElevationPathClick: function onShowElevationPathClick(e) {\n logger.trace(e);\n var map = this._map;\n\n // interactions avec la carte\n if (!this._reducePanel) {\n if (this._showContainer.checked) {\n this._pictoContainer.style.display = \"block\";\n this._panelContainer.style.display = \"none\";\n this._removeMapInteraction(map);\n this._clear();\n } else {\n if (this._profile === null) {\n this._panelContainer.style.display = \"none\";\n }\n this._activateMapInteraction(map);\n }\n } else {\n if (this._profile !== null) {\n if (this.options.displayProfileOptions.target === null) {\n this._pictoContainer.style.display = \"none\";\n }\n this._panelContainer.style.display = \"block\";\n }\n }\n this._reducePanel = false;\n },\n /**\n * this method is called by event 'click' on '' picto\n * (cf. this.),\n * and reduce the panel\n *\n * @private\n */\n onReduceElevationPathPanelClick: function onReduceElevationPathPanelClick() {\n this._reducePanel = true;\n this._pictoContainer.style.display = \"block\";\n this._panelContainer.style.display = \"none\";\n },\n /**\n * this method is called by event 'click' on '' picto\n * (cf. this.),\n * and display the panel info\n * TODO\n *\n * @private\n */\n onOpenElevationPathInfoClick: function onOpenElevationPathInfoClick() {\n // options d'affichage\n var meanSlope = this.options.displayProfileOptions.meanSlope;\n var greaterSlope = this.options.displayProfileOptions.greaterSlope;\n var ascendingElevation = this.options.displayProfileOptions.ascendingElevation;\n var descendingElevation = this.options.displayProfileOptions.descendingElevation;\n\n // clean\n var div = this._infoContainer;\n if (div.childElementCount) {\n while (div.firstChild) {\n div.removeChild(div.firstChild);\n }\n }\n\n // creation des infomations\n\n if (ascendingElevation) {\n this._addElevationPathInformationsItem(\"Dénivelé positif : \" + this._data.ascendingElevation.toLocaleString() + \" m\");\n }\n if (descendingElevation) {\n this._addElevationPathInformationsItem(\"Dénivelé négatif : \" + this._data.descendingElevation.toLocaleString() + \" m\");\n }\n if (meanSlope) {\n this._addElevationPathInformationsItem(\"Pente moyenne : \" + this._data.meanSlope.toLocaleString() + \" %\");\n }\n if (greaterSlope) {\n this._addElevationPathInformationsItem(\"Plus forte pente : \" + this._data.greaterSlope.toLocaleString() + \" %\");\n }\n\n // show des informations !\n if (div.className === \"GPelevationPathInformationsContainerVisible\") {\n clearTimeout(this._timerHdlr);\n div.className = \"GPelevationPathInformationsContainerHidden\";\n } else {\n div.className = \"GPelevationPathInformationsContainerVisible\";\n }\n\n // hidden des informations !\n this._timerHdlr = setTimeout(function () {\n div.className = \"GPelevationPathInformationsContainerHidden\";\n }, 4000);\n },\n // ################################################################### //\n // ################### Map interactions management ################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onShowElevationPathClick,\n * and calls method corresponding to current delimitation, if widget is not collapsed.\n *\n * @param {Object} map - control map.\n * @private\n */\n _activateMapInteraction: function _activateMapInteraction(map) {\n logger.info(\"_activateMapInteraction()\");\n\n // Creation de la couche vectorielle sur laquelle on va dessiner\n if (this._featuresLayer === null) {\n this._featuresLayer = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.FeatureGroup();\n map.addLayer(this._featuresLayer);\n var self = this;\n /* evenements : on desactive le menu systeme pour la saisie */\n map.on(\"contextmenu\", function () {});\n\n /* evenement sur la carte lors d'une saisie,\n on y ajoute le layer, et on y stocke les coordonnées */\n map.on(\"draw:created\", function (e) {\n logger.trace(\"draw:created\");\n self._currentIdLayer = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.stamp(e.layer);\n self._getFeatureGeometry(e.layer);\n self._addFeatureLayer(e.layer);\n });\n\n /* evenements */\n map.on(\"draw:drawstart\", function () {\n logger.trace(\"draw:drawstart\");\n self._removeFeatureLayer(self._lastIdLayer);\n self._lastIdLayer = self._currentIdLayer;\n });\n\n /* evenements */\n map.on(\"draw:drawstop\", function () {\n logger.trace(\"draw:drawstop\");\n if (typeof self.options.elevationPathOptions.onSuccess === \"undefined\" && self.options.displayProfileOptions.target === null) {\n self._pictoContainer.style.display = \"none\";\n self._panelContainer.style.display = \"block\";\n }\n self._altiRequest();\n });\n }\n this._activatePolyLineInteraction(map);\n },\n /**\n * remove draw interaction from map (if exists)\n *\n * @param {Object} map - control map.\n * @private\n */\n _removeMapInteraction: function _removeMapInteraction(map) {\n if (!map) {\n return;\n }\n if (this._featuresLayer !== null) {\n map.off(\"draw:created\");\n map.off(\"draw:drawstart\");\n map.off(\"draw:drawstop\");\n map.removeLayer(this._featuresLayer);\n this._featuresLayer = null;\n }\n this._lastIdLayer = this._currentIdLayer = 0;\n\n // FIXME delete this._currentFeature ?\n if (this._currentFeature) {\n this._currentFeature.disable();\n }\n },\n /**\n * this method is called by this._activateMapInteraction,\n * and creates map polyline drawing interaction.\n *\n * @param {Object} map - control map.\n * @private\n */\n _activatePolyLineInteraction: function _activatePolyLineInteraction(map) {\n if (this._currentFeature) {\n this._currentFeature.disable();\n }\n\n // liste des options par defaut\n // cf. https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html\n // var polylineOptions = {\n // allowIntersection : true,\n // repeatMode : false,\n // drawError : {\n // color : \"#b00b00\",\n // timeout : 2500\n // },\n // icon : new L.DivIcon({\n // iconSize : new L.Point(8, 8),\n // className : 'leaflet-div-icon leaflet-editing-icon'\n // }),\n // touchIcon : new L.DivIcon({\n // iconSize : new L.Point(20, 20),\n // className : 'leaflet-div-icon leaflet-editing-icon leaflet-touch-icon'\n // }),\n // guidelineDistance : 20,\n // maxGuideLineLength : 4000,\n // shapeOptions : {\n // stroke : true,\n // color : '#f06eaa',\n // weight : 4,\n // opacity : 0.5,\n // fill : false,\n // clickable : true\n // },\n // metric : true, // Whether to use the metric measurement system or imperial\n // feet : true, // When not metric, to use feet instead of yards for display.\n // nautic : false, // When not metric, not feet use nautic mile for display\n // showLength : true, // Whether to display distance in the tooltip\n // zIndexOffset : 2000 // This should be > than the highest z-index any map layersallowIntersection : true,\n // };\n\n var styles = this.options.stylesOptions || {};\n var _shapeOptions = Object.keys(styles).length !== 0 ? styles : {\n stroke: true,\n color: \"#C77A04\",\n weight: 4,\n opacity: 0.5,\n fill: false\n };\n this._currentFeature = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Draw.Polyline(map, {\n shapeOptions: _shapeOptions\n });\n this._currentFeature.enable();\n },\n /**\n * set current position of feature\n *\n * @param {Object} layer - layer\n * @private\n */\n _getFeatureGeometry: function _getFeatureGeometry(layer) {\n // on transmet toujours des coordonnées au service en EPSG:4326\n logger.log(layer.getLatLngs());\n if (this._geometry !== null) {\n this._geometry = null;\n }\n this._geometry = [];\n this._distance = 0;\n var geometry = layer.getLatLngs();\n for (var i = 0; i < geometry.length; i++) {\n // on transmet au service des coordonnées en EPSG:4326\n var LatLngI = geometry[i];\n var LatLngJ = geometry[i + 1];\n this._geometry.push({\n lon: LatLngI.lng,\n lat: LatLngI.lat\n });\n // on calcul la distance du segment\n if (LatLngJ) {\n this._distance += LatLngI.distanceTo(LatLngJ);\n }\n }\n logger.log(\"Geometry\", this._geometry);\n logger.log(\"Distance\", this._distance);\n },\n /**\n * set current layer of feature\n *\n * @param {Object} layer - layer\n * @private\n */\n _addFeatureLayer: function _addFeatureLayer(layer) {\n if (!this._featuresLayer) {\n return;\n }\n this._featuresLayer.addLayer(layer);\n },\n /**\n * remove layer feature from group\n *\n * @param {Integer} id - id\n * @private\n */\n _removeFeatureLayer: function _removeFeatureLayer(id) {\n if (!this._featuresLayer) {\n return;\n }\n if (id === 0) {\n return;\n }\n if (!id) {\n this._featuresLayer.clearLayers();\n } else {\n this._featuresLayer.removeLayer(id);\n }\n },\n // ################################################################### //\n // ############################ Alti request ######################### //\n // ################################################################### //\n\n /**\n * this methode is called by this. method,\n * it generates and sends alti request, then displays results\n *\n * @private\n */\n _altiRequest: function _altiRequest() {\n logger.log(\"_altiRequest\");\n\n // les coordonnées sont obligatoires\n if (!this._geometry) {\n logger.log(\"missing position\");\n return;\n }\n\n // on construit les options pour la requête\n var options = {};\n\n // on surcharge avec les options de l'utilisateur\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.elevationPathOptions);\n\n // au cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle, sinon la clé \"calcul\" est utilisée par défaut.\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n apiKey: options.apiKey || this.options.apiKey\n });\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n ssl: this.options.ssl\n });\n\n // le sampling est soit defini par l'utilisateur (opts),\n // ou soit calculé dynamiquement...\n var _sampling = options.sampling;\n if (!_sampling) {\n // computing sampling\n var _computeSampling;\n var _length = this._currentFeature._measurementRunningTotal; // FIXME !!!\n logger.trace(\"length\", _length);\n var p = Math.floor(_length) / 5; // en mètre sur un pas moyen de 5m !\n if (p >= 200) {\n _computeSampling = 200;\n } else {\n _computeSampling = Math.floor(p);\n }\n _sampling = _computeSampling;\n }\n\n // on y ajoute les callbacks ainsi que les options par defaut\n var self = this;\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n // sampling à 200 (iso portail)\n sampling: _sampling,\n // callback onSuccess\n onSuccess: this.options.elevationPathOptions.onSuccess || function (result) {\n logger.log(result);\n if (result) {\n if (self.options.displayProfileOptions.target !== null) {\n self._pictoContainer.style.display = \"block\";\n self._panelContainer.style.display = \"block\";\n }\n self._displayProfil(result.elevations);\n self._waitingContainer.className = \"GPelevationPathCalcWaitingContainerHidden\";\n self._waiting = false;\n }\n },\n // callback onFailure\n onFailure: this.options.elevationPathOptions.onFailure || function (error) {\n logger.log(error.message);\n self._pictoContainer.style.display = \"block\";\n self._panelContainer.style.display = \"none\";\n self._waitingContainer.className = \"GPelevationPathCalcWaitingContainerHidden\";\n self._waiting = false;\n self._clear();\n }\n });\n\n // et enfin, la geometrie\n var positions = this._geometry;\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n positions: positions\n });\n logger.log(options);\n\n // mise en place de la patience\n this._waitingContainer.className = \"GPelevationPathCalcWaitingContainerVisible\";\n\n // Request altitude service\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Services.getAltitude(options);\n },\n // ################################################################### //\n // ########################## Profil display ######################### //\n // ################################################################### //\n\n /**\n * this method computes results elevations (Z and distance)\n *\n * @param {Array} elevations - array of elevation\n * @return {Array} elevations\n * @private\n */\n _computeElevationMeasure: function _computeElevationMeasure(elevations) {\n // Returns the distance from c1 to c2 using the haversine formula\n var _haversineDistance = function _haversineDistance(c1, c2) {\n var lat1 = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__[\"default\"].decimalToRadian(c1[1]);\n var lat2 = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__[\"default\"].decimalToRadian(c2[1]);\n var deltaLatBy2 = (lat2 - lat1) / 2;\n var deltaLonBy2 = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__[\"default\"].decimalToRadian(c2[0] - c1[0]) / 2;\n var a = Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) + Math.sin(deltaLonBy2) * Math.sin(deltaLonBy2) * Math.cos(lat1) * Math.cos(lat2);\n return 2 * 6378137 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n };\n var _data = elevations;\n var _unit = \"m\";\n var _sketchPoints = this._geometry;\n // section actuelle du sketch sur laquelle on est\n var _currentSection = 0;\n // longueur cumulée des sections précédentes\n var _previousSectionsLength = 0;\n var _nextSectionBegining = _sketchPoints[1];\n\n // Calcul de la distance au départ pour chaque point + arrondi des lat/lon\n _data[0].dist = 0;\n _data[0].slope = 0;\n _data[0].lat = Math.round(_data[0].lat * 10000) / 10000;\n _data[0].lon = Math.round(_data[0].lon * 10000) / 10000;\n var _distanceMinus = 0;\n var _distancePlus = 0;\n var _ascendingElevation = 0;\n var _descendingElevation = 0;\n var _distance = 0;\n var _slopes = 0;\n var distances = [];\n for (var i = 1; i < _data.length; i++) {\n var a = [_data[i].lon, _data[i].lat];\n var distanceToStart = _previousSectionsLength + _haversineDistance(a, [_sketchPoints[_currentSection].lon, _sketchPoints[_currentSection].lat]);\n var dist = distanceToStart - _distance;\n\n // Changement de section\n if (a[0].toFixed(8) === _nextSectionBegining.lon.toFixed(8) && a[1].toFixed(8) === _nextSectionBegining.lat.toFixed(8)) {\n _currentSection++;\n _previousSectionsLength = distanceToStart;\n // Pas de next section si on est sur le dernier point\n if (i !== _data.length - 1) {\n _nextSectionBegining = _sketchPoints[_currentSection + 1];\n }\n }\n var za = _data[i].z;\n var zb = _data[i - 1].z;\n if (za < 0) {\n za = 0;\n }\n if (zb < 0) {\n zb = 0;\n }\n var slope = za - zb;\n if (slope < 0) {\n _distanceMinus += dist;\n _descendingElevation += slope;\n } else if (slope > 0) {\n _distancePlus += dist;\n _ascendingElevation += slope;\n }\n _distance = distanceToStart;\n _data[i].dist = distanceToStart;\n distances.push(distanceToStart);\n _slopes += slope ? Math.abs(Math.round(slope / dist * 100)) : 0;\n _data[i].slope = slope ? Math.abs(Math.round(slope / dist * 100)) : 0;\n\n // EVOL ?\n // cf. gradiant\n // http://www.color-hex.com/color/00b798\n var value = _data[i].slope;\n if (value > 15 && value < 30) {\n _data[i].color = \"#005b4c\";\n } else if (value > 30 && value < 45) {\n _data[i].color = \"#00362d\";\n } else if (value > 45) {\n _data[i].color = \"#00120f\";\n } else {\n _data[i].color = \"#00B798\";\n }\n _data[i].lat = Math.round(_data[i].lat * 10000) / 10000;\n _data[i].lon = Math.round(_data[i].lon * 10000) / 10000;\n }\n\n // check distance totale\n logger.trace(\"List Distances\", distances);\n\n // Correction des altitudes aberrantes + arrondi des calculs de distance + ...\n var _altMin = _data[0].z;\n var _altMax = _data[0].z;\n var _greaterSlope = _data[0].slope;\n for (var ji = 0; ji < _data.length; ji++) {\n var d = _data[ji];\n if (d.z < -100) {\n d.z = 0;\n }\n if (d.z > _altMax) {\n _altMax = d.z;\n }\n if (d.z < _altMin) {\n _altMin = d.z;\n }\n if (d.slope > _greaterSlope) {\n _greaterSlope = d.slope;\n }\n }\n return {\n greaterSlope: _greaterSlope,\n // pente max\n meanSlope: Math.round(_slopes / _data.length),\n // pente moyenne\n distancePlus: _distancePlus,\n // distance cumulée positive\n distanceMinus: _distanceMinus,\n // distance cumulée négative\n ascendingElevation: _ascendingElevation,\n // dénivelé cumulée positive\n descendingElevation: _descendingElevation,\n // dénivelé cumulée négative\n altMin: _altMin.toLocaleString(),\n // altitude min TODO: inutile ?\n altMax: _altMax.toLocaleString(),\n // altitude max TODO: inutile ?\n distance: this._distance,\n // distance totale\n unit: _unit,\n // unité des mesures de distance\n points: _data\n };\n },\n /**\n * this method is called by this. (in case of success)\n * and display results\n *\n * @param {Array} elevations - array of elevation\n * @private\n */\n _displayProfil: function _displayProfil(elevations) {\n // on reactive le menu systeme en fin de saisie !\n var map = this._map;\n map.off(\"contextmenu\");\n\n // data\n if (this._data) {\n this._data = {};\n }\n\n // sauvegarde des données\n var data = this._data = this._computeElevationMeasure(elevations);\n\n // container\n var container = this.options.displayProfileOptions.target;\n if (container) {\n container.appendChild(this._panelContainer);\n }\n container = this._profilContainer;\n\n // TODO contexte ?\n var context = this;\n var _profileOpts = this.options.displayProfileOptions;\n\n // fonction\n var displayFunction = _profileOpts.apply;\n\n // Calcul du profil\n if (typeof AmCharts !== \"undefined\" && typeof d3 !== \"undefined\") {\n logger.trace(\"Aucune lib. n'est presente !\");\n }\n\n // execution...\n displayFunction.call(this, data, container, context);\n\n // affichage des informations du profil ?\n var element = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GPelevationPathPanelInfo-\" + this._uid);\n if (_profileOpts.greaterSlope || _profileOpts.meanSlope || _profileOpts.ascendingElevation || _profileOpts.descendingElevation) {\n // on affiche les informations\n element.style.display = \"block\";\n }\n },\n // ################################################################### //\n // ################################ clean ############################ //\n // ################################################################### //\n\n /**\n * this method clears all data\n *\n * @private\n */\n _clear: function _clear() {\n this._geometry = null;\n this._profile = null;\n\n // on vide le container\n if (this._profilContainer) {\n while (this._profilContainer.firstChild) {\n this._profilContainer.removeChild(this._profilContainer.firstChild);\n }\n }\n\n // on supprime le marker\n var map = this._map;\n if (this._marker) {\n map.removeLayer(this._marker);\n this._marker = null;\n }\n }\n});\n\n/**\n * create Profile Marker\n *\n * @param {Object} context - context\n * @param {Object} data - data\n */\nElevationPath.__createProfileMarker = function (context, data) {\n logger.log(\"__createProfileMarker\");\n var self = context;\n var map = self._map;\n\n // var _srs = L.CRS.EPSG4326;\n // var _pointA = _srs.latLngToPoint(L.latLng(self._geometry[0].lat, self._geometry[0].lon));\n // var _pointB = _srs.latLngToPoint(L.latLng(self._geometry[self._geometry.length - 1].lat, self._geometry[self._geometry.length - 1].lon));\n // var _point = L.LineUtil.closestPointOnSegment(_srs.latLngToPoint(L.latLng(data.lat, data.lon)), _pointA, _pointB );\n\n // creation d\"un marker\n self._marker = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.marker(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(data), {\n icon: new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"orange\"),\n draggable: false,\n clickable: false,\n zIndexOffset: 1000\n });\n self._marker.addTo(map);\n};\n\n/**\n * update Profile Marker\n *\n * @param {Object} context - context\n * @param {Object} data - data\n */\nElevationPath.__updateProfileMarker = function (context, data) {\n logger.log(\"__updateProfileMarker\");\n var self = context;\n var map = self._map;\n\n // var _srs = L.CRS.EPSG4326;\n // var _pointA = _srs.latLngToPoint(L.latLng(self._geometry[0].lat, self._geometry[0].lon));\n // var _pointB = _srs.latLngToPoint(L.latLng(self._geometry[self._geometry.length - 1].lat, self._geometry[self._geometry.length - 1].lon));\n // var _point = L.LineUtil.closestPointOnSegment( _srs.latLngToPoint(L.latLng(data.lat, data.lon)), _pointA, _pointB );\n\n if (self._marker) {\n self._marker.setLatLng(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(data));\n self._marker.update();\n } else {\n // creation d\"un marker\n self._marker = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.marker(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(data), {\n icon: new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"orange\"),\n draggable: false,\n clickable: false,\n zIndexOffset: 1000\n });\n self._marker.addTo(map);\n }\n};\n\n/**\n * remove Profile Marker\n *\n * @param {Object} context - context\n */\nElevationPath.__removeProfileMarker = function (context) {\n logger.log(\"__removeProfileMarker\");\n var self = context;\n var map = self._map;\n if (self._marker) {\n map.removeLayer(self._marker);\n self._marker = null;\n }\n};\n\n/**\n * custom operation into raw profil...\n * TODO\n */\nElevationPath.__customRawProfileOperation = function () {\n logger.log(\"__customRawProfileOperation\");\n};\n\n/**\n * custom operation into raw profil...\n * TODO\n *\n * @param {Object} context - context\n * @param {Object} e - event\n */\nElevationPath.__customRawProfileMouseOverEvent = function (context, e) {\n logger.log(\"__customRawProfileMouseOverEvent\", context, e);\n};\n\n/**\n * Display Profile function used by default : no additonal framework needed.\n *\n * @static\n * @param {Object} data - elevations values for profile\n * @param {HTMLElement} container - html container where to display profile\n * @param {Object} context - this control object\n */\nElevationPath.DISPLAY_PROFILE_BY_DEFAULT = function (data, container, context) {\n logger.trace(\"ElevationPath.DISPLAY_PROFILE_BY_DEFAULT\");\n var profile = _Common_Controls_ProfileElevationPathDOM__WEBPACK_IMPORTED_MODULE_8__[\"default\"].displayProfileByDefault(data, container, context, ElevationPath);\n // on sauvegarde le profil du container dans l'objet\n if (profile) {\n this._profile = profile;\n }\n};\n\n/**\n * Display Profile without graphical rendering (raw service response)\n *\n * @static\n * @param {Object} data - elevations values for profile\n * @param {HTMLElement} container - html container where to display profile\n * @param {Object} context - this control object\n */\nElevationPath.DISPLAY_PROFILE_RAW = function (data, container, context) {\n logger.trace(\"ElevationPath.DISPLAY_PROFILE_RAW\");\n var profile = _Common_Controls_ProfileElevationPathDOM__WEBPACK_IMPORTED_MODULE_8__[\"default\"].displayProfileRaw(data, container, context, ElevationPath);\n // on sauvegarde le profil du container dans l'objet\n if (profile) {\n this._profile = profile;\n }\n};\n\n/**\n * Display Profile using D3 javascript framework. This method needs D3 libraries to be loaded.\n *\n * @static\n * @param {Object} data - elevations values for profile\n * @param {HTMLElement} container - html container where to display profile\n * @param {Object} context - this control object\n */\nElevationPath.DISPLAY_PROFILE_LIB_D3 = function (data, container, context) {\n logger.trace(\"ElevationPath.DISPLAY_PROFILE_LIB_D3\");\n if (typeof d3 === \"undefined\") {\n logger.log(\"Lib. D3 is not loaded !\");\n return;\n }\n var profile = _Common_Controls_ProfileElevationPathDOM__WEBPACK_IMPORTED_MODULE_8__[\"default\"].displayProfileLibD3(data, container, context, ElevationPath);\n // on sauvegarde le profil du container dans l'objet\n if (profile) {\n this._profile = profile;\n }\n};\n\n/**\n * Display Profile using Amcharts framework. This method needs AmCharts libraries to be loaded.\n *\n * @static\n * @param {Object} data - elevations values for profile\n * @param {HTMLElement} container - html container where to display profile\n * @param {Object} context - this control object\n */\nElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS = function (data, container, context) {\n logger.trace(\"ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS\");\n\n // Calcul du profile\n if (typeof AmCharts === \"undefined\") {\n logger.log(\"Lib. AmCharts is not loaded !\");\n return;\n }\n var profile = _Common_Controls_ProfileElevationPathDOM__WEBPACK_IMPORTED_MODULE_8__[\"default\"].displayProfileLibAmCharts(data, container, context, ElevationPath);\n // on sauvegarde le profil du container dans l'objet\n if (profile) {\n this._profile = profile;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ElevationPath);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL0VsZXZhdGlvblBhdG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UVsZW1lbnR9IERPTSBlbGVtZW50XG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBvbkFkZCA6IGZ1bmN0aW9uIChtYXApIHtcbiAgICAgICAgLy8gaW5pdGlhbGlzYXRpb24gZHUgRE9NIGR1IGNvbXBvc2FudFxuICAgICAgICB2YXIgY29udGFpbmVyID0gdGhpcy5fY29udGFpbmVyID0gdGhpcy5faW5pdExheW91dCgpO1xuXG4gICAgICAgIGlmIChtYXApIHtcbiAgICAgICAgICAgIC8vIGxvcnMgZGUgbCdham91dCDDoCBsYSBtYXAsIG9uIGFjdGl2ZSBsYSBzYWlzaWUgZHUgcG9pbnQsXG4gICAgICAgICAgICAvLyBtYWlzIHNldWxlbWVudCBzaSBsZSB3aWRnZXQgZXN0IG91dmVydFxuICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5hY3RpdmUpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5fcHJvZmlsZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9wYW5lbENvbnRhaW5lci5zdHlsZS5kaXNwbGF5ID0gXCJub25lXCI7XG4gICAgICAgICAgICAgICAgICAgIC8vIHRoaXMuX3BhbmVsQ29udGFpbmVyLnN0eWxlLnZpc2liaWxpdHkgPSBcImhpZGRlblwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLl9hY3RpdmF0ZU1hcEludGVyYWN0aW9uKG1hcCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBkZWFjdGl2YXRlIG9mIGV2ZW50cyB0aGF0IG1heSBpbnRlcmZlcmUgd2l0aCB0aGUgbWFwXG4gICAgICAgIEwuRG9tRXZlbnRcbiAgICAgICAgICAgIC5kaXNhYmxlQ2xpY2tQcm9wYWdhdGlvbihjb250YWluZXIpXG4gICAgICAgICAgICAuZGlzYWJsZVNjcm9sbFByb3BhZ2F0aW9uKGNvbnRhaW5lcik7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L1xuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaXMgY2FsbGVkIGJ5IGV2ZW50ICdjbGljaycgb24gJycgcGljdG9cbiAgICAgKiBhbmQgLi4uXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gZSAtIEhUTUxFbGVtZW50XG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIG9uU2hvd0VsZXZhdGlvblBhdGhDbGljayA6IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgIGxvZ2dlci50cmFjZShlKTtcbiAgICAgICAgdmFyIG1hcCA9IHRoaXMuX21hcDtcblxuICAgICAgICAvLyBpbnRlcmFjdGlvbnMgYXZlYyBsYSBjYXJ0ZVxuICAgICAgICBpZiAoIXRoaXMuX3JlZHVjZVBhbmVsKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5fc2hvd0NvbnRhaW5lci5jaGVja2VkKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fcGljdG9Db250YWluZXIuc3R5bGUuZGlzcGxheSA9IFwiYmxvY2tcIjtcbiAgICAgICAgICAgICAgICB0aGlzLl9wYW5lbENvbnRhaW5lci5zdHlsZS5kaXNwbGF5ID0gXCJub25lXCI7XG4gICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZlTWFwSW50ZXJhY3Rpb24obWFwKTtcbiAgICAgICAgICAgICAgICB0aGlzLl9jbGVhcigpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5fcHJvZmlsZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9wYW5lbENvbnRhaW5lci5zdHlsZS5kaXNwbGF5ID0gXCJub25lXCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMuX2FjdGl2YXRlTWFwSW50ZXJhY3Rpb24obWFwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmICh0aGlzLl9wcm9maWxlICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5kaXNwbGF5UHJvZmlsZU9wdGlvbnMudGFyZ2V0ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3BpY3RvQ29udGFpbmVyLnN0eWxlLmRpc3BsYXkgPSBcIm5vbmVcIjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5fcGFuZWxDb250YWluZXIuc3R5bGUuZGlzcGxheSA9IFwiYmxvY2tcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuX3JlZHVjZVBhbmVsID0gZmFsc2U7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSBldmVudCAnY2xpY2snIG9uICcnIHBpY3RvXG4gICAgICogKGNmLiB0aGlzLiksXG4gICAgICogYW5kIHJlZHVjZSB0aGUgcGFuZWxcbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgb25SZWR1Y2VFbGV2YXRpb25QYXRoUGFuZWxDbGljayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy5fcmVkdWNlUGFuZWwgPSB0cnVlO1xuICAgICAgICB0aGlzLl9waWN0b0NvbnRhaW5lci5zdHlsZS5kaXNwbGF5ID0gXCJibG9ja1wiO1xuICAgICAgICB0aGlzLl9wYW5lbENvbnRhaW5lci5zdHlsZS5kaXNwbGF5ID0gXCJub25lXCI7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSBldmVudCAnY2xpY2snIG9uICcnIHBpY3RvXG4gICAgICogKGNmLiB0aGlzLiksXG4gICAgICogYW5kIGRpc3BsYXkgdGhlIHBhbmVsIGluZm9cbiAgICAgKiBUT0RPXG4gICAgICp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4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgLyogZXZlbmVtZW50cyAqL1xuICAgICAgICAgICAgbWFwLm9uKFwiZHJhdzpkcmF3c3RhcnRcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGxvZ2dlci50cmFjZShcImRyYXc6ZHJhd3N0YXJ0XCIpO1xuICAgICAgICAgICAgICAgIHNlbGYuX3JlbW92ZUZlYXR1cmVMYXllcihzZWxmLl9sYXN0SWRMYXllcik7XG4gICAgICAgICAgICAgICAgc2VsZi5fbGFzdElkTGF5ZXIgPSBzZWxmLl9jdXJyZW50SWRMYXllcjtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAvKiBldmVuZW1lbnRzICovXG4gICAgICAgICAgICBtYXAub24oXCJkcmF3OmRyYXdzdG9wXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJkcmF3OmRyYXdzdG9wXCIpO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc2VsZi5vcHRpb25zLmVsZXZhdGlvblBhdGhPcHRpb25zLm9uU3VjY2VzcyA9PT0gXCJ1bmRlZmluZWRcIiAmJiBzZWxmLm9wdGlvbnMuZGlzcGxheVByb2ZpbGVPcHRpb25zLnRhcmdldCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLl9waWN0b0NvbnRhaW5lci5zdHlsZS5kaXNwbGF5ID0gXCJub25lXCI7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3BhbmVsQ29udGFpbmVyLnN0eWxlLmRpc3BsYXkgPSBcImJsb2NrXCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHNlbGYuX2FsdGlSZXF1ZXN0KCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuX2FjdGl2YXRlUG9seUxpbmVJbnRlcmFjdGlvbihtYXApO1xuICAgIH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IGRyYXdpbmcgaW50ZXJhY3Rpb24uXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gbWFwIC0gY29udHJvbCBtYXAuXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBfYWN0aXZhdGVQb2x5TGluZUludGVyYWN0aW9uIDogZnVuY3Rpb24gKG1hcCkge1xuICAgICAgICBpZiAodGhpcy5fY3VycmVudEZlYXR1cmUpIHtcbiAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRGZWF0dXJlLmRpc2FibGUoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGxpc3RlIGRlcyBvcHRpb25zIHBhciBkZWZhdXRcbiAgICAgICAgLy8gY2YuIGh0dHBzOi8vbGVhZmxldC5naXRodWIuaW8vTGVhZmxldC5kcmF3L2RvY3MvbGVhZmxldC1kcmF3LWxhdGVzdC5odG1sXG4gICAgICAgIC8vIHZhciBwb2x5bGluZU9wdGlvbnMgPSB7XG4gICAgICAgIC8vICAgICBhbGxvd0ludGVyc2VjdGlvbiA6IHRydWUsXG4gICAgICAgIC8vICAgICByZXBlYXRNb2RlIDogZmFsc2UsXG4gICAgICAgIC8vICAgICBkcmF3RXJyb3IgOiB7XG4gICAgICAgIC8vICAgICAgICAgY29sb3IgOiBcIiNiMDBiMDBcIixcbiAgICAgICAgLy8gICAgICAgICB0aW1lb3V0IDogMjUwMFxuICAgICAgICAvLyAgICAgfSxcbiAgICAgICAgLy8gICAgIGljb24gOiBuZXcgTC5EaXZJY29uKHtcbiAgICAgICAgLy8gICAgICAgICBpY29uU2l6ZSA6IG5ldyBMLlBvaW50KDgsIDgpLFxuICAgICAgICAvLyAgICAgICAgIGNsYXNzTmFtZSA6ICdsZWFmbGV0LWRpdi1pY29uIGxlYWZsZXQtZWRpdGluZy1pY29uJ1xuICAgICAgICAvLyAgICAgfSksXG4gICAgICAgIC8vICAgICB0b3VjaEljb24gOiBuZXcgTC5EaXZJY29uKHtcbiAgICAgICAgLy8gICAgIC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Z2dlci50cmFjZShcImxlbmd0aFwiLCBfbGVuZ3RoKTtcbiAgICAgICAgICAgIHZhciBwID0gTWF0aC5mbG9vcihfbGVuZ3RoKSAvIDU7IC8vIGVuIG3DqHRyZSBzdXIgdW4gcGFzIG1veWVuIGRlIDVtICFcbiAgICAgICAgICAgIGlmIChwID49IDIwMCkge1xuICAgICAgICAgICAgICAgIF9jb21wdXRlU2FtcGxpbmcgPSAyMDA7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIF9jb21wdXRlU2FtcGxpbmcgPSBNYXRoLmZsb29yKHApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgX3NhbXBsaW5nID0gX2NvbXB1dGVTYW1wbGluZztcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIG9uIHkgYWpvdXRlIGxlcyBjYWxsYmFja3MgYWluc2kgcXVlIGxlcyBvcHRpb25zIHBhciBkZWZhdXRcbiAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuICAgICAgICBMLlV0aWwuZXh0ZW5kKG9wdGlvbnMsIHtcblxuICAgICAgICAgICAgLy8gc2FtcGxpbmcgw6AgMjAwIChpc28gcG9ydGFpbClcbiAgICAgICAgICAgIHNhbXBsaW5nIDogX3NhbXBsaW5nLFxuXG4gICAgICAgICAgICAvLyBjYWxsYmFjayBvblN1Y2Nlc3NcbiAgICAgICAgICAgIG9uU3VjY2VzcyA6IHRoaXMub3B0aW9ucy5lbGV2YXRpb25QYXRoT3B0aW9ucy5vblN1Y2Nlc3MgfHwgZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2cocmVzdWx0KTtcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLm9wdGlvbnMuZGlzcGxheVByb2ZpbGVPcHRpb25zLnRhcmdldCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fcGljdG9Db250YWluZXIuc3R5bGUuZGlzcGxheSA9IFwiYmxvY2tcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3BhbmVsQ29udGFpbmVyLnN0eWxlLmRpc3BsYXkgPSBcImJsb2NrXCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fZGlzcGxheVByb2ZpbChyZXN1bHQuZWxldmF0aW9ucyk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3dhaXRpbmdDb250YWluZXIuY2xhc3NOYW1lID0gXCJHUGVsZXZhdGlvblBhdGhDYWxjV2FpdGluZ0NvbnRhaW5lckhpZGRlblwiO1xuICAgICAgICAgICAgICAgICAgICBzZWxmLl93YWl0aW5nID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgLy8gY2FsbGJhY2sgb25GYWlsdXJlXG4gICAgICAgICAgICBvbkZhaWx1cmUgOiB0aGlzLm9wdGlvbnMuZWxldmF0aW9uUGF0aE9wdGlvbnMub25GYWlsdXJlIHx8IGZ1bmN0aW9uIChlcnJvcikge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgc2VsZi5fcGljdG9Db250YWluZXIuc3R5bGUuZGlzcGxheSA9IFwiYmxvY2tcIjtcbiAgICAgICAgICAgICAgICBzZWxmLl9wYW5lbENvbnRhaW5lci5zdHlsZS5kaXNwbGF5ID0gXCJub25lXCI7XG4gICAgICAgICAgICAgICAgc2VsZi5fd2FpdGluZ0NvbnRhaW5lci5jbGFzc05hbWUgPSBcIkdQZWxldmF0aW9uUGF0aENhbGNXYWl0aW5nQ29udGFpbmVySGlkZGVuXCI7XG4gICAgICAgICAgICAgICAgc2VsZi5fd2FpdGluZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHNlbGYuX2NsZWFyKCk7XG4gICAgIC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dmFyIHphID0gX2RhdGFbaV0uejtcbiAgICAgICAgICAgIHZhciB6YiA9IF9kYXRhW2kgLSAxXS56O1xuICAgICAgICAgICAgaWYgKHphIDwgMCkge1xuICAgICAgICAgICAgICAgIHphID0gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh6YiA8IDApIHtcbiAgICAgICAgICAgICAgICB6YiA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgc2xvcGUgPSB6YSAtIHpiO1xuICAgICAgICAgICAgaWYgKHNsb3BlIDwgMCkge1xuICAgICAgICAgICAgICAgIF9kaXN0YW5jZU1pbnVzICs9IGRpc3Q7XG4gICAgICAgICAgICAgICAgX2Rlc2NlbmRpbmdFbGV2YXRpb24gKz0gc2xvcGU7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHNsb3BlID4gMCkge1xuICAgICAgICAgICAgICAgIF9kaXN0YW5jZVBsdXMgKz0gZGlzdDtcbiAgICAgICAgICAgICAgICBfYXNjZW5kaW5nRWxldmF0aW9uICs9IHNsb3BlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgX2Rpc3RhbmNlID0gZGlzdGFuY2VUb1N0YXJ0O1xuICAgICAgICAgICAgX2RhdGFbaV0uZGlzdCA9IGRpc3RhbmNlVG9TdGFydDtcblxuICAgICAgICAgICAgZGlzdGFuY2VzLnB1c2goZGlzdGFuY2VUb1N0YXJ0KTtcblxuICAgICAgICAgICAgX3Nsb3BlcyArPSAoc2xvcGUpID8gTWF0aC5hYnMoTWF0aC5yb3VuZChzbG9wZSAvIGRpc3QgKiAxMDApKSA6IDA7XG4gICAgICAgICAgICBfZGF0YVtpXS5zbG9wZSA9IChzbG9wZSkgPyBNYXRoLmFicyhNYXRoLnJvdW5kKHNsb3BlIC8gZGlzdCAqIDEwMCkpIDogMDtcblxuICAgICAgICAgICAgLy8gRVZPTCA/XG4gICAgICAgICAgICAvLyBjZi4gZ3JhZGlhbnRcbiAgICAgICAgICAgIC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GFbMF0uejtcbiAgICAgICAgdmFyIF9ncmVhdGVyU2xvcGUgPSBfZGF0YVswXS5zbG9wZTtcblxuICAgICAgICBmb3IgKHZhciBqaSA9IDA7IGppIDwgX2RhdGEubGVuZ3RoOyBqaSsrKSB7XG4gICAgICAgICAgICB2YXIgZCA9IF9kYXRhW2ppXTtcbiAgICAgICAgICAgIGlmIChkLnogPCAtMTAwKSB7XG4gICAgICAgICAgICAgICAgZC56ID0gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChkLnogPiBfYWx0TWF4KSB7XG4gICAgICAgICAgICAgICAgX2FsdE1heCA9IGQuejtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChkLnogPCBfYWx0TWluKSB7XG4gICAgICAgICAgICAgICAgX2FsdE1pbiA9IGQuejtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGQuc2xvcGUgPiBfZ3JlYXRlclNsb3BlKSB7XG4gICAgICAgICAgICAgICAgX2dyZWF0ZXJTbG9wZSA9IGQuc2xvcGU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGdyZWF0ZXJTbG9wZSA6IF9ncmVhdGVyU2xvcGUsIC8vIHBlbnRlIG1heFxuICAgICAgICAgICAgbWVhblNsb3BlIDogTWF0aC5yb3VuZChfc2xvcGVzIC8gX2RhdGEubGVuZ3RoKSwgLy8gcGVudGUgbW95ZW5uZVxuICAgICAgICAgICAgZGlzdGFuY2VQbHVzIDogX2Rpc3RhbmNlUGx1cywgLy8gZGlzdGFuY2UgY3VtdWzDqWUgcG9zaXRpdmVcbiAgICAgICAgICAgIGRpc3RhbmNlTWludXMgOiBfZGlzdGFuY2VNaW51cywgLy8gZGlzdGFuY2UgY3VtdWzDqWUgbsOpZ2F0aXZlXG4gICAgICAgICAgICBhc2NlbmRpbmdFbGV2YXRpb24gOiBfYXNjZW5kaW5nRWxldmF0aW9uLCAv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UJfQU1DSEFSVFMgPSBmdW5jdGlvbiAoZGF0YSwgY29udGFpbmVyLCBjb250ZXh0KSB7XG4gICAgbG9nZ2VyLnRyYWNlKFwiRWxldmF0aW9uUGF0aC5ESVNQTEFZX1BST0ZJTEVfTElCX0FNQ0hBUlRTXCIpO1xuXG4gICAgLy8gQ2FsY3VsIGR1IHByb2ZpbGVcbiAgICBpZiAodHlwZW9mIEFtQ2hhcnRzID09PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgIGxvZ2dlci5sb2coXCJMaWIuIEFtQ2hhcnRzIGlzIG5vdCBsb2FkZWQgIVwiKTtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIHZhciBwcm9maWxlID0gUHJvZmlsZUVsZXZhdGlvblBhdGhET00uZGlzcGxheVByb2ZpbGVMaWJBbUNoYXJ0cyhkYXRhLCBjb250YWluZXIsIGNvbnRleHQsIEVsZXZhdGlvblBhdGgpO1xuICAgIC8vIG9uIHNhdXZlZ2FyZGUgbGUgcHJvZmlsIGR1IGNvbnRhaW5lciBkYW5zIGwnb2JqZXRcbiAgICBpZiAocHJvZmlsZSkge1xuICAgICAgICB0aGlzLl9wcm9maWxlID0gcHJvZmlsZTtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBFbGV2YXRpb25QYXRoO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/ElevationPath.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Controls/Isocurve.js": +/*!******************************************!*\ + !*** ./src/Leaflet/Controls/Isocurve.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LocationSelector */ \"./src/Leaflet/Controls/LocationSelector.js\");\n/* harmony import */ var _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Common/Controls/IsoDOM */ \"./src/Common/Controls/IsoDOM.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n\n\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getLogger(\"Isocurve\");\n\n/**\n * @classdesc\n *\n * Leaflet Control Class to compute and display Isochrone or isodistances curves.\n *\n * Use {@link module:Controls.Isocurve L.geoportalControl.Isocurve()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.Control native class.\n *\n * @namespace\n * @alias L.geoportalControl.Isocurve\n */\nvar Isocurve = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Control.extend( /** @lends L.geoportalControl.Isocurve.prototype */{\n includes: _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n /**\n * Options du service\n *\n * @private\n */\n options: {\n position: \"topleft\",\n collapsed: true,\n // plier !\n methods: [\"time\", \"distance\"],\n graphs: [\"Voiture\", \"Pieton\"],\n exclusions: {\n toll: false,\n tunnel: false,\n bridge: false\n },\n directions: [\"departure\", \"arrival\"],\n disableReverse: false,\n isocurveOptions: {},\n autocompleteOptions: {}\n },\n /**\n * @constructor Isocurve\n *\n * @private\n * @param {Object} options - Isocurve control options\n * @param {String} [options.apiKey] - API key for services call (isocurve and autocomplete services). The \"calcul\" key is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.\n * @param {Object} [options.exclusions = {\"toll\" : false, \"tunnel\" : false, \"bridge\" : false}] - list of exclusions with status (true = checked), by default : [\"toll\":false, \"tunnel\":false, \"bridge\":false].\n * @param {Array} [options.graphs = [\"Voiture\", \"Pieton\"]] - list of graph resources to be used for isocurve calculation, by default : [\"Voiture\", \"Pieton\"]. The first element is selected.\n * @param {Array} [options.methods = [\"time\", \"distance\"]] - list of methods, by default : [\"time\", \"distance\"]. The first element is selected by default.\n * @param {Array} [options.directions = [\"departure\", \"arrival\"]] - list of directions to be displayed, by default : [\"departure\", \"arrival\"]. The first element is selected by default.\n * Directions enable to specify if input location point will be used as a departure point (\"departure\") or as an arrival point (\"arrival\")\n * @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding\n * @param {Object} [options.isocurveOptions = {}] - isocurve service options.\n * @param {Object} [options.autocompleteOptions = {}] - autocomplete service options.\n * @example\n * var iso = L.geoportalControl.Isocurve({\n * collapsed : false\n * methods : [\"time\", \"distance\"],\n * exclusions : {\n * toll : true,\n * bridge : false,\n * tunnel : true\n * },\n * graphs : [\"Pieton\", \"Voiture\"],\n * isocurveOptions : {},\n * autocompleteOptions : {}\n * });\n */\n initialize: function initialize(options) {\n // on transmet les options au controle\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.setOptions(this, options);\n\n /** uuid */\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].generate();\n\n /** detection du support : desktop ou tactile */\n this._isDesktop = this._detectSupport();\n\n /** detection si le panneau est reduit */\n // on desactive l'impl. reduction de la fenetre\n // this._reducePanel = false;\n\n /** container principaux */\n this._waitingContainer = null;\n this._showContainer = null;\n this._pictoContainer = null;\n this._formContainer = null;\n this._submitContainer = null;\n\n /** Mode de transport selectionné : 'Voiture' ou 'Pieton' */\n this._currentTransport = null;\n\n /** Sens du parcours selectionné : 'Départ' ou 'Arrivée' */\n this._currentDirection = null;\n\n /** Type d'isochrone et valeur selectionné : 'isochrone' ou 'distance' */\n this._currentComputation = null;\n this._currentTimeHour = 0;\n this._currentTimeMinute = 0;\n this._currentDistance = 0;\n\n /** Exclusions selectionnées : Tunnel, Toll et Bridge */\n this._currentExclusions = [];\n\n // initialisation\n this._initTransport();\n this._initComputation();\n this._initDirection();\n this._initExclusions();\n\n /** le point */\n this._currentPoint = null;\n\n /** la geometrie de l'isochrone */\n this._geojsonIso = null;\n\n /** si un calcul est en cours ou non */\n this._waiting = false;\n /** timer pour cacher la patience après un certain temps */\n this._timer = null;\n\n /**\n * reponse du service\n * Ex. {\n * totalTime, totalDistance, bbox, routeGeometry,\n * routeInstructions : [{duration, distance, code, instruction, bbox, geometry}]\n * }\n */\n this._currentIsoResults = null;\n\n /**\n * liste des ressources avec droits par service\n * Ex. {\n * \"IsoChrone\" : {\n * key : \"ger4g456re45er456t4er5ge5\",\n * resources : [\"Pieton\", \"Voiture\"]\n * }\n * }\n */\n this._resources = {};\n },\n /**\n * this method is called by this.addTo(map) when the control is added on the map\n * and fills variable 'this._container = this.onAdd(map)',\n * and create or disable events on map.\n * @param {L.Map} map - object map\n * @returns {DOMElement} container\n * @private\n */\n onAdd: function onAdd(map) {\n // initialisation du DOM du composant\n var container = this._container = this._initLayout(map);\n\n // deactivate of events that may interfere with the map\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container);\n return container;\n },\n /**\n * TODO this method is called when the control is removed from the map\n * and removes events on map.\n *\n * @private\n */\n onRemove: function onRemove( /* map */) {},\n // ################################################################### //\n // ####################### init application ########################## //\n // ################################################################### //\n\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initTransport: function _initTransport() {\n // Mode de transport selectionné\n this._currentTransport = \"Voiture\"; // par defaut\n\n // par defaut\n var transport = this.options.graphs;\n if (!transport || transport.length === 0) {\n this.options.graphs = [\"Voiture\", \"Pieton\"];\n }\n\n // option\n if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.isArray(transport) && transport.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (transport[0] === \"Voiture\" || transport[0] === \"Pieton\") {\n this._currentTransport = transport[0];\n }\n }\n\n // option sur le service\n var serviceOptions = this.options.isocurveOptions;\n if (serviceOptions.graph) {\n this._currentTransport = serviceOptions.graph;\n }\n },\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initDirection: function _initDirection() {\n this._currentDirection = \"departure\"; // par defaut\n\n // par defaut\n var directions = this.options.directions;\n if (!directions || directions.length === 0) {\n this.options.directions = [\"departure\", \"arrival\"];\n }\n\n // option\n if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.isArray(directions) && directions.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (directions[0] === \"departure\" || directions[0] === \"arrival\") {\n this._currentDirection = directions[0];\n }\n }\n\n // si l'utilisateur a spécifié une méthode dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (!serviceOptions.reverse) {\n this._currentDirection = \"departure\";\n }\n if (serviceOptions.reverse === true) {\n this._currentDirection = \"arrival\";\n this.options.directions = [\"arrival\", \"departure\"];\n }\n },\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initComputation: function _initComputation() {\n // Mode de calcul selectionné\n this._currentComputation = \"time\"; // par defaut\n\n // par defaut\n var methods = this.options.methods;\n if (!methods || methods.length === 0) {\n this.options.methods = [\"time\", \"distance\"];\n }\n\n // option\n if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.isArray(methods) && methods.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (methods[0] === \"time\" || methods[0] === \"distance\") {\n this._currentComputation = methods[0];\n }\n }\n\n // si l'utilisateur a spécifié une méthode dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (serviceOptions.method) {\n this._currentComputation = serviceOptions.method;\n }\n if (serviceOptions.time) {\n this._currentComputation = \"time\";\n }\n if (serviceOptions.distance) {\n this._currentComputation = \"distance\";\n }\n },\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initExclusions: function _initExclusions() {\n // Exclusions selectionnées : Tunnel, Toll et Bridge\n this._currentExclusions = []; // par defaut\n\n // par defaut\n var exclusion = this.options.exclusions;\n if (!exclusion || _typeof(exclusion) === \"object\" && Object.keys(exclusion).length === 0) {\n this.options.exclusions = {\n toll: false,\n tunnel: false,\n bridge: false\n };\n }\n\n // option\n if (exclusion && _typeof(exclusion) === \"object\" && Object.keys(exclusion).length) {\n for (var k in exclusion) {\n if (exclusion.hasOwnProperty(k)) {\n if (exclusion.k) {\n this._currentExclusions.push(k);\n }\n }\n }\n }\n\n // si l'utilisateur a spécifié des exclusions dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (Array.isArray(serviceOptions.exclusions)) {\n this._currentExclusions = serviceOptions.exclusions;\n }\n },\n // ################################################################### //\n // ############################## other init ######################### //\n // ################################################################### //\n\n /**\n * this method is called by the constructor.\n * this information is useful to switch to touch mode.\n * Detection : test for desktop or tactile\n * @returns {Boolean} desktop or tactile\n * @private\n */\n _detectSupport: function _detectSupport() {\n // TODO\n // Choix de gérer la détection dans le code du composant au lieu du DOM car :\n // Utilisation de l'implémentation Leaflet\n // http://leafletjs.com/reference.html#browser\n\n var isDesktop = true;\n var userAgent = window.navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\"iphone\") !== -1 || userAgent.indexOf(\"ipod\") !== -1 || userAgent.indexOf(\"ipad\") !== -1 || userAgent.indexOf(\"android\") !== -1 || userAgent.indexOf(\"mobile\") !== -1 || userAgent.indexOf(\"blackberry\") !== -1 || userAgent.indexOf(\"tablet\") !== -1 || userAgent.indexOf(\"phone\") !== -1 || userAgent.indexOf(\"touch\") !== -1) {\n isDesktop = false;\n }\n if (userAgent.indexOf(\"msie\") !== -1 || userAgent.indexOf(\"trident\") !== -1) {\n isDesktop = true;\n }\n return isDesktop;\n },\n // ################################################################### //\n // ########################### init dom ############################## //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd(map)\n * and initialize the container HTMLElement\n * @param {L.Map} map - object map\n * @returns {DOMElement} container\n * @private\n */\n _initLayout: function _initLayout(map) {\n // create main container\n var container = this._createMainContainerElement();\n var inputShow = this._showContainer = this._createShowIsoElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.options.collapsed) {\n inputShow.checked = true;\n }\n var picto = this._pictoContainer = this._createShowIsoPictoElement();\n container.appendChild(picto);\n\n // panneau\n var panel = this._createIsoPanelElement();\n\n // header\n var header = this._createIsoPanelHeaderElement();\n panel.appendChild(header);\n\n // form\n var form = this._formContainer = this._createIsoPanelFormElement();\n\n // form: menu des points\n var point = this._createIsoPanelFormPointElement(map);\n form.appendChild(point);\n\n // form: menu du choix de la méthode de calcul (time ou distance)\n var isoChronChecked = false;\n var isoDistChecked = false;\n var typeChoice = this._createIsoPanelFormTypeChoiceElement();\n for (var i = 0; i < this.options.methods.length; i++) {\n if (this.options.methods[i] === \"time\") {\n isoChronChecked = i === 0;\n typeChoice.appendChild(this._createIsoPanelFormTypeChoiceChronElement(isoChronChecked));\n }\n if (this.options.methods[i] === \"distance\") {\n isoDistChecked = i === 0;\n typeChoice.appendChild(this._createIsoPanelFormTypeChoiceDistElement(isoDistChecked));\n }\n }\n form.appendChild(typeChoice);\n\n // form: menu du choix des valeurs\n form.appendChild(this._createIsoPanelFormValueIsochronElement(isoChronChecked));\n form.appendChild(this._createIsoPanelFormValueIsodistanceElement(isoDistChecked));\n\n // form: menu du choix du transport et du sens du parcours\n var modeChoice = this._createIsoPanelFormModeChoiceElement();\n modeChoice.appendChild(this._createIsoPanelFormModeChoiceTransportElement(this.options.graphs));\n modeChoice.appendChild(this._createIsoPanelFormModeChoiceDirectionElement(this.options.directions));\n form.appendChild(modeChoice);\n\n // form: menu des exclusions\n if (this.options.exclusions && _typeof(this.options.exclusions) === \"object\" && Object.keys(this.options.exclusions).length !== 0) {\n form.appendChild(this._createShowIsoExclusionsElement());\n form.appendChild(this._createShowIsoExclusionsPictoElement());\n var exclusion = this._createIsoPanelFormExclusionsElement();\n exclusion.appendChild(this._createIsoPanelFormExclusionOptionsElement(this.options.exclusions));\n form.appendChild(exclusion);\n }\n var divReset = this._createIsoFormResetElement();\n form.appendChild(divReset);\n\n // form: bouton du calcul\n var submit = this._submitContainer = this._createIsoSubmitFormElement();\n form.appendChild(submit);\n panel.appendChild(form);\n\n // waiting\n var waiting = this._waitingContainer = this._createIsoWaitingElement();\n panel.appendChild(waiting);\n container.appendChild(panel);\n return container;\n },\n // ################################################################### //\n // ############################## DOM ################################ //\n // ################################################################### //\n\n /**\n * Create a Point\n * OVERWRITTEN\n * @param {L.Map} map - object map\n * @returns {Object} DOM element\n * @private\n */\n _createIsoPanelFormPointElement: function _createIsoPanelFormPointElement(map) {\n // point de depart\n this._currentPoint = new _LocationSelector__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: 0,\n unique: this._uid,\n label: \"Départ\",\n color: \"red\",\n display: true\n },\n displayInfo: true,\n disableReverse: this.options.disableReverse,\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n this._currentPoint.setMap(map);\n return this._currentPoint.getContainer();\n },\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on 'GPshowIsochronPicto' picto\n * (cf. this._createShowIsoPictoElement),\n * and clear inputs and previous isochrone drawings\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onShowIsoPanelClick: function onShowIsoPanelClick(e) {\n logger.log(\"onShowIsoPanelClick\", e);\n // on desactive l'impl. reduction de la fenetre\n // if (this._geojsonIso && !this._reducePanel) {\n // this._clear();\n // }\n // this._reducePanel = false;\n },\n\n /**\n * this method is called by event 'click' on '' arrow button\n * (cf. this.),\n * and clear inputs and previous isochrone drawings\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoResetClick: function onIsoResetClick(e) {\n logger.log(\"onIsoResetClick\", e);\n this._clear();\n },\n // // on desactive l'impl. reduction de la fenetre\n // /**\n // * this method is called by event 'click' on 'GPisochronPanelReduce' picto\n // * (cf. this.),\n // * and reduce the panel\n // *\n // * @private\n // */\n // onReduceIsoPanelClick : function () {\n // logger.log(\"onReduceIsoPanelClick\");\n // this._reducePanel = true;\n // },\n\n /**\n * this method is called by event 'change' on 'GPisochronChoiceAltDist' or 'GPisochronChoiceAltChron'\n * input (cf. this._createIsoPanelFormTypeChoiceElement),\n * and updates current computation mode\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoTypeChoiceChange: function onIsoTypeChoiceChange(e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n if (value === \"isodistance\") {\n this._currentComputation = \"distance\";\n }\n if (value === \"isochron\") {\n this._currentComputation = \"time\";\n }\n },\n /**\n * this method is called by event 'click' on 'GPisochronTransportPedestrian' or 'GPisochronTransportCar'\n * input (cf. this._createIsoPanelFormModeChoiceTransportElement),\n * and updates current transport mode\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoModeTransportChange: function onIsoModeTransportChange(e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n this._currentTransport = value;\n },\n /**\n * this method is called by event 'change' on 'GPisochronDirectionSelect' select\n * (cf. this._createIsoPanelFormModeChoiceDirectionElement),\n * and updates current direction mode\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoModeDirectionChange: function onIsoModeDirectionChange(e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n this._currentDirection = value;\n },\n /**\n * this method is called by event 'change' on ''\n * input (cf. this.),\n * and updates current time value\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoValueChronTimeHourChange: function onIsoValueChronTimeHourChange(e) {\n var value = e.target.value;\n\n // pointer to...\n this._timeHourContainer = e.target;\n if (!value) {\n return;\n }\n this._currentTimeHour = value;\n },\n /**\n * this method is called by event 'change' on ''\n * input (cf. this.),\n * and updates current time value\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoValueChronTimeMinuteChange: function onIsoValueChronTimeMinuteChange(e) {\n var value = e.target.value;\n\n // pointer to...\n this._timeMinuteContainer = e.target;\n if (!value) {\n return;\n }\n this._currentTimeMinute = value;\n },\n /**\n * this method is called by event 'change' on ''\n * input (cf. this.),\n * and updates current distance value\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoValueDistChange: function onIsoValueDistChange(e) {\n var value = e.target.value;\n\n // pointer to...\n this._distanceContainer = e.target;\n if (!value) {\n return;\n }\n this._currentDistance = value;\n },\n /**\n * this method is called by event 'change' on 'GPIsoExclusionsToll'\n * or 'GPIsoeExclusionsTunnel' or 'GPIsoExclusionsBridge' tag input\n * (cf. this._createIsoPanelFormExclusionOptionsElement).\n * this value is saved as a parameter for the service isocurve.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onIsoExclusionsChange: function onIsoExclusionsChange(e) {\n var value = e.target.value;\n var checked = e.target.checked;\n if (!value) {\n return;\n }\n var bFound = false;\n var iFound = null;\n for (var i = 0; i < this._currentExclusions.length; i++) {\n if (deepEqual(this._currentExclusions[i], value.toLowerCase())) {\n iFound = i;\n bFound = true;\n }\n }\n // on l'ajoute si la valeur n'existe pas et est selectionnée\n if (!bFound && !checked) {\n this._currentExclusions.push(value.toLowerCase());\n }\n // on la retire si la valeur existe et est deselectionnée\n if (bFound && checked) {\n this._currentExclusions.splice(iFound, 1);\n }\n },\n /**\n * this method is called by event 'submit' on 'GPisochronForm' tag form\n * (cf. this._createIsoPanelFormElement),\n * and call isocurve service to display results\n *\n * @private\n */\n onIsoComputationSubmit: function onIsoComputationSubmit() {\n if (!this._currentPoint || !this._currentPoint.getCoordinate || !this._currentPoint.getCoordinate()) {\n return;\n }\n\n // récupération du temps\n var time;\n if (this._currentComputation.toLowerCase() === \"time\") {\n // durée exprimée en secondes\n time = this._currentTimeHour * 3600 + this._currentTimeMinute * 60;\n logger.log(\"time : \", time);\n }\n\n // récupération de la distance\n var distance;\n if (this._currentComputation.toLowerCase() === \"distance\") {\n // distance exprimée en mètres\n distance = this._currentDistance * 1000;\n logger.log(\"distance : \", distance);\n }\n\n // si on n'a pas de valeur de calcul renseignée, on ne lance pas la requête.\n if (!time && !distance) {\n logger.log(\"Missing time or distance parameter\");\n return;\n }\n\n // mise en place de la patience\n this._displayWaitingContainer();\n var self = this;\n var pointCoordinate = self._currentPoint.getCoordinate();\n var position = {\n x: pointCoordinate.lon || pointCoordinate.lng,\n y: pointCoordinate.lat\n };\n this._requestIsoCurve({\n position: position,\n graph: self._currentTransport,\n exclusions: self._currentExclusions,\n method: self._currentComputation,\n reverse: self._currentDirection.toLowerCase() === \"arrival\",\n time: time,\n distance: distance,\n smoothing: true,\n timeout: 7000,\n protocol: \"XHR\",\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results) {\n self._drawIsoResults(results);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME mise à jour du controle mais le service ne repond pas en 200 !?\n self._hideWaitingContainer();\n self._clearIsoResultsGeometry();\n logger.log(error.message);\n }\n });\n },\n // ################################################################### //\n // ######################## isocurve calculation ##################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onIsoComputationSubmit\n * and executes a request to the service.\n *\n * @param {Object} settings - service settings\n *\n * @private\n */\n _requestIsoCurve: function _requestIsoCurve(settings) {\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!settings || _typeof(settings) === \"object\" && Object.keys(settings).length === 0) {\n return;\n }\n\n // on ne fait pas de requête si on n'a pas de point d'origine\n if (!settings.position) {\n return;\n }\n var options = {};\n // on recupere les parametres de saisie et les callbacks\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(options, settings);\n // ainsi que les options du service\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(options, this.options.isocurveOptions);\n options.apiKey = this.options.isocurveOptions.apiKey || this.options.apiKey;\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n options.ssl = this.options.ssl;\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Services.isoCurve(options);\n },\n /**\n * this method is called by this.onIsoComputationSubmit (in case of success)\n * and draw isocurve results geometry on map\n *\n * @param {Object} results - isocurve response results\n *\n * @private\n */\n _drawIsoResults: function _drawIsoResults(results) {\n this._clearIsoResultsGeometry();\n\n // sauvegarde de l'etat des resultats\n this._currentIsoResults = results;\n if (!results.geometry) {\n // cache la patience\n this._hideWaitingContainer();\n return;\n }\n var map = this._map;\n var _geometry = results.geometry;\n var _style = {\n color: \"#ff7800\",\n weight: 5,\n opacity: 0.65\n };\n this._geojsonIso = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.geoJson(_geometry, {\n style: _style\n }).addTo(map);\n\n // cache la patience\n this._hideWaitingContainer();\n this._formContainer.className = \"GPisochroComponentHidden\";\n },\n // ################################################################### //\n // ############################# Clean ############################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onShowIsoPanelClick()\n * and it clears all elements (reinit).\n *\n * @private\n */\n _clear: function _clear() {\n this._initTransport();\n this._initExclusions();\n this._initComputation();\n this._initDirection();\n\n // resultats du service\n this._currentIsoResults = null;\n\n // la geometrie\n this._clearIsoResultsGeometry();\n\n // les points\n this._currentPoint.clear();\n\n // nettoyer les valeurs dans le DOM !\n if (this._timeHourContainer) {\n this._timeHourContainer.value = 0;\n }\n if (this._timeMinuteContainer) {\n this._timeMinuteContainer.value = 0;\n }\n if (this._distanceContainer) {\n this._distanceContainer.value = 0;\n }\n },\n /**\n * this method is called by this.onIsoComputationSubmit()\n * and it clears all route geometries.\n *\n * @private\n */\n _clearIsoResultsGeometry: function _clearIsoResultsGeometry() {\n var map = this._map;\n if (this._geojsonIso != null) {\n map.removeLayer(this._geojsonIso);\n this._geojsonIso = null;\n }\n },\n // ################################################################### //\n // ############################ Patience ############################# //\n // ################################################################### //\n\n /**\n * this method displays waiting container and sets a timeout\n *\n * @private\n */\n _displayWaitingContainer: function _displayWaitingContainer() {\n this._waitingContainer.className = \"GPisochronCalcWaitingContainerVisible\";\n this._waiting = true;\n\n // mise en place d'un timeout pour réinitialiser le panel (cacher la patience)\n // si on est toujours en attente (si la requête est bloquée par exemple)\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n var context = this;\n this._timer = setTimeout(function () {\n if (context._waiting === true) {\n context._hideWaitingContainer();\n } else {\n if (context._timer) {\n clearTimeout(context._timer);\n }\n }\n }, 16000);\n },\n /**\n * this method hides waiting container and clears timeout\n *\n * @private\n */\n _hideWaitingContainer: function _hideWaitingContainer() {\n if (this._waiting) {\n this._waitingContainer.className = \"GPisochronCalcWaitingContainerHidden\";\n this._waiting = false;\n clearTimeout(this._timer);\n this._timer = null;\n }\n },\n // ################################################################### //\n // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ //\n // ################################################################### //\n\n /**\n * This method is public.\n * It allows to control the execution of a traitment.\n *\n * @param {Object} position - position = {lon: , lat: }\n * @param {Object} value - distance en km ou heures-minutes\n * @param {Object} options - options = {...}\n */\n compute: function compute(position, value, options) {\n if (!this._showContainer.checked) {\n this._pictoContainer.click();\n }\n var map = this._map;\n if (!map) {\n return;\n }\n\n // Les options par defauts\n var settings = {\n direction: \"departure\",\n method: \"time\",\n transport: \"Voiture\",\n exclusions: []\n };\n\n // On recupere les options\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(settings, options);\n this._currentPoint.setCoordinate(position);\n var input = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPlocationOrigin_\" + 0 + \"-\" + this._uid);\n input.value = position.lng + \" , \" + position.lat;\n this._currentTransport = settings.transport;\n if (settings.transport === \"Voiture\") {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronTransportCar-\" + this._uid).checked = true;\n } else {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronTransportPedestrian-\" + this._uid).checked = true;\n }\n this._currentExclusions = settings.exclusions;\n this._currentComputation = settings.method;\n if (settings.method === \"time\") {\n var time = value.split(\".\");\n this._currentTimeHour = time[0] || 0;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronValueChronInput1-\" + this._uid).value = this._currentTimeHour;\n this._currentTimeMinute = time[1] || 0;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronValueChronInput2-\" + this._uid).value = this._currentTimeMinute;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronChoiceAltChron-\" + this._uid).click();\n } else {\n this._currentDistance = value;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronValueDistInput-\" + this._uid).value = this._currentDistance;\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronChoiceAltDist-\" + this._uid).click();\n }\n this._currentDirection = settings.direction;\n settings.direction === \"departure\" ? leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 0 : leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 1;\n this.onIsoComputationSubmit();\n map.flyTo(position);\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Isocurve);\nvar deepEqual = function deepEqual(x, y) {\n if (x === y) {\n return true;\n } else if (_typeof(x) === \"object\" && x != null && _typeof(y) === \"object\" && y != null) {\n if (Object.keys(x).length !== Object.keys(y).length) {\n return false;\n }\n for (var prop in x) {\n if (y.hasOwnProperty(prop)) {\n if (!deepEqual(x[prop], y[prop])) {\n return false;\n }\n } else {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL0lzb2N1cnZlLmpzP2QwODYiXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiSXNvY3VydmUiLCJMIiwiQ29udHJvbCIsImV4dGVuZCIsImluY2x1ZGVzIiwiSXNvRE9NIiwib3B0aW9ucyIsInBvc2l0aW9uIiwiY29sbGFwc2VkIiwibWV0aG9kcyIsImdyYXBocyIsImV4Y2x1c2lvbnMiLCJ0b2xsIiwidHVubmVsIiwiYnJpZGdlIiwiZGlyZWN0aW9ucyIsImRpc2FibGVSZXZlcnNlIiwiaXNvY3VydmVPcHRpb25zIiwiYXV0b2NvbXBsZXRlT3B0aW9ucyIsImluaXRpYWxpemUiLCJVdGlsIiwic2V0T3B0aW9ucyIsIl91aWQiLCJJRCIsImdlbmVyYXRlIiwiX2lzRGVza3RvcCIsIl9kZXRlY3RTdXBwb3J0IiwiX3dhaXRpbmdDb250YWluZXIiLCJfc2hvd0NvbnRhaW5lciIsIl9waWN0b0NvbnRhaW5lciIsIl9mb3JtQ29udGFpbmVyIiwiX3N1Ym1p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7XG4gICAgICAgICAgICAgICAgdG9sbCA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHR1bm5lbCA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIGJyaWRnZSA6IGZhbHNlXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gb3B0aW9uXG4gICAgICAgIGlmIChleGNsdXNpb24gJiYgdHlwZW9mIGV4Y2x1c2lvbiA9PT0gXCJvYmplY3RcIiAmJiBPYmplY3Qua2V5cyhleGNsdXNpb24pLmxlbmd0aCkge1xuICAgICAgICAgICAgZm9yICh2YXIgayBpbiBleGNsdXNpb24pIHtcbiAgICAgICAgICAgICAgICBpZiAoZXhjbHVzaW9uLmhhc093blByb3BlcnR5KGspKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChleGNsdXNpb24uaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEV4Y2x1c2lvbnMucHVzaChrKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHNpIGwndXRpbGlzYXRldXIgYSBzcMOpY2lmacOpIGRlcyBleGNsdXNpb25zIGRhbnMgbGUgc2VydmljZSwgb24gc3VyY2hhcmdlIGxlcyBvcHRpb25zIGR1IHdpZGdldFxuICAgICAgICB2YXIgc2VydmljZU9wdGlvbnMgPSB0aGlzLm9wdGlvbnMuaXNvY3VydmVPcHRpb25zO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShzZXJ2aWNlT3B0aW9ucy5leGNsdXNpb25zKSkge1xuICAgICAgICAgICAgdGhpcy5fY3VycmVudEV4Y2x1c2lvbnMgPSBzZXJ2aWNlT3B0aW9ucy5leGNsdXNpb25zO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8vICMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyM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iAoc2VsZi5fY3VycmVudERpcmVjdGlvbi50b0xvd2VyQ2FzZSgpID09PSBcImFycml2YWxcIiksXG4gICAgICAgICAgICB0aW1lIDogdGltZSxcbiAgICAgICAgICAgIGRpc3RhbmNlIDogZGlzdGFuY2UsXG4gICAgICAgICAgICBzbW9vdGhpbmcgOiB0cnVlLFxuICAgICAgICAgICAgdGltZW91dCA6IDcwMDAsXG4gICAgICAgICAgICBwcm90b2NvbCA6IFwiWEhSXCIsXG5cbiAgICAgICAgICAgIC8vIGNhbGxiYWNrIG9uU3VjY2Vzc1xuICAgICAgICAgICAgb25TdWNjZXNzIDogZnVuY3Rpb24gKHJlc3VsdHMpIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIubG9nKHJlc3VsdHMpO1xuICAgICAgICAgICAgICAgIGlmIChyZXN1bHRzKSB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX2RyYXdJc29SZXN1bHRzKHJlc3VsdHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIC8vIGNhbGxiYWNrIG9uRmFpbHVyZVxuICAgICAgICAgICAgb25GYWlsdXJlIDogZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgLy8gRklYTUUgbWlzZSDDoCBqb3VyIGR1IGNvbnRyb2xlIG1haXMgbGUgc2VydmljZSBuZSByZXBvbmQgcGFzIGVuIDIwMCAhP1xuICAgICAgICAgICAgICAgIHNlbGYuX2hpZGVXYWl0aW5nQ29udGFpbmVyKCk7XG5cbiAgICAgICAgICAgICAgICBzZWxmLl9jbGVhcklzb1Jlc3VsdHNHZW9tZXRyeSgpO1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH0sXG5cbiAgICAvLyAjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj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MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyAvL1xuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgZGlzcGxheXMgd2FpdGluZyBjb250YWluZXIgYW5kIHNldHMgYSB0aW1lb3V0XG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIF9kaXNwbGF5V2FpdGluZ0NvbnRhaW5lciA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy5fd2FpdGluZ0NvbnRhaW5lci5jbGFzc05hbWUgPSBcIkdQaXNvY2hyb25DYWxjV2FpdGluZ0NvbnRhaW5lclZpc2libGVcIjtcbiAgICAgICAgdGhpcy5fd2FpdGluZyA9IHRydWU7XG5cbiAgICAgICAgLy8gbWlzZSBlbiBwbGFjZSBkJ3VuIHRpbWVvdXQgcG91ciByw6lpbml0aWFsaXNlciBsZSBwYW5lbCAoY2FjaGVyIGxhIHBhdGllbmNlKVxuICAgICAgICAvLyBzaSBvbiBlc3QgdG91am91cnMgZW4gYXR0ZW50ZSAoc2kgbGEgcmVxdcOqdGUgZXN0IGJsb3F1w6llIHBhciBleGVtcGxlKVxuICAgICAgICBpZiAodGhpcy5fdGltZXIpIHtcbiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl90aW1lcik7XG4gICAgICAgICAgICB0aGlzLl90aW1lciA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGNvbnRleHQgPSB0aGlzO1xuICAgICAgICB0aGlzLl90aW1lciA9IHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgaWYgKGNvbnRleHQuX3dhaXRpbmcgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICBjb250ZXh0Ll9oaWRlV2FpdGluZ0NvbnRhaW5lcigpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5fdGltZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgY2x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c3QgZGVlcEVxdWFsID0gZnVuY3Rpb24gKHgsIHkpIHtcbiAgICBpZiAoeCA9PT0geSkge1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9IGVsc2UgaWYgKCh0eXBlb2YgeCA9PT0gXCJvYmplY3RcIiAmJiB4ICE9IG51bGwpICYmICh0eXBlb2YgeSA9PT0gXCJvYmplY3RcIiAmJiB5ICE9IG51bGwpKSB7XG4gICAgICAgIGlmIChPYmplY3Qua2V5cyh4KS5sZW5ndGggIT09IE9iamVjdC5rZXlzKHkpLmxlbmd0aCkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgcHJvcCBpbiB4KSB7XG4gICAgICAgICAgICBpZiAoeS5oYXNPd25Qcm9wZXJ0eShwcm9wKSkge1xuICAgICAgICAgICAgICAgIGlmICghZGVlcEVxdWFsKHhbcHJvcF0sIHlbcHJvcF0pKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/Isocurve.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Controls/LayerSwitcher.js": +/*!***********************************************!*\ + !*** ./src/Leaflet/Controls/LayerSwitcher.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Common_Controls_LayerSwitcherDOM__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Controls/LayerSwitcherDOM */ \"./src/Common/Controls/LayerSwitcherDOM.js\");\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getLogger(\"layerswitcher\");\n\n/**\n * @classdesc\n *\n * Leaflet Control Class to manage map layers : their order, visibility and opacity, and display their informations (title, description, legends, metadata...)\n *\n * Use {@link module:Controls.LayerSwitcher L.geoportalControl.LayerSwitcher()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.Control.Layers native class.\n *\n * @namespace\n * @alias L.geoportalControl.LayerSwitcher\n */\nvar LayerSwitcher = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Control.Layers.extend( /** @lends L.geoportalControl.LayerSwitcher.prototype */{\n includes: _Common_Controls_LayerSwitcherDOM__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n /**\n * options by default\n * (extend to L.Control.Layers)\n *\n * @private\n */\n options: {\n collapsed: true,\n position: \"topright\",\n autoZIndex: true,\n layers: []\n },\n // ################################################################### //\n // ##################### Methodes surchargées ######################## //\n // ################################################################### //\n\n /**\n * @constructor LayerSwitcher\n *\n * @private\n * @alias LayerSwitcher\n * @extends {L.Control}\n * @param {Object} options - options of component\n * @param {String} [options.position] - position of component into the map, 'topleft' by default\n * @param {Boolean} [options.collapsed = true] - collapse mode, false by default\n * @param {Array} [options.layers] - list of layers to be configured. Each array element is an object, with following properties :\n * @param {Object} [options.layers.layer] - layer object\n * @param {Boolean} [options.layers.display] - display layer in widget layer list\n * @param {String} [options.layers.config.visibility] - layer visibility on map\n * @param {String} [options.layers.config.title] - layer alias, to be displayed in widget layer list. E.g. : \"Cartes IGN\"\n * @param {String} [options.layers.config.description] - layer description, to be displayed on title hover, or in layer information panel.\n * @param {String} [options.layers.config.quicklookUrl] - link to a quick look image for this layer.\n * @param {Array} [options.layers.config.legends] - array of layer legends. Each array element is an object, with following properties :\n * - url (String, mandatory) : link to a legend\n * - minScaleDenominator (Number, optional) : min scale denominator for legend validity.\n * @param {Array} [options.layers.config.metadata] - array of layer metadata. Each array element is an object, with property url (String, mandatory) : link to a metadata\n *\n * @example\n * layers = [\n * {\n * layer : wms1,\n * display : false,\n * config : {\n * title : \"test layer name 1\",\n * description : \"test layer desc 1\",\n * }\n * }\n * ]\n * options = {\n * position : \"topright\",\n * collapsed : true,\n * layers : layers\n * }\n *\n * var layerSwitcher = L.geoportalControl.LayerSwitcher(options);\n */\n initialize: function initialize(options) {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.setOptions(this, options);\n\n // uuid\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__[\"default\"].generate();\n\n // il faut recuperer tous les layers de la carte (cf. onAdd).\n // si une configuration de layers est renseignée, on exploite cette\n // information pour les layers renseignés.\n // Par contre, pour ceux qui n'ont pas de configuration, on exploite\n // les informations issues de la configuration (geoportal-configuration) pour les layers IGN,\n // et, pour les layers non IGN, on gère avec l'ID pours les valeurs\n // de titre ou description ...\n\n // a ton une configuration des layers ?\n this._hasLayersConfig = !(!this.options.layers || Object.keys(this.options.layers).length === 0);\n\n // configuration des layers\n this._layersConfig = this._hasLayersConfig ? this.options.layers : [];\n\n // liste des layers (c'est l'interface avec le dom !)\n this._layers = {};\n\n // indice : ordre des layers sur la carte\n // plus c'est haut, plus c'est au dessus de la pile\n this._lastZIndex = 0;\n\n // si on a une configuration de layers, on l'exploite tout de suite...\n if (this._hasLayersConfig) {\n for (var i = 0; i < this._layersConfig.length; i++) {\n var obj = this._layersConfig[i];\n // signature de la fonction pour une compatibilité avec leaflet...\n this._addLayer(obj.layer, null, true);\n }\n }\n },\n /**\n * Method 'onAdd'\n * (extend to L.Control.Layers)\n * Method to add the control on the map.\n *\n * @param {Object} map - L.Map\n * @returns {HTMLElement} container\n *\n * @private\n */\n onAdd: function onAdd(map) {\n // on charge tous les layers dans le controle avec une\n // configuration automatique des layers pour ceux qui ne sont pas\n // renseignés.\n var layersMap = map._layers;\n\n // on est dans le cas où nous avons des layers ajoutés à la carte\n if (Object.keys(layersMap).length !== 0) {\n // pour gerer l'ordre d'affichage des layers sur la map\n // ainsi que dans le controle, on veut le fonctionnement suivant :\n // layers ID : [21 , 23 , 25 , 27]\n // layers Map : [21:1, 23:2, 25:3, 27:4]\n // mais l'ordre dans le controle doit être inversé\n // layers Ctrl : [27, 25, 23, 21], et ceci sera realisé lors de\n // la creation du DOM pour chaque layer (cf. _update())\n\n var layersKeys = Object.keys(layersMap); // trie\n this._lastZIndex = 0;\n for (var i = 0; i < layersKeys.length; i++) {\n var layerId = layersKeys[i];\n\n // gestion des ordres d'affichage des layers\n if (this.options.autoZIndex && layersMap[layerId].setZIndex) {\n this._lastZIndex++;\n layersMap[layerId].setZIndex(this._lastZIndex);\n }\n\n // y'a t il une configuration des layers ?\n // si oui, le layer renseigné a déjà été pris en compte dans\n // le constructeur..., on passe à la suite...\n if (this._hasLayersConfig) {\n if (this._layers[layerId]) {\n continue;\n }\n }\n\n // sans configuration, on gére en mode auto le layer.\n // on utilise cette methode\n // this.addOverlay() -> this._addLayer()...\n this.addOverlay(layersMap[layerId]);\n }\n }\n\n // FIXME au cas où les layers n'ont pas été renseignés sur la carte\n // (via addTo ou options.layers), on decide de prendre ceux qui\n // sont renseignés dans la configuration ?\n if (Object.keys(layersMap).length === 0) {\n var config = this._layersConfig;\n this._lastZIndex = 0;\n for (var j = 0; j < config.length; j++) {\n var layer = config[j].layer;\n if (!map.hasLayer(layer)) {\n // on ajoute le layer à la carte\n map.addLayer(layer);\n\n // on met en place la structure\n this.addOverlay(layer, null);\n\n // on gère l'ordres d'affichage des layers\n if (this.options.autoZIndex && layer.setZIndex) {\n this._lastZIndex++;\n layer.setZIndex(this._lastZIndex);\n }\n }\n }\n }\n\n // mise à jour des visibilités (au niveau du DOM, oeil coché ou non...)\n for (var k in this._layers) {\n if (this._layers.hasOwnProperty(k)) {\n var obj = this._layers[k];\n var _layer = obj.layer;\n var _visibility = obj.visibility;\n // par defaut, la visibilité de la couche est active, donc avec un oeil non coché !\n if (!_visibility) {\n // on met à jour la liste des layers à afficher !\n this._updateVisibilityLayer(_layer);\n }\n }\n }\n\n // le constructeur retourne this._container !\n // on appelle la methode hérité car elle va realisée le boulot :\n // - _initLayout\n // - _update\n // - evenements sur la carte : layeradd + layerremove\n // this._container = L.Control.Layers.prototype.onAdd.call(this, map);\n\n this._initLayout();\n this._update();\n map.on(\"layeradd\", this._onLayerChange, this);\n map.on(\"layerremove\", this._onLayerChange, this);\n\n // expiremental !\n map.eachLayer(function (layer) {\n // ecouteur sur la visibilité des attributions d'un layer IGN\n layer.on(\"visibilitychange\", function () {\n logger.trace(\"visibilitychange\", layer);\n }, this);\n // ecouteur sur la liste des attributions d'un layer IGN\n layer.on(\"attributionchange\", function () {\n logger.trace(\"attributionchange\", layer);\n }, this);\n });\n return this._container;\n },\n /**\n * this method is called when the control is removed from the map\n * and removes events on map.\n * @param {Object} map - the map\n *\n * @private\n */\n onRemove: function onRemove(map) {\n map.off(\"layeradd\", this._onLayerChange, this);\n map.off(\"layerremove\", this._onLayerChange, this);\n },\n /**\n * Method '_addLayer'\n * (overwritten : L.Control.Layers)\n * Methode creation of a useful structure for the interface with the DOM\n * Method private call by this.initialize() or this.addOverlay()\n *\n * @example\n * {\n * layer : objectlayer,\n * id : id,\n * title : title,\n * description : description\n * (...)\n * };\n * @param {Object} layer - object type 'L.TileLayer'\n * @param {String} name - layer name or title\n * @param {Boolean} overlay - overlay or not\n *\n * @private\n */\n _addLayer: function _addLayer(layer, name, overlay) {\n // id du layer (IGN ou non)\n var id = layer._geoportal_id ? layer._geoportal_id : layer._leaflet_id;\n\n // pas d'ID !?\n // le layer n'est pas chargé dans la carte...\n if (typeof id === \"undefined\") {\n return;\n }\n\n // recherche de la config pour un layer donné\n var layerConfig = {};\n for (var i in this._layersConfig) {\n if (this._layersConfig.hasOwnProperty(i)) {\n if (id === leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(this._layersConfig[i].layer)) {\n layerConfig = this._layersConfig[i].config;\n // display\n // ce layer n'est pas pris en compte dans le controle\n // mais il peut être affiché dans la map\n // si au préalable, le client l'a ajouté...\n var display = typeof this._layersConfig[i].display !== \"undefined\" ? this._layersConfig[i].display : true;\n if (!display) {\n return;\n }\n break;\n }\n }\n }\n\n // construit un objet simplifié pour le dom,\n // par defaut, on prend en compte les layers de type IGN\n // (info de la configuration).\n this._layers[id] = {\n layer: layer,\n id: id,\n overlay: overlay,\n // not use !\n title: layer._geoportal_id && layer._title ? layer._title : name || id,\n description: layer._geoportal_id && layer._description ? layer._description : name || id,\n visibility: true,\n // par defaut, sauf si surcharge via la config...\n legends: layer._geoportal_id ? layer._legends : null,\n metadata: layer._geoportal_id ? layer._metadata : null,\n quicklookUrl: layer._geoportal_id ? layer._quicklookUrl : null\n };\n\n // surcharge la config ci dessus avec les options de configuration saisies\n if (layerConfig && Object.keys(layerConfig).length) {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(this._layers[id], layerConfig);\n }\n\n // mise à jour de la visibilité\n var _visibility = this._layers[id].visibility;\n if (layer._geoportal_id) {\n // mise à jour de la visibilité des attributions pour un layer IGN\n layer.setVisible(_visibility);\n }\n if (!_visibility) {\n // on met à jour la liste des layers à afficher !\n this._updateVisibilityLayer(layer);\n }\n },\n /**\n * Method 'addTo'\n * (overwritten : L.Control.Layers because of exception with _expandIfNotCollapsed())\n *\n * @param {Object} map - the map\n *\n * @returns {Object} this\n */\n addTo: function addTo(map) {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Control.prototype.addTo.call(this, map);\n return this;\n },\n /**\n * Creation of layers of container\n * (extend to L.Control.Layers)\n *\n * Method private call by this.onAdd()\n *\n * @private\n */\n _initLayout: function _initLayout() {\n // fonctionnement lors de l'initialisation :\n // onAdd -> this._update -> this._addItem (on boucle sur layers)\n // onAdd -> this._initLayout\n\n // creation du container principal\n var container = this._container = this._createMainContainerElement();\n\n // ajout dans le container principal d'affichage des layers\n var input = this._createMainLayersShowElement();\n container.appendChild(input);\n\n // gestion du mode \"collapsed\"\n if (!this.options.collapsed) {\n input.checked = true;\n }\n\n // ajout dans le container principal de la liste des layers\n var divL = this._overlaysList = this._createMainLayersElement();\n container.appendChild(divL);\n\n // ajout dans le container principal du picto du controle\n var picto = this._createMainPictoElement();\n container.appendChild(picto);\n\n // ajout dans le container principal du panneau d'information\n var divI = this._createMainInfoElement();\n container.appendChild(divI);\n\n // creation du mode draggable\n this._createDraggableElement(this._overlaysList, this);\n\n // desactivation des evenements qui peuvent interférer avec la carte\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container);\n\n // gestion des evenements en interaction avec la carte\n this._map.on(\"moveend\", this._onOutOfRangeLayerZoom, this);\n\n // gestion des CSS en fonction du placement du controle\n switch (this.getPosition()) {\n case \"topright\":\n container.style.position = \"relative\";\n container.style.top = \"0\";\n container.style.right = \"0\";\n break;\n case \"topleft\":\n container.style.position = \"relative\";\n container.style.top = \"0\";\n container.style.right = \"initial\";\n picto.style[\"float\"] = \"left\";\n divL.style.borderBottomRightRadius = \"5px\";\n divL.style.borderBottomLeftRadius = \"0\";\n divI.style.right = \"initial\";\n divI.style.left = \"190px\";\n break;\n case \"bottomleft\":\n container.style.position = \"relative\";\n container.style.top = \"0\";\n container.style.right = \"initial\";\n picto.style[\"float\"] = \"left\";\n divL.style.borderBottomRightRadius = \"5px\";\n divL.style.borderBottomLeftRadius = \"0\";\n divI.style.right = \"initial\";\n divI.style.left = \"190px\";\n // divI.style.top = \"initial\";\n // divI.style.bottom = \"190px\";\n break;\n case \"bottomright\":\n container.style.position = \"relative\";\n container.style.top = \"0\";\n container.style.right = \"0\";\n // divI.style.top = \"initial\";\n // divI.style.bottom = \"190px\";\n break;\n default:\n container.style.position = \"relative\";\n container.style.top = \"0\";\n container.style.right = \"0\";\n }\n },\n /**\n * Update the construction of DOM for each layer\n * (extend to L.Control.Layers)\n *\n * Method private call by this.onAdd()\n *\n * @private\n */\n _update: function _update() {\n if (!this._container) {\n return;\n }\n this._overlaysList.innerHTML = \"\";\n var layersId = [];\n for (var i in this._layers) {\n if (this._layers.hasOwnProperty(i)) {\n layersId.push(i);\n }\n }\n\n // inversion du sens des layers dans le controle\n // car on veut le même ordre que sur la map, et comme je suis un peu\n // parano, je re-trie la liste...\n var layers = layersId.sort(function (a, b) {\n var ia = parseInt(a, 10);\n var ib = parseInt(b, 10);\n return ia - ib;\n }).reverse();\n for (var j = 0; j < layers.length; j++) {\n var id = layers[j];\n var obj = this._layers[id];\n this._addItem(obj);\n }\n },\n /**\n * Construction of the DOM for each layer\n * (extend to L.Control.Layers)\n *\n * Method private call by this._update()\n *\n * @private\n * @param {Object} obj - layer\n * @returns {HTMLElement} container\n */\n _addItem: function _addItem(obj) {\n logger.log(\"_addItem\", obj);\n obj.opacity = obj.layer.options.opacity; // ajout de cette option !\n var container = this._createContainerLayerElement(obj);\n\n // gestion outOfRange\n obj.layer.options.minZoom > this._map.getZoom() || obj.layer.options.maxZoom < this._map.getZoom() ? leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(container, \"outOfRange\") : leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(container, \"outOfRange\");\n\n // ajout du container dans la liste des layers (de type overlay uniquement !)\n this._overlaysList.appendChild(container);\n return container;\n },\n /**\n * Event onLayer change\n * (extend to L.Control.Layers because of version 1.0.0)\n *\n * @private\n * @param {Event} e - event\n */\n _onLayerChange: function _onLayerChange(e) {\n var obj = this._layers[leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(e.layer)];\n if (!obj) {\n return;\n }\n if (!this._handlingClick) {\n this._update();\n }\n this._map.fire(e.type === \"layeradd\" ? \"overlayadd\" : \"overlayremove\", obj);\n },\n /**\n * Event onLayer remove\n * (extend to L.Control.Layers because of version 1.0.0)\n *\n * @private\n * @param {Object} layer - event\n * @returns {Object} layer\n */\n removeLayer: function removeLayer(layer) {\n // clean DOM !\n var id = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(layer);\n delete this._layers[id];\n this._update();\n\n // clean Layers\n var map = this._map;\n if (map) {\n if (map.hasLayer(layer)) {\n map.removeLayer(layer);\n }\n }\n return this;\n },\n // ################################################################### //\n // ################ Methodes de l'instance (privées) ################# //\n // ################################################################### //\n\n /**\n * Set visibility of attribution layer\n * (call by this._onVisibilityLayerClick())\n *\n * @private\n * @param {Object} layer - layer\n */\n _updateVisibilityLayer: function _updateVisibilityLayer(layer) {\n if (!this._map) {\n return;\n }\n this._handlingClick = true;\n var visibility = this._layers[leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(layer)].visibility;\n if (visibility && !this._map.hasLayer(layer)) {\n // input non checked dans le DOM, on ouvre l'oeil\n // et on ajoute la couche !\n this._map.addLayer(layer);\n } else if (!visibility && this._map.hasLayer(layer)) {\n // input checked dans le DOM, on ferme l'oeil\n // et on supprime la couche !\n this._map.removeLayer(layer);\n } else {\n logger.log(\"Status unknown layer !?\");\n }\n this._handlingClick = false;\n this._refocusOnMap();\n },\n /**\n * Set visibility of layer (DOM)\n * (call by this.setVisibility())\n *\n * @private\n * @param {Object} layer - layer\n */\n _updateVisibilityDOMLayer: function _updateVisibilityDOMLayer(layer) {\n var layerIdx = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(layer);\n var visibilityElement = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID(\"GPvisibility_ID_\" + layerIdx)); // FIXME ID !\n var visibilityValue = this._layers[layerIdx].visibility;\n visibilityElement.checked = visibilityValue;\n },\n /**\n * Set opacity of layer (DOM)\n * (call by this.setOpacity())\n *\n * @private\n * @param {Object} layer - layer\n */\n _updateOpacityDOMLayer: function _updateOpacityDOMLayer(layer) {\n var layerIdx = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(layer);\n var opacityValue = layer.options.opacity;\n var opacityElement = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID(\"GPopacityValue_ID_\" + layerIdx)); // FIXME ID !\n opacityElement.innerHTML = parseInt(opacityValue * 100, 10) + \"%\";\n opacityElement.value = parseInt(opacityValue * 100, 10);\n },\n // ################################################################### //\n // ################## GESTIONNAIRES d'evenements ##################### //\n // ################################################################### //\n\n /**\n * Event 'zoom' on layers visibility\n *\n * FIXME contrainte sur l'emprise du layer ?\n *\n * @private\n */\n _onOutOfRangeLayerZoom: function _onOutOfRangeLayerZoom() {\n var map = this._map;\n var layers = this._layers;\n for (var i in layers) {\n if (layers.hasOwnProperty(i)) {\n var layer = layers[i].layer;\n var id = layers[i].id;\n var div = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID(\"GPlayerSwitcher_ID_\" + id)); // FIXME ID !\n if (layer.options.minZoom > map.getZoom() || layer.options.maxZoom < map.getZoom()) {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(div, \"outOfRange\");\n } else {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(div, \"outOfRange\");\n }\n }\n }\n },\n /**\n * Event 'click' on layer visibility\n *\n * @private\n * @param {Event} e - MouseEvent\n */\n _onVisibilityLayerClick: function _onVisibilityLayerClick(e) {\n var visibilityElement = e.target.id; // ex GPvisibilityPicto_ID_26\n var visibilityOrder = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__[\"default\"].index(visibilityElement); // ex. 26\n\n // on met à jour cette interface...\n this._layers[visibilityOrder].visibility = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(visibilityElement).checked;\n var layer = this._layers[visibilityOrder].layer;\n this._updateVisibilityLayer(layer);\n },\n /**\n * Event 'click' on layer deleted\n *\n * @private\n * @param {Event} e - MouseEvent\n */\n _onDropLayerClick: function _onDropLayerClick(e) {\n var layerElement = e.target.id; // ex GPvisibilityPicto_ID_26\n var layerOrder = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__[\"default\"].index(layerElement); // ex. 26\n var layer = this._layers[layerOrder].layer;\n this.removeLayer(layer);\n },\n /**\n * Event 'onchange' on layer opacity\n *\n * FIXME appel en dur d'un identifiant CSS !\n *\n * @private\n * @param {Event} e - ChangeEvent\n */\n _onChangeLayerOpacity: function _onChangeLayerOpacity(e) {\n var layerElement = e.target.id; // ex GPvisibilityPicto_ID_26\n var layerOrder = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__[\"default\"].index(layerElement); // ex. 26\n var layer = this._layers[layerOrder].layer;\n var opacityValue = e.target.value;\n var opacityId = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID(\"GPopacityValue_ID_\" + layerOrder)); // FIXME ID !\n opacityId.innerHTML = opacityValue + \"%\";\n if (this._map.hasLayer(layer)) {\n if (typeof layer.setOpacity !== \"undefined\") {\n layer.setOpacity(opacityValue / 100);\n } else {\n // Particularité du format GeoJSON\n layer.setStyle({\n fillOpacity: opacityValue / 100,\n opacity: opacityValue / 100\n });\n }\n }\n },\n /**\n * Event 'click' on opening the information window\n *\n * FIXME appel en dur d'un identifiant CSS !\n *\n * @private\n * @param {Event} e - MouseEvent\n */\n _onOpenLayerInfoClick: function _onOpenLayerInfoClick(e) {\n var layerElement = e.target.id; // ex GPvisibilityPicto_ID_26\n var layerOrder = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__[\"default\"].index(layerElement); // ex. 26\n var layer = this._layers[layerOrder];\n\n // Close layer info panel\n var divId = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(e.target.id);\n var panel = null;\n var info = null;\n if (divId.className === \"GPlayerInfoOpened\") {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(divId, \"GPlayerInfoOpened\");\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(divId, \"GPlayerInfo\");\n panel = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID(\"GPlayerInfoPanel\"));\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(panel, \"GPpanel\");\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(panel, \"GPlayerInfoPanelOpened\");\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(panel, \"GPlayerInfoPanelClosed\");\n info = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID(\"GPlayerInfoContent\"));\n panel.removeChild(info);\n return;\n }\n var layers = document.getElementsByClassName(\"GPlayerInfoOpened\");\n for (var i = 0; i < layers.length; i++) {\n layers[i].className = \"GPlayerInfo\";\n }\n\n // Open layer info panel\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(divId, \"GPlayerInfo\");\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(divId, \"GPlayerInfoOpened\");\n panel = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID(\"GPlayerInfoPanel\"));\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(panel, \"GPpanel\");\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(panel, \"GPlayerInfoPanelClosed\");\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(panel, \"GPlayerInfoPanelOpened\");\n info = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID(\"GPlayerInfoContent\"));\n if (info) {\n panel.removeChild(info);\n }\n\n // on récupére les infos associées au layer pour mettre à jour\n // dynamiquement le contenu du panel d\"infos\n var infoLayer = this._createContainerLayerInfoElement(layer);\n panel.appendChild(infoLayer);\n },\n /**\n * Event \"drag & drop\" on move layer\n *\n * FIXME appel en dur d'un identifiant CSS !\n *\n * @private\n * @param {Event} e - MouseEvent\n */\n _onDragAndDropLayerClick: function _onDragAndDropLayerClick(e) {\n var layerElement = e.target.id; // ex GPvisibilityPicto_ID_26\n var layerOrder = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__[\"default\"].index(layerElement); // ex. 26\n var layer = this._layers[layerOrder];\n logger.log(layer);\n var matchesLayers = document.querySelectorAll(\"div.GPlayerSwitcher_layer\");\n this._lastZIndex = matchesLayers.length;\n for (var i = 0; i < matchesLayers.length; i++) {\n var tag = matchesLayers[i].id;\n var order = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__[\"default\"].index(tag);\n var _layer = this._layers[order].layer;\n if (this.options.autoZIndex && _layer.setZIndex) {\n this._lastZIndex--;\n _layer.setZIndex(this._lastZIndex);\n }\n }\n },\n // ################################################################### //\n // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ //\n // ################################################################### //\n\n /**\n * Adding layer configuration to be displayed by the control\n *\n * @param {Object} layer - layer to add to layer switcher\n * @param {Object} config - See {@link module:Controls.LayerSwitcher L.geoportalControl.LayerSwitcher()} for layer display config object definition.\n */\n addLayer: function addLayer(layer, config) {\n var map = this._map;\n var cfg = this._layersConfig;\n if (!layer) {\n logger.log(\"[ERROR] LayerSwitcher:addLayer - missing layer parameter !\");\n return;\n }\n if (!map.hasLayer(layer)) {\n logger.log(\"[WARN] LayerSwitcher:addLayer - layer has not been added on map !\");\n map.addLayer(layer);\n }\n var id = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(layer);\n for (var i in cfg) {\n if (cfg.hasOwnProperty(i)) {\n // layer already added !\n if (id === leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(cfg[i].layer)) {\n delete cfg[i];\n break;\n }\n }\n }\n var _config = config || {};\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(_config, {\n layer: layer\n });\n cfg.push(_config);\n\n // layer déjà configuré, il reprend sa place !\n if (!this._layers[id]) {\n layer.setZIndex(this._lastZIndex++);\n }\n this.addOverlay(layer);\n this._update();\n },\n /**\n * Set the opacity of a layer, and opacity must be a number from 0 to 1.\n *\n * @param {Object} layer - layer into layerswitcher\n * @param {Number} opacity - 0-1.\n */\n setOpacity: function setOpacity(layer, opacity) {\n logger.trace(layer, opacity);\n if (opacity > 1 || opacity < 0) {\n return;\n }\n if (this._map.hasLayer(layer)) {\n if (typeof layer.setOpacity !== \"undefined\") {\n layer.setOpacity(opacity);\n } else {\n // Particularité du format GeoJSON pour l'opacité\n layer.options.opacity = opacity;\n layer.setStyle({\n fillOpacity: opacity,\n opacity: opacity\n });\n }\n this._updateOpacityDOMLayer(layer);\n }\n },\n /**\n * Set the visibility of a layer.\n *\n * @param {Object} layer - layer into layerswitcher\n * @param {Object} visibility - true/false.\n */\n setVisibility: function setVisibility(layer, visibility) {\n logger.trace(layer, visibility);\n this._layers[leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(layer)].visibility = visibility;\n this._updateVisibilityDOMLayer(layer);\n this._updateVisibilityLayer(layer);\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (LayerSwitcher);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0Nv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IGxheWVyLlxuICAgICAqIEBwYXJhbSB7QXJyYXl9IFtvcHRpb25zLmxheWVycy5jb25maWcubGVnZW5kc10gLSBhcnJheSBvZiBsYXllciBsZWdlbmRzLiBFYWNoIGFycmF5IGVsZW1lbnQgaXMgYW4gb2JqZWN0LCB3aXRoIGZvbGxvd2luZyBwcm9wZXJ0aWVzIDpcbiAgICAgKiAgICAgIC0gdXJsIChTdHJpbmcsIG1hbmRhdG9yeSkgOiBsaW5rIHRvIGEgbGVnZW5kXG4gICAgICogICAgICAtIG1pblNjYWxlRGVub21pbmF0b3IgKE51bWJlciwgb3B0aW9uYWwpIDogbWluIHNjYWxlIGRlbm9taW5hdG9yIGZvciBsZWdlbmQgdmFsaWRpdHkuXG4gICAgICogQHBhcmFtIHtBcnJheX0gW29wdGlvbnMubGF5ZXJzLmNvbmZpZy5tZXRhZGF0YV0gLSBhcnJheSBvZiBsYXllciBtZXRhZGF0YS4gRWFjaCBhcnJheSBlbGVtZW50IGlzIGFuIG9iamVjdCwgd2l0aCBwcm9wZXJ0eSB1cmwgKFN0cmluZywgbWFuZGF0b3J5KSA6IGxpbmsgdG8gYSBtZXRhZGF0YVxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiAgbGF5ZXJzID0gW1xuICAgICAqICAgICAge1xuICAgICAqICAgICAgICAgIGxheWVyIDogd21zMSxcbiAgICAgKiAgICAgICAgICBkaXNwbGF5IDogZmFsc2UsXG4gICAgICogICAgICAgICAgY29uZmlnIDoge1xuICAgICAqICAgICAgICAgICAgICB0aXRsZSA6IFwidGVzdCBsYXllciBuYW1lIDFcIixcbiAgICAgKiAgICAgICAgICAgICAgZGVzY3JpcHRpb24gOiBcInRlc3QgbGF5ZXIgZGVzYyAxXCIsXG4gICAgICogICAgICAgICAgfVxuICAgICAqICAgICAgfVxuICAgICAqICBdXG4gICAgICogIG9wdGlvbnMgPSB7XG4gICAgICogICAgICBwb3NpdGlvbiA6IFwidG9wcmlnaHRcIixcbiAgICAg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ICAgICAvLyBzaSBvdWksIGxlIGxheWVyIHJlbnNlaWduw6kgYSBkw6lqw6Agw6l0w6kgcHJpcyBlbiBjb21wdGUgZGFuc1xuICAgICAgICAgICAgICAgIC8vIGxlIGNvbnN0cnVjdGV1ci4uLiwgb24gcGFzc2Ugw6AgbGEgc3VpdGUuLi5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5faGFzTGF5ZXJzQ29uZmlnKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9sYXllcnNbbGF5ZXJJZF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gc2FucyBjb25maWd1cmF0aW9uLCBvbiBnw6lyZSBlbiBtb2RlIGF1dG8gbGUgbGF5ZXIuXG4gICAgICAgICAgICAgICAgLy8gb24gdXRpbGlzZSBjZXR0ZSBtZXRob2RlXG4gICAgICAgICAgICAgICAgLy8gdGhpcy5hZGRPdmVybGF5KCkgLT4gdGhpcy5fYWRkTGF5ZXIoKS4uLlxuICAgICAgICAgICAgICAgIHRoaXMuYWRkT3ZlcmxheShsYXllcnNNYXBbbGF5ZXJJZF0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gRklYTUUgYXUgY2FzIG/DuSBsZXMgbGF5ZXJzIG4nb250IHBhcyDDqXTDqSByZW5zZWlnbsOpcyBzdXIgbGEgY2FydGVcbiAgICAgICAgLy8gKHZpYSBhZGRUbyBvdSBvcHRpb25zLmxheWVycyksIG9uIGRlY2lkZSBkZSBwcmVuZHJlIGNldXggcXVpXG4gICAgICAgIC8vIHNvbnQgcmVuc2VpZ27DqXMgZGFucyBsYSBjb25maWd1cmF0aW9uID9cbiAgICAgICAgaWYgKE9iamVjdC5rZXlzKGxheWVyc01hcCkubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICB2YXIgY29uZmlnID0gdGhpcy5fbGF5ZXJzQ29uZmlnO1xuICAgICAgICAgICAgdGhpcy5fbGFzdFpJbmRleCA9IDA7XG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGNvbmZpZy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIHZhciBsYXllciA9IGNvbmZpZ1tqXS5sYXllcjtcblxuICAgICAgICAgICAgICAgIGlmICghbWFwLmhhc0xheWVyKGxheWVyKSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbiBham91dGUgbGUgbGF5ZXIgw6AgbGEgY2FydGVcbiAgICAgICAgICAgICAgICAgICAgbWFwLmFkZExheWVyKGxheWVyKTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBvbiBtZXQgZW4gcGxhY2UgbGEgc3RydWN0dXJlXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYWRkT3ZlcmxheShsYXllciwgbnVsbCk7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gb24gZ8OocmUgbCdvcmRyZXMgZCdhZmZpY2hhZ2UgZGVzIGxheWVyc1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5vcHRpb25zLmF1dG9aSW5kZXggJiYgbGF5ZXIuc2V0WkluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9sYXN0WkluZGV4Kys7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYXllci5zZXRaSW5kZXgodGhpcy5fbGFzdFpJbmRleCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBtaXNlIMOgIGpvdXIgZGVzIHZpc2liaWxpdMOpcyAoYXUgbml2ZWF1IGR1IERPTSwgb2VpbCBjb2Now6kgb3Ugbm9uLi4uKVxuICAgICAgICBmb3IgKHZhciBrIGluIHRoaXMuX2xheWVycykge1xuICAgICAgICAgICAgaWYgKHRoaXMuX2xheWVycy5oYXNPd25Qcm9wZXJ0eShrKSkge1xuICAgICAgICAgICAgICAgIHZhciBvYmogPSB0aGlzLl9sYXllcnNba107XG4gICAgICAgICAgICAgICAgdmFyIF9sYXllciA9IG9iai5sYXllcjtcbiAgICAgICAgICAgICAgICB2YXIgX3Zpc2liaWxpdHkgPSBvYmoudmlzaWJpbGl0eTtcbiAgICAgICAgICAgICAgICAvLyBwYXIgZGVmYXV0LCBsYSB2aXNpYmlsaXTDqSBkZSBsYSBjb3VjaGUgZXN0IGFjdGl2ZSwgZG9uYyBhdmVjIHVuIG9laWwgbm9uIGNvY2jDqSAhXG4gICAgICAgICAgICAgICAgaWYgKCFfdmlzaWJpbGl0eSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbiBtZXQgw6Agam91ciBsYSBsaXN0ZSBkZXMgbGF5ZXJzIMOgIGFmZmljaGVyICFcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlVmlzaWJpbGl0eUxheWVyKF9sYXllcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gbGUgY29uc3RydWN0ZXVyIHJldG91cm5lIHRoaXMuX2NvbnRhaW5lciAhXG4gICAgICAgIC8vIG9uIGFwcGVsbGUgbGEgbWV0aG9kZSBow6lyaXTDqSBjYXIgZWxsZSB2YSByZWFsaXPDqWUgbGUgYm91bG90IDpcbiAgICAgICAgLy8gLSBfaW5pdExheW91dFxuICAgICAgICAvLyAtIF91cGRhdGVcbiAgICAgICAgLy8gLSBldmVuZW1lbnRzIHN1ciBsYSBjYXJ0ZSA6IGxheWVyYWRkICsgbGF5ZXJyZW1vdmVcbiAgICAgICAgLy8gdGhpcy5fY29udGFpbmVyID0gTC5Db250cm9sLkxheWVycy5wcm90b3R5cGUub25BZGQuY2FsbCh0aGlzLCBtYXApO1xuXG4gICAgICAgIHRoaXMuX2luaXRMYXlvdXQoKTtcbiAgICAgICAgdGhpcy5fdXBkY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ciA6IGZ1bmN0aW9uIChsYXllciwgbmFtZSwgb3ZlcmxheSkge1xuICAgICAgICAvLyBpZCBkdSBsYXllciAoSUdOIG91IG5vbilcbiAgICAgICAgdmFyIGlkID0gKGxheWVyLl9nZW9wb3J0YWxfaWQpID8gbGF5ZXIuX2dlb3BvcnRhbF9pZCA6IGxheWVyLl9sZWFmbGV0X2lkO1xuXG4gICAgICAgIC8vIHBhcyBkJ0lEICE/XG4gICAgICAgIC8vIGxlIGxheWVyIG4nZXN0IHBhcyBjaGFyZ8OpIGRhbnMgbGEgY2FydGUuLi5cbiAgICAgICAgaWYgKHR5cGVvZiBpZCA9PT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gcmVjaGVyY2hlIGRlIGxhIGNvbmZpZyBwb3VyIHVuIGxheWVyIGRvbm7DqVxuICAgICAgICB2YXIgbGF5ZXJDb25maWcgPSB7fTtcbiAgICAgICAgZm9yICh2YXIgaSBpbiB0aGlzLl9sYXllcnNDb25maWcpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLl9sYXllcnNDb25maWcuaGFzT3duUHJvcGVydHkoaSkpIHtcbiAgICAgICAgICAgICAgICBpZiAoaWQgPT09IEwuc3RhbXAodGhpcy5fbGF5ZXJzQ29uZmlnW2ldLmxheWVyKSkge1xuICAgICAgICAgICAgICAgICAgICBsYXllckNvbmZpZyA9IHRoaXMuX2xheWVyc0NvbmZpZ1tpXS5jb25maWc7XG4gICAgICAgICAgICAgICAgICAgIC8vIGRpc3BsYXlcbiAgICAgICAgICAgICAgICAgICAgLy8gY2UgbGF5ZXIgbidlc3QgcGFzIHByaXMgZW4gY29tcHRlIGRhbnMgbGUgY29udHJvbGVcbiAgICAgICAgICAgICAgICAgICAgLy8gbWFpcyBpbCBwZXV0IMOqdHJlIGFmZmljaMOpIGRhbnMgbGEgbWFwXG4gICAgICAgICAgICAgICAgICAgIC8vIHNpIGF1IHByw6lhbGFibGUsIGxlIGNsaWVudCBsJ2EgYWpvdXTDqS4uLlxuICAgICAgICAgICAgICAgICAgICB2YXIgZGlzcGxheSA9ICh0eXBlb2YgdGhpcy5fbGF5ZXJzQ29uZmlnW2ldLmRpc3BsYXkgIT09IFwidW5kZWZpbmVkXCIpID8gdGhpcy5fbGF5ZXJzQ29uZmlnW2ldLmRpc3BsYXkgOiB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWRpc3BsYXkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBjb25zdHJ1aXQgdW4gb2JqZXQgc2ltcGxpZmnDqSBwb3VyIGxlIGRvbSxcbiAgICAgICAgLy8gcGFyIGRlZmF1dCwgb24gcHJlbmQgZW4gY29tcHRlIGxlcyBsYXllcnMgZGUgdHlwZSBJR05cbiAgICAgICAgLy8gKGluZm8gZGUgbGEgY29uZmlndXJhdGlvbikuXG4gICAgICAgIHRoaXMuX2xheWVyc1tpZF0gPSB7XG4gICAgICAgICAgICBsYXllciA6IGxheWVyLFxuICAgICAgICAgICAgaWQgOiBpZCxcbiAgICAgICAgICAgIG92ZXJsYXkgOiBvdmVybGF5LCAvLyBub3QgdXNlICFcbiAgICAgICAgICAgIHRpdGxlIDogKGxheWVyLl9nZW9wb3J0YWxfaWQgJiYgbGF5ZXIuX3RpdGxlKSA/IGxheWVyLl90aXRsZSA6IChuYW1lKSB8fCBpZCxcbiAgICAgICAgICAgIGRlc2NyaXB0aW9uIDogKGxheWVyLl9nZW9wb3J0YWxfaWQgJiYgbGF5ZXIuX2Rlc2NyaXB0aW9uKSA/IGxheWVyLl9kZXNjcmlwdGlvbiA6IChuYW1lKSB8fCBpZCxcbiAgICAgICAgICAgIHZpc2liaWxpdHkgOiB0cnV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ZWFrO1xuICAgICAgICAgICAgY2FzZSBcInRvcGxlZnRcIjpcbiAgICAgICAgICAgICAgICBjb250YWluZXIuc3R5bGUucG9zaXRpb24gPSBcInJlbGF0aXZlXCI7XG4gICAgICAgICAgICAgICAgY29udGFpbmVyLnN0eWxlLnRvcCA9IFwiMFwiO1xuICAgICAgICAgICAgICAgIGNvbnRhaW5lci5zdHlsZS5yaWdodCA9IFwiaW5pdGlhbFwiO1xuICAgICAgICAgICAgICAgIHBpY3RvLnN0eWxlLmZsb2F0ID0gXCJsZWZ0XCI7XG4gICAgICAgICAgICAgICAgZGl2TC5zdHlsZS5ib3JkZXJCb3R0b21SaWdodFJhZGl1cyA9IFwiNXB4XCI7XG4gICAgICAgICAgICAgICAgZGl2TC5zdHlsZS5ib3JkZXJCb3R0b21MZWZ0UmFkaXVzID0gXCIwXCI7XG4gICAgICAgICAgICAgICAgZGl2SS5zdHlsZS5yaWdodCA9IFwiaW5pdGlhbFwiO1xuICAgICAgICAgICAgICAgIGRpdkkuc3R5bGUubGVmdCA9IFwiMTkwcHhcIjtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJib3R0b21sZWZ0XCI6XG4gICAgICAgICAgICAgICAgY29udGFpbmVyLnN0eWxlLnBvc2l0aW9uID0gXCJyZWxhdGl2ZVwiO1xuICAgICAgICAgICAgICAgIGNvbnRhaW5lci5zdHlsZS50b3AgPSBcIjBcIjtcbiAgICAgICAgICAgICAgICBjb250YWluZXIuc3R5bGUucmlnaHQgPSBcImluaXRpYWxcIjtcbiAgICAgICAgICAgICAgICBwaWN0by5zdHlsZS5mbG9hdCA9IFwibGVmdFwiO1xuICAgICAgICAgICAgICAgIGRpdkwuc3R5bGUuYm9yZGVyQm90dG9tUmlnaHRSYWRpdXMgPSBcIjVweFwiO1xuICAgICAgICAgICAgICAgIGRpdkwuc3R5bGUuYm9yZGVyQm90dG9tTGVmdFJhZGl1cyA9IFwiMFwiO1xuICAgICAgICAgICAgICAgIGRpdkkuc3R5bGUucmlnaHQgPSBcImluaXRpYWxcIjtcbiAgICAgICAgICAgICAgICBkaXZJLnN0eWxlLmxlZnQgPSBcIjE5MHB4XCI7XG4gICAgICAgICAgICAgICAgLy8gZGl2SS5zdHlsZS50b3AgPSBcImluaXRpYWxcIjtcbiAgICAgICAgICAgICAgICAvLyBkaXZJLnN0eWxlLmJvdHRvbSA9IFwiMTkwcHhcIjtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJib3R0b21yaWdodFwiOlxuICAgICAgICAgICAgICAgIGNvbnRhaW5lci5zdHlsZS5wb3NpdGlvbiA9IFwicmVsYXRpdmVcIjtcbiAgICAgICAgICAgICAgICBjb250YWluZXIuc3R5bGUudG9wID0gXCIwXCI7XG4gICAgICAgICAgICAgICAgY29udGFpbmVyLnN0eWxlLnJpZ2h0ID0gXCIwXCI7XG4gICAgICAgICAgICAgICAgLy8gZGl2SS5zdHlsZS50b3AgPSBcImluaXRpYWxcIjtcbiAgICAgICAgICAgICAgICAvLyBkaXZJLnN0eWxlLmJvdHRvbSA9IFwiMTkwcHhcIjtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQgOlxuICAgICAgICAgICAgICAgIGNvbnRhaW5lci5zdHlsZS5wb3NpdGlvbiA9IFwicmVsYXRpdmVcIjtcbiAgICAgICAgICAgICAgICBjb250YWluZXIuc3R5bGUudG9wID0gXCIwXCI7XG4gICAgICAgICAgICAgICAgY29udGFpbmVyLnN0eWxlLnJpZ2h0ID0gXCIwXCI7XG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogVXBkYXRlIHRoZSBjb25zdHJ1Y3Rpb24gb2YgRE9NIGZvciBlYWNoIGxheWVyXG4gICAgICogKGV4dGVuZCB0byBMLkNvbnRyb2wuTGF5ZXJzKVxuICAgICAqXG4gICAgICogTWV0aG9kIHByaXZhdGUgY2FsbCBieSB0aGlzLm9uQWRkKClcbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgX3VwZGF0ZSA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgaWYgKCF0aGlzLl9jb250YWluZXIpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuX292ZXJsYXlzTGlzdC5pbm5lckhUTUwgPSBcIlwiO1xuXG4gICAgICAgIHZhciBsYXllcnNJZCA9IFtdO1xuXG4gICAgICAgIGZvciAodmFyIGkgaW4gdGhpcy5fbGF5ZXJzKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5fbGF5ZXJzLmhhc093blByb3BlcnR5KGkpKSB7XG4gICAgICAgICAgICAgICAgbGF5ZXJzSWQucHVzaChpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGludmVyc2lvbiBkdSBzZW5zIGRlcyBsYXllcnMgZGFucyBsZSBjb250cm9sZVxuICAgICAgICAvLyBjYXIgb24gdmV1dCBsZSBtw6ptZSBvcmRyZSBxdWUgc3VyIGxhIG1hcCwgZXQgY29tbWUgamUgc3VpcyB1biBwZXVcbiAgICAgICAgLy8gcGFyYW5vLCBqZSByZS10cmllIGxhIGxpc3RlLi4uXG4gICAgICAgIHZhciBsYXllcnMgPSBsYXllcnNJZC5zb3J0KGZ1bmN0aW9uIChhLCBiKSB7XG4gICAgICAgICAgICB2YXIgaWEgPSBwYXJzZUludChhLCAxMCk7XG4gICAgICAgICAgICB2YXIgaWIgPSBwYXJzZUludChiLCAxMCk7XG4gICAgICAgICAgICByZXR1cm4gaWEgLSBpYjtcbiAgICAgICAgfSkucmV2ZXJzZSgpO1xuXG4gICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgbGF5ZXJzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICB2YXIgaWQgPSBsYXllcnNbal07XG4gICAgICAgICAgICB2YXIgb2JqID0gdGhpcy5fbGF5Z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gICAgICAgICAgICAgICAgICAgZGVsZXRlIGNmZ1tpXTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFyIF9jb25maWcgPSBjb25maWcgfHwge307XG4gICAgICAgIEwuVXRpbC5leHRlbmQoX2NvbmZpZywge1xuICAgICAgICAgICAgbGF5ZXIgOiBsYXllclxuICAgICAgICB9KTtcblxuICAgICAgICBjZmcucHVzaChfY29uZmlnKTtcblxuICAgICAgICAvLyBsYXllciBkw6lqw6AgY29uZmlndXLDqSwgaWwgcmVwcmVuZCBzYSBwbGFjZSAhXG4gICAgICAgIGlmICghdGhpcy5fbGF5ZXJzW2lkXSkge1xuICAgICAgICAgICAgbGF5ZXIuc2V0WkluZGV4KHRoaXMuX2xhc3RaSW5kZXgrKyk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmFkZE92ZXJsYXkobGF5ZXIpO1xuXG4gICAgICAgIHRoaXMuX3VwZGF0ZSgpO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBTZXQgdGhlIG9wYWNpdHkgb2YgYSBsYXllciwgYW5kIG9wYWNpdHkgbXVzdCBiZSBhIG51bWJlciBmcm9tIDAgdG8gMS5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBsYXllciAtIGxheWVyIGludG8gbGF5ZXJzd2l0Y2hlclxuICAgICAqIEBwYXJhbSB7TnVtYmVyfSBvcGFjaXR5IC0gMC0xLlxuICAgICAqL1xuICAgIHNldE9wYWNpdHkgOiBmdW5jdGlvbiAobGF5ZXIsIG9wYWNpdHkpIHtcbiAgICAgICAgbG9nZ2VyLnRyYWNlKGxheWVyLCBvcGFjaXR5KTtcbiAgICAgICAgaWYgKG9wYWNpdHkgPiAxIHx8IG9wYWNpdHkgPCAwKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5fbWFwLmhhc0xheWVyKGxheWVyKSkge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBsYXllci5zZXRPcGFjaXR5ICE9PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgICAgICAgICAgbGF5ZXIuc2V0T3BhY2l0eShvcGFjaXR5KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gUGFydGljdWxhcml0w6kgZHUgZm9ybWF0IEdlb0pTT04gcG91ciBsJ29wYWNpdMOpXG4gICAgICAgICAgICAgICAgbGF5ZXIub3B0aW9ucy5vcGFjaXR5ID0gb3BhY2l0eTtcbiAgICAgICAgICAgICAgICBsYXllci5zZXRTdHlsZSh7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxPcGFjaXR5IDogb3BhY2l0eSxcbiAgICAgICAgICAgICAgICAgICAgb3BhY2l0eSA6IG9wYWNpdHlcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuX3VwZGF0ZU9wYWNpdHlET01MYXllcihsYXllcik7XG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogU2V0IHRoZSB2aXNpYmlsaXR5IG9mIGEgbGF5ZXIuXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gbGF5ZXIgLSBsYXllciBpbnRvIGxheWVyc3dpdGNoZXJcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gdmlzaWJpbGl0eSAtIHRydWUvZmFsc2UuXG4gICAgICovXG4gICAgc2V0VmlzaWJpbGl0eSA6IGZ1bmN0aW9uIChsYXllciwgdmlzaWJpbGl0eSkge1xuICAgICAgICBsb2dnZXIudHJhY2UobGF5ZXIsIHZpc2liaWxpdHkpO1xuICAgICAgICB0aGlzLl9sYXllcnNbTC5zdGFtcChsYXllcildLnZpc2liaWxpdHkgPSB2aXNpYmlsaXR5O1xuICAgICAgICB0aGlzLl91cGRhdGVWaXNpYmlsaXR5RE9NTGF5ZXIobGF5ZXIpO1xuICAgICAgICB0aGlzLl91cGRhdGVWaXNpYmlsaXR5TGF5ZXIobGF5ZXIpO1xuICAgIH1cbn0pO1xuXG5leHBvcnQgZGVmYXVsdCBMYXllclN3aXRjaGVyO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/LayerSwitcher.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Controls/LocationSelector.js": +/*!**************************************************!*\ + !*** ./src/Leaflet/Controls/LocationSelector.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Common_Controls_LocationSelectorDOM__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Common/Controls/LocationSelectorDOM */ \"./src/Common/Controls/LocationSelectorDOM.js\");\n/* harmony import */ var _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Utils/PositionFormater */ \"./src/Leaflet/Controls/Utils/PositionFormater.js\");\n/* harmony import */ var _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Utils/IconDefault */ \"./src/Leaflet/Controls/Utils/IconDefault.js\");\n/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/Utils/GeocodeUtils */ \"./src/Common/Utils/GeocodeUtils.js\");\n\n\n\n\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getLogger(\"locationselector\");\n\n/**\n* @classdesc\n*\n* LocationSelector Control.\n*\n* @private\n* @constructor LocationSelector\n* @alias LocationSelector\n* @extends {L.Control}\n* LocationSelector component. Enables to select a location, using autocompletion or picking location on the map\n* @param {Object} [options] - component options\n* @param {Boolean} [options.displayInfo = true] - whether to display info in a popup or not (not implemented yet) Default is true\n* @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding.\n* @param {Object} [options.tag] - tag options\n* @param {Number} [options.tag.id = 0] - order id number in a locations group, in case several LocationSelector are used. For instance in route case : departure tag id should be 0, arrival tag id should be 1, and other ones : 2, 3, ...\n* @param {Number} [options.tag.unique = null] - locationSelector global component id (in case locationSelector is called by another graphic component, e.g. route control)\n* @param {String} [options.tag.label = \">\"] - text to display in component (e.g. \"Departure\"). Default is \">\"\n* @param {String} [options.tag.color = blue] - color of marker (blue, green, orange and red)\n* @param {Boolean} [options.tag.display = true] - whether to display or hide component. Default is true\n* @param {Boolean} [options.tag.addOption = false] - whether to display picto to add another LocationSelector (in case of route control)\n* @param {Boolean} [options.tag.removeOption = false] - whether to display picto to remove a LocationSelector (in case of route control)\n* @param {Object} [options.autocompleteOptions] - autocomplete service options\n* @param {Object} [options.reverseGeocodeOptions] - reverse geocoding service options\n\n* @example\n* var point = L.geoportalControl.LocationSelector({\n* });\n*/\nvar LocationSelector = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends LocationSelector.prototype */{\n includes: _Common_Controls_LocationSelectorDOM__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n /**\n * options by default\n *\n * @private\n */\n options: {\n position: \"topleft\",\n tag: {\n id: 0,\n // numero d'ordre sur un groupe de locations !\n unique: null,\n // numero unique pour tous les locations d'un groupe !\n label: \">\",\n color: \"blue\",\n display: true,\n addOption: false,\n removeOption: false\n },\n disableReverse: false,\n // on l'active par defaut !\n displayInfo: true,\n autocompleteOptions: {},\n reverseGeocodeOptions: {}\n },\n /**\n * constructor\n * (extend to L.Control)\n *\n * @param {Object} options - options of component\n * @param {String} [options.position] - position of component into a map.\n * @param {Object} [options.tag] - options ...\n * @param {Object} [options.autocompleteOptions] - autocomplete service options\n * @param {Object} [options.reverseGeocodeOptions] - reverse geocoding service options\n *\n * @private\n */\n initialize: function initialize(options) {\n // FIXME pb de merge sur tag:{} !?\n // on transmet les options au controle\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.setOptions(this, options);\n\n /** uuid */\n this._uid = this.options.tag.unique || null;\n\n /** mode drag&drop */\n this._activeDragAndDrop = false;\n this._pressedKeyOnDragAndDrop = false;\n\n /** container map */\n this._map = null;\n\n /** container principal des entrées */\n this._inputsContainer = null;\n\n /** container du label du point */\n this._inputLabelContainer = null;\n\n /** container de la saisi de l'autocompletion */\n this._inputAutoCompleteContainer = null;\n\n /** container du pointer de saisi sur la carte */\n this._inputShowPointerContainer = null;\n\n /** container des coordonnées */\n this._inputCoordinateContainer = null;\n\n /**\n * coordonnées du point selectionné\n * Ces dernieres sont envoyées à l'API service IGN,\n */\n this._coordinate = null;\n\n /** container des reponses de l'autocompletion */\n this._suggestedContainer = null;\n\n /** listes des reponses de l'autocompletion */\n this._suggestedLocations = [];\n\n /** localisant */\n this._currentLocation = null;\n\n /** marker */\n this._marker = null;\n\n /** ressources du services d'autocompletion et geocodage inverse (ayant droit!) */\n this._resources = {};\n\n // creation du DOM dans le constructeur uniquement si ce composant\n // est appelé par un autre composant graphique\n this._container = this._uid ? this._initLayout() : null;\n },\n // ################################################################### //\n // ################## handlers for display graphic ################### //\n // ################################################################### //\n\n /**\n * this method is called by this.addTo(map)\n * and fills variable : this._container = this.onAdd(map)\n *\n * @returns {DOMElement} DOM element\n * @private\n */\n onAdd: function onAdd( /* map */\n ) {\n // si on ajout ce composant à la carte en tant que objet graphique,\n // un uuid doit être generé automatiquement !\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].generate();\n\n // DOM du composant\n var container = this._initLayout();\n\n // deactivate of events that may interfere with the map\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container);\n return container;\n },\n /**\n * this method is called when the control is removed from the map\n * and removes events on map.\n *\n * @private\n */\n onRemove: function onRemove( /* map */) {},\n // ################################################################### //\n // ########################## publics methods ######################## //\n // ################################################################### //\n\n /**\n * get coordinate\n * @returns {Object} Coordinate\n */\n getCoordinate: function getCoordinate() {\n return this._coordinate;\n },\n /**\n * set coordinate : {lon,lat || x,y || N,E}\n * @param {Object} coordinate - Coordinate\n */\n setCoordinate: function setCoordinate(coordinate) {\n this._displayResultOfCoordinate(coordinate);\n },\n /**\n * set map\n *\n * @param {Object} map - the map\n */\n setMap: function setMap(map) {\n if (!this._map) {\n this._map = map;\n }\n },\n /**\n * clean\n */\n clear: function clear() {\n this._setCursor();\n this._setMarker();\n this._clearResults();\n this._inputLabelContainer.click();\n },\n /**\n * disable/enable the drag&drop mode\n *\n * @param {Boolean} active - true:enable | false:disable\n */\n dragging: function dragging(active) {\n if (this._marker) {\n if (active) {\n this._marker.dragging.enable();\n } else {\n this._marker.dragging.disable();\n }\n }\n },\n // ################################################################### //\n // ########################## pivates methods ######################## //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd(map)\n * and initialize the container HTMLElement\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n _initLayout: function _initLayout() {\n var id = this.options.tag.id;\n\n // create main container\n var container = this._createMainContainerElement();\n var inputs = this._inputsContainer = this._createLocationPointElement(id, this.options.tag.display);\n container.appendChild(inputs);\n var _inputLabel = this._inputLabelContainer = this._createLocationPointLabelElement(id, this.options.tag.label);\n inputs.appendChild(_inputLabel);\n var _inputAutoComplete = this._inputAutoCompleteContainer = this._createLocationAutoCompleteteInputElement(id);\n inputs.appendChild(_inputAutoComplete);\n var _inputCoordinate = this._inputCoordinateContainer = this._createLocationCoordinateInputElement(id);\n inputs.appendChild(_inputCoordinate);\n var _inputShowPointer = this._inputShowPointerContainer = this._createLocationPointerShowInputElement(id);\n inputs.appendChild(_inputShowPointer);\n var _inputPointer = this._createLocationPointerInputElement(id);\n inputs.appendChild(_inputPointer);\n if (this.options.tag.addOption) {\n var _inputAddStage = this._createLocationAddPointElement();\n inputs.appendChild(_inputAddStage);\n }\n if (this.options.tag.removeOption) {\n var _inputRemoveStage = this._createLocationRemovePointElement(id);\n inputs.appendChild(_inputRemoveStage);\n }\n var results = this._suggestedContainer = this._createLocationAutoCompleteResultElement(id);\n container.appendChild(results);\n return container;\n },\n // ################################################################### //\n // ################# privates methods use by events ################## //\n // ################################################################### //\n\n /**\n * this sends the label to the panel.\n *\n * @param {String} label - label suggested location\n *\n * @private\n */\n _setLabel: function _setLabel(label) {\n this._inputAutoCompleteContainer.value = label || \"\";\n },\n /**\n * this sends the coordinates to the panel.\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n *\n * @private\n */\n _setCoordinate: function _setCoordinate(oLatLng) {\n // structure\n // L.LatLng\n // lat: 4.07249425916745\n // lng: 2.4609375\n\n // FIXME les coordonnées en lat/lon sur du EPSG:4326 !\n // Mais règle sur les services : X -> LON et Y -> LAT\n this._coordinate = oLatLng;\n var lat = null;\n var lng = null;\n\n // decimal by default !\n lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__[\"default\"].roundToDecimal(oLatLng.lat, 4);\n lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__[\"default\"].roundToDecimal(oLatLng.lng, 4);\n\n // on envoie du lon/lat à l'affichage\n var value = lng + \" , \" + lat;\n this.GPdisplayCoordinate(value);\n },\n /**\n * this method is called by this.on*ResultsItemClick()\n * and move/zoom on a position.\n *\n * @param {Object} position - {lon: ..., lat: ...}\n *\n * @private\n */\n _setPosition: function _setPosition(position) {\n logger.log(\"_setPosition()\", position);\n var map = this._map;\n // TODO zoom\n // map.setZoomAround(L.latLng(position), map.getMaxZoom(), true);\n // FIXME on veut du lat/lon sur Leaflet donc on inverse !\n map.panTo(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(position));\n },\n /**\n * this method is called by this.on*ResultsItemClick()\n * and displays a marker.\n * FIXME : marker IGN et informations ?\n *\n * @param {Object} position - position {lon: ..., lat: ...}\n * @param {Object|String} information - suggested or geocoded information\n * @param {Boolean} display - display a popup information\n *\n * @private\n */\n _setMarker: function _setMarker(position, information, display) {\n logger.log(\"_setMarker()\", position, information, display);\n\n // sur du drag&drop, on garde le même marker !\n if (this._activeDragAndDrop) {\n return;\n }\n var map = this._map;\n // on supprime le marker, ainsi que les events\n // sur le drag&drop\n if (this._marker != null) {\n this._marker.off(\"mousedown\", this.onMouseDownMarker, this);\n this._marker.off(\"dragstart\", this.onStartDragMarker, this);\n this._marker.off(\"drag\", this.onDragMarker, this);\n this._marker.off(\"dragend\", this.onEndDragMarker, this);\n map.removeLayer(this._marker);\n this._marker = null;\n }\n if (position) {\n // cf. http://leafletjs.com/reference.html#marker-options\n var options = {\n icon: new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__[\"default\"](this.options.tag.color),\n draggable: true,\n clickable: true,\n zIndexOffset: 1000\n };\n\n // FIXME on veut du lat/lon sur Leaflet donc on inverse !\n this._marker = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.marker(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(position), options);\n this._marker.on(\"mousedown\", this.onMouseDownMarker, this);\n this._marker.on(\"dragstart\", this.onStartDragMarker, this);\n this._marker.on(\"drag\", this.onDragMarker, this);\n this._marker.on(\"dragend\", this.onEndDragMarker, this);\n // this._marker.on(\"movestart\", this.onStartMoveMarker, this);\n // this._marker.on(\"move\", this.onMoveMarker, this);\n // this._marker.on(\"moveend\", this.onEndMoveMarker, this);\n\n this._marker.addTo(map);\n\n // FIXME\n // doit on mettre une information\n // - correctement construite ?\n // - uniquement informatif ?\n // - RIEN ?\n if (display) {\n var popupContent = null;\n if (typeof information !== \"string\") {\n if (information.service === \"GeocodedLocation\") {\n popupContent = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getGeocodedLocationFreeform(information.location);\n } else if (information.service === \"SuggestedLocation\") {\n popupContent = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getSuggestedLocationFreeform(information.location);\n } else {\n popupContent = \"sans informations.\";\n }\n } else {\n popupContent = information;\n }\n this._marker.bindPopup(popupContent);\n }\n }\n },\n /**\n * this method is called by this.on()\n * and change the cursor of the map when entering a point.\n *\n * @param {String} cursor - cursor style\n *\n * @private\n */\n _setCursor: function _setCursor(cursor) {\n var div = this._map.getContainer();\n if (cursor) {\n div.style.cursor = cursor;\n } else {\n div.style.cursor = null;\n }\n },\n /**\n * this method is called by this.()\n * and it clears all results and the marker.\n *\n * @private\n */\n _clearResults: function _clearResults() {\n this._currentLocation = null;\n this._coordinate = null;\n this._clearSuggestedLocation();\n },\n /**\n * this method is called by this.onAutoCompleteSearchText()\n * and it clears all suggested location.\n *\n * @private\n */\n _clearSuggestedLocation: function _clearSuggestedLocation() {\n // suppression du dom\n this._suggestedLocations = [];\n if (this._suggestedContainer) {\n while (this._suggestedContainer.firstChild) {\n this._suggestedContainer.removeChild(this._suggestedContainer.firstChild);\n }\n }\n },\n // ################################################################### //\n // ############## privates methods use by autocomplete ############### //\n // ################################################################### //\n\n /**\n * this method is called by this.onAutoCompleteSearch()\n * and executes a request to the service.\n *\n * @param {Object} settings - service settings\n * @param {String} settings.text - text\n * @param {Function} settings.onSuccess - callback\n * @param {Function} settings.onFailure - callback\n *\n * @private\n */\n _requestAutoComplete: function _requestAutoComplete(settings) {\n logger.log(\"_requestAutoComplete()\", settings);\n\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!settings || Object.keys(settings).length === 0) {\n return;\n }\n\n // on ne fait pas de requête si la parametre 'text' est vide !\n if (!settings.text) {\n return;\n }\n logger.log(settings);\n var options = {};\n // on recupere les options du service\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.autocompleteOptions);\n // ainsi que la recherche et les callbacks\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, settings);\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // celle renseignée au niveau du controle ou la clé \"calcul\" par défaut\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n apiKey: options.apiKey || this.options.apiKey\n });\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Services.autoComplete(options);\n },\n /**\n * this method is called by this.onAutoCompleteSearchText()\n * and fills the container of the location list.\n * it creates a HTML Element per location\n * (cf. this. ...)\n *\n * @param {Object[]} locations - locations\n *\n * @private\n */\n _fillAutoCompletedLocationListContainer: function _fillAutoCompletedLocationListContainer(locations) {\n logger.log(\"_fillAutoCompletedLocationListContainer()\", locations);\n if (!locations || locations.length === 0) {\n return;\n }\n\n // on vide la liste avant de la construire\n var element = this._suggestedContainer;\n if (element.childElementCount) {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n }\n for (var i = 0; i < locations.length; i++) {\n // Proposals are dynamically filled in Javascript by autocomplete service\n this._createLocationAutoCompletedLocationElement(this.options.tag.id, locations[i], i);\n }\n\n // sauvegarde de l'etat des locations\n this._suggestedLocations = locations;\n },\n // ################################################################### //\n // ################# privates methods use by reverse ################# //\n // ################################################################### //\n\n /**\n * this method is called by this.onMouseMapClick() or this.onEndDragMarker()\n * and executes a request to the service.\n *\n * @param {Object} settings - service settings\n * @param {String} settings.position - position\n * @param {Function} settings.onSuccess - callback\n * @param {Function} settings.onFailure - callback\n *\n * @private\n */\n _requestReverseGeocode: function _requestReverseGeocode(settings) {\n logger.log(\"_requestReverseGeocode()\", settings);\n\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!settings || Object.keys(settings).length === 0) {\n return;\n }\n\n // on ne fait pas de requête si la parametre 'position' est vide !\n if (!settings.searchGeometry || Object.keys(settings.searchGeometry).length === 0) {\n return;\n }\n var options = {};\n // on recupere les options du service\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.reverseGeocodeOptions);\n\n // ainsi que la positions et les callbacks\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, settings);\n\n // on force qq options !\n // La table de geocodage est toujours par defaut : StreetAddress !\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n returnFreeForm: true,\n // FIXME cette option n'est pas implementée !?\n index: \"StreetAddress\"\n });\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n apiKey: options.apiKey || this.options.apiKey\n });\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Services.reverseGeocode(options);\n },\n /**\n * display Coordinate on panel, and places the marker on map\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n * @private\n */\n _displayResultOfCoordinate: function _displayResultOfCoordinate(oLatLng) {\n // on transmet les coordonnées au panneau\n this._setCoordinate(oLatLng);\n\n // on met en place le marker\n this._setMarker(oLatLng, null, false);\n logger.log(this.getCoordinate());\n\n // on desactive l'event sur la map en activant le gestionnaire !\n this.onActivateMapPointClick();\n },\n /**\n * display Label on panel, and places the marker on map\n *\n * @param {Object} oLocation - location Object\n * @private\n */\n _displayResultOfLabel: function _displayResultOfLabel(oLocation) {\n // FIXME Le service est intérrogé en SRS EPSG:4326 par defaut,\n // donc on récupère du lat/lon en reponse.\n // mais on inverse car on souhaite transmettre des coordonnées en lon/lat...\n\n // FIXME on construit une addresse car l'option freeForm ne semble pas\n // être fonctionnelle...\n var label = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getGeocodedLocationFreeform(oLocation);\n\n // on transmet les coordonnées au panneau,\n // même si on ne les affiche pas...\n this._setCoordinate({\n lat: oLocation.position.lat,\n lng: oLocation.position.lon\n });\n\n // on transmet le texte au panneau\n this._setLabel(label);\n var info = {\n service: \"GeocodedLocation\",\n location: oLocation\n };\n\n // on met en place le marker\n this._setMarker(oLocation.position, info, true);\n this._inputShowPointerContainer.checked = false;\n this._inputAutoCompleteContainer.className = \"GPlocationOriginVisible\";\n this._inputCoordinateContainer.className = \"GPlocationOriginHidden\";\n\n // on desactive l'event sur la map en activant le gestionnaire !\n this.onActivateMapPointClick();\n },\n // ################################################################### //\n // ###################### handlers events (dom) ###################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'keyup' on 'GPLocationOrigin' tag input\n * (cf. this.), and it gets the value of input.\n * this value is passed as a parameter for the service autocomplete (text).\n * the results of the request are displayed into a drop down menu.\n * FIXME\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onAutoCompleteSearchText: function onAutoCompleteSearchText(e) {\n logger.log(\"onAutoCompleteSearchText()\", e);\n var value = e.target.value;\n if (!value) {\n return;\n }\n\n // on sauvegarde le localisant\n this._currentLocation = value;\n\n // on limite les requêtes à partir de 3 car. saisie !\n if (value.length < 3) {\n return;\n }\n\n // INFORMATION\n // on effectue la requête au service d'autocompletion.\n // on met en place des callbacks afin de recuperer les resultats ou\n // les messages d'erreurs du service.\n // les resultats sont affichés dans une liste deroulante.\n var context = this;\n this._requestAutoComplete({\n text: value,\n maximumResponses: 5,\n // FIXME je limite le nombre de reponse car le container DOM est limité dans l'affichage !!!\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results) {\n var locations = results.suggestedLocations;\n context._fillAutoCompletedLocationListContainer(locations);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME\n // où affiche t on les messages : ex. 'No suggestion matching the search' ?\n // doit on nettoyer la liste des suggestions dernierement enregistrée :\n context._clearSuggestedLocation();\n logger.log(error.message);\n }\n });\n },\n /**\n * this method is called by event 'click' on 'GPautoCompleteResultsList' tag div\n * (cf. this._createAutoCompleteListElement), and it selects the location.\n * this location displays a marker on the map.\n * FIXME\n * TODO\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onAutoCompletedResultsItemClick: function onAutoCompletedResultsItemClick(e) {\n logger.log(\"onAutoCompletedResultsItemClick()\", e);\n var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].index(e.target.id);\n logger.log(idx);\n logger.log(this._suggestedLocations[idx]);\n if (!idx) {\n return;\n }\n var position = {\n lon: this._suggestedLocations[idx].position.x,\n // LON !\n lat: this._suggestedLocations[idx].position.y // LAT !\n };\n\n var info = {\n service: \"SuggestedLocation\",\n location: this._suggestedLocations[idx]\n };\n var label = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getSuggestedLocationFreeform(this._suggestedLocations[idx]);\n this._setLabel(label);\n this._setPosition(position);\n this._setMarker(position, info, this.options.displayInfo);\n\n // on sauvegarde le point courant\n this._coordinate = position;\n },\n /**\n * this method is called by event 'click' on '' tag input\n * (cf. this.), and it create or remove the event of click map.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onActivateMapPointClick: function onActivateMapPointClick(e) {\n logger.trace(\"onActivateMapPointClick()\", e);\n var map = this._map;\n if (this._inputShowPointerContainer.checked) {\n if (!this._activeDragAndDrop) {\n map.on(\"click\", this.onMouseMapClick, this);\n // on change le curseur\n this._setCursor(\"crosshair\");\n // on supprime le marker\n this._setMarker();\n // on efface l'ancien resultat\n this._clearResults();\n }\n } else {\n if (!this._activeDragAndDrop) {\n map.off(\"click\", this.onMouseMapClick, this);\n // on retablie le curseur d'origine\n this._setCursor();\n }\n }\n },\n /**\n * this method is called by event 'click' on '(n)' tag label\n * (cf. this.).\n * this point is erased.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onLocationClearPointClick: function onLocationClearPointClick(e) {\n logger.log(\"onLocationClearPointClick\", e);\n this._setCursor();\n this._setMarker();\n this._clearResults();\n this._inputAutoCompleteContainer.focus();\n },\n /**\n * this method is called by event 'click' on '(n)' tag input\n * (cf. this.).\n * this point is deleted.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onLocationRemovePointClick: function onLocationRemovePointClick(e) {\n logger.log(\"onLocationRemovePointClick\", e);\n this._setCursor();\n this._setMarker();\n this._clearResults();\n },\n /**\n * TODO this method is called by event 'click' on '(n)' tag input\n * (cf. this.).\n * this point is added as a parameter for the service Location.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onLocationAddPointClick: function onLocationAddPointClick(e) {\n logger.log(\"onLocationAddPointClick\", e);\n },\n // ################################################################### //\n // #################### handlers events (control) #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on map\n * (cf. this.onLocationMapPointClick), and it gets the coordinate of click on map.\n * this point is saved as a parameter for the service Location.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMouseMapClick: function onMouseMapClick(e) {\n logger.log(\"onMouseMapClick\", e);\n\n // les coordonnées\n var oLatLng = e.latlng;\n\n // si le geocodage inverse est desactivé,\n // on transmet les coordonnées au panneau,\n // sinon, on transmet la reponse du service\n if (this.options.disableReverse) {\n // on transmet les coordonnées au panneau, puis on place le marker\n this._displayResultOfCoordinate(oLatLng);\n } else {\n // contexte\n var self = this;\n\n // on realise une requête au service, si la reponse est vide ou\n // en échec, on transmet les coordonnées !\n this._requestReverseGeocode({\n searchGeometry: {\n type: \"Circle\",\n coordinates: [oLatLng.lng, oLatLng.lat],\n radius: 50\n },\n maximumResponses: 1,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results.locations.length !== 0) {\n var oLocation = results.locations[0];\n self._displayResultOfLabel(oLocation);\n } else {\n self._displayResultOfCoordinate(oLatLng);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n logger.log(error.message);\n self._displayResultOfCoordinate(oLatLng);\n }\n });\n }\n },\n /**\n * this method is called by event 'startdrag' on marker\n * and it initializes the drag&drop.\n *\n * @private\n */\n onStartDragMarker: function onStartDragMarker() {\n if (!this._marker) {\n return;\n }\n this._activeDragAndDrop = true;\n this._inputShowPointerContainer.checked = true;\n this._inputAutoCompleteContainer.className = \"GPlocationOriginHidden\";\n this._inputCoordinateContainer.className = \"GPlocationOriginVisible\";\n this._marker.unbindPopup();\n this._setLabel();\n this._clearResults();\n },\n /**\n * this method is called by event 'drag' on marker\n * and it updates the panel of coordinate.\n *\n * @private\n */\n onDragMarker: function onDragMarker() {\n if (!this._marker) {\n return;\n }\n this._activeDragAndDrop = false;\n this._inputShowPointerContainer.checked = true;\n\n // on transmet les coordonnées au panneau\n var oLatLng = this._marker.getLatLng();\n this._setCoordinate(oLatLng);\n },\n /**\n * this method is called by event 'enddrag' on marker\n * and it finishes the drag&drop.\n * this point is saved as a parameter for the service Location.\n *\n * @private\n */\n onEndDragMarker: function onEndDragMarker() {\n if (!this._marker) {\n return;\n }\n this._inputShowPointerContainer.checked = true;\n var oLatLng = this._marker.getLatLng();\n if (this._pressedKeyOnDragAndDrop) {\n // on transmet les coordonnées au panneau\n this._setCoordinate(oLatLng);\n } else {\n logger.log(\"No key pressed, so autocomplete solution !\");\n this.onMouseMapClick({\n latlng: oLatLng\n });\n }\n\n // init\n this._activeDragAndDrop = false;\n this._pressedKeyOnDragAndDrop = false;\n },\n /**\n * this method is called by event 'mousedown' on marker..\n * this event gets the pressed key code.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMouseDownMarker: function onMouseDownMarker(e) {\n if (!this._marker) {\n return;\n }\n this._pressedKeyOnDragAndDrop = e.originalEvent.ctrlKey;\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (LocationSelector);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL0xvY2F0aW9uU2VsZWN0b3IuanM/NGYyNCJdLCJuYW1lcyI6WyJsb2dnZXIiLCJMb2dnZXIiLCJnZXRMb2dnZXIiLCJMb2NhdGlvblNlbGVjdG9yIiwiTCIsIkNvbnRyb2wiLCJleHRlbmQiLCJpbmNsdWRlcyIsIkxvY2F0aW9uU2VsZWN0b3JET00iLCJvcHRpb25zIiwicG9zaXRpb24iLCJ0YWciLCJpZCIsInVuaXF1ZSIsImxhYmVsIiwiY29sb3IiLCJkaXNwbGF5IiwiYWRkT3B0aW9uIiwicmVtb3ZlT3B0aW9uIiwiZGlzYWJsZVJldmVyc2UiLCJkaXNwbGF5SW5mbyIsImF1dG9jb21wbGV0ZU9wdGlvbnMiLCJyZXZlcnNlR2VvY29kZU9wdGlvbnMiLCJpbml0aWFsaXplIiwiVXRpbCIsInNldE9wdGlvbnMiLCJfdWlkIiwiX2FjdGl2ZURyYWdBbmREcm9wIiwiX3ByZXNzZWRLZXlPbkRyYWdBbmREcm9wIiwiX21hcCIsIl9pbnB1dHNDb250YWluZXIiLCJfaW5wdXRMYWJlbENvbnRhaW5lciIsIl9pbnB1dEF1dG9Db21wbGV0ZUNvbnRhaW5lciIsIl9pbnB1dFNob3dQb2ludGVyQ29udGFpbmVyIiwiX2lucHV0Q29vcmRpbmF0ZUNvbnRhaW5lciIsIl9jb29yZGluYXRlIiwiX3N1Z2dlc3RlZENvbnRhaW5lciIsIl9zdWdnZXN0ZWRMb2NhdGlvbnMiLCJfY3VycmVudExvY2F0aW9uIiwiX21hcmtlciIsIl9yZXNvdXJjZXMiLCJfY29udG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2FibGUgOiB0cnVlLFxuICAgICAgICAgICAgICAgIGNsaWNrYWJsZSA6IHRydWUsXG4gICAgICAgICAgICAgICAgekluZGV4T2Zmc2V0IDogMTAwMFxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgLy8gRklYTUUgb24gdmV1dCBkdSBsYXQvbG9uIHN1ciBMZWFmbGV0IGRvbmMgb24gaW52ZXJzZSAhXG4gICAgICAgICAgICB0aGlzLl9tYXJrZXIgPSBMLm1hcmtlcihMLmxhdExuZyhwb3NpdGlvbiksIG9wdGlvbnMpO1xuXG4gICAgICAgICAgICB0aGlzLl9tYXJrZXIub24oXCJtb3VzZWRvd25cIiwgdGhpcy5vbk1vdXNlRG93bk1hcmtlciwgdGhpcyk7XG4gICAgICAgICAgICB0aGlzLl9tYXJrZXIub24oXCJkcmFnc3RhcnRcIiwgdGhpcy5vblN0YXJ0RHJhZ01hcmtlciwgdGhpcyk7XG4gICAgICAgICAgICB0aGlzLl9tYXJrZXIub24oXCJkcmFnXCIsIHRoaXMub25EcmFnTWFya2VyLCB0aGlzKTtcbiAgICAgICAgICAgIHRoaXMuX21hcmtlci5vbihcImRyYWdlbmRcIiwgdGhpcy5vbkVuZERyYWdNYXJrZXIsIHRoaXMpO1xuICAgICAgICAgICAgLy8gdGhpcy5fbWFya2VyLm9uKFwibW92ZXN0YXJ0XCIsIHRoaXMub25TdGFydE1vdmVNYXJrZXIsIHRoaXMpO1xuICAgICAgICAgICAgLy8gdGhpcy5fbWFya2VyLm9uKFwibW92ZVwiLCAgICAgIHRoaXMub25Nb3ZlTWFya2VyLCB0aGlzKTtcbiAgICAgICAgICAgIC8vIHRoaXMuX21hcmtlci5vbihcIm1vdmVlbmRcIiwgICB0aGlzLm9uRW5kTW92ZU1hcmtlciwgdGhpcyk7XG5cbiAgICAgICAgICAgIHRoaXMuX21hcmtlci5hZGRUbyhtYXApO1xuXG4gICAgICAgICAgICAvLyBGSVhNRVxuICAgICAgICAgICAgLy8gZG9pdCBvbiBtZXR0cmUgdW5lIGluZm9ybWF0aW9uXG4gICAgICAgICAgICAvLyAtIGNvcnJlY3RlbWVudCBjb25zdHJ1aXRlID9cbiAgICAgICAgICAgIC8vIC0gdW5pcXVlbWVudCBpbmZvcm1hdGlmID9cbiAgICAgICAgICAgIC8vIC0gUklFTiA/XG4gICAgICAgICAgICBpZiAoZGlzcGxheSkge1xuICAgICAgICAgICAgICAgIHZhciBwb3B1cENvbnRlbnQgPSBudWxsO1xuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpbmZvcm1hdGlvbiAhPT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaW5mb3JtYXRpb24uc2VydmljZSA9PT0gXCJHZW9jb2RlZExvY2F0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvcHVwQ29udGVudCA9IEdlb2NvZGVVdGlscy5nZXRHZW9jb2RlZExvY2F0aW9uRnJlZWZvcm0oaW5mb3JtYXRpb24ubG9jYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGluZm9ybWF0aW9uLnNlcnZpY2UgPT09IFwiU3VnZ2VzdGVkTG9jYXRpb25cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcG9wdXBDb250ZW50ID0gR2VvY29kZVV0aWxzLmdldFN1Z2dlc3RlZExvY2F0aW9uRnJlZWZvcm0oaW5mb3JtYXRpb24ubG9jYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcG9wdXBDb250ZW50ID0gXCJzYW5zIGluZm9ybWF0aW9ucy5cIjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHBvcHVwQ29udGVudCA9IGluZm9ybWF0aW9uO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMuX21hcmtlci5iaW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ICAgICAgICAgLy8gb24gc3VwcHJpbWUgbGUgbWFya2VyXG4gICAgICAgICAgICAgICAgdGhpcy5fc2V0TWFya2VyKCk7XG4gICAgICAgICAgICAgICAgLy8gb24gZWZmYWNlIGwnYW5jaWVuIHJlc3VsdGF0XG4gICAgICAgICAgICAgICAgdGhpcy5fY2xlYXJSZXN1bHRzKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuX2FjdGl2ZURyYWdBbmREcm9wKSB7XG4gICAgICAgICAgICAgICAgbWFwLm9mZihcImNsaWNrXCIsIHRoaXMub25Nb3VzZU1hcENsaWNrLCB0aGlzKTtcbiAgICAgICAgICAgICAgICAvLyBvbiByZXRhYmxpZSBsZSBjdXJzZXVyIGQnb3JpZ2luZVxuICAgICAgICAgICAgICAgIHRoaXMuX3NldEN1cnNvcigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSBldmVudCAnY2xpY2snIG9uICcobiknIHRhZyBsYWJlbFxuICAgICAqIChjZi4gdGhpcy4pLlxuICAgICAqIHRoaXMgcG9pbnQgaXMgZXJhc2VkLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtPYmplY3R9IGUgLSBIVE1MRWxlbWVudFxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBvbkxvY2F0aW9uQ2xlYXJQb2ludENsaWNrIDogZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgbG9nZ2VyLmxvZyhcIm9uTG9jYXRpb25DbGVhclBvaW50Q2xpY2tcIiwgZSk7XG4gICAgICAgIHRoaXMuX3NldEN1cnNvcigpO1xuICAgICAgICB0aGlzLl9zZXRNYXJrZXIoKTtcbiAgICAgICAgdGhpcy5fY2xlYXJSZXN1bHRzKCk7XG4gICAgICAgIHRoaXMuX2lucHV0QXV0b0NvbXB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ZVxuICAgICAgICBpZiAodGhpcy5vcHRpb25zLmRpc2FibGVSZXZlcnNlKSB7XG4gICAgICAgICAgICAvLyBvbiB0cmFuc21ldCBsZXMgY29vcmRvbm7DqWVzIGF1IHBhbm5lYXUsIHB1aXMgb24gcGxhY2UgbGUgbWFya2VyXG4gICAgICAgICAgICB0aGlzLl9kaXNwbGF5UmVzdWx0T2ZDb29yZGluYXRlKG9MYXRMbmcpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gY29udGV4dGVcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcblxuICAgICAgICAgICAgLy8gb24gcmVhbGlzZSB1bmUgcmVxdcOqdGUgYXUgc2VydmljZSwgc2kgbGEgcmVwb25zZSBlc3QgdmlkZSBvdVxuICAgICAgICAgICAgLy8gZW4gw6ljaGVjLCBvbiB0cmFuc21ldCBsZXMgY29vcmRvbm7DqWVzICFcbiAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RSZXZlcnNlR2VvY29kZSh7XG4gICAgICAgICAgICAgICAgc2VhcmNoR2VvbWV0cnkgOiB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGUgOiBcIkNpcmNsZVwiLFxuICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA6IFtvTGF0TG5nLmxuZywgb0xhdExuZy5sYXRdLFxuICAgICAgICAgICAgICAgICAgICByYWRpdXMgOiA1MFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgbWF4aW11bVJlc3BvbnNlcyA6IDEsXG4gICAgICAgICAgICAgICAgLy8gY2FsbGJhY2sgb25TdWNjZXNzXG4gICAgICAgICAgICAgICAgb25TdWNjZXNzIDogZnVuY3Rpb24gKHJlc3VsdHMpIHtcbiAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhyZXN1bHRzKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdHMubG9jYXRpb25zLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9Mb2NhdGlvbiA9IHJlc3VsdHMubG9jYXRpb25zWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fZGlzcGxheVJlc3VsdE9mTGFiZWwob0xvY2F0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX2Rpc3BsYXlSZXN1bHRPZkNvb3JkaW5hdGUob0xhdExuZyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIC8vIGNhbGxiYWNrIG9uRmFpbHVyZVxuICAgICAgICAgICAgICAgIG9uRmFpbHVyZSA6IGZ1bmN0aW9uIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBsb2dnZXIubG9nKGVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgICAgICBzZWxmLl9kaXNwbGF5UmVzdWx0T2ZDb29yZGluYXRlKG9MYXRMbmcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSBldmVudCAnc3RhcnRkcmFnJyBvbiBtYXJrZXJcbiAgICAgKiBhbmQgaXQgaW5pdGlhbGl6ZXMgdGhlIGRyYWcmZHJvcC5cbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgb25TdGFydERyYWdNYXJrZXIgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICghdGhpcy5fbWFya2VyKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLl9hY3RpdmVEcmFnQW5kRHJvcCA9IHRydWU7XG4gICAgICAgIHRoaXMuX2lucHV0U2hvd1BvaW50ZXJDb250YWluZXIuY2hlY2tlZCA9IHRyd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aXMgY2FsbGVkIGJ5IGV2ZW50ICdtb3VzZWRvd24nIG9uIG1hcmtlci4uXG4gICAgICogdGhpcyBldmVudCBnZXRzIHRoZSBwcmVzc2VkIGtleSBjb2RlLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtPYmplY3R9IGUgLSBIVE1MRWxlbWVudFxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBvbk1vdXNlRG93bk1hcmtlciA6IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgIGlmICghdGhpcy5fbWFya2VyKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLl9wcmVzc2VkS2V5T25EcmFnQW5kRHJvcCA9IGUub3JpZ2luYWxFdmVudC5jdHJsS2V5O1xuICAgIH1cblxufSk7XG5cbmV4cG9ydCBkZWZhdWx0IExvY2F0aW9uU2VsZWN0b3I7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/LocationSelector.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Controls/Logo.js": +/*!**************************************!*\ + !*** ./src/Leaflet/Controls/Logo.js ***! + \**************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__);\n\n\n/**\n * @classdesc\n *\n * Control Logo\n *\n * @private\n * @constructor\n * @extends {L.Control}\n * @alias Logo\n * @param {Object} options - options for function call.\n * @param {String} options.position - 'topright' by default\n * @param {String} options.url - URL\n * @param {String} options.text - text\n * @param {String} options.picto - picto\n * @example\n * var map = L.map('map').setView([48, 2], 4);\n * var logo = L.geoportalControl.Logo({\n * position : \"topright\",\n * picto : \"http://www.ign.fr/logo-ign.jpg\",\n * url : \"http://www.ign.fr\",\n * text : \"© IGN\",\n * size : \"70px\"\n * });\n * logo.addTo(map);\n */\nvar Logo = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Control.extend( /** @lends Logo.prototype */{\n /**\n * Options du service\n *\n * @private\n */\n options: {\n position: \"topright\",\n picto: null,\n url: null,\n text: null,\n size: \"30px\"\n },\n /**\n * constructor\n *\n * @param {Object} options - options\n * @private\n */\n initialize: function initialize(options) {\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.setOptions(this, options);\n },\n /**\n * event\n *\n * @returns {DOMElement} DOM element\n * @private\n */\n onAdd: function onAdd( /* map */\n ) {\n var container = null;\n container = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.create(\"div\", \"gp-control-logo\", container);\n var bLink = !!(this.options.url || this.options.text);\n var link = null;\n if (bLink) {\n link = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.create(\"a\", \"\", container);\n link.target = \"_blank\";\n if (this.options.url) {\n link.href = this.options.url;\n if (this.options.text) link.title = this.options.text;\n }\n }\n\n // FIXME mise en forme à prévoir !\n if (bLink && this.options.text) {\n link.text = this.options.text;\n }\n var bImage = !!this.options.picto;\n var image = null;\n if (bImage) {\n if (bLink) {\n image = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.create(\"img\", \"\", link);\n } else {\n image = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.create(\"img\", \"\", container);\n }\n image.src = this.options.picto;\n if (typeof this.options.size === \"string\") {\n image.style.height = image.style.width = this.options.size;\n } else {\n image.style.height = this.options.size.height;\n image.style.width = this.options.size.width;\n }\n }\n return container;\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Logo);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlY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bnMgZHUgc2VydmljZVxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBvcHRpb25zIDoge1xuICAgICAgICBwb3NpdGlvbiA6IFwidG9wcmlnaHRcIixcbiAgICAgICAgcGljdG8gOiBudWxsLFxuICAgICAgICB1cmwgOiBudWxsLFxuICAgICAgICB0ZXh0IDogbnVsbCxcbiAgICAgICAgc2l6ZSA6IFwiMzBweFwiXG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIGNvbnN0cnVjdG9yXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb3B0aW9ucyAtIG9wdGlvbnNcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIGluaXRpYWxpemUgOiBmdW5jdGlvbiAob3B0aW9ucykge1xuICAgICAgICBMLnNldE9wdGlvbnModGhpcywgb3B0aW9ucyk7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIGV2ZW50XG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7RE9NRWxlbWVudH0gRE9NIGVsZW1lbnRcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIG9uQWRkIDogZnVuY3Rpb24gKC8qIG1hcCAqLykge1xuICAgICAgICB2YXIgY29udGFpbmVyID0gbnVsbDtcbiAgICAgICAgY29udGFpbmVyID0gTC5Eb21VdGlsLmNyZWF0ZShcImRpdlwiLCBcImdwLWNvbnRyb2wtbG9nb1wiLCBjb250YWluZXIpO1xuXG4gICAgICAgIHZhciBiTGluayA9ICEhKHRoaXMub3B0aW9ucy51cmwgfHwgdGhpcy5vcHRpb25zLnRleHQpO1xuICAgICAgICB2YXIgbGluayA9IG51bGw7XG5cbiAgICAgICAgaWYgKGJMaW5rKSB7XG4gICAgICAgICAgICBsaW5rID0gTC5Eb21VdGlsLmNyZWF0ZShcImFcIiwgXCJcIiwgY29udGFpbmVyKTtcbiAgICAgICAgICAgIGxpbmsudGFyZ2V0ID0gXCJfYmxhbmtcIjtcbiAgICAgICAgICAgIGlmICh0aGlzLm9wdGlvbnMudXJsKSB7XG4gICAgICAgICAgICAgICAgbGluay5ocmVmID0gdGhpcy5vcHRpb25zLnVybDtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5vcHRpb25zLnRleHQpIGxpbmsudGl0bGUgPSB0aGlzLm9wdGlvbnMudGV4dDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEZJWE1FIG1pc2UgZW4gZm9ybWUgw6AgcHLDqXZvaXIgIVxuICAgICAgICBpZiAoYkxpbmsgJiYgdGhpcy5vcHRpb25zLnRleHQpIHtcbiAgICAgICAgICAgIGxpbmsudGV4dCA9IHRoaXMub3B0aW9ucy50ZXh0O1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGJJbWFnZSA9ICEhKHRoaXMub3B0aW9ucy5waWN0byk7XG4gICAgICAgIHZhciBpbWFnZSA9IG51bGw7XG5cbiAgICAgICAgaWYgKGJJbWFnZSkge1xuICAgICAgICAgICAgaWYgKGJMaW5rKSB7XG4gICAgICAgICAgICAgICAgaW1hZ2UgPSBMLkRvbVV0aWwuY3JlYXRlKFwiaW1nXCIsIFwiXCIsIGxpbmspO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpbWFnZSA9IEwuRG9tVXRpbC5jcmVhdGUoXCJpbWdcIiwgXCJcIiwgY29udGFpbmVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGltYWdlLnNyYyA9IHRoaXMub3B0aW9ucy5waWN0bztcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdGhpcy5vcHRpb25zLnNpemUgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICBpbWFnZS5zdHlsZS5oZWlnaHQgPSBpbWFnZS5zdHlsZS53aWR0aCA9IHRoaXMub3B0aW9ucy5zaXplO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpbWFnZS5zdHlsZS5oZWlnaHQgPSB0aGlzLm9wdGlvbnMuc2l6ZS5oZWlnaHQ7XG4gICAgICAgICAgICAgICAgaW1hZ2Uuc3R5bGUud2lkdGggPSB0aGlzLm9wdGlvbnMuc2l6ZS53aWR0aDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBjb250YWluZXI7XG4gICAgfVxufSk7XG5cbmV4cG9ydCBkZWZhdWx0IExvZ287XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/Logo.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Controls/MousePosition.js": +/*!***********************************************!*\ + !*** ./src/Leaflet/Controls/MousePosition.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Common/Utils/MathUtils */ \"./src/Common/Utils/MathUtils.js\");\n/* harmony import */ var _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Common/Controls/MousePositionDOM */ \"./src/Common/Controls/MousePositionDOM.js\");\n/* harmony import */ var _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Utils/PositionFormater */ \"./src/Leaflet/Controls/Utils/PositionFormater.js\");\n/* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../CRS/CRS */ \"./src/Leaflet/CRS/CRS.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n\n\n\n\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getLogger(\"mouseposition\");\n\n/**\n * @classdesc\n *\n * Leaflet Control Class to display Mouse position in various CRS and altitude using the altimetric web service of the Geoportal Platform.\n *\n * Use {@link module:Controls.MousePosition L.geoportalControl.MousePosition()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.Control native class.\n *\n * @namespace\n * @alias L.geoportalControl.MousePosition\n */\nvar MousePosition = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends L.geoportalControl.MousePosition.prototype */{\n includes: _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n /**\n * options by default\n *\n * @private\n */\n options: {\n position: \"bottomleft\",\n collapsed: true,\n units: [],\n systems: [],\n displayAltitude: true,\n displayCoordinates: true,\n editCoordinates: false,\n altitude: {\n triggerDelay: 200,\n responseDelay: 500,\n noDataValue: -99999,\n noDataValueTolerance: 90000,\n serviceOptions: {}\n }\n },\n /**\n * @constructor MousePosition\n *\n * @private\n * @alias MousePosition\n * @extends {L.Control}\n * @param {Object} options - options for function call.\n * @param {String} [options.apiKey] - API key. The \"calcul\" key is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {String} [options.position] - position of component into the map, 'bottomleft' by default\n * @param {Boolean} [options.collapsed = true] - collapse mode, false by default\n * @param {Array} [options.systems] - list of projection systems, GEOGRAPHIC, MERCATOR, LAMB93 and LAMB2E by default\n * Each array element (=system) is an object with following properties :\n * @param {String} options.systems.crs - Proj4 crs alias (from proj4 defs). e.g. : \"EPSG:4326\". Required\n * @param {String} [options.systems.label] - CRS label to be displayed in control. Default is crs code (e.g. \"EPSG:4326\")\n * @param {String} [options.systems.type] - CRS units type for coordinates conversion : \"Geographical\" or \"Metric\". Default: \"Metric\"\n * @param {Object} [options.systems.geoBBox] - Aera covered by the system (WGS84 coordinates).\n * @param {Number} options.systems.geoBBox.right - Right bound.\n * @param {Number} options.systems.geoBBox.left - Left bound.\n * @param {Number} options.systems.geoBBox.top - Top bound.\n * @param {Number} options.systems.geoBBox.bottom - Bottom bound.\n * @param {Array} [options.units] - list of units by system, Geographical and Metric by default\n * Values may be \"DEC\" (decimal degrees), \"DMS\" (sexagecimal), \"RAD\" (radians) and \"GON\" (grades) for geographical coordinates,\n * and \"M\" or \"KM\" for metric coordinates\n * @param {Boolean} [options.displayAltitude= true] - active/desactivate the altitude panel, if desactivate, have just the coordinate panel, true by default\n * @param {Boolean} [options.displayCoordinates= true] - active/desactivate the coordinate panel, if desactivate, have just the altitude panel, true by default\n * @param {Boolean} [options.editCoordinates = false] - add edit coordinates options. False by default.\n * @param {Object} [options.altitude] - elevation configuration\n * @param {Object} [options.altitude.serviceOptions] - options of elevation service\n * @param {Number} [options.altitude.responseDelay] - latency for altitude request, 500 ms by default\n * @param {Number} [options.altitude.triggerDelay] - immobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default\n * @param {Number} [options.altitude.noDataValue] - value used for altitude service no data (default is -99999). In this case, \"---m\" will be displayed instead of \"-99999m\"\n * @param {Number} [options.altitude.noDataValueTolerance] - tolerance for no data value :\n * values in [noDataValue - noDataValueTolerance ; noDataValue + noDataValueTolerance] interval will not be displayed, but \"---m\" will be displayed instead.\n * Default is 90000\n * @example\n * var MousePosition = L.geoportalControl.MousePosition({\n * position : 'bottomleft',\n * collapsed : false,\n * displayAltitude : true,\n * displayCoordinates : true,\n * editCoordinates : false,\n * altitude : {\n * triggerDelay : 100,\n * responseDelay : 500,\n * noDataValue : -99999,\n * noDataValueTolerance : 90000,\n * serviceOptions : {}\n * },\n * systems : [\n * {\n * crs : L.CRS.EPSG4326,\n * label : \"Lon,Lat\",\n * type : \"Geographical\"\n * },\n * {\n * crs : L.geoportalCRS.EPSG2154,\n * label : \"Lambert 93\",\n * type : \"Metric\"\n * }\n * ],\n * units : [\"DEC\", \"DMS\"]\n * });\n */\n initialize: function initialize(options) {\n // on merge les options avec celles par defaut\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(this.options, options);\n\n // uuid\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].generate();\n\n // initialisation des systemes de projections\n this._projectionSystems = [];\n this._initProjectionSystems();\n\n // initialisation des systemes des unités\n this._projectionUnits = {};\n this._initProjectionUnits();\n\n // detection du support : desktop ou tactile\n this._isDesktop = this._detectSupport();\n\n // on met en place un seuil sur le timer\n if (this.options.altitude.triggerDelay < 100) {\n this.options.altitude.triggerDelay = 100;\n }\n\n // timer sur le delai d'immobilisation du mouvement\n this._timer = this.options.altitude.triggerDelay;\n\n // Systeme de projection selectionné (cf. _initProjectionSystems)\n this._currentProjectionSystems = this._projectionSystems[0];\n\n // Container des systemes\n this._projectionSystemsContainer = null;\n\n /** Type d'unité de projection selectionnés : Geographical ou Metric (cf._initProjectionSystems ) */\n this._currentProjectionType = this._projectionSystems[0].type;\n\n // Unité de projection selectionnés (cf. _initProjectionUnits)\n this._currentProjectionUnits = this._projectionUnits[this._currentProjectionType][0].code;\n\n // Container des unités\n this._projectionUnitsContainer = null;\n\n /** Container de visualisation du panneau du composant */\n this._showContainer = null;\n this._pictoContainer = null;\n this._panelContainer = null;\n this._panelHeaderContainer = null;\n\n // gestion de l'affichage du panneau de l'altitude / coordonnées\n if (!this.options.displayAltitude && !this.options.displayCoordinates) {\n // on reactive cette option !\n this.options.displayCoordinates = true;\n }\n if (!this.options.displayCoordinates) {\n // si les coordonnées ne sont pas affichées : pas besoin de les éditer...\n this.options.editCoordinates = false;\n }\n\n /** Edition des coordonnées en cours ou non */\n this._isEditing = false;\n\n // on transmet les options au controle\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.setOptions(this, this.options);\n },\n /**\n * this method is called by this.addTo(map) when the control is added on the map\n * and fills variable 'this._container = this.onAdd(map)',\n * and create events on map.\n * @param {Object} map - the map\n *\n * @returns {DOMElement} DOM element\n * @private\n */\n onAdd: function onAdd(map) {\n // initialisation du DOM du composant\n var container = this._container = this._initLayout();\n\n // on met en place l'evenement sur la carte pour recuperer les coordonnées,\n // on l'active à l'ouverture du panneau uniquement !\n if (!this.options.collapsed) {\n // this.onShowMousePositionClick();\n // evenement valable pour le mode desktop !\n if (this._isDesktop) {\n map.on(\"mousemove\", this.onMouseMove, this);\n } else {\n map.on(\"move\", this.onMapMove, this);\n }\n }\n\n // deactivate of events that may interfere with the map\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container);\n\n // on stoppe la propagation de l'événement mousemove sur le container\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.addListener(container, \"mousemove\", leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.stopPropagation).addListener(container, \"mousemove\", leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.preventDefault);\n return container;\n },\n /**\n * this method is called when the control is removed from the map\n * and removes events on map.\n * @param {Object} map - the map\n *\n * @private\n */\n onRemove: function onRemove(map) {\n map.off(\"mousemove\", this.onMouseMove);\n },\n /**\n * this method is called by the constructor and initialize the projection\n * systems.\n * getting coordinates in the requested projection :\n * see this.onMousePositionProjectionSystemChange()\n *\n * @private\n */\n _initProjectionSystems: function _initProjectionSystems() {\n // on donne la possibilité à l'utilisateur de modifier\n // la liste des systèmes à afficher\n // Ex. this.options.systems\n\n // systemes de projection disponible par defaut\n var projectionSystemsByDefault = [{\n label: \"G\\xE9ographique\",\n crs: leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.Simple,\n // L.Projection.LonLat !\n type: \"Geographical\"\n }, {\n label: \"Web Mercator\",\n crs: leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.EPSG3395,\n // L.Projection.SphericalMercator !\n type: \"Metric\"\n }, {\n label: \"Lambert 93\",\n crs: _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__[\"default\"].EPSG2154,\n type: \"Metric\",\n geoBBox: {\n left: -9.86,\n bottom: 41.15,\n right: 10.38,\n top: 51.56\n }\n }, {\n label: \"Lambert II \\xE9tendu\",\n crs: _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__[\"default\"].EPSG27572,\n type: \"Metric\",\n geoBBox: {\n left: -4.87,\n bottom: 42.33,\n right: 8.23,\n top: 51.14\n }\n }];\n var systems = this.options.systems;\n for (var i = 0; i < systems.length; i++) {\n // definition d'un systeme de reference\n var sys = systems[i];\n if (!sys.label) {\n logger.error(\"not defined !\");\n continue;\n }\n if (!sys.crs) {\n logger.error(\"crs not defined !\");\n continue;\n }\n if (!sys.type) {\n logger.warn(\"type srs not defined, use 'Metric' by default !\");\n sys.type = \"Metric\";\n }\n this._projectionSystems.push(systems[i]);\n\n // it's a just a test ...\n var found = false;\n for (var j = 0; j < projectionSystemsByDefault.length; j++) {\n var obj = projectionSystemsByDefault[j];\n if (sys.crs === obj.crs) {\n found = true;\n logger.info(\"crs '{}' already configured by default\", obj.code);\n }\n }\n if (!found) {\n logger.info(\"crs '{}' not found, it's a new projection\", sys.code || sys.label);\n }\n }\n\n // au cas où...\n if (this._projectionSystems.length === 0) {\n this._projectionSystems = projectionSystemsByDefault;\n }\n\n // re-initilisation des codes pour gerer le lien entre _projectionSystems et select du mouse position (lien code/value)\n for (var k = 0; k < this._projectionSystems.length; ++k) {\n this._projectionSystems[k].code = k;\n }\n },\n /**\n * this method is called by the constructor and initialize the units.\n * getting coordinates in the requested units :\n * see this.onMousePositionProjectionUnitsChange()\n *\n * @private\n */\n _initProjectionUnits: function _initProjectionUnits() {\n // on donne la possibilité à l'utilisateur de modifier\n // la liste des unités à afficher\n // Ex.\n // this.options.units : [\"DEC\", \"DMS\"]\n\n // unités disponible par defaut\n var projectionUnitsByDefault = {\n Geographical: [{\n code: \"DEC\",\n label: \"degrés décimaux\",\n format: this._displayDEC\n }, {\n code: \"DMS\",\n label: \"degrés sexagésimaux\",\n format: this._displayDMS\n }, {\n code: \"RAD\",\n label: \"radians\",\n format: this._displayRAD\n }, {\n code: \"GON\",\n label: \"grades\",\n format: this._displayGON\n }],\n Metric: [{\n code: \"M\",\n label: \"mètres\",\n format: this._displayMeter\n }, {\n code: \"KM\",\n label: \"kilomètres\",\n format: this._displayKMeter\n }]\n };\n var units = this.options.units;\n for (var type in projectionUnitsByDefault) {\n if (projectionUnitsByDefault.hasOwnProperty(type)) {\n var found = false;\n for (var j = 0; j < projectionUnitsByDefault[type].length; j++) {\n var obj = projectionUnitsByDefault[type][j];\n for (var i = 0; i < units.length; i++) {\n var unit = units[i];\n if (obj.code === unit) {\n found = true;\n if (!this._projectionUnits[type]) {\n this._projectionUnits[type] = [];\n }\n this._projectionUnits[type].push(obj);\n }\n }\n }\n if (!found) {\n this._projectionUnits[type] = projectionUnitsByDefault[type];\n }\n }\n }\n\n // au cas où...\n if (Object.keys(this._projectionUnits).length === 0) {\n this._projectionUnits = projectionUnitsByDefault;\n }\n },\n /**\n * this method is called by the constructor.\n * this information is useful to switch to touch mode.\n * Detection : test for desktop or tactile\n *\n * @returns {Boolean} is desktop\n * @private\n */\n _detectSupport: function _detectSupport() {\n // TODO\n // Choix de gérer la détection dans le code du composant au lieu du DOM car :\n // Utilisation de l'implémentation Leaflet\n // http://leafletjs.com/reference.html#browser\n\n var isDesktop = true;\n var userAgent = window.navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\"iphone\") !== -1 || userAgent.indexOf(\"ipod\") !== -1 || userAgent.indexOf(\"ipad\") !== -1 || userAgent.indexOf(\"android\") !== -1 || userAgent.indexOf(\"mobile\") !== -1 || userAgent.indexOf(\"blackberry\") !== -1 || userAgent.indexOf(\"tablet\") !== -1 || userAgent.indexOf(\"phone\") !== -1 || userAgent.indexOf(\"touch\") !== -1) {\n isDesktop = false;\n }\n if (userAgent.indexOf(\"msie\") !== -1 || userAgent.indexOf(\"trident\") !== -1) {\n isDesktop = true;\n }\n return isDesktop;\n },\n // ################################################################### //\n // ######################## methods handle dom ####################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd(map)\n * and initialize the container HTMLElement\n *\n * @returns {DOMElement} DOM element\n * @private\n */\n _initLayout: function _initLayout() {\n // create main container\n var container = this._createMainContainerElement();\n var inputShow = this._showContainer = this._createShowMousePositionElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.options.collapsed) {\n inputShow.checked = true;\n }\n var picto = this._pictoContainer = this._createShowMousePositionPictoElement(this._isDesktop);\n container.appendChild(picto);\n var panel = this._panelContainer = this._createMousePositionPanelElement();\n var header = this._panelHeaderContainer = this._createMousePositionPanelHeaderElement();\n panel.appendChild(header);\n var basic = this._createMousePositionPanelBasicElement(this.options.displayAltitude, this.options.displayCoordinates, this.options.editCoordinates);\n panel.appendChild(basic);\n var arraySettings = this._createShowMousePositionSettingsElement(this.options.displayCoordinates);\n for (var j = 0; j < arraySettings.length; j++) {\n panel.appendChild(arraySettings[j]);\n }\n var settings = this._createMousePositionSettingsElement();\n var systems = this._projectionSystemsContainer = this._createMousePositionSettingsSystemsElement(this._projectionSystems);\n var units = this._projectionUnitsContainer = this._createMousePositionSettingsUnitsElement(this._projectionUnits[this._currentProjectionType]);\n settings.appendChild(systems);\n settings.appendChild(units);\n panel.appendChild(settings);\n container.appendChild(panel);\n\n // ce tag n'est pas à placer dans le container du controle,\n // mais dans celui de la map !\n var center = this._createMapCenter();\n var map = this._map;\n map.getContainer().appendChild(center);\n return container;\n },\n /**\n * this method is called by this.()\n * and it changes the elevation view panel into the dom.\n * FIXME call by ID !\n *\n * @param {Boolean} active - true:active, false:disable\n *\n * @private\n */\n _setElevationPanel: function _setElevationPanel(active) {\n var div = null;\n if (!active) {\n div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionAltitude\"));\n div.style.display = \"none\";\n }\n },\n /**\n * this method is called by this.()\n * and it changes the coordinate view panel into the dom.\n * FIXME call by ID !\n *\n * @param {Boolean} active - true:active, false:disable\n *\n * @private\n */\n _setCoordinatePanel: function _setCoordinatePanel(active) {\n if (!active) {\n var div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionCoordinate\"));\n div.style.display = \"none\";\n }\n },\n /**\n * this method is called by this.()\n * and it changes the settings view panel into the dom.\n * FIXME call by ID !\n *\n * @param {Boolean} active - true:active, false:disable\n *\n * @private\n */\n _setSettingsPanel: function _setSettingsPanel(active) {\n if (!active) {\n var divPicto = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GPshowMousePositionSettingsPicto\");\n var divPanel = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionSettings\"));\n divPicto.style.display = \"none\";\n divPanel.style.display = \"none\";\n }\n },\n /**\n * this method is called by this.onMousePositionProjectionSystemChange()\n * when changes to a metric or a geographical units.\n *\n * @param {String} type - Geographical or Metric\n *\n * @private\n */\n _setTypeUnitsPanel: function _setTypeUnitsPanel(type) {\n var container = this._projectionUnitsContainer;\n\n // on supprime les enfants...\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n var units = this._projectionUnits[type];\n for (var j = 0; j < units.length; j++) {\n var obj = units[j];\n var option = document.createElement(\"option\");\n option.value = obj.code ? obj.code : j;\n option.text = obj.label || j;\n // option.label = obj.label;\n container.appendChild(option);\n }\n var projectionUnits = this._projectionUnits[type][0].code;\n if (this._currentProjectionUnits === \"DMS\" || projectionUnits === \"DMS\") {\n this._resetCoordinateElements(this.options.editCoordinates, type, projectionUnits);\n this._setEditMode(this._isEditing);\n }\n\n // le nouveau type de system ...\n this._currentProjectionType = type;\n\n // Mise a jour des elements labels et unites\n this._resetLabelElements(type);\n this._resetUnitElements(projectionUnits);\n\n // et comme on a changé de type de systeme,\n // il faut changer aussi d'unité !\n this._currentProjectionUnits = this._projectionUnits[type][0].code;\n },\n // ################################################################### //\n // ######################## method units format ###################### //\n // ################################################################### //\n\n /**\n * degreedecimal\n * @param {Object} oLatLng - coordinates\n *\n * @returns {Object} coordinates in decimal\n * @private\n */\n _displayDEC: function _displayDEC(oLatLng) {\n var coordinate = {};\n coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].roundToDecimal(oLatLng.lat, 6);\n coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].roundToDecimal(oLatLng.lng, 6);\n coordinate.unit = \"°\";\n return coordinate;\n },\n /**\n * degreedecimal2sexagecimal\n * @param {Object} oLatLng - coordinates\n *\n * @returns {Object} coordinates in DMS\n * @private\n */\n _displayDMS: function _displayDMS(oLatLng) {\n var coordinate = {};\n coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalLatToDMS(oLatLng.lat, true);\n coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalLonToDMS(oLatLng.lng, true);\n return coordinate;\n },\n /**\n * degreedecimal2radian\n * @param {Object} oLatLng - coordinates\n *\n * @returns {Object} coordinates in radian\n * @private\n */\n _displayRAD: function _displayRAD(oLatLng) {\n var coordinate = {};\n coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalToRadian(oLatLng.lat);\n coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalToRadian(oLatLng.lng);\n coordinate.unit = \"rad\";\n return coordinate;\n },\n /**\n * degreedecimal2grade\n * @param {Object} oLatLng - coordinates\n *\n * @returns {Object} coordinates in gon\n * @private\n */\n _displayGON: function _displayGON(oLatLng) {\n var coordinate = {};\n coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalToGrade(oLatLng.lat);\n coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__[\"default\"].decimalToGrade(oLatLng.lng);\n coordinate.unit = \"gon\";\n return coordinate;\n },\n /**\n * meter\n * @param {Object} oXY - coordinates\n *\n * @returns {Object} coordinates in meters\n * @private\n */\n _displayMeter: function _displayMeter(oXY) {\n // on recoit toujours des coordonnées metriques\n var coordinate = {};\n coordinate.x = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.x, 2);\n coordinate.y = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.y, 2);\n coordinate.unit = \"m\";\n return coordinate;\n },\n /**\n * kilometer\n * @param {Object} oXY - coordinates\n *\n * @returns {Object} coordinates in km\n * @private\n */\n _displayKMeter: function _displayKMeter(oXY) {\n var coordinate = {};\n coordinate.x = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.x / 1000, 2);\n coordinate.y = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.y / 1000, 2);\n coordinate.unit = \"km\";\n return coordinate;\n },\n // ################################################################### //\n // ####################### method system project ##################### //\n // ################################################################### //\n\n /**\n * this method projects a coordinate to a specific projection.\n * FIXME\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n * @param {Object} crs - projection system (ex. GEOGRAPHIC, LAMB93, LAMB2E, MERCATOR, ...)\n * @returns {Object} oXY - coordinate\n * @private\n */\n _project: function _project(oLatLng, crs) {\n // cf. http://leafletjs.com/reference.html#iprojection\n // notre carte est dans la projection par defaut :\n // Spherical Mercator projection (EPSG:3857)\n // - GEOGRAPHIC : conversion native, L.CRS.Simple ou L.Projection.LngLat.project(latlng)\n // - LAMB93 : L.GeoportalCRS.EPSG2154 ou projection.project(latlng)\n // - LAMB2E : L.GeoportalCRS.EPSG27572 ou projection.project(latlng)\n // - MERCATOR ou EPSG:3395 : L.CRS.EPSG3395 ou L.Projection.Mercator.project(latlng)\n\n if (typeof crs === \"function\") {\n // \"crs is an function !\"... en mode AMD !\n crs = crs();\n }\n if (_typeof(crs) !== \"object\") {\n logger.log(\"crs is not an object !\");\n return;\n }\n\n // pas de reprojection pour le systeme de projection natif !\n if (crs === leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.Simple) {\n return oLatLng;\n }\n if (!crs.projection || _typeof(crs.projection) !== \"object\") {\n logger.error(\"projection is not an object !\");\n return;\n }\n var oPoint = crs.projection.project(oLatLng);\n\n // FIXME reprojeter du geographique en geographique cause qq problemes\n // Ex. LatLng en EPSG4326 !\n // FIXME probleme d'inversion d'axe sur les projections geographiques\n // Ex. EPSG:4326 -> lat/lon\n // IGNF:RGF93G -> lon/lat\n if (this._currentProjectionType === \"Geographical\") {\n oPoint.lat = oPoint.y;\n oPoint.lng = oPoint.x;\n }\n if (!oPoint || Object.keys(oPoint).length === 0) {\n logger.error(\"Failed to project with crs code : \" + crs.code);\n }\n return oPoint;\n },\n /**\n * this method unprojects a coordinate to a geographic projection.\n *\n * @param {Object} oXY - coordinate\n * @returns {Object} oLatLng - geographic coordinate (L.LatLng)\n * @private\n */\n _unproject: function _unproject(oXY) {\n // cf. http://leafletjs.com/reference.html#iprojection\n // notre carte est dans la projection par defaut :\n // Spherical Mercator projection (EPSG:3857)\n // - GEOGRAPHIC : conversion native, L.CRS.Simple ou L.Projection.LngLat.project(latlng)\n // - LAMB93 : L.GeoportalCRS.EPSG2154 ou projection.project(latlng)\n // - LAMB2E : L.GeoportalCRS.EPSG27572 ou projection.project(latlng)\n // - MERCATOR ou EPSG:3395 : L.CRS.EPSG3395 ou L.Projection.Mercator.project(latlng)\n\n var oSrs = this._currentProjectionSystems.crs;\n if (!oSrs) {\n logger.log(\"system crs not found\");\n return;\n }\n if (typeof oSrs === \"function\") {\n // \"crs is an function !\"... en mode AMD !\n oSrs = oSrs();\n }\n if (_typeof(oSrs) !== \"object\") {\n logger.log(\"crs is not an object !\");\n return;\n }\n\n // pas de reprojection pour le systeme de projection natif !\n if (oSrs === leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.Simple) {\n return {\n lat: oXY.y,\n lng: oXY.x\n };\n }\n if (this._currentProjectionType === \"Geographical\") {\n return {\n lat: oXY.y,\n lng: oXY.x\n };\n }\n if (!oSrs.projection || _typeof(oSrs.projection) !== \"object\") {\n logger.error(\"projection is not an object !\");\n return;\n }\n var oLatLng = oSrs.projection.unproject(oXY);\n if (!oLatLng || Object.keys(oLatLng).length === 0) {\n logger.error(\"Failed to unproject coordinate\");\n }\n return oLatLng;\n },\n // ################################################################### //\n // ##################### handlers events to control ################## //\n // ################################################################### //\n\n /**\n * this sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n *\n * @private\n */\n _setCoordinate: function _setCoordinate(oLatLng) {\n // structure\n // L.LatLng\n // lat: 4.07249425916745\n // lng: 2.4609375\n\n // type de systeme : Geographical ou Metric\n var type = this._currentProjectionSystems.type;\n\n // on recherche la fonction de formatage dans l'unitée demandée\n var format = null;\n var units = this._projectionUnits[type];\n for (var i = 0; i < units.length; i++) {\n if (units[i].code === this._currentProjectionUnits) {\n format = units[i].format;\n break;\n }\n }\n\n // structure pour les coordonnées en fonctin du type demandé :\n // {x:, y:, unit:} ou {lng:, lat:} ou {lon:, lat:} ou {e:, n:, unit:}...\n var coordinate = {};\n // on projete le point dans le systeme demandé\n var oSrs = this._currentProjectionSystems.crs;\n if (!oSrs) {\n logger.error(\"crs not found !\");\n return;\n }\n coordinate = format(this._project(oLatLng, oSrs));\n if (!coordinate || Object.keys(coordinate).length === 0) {\n return;\n }\n this.GPdisplayCoords(coordinate);\n },\n /**\n * this sends the coordinates to the panel.\n * (cf. this.GPdisplayElevation() into the DOM functions)\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n *\n * @private\n */\n _setElevation: function _setElevation(oLatLng) {\n // gestion du timer de la requete du service d'altitude\n var delay = this.options.altitude.responseDelay;\n var noDataValue = this.options.altitude.noDataValue;\n var noDataValueTolerance = this.options.altitude.noDataValueTolerance;\n this.GPdisplayElevation(oLatLng, delay, noDataValue, noDataValueTolerance);\n },\n /**\n * this method is triggered when the mouse or the map is stopped.\n * (cf. onMouseMove and onMapMove)\n *\n * @param {Object} oLatLng - geographic coordinate (L.LatLng)\n *\n * @private\n */\n onMoveStopped: function onMoveStopped(oLatLng) {\n this._setElevation(oLatLng);\n },\n /**\n * this method is an handler event to control. The event is 'mousemove' on\n * the map. The handler sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMouseMove: function onMouseMove(e) {\n var self = this;\n var oLatLng = e.latlng;\n this._setCoordinate(oLatLng);\n clearTimeout(this._timer);\n this._timer = setTimeout(function () {\n self.onMoveStopped(oLatLng);\n }, this.options.altitude.triggerDelay);\n },\n /**\n * this method is an handler event to control. The event is 'moveend' on\n * the map. The handler sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @private\n */\n onMapMove: function onMapMove() {\n var self = this;\n var map = this._map;\n var oLatLng = map.getCenter();\n this._setCoordinate(oLatLng);\n clearTimeout(this._timer);\n this._timer = setTimeout(function () {\n self.onMoveStopped(oLatLng);\n }, this.options.altitude.triggerDelay);\n },\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by this.GPdisplayCoords() in the dom, and\n * it executes a request to the elevation service.\n *\n * @param {Object} coordinate - {lat:..., lng:...}\n * @param {Function} callback - callback\n *\n * @private\n */\n onRequestAltitude: function onRequestAltitude(coordinate, callback) {\n logger.log(\"onRequestAltitude\");\n\n // INFORMATION\n // on effectue la requête au service d'altitude...\n // on met en place des callbacks afin de recuperer les resultats ou\n // les messages d'erreurs du service.\n // le resultat est affiché dans une balise du dom.\n // les messages d'erreurs sont affichés sur la console (?)\n\n if (!coordinate || Object.keys(coordinate).length === 0) {\n return;\n }\n\n // si on ne veut pas de calcul d'altitude, on ne continue pas !\n if (!this.options.displayAltitude) {\n return;\n }\n logger.log(coordinate);\n var options = {};\n // on recupere les options du service\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.altitude.serviceOptions);\n\n // ainsi que les coordonnées\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n zonly: true,\n positions: [{\n lon: coordinate.lon || coordinate.lng,\n lat: coordinate.lat\n }]\n });\n\n // et les callbacks\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n scope: this,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results && Object.keys(results).length) {\n // var context = this.options.scope;\n // context._setAltidude(results.elevations[0].z);\n callback.call(this, results.elevations[0].z);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n logger.error(error.message);\n }\n });\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle ou la clé \"calcul\" par défaut\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n apiKey: options.apiKey || this.options.apiKey\n });\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n ssl: this.options.ssl\n });\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Services.getAltitude(options);\n },\n /**\n * this method is called by event 'click' on 'GPshowMousePositionPicto' tag label\n * (cf. this._createShowMousePositionPictoElement),\n * and toggles event 'mousemove' on map.\n * FIXME\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onShowMousePositionClick: function onShowMousePositionClick(e) {\n logger.log(e);\n\n // checked : true - panel close\n // checked : false - panel open\n var map = this._map;\n\n // evenement declenché à l'ouverture/fermeture du panneau,\n // et en fonction du mode : desktop ou tactile !\n if (this._showContainer.checked) {\n this._isDesktop ? map.off(\"mousemove\", this.onMouseMove, this) : map.off(\"move\", this.onMapMove, this);\n } else {\n this._isDesktop ? map.on(\"mousemove\", this.onMouseMove, this) : map.on(\"move\", this.onMapMove, this);\n }\n\n // on gère l'affichage des panneaux ici...,\n // même si ce n'est pas l'endroit adequate...\n this._setElevationPanel(this.options.displayAltitude);\n this._setCoordinatePanel(this.options.displayCoordinates);\n if (!this.options.displayCoordinates) {\n this._setSettingsPanel(false);\n }\n },\n /**\n * this method is called by event 'click' on input coordinate\n *\n * @param {Boolean} editing - editing mode\n * @private\n */\n onMousePositionEditModeClick: function onMousePositionEditModeClick(editing) {\n if (!this.options.editCoordinates) {\n return;\n }\n if (this._isEditing === editing) {\n return;\n }\n this._isEditing = editing;\n\n // Affichage des outils, input en ecriture\n this._setEditMode(this._isEditing);\n var map = this._map;\n if (this._isDesktop) {\n this._isEditing ? map.off(\"mousemove\", this.onMouseMove, this) : map.on(\"mousemove\", this.onMouseMove, this);\n } else {\n this._isEditing ? map.off(\"move\", this.onMapMove, this) : map.on(\"move\", this.onMapMove, this);\n }\n },\n /**\n * Convert Coordinate value : km to meters, radians, grades to decimal degrees\n * @param {Number} value - value to convert\n * @param {String} unit - unit\n *\n * @returns {Number} converted value\n * @private\n */\n _convertCoordinate: function _convertCoordinate(value, unit) {\n var result;\n if (unit === \"DEC\" || unit === \"DMS\") {\n // DMS est converti en DEC !\n result = value;\n } else if (unit === \"M\") {\n result = value;\n } else if (unit === \"KM\") {\n result = value * 1000;\n } else if (unit === \"RAD\") {\n var rd = (180 / Math.PI).toFixed(20);\n result = (value * rd).toFixed(20);\n } else if (unit === \"GON\") {\n var d = (9 / 10).toFixed(20);\n result = (value * d).toFixed(20);\n }\n return result;\n },\n /**\n * Validate Extend coordinate\n *\n * @param {String} coordType - Lat or Lon\n * @param {String} value - coordinate\n * @param {Event} e - event\n * @returns {Boolean} value is within extent\n */\n validateExtentCoordinate: function validateExtentCoordinate(coordType, value, e) {\n // FIXME pas de validation...\n if (e !== undefined) {\n return true;\n }\n if ([\"Lon\", \"Lat\"].indexOf(coordType) === -1) {\n return false;\n }\n var geoBBox = this._currentProjectionSystems.geoBBox;\n if (geoBBox === undefined) {\n return true;\n }\n if (geoBBox) {\n // check if coordinates are in the extent\n\n var extent = [geoBBox.left, geoBBox.bottom, geoBBox.right, geoBBox.top];\n var unit = this._currentProjectionUnits;\n\n // on convertit un point..., mais on n'a pas de fonction\n // de conversion comme pour openlayers...\n var oLatLon = this._unproject({\n x: coordType === \"Lon\" ? this._convertCoordinate(value, unit) : 0,\n y: coordType === \"Lat\" ? this._convertCoordinate(value, unit) : 0\n });\n if (coordType === \"Lon\" && (oLatLon.lng < extent[0] || oLatLon.lng > extent[2])) {\n logger.warn(\"coordinates (lon) out of extent !?\");\n return false;\n }\n if (coordType === \"Lat\" && (oLatLon.lat < extent[1] || oLatLon.lat > extent[3])) {\n logger.warn(\"coordinates (lat) out of extent !?\");\n return false;\n }\n }\n return true;\n },\n /**\n * Get coordinate from inputs and select in decimal degrees\n *\n * @param {String} coordType - \"Lon\" or \"Lat\"\n * @returns {String} coordinate\n * @private\n */\n _getCoordinate: function _getCoordinate(coordType) {\n var inputDegrees = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePosition\" + coordType + \"Degrees\"));\n var degrees = inputDegrees.value;\n if (!degrees) {\n return null;\n }\n degrees = degrees.replace(\",\", \".\");\n if (!_Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].isInteger(degrees)) {\n return null;\n }\n var result = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].toInteger(degrees);\n if (result < Number(inputDegrees.dataset.min) || result > Number(inputDegrees.dataset.max)) {\n return null;\n }\n var direction = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePosition\" + coordType + \"Direction\")).value;\n var inputMinutes = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePosition\" + coordType + \"Minutes\"));\n var minutes = inputMinutes.value;\n if (minutes) {\n minutes = minutes.replace(\",\", \".\");\n if (_Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].isInteger(minutes)) {\n var mins = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].toInteger(minutes);\n if (mins >= Number(inputMinutes.dataset.min) && mins <= Number(inputMinutes.dataset.max)) {\n result += mins / 60;\n }\n }\n }\n var inputSeconds = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePosition\" + coordType + \"Seconds\"));\n var seconds = inputSeconds.value;\n if (seconds) {\n seconds = seconds.replace(\",\", \".\");\n var secs = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].toFloat(seconds);\n if (secs && secs >= Number(inputSeconds.dataset.min) && secs <= Number(inputSeconds.dataset.max)) {\n result += secs / 3600;\n }\n }\n if (direction === \"O\" || direction === \"S\") {\n result = -result;\n }\n return result;\n },\n /**\n * locate DMS coordinates on map\n *\n * @private\n */\n _locateDMSCoordinates: function _locateDMSCoordinates() {\n // on est toujours en coordonnées geographiques...\n var oLatLon = {\n lat: this._getCoordinate(\"Lat\"),\n lng: this._getCoordinate(\"Lon\")\n };\n if (!this.validateExtentCoordinate(\"Lon\", oLatLon.lng)) {\n return;\n }\n if (!this.validateExtentCoordinate(\"Lat\", oLatLon.lat)) {\n return;\n }\n\n // FIXME https://github.com/Leaflet/Leaflet/issues/922\n var map = this._map;\n map.panTo(oLatLon);\n },\n /**\n * locate coordinates on map (not DMS)\n *\n * @private\n */\n _locateCoordinates: function _locateCoordinates() {\n // soit longitude ou soit y\n var lonYDom = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionLon\")).value;\n lonYDom = lonYDom.replace(\",\", \".\");\n lonYDom = parseFloat(lonYDom);\n if (isNaN(lonYDom)) {\n return;\n }\n\n // soit lattitude ou soit x\n var latXDom = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionLat\")).value;\n latXDom = latXDom.replace(\",\", \".\");\n latXDom = parseFloat(latXDom);\n if (isNaN(latXDom)) {\n return;\n }\n var lon = null;\n var lat = null;\n var x = null;\n var y = null;\n if (this._currentProjectionType === \"Geographical\") {\n lon = lonYDom;\n lat = latXDom;\n } else {\n x = latXDom;\n y = lonYDom;\n }\n if (!this.validateExtentCoordinate(\"Lon\", lon || x)) {\n return;\n }\n if (!this.validateExtentCoordinate(\"Lat\", lat || y)) {\n return;\n }\n var unit = this._currentProjectionUnits;\n var oLatLon = this._unproject({\n x: this._convertCoordinate(lon !== null ? lon : x, unit),\n y: this._convertCoordinate(lat !== null ? lat : y, unit)\n });\n\n // FIXME https://github.com/Leaflet/Leaflet/issues/922\n var map = this._map;\n map.panTo(oLatLon);\n },\n /**\n * locate coordinates on map\n *\n * @method locate\n * @private\n */\n onMousePositionEditModeLocateClick: function onMousePositionEditModeLocateClick() {\n if (!this.options.editCoordinates) {\n return;\n }\n if (!this._isEditing) {\n this.onMousePositionEditModeClick(true);\n return;\n }\n this._currentProjectionUnits === \"DMS\" ? this._locateDMSCoordinates() : this._locateCoordinates();\n },\n /**\n * this method is called by event 'change' on 'GPmousePositionProjectionSystem'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the system projection.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMousePositionProjectionSystemChange: function onMousePositionProjectionSystemChange(e) {\n logger.log(\"onMousePositionProjectionSystemChange\", e);\n var idx = e.target.selectedIndex; // index\n var value = e.target.options[idx].value; // crs, ex. MERCATOR (optionnel)\n var label = e.target.options[idx].label; // etiquette, ex Géographiques\n\n logger.log(idx, value, label);\n this._setCurrentSystem(value);\n },\n /**\n * this method selects the current system projection.\n *\n * @param {Object} systemCode - inner code (rank in array _projectionSystems)\n *\n * @private\n */\n _setCurrentSystem: function _setCurrentSystem(systemCode) {\n // si on change de type de systeme, on doit aussi changer le type d'unités !\n var type = null;\n for (var i = 0; i < this._projectionSystems.length; ++i) {\n if (this._projectionSystems[i].code === Number(systemCode)) {\n type = this._projectionSystems[i].type;\n break;\n }\n }\n if (!type) {\n logger.log(\"system not found in projection systems container\");\n return;\n }\n if (type !== this._currentProjectionType) {\n this._setTypeUnitsPanel(type);\n }\n\n // on enregistre le systeme courrant\n this._currentProjectionSystems = this._projectionSystems[Number(systemCode)];\n\n // on simule un deplacement en mode tactile pour mettre à jour les\n // resultats\n if (!this._isDesktop) {\n this.onMapMove();\n }\n },\n /**\n * this method is called by event 'mouseover' on 'GPmousePositionProjectionSystem'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the system projection.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMousePositionProjectionSystemMouseOver: function onMousePositionProjectionSystemMouseOver(e) {\n logger.log(\"onMousePositionProjectionSystemMouseOver\", e);\n var map = this._map;\n if (!map) {\n return;\n }\n\n // clear select\n var systemList = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID(\"GPmousePositionProjectionSystem\"));\n systemList.innerHTML = \"\";\n\n // add systems whose extent intersects the map extent\n for (var j = 0; j < this._projectionSystems.length; j++) {\n var proj = this._projectionSystems[j];\n var option = null;\n if (proj.geoBBox) {\n // bboxes intersection test\n if (map.getBounds()._southWest.lng > proj.geoBBox.right || map.getBounds()._southWest.lat > proj.geoBBox.top || map.getBounds()._northEast.lng < proj.geoBBox.left || map.getBounds()._northEast.lat < proj.geoBBox.bottom) {\n if (proj === this._currentProjectionSystems) {\n option = document.createElement(\"option\");\n option.value = proj.code;\n option.text = proj.label || j;\n option.setAttribute(\"selected\", \"selected\");\n option.setAttribute(\"disabled\", \"disabled\");\n systemList.appendChild(option);\n }\n continue; // do not intersect\n }\n }\n\n option = document.createElement(\"option\");\n option.value = proj.code;\n option.text = proj.label || j;\n if (proj === this._currentProjectionSystems) {\n option.setAttribute(\"selected\", \"selected\");\n }\n systemList.appendChild(option);\n }\n },\n /**\n * this method is called by event 'change' on 'GPmousePositionProjectionUnits'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the units projection.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onMousePositionProjectionUnitsChange: function onMousePositionProjectionUnitsChange(e) {\n logger.log(\"onMousePositionProjectionUnitsChange\", e);\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n var label = e.target.options[idx].label;\n logger.log(idx, value, label);\n var oldProjectionUnits = this._currentProjectionUnits;\n var newProjectionUnits = this._currentProjectionUnits = value;\n var newProjectionType = this._currentProjectionType;\n\n // Mise a jour des elements lebels et unites\n this._resetLabelElements(newProjectionType);\n this._resetUnitElements(newProjectionUnits);\n\n // mise a jour des inputs pour les coordonnees\n if (oldProjectionUnits === \"DMS\" || newProjectionUnits === \"DMS\") {\n this._resetCoordinateElements(this.options.editCoordinates, newProjectionType, newProjectionUnits);\n this._setEditMode(this._isEditing);\n }\n\n // on simule un deplacement en mode tactile pour mettre à jour les\n // resultats\n if (!this._isDesktop) {\n this.onMapMove();\n }\n },\n // ################################################################### //\n // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ //\n // ################################################################### //\n\n /**\n * This method is public.\n * It allows to control the execution of a movement.\n *\n * @param {Object} position - position = {lon: , lat: }\n * @param {Number} zoom - zoom\n * @param {Object} options - Zoom/pan options\n */\n moveTo: function moveTo(position, zoom, options) {\n if (!this._showContainer.checked) {\n this._pictoContainer.click();\n }\n var map = this._map;\n if (!map) {\n return;\n }\n this.onMouseMove({\n latlng: position\n });\n map.flyTo(position, zoom || 10, options || {});\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (MousePosition);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL01vdXNlUG9zaXRpb24uanM/NDJiMSJdLCJuYW1lcyI6WyJsb2dnZXIiLCJMb2dnZXIiLCJnZXRMb2dnZXIiLCJNb3VzZVBvc2l0aW9uIiwiTCIsIkNvbnRyb2wiLCJleHRlbmQiLCJpbmNsdWRlcyIsIk1vdXNlUG9zaXRpb25ET00iLCJvcHRpb25zIiwicG9zaXRpb24iLCJjb2xsYXBzZWQiLCJ1bml0cyIsInN5c3RlbXMiLCJkaXNwbGF5QWx0aXR1ZGUiLCJkaXNwbGF5Q29vcmRpbmF0ZXMiLCJlZGl0Q29vcmRpbmF0ZXMiLCJhbHRpdHVkZSIsInRyaWdnZXJEZWxheSIsInJlc3BvbnNlRGVsYXkiLCJub0RhdGFWYWx1ZSIsIm5vRGF0YVZhbHVlVG9sZXJhbmNlIiwic2VydmljZU9wdGlvbnMiLCJpbml0aWFsaXplIiwiVXRpbCIsIl91aWQiLCJJRCIsImdlbmVyYXRlIiwiX3Byb2plY3Rpb25TeXN0ZW1zIiwiX2luaXRQcm9qZWN0aW9uU3lzdGVtcyIsIl9wcm9qZWN0aW9uVW5pdHMiLCJfaW5pdFByb2plY3Rpb25Vbml0cyIsIl9pc0Rlc2t0b3AiLCJfZGV0ZWN0U3VwcG9ydCIsIl90aW1lciIsIl9jdXJyZW50UHJvamVjdGlvblN5c3RlbX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AgICAgICBEZWZhdWx0IGlzIDkwMDAwXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiAgdmFyIE1vdXNlUG9zaXRpb24gPSBMLmdlb3BvcnRhbENvbnRyb2wuTW91c2VQb3NpdGlvbih7XG4gICAgICogICAgICBwb3NpdGlvbiA6ICdib3R0b21sZWZ0JyxcbiAgICAgKiAgICAgIGNvbGxhcHNlZCA6IGZhbHNlLFxuICAgICAqICAgICAgZGlzcGxheUFsdGl0dWRlIDogdHJ1ZSxcbiAgICAgKiAgICAgIGRpc3BsYXlDb29yZGluYXRlcyA6IHRydWUsXG4gICAgICogICAgICBlZGl0Q29vcmRpbmF0ZXMgOiBmYWxzZSxcbiAgICAgKiAgICAgIGFsdGl0dWRlIDoge1xuICAgICAqICAgICAgICAgICB0cmlnZ2VyRGVsYXkgOiAxMDAsXG4gICAgICogICAgICAgICAgIHJlc3BvbnNlRGVsYXkgOiA1MDAsXG4gICAgICogICAgICAgICAgIG5vRGF0YVZhbHVlIDogLTk5OTk5LFxuICAgICAqICAgICAgICAgICBub0RhdGFWYWx1ZVRvbGVyYW5jZSA6IDkwMDAwLFxuICAgICAqICAgICAgICAgICBzZXJ2aWNlT3B0aW9ucyA6IHt9XG4gICAgICogICAgICB9LFxuICAgICAqICAgICAgc3lzdGVtcyA6IFtcbiAgICAgKiAgICAgICB7XG4gICAgICogICAgICAgICAgY3JzIDogTC5DUlMuRVBTRzQzMjYsXG4gICAgICogICAgICAgICAgbGFiZWwgOiBcIkxvbixMYXRcIixcbiAgICAgKiAgICAgICAgICB0eXBlIDogXCJHZW9ncmFwaGljYWxcIlxuICAgICAqICAgICAgICB9LFxuICAgICAqICAgICAgIHtcbiAgICAgKiAgICAgICAgICBjcnMgOiBMLmdlb3BvcnRhbENSUy5FUFNHMjE1NCxcbiAgICAgKiAgICAgICAgICBsYWJlbCA6IFwiTGFtYmVydCA5M1wiLFxuICAgICAqICAgICAgICAgIHR5cGUgOiBcIk1ldHJpY1wiXG4gICAgICogIC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CB7XG4gICAgICAgICAgICBsYWJlbCA6IFwiV2ViIE1lcmNhdG9yXCIsXG4gICAgICAgICAgICBjcnMgOiBMLkNSUy5FUFNHMzM5NSwgLy8gTC5Qcm9qZWN0aW9uLlNwaGVyaWNhbE1lcmNhdG9yICFcbiAgICAgICAgICAgIHR5cGUgOiBcIk1ldHJpY1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGxhYmVsIDogXCJMYW1iZXJ0IDkzXCIsXG4gICAgICAgICAgICBjcnMgOiBDUlMuRVBTRzIxNTQsXG4gICAgICAgICAgICB0eXBlIDogXCJNZXRyaWNcIixcbiAgICAgICAgICAgIGdlb0JCb3ggOiB7XG4gICAgICAgICAgICAgICAgbGVmdCA6IC05Ljg2LFxuICAgICAgICAgICAgICAgIGJvdHRvbSA6IDQxLjE1LFxuICAgICAgICAgICAgICAgIHJpZ2h0IDogMTAuMzgsXG4gICAgICAgICAgICAgICAgdG9wIDogNTEuNTZcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwge1xuICAgICAgICAgICAgbGFiZWwgOiBcIkxhbWJlcnQgSUkgXFx1MDBlOXRlbmR1XCIsXG4gICAgICAgICAgICBjcnMgOiBDUlMuRVBTRzI3NTcyLFxuICAgICAgICAgICAgdHlwZSA6IFwiTWV0cmljXCIsXG4gICAgICAgICAgICBnZW9CQm94IDoge1xuICAgICAgICAgICAgICAgIGxlZnQgOiAtNC44NyxcbiAgICAgICAgICAgICAgICBib3R0b20gOiA0Mi4zMyxcbiAgICAgICAgICAgICAgICByaWdodCA6IDguMjMsXG4gICAgICAgICAgICAgICAgdG9wIDogNTEuMTRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfV07XG5cbiAgICAgICAgdmFyIHN5c3RlbXMgPSB0aGlzLm9wdGlvbnMuc3lzdGVtcztcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBzeXN0ZW1zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAvLyBkZWZpbml0aW9uIGQndW4gc3lzdGVtZSBkZSByZWZlcmVuY2VcbiAgICAgICAgICAgIHZhciBzeXMgPSBzeXN0ZW1zW2ldO1xuXG4gICAgICAgICAgICBpZiAoIXN5cy5sYWJlbCkge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5lcnJvcihcIm5vdCBkZWZpbmVkICFcIik7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghc3lzLmNycykge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5lcnJvcihcImNycyBub3QgZGVmaW5lZCAhXCIpO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIXN5cy50eXBlKSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLndhcm4oXCJ0eXBlIHNycyBub3QgZGVmaW5lZCwgdXNlICdNZXRyaWMnIGJ5IGRlZmF1bHQgIVwiKTtcbiAgICAgICAgICAgICAgICBzeXMudHlwZSA9IFwiTWV0cmljXCI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuX3Byb2plY3Rpb25TeXN0ZW1zLnB1c2goc3lzdGVtc1tpXSk7XG5cbiAgICAgICAgICAgIC8vIGl0J3MgYSBqdXN0IGEgdGVzdCAuLi5cbiAgICAgICAgICAgIHZhciBmb3VuZCA9IGZhbHNlO1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBwcm9qZWN0aW9uU3lzdGVtc0J5RGVmYXVsdC5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIHZhciBvYmogPSBwcm9qZWN0aW9uU3lzdGVtc0J5RGVmYXVsdFtqXTtcbiAgICAgICAgICAgICAgICBpZiAoc3lzLmNycyA9PT0gb2JqLmNycykge1xuICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGxvZ2dlci5pbmZvKFwiY3J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GlvblByb2plY3Rpb25Vbml0c0NoYW5nZSgpXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIF9pbml0UHJvamVjdGlvblVuaXRzIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAvLyBvbiBkb25uZSBsYSBwb3NzaWJpbGl0w6kgw6AgbCd1dGlsaXNhdGV1ciBkZSBtb2RpZmllclxuICAgICAgICAvLyBsYSBsaXN0ZSBkZXMgdW5pdMOpcyDDoCBhZmZpY2hlclxuICAgICAgICAvLyBFeC5cbiAgICAgICAgLy8gdGhpcy5vcHRpb25zLnVuaXRzIDogW1wiREVDXCIsIFwiRE1TXCJdXG5cbiAgICAgICAgLy8gdW5pdMOpcyBkaXNwb25pYmxlIHBhciBkZWZhdXRcbiAgICAgICAgdmFyIHByb2plY3Rpb25Vbml0c0J5RGVmYXVsdCA9IHtcbiAgICAgICAgICAgIEdlb2dyYXBoaWNhbCA6IFt7XG4gICAgICAgICAgICAgICAgY29kZSA6IFwiREVDXCIsXG4gICAgICAgICAgICAgICAgbGFiZWwgOiBcImRlZ3LDqXMgZMOpY2ltYXV4XCIsXG4gICAgICAgICAgICAgICAgZm9ybWF0IDogdGhpcy5fZGlzcGxheURFQ1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGNvZGUgOiBcIkRNU1wiLFxuICAgICAgICAgICAgICAgIGxhYmVsIDogXCJkZWdyw6lzIHNleGFnw6lzaW1hdXhcIixcbiAgICAgICAgICAgICAgICBmb3JtYXQgOiB0aGlzLl9kaXNwbGF5RE1TXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgY29kZSA6IFwiUkFEXCIsXG4gICAgICAgICAgICAgICAgbGFiZWwgOiBcInJhZGlhbnNcIixcbiAgICAgICAgICAgICAgICBmb3JtYXQgOiB0aGlzLl9kaXNwbGF5UkFEXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgY29kZSA6IFwiR09OXCIsXG4gICAgICAgICAgICAgICAgbGFiZWwgOiBcImdyYWRlc1wiLFxuICAgICAgICAgICAgICAgIGZvcm1hdCA6IHRoaXMuX2Rpc3BsYXlHT05cbiAgICAgICAgICAgIH1dLFxuICAgICAgICAgICAgTWV0cmljIDogW3tcbiAgICAgICAgICAgICAgICBjb2RlIDogXCJNXCIsXG4gICAgICAgICAgICAgICAgbGFiZWwgOiBcIm3DqHRyZXNcIixcbiAgICAgICAgICAgICAgICBmb3JtYXQgOiB0aGlzLl9kaXNwbGF5TWV0ZXJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBjb2RlIDogXCJLTVwiLFxuICAgICAgICAgICAgICAgIGxhYmVsIDogXCJraWxvbcOodHJlc1wiLFxuICAgICAgICAgICAgICAgIGZvcm1hdCA6IHRoaXMuX2Rpc3BsYXlLTWV0ZXJcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH07XG5cbiAgICAgICAgdmFyIHVuaXRzID0gdGhpcy5vcHRpb25zLnVuaXRzO1xuXG4gICAgICAgIGZvciAodmFyIHR5cGUgaW4gcHJvamVjdGlvblVuaXRzQnlEZWZhdWx0KSB7XG4gICAgICAgICAgICBpZiAocHJvamVjdGlvblVuaXRzQnlEZWZhdWx0Lmhhc093blByb3BlcnR5KHR5cGUpKSB7XG4gICAgICAgICAgICAgICAgdmFyIGZvdW5kID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBwcm9qZWN0aW9uVW5pdHNCeURlZmF1bHRbdHlwZV0ubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG9iaiA9IHByb2plY3Rpb25Vbml0c0J5RGVmYXVsdFt0eXBlXVtqXTtcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB1bml0cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVuaXQgPSB1bml0c1tpXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvYmouY29kZSA9PT0gdW5pdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX3Byb2plY3Rpb25Vbml0c1t0eXBlXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9wcm9qZWN0aW9uVW5pdHNbdHlwZV0gPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcHJvamVjdGlvblVuaXRzW3R5cGVdLnB1c2gob2JqKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWZvdW5kKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3Byb2plY3Rpb25Vbml0c1t0eXBlXSA9IHByb2plY3Rpb25Vbml0c0J5RGVmYXVsdFt0eXBlXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBhdSBjYXMgb8O5Li4uXG4gICAgICAgIGlmIChPYmplY3Qua2V5cyh0aGlzLl9wcm9qZWN0aW9uVW5pdHMpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgdGhpcy5fcHJvamVjdGlvblVuaXRzID0gcHJvamVjdGlvblVuaXRzQnlEZWZhdWx0O1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSB0aGUgY29uc3RydWN0b3IuXG4gICAgICogdGhpcyBpbmZvcm1hdGlvbiBpcyB1c2VmdWwgdG8gc3dpdGNoIHRvIHRvdWNoIG1vZGUuXG4gICAgICogRGV0ZWN0aW9uIDogdGVzdCBmb3Ig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XIgbGUgc3lzdGVtZSBkZSBwcm9qZWN0aW9uIG5hdGlmICFcbiAgICAgICAgaWYgKG9TcnMgPT09IEwuQ1JTLlNpbXBsZSkge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBsYXQgOiBvWFkueSxcbiAgICAgICAgICAgICAgICBsbmcgOiBvWFkueFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLl9jdXJyZW50UHJvamVjdGlvblR5cGUgPT09IFwiR2VvZ3JhcGhpY2FsXCIpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgbGF0IDogb1hZLnksXG4gICAgICAgICAgICAgICAgbG5nIDogb1hZLnhcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIW9TcnMucHJvamVjdGlvbiB8fCB0eXBlb2Ygb1Nycy5wcm9qZWN0aW9uICE9PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICBsb2dnZXIuZXJyb3IoXCJwcm9qZWN0aW9uIGlzIG5vdCBhbiBvYmplY3QgIVwiKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBvTGF0TG5nID0gb1Nycy5wcm9qZWN0aW9uLnVucHJvamVjdChvWFkpO1xuXG4gICAgICAgIGlmICghb0xhdExuZyB8fCBPYmplY3Qua2V5cyhvTGF0TG5nKS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIGxvZ2dlci5lcnJvcihcIkZhaWxlZCB0byB1bnByb2plY3QgY29vcmRpbmF0ZVwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBvTGF0TG5nO1xuICAgIH0sXG5cbiAgICAvLyAjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIC8vXG4gICAgLy8gIyMj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AgICAgIC8vIG9uIGNvbnZlcnRpdCB1biBwb2ludC4uLiwgbWFpcyBvbiBuJ2EgcGFzIGRlIGZvbmN0aW9uXG4gICAgICAgICAgICAvLyBkZSBjb252ZXJzaW9uIGNvbW1lIHBvdXIgb3BlbmxheWVycy4uLlxuICAgICAgICAgICAgdmFyIG9MYXRMb24gPSB0aGlzLl91bnByb2plY3Qoe1xuICAgICAgICAgICAgICAgIHggOiAoY29vcmRUeXBlID09PSBcIkxvblwiKSA/IHRoaXMuX2NvbnZlcnRDb29yZGluYXRlKHZhbHVlLCB1bml0KSA6IDAsXG4gICAgICAgICAgICAgICAgeSA6IChjb29yZFR5cGUgPT09IFwiTGF0XCIpID8gdGhpcy5fY29udmVydENvb3JkaW5hdGUodmFsdWUsIHVuaXQpIDogMFxuXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgaWYgKGNvb3JkVHlwZSA9PT0gXCJMb25cIiAmJiAob0xhdExvbi5sbmcgPCBleHRlbnRbMF0gfHwgb0xhdExvbi5sbmcgPiBleHRlbnRbMl0pKSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLndhcm4oXCJjb29yZGluYXRlcyAobG9uKSBvdXQgb2YgZXh0ZW50ICE/XCIpO1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChjb29yZFR5cGUgPT09IFwiTGF0XCIgJiYgKG9MYXRMb24ubGF0IDwgZXh0ZW50WzFdIHx8IG9MYXRMb24ubGF0ID4gZXh0ZW50WzNdKSkge1xuICAgICAgICAgICAgICAgIGxvZ2dlci53YXJuKFwiY29vcmRpbmF0ZXMgKGxhdCkgb3V0IG9mIGV4dGVudCAhP1wiKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogR2V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c2VjcyA9IE1hdGhVdGlscy50b0Zsb2F0KHNlY29uZHMpO1xuICAgICAgICAgICAgaWYgKHNlY3MgJiYgc2VjcyA+PSBOdW1iZXIoaW5wdXRTZWNvbmRzLmRhdGFzZXQubWluKSAmJiBzZWNzIDw9IE51bWJlcihpbnB1dFNlY29uZHMuZGF0YXNldC5tYXgpKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9IChzZWNzIC8gMzYwMCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZGlyZWN0aW9uID09PSBcIk9cIiB8fCBkaXJlY3Rpb24gPT09IFwiU1wiKSB7XG4gICAgICAgICAgICByZXN1bHQgPSAtcmVzdWx0O1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogbG9jYXRlIERNUyBjb29yZGluYXRlcyBvbiBtYXBcbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgX2xvY2F0ZURNU0Nvb3JkaW5hdGVzIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAvLyBvbiBlc3QgdG91am91cnMgZW4gY29vcmRvbm7DqWVzIGdlb2dyYXBoaXF1ZXMuLi5cbiAgICAgICAgdmFyIG9MYXRMb24gPSB7XG4gICAgICAgICAgICBsYXQgOiB0aGlzLl9nZXRDb29yZGluYXRlKFwiTGF0XCIpLFxuICAgICAgICAgICAgbG5nIDogdGhpcy5fZ2V0Q29vcmRpbmF0ZShcIkxvblwiKVxuICAgICAgICB9O1xuXG4gICAgICAgIGlmICghdGhpcy52YWxpZGF0ZUV4dGVudENvb3JkaW5hdGUoXCJMb25cIiwgb0xhdExvbi5sbmcpKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIXRoaXMudmFsaWRhdGVFeHRlbnRDb29yZGluYXRlKFwiTGF0XCIsIG9MYXRMb24ubGF0KSkge1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XG4gICAgICAgIHZhciBsb24gPSBudWxsO1xuICAgICAgICB2YXIgbGF0ID0gbnVsbDtcbiAgICAgICAgdmFyIHggPSBudWxsO1xuICAgICAgICB2YXIgeSA9IG51bGw7XG5cbiAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRQcm9qZWN0aW9uVHlwZSA9PT0gXCJHZW9ncmFwaGljYWxcIikge1xuICAgICAgICAgICAgbG9uID0gbG9uWURvbTtcbiAgICAgICAgICAgIGxhdCA9IGxhdFhEb207XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB4ID0gbGF0WERvbTtcbiAgICAgICAgICAgIHkgPSBsb25ZRG9tO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCF0aGlzLnZhbGlkYXRlRXh0ZW50Q29vcmRpbmF0ZShcIkxvblwiLCBsb24gfHwgeCkpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdGhpcy52YWxpZGF0ZUV4dGVudENvb3JkaW5hdGUoXCJMYXRcIiwgbGF0IHx8IHkpKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdW5pdCA9IHRoaXMuX2N1cnJlbnRQcm9qZWN0aW9uVW5pdHM7XG4gICAgICAgIHZhciBvTGF0TG9uID0gdGhpcy5fdW5wcm9qZWN0KHtcbiAgICAgICAgICAgIHggOiB0aGlzLl9jb252ZXJ0Q29vcmRpbmF0ZShsb24gIT09IG51bGwgPyBsb24gOiB4LCB1bml0KSxcbiAgICAgICAgICAgIHkgOiB0aGlzLl9jb252ZXJ0Q29vcmRpbmF0ZShsYXQgIT09IG51bGwgPyBsYXQgOiB5LCB1bml0KVxuICAgICAgICB9KTtcblxuICAgICAgICAvLyBGSVhNRSBodHRwczovL2dpdGh1Yi5jb20vTGVhZmxldC9MZWFmbGV0L2lzc3Vlcy85MjJcbiAgICAgICAgdmFyIG1hcCA9IHRoaXMuX21hcDtcbiA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A8IHRoaXMuX3Byb2plY3Rpb25TeXN0ZW1zLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5fcHJvamVjdGlvblN5c3RlbXNbaV0uY29kZSA9PT0gTnVtYmVyKHN5c3RlbUNvZGUpKSB7XG4gICAgICAgICAgICAgICAgdHlwZSA9IHRoaXMuX3Byb2plY3Rpb25TeXN0ZW1zW2ldLnR5cGU7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIXR5cGUpIHtcbiAgICAgICAgICAgIGxvZ2dlci5sb2coXCJzeXN0ZW0gbm90IGZvdW5kIGluIHByb2plY3Rpb24gc3lzdGVtcyBjb250YWluZXJcIik7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZSAhPT0gdGhpcy5fY3VycmVudFByb2plY3Rpb25UeXBlKSB7XG4gICAgICAgICAgICB0aGlzLl9zZXRUeXBlVW5pdHNQYW5lbCh0eXBlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIG9uIGVucmVnaXN0cmUgbGUgc3lzdGVtZSBjb3VycmFudFxuICAgICAgICB0aGlzLl9jdXJyZW50UHJvamVjdGlvblN5c3RlbXMgPSB0aGlzLl9wcm9qZWN0aW9uU3lzdGVtc1tOdW1iZXIoc3lzdGVtQ29kZSldO1xuXG4gICAgICAgIC8vIG9uIHNpbXVsZSB1biBkZXBsYWNlbWVudCBlbiBtb2RlIHRhY3RpbGUgcG91ciBtZXR0cmUgw6Agam91ciBsZXNcbiAgICAgICAgLy8gcmVzdWx0YXRzXG4gICAgICAgIGlmICghdGhpcy5faXNEZXNrdG9wKSB7XG4gICAgICAgICAgICB0aGlzLm9uTWFwTW92ZSgpO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSBldmVudCAnbW91c2VvdmV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AgICAgICAgICAgaWYgKHByb2ouZ2VvQkJveCkge1xuICAgICAgICAgICAgICAgIC8vIGJib3hlcyBpbnRlcnNlY3Rpb24gdGVzdFxuICAgICAgICAgICAgICAgIGlmIChtYXAuZ2V0Qm91bmRzKCkuX3NvdXRoV2VzdC5sbmcgPiBwcm9qLmdlb0JCb3gucmlnaHQgfHxcbiAgICAgICAgICAgICAgICAgICAgbWFwLmdldEJvdW5kcygpLl9zb3V0aFdlc3QubGF0ID4gcHJvai5nZW9CQm94LnRvcCB8fFxuICAgICAgICAgICAgICAgICAgICBtYXAuZ2V0Qm91bmRzKCkuX25vcnRoRWFzdC5sbmcgPCBwcm9qLmdlb0JCb3gubGVmdCB8fFxuICAgICAgICAgICAgICAgICAgICBtYXAuZ2V0Qm91bmRzKCkuX25vcnRoRWFzdC5sYXQgPCBwcm9qLmdlb0JCb3guYm90dG9tXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwcm9qID09PSB0aGlzLl9jdXJyZW50UHJvamVjdGlvblN5c3RlbXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJvcHRpb25cIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb24udmFsdWUgPSBwcm9qLmNvZGU7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb24udGV4dCA9IHByb2oubGFiZWwgfHwgajtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbi5zZXRBdHRyaWJ1dGUoXCJzZWxlY3RlZFwiLCBcInNlbGVjdGVkXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uLnNldEF0dHJpYnV0ZShcImRpc2FibGVkXCIsIFwiZGlzYWJsZWRcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHN5c3RlbUxpc3QuYXBwZW5kQ2hpbGQob3B0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsgLy8gZG8gbm90IGludGVyc2VjdFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG9wdGlvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJvcHRpb25cIik7XG4gICAgICAgICAgICBvcHRpb24udmFsdWUgPSBwcm9qLmNvZGU7XG4gICAgICAgICAgICBvcHRpb24udGV4dCA9IHByb2oubGFiZWwgfHwgajtcbiAgICAgICAgICAgIGlmIChwcm9qID09PSB0aGlzLl9jdXJyZW50UHJvamVjdGlvblN5c3RlbXMpIHtcbiAgICAgICAgICAgICAgICBvcHRpb24uc2V0QXR0cmlidXRlKFwic2VsZWN0ZWRcIiwgXCJzZWxlY3RlZFwiKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc3lzdGVtTGlzdC5hcHBlbmRDaGlsZChvcHRpb24pO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSBldmVudCAnY2hhbmdlJyBvbiAnR1Btb3VzZVBvc2l0aW9uUHJvamVjdGlvblVuaXRzJ1xuICAgICAqIHRhZyBzZWxlY3QgKGNmLiB0aGlzLl9jcmVhdGVNb3VzZVBvc2l0aW9uU2V0dGluZ3NFbGVtZW50KSxcbiAgICAgKiBhbmQgc2VsZWN0cyB0aGUgdW5pdHMgcHJvamVjdGlvbi5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBlIC0gSFRNTEVsZW1lbnRcbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgb25Nb3VzZVBvc2l0aW9uUHJvamVjdGlvblVuaXRzQ2hhbmdlIDogZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgbG9nZ2VyLmxvZyhcIm9uTW91c2VQb3NpdGlvblByb2plY3Rpb25Vbml0c0NoYW5nZ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FpbmVyLmNoZWNrZWQpIHtcbiAgICAgICAgICAgIHRoaXMuX3BpY3RvQ29udGFpbmVyLmNsaWNrKCk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgbWFwID0gdGhpcy5fbWFwO1xuICAgICAgICBpZiAoIW1hcCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5vbk1vdXNlTW92ZSh7XG4gICAgICAgICAgICBsYXRsbmcgOiBwb3NpdGlvblxuICAgICAgICB9KTtcblxuICAgICAgICBtYXAuZmx5VG8ocG9zaXRpb24sIHpvb20gfHwgMTAsIG9wdGlvbnMgfHwge30pO1xuICAgIH1cbn0pO1xuXG5leHBvcnQgZGVmYXVsdCBNb3VzZVBvc2l0aW9uO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/MousePosition.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Controls/ReverseGeocoding.js": +/*!**************************************************!*\ + !*** ./src/Leaflet/Controls/ReverseGeocoding.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var leaflet_draw__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! leaflet-draw */ \"./node_modules/leaflet-draw/dist/leaflet.draw-src.js\");\n/* harmony import */ var leaflet_draw__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(leaflet_draw__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Utils/IconDefault */ \"./src/Leaflet/Controls/Utils/IconDefault.js\");\n/* harmony import */ var _Common_Controls_ReverseGeocodingDOM__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Common/Controls/ReverseGeocodingDOM */ \"./src/Common/Controls/ReverseGeocodingDOM.js\");\n\n\n\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getLogger(\"reversegeocoding\");\n\n/**\n * @classdesc\n *\n * Leaflet Control Class to find locations by clicking on a map using reverse geocoding service of the Geoportal platform.\n *\n * Use {@link module :Controls.ReverseGeocode L.geoportalControl.ReverseGeocode()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.Control native class.\n *\n * @namespace\n * @alias L.geoportalControl.ReverseGeocode\n */\nvar ReverseGeocoding = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends L.geoportalControl.ReverseGeocode.prototype */{\n includes: _Common_Controls_ReverseGeocodingDOM__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n /**\n * options by default\n *\n * @private\n */\n options: {\n position: \"bottomleft\",\n collapsed: true,\n resources: [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"],\n delimitations: [\"Point\", \"Circle\", \"Extent\"],\n reverseGeocodeOptions: {}\n },\n /**\n * @constructor ReverseGeocode\n * @param {Object} options - ReverseGeocoding control options\n * @param {String} [options.apiKey] - API key for services call (reverse geocode service). The \"calcul\" key is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {String} [options.position] - position of component into the map, 'topleft' by default\n * @param {Boolean} [options.collapsed] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.\n * @param {Array} [options.resources] - resources for geocoding, by default : [\"StreetAddress\", \"PositionOfInterest\",\"CadastralParcel\"]\n * @param {Array} [options.delimitations] - delimitations for reverse geocoding, by default : [\"Point\", \"Circle\", \"Extent\"]\n * @param {Object} [options.reverseGeocodeOptions] - reverse geocode service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~ReverseGeocode Gp.Services.reverseGeocode()} to know all reverse geocode options.\n * @example\n * var reverse = L.geoportalControl.ReverseGeocode({\n * collapsed : false,\n * position : \"topright\",\n * resources : [\"StreetAddress\", \"PositionOfInterest\",\"CadastralParcel\"],\n * delimitations : [\"Point\", \"Circle\"],\n * reverseGeocodeOptions : {}\n * });\n * reverse.on(\"reverse:onclickresult\", function (e) {\n * console.log(e.data):\n * });\n * @private\n */\n initialize: function initialize(options) {\n // on merge les options avec celles par defaut\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(this.options, options);\n\n // check input options format (resources and delimitations arrays)\n this._checkInputOptions();\n\n /** uuid */\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__[\"default\"].generate();\n\n // Type de géocodage sélectionné (StreetAddress, PositionOfInterest, ...)\n this._currentGeocodingType = null;\n this._initGeocodingType();\n\n // Type de délimitation à utiliser pour la requête + pour sélection sur la containerDistance\n this._currentGeocodingDelimitation = null;\n this._initGeocodingDelimitation();\n\n // ################################################################## //\n // ################### Elements principaux du DOM ################### //\n\n // containers principaux\n this._showReverseGeocodingContainer = null;\n // header panel\n this._panelHeaderContainer = null;\n this._panelTitleContainer = null;\n this._returnPictoContainer = null;\n // form\n this._formContainer = null;\n // results\n this._resultsContainer = null;\n this._resultsListContainer = null;\n // waiting\n this._waitingContainer = null;\n\n // ###################################################################### //\n // ################### informations des points saisis ################### //\n\n // couche vectorielle dans laquelle seront saisis les points (features ci-dessus)\n this._inputFeaturesLayer = null;\n this._inputResultsLayer = null;\n this._lastIdLayer = 0;\n this._currentIdLayer = 0;\n // interaction avec la carte (de type \"Point\", \"Circle\" ou \"Polygon\")\n this._currentFeature = null;\n\n // #################################################################### //\n // ################### informations pour la requête ################### //\n\n // geometrie de recherche du géocodage inverse qui sera envoyée dans la requête\n this._requestGeom = null;\n\n // pour savoir si un calcul est en cours ou non\n this._waiting = false;\n // timer pour cacher la patience après un certain temps\n this._timer = null;\n\n // #################################################################### //\n // #################### informations des résultats #################### //\n\n this._reverseGeocodingLocations = [];\n },\n /**\n * this method is called by this.addTo(map) when the control is added on the map\n * and fills variable 'this._container = this.onAdd(map)',\n * and create events on map.\n *\n * @param {Object} map - the map\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n onAdd: function onAdd(map) {\n // initialisation du DOM du composant\n var container = this._container = this._initLayout();\n\n // deactivate of events that may interfere with the map\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container);\n if (map) {\n // lors de l'ajout à la map, on active la saisie du point,\n // mais seulement si le widget est ouvert\n if (!this.options.collapsed) {\n this._activateMapInteraction(map);\n }\n }\n return container;\n },\n /**\n * this method is called when the control is removed from the map\n * and removes events on map.\n *\n * @param {Object} map - the map\n *\n * @private\n */\n onRemove: function onRemove(map) {\n this._clearLocations();\n this._clearLocationsFeature(map);\n this._clearInputRequest();\n\n // on supprime l'éventuelle précédente interaction\n this._removeMapInteraction(map);\n },\n // ################################################################### //\n // ##################### init component ############################## //\n // ################################################################### //\n\n /**\n * this method is called by this.initialize()\n * and makes sure input options are correctly formated\n *\n * @private\n */\n _checkInputOptions: function _checkInputOptions() {\n var i;\n // on vérifie le tableau des resources\n if (this.options.resources) {\n var resources = this.options.resources;\n // on vérifie que la liste des ressources de geocodage est bien un tableau\n if (Array.isArray(resources)) {\n var resourcesList = [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\", \"Administratif\"];\n for (i = 0; i < resources.length; i++) {\n if (resourcesList.indexOf(resources[i]) === -1) {\n // si la resource n'est pas référencée, on l'enlève\n // resources.splice(i, 1);\n logger.log(\"[ReverseGeocoding] options.resources : \" + resources[i] + \" is not a resource for reverse geocode\");\n }\n }\n } else {\n logger.log(\"[ReverseGeocoding] 'options.resources' parameter should be an array\");\n resources = null;\n }\n }\n // et le tableau des délimitations\n if (this.options.delimitations) {\n var delimitations = this.options.delimitations;\n // on vérifie que la liste des delimitations est bien un tableau\n if (Array.isArray(delimitations)) {\n var delimitationsList = [\"Circle\", \"Point\", \"Extent\"];\n for (i = 0; i < delimitations.length; i++) {\n if (delimitationsList.indexOf(delimitations[i]) === -1) {\n // si la delimitations n'est pas référencée, on l'enlève\n // resources.splice(i, 1);\n logger.log(\"[ReverseGeocoding] options.delimitations : \" + delimitations[i] + \" is not a delimitation for reverse geocode\");\n }\n }\n } else {\n logger.log(\"[ReverseGeocoding] 'options.delimitations' parameter should be an array\");\n delimitations = null;\n }\n }\n },\n /**\n * this method is called by this.initialize() and initialize geocoding type (=resource)\n * (\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\")\n *\n * @private\n */\n _initGeocodingType: function _initGeocodingType() {\n // Type de géocodage selectionné\n this._currentGeocodingType = \"StreetAddress\"; // par defaut\n\n // par defaut\n var resources = this.options.resources;\n if (!resources || resources.length === 0) {\n this.options.resources = [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"];\n }\n\n // options utilisateur\n if (Array.isArray(resources) && resources.length) {\n // récupération du type par défaut\n if (resources[0] === \"StreetAddress\" || resources[0] === \"PositionOfInterest\" || resources[0] === \"CadastralParcel\") {\n this._currentGeocodingType = resources[0];\n }\n }\n\n // si l'utilisateur a spécifié au moins une ressource dans le service, on surcharge les options du widget\n var serviceOptions = this.options.reverseGeocodeOptions;\n if (serviceOptions.filterOptions && Array.isArray(serviceOptions.filterOptions.type) && serviceOptions.filterOptions.type.length !== 0) {\n this._currentGeocodingType = serviceOptions.filterOptions.type[0];\n }\n },\n /**\n * this method is called by this.initialize() and initialize geocoding delimitation\n * (\"Point\", \"Circle\", \"Extent\")\n *\n * @private\n */\n _initGeocodingDelimitation: function _initGeocodingDelimitation() {\n // Type de délimitation selectionné\n this._currentGeocodingDelimitation = \"Point\"; // par defaut\n\n // par defaut\n var delimitations = this.options.delimitations;\n if (!delimitations || delimitations.length === 0) {\n this.options.delimitations = [\"Point\", \"Circle\", \"Extent\"];\n }\n\n // options utilisateur\n if (Array.isArray(delimitations) && delimitations.length) {\n var d = delimitations[0].toLowerCase();\n if (d === \"point\" || d === \"circle\" || d === \"extent\") {\n this._currentGeocodingDelimitation = delimitations[0];\n }\n }\n },\n // ################################################################### //\n // ######################## methods handle dom ####################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd(map)\n * and initialize the container HTMLElement\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n _initLayout: function _initLayout() {\n // create main container\n var container = this._createMainContainerElement();\n\n // create show ReverseGeocoding element\n var inputShow = this._showReverseGeocodingContainer = this._createShowReverseGeocodingElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.options.collapsed) {\n inputShow.checked = true;\n }\n\n // create ReverseGeocoding picto\n var picto = this._createShowReverseGeocodingPictoElement();\n container.appendChild(picto);\n\n // panel\n var reverseGeocodingPanel = this._createReverseGeocodingPanelElement();\n\n // header\n var panelHeader = this._panelHeaderContainer = this._createReverseGeocodingPanelHeaderElement();\n // return picto (hidden at start)\n var returnPicto = this._returnPictoContainer = this._createReverseGeocodingPanelReturnPictoElement();\n panelHeader.appendChild(returnPicto);\n // pane title\n var panelTitle = this._panelTitleContainer = this._createReverseGeocodingPanelTitleElement();\n panelHeader.appendChild(panelTitle);\n // close picto\n var closeDiv = this._createReverseGeocodingPanelCloseElement();\n panelHeader.appendChild(closeDiv);\n reverseGeocodingPanel.appendChild(panelHeader);\n\n // form\n var reverseGeocodingForm = this._formContainer = this._createReverseGeocodingPanelFormElement();\n // choices element\n reverseGeocodingForm.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingTypeElement(this.options.resources));\n reverseGeocodingForm.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingDelimitationElement(this.options.delimitations));\n\n // submit (bouton \"Chercher\")\n var submit = this._createReverseGeocodingSubmitFormElement();\n reverseGeocodingForm.appendChild(submit);\n reverseGeocodingPanel.appendChild(reverseGeocodingForm);\n\n // waiting\n var waiting = this._waitingContainer = this._createReverseGeocodingWaitingElement();\n reverseGeocodingPanel.appendChild(waiting);\n\n // results (dans le panel)\n var resultsPanel = this._resultsContainer = this._createReverseGeocodingResultsPanelElement();\n var reverseGeocodingResultsList = this._resultsListContainer = this._createReverseGeocodingResultsListElement();\n resultsPanel.appendChild(reverseGeocodingResultsList);\n reverseGeocodingPanel.appendChild(resultsPanel);\n container.appendChild(reverseGeocodingPanel);\n logger.log(container);\n return container;\n },\n // ################################################################### //\n // ################### Map interactions management ################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd,\n * or by this.onShowReverseGeocodingClick,\n * and calls method corresponding to current delimitation, if widget is not collapsed.\n *\n * @param {Object} map - control map.\n * @private\n */\n _activateMapInteraction: function _activateMapInteraction(map) {\n logger.info(\"_activateMapInteraction()\");\n\n // Creation de la couche vectorielle sur laquelle on va dessiner\n if (this._inputFeaturesLayer === null) {\n this._inputFeaturesLayer = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.FeatureGroup();\n map.addLayer(this._inputFeaturesLayer);\n var self = this;\n /* evenement sur la carte lors d'une saisie,\n on y ajoute le layer, et on y stocke les coordonnées */\n map.on(\"draw:created\", function (e) {\n var layer = e.layer;\n var type = e.layerType;\n logger.trace(\"draw:created\");\n\n // TODO\n // comment mettre en place un icone dynamiquement ?\n // if (type === \"marker\") {}\n\n self._setFeaturePosition(layer, type);\n self._currentIdLayer = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.stamp(layer);\n self._setFeatureLayer(layer);\n });\n\n /* evenements */\n map.on(\"draw:drawstart\", function () {\n logger.trace(\"draw:drawstart\");\n self._removeFeatureLayer(self._lastIdLayer);\n self._lastIdLayer = self._currentIdLayer;\n });\n\n /* evenements */\n map.on(\"draw:drawstop\", function () {\n logger.trace(\"draw:drawstop\");\n });\n }\n\n // Création de l'interaction de dessin, selon le type de délimitation sélectionné\n var delimitation = this._currentGeocodingDelimitation.toLowerCase();\n switch (delimitation) {\n case \"point\":\n this._activatePointInteraction(map);\n break;\n case \"circle\":\n this._activateCircleInteraction(map);\n break;\n case \"extent\":\n this._activateBoxInteraction(map);\n break;\n default:\n break;\n }\n },\n /**\n * remove draw interaction from map (if exists)\n *\n * @param {Object} map - control map.\n * @private\n */\n _removeMapInteraction: function _removeMapInteraction(map) {\n if (!map) {\n return;\n }\n if (this._inputFeaturesLayer !== null) {\n map.off(\"draw:created\");\n map.off(\"draw:drawstart\");\n map.off(\"draw:drawstop\");\n map.removeLayer(this._inputFeaturesLayer);\n this._inputFeaturesLayer = null;\n }\n this._lastIdLayer = this._currentIdLayer = 0;\n\n // FIXME delete this._currentFeature ?\n if (this._currentFeature) {\n this._currentFeature.disable();\n }\n },\n /**\n * TODO this method is called by this._activateMapInteraction,\n * and creates map point drawing interaction.\n *\n * @param {Object} map - control map.\n * @private\n */\n _activatePointInteraction: function _activatePointInteraction(map) {\n logger.info(\"_activatePointInteraction()\");\n if (this._currentFeature) {\n this._currentFeature.disable();\n }\n\n // on modifie le tooltip du marker\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.drawLocal.draw.handlers.marker.tooltip.start = \"click map to place search point\";\n\n // TODO styles des icones\n var markerOptions = {\n // icon : par defaut...\n repeatMode: true\n };\n this._currentFeature = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Draw.Marker(map, markerOptions);\n this._currentFeature.enable();\n },\n /**\n * TODO this method is called by this._activateMapInteraction,\n * and creates map circle drawing interaction.\n *\n * @param {Object} map - control map.\n * @private\n */\n _activateCircleInteraction: function _activateCircleInteraction(map) {\n logger.info(\"_activateCircleInteraction()\");\n if (this._currentFeature) {\n this._currentFeature.disable();\n }\n var circleOptions = {\n repeatMode: true\n }; // TODO styles\n\n this._currentFeature = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Draw.Circle(map, circleOptions);\n this._currentFeature.enable();\n },\n /**\n * TODO this method is called by this._activateMapInteraction,\n * and creates map box drawing interaction.\n *\n * @param {Object} map - control map.\n * @private\n */\n _activateBoxInteraction: function _activateBoxInteraction(map) {\n logger.info(\"_activateBoxInteraction()\");\n if (this._currentFeature) {\n this._currentFeature.disable();\n }\n var rectangleOptions = {\n repeatMode: true\n }; // TODO styles\n\n this._currentFeature = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Draw.Rectangle(map, rectangleOptions);\n this._currentFeature.enable();\n },\n /**\n * set current position of feature\n *\n * @param {Object} layer - layer\n * @param {String} type - type\n *\n * @private\n */\n _setFeaturePosition: function _setFeaturePosition(layer, type) {\n // on transmet toujours des coordonnées au service en EPSG:4326\n var oLatLng = null;\n if (type === \"marker\") {\n oLatLng = layer.getLatLng();\n this._requestGeom = {\n type: \"Point\",\n coordinates: [oLatLng.lng, oLatLng.lat]\n };\n } else if (type === \"circle\") {\n oLatLng = layer.getLatLng();\n this._requestGeom = {\n type: \"Circle\",\n coordinates: [oLatLng.lng, oLatLng.lat],\n radius: layer.getRadius()\n };\n } else if (type === \"rectangle\") {\n oLatLng = layer.getBounds();\n this._requestGeom = {\n type: \"Polygon\",\n coordinates: [[[oLatLng.getNorthWest().lng, oLatLng.getNorthWest().lat], [oLatLng.getNorthEast().lng, oLatLng.getNorthEast().lat], [oLatLng.getSouthEast().lng, oLatLng.getSouthEast().lat], [oLatLng.getSouthWest().lng, oLatLng.getSouthWest().lat], [oLatLng.getNorthWest().lng, oLatLng.getNorthWest().lat]]]\n };\n } else {\n logger.warn(\"type geometric not defined !?\");\n }\n logger.log(oLatLng);\n },\n /**\n * set current layer of feature\n *\n * @param {Object} layer - layer\n *\n * @private\n */\n _setFeatureLayer: function _setFeatureLayer(layer) {\n if (!this._inputFeaturesLayer) {\n return;\n }\n this._inputFeaturesLayer.addLayer(layer);\n },\n /**\n * remove layer feature from group\n * @param {Integer} id - id\n *\n * @private\n */\n _removeFeatureLayer: function _removeFeatureLayer(id) {\n if (!this._inputFeaturesLayer) {\n return;\n }\n if (id === 0) {\n return;\n }\n if (!id) {\n this._inputFeaturesLayer.clearLayers();\n } else {\n this._inputFeaturesLayer.removeLayer(id);\n }\n },\n // ################################################################### //\n // ##################### Reverse Geocoding request ################### //\n // ################################################################### //\n\n /**\n * this methode is called by this.onReverseGeocodingSubmit method,\n * it generates and sends reverse geocode request, then displays results\n * @param {Object} settings - settings\n *\n * @private\n */\n _reverseGeocodingRequest: function _reverseGeocodingRequest(settings) {\n // retrait de l'interaction sur la map pendant l'attente (et l'affichage des résultats)\n var map = this._map;\n this._removeMapInteraction(map);\n\n // on construit les options pour la requête\n var options = {};\n // on surcharge avec les options utilisateur\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.reverseGeocodeOptions);\n // la recherche et les callbacks\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, settings);\n // options par defaut\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n apiKey: this.options.apiKey,\n // maximumResponses : 25, // on peut la surcharger !\n timeOut: 30000,\n protocol: \"XHR\"\n });\n\n // on récupère d'éventuels filtres\n if (this._requestGeom.type.toLowerCase() === \"circle\") {\n // FIXME : a confirmer !\n if (this._requestGeom.radius > 1000) {\n logger.log(\"INFO : initial circle radius (\" + this._requestGeom.radius + \") limited to 1000m.\");\n this._requestGeom.radius = 1000;\n }\n options.searchGeometry = this._requestGeom;\n } else if (this._requestGeom.type.toLowerCase() === \"polygon\") {\n options.searchGeometry = this._requestGeom;\n } else if (this._requestGeom.type.toLowerCase() === \"point\") {\n if (this._currentGeocodingType === \"StreetAddress\") {\n options.searchGeometry = {\n type: \"Circle\",\n radius: 50,\n coordinates: this._requestGeom.coordinates\n };\n options.maximumResponses = 1;\n } else {\n options.searchGeometry = this._requestGeom;\n }\n }\n logger.log(\"reverseGeocode request options : \", options);\n\n // affichage d'une patience pendant l'attente\n this._displayWaitingContainer();\n\n // envoi de la requête\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Services.reverseGeocode(options);\n },\n // ################################################################### //\n // ############################# results list ######################## //\n // ################################################################### //\n\n /**\n * this method is called by this._reverseGeocodingRequest() (in case of reverse geocode success)\n * and display results : in both container list and map\n *\n * @param {Array} locations - array of geocoded locations (reverse geocode results)\n * @private\n */\n _displayGeocodedLocations: function _displayGeocodedLocations(locations) {\n var map = this._map;\n\n // 1. on vide les résultats précédents\n this._clearLocations();\n this._clearLocationsFeature(map);\n this._reverseGeocodingLocations = locations;\n if (!locations || locations.length === 0) {\n this._clearInputRequest(); // FIXME pas sûr que se soit le bon endroit...\n return;\n }\n\n // 2. cache de la patience et du formulaire\n this._formContainer.className = \"GPreverseGeocodingComponentHidden\";\n this._hideWaitingContainer();\n\n // affichage de la div des résultats (et changement du titre)\n this._panelTitleContainer.innerHTML = \"Résultats de la recherche\";\n this._returnPictoContainer.className = \"\";\n this._resultsContainer.className = \"GPpanel\";\n\n // 3. ajout de la liste des résultats dans le container des resultats\n this._fillGeocodedLocationListContainer(locations);\n\n // 4. affichage des résultats sur la carte (+ zoom ?)\n this._displayGeocodedLocationsOnMap(locations);\n\n // on zoom sur l'emprise des markers\n map.fitBounds(this._inputResultsLayer.getBounds());\n },\n /**\n * this method is called by this._displayGeocodedLocations()\n * and fills the container with results list\n *\n * @param {Array} locations - array of geocoded locations (reverse geocode results)\n * @private\n */\n _fillGeocodedLocationListContainer: function _fillGeocodedLocationListContainer(locations) {\n // ajout de la liste des résultats dans le container des resultats\n for (var i = 0; i < locations.length; i++) {\n var location = locations[i];\n logger.log(location);\n // on récupère la description à afficher dans la liste\n var locationDescription = this._fillGeocodedLocationDescription(location);\n // on ajoute chaque résutat à la liste\n if (locationDescription.length !== 0) {\n this._createReverseGeocodingResultElement(locationDescription, i);\n }\n }\n },\n /**\n * this method is called by this._fillGeocodedLocationListContainer()\n * and fills location description (String), depending on matchType\n *\n * @param {Object} location - geocoded location (from reverse geocode results)\n * @returns {String} locationDescription - geocoded location description to be displayed\n * @private\n */\n _fillGeocodedLocationDescription: function _fillGeocodedLocationDescription(location) {\n if (!location || !location.placeAttributes) {\n return;\n }\n var attr = location.placeAttributes;\n var locationDescription = \"\";\n // on sélectionne les infos à afficher selon le type\n switch (location.type) {\n case \"StreetAddress\":\n if (attr.street) {\n locationDescription += attr.housenumber ? attr.housenumber + \" \" : \"\";\n locationDescription += attr.street + \", \";\n }\n locationDescription += attr.postcode + \" \" + attr.city;\n break;\n case \"PositionOfInterest\":\n locationDescription += attr.toponym;\n if (attr.postcode.length === 1) {\n locationDescription += \", \" + attr.postcode[0];\n }\n locationDescription += \" (\" + attr.category.join(\",\") + \")\";\n break;\n case \"CadastralParcel\":\n locationDescription += attr.id;\n locationDescription += attr.city ? \" (\" + attr.city + \")\" : \"\";\n break;\n default:\n locationDescription += attr.city ? attr.city : \"\";\n break;\n }\n ;\n return locationDescription;\n },\n // ################################################################### //\n // ######################## map results (markers) #################### //\n // ################################################################### //\n\n /**\n * this method is called by this._displayGeocodedLocations()\n * and display locations in map (markers)\n *\n * @param {Object} locations - geocoded locations (reverse geocode result)\n * @private\n */\n _displayGeocodedLocationsOnMap: function _displayGeocodedLocationsOnMap(locations) {\n var map = this._map;\n var self = this;\n\n // function set style Highlight for results\n function _setHighLight(e) {\n var layer = e.target;\n layer.setIcon(new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"red\"));\n var div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"ReverseGeocodedLocation_\" + layer.options.id + \"-\" + self._uid);\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.addClass(div, \"GPreverseGeocodedLocationHighlight\");\n div.scrollIntoView(false);\n }\n\n // function reset style Highlight for results\n function _resetHighLight(e) {\n var layer = e.target;\n layer.setIcon(new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"green\"));\n var div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"ReverseGeocodedLocation_\" + layer.options.id + \"-\" + self._uid);\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.removeClass(div, \"GPreverseGeocodedLocationHighlight\");\n }\n\n // création de la couche où seront ajoutés les résultats\n this._inputResultsLayer = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.FeatureGroup();\n map.addLayer(this._inputResultsLayer);\n\n // ajout de chaque résultat à la couche (marker)\n for (var i = 0; i < locations.length; i++) {\n var location = locations[i];\n if (!location) {\n continue;\n }\n var options = {\n id: i,\n icon: new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"green\"),\n riseOnHover: true,\n draggable: false,\n clickable: true,\n zIndexOffset: 1000,\n data: location\n };\n var _marker = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.marker(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(location.position), options);\n\n // creation du contenu de la popup\n var popupContent = \"
      \";\n var attributes = location.placeAttributes;\n for (var attr in attributes) {\n if (attributes.hasOwnProperty(attr)) {\n if (attr !== \"trueGeometry\" && attr !== \"extraFields\" && attr !== \"houseNumberInfos\" && attr !== \"_count\") {\n popupContent += \"
    • \";\n popupContent += \"\" + attr.toUpperCase() + \" : \";\n popupContent += attributes[attr];\n popupContent += \"
    • \";\n }\n }\n }\n popupContent += \"
    \";\n _marker.bindPopup(popupContent);\n\n /** evenement mouseover sur le marker */\n _marker.on(\"mouseover\", _setHighLight);\n\n /** evenement mouseout sur le marker */\n _marker.on(\"mouseout\", _resetHighLight);\n _marker.on(\"click\", function (e) {\n /**\n * event triggered when an element of the results is clicked for geocoding\n *\n * @event reverse:onclickresult\n */\n self.fire(\"reverse:onclickresult\", {\n data: e.target.options.data\n });\n });\n this._inputResultsLayer.addLayer(_marker);\n }\n },\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on 'GPshowReverseGeocodingPicto' tag label\n * (cf. ReverseGeocodingDOM._createShowReverseGeocodingPictoElement), and it cleans the component\n * when it's closed.\n *\n * @private\n */\n onShowReverseGeocodingClick: function onShowReverseGeocodingClick() {\n var map = this._map;\n\n // interactions declenchées à l'ouverture/fermeture du panneau\n if (this._showReverseGeocodingContainer.checked) {\n this._removeMapInteraction(map);\n } else {\n if (!this._waiting && !this._reverseGeocodingLocations.length) {\n this._activateMapInteraction(map);\n }\n }\n },\n /**\n * this method is called by event 'change' on 'GPreverseGeocodingCode' tag select\n * (cf. ReverseGeocodingDOM._createReverseGeocodingFormModeChoiceGeocodingTypeElement).\n * this value is saved as a parameter for reverseGeocode service.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n onReverseGeocodingTypeChange: function onReverseGeocodingTypeChange(e) {\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n if (!value) {\n return;\n }\n logger.log(value);\n this._currentGeocodingType = value;\n },\n /**\n * this method is called by event 'change' on 'GPreverseGeocodingCode' tag select\n * (cf. ReverseGeocodingDOM._createReverseGeocodingFormModeChoiceGeocodingDelimitationElement).\n * this value is saved as a parameter for reverseGeocode service.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n onReverseGeocodingDelimitationChange: function onReverseGeocodingDelimitationChange(e) {\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n if (!value) {\n return;\n }\n logger.log(value);\n this._currentGeocodingDelimitation = value;\n\n // on supprime l'interaction précédente,\n // ainsi que les géométries et valeurs stockées (filtres, position)\n this._clearInputRequest();\n\n // on met à jour l'interaction de la map en fonction de la nouvelle délimitation\n var map = this._map;\n\n // on supprime l'éventuelle précédente interaction\n this._removeMapInteraction(map);\n // on crée une nouvelle interaction\n this._activateMapInteraction(map);\n },\n /**\n * TODO this method is called by event 'click' on 'GPreverseGeocodingReturnPicto' div\n * (cf. ReverseGeocodingDOM._createReverseGeocodingPanelReturnPictoElement),\n * and clear geocoded location (from both list container and map)\n *\n * @private\n */\n onGPreverseGeocodingReturnPictoClick: function onGPreverseGeocodingReturnPictoClick() {\n var map = this._map;\n\n // suppression des résultats précédents\n this._clearLocations();\n this._clearLocationsFeature(map);\n\n // on efface les points qui ont pu être saisis précédemment\n this._clearInputRequest();\n\n // et on réactive l'interaction sur la map\n this._activateMapInteraction(map);\n },\n /**\n * TODO this methode is called by event 'submit' on reverseGeocoding form ('GPreverseGeocodingForm')\n * (cf. ReverseGeocodingDOM._createReverseGeocodingPanelFormElement),\n * it checks reverse geocode mandatory parameters,\n * then call this._reverseGeocodingRequest() to generate and send request\n *\n * @private\n */\n onReverseGeocodingSubmit: function onReverseGeocodingSubmit() {\n // le paramètre position est obligatoire\n if (!this._requestGeom) {\n logger.log(\"missing search geometry\");\n return;\n }\n var map = this._map;\n var self = this;\n this._reverseGeocodingRequest({\n index: self._currentGeocodingType,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results) {\n var locations = results.locations;\n self._displayGeocodedLocations(locations);\n self._hideWaitingContainer();\n\n // et on réactive l'interaction sur la map\n if (locations.length === 0) self._activateMapInteraction(map);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n self._hideWaitingContainer();\n\n // suppression d'éventuels résultats précédents\n self._clearLocations();\n self._clearLocationsFeature(map);\n\n // on efface les points qui ont été saisis précédemment\n self._clearInputRequest();\n\n // et on réactive l'interaction sur la map\n self._activateMapInteraction(map);\n logger.log(error.message);\n }\n });\n },\n /**\n * TODO this method is called by event 'click' on 'ReverseGeocodedLocation_' div\n * (cf. ReverseGeocodingDOM._createReverseGeocodingResultElement),\n * and zoom to location ?\n * TODO\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n onReverseGeocodingResultClick: function onReverseGeocodingResultClick(e) {\n // récupération de l'id du résultat survolé\n var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__[\"default\"].index(e.target.id);\n if (!this._inputResultsLayer) {\n return;\n }\n this._inputResultsLayer.eachLayer(function (layer) {\n if (layer.options.id === parseInt(idx, 10)) {\n layer.fire(\"click\");\n }\n });\n },\n /**\n * TODO this method is called by event 'mouseover' on 'ReverseGeocodedLocation_' div\n * (cf. ReverseGeocodingDOM._createReverseGeocodingResultElement),\n * and changes style of matching marker on map (selected)\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n onReverseGeocodingResultMouseOver: function onReverseGeocodingResultMouseOver(e) {\n // récupération de l'id du résultat survolé\n var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__[\"default\"].index(e.target.id);\n\n // on passe le texte en gras\n if (e.target.classList) {\n e.target.classList.add(\"GPreverseGeocodedLocationHighlight\");\n }\n if (!this._inputResultsLayer) {\n return;\n }\n this._inputResultsLayer.eachLayer(function (layer) {\n if (layer.options.id === parseInt(idx, 10)) {\n layer.fire(\"mouseover\");\n }\n });\n },\n /**\n * TODO this method is called by event 'mouseout' on 'ReverseGeocodedLocation_' div\n * (cf. ReverseGeocodingDOM._createReverseGeocodingResultElement),\n * and changes style of matching marker on map (default)\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n onReverseGeocodingResultMouseOut: function onReverseGeocodingResultMouseOut(e) {\n // récupération de l'id du résultat survolé\n var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__[\"default\"].index(e.target.id);\n\n // on repasse le texte en style normal\n if (e.target.classList) {\n e.target.classList.remove(\"GPreverseGeocodedLocationHighlight\");\n }\n if (!this._inputResultsLayer) {\n return;\n }\n this._inputResultsLayer.eachLayer(function (layer) {\n if (layer.options.id === parseInt(idx, 10)) {\n layer.fire(\"mouseout\");\n }\n });\n },\n // ################################################################### //\n // ################################ clean ############################ //\n // ################################################################### //\n\n /**\n * TODO this method clears previous location results\n *\n * @private\n */\n _clearLocations: function _clearLocations() {\n this._reverseGeocodingLocations = [];\n // on vide le container avec la liste des résultats\n if (this._resultsListContainer) {\n while (this._resultsListContainer.firstChild) {\n this._resultsListContainer.removeChild(this._resultsListContainer.firstChild);\n }\n }\n },\n /**\n * TODO this method clears previous location results marker\n * @param {Object} map - the map\n *\n * @private\n */\n _clearLocationsFeature: function _clearLocationsFeature(map) {\n // suppression des anciens resultats\n if (this._inputResultsLayer !== null) {\n map.removeLayer(this._inputResultsLayer);\n this._inputResultsLayer = null;\n }\n },\n /**\n * TODO this method clears previous input features (features, position and filters)\n *\n * @private\n */\n _clearInputRequest: function _clearInputRequest() {\n // on supprime les valeurs stockées (filtres, position)\n this._requestPosition = null;\n this._requestCircleFilter = null;\n this._requestBboxFilter = null;\n },\n // ################################################################### //\n // ############################ Patience ############################# //\n // ################################################################### //\n\n /**\n * this method displays waiting container and sets a timeout\n *\n * @private\n */\n _displayWaitingContainer: function _displayWaitingContainer() {\n this._waitingContainer.className = \"GPreverseGeocodingCalcWaitingContainerVisible\";\n this._waiting = true;\n\n // mise en place d'un timeout pour réinitialiser le panel (cacher la patience)\n // si on est toujours en attente (si la requête est bloquée par exemple)\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n var context = this;\n this._timer = setTimeout(function () {\n if (context._waiting === true) {\n context._hideWaitingContainer();\n } else {\n if (context._timer) {\n clearTimeout(context._timer);\n }\n }\n }, 16000);\n },\n /**\n * this method hides waiting container and clears timeout\n *\n * @private\n */\n _hideWaitingContainer: function _hideWaitingContainer() {\n if (this._waiting) {\n this._waitingContainer.className = \"GPreverseGeocodingCalcWaitingContainerHidden\";\n this._waiting = false;\n clearTimeout(this._timer);\n this._timer = null;\n }\n }\n});\n\n/** mix in L.Evented into control */\nleaflet__WEBPACK_IMPORTED_MODULE_1___default.a.extend(ReverseGeocoding.prototype, leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Evented.prototype);\n/* harmony default export */ __webpack_exports__[\"default\"] = (ReverseGeocoding);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL1JldmVyc2VHZW9jb2RpbmcuanM/NDY3ZSJdLCJuYW1lcyI6WyJsb2dnZXIiLCJMb2dnZXIiLCJnZXRMb2dnZXIiLCJSZXZlcnNlR2VvY29kaW5nIiwiTCIsIkNvbnRyb2wiLCJleHRlbmQiLCJpbmNsdWRlcyIsIlJldmVyc2VHZW9jb2RpbmdET00iLCJvcHRpb25zIiwicG9zaXRpb24iLCJjb2xsYXBzZWQiLCJyZXNvdXJjZXMiLCJkZWxpbWl0YXRpb25zIiwicmV2ZXJzZUdlb2NvZGVPcHRpb25zIiwiaW5pdGlhbGl6ZSIsIlV0aWwiLCJfY2hlY2tJbnB1dE9wdGlvbnMiLCJfdWlkIiwiSUQiLCJnZW5lcmF0ZSIsIl9jdXJyZW50R2VvY29kaW5nVHlwZSIsIl9pbml0R2VvY29kaW5nVHlwZSIsIl9jdXJyZW50R2VvY29kaW5nRGVsaW1pdGF0aW9uIiwiX2luaXRHZW9jb2RpbmdEZWxpbWl0YXRpb24iLCJfc2hvd1JldmVyc2VHZW9jb2RpbmdDb250YWluZXIiLCJfcGFuZWxIZWFkZXJDb250YWluZXIiLCJfcGFuZWxUaXRsZUNvbnRhaW5lciIsIl9yZXR1cm5QaWN0b0NvbnRhaW5lciIsIl9mb3JtQ29udGFpbmVyIiwiX3Jlc3VsdHNDb250YWluZXIiLCJfcmVzdWx0c0xpc3RDb250YWluZXIiLCJfd2FpdGluZ0NvbnRhaW5lciIsIl9pbnB1dEZlYXR1cmVzTGF5ZXIiLCJfaW5wdXRSZXN1b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lc291cmNlc1tpXSkgPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzaSBsYSByZXNvdXJjZSBuJ2VzdCBwYXMgcsOpZsOpcmVuY8OpZSwgb24gbCdlbmzDqHZlXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyByZXNvdXJjZXMuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIltSZXZlcnNlR2VvY29kaW5nXSBvcHRpb25zLnJlc291cmNlcyA6IFwiICsgcmVzb3VyY2VzW2ldICsgXCIgaXMgbm90IGEgcmVzb3VyY2UgZm9yIHJldmVyc2UgZ2VvY29kZVwiKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIltSZXZlcnNlR2VvY29kaW5nXSAnb3B0aW9ucy5yZXNvdXJjZXMnIHBhcmFtZXRlciBzaG91bGQgYmUgYW4gYXJyYXlcIik7XG4gICAgICAgICAgICAgICAgcmVzb3VyY2VzID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyBldCBsZSB0YWJsZWF1IGRlcyBkw6lsaW1pdGF0aW9uc1xuICAgICAgICBpZiAodGhpcy5vcHRpb25zLmRlbGltaXRhdGlvbnMpIHtcbiAgICAgICAgICAgIHZhciBkZWxpbWl0YXRpb25zID0gdGhpcy5vcHRpb25zLmRlbGltaXRhdGlvbnM7XG4gICAgICAgICAgICAvLyBvbiB2w6lyaWZpZSBxdWUgbGEgbGlzdGUgZGVzIGRlbGltaXRhdGlvbnMgZXN0IGJpZW4gdW4gdGFibGVhdVxuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoZGVsaW1pdGF0aW9ucykpIHtcbiAgICAgICAgICAgICAgICB2YXIgZGVsaW1pdGF0aW9uc0xpc3QgPSBbXCJDaX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0ZWRcIik7XG5cbiAgICAgICAgICAgICAgICAvLyBUT0RPXG4gICAgICAgICAgICAgICAgLy8gY29tbWVudCBtZXR0cmUgZW4gcGxhY2UgdW4gaWNvbmUgZHluYW1pcXVlbWVudCA/XG4gICAgICAgICAgICAgICAgLy8gaWYgKHR5cGUgPT09IFwibWFya2VyXCIpIHt9XG5cbiAgICAgICAgICAgICAgICBzZWxmLl9zZXRGZWF0dXJlUG9zaXRpb24obGF5ZXIsIHR5cGUpO1xuXG4gICAgICAgICAgICAgICAgc2VsZi5fY3VycmVudElkTGF5ZXIgPSBMLlV0aWwuc3RhbXAobGF5ZXIpO1xuICAgICAgICAgICAgICAgIHNlbGYuX3NldEZlYXR1cmVMYXllcihsYXllcik7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgLyogZXZlbmVtZW50cyAqL1xuICAgICAgICAgICAgbWFwLm9uKFwiZHJhdzpkcmF3c3RhcnRcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGxvZ2dlci50cmFjZShcImRyYXc6ZHJhd3N0YXJ0XCIpO1xuICAgICAgICAgICAgICAgIHNlbGYuX3JlbW92ZUZlYXR1cmVMYXllcihzZWxmLl9sYXN0SWRMYXllcik7XG4gICAgICAgICAgICAgICAgc2VsZi5fbGFzdElkTGF5ZXIgPSBzZWxmLl9jdXJyZW50SWRMYXllcjtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAvKiBldmVuZW1lbnRzICovXG4gICAgICAgICAgICBtYXAub24oXCJkcmF3OmRyYXdzdG9wXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJkcmF3OmRyYXdzdG9wXCIpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDcsOpYXRpb24gZGUgbCdpbnRlcmFjdGlvbiBkZSBkZXNzaW4sIHNlbG9uIGxlIHR5cGUgZGUgZMOpbGltaXRhdGlvbiBzw6lsZWN0aW9ubsOpXG4gICAgICAgIHZhciBkZWxpbWl0YXRpb24gPSB0aGlzLl9jdXJyZW50R2VvY29kaW5nRGVsaW1pdGF0aW9uLnRvTG93ZXJDYXNlKCk7XG5cbiAgICAgICAgc3dpdGNoIChkZWxpbWl0YXRpb24pIHtcbiAgICAgICAgICAgIGNhc2UgXCJwb2ludFwiOlxuICAgICAgICAgICAgICAgIHRoaXMuX2FjdGl2YXRlUG9pbnRJbnRlcmFjdGlvbihtYXApO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImNpcmNsZVwiOlxuICAgICAgICAgICAgICAgIHRoaXMuX2FjdGl2YXRlQ2lyY2xlSW50ZXJhY3Rpb24obWFwKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJleHRlbnRcIjpcbiAgICAgICAgICAgICAgICB0aGlzLl9hY3RpdmF0ZUJveEludGVyYWN0aW9uKG1hcCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0IDpcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiByZW1vdmUgZHJhdyBpbnRlcmFjdGlvbiBmcm9tIG1hcCAoaWYgZXhpc3RzKVxuICAgICAqXG4gICAgICogQHBhcmFtIHtPYmplY3R9IG1hcCAtIGNvbnRyb2wgbWFwLlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgX3JlbW92ZU1hcEludGVyYWN0aW9uIDogZnVuY3Rpb24gKG1hcCkge1xuICAgICAgICBpZiAoIW1hcCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuX2lucHV0RmVhdHVyZXNMYXllciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgbWFwLm9mZihcImRyYXc6Y3JlYXRlZFwiKTtcbiAgICAgIC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ogc2V0IGN1cnJlbnQgcG9zaXRpb24gb2YgZmVhdHVyZVxuICAgICAqXG4gICAgICogQHBhcmFtIHtPYmplY3R9IGxheWVyIC0gbGF5ZXJcbiAgICAgKiBAcGFyYW0ge1N0cmluZ30gdHlwZSAtIHR5cGVcbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgX3NldEZlYXR1cmVQb3NpdGlvbiA6IGZ1bmN0aW9uIChsYXllciwgdHlwZSkge1xuICAgICAgICAvLyBvbiB0cmFuc21ldCB0b3Vqb3VycyBkZXMgY29vcmRvbm7DqWVzIGF1IHNlcnZpY2UgZW4gRVBTRzo0MzI2XG4gICAgICAgIHZhciBvTGF0TG5nID0gbnVsbDtcbiAgICAgICAgaWYgKHR5cGUgPT09IFwibWFya2VyXCIpIHtcbiAgICAgICAgICAgIG9MYXRMbmcgPSBsYXllci5nZXRMYXRMbmcoKTtcbiAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RHZW9tID0ge1xuICAgICAgICAgICAgICAgIHR5cGUgOiBcIlBvaW50XCIsXG4gICAgICAgICAgICAgICAgY29vcmRpbmF0ZXMgOiBbb0xhdExuZy5sbmcsIG9MYXRMbmcubGF0XVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfSBlbHNlIGlmICh0eXBlID09PSBcImNpcmNsZVwiKSB7XG4gICAgICAgICAgICBvTGF0TG5nID0gbGF5ZXIuZ2V0TGF0TG5nKCk7XG4gICAgICAgICAgICB0aGlzLl9yZXF1ZXN0R2VvbSA9IHtcbiAgICAgICAgICAgICAgICB0eXBlIDogXCJDaXJjbGVcIixcbiAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA6IFtvTGF0TG5nLmxuZywgb0xhdExuZy5sYXRdLFxuICAgICAgICAgICAgICAgIHJhZGl1cyA6IGxheWVyLmdldFJhZGl1cygpXG4gICAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2UgaWYgKHR5cGUgPT09IFwicmVjdGFuZ2xlXCIpIHtcbiAgICAgICAgICAgIG9MYXRMbmcgPSBsYXllci5nZXRCb3VuZHMoKTtcbiAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RHZW9tID0ge1xuICAgICAgICAgICAgICAgIHR5cGUgOiBcIlBvbHlnb25cIixcbiAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA6IFtbXG4gICAgICAgICAgICAgICAgICAgIFtvTGF0TG5nLmdldE5vcnRoV2VzdCgpLmxuZywgb0xhdExuZy5nZXROb3J0aFdlc3QoKS5sYXRdLFxuICAgICAgICAgICAgICAgICAgICBbb0xhdExuZy5nZXROb3J0aEVhc3QoKS5sbmcsIG9MYXRMbmcuZ2V0Tm9ydGhFYXN0KCkubGF0XSxcbiAgICAgICAgICAgICAgICAgICAgW29MYXRMbmcuZ2V0U291dGhFYXN0KCkubG5nLCBvTGF0TG5nLmdldFNvdXRoRWFzdCgpLmxhdF0sXG4gICAgICAgICAgICAgICAgICAgIFtvTGF0TG5nLmdldFNvdXRoV2VzdCgpLmxuZywgb0xhdExuZy5nZXRTb3V0aFdlc3QoKS5sYXRdLFxuICAgICAgICAgICAgICAgICAgICBbb0xhdExuZy5nZXROb3J0aFdlc3QoKS5sbmcsIG9MYXRMbmcuZ2V0Tm9ydGhXZXN0KCkubGF0XVxuICAgICAgICAgICAgICAgIF1dXG4gICAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbG9nZ2VyLndhcm4oXCJ0eXBlIGdlb21ldHJpYyBub3QgZGVmaW5lZCAhP1wiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGxvZ2dlci5sb2cob0xhdExuZyk7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHNldCBjdXJyZW50IGxheWVyIG9mIGZlYXR1cmVcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBsYXllciAtIGxheWVyXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIF9zZXRGZWF0dX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0eXBlXG4gICAgICAgIHN3aXRjaCAobG9jYXRpb24udHlwZSkge1xuICAgICAgICAgICAgY2FzZSBcIlN0cmVldEFkZHJlc3NcIjpcbiAgICAgICAgICAgICAgICBpZiAoYXR0ci5zdHJlZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgbG9jYXRpb25EZXNjcmlwdGlvbiArPSBhdHRyLmhvdXNlbnVtYmVyID8gYXR0ci5ob3VzZW51bWJlciArIFwiIFwiIDogXCJcIjtcbiAgICAgICAgICAgICAgICAgICAgbG9jYXRpb25EZXNjcmlwdGlvbiArPSBhdHRyLnN0cmVldCArIFwiLCBcIjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbG9jYXRpb25EZXNjcmlwdGlvbiArPSBhdHRyLnBvc3Rjb2RlICsgXCIgXCIgKyBhdHRyLmNpdHk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgXCJQb3NpdGlvbk9mSW50ZXJlc3RcIjpcbiAgICAgICAgICAgICAgICBsb2NhdGlvbkRlc2NyaXB0aW9uICs9IGF0dHIudG9wb255bTtcbiAgICAgICAgICAgICAgICBpZiAoYXR0ci5wb3N0Y29kZS5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgbG9jYXRpb25EZXNjcmlwdGlvbiArPSBcIiwgXCIgKyBhdHRyLnBvc3Rjb2RlWzBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsb2NhdGlvbkRlc2NyaXB0aW9uICs9IFwiIChcIiArIGF0dHIuY2F0ZWdvcnkuam9pbihcIixcIikgKyBcIilcIjtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBcIkNhZGFzdHJhbFBhcmNlbFwiOlxuICAgICAgICAgICAgICAgIGxvY2F0aW9uRGVzY3JpcHRpb24gKz0gYXR0ci5pZDtcbiAgICAgICAgICAgICAgICBsb2NhdGlvbkRlc2Nya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ICAgICAgIH1cblxuICAgICAgICAvLyBjcsOpYXRpb24gZGUgbGEgY291Y2hlIG/DuSBzZXJvbnQgYWpvdXTDqXMgbGVzIHLDqXN1bHRhdHNcbiAgICAgICAgdGhpcy5faW5wdXRSZXN1bHRzTGF5ZXIgPSBuZXcgTC5GZWF0dXJlR3JvdXAoKTtcbiAgICAgICAgbWFwLmFkZExheWVyKHRoaXMuX2lucHV0UmVzdWx0c0xheWVyKTtcblxuICAgICAgICAvLyBham91dCBkZSBjaGFxdWUgcsOpc3VsdGF0IMOgIGxhIGNvdWNoZSAobWFya2VyKVxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxvY2F0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGxvY2F0aW9uID0gbG9jYXRpb25zW2ldO1xuXG4gICAgICAgICAgICBpZiAoIWxvY2F0aW9uKSB7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBvcHRpb25zID0ge1xuICAgICAgICAgICAgICAgIGlkIDogaSxcbiAgICAgICAgICAgICAgICBpY29uIDogbmV3IEljb25EZWZhdWx0KFwiZ3JlZW5cIiksXG4gICAgICAgICAgICAgICAgcmlzZU9uSG92ZXIgOiB0cnVlLFxuICAgICAgICAgICAgICAgIGRyYWdnYWJsZSA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIGNsaWNrYWJsZSA6IHRydWUsXG4gICAgICAgICAgICAgICAgekluZGV4T2Zmc2V0IDogMTAwMCxcbiAgICAgICAgICAgICAgICBkYXRhIDogbG9jYXRpb25cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHZhciBfbWFya2VyID0gTC5tYXJrZXIoTC5sYXRMbmcobG9jYXRpb24ucG9zaXRpb24pLCBvcHRpb25zKTtcblxuICAgICAgICAgICAgLy8gY3JlYXRpb24gZHUgY29udGVudSBkZSBsYSBwb3B1cFxuICAgICAgICAgICAgdmFyIHBvcHVwQ29udGVudCA9IFwiPHVsPlwiO1xuICAgICAgICAgICAgdmFyIGF0dHJpYnV0ZXMgPSBsb2NhdGlvbi5wbGFjZUF0dHJpYnV0ZXM7XG4gICAgICAgICAgICBmb3IgKHZhciBhdHRyIGluIGF0dHJpYnV0ZXMpIHtcbiAgICAgICAgICAgICAgICBpZiAoYXR0cmlidXRlcy5oYXNPd25Qcm9wZXJ0eShhdHRyKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoYXR0ciAhPT0gXCJ0cnVlR2VvbWV0cnlcIiAmJiBhdHRyICE9PSBcImV4dHJhRmllbGRzXCIgJiYgYXR0ciAhPT0gXCJob3VzZU51bWJlckluZm9zXCIgJiYgYXR0ciAhPT0gXCJfY291bnRcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcG9wdXBDb250ZW50ICs9IFwiPGxpPlwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgcG9wdXBDb250ZW50ICs9IFwiPHNwYW4gY2xhc3M9XFxcImdwLWF0dG5hbWUtb3RoZXJzLXNwYW5cXFwiPlwiICsgYXR0ci50b1VwcGVyQ2FzZSgpICsgXCIgOiA8L3NwYW4+XCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBwb3B1cENvbnRlbnQgKz0gYXR0cmlidXRlc1thdHRyXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvcHVwQ29udGVudCArPSBcIiA8L2xpPlwiO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcG9wdXBDb250ZW50ICs9IFwiIDwvdWw+XCI7XG5cbiAgICAgICAgICAgIF9tYXJrZXIuYmluZFBvcHVwKHBvcHVwQ29udGVudCk7XG5cbiAgICAgICAgICAgIC8qKiBldmVuZW1lbnQgbW91c2VvdmVyIHN1ciBsZSBtYXJrZXIgKi9cbiAgICAgICAgICAgIF9tYXJrZXIub24oXCJtb3VzZW92ZXJcIiwgX3NldEhpZ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fdGltZXIgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmIChjb250ZXh0Ll93YWl0aW5nID09PSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5faGlkZVdhaXRpbmdDb250YWluZXIoKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbnRleHQuX3RpbWVyKSB7XG4gICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChjb250ZXh0Ll90aW1lcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LCAxNjAwMCk7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGhpZGVzIHdhaXRpbmcgY29udGFpbmVyIGFuZCBjbGVhcnMgdGltZW91dFxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBfaGlkZVdhaXRpbmdDb250YWluZXIgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICh0aGlzLl93YWl0aW5nKSB7XG4gICAgICAgICAgICB0aGlzLl93YWl0aW5nQ29udGFpbmVyLmNsYXNzTmFtZSA9IFwiR1ByZXZlcnNlR2VvY29kaW5nQ2FsY1dhaXRpbmdDb250YWluZXJIaWRkZW5cIjtcbiAgICAgICAgICAgIHRoaXMuX3dhaXRpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl90aW1lcik7XG4gICAgICAgICAgICB0aGlzLl90aW1lciA9IG51bGw7XG4gICAgICAgIH1cbiAgICB9XG5cbn0pO1xuXG4vKiogbWl4IGluIEwuRXZlbnRlZCBpbnRvIGNvbnRyb2wgKi9cbkwuZXh0ZW5kKFJldmVyc2VHZW9jb2RpbmcucHJvdG90eXBlLCBMLkV2ZW50ZWQucHJvdG90eXBlKTtcblxuZXhwb3J0IGRlZmF1bHQgUmV2ZXJzZUdlb2NvZGluZztcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/ReverseGeocoding.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Controls/Route.js": +/*!***************************************!*\ + !*** ./src/Leaflet/Controls/Route.js ***! + \***************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LocationSelector */ \"./src/Leaflet/Controls/LocationSelector.js\");\n/* harmony import */ var _Common_Controls_RouteDOM__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Common/Controls/RouteDOM */ \"./src/Common/Controls/RouteDOM.js\");\n\n\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getLogger(\"route(plus)\");\n\n/**\n * @classdesc\n *\n * Leaflet Control Class to compute and display route between start and end points using routing service of the geoportal platform.\n *\n * Use {@link module:Controls.Route L.geoportalControl.Route()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.Control native class.\n *\n * @namespace\n * @alias L.geoportalControl.Route\n */\nvar Route = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends L.geoportalControl.Route.prototype */{\n includes: _Common_Controls_RouteDOM__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n /**\n * Options du service\n *\n * @private\n */\n options: {\n position: \"topleft\",\n collapsed: true,\n // plier !\n graphs: [\"Voiture\", \"Pieton\"],\n exclusions: {\n toll: false,\n tunnel: false,\n bridge: false\n },\n disableReverse: false,\n routeOptions: {},\n // FIXME a t on besoin des options de ce service ?\n autocompleteOptions: {}\n },\n /**\n * @constructor Route\n * @private\n * @param {Object} options - options for function call.\n * @param {String} [options.apiKey] - API key. The \"calcul\" key is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {String} [options.position = \"topleft\"] - position of component into the map, 'topleft' by default\n * @param {Boolean} [options.collapsed = false] - collapse mode, false by default\n * @param {Object} [options.exclusions = {\"toll\" : false, \"tunnel\" : false, \"bridge\" : false}] - list of exclusions with status\n * @param {Array} [options.graphs = [\"Voiture\", \"Pieton\"]] - list of resources, by default : [\"Voiture\", \"Pieton\"], and the first element is selected\n * @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding\n * @param {Object} [options.autocompleteOptions = {}] - options of autocomplete service\n * @param {Object} [options.routeOptions = {}] - options of route service\n * @example\n * var route = L.geoportalControl.Route({\n * position : \"topright\",\n * collapsed : true,\n * exclusions : {\n * \"toll\" : true,\n * \"bridge\" : false,\n * \"tunnel\" : true\n * },\n * graphs : ['Pieton', 'Voiture'],\n * autocompleteOptions : {},\n * routeOptions : {}\n * });\n */\n initialize: function initialize(options) {\n // on transmet les options au controle\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.setOptions(this, options);\n\n /** uuid */\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].generate();\n\n // initialisation\n this._initTransport();\n this._initExclusions();\n this._initComputation();\n\n /** container principaux */\n this._showRouteContainer = null;\n this._pictoRouteContainer = null;\n this._waitingContainer = null;\n this._formRouteContainer = null;\n this._resultsRouteContainer = null;\n\n /** detection du support : desktop ou tactile */\n this._isDesktop = this._detectSupport();\n\n /** liste de points selectionnée */\n this._currentPoints = [];\n\n /** Mode de transport selectionné : 'Voiture' ou 'Pieton' */\n this._currentTransport = null;\n\n /** Mode de calcul selectionné : 'Plus rapide' ou 'plus court' */\n this._currentComputation = null;\n\n /** Exclusions selectionnées : Tunnel, Toll et Bridge */\n this._currentExclusions = [];\n\n /** la geometrie du parcours */\n this._geojsonRoute = null;\n\n /** la geometrie des troncons */\n this._geojsonSections = null;\n\n /** si un calcul est en cours ou non */\n this._waiting = false;\n /** timer pour cacher la patience après un certain temps */\n this._timer = null;\n\n /**\n * reponse du service\n * Ex. {\n * totalTime, totalDistance, bbox, routeGeometry,\n * routeInstructions : [{duration, distance, code, instruction, bbox, geometry}]\n * }\n */\n this._currentRouteInformations = null;\n\n /**\n * liste des ressources avec droits par service\n * Ex. {\n * \"Route\" : {\n * key : \"ger4g456re45er456t4er5ge5\",\n * resources : [\"Pieton\", \"Voiture\"]\n * }\n * }\n */\n this._resources = {};\n },\n /**\n * this method is called by this.addTo(map) when the control is added on the map\n * and fills variable 'this._container = this.onAdd(map)',\n * and create or disable events on map.\n *\n * @param {Object} map - the map\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n onAdd: function onAdd(map) {\n // initialisation du DOM du composant\n var container = this._container = this._initLayout(map);\n\n // deactivate of events that may interfere with the map\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container);\n return container;\n },\n /**\n * TODO this method is called when the control is removed from the map\n * and removes events on map.\n *\n * @private\n */\n onRemove: function onRemove( /* map */) {},\n // ################################################################### //\n // ####################### init application ########################## //\n // ################################################################### //\n\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initTransport: function _initTransport() {\n // Mode de transport selectionné\n this._currentTransport = \"Voiture\"; // par defaut\n\n // par defaut\n var transport = this.options.graphs;\n if (!transport || transport.length === 0) {\n this.options.graphs = [\"Voiture\", \"Pieton\"];\n }\n\n // option\n if (leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.isArray(transport) && transport.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (transport[0] === \"Voiture\" || transport[0] === \"Pieton\") {\n this._currentTransport = transport[0];\n }\n }\n\n // TODO option sur le service\n var serviceOptions = this.options.routeOptions;\n if (serviceOptions.graph) {\n this._currentTransport = serviceOptions.graph;\n }\n },\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initComputation: function _initComputation() {\n // Mode de calcul selectionné\n this._currentComputation = \"fastest\"; // par defaut\n\n // TODO option sur le service\n var serviceOptions = this.options.routeOptions;\n if (serviceOptions.routePreference) {\n this._currentComputation = serviceOptions.routePreference;\n }\n },\n /**\n * this method is called by the constructor and initialize the ...\n *\n * @private\n */\n _initExclusions: function _initExclusions() {\n // Exclusions selectionnées : Tunnel, Toll et Bridge\n this._currentExclusions = []; // par defaut\n\n // par defaut\n var exclusion = this.options.exclusions;\n if (!exclusion || Object.keys(exclusion).length === 0) {\n this.options.exclusions = {\n toll: false,\n tunnel: false,\n bridge: false\n };\n }\n\n // option\n if (exclusion && Object.keys(exclusion).length) {\n for (var k in exclusion) {\n if (exclusion.hasOwnProperty(k)) {\n if (exclusion.k) {\n this._currentExclusions.push(k);\n }\n }\n }\n }\n\n // TODO option sur le service\n var serviceOptions = this.options.routeOptions;\n if (leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.isArray(serviceOptions.exclusions)) {\n this._currentExclusions = serviceOptions.exclusions;\n }\n },\n // ################################################################### //\n // ############################## other init ######################### //\n // ################################################################### //\n\n /**\n * TODO this method is called by the constructor.\n * this information is useful to switch to touch mode.\n * Detection : test for desktop or tactile\n *\n * @returns {Boolean} is desktop\n *\n * @private\n */\n _detectSupport: function _detectSupport() {\n // TODO\n // Choix de gérer la détection dans le code du composant au lieu du DOM car :\n // Utilisation de l'implémentation Leaflet\n // http://leafletjs.com/reference.html#browser\n\n var isDesktop = true;\n var userAgent = window.navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\"iphone\") !== -1 || userAgent.indexOf(\"ipod\") !== -1 || userAgent.indexOf(\"ipad\") !== -1 || userAgent.indexOf(\"android\") !== -1 || userAgent.indexOf(\"mobile\") !== -1 || userAgent.indexOf(\"blackberry\") !== -1 || userAgent.indexOf(\"tablet\") !== -1 || userAgent.indexOf(\"phone\") !== -1 || userAgent.indexOf(\"touch\") !== -1) {\n isDesktop = false;\n }\n if (userAgent.indexOf(\"msie\") !== -1 || userAgent.indexOf(\"trident\") !== -1) {\n isDesktop = true;\n }\n return isDesktop;\n },\n // ################################################################### //\n // ########################### init dom ############################## //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd(map)\n * and initialize the container HTMLElement\n *\n * @param {Object} map - the map\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n _initLayout: function _initLayout(map) {\n // create main container\n var container = this._createMainContainerElement();\n var inputShow = this._showRouteContainer = this._createShowRouteElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.options.collapsed) {\n inputShow.checked = true;\n }\n var picto = this._pictoRouteContainer = this._createShowRoutePictoElement();\n container.appendChild(picto);\n var routePanel = this._createRoutePanelElement();\n\n // header form\n var routeHeader = this._createRoutePanelHeaderElement();\n routePanel.appendChild(routeHeader);\n\n // form\n var routeForm = this._formRouteContainer = this._createRoutePanelFormElement();\n\n // form: menu des points\n var points = this._createRoutePanelFormPointsElement(map);\n for (var i = 0; i < points.length; i++) {\n routeForm.appendChild(points[i]);\n }\n\n // form: menu des modes\n var choice = this._createRoutePanelFormModeChoiceElement();\n choice.appendChild(this._createRoutePanelFormModeChoiceTransportElement(this.options.graphs));\n choice.appendChild(this._createRoutePanelFormModeChoiceComputeElement());\n routeForm.appendChild(choice);\n\n // form: menu des exclusions\n routeForm.appendChild(this._createShowRouteExclusionsElement());\n routeForm.appendChild(this._createShowRouteExclusionsPictoElement());\n var exclusion = this._createRoutePanelFormExclusionsElement();\n exclusion.appendChild(this._createRoutePanelFormExclusionOptionsElement(this.options.exclusions));\n routeForm.appendChild(exclusion);\n\n // form: bouton du calcul\n var submit = this._createRouteSubmitFormElement();\n routeForm.appendChild(submit);\n routePanel.appendChild(routeForm);\n\n // results\n var routeResults = this._resultsRouteContainer = this._createRoutePanelResultsElement();\n routePanel.appendChild(routeResults);\n\n // waiting\n var waiting = this._waitingContainer = this._createRouteWaitingElement();\n routePanel.appendChild(waiting);\n container.appendChild(routePanel);\n return container;\n },\n // ################################################################### //\n // ############################## DOM ################################ //\n // ################################################################### //\n\n /**\n * Create List Points\n * FIXME OVERWRITTEN RouteDOM._createRoutePanelFormPointsElement() !\n *\n * @param {Object} map - the map\n *\n * @returns {Array} List DOM element\n *\n * @private\n */\n _createRoutePanelFormPointsElement: function _createRoutePanelFormPointsElement(map) {\n var points = [];\n var count = 1;\n // point de depart\n var start = new _LocationSelector__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: count,\n unique: this._uid,\n label: \"Départ\",\n color: \"blue\",\n display: true\n },\n disableReverse: this.options.disableReverse,\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n start.setMap(map);\n var opts = this.options.routeOptions;\n if (opts.startPoint) {\n start._inputAutoCompleteContainer.value = opts.startPoint.x + \" , \" + opts.startPoint.y;\n start.setCoordinate({\n lng: opts.startPoint.x,\n lat: opts.startPoint.y\n });\n }\n points.push(start.getContainer());\n this._currentPoints.push(start);\n // points intermediaires\n for (count = 2; count < 7; count++) {\n var step = new _LocationSelector__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: count,\n unique: this._uid,\n label: \"Etape\",\n color: \"green\",\n display: false,\n removeOption: true\n },\n disableReverse: this.options.disableReverse,\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n step.setMap(map);\n points.push(step.getContainer());\n this._currentPoints.push(step);\n }\n // point d'arrivé\n var end = new _LocationSelector__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: count,\n unique: this._uid,\n label: \"Arrivée\",\n color: \"red\",\n display: true,\n addOption: true,\n removeOption: false\n },\n disableReverse: this.options.disableReverse,\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n end.setMap(map);\n if (opts.endPoint) {\n end._inputAutoCompleteContainer.value = opts.endPoint.x + \" , \" + opts.endPoint.y;\n end.setCoordinate({\n lng: opts.endPoint.x,\n lat: opts.endPoint.y\n });\n }\n points.push(end.getContainer());\n this._currentPoints.push(end);\n return points;\n },\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on ''\n * tag label (cf. this._createShowRoutePictoElement),\n * and it cleans all value of input.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onShowRoutePanelClick: function onShowRoutePanelClick(e) {\n logger.log(\"onShowRoutePanelClick\", e);\n // clean !\n if (!this._geojsonSections) {\n this._clear();\n }\n },\n /**\n * this method is called by event 'change' on '' tag select\n * (cf. this.).\n * this value is saved as a parameter for the service route.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onRouteModeComputationChange: function onRouteModeComputationChange(e) {\n logger.log(\"onRouteModeComputationChange\", e);\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n if (!value) {\n return;\n }\n logger.log(value);\n this._currentComputation = value;\n },\n /**\n * this method is called by event 'change' on '' tag select\n * (cf. this.).\n * this value is saved as a parameter for the service route,\n * and this launches the route request !\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onRouteModeComputationChangeAndRun: function onRouteModeComputationChangeAndRun(e) {\n logger.log(\"onRouteModeComputationChangeAndRun\", e);\n\n // event choice computation\n this.onRouteModeComputationChange(e);\n\n // clean avant un nouveau calcul !\n this._clearRouteResultsDetails();\n this._clearRouteResultsGeometry();\n this._clearRouteResultsFeatureGeometry();\n\n // submit request\n this.onRouteComputationSubmit({\n computation: this._currentComputation,\n transport: this._currentTransport,\n exclusions: this._currentExclusions\n });\n },\n /**\n * this method is called by event 'change' on '' tag input\n * (cf. this.).\n * this value is saved as a parameter for the service route.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onRouteModeTransportChange: function onRouteModeTransportChange(e) {\n logger.log(\"onRouteModeTransportChange\", e);\n var value = e.target.value;\n if (!value) {\n return;\n }\n logger.log(value);\n this._currentTransport = value;\n },\n /**\n * this method is called by event 'click' on '' tag input\n * (cf. this.), and it displays the panel options of exclusions.\n * Not use !\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onShowRouteExclusionsClick: function onShowRouteExclusionsClick(e) {\n logger.log(\"onShowRouteExclusionsClick\", e);\n // not use !\n },\n\n /**\n * this method is called by event 'change' on '' tag input\n * (cf. this.).\n * this value is saved as a parameter for the service route.\n * Not use !\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onRouteExclusionsChange: function onRouteExclusionsChange(e) {\n logger.log(\"onRouteExclusionsChange\", e);\n var value = e.target.value;\n var checked = e.target.checked;\n if (!value) {\n return;\n }\n logger.log(value, checked);\n var bFound = false;\n var iFound = null;\n for (var i = 0; i < this._currentExclusions.length; i++) {\n if (this._currentExclusions[i] === value) {\n iFound = i;\n bFound = true;\n }\n }\n // on l'ajoute si la valeur n'existe pas et est selectionnée\n if (!bFound && checked) {\n this._currentExclusions.push(value);\n }\n // on la retire si la valeur existe et est desselectionnée\n if (bFound && !checked) {\n this._currentExclusions[iFound] = null;\n }\n },\n /**\n * this method is called by event 'submit' on '' tag form\n * (cf. this.), and it displays the results.\n *\n * @param {Object} options - options\n *\n * @private\n */\n onRouteComputationSubmit: function onRouteComputationSubmit(options) {\n logger.log(\"onRouteComputationSubmit\", options);\n\n // FIXME on lance une requête en EPSG:4326, les coordonnées\n // doivent donc être du type cad en lat/lon.\n // hors, BUG du service du calcul d'itineraire car les\n // coordonnées envoyées doivent être en lon/lat avec une SRS en EPSG:4326 !?\n // sinon, ça plante...\n\n // Liste des points\n var points = this._currentPoints;\n\n // - point de depart\n var start;\n if (points[0].getCoordinate) {\n var startCoordinate = points[0].getCoordinate();\n start = {\n x: startCoordinate.lon || startCoordinate.lng,\n y: startCoordinate.lat\n };\n }\n points[0].dragging(false);\n logger.log(\"start\", start);\n // - point d'arrivée\n var end;\n if (points[points.length - 1] && points[points.length - 1].getCoordinate) {\n var endCoordinate = points[points.length - 1].getCoordinate();\n end = {\n x: endCoordinate.lon || endCoordinate.lng,\n y: endCoordinate.lat\n };\n }\n points[points.length - 1].dragging(false);\n logger.log(\"end\", end);\n // - les étapes\n var step = [];\n for (var i = 1; i < points.length - 1; i++) {\n if (points[i] && points[i].getCoordinate) {\n var iCoordinate = points[i].getCoordinate();\n if (iCoordinate) {\n var coordinate = {\n x: iCoordinate.lon || iCoordinate.lng,\n y: iCoordinate.lat\n };\n logger.log(\"step\", coordinate);\n step.push(coordinate);\n }\n }\n }\n\n // valeurs selectionnées\n this._currentTransport = options.transport;\n this._currentComputation = options.computation;\n this._currentExclusions = options.exclusions;\n if (typeof this.options.routeOptions.geometryInInstructions === \"undefined\") {\n this.options.routeOptions.geometryInInstructions = true;\n }\n\n // mise en place de la patience\n this._displayWaitingContainer();\n\n // on met en place l'affichage des resultats dans la fenetre de resultats.\n var context = this;\n this._requestRouting({\n startPoint: start,\n endPoint: end,\n viaPoints: step,\n graph: this._currentTransport,\n routePreference: this._currentComputation,\n exclusions: this._currentExclusions,\n geometryInInstructions: this.options.routeOptions.geometryInInstructions,\n distanceUnit: \"m\",\n // surcharge obligatoire !\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results) {\n context._fillRouteResultsDetails(results);\n if (context.options.routeOptions.onSuccess) {\n context.options.routeOptions.onSuccess(results);\n }\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME mise à jour du controle mais le service ne repond pas en 200 !?\n context._hideWaitingContainer();\n context._clearRouteResultsDetails();\n logger.log(error.message);\n }\n });\n },\n /**\n * this method is called by event 'click' on ''\n * tag label (cf. this.),\n * and it cleans the old route geometry.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onShowRouteResultsNewClick: function onShowRouteResultsNewClick(e) {\n logger.log(\"onShowRouteResultsNewClick\", e);\n\n // on reactive le drag&drop\n var points = this._currentPoints;\n for (var i = 0; i < points.length; i++) {\n points[i].dragging(true);\n }\n\n // clean avant un nouveau calcul !\n this._clearRouteResultsDetails();\n this._clearRouteResultsGeometry();\n this._clearRouteResultsFeatureGeometry();\n },\n /**\n * this method is called by event 'mouseover' on ''\n * tag label (cf. this.),\n * and it makes a style on feature route.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onRouteResultsDetailsMouseOver: function onRouteResultsDetailsMouseOver(e) {\n logger.log(\"onRouteResultsDetailsMouseOver\", e);\n var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].index(e.target.id);\n\n // valable uniquement pour le mode desktop !\n if (!this._isDesktop) {\n return;\n }\n if (!this._geojsonSections) {\n return;\n }\n this._geojsonSections.eachLayer(function (layer) {\n if (layer.feature.id === parseInt(idx, 10)) {\n layer.setStyle({\n weight: 10,\n color: \"#0F9DE8\",\n opacity: 0.5\n });\n }\n });\n },\n /**\n * this method is called by event 'mouseout' on ''\n * tag label (cf. this.),\n * and it deletes a style on feature route.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onRouteResultsDetailsMouseOut: function onRouteResultsDetailsMouseOut(e) {\n logger.log(\"onRouteResultsDetailsMouseOut\", e);\n var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].index(e.target.id);\n\n // valable uniquement pour le mode desktop !\n if (!this._isDesktop) {\n return;\n }\n if (!this._geojsonSections) {\n return;\n }\n this._geojsonSections.eachLayer(function (layer) {\n if (layer.feature.id === parseInt(idx, 10)) {\n layer.setStyle({\n color: \"#ED7F10\",\n weight: 5,\n opacity: 0.75\n });\n }\n });\n },\n /**\n * this method is called by event 'click' on ''\n * tag label (cf. this.),\n * and it deletes a style on feature route.\n * Only for mobile !\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onRouteResultsDetailsClick: function onRouteResultsDetailsClick(e) {\n logger.log(\"onRouteResultsDetailsClick\", e);\n var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].index(e.target.id);\n var self = this;\n\n // valable uniquement pour le mode mobile !\n if (this._isDesktop) {\n return;\n }\n if (!this._geojsonSections) {\n return;\n }\n\n // afficher le detail cumulé du parcours !\n var newInstruction = e.target.title;\n var oldInstruction = e.target.innerHTML;\n this._geojsonSections.eachLayer(function (layer) {\n if (layer.feature.id === parseInt(idx, 10)) {\n e.target.innerHTML = newInstruction;\n layer.setStyle({\n weight: 10,\n color: \"#0F9DE8\",\n opacity: 0.5\n });\n }\n });\n clearTimeout(1000);\n setTimeout(function () {\n self._geojsonSections.eachLayer(function (layer) {\n if (layer.feature.id === parseInt(idx, 10)) {\n e.target.innerHTML = oldInstruction;\n layer.setStyle({\n color: \"#ED7F10\",\n weight: 5,\n opacity: 0.75\n });\n }\n });\n }, 1000);\n },\n // ################################################################### //\n // ########################### Routing ############################### //\n // ############## (methods to request and results) ################### //\n\n /**\n * this method is called by this.onRouteComputationSubmit()\n * and executes a request to the service.\n *\n * @param {Object} settings - service settings\n * @param {Function} settings.onSuccess - callback\n * @param {Function} settings.onFailure - callback\n *\n * @private\n */\n _requestRouting: function _requestRouting(settings) {\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!settings || Object.keys(settings).length === 0) {\n return;\n }\n\n // on ne fait pas de requête si\n // - la parametre 'startPoint' est vide !\n if (!settings.startPoint) {\n return;\n }\n // - la parametre 'endPoint' est vide !\n if (!settings.endPoint) {\n return;\n }\n logger.log(settings);\n var options = {};\n // on recupere les options du service\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.routeOptions);\n // ainsi que les parametres de saisie et les callbacks\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, settings);\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle ou la clé \"calcul\" par défaut\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n apiKey: this.options.routeOptions.apiKey || this.options.apiKey\n });\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n ssl: this.options.ssl\n });\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Services.route(options);\n },\n /**\n * this method is called by this.onRouteComputationSubmit()\n * and fills the container of the route instructions list, distance and time\n * information, aslo, constructs the geometry route.\n *\n * @param {Object} results - results of the route calculation\n *\n * @private\n */\n _fillRouteResultsDetails: function _fillRouteResultsDetails(results) {\n // FIXME\n // gestion des temps de traitement avec des callback !?\n\n // Distance et Durée\n var distance = results.totalDistance;\n var duration = results.totalTime;\n // Détails avec simplifications des troncons\n var instructions = this._simplifiedInstructions(results.routeInstructions);\n // var instructions = results.routeInstructions;\n\n if (instructions) {\n this._fillRouteResultsDetailsContainer(distance, duration, instructions);\n }\n\n // Geometries simplifiées\n var geometry = results.routeGeometry;\n if (geometry) {\n this._fillRouteResultsDetailsGeometry(geometry);\n }\n if (this.options.routeOptions.geometryInInstructions) {\n // existe t il une geometrie pour chaque troncon de route ?\n var bGeometryInstructions = instructions && Array.isArray(instructions) && instructions[0].geometry.length !== 0;\n\n // Geometries des tronçon\n if (instructions && bGeometryInstructions) {\n this._fillRouteResultsDetailsFeatureGeometry(instructions);\n }\n }\n\n // Emprise\n var bbox = results.bbox;\n if (bbox) {\n var map = this._map;\n var bounds = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLngBounds([bbox.bottom, bbox.left], [bbox.top, bbox.right]);\n map.fitBounds(bounds, {\n padding: [1, 1]\n });\n }\n\n // sauvegarde de l'etat des resultats\n this._currentRouteInformations = results;\n\n // mise à jour du controle !\n this._formRouteContainer.className = \"GProuteComponentHidden\";\n this._hideWaitingContainer();\n this._resultsRouteContainer.className = \"\";\n },\n /**\n * this method is called by this._fillRouteResultsDetails()\n * and fills the container of the route instructions list, distance and time\n * information.\n *\n * @param {Number} distance - distance\n * @param {Number} duration - duration\n * @param {Object[]} instructions - list of instructions\n *\n * @private\n */\n _fillRouteResultsDetailsContainer: function _fillRouteResultsDetailsContainer(distance, duration, instructions) {\n // FIXME callback\n\n // Distance et Durée\n this._resultsRouteValuesContainer = this._addRouteResultsValuesElement(distance, duration, this._convertSecondsToTime);\n\n // Détails\n this._resultsRouteDetailsContainer = this._addRouteResultsDetailsElement(instructions, this._convertSecondsToTime);\n },\n /**\n * this method is called by this._fillRouteResultsDetails()\n * and constructs the simplified geometry route.\n *\n * @param {Object} geometry - geometry\n *\n * @private\n */\n _fillRouteResultsDetailsGeometry: function _fillRouteResultsDetailsGeometry(geometry) {\n // FIXME callback\n\n this._clearRouteResultsGeometry();\n var map = this._map;\n var _style = {\n color: \"#ED7F10\",\n weight: 5,\n opacity: 0.75\n };\n this._geojsonRoute = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoJson(geometry, {\n style: _style\n }).addTo(map);\n },\n /**\n * this method is called by this._fillRouteResultsDetails()\n * and constructs the geometries street with informations.\n *\n * @param {Object[]} instructions - instructions\n *\n * @private\n */\n _fillRouteResultsDetailsFeatureGeometry: function _fillRouteResultsDetailsFeatureGeometry(instructions) {\n // FIXME callback\n\n this._clearRouteResultsFeatureGeometry();\n var map = this._map;\n var _style = {\n color: \"#ED7F10\",\n weight: 5,\n opacity: 0.75\n };\n var _geometry = {\n type: \"FeatureCollection\",\n features: []\n };\n for (var i = 0; i < instructions.length; i++) {\n var o = instructions[i];\n var id = i + 1;\n _geometry.features.push({\n id: id,\n type: \"Feature\",\n geometry: o.geometry,\n properties: {\n popupContent: \"(\" + id + \") distance : \" + this._convertDistance(o.distance) + \" / temps : \" + this._convertSecondsToTime(o.duration)\n }\n });\n }\n var self = this;\n function resetHighlight(e) {\n var layer = e.target;\n self._geojsonSections.resetStyle(layer);\n var div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GProuteResultsDetailsInstruction_\" + layer.feature.id + \"-\" + self._uid);\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.removeClass(div, \"GProuteResultsDetailsHighlight\");\n }\n function highlightFeature(e) {\n var layer = e.target;\n logger.log(layer);\n layer.setStyle({\n weight: 10,\n color: \"#0F9DE8\",\n opacity: 0.5\n });\n var div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GProuteResultsDetailsInstruction_\" + layer.feature.id + \"-\" + self._uid);\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.addClass(div, \"GProuteResultsDetailsHighlight\");\n }\n this._geojsonSections = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoJson(_geometry, {\n style: _style,\n // Function that will be called on each created feature layer.\n onEachFeature: function onEachFeature(feature, layer) {\n layer.on({\n mouseover: highlightFeature,\n mouseout: resetHighlight\n });\n layer.bindPopup(feature.properties.popupContent);\n }\n }).addTo(map);\n },\n // ################################################################### //\n // ############################# Clean ############################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onShowRoutePanelClick()\n * and it clears all elements (reinit).\n *\n * @private\n */\n _clear: function _clear() {\n this._currentTransport = null;\n this._currentExclusions = [];\n this._currentComputation = null;\n\n // les resultats\n this._clearRouteResultsDetails();\n // la geometrie\n this._clearRouteResultsGeometry();\n this._clearRouteResultsFeatureGeometry();\n // les points\n for (var i = 0; i < this._currentPoints.length; i++) {\n this._currentPoints[i].clear();\n }\n },\n /**\n * this method is called by this.onRouteComputationSubmit()\n * and it clears all route instructions.\n *\n * @private\n */\n _clearRouteResultsDetails: function _clearRouteResultsDetails() {\n this._currentRouteInformations = null;\n\n // doit on nettoyer le container \"GProuteResultsDetails\" ?\n // il sera de toute façon écrasé par la prochaine requête...\n if (this._resultsRouteDetailsContainer) {\n var divD = this._resultsRouteDetailsContainer;\n if (divD.childElementCount) {\n while (divD.firstChild) {\n divD.removeChild(divD.firstChild);\n }\n }\n }\n if (this._resultsRouteValuesContainer) {\n var divV = this._resultsRouteValuesContainer;\n if (divV.childElementCount) {\n while (divV.firstChild) {\n divV.removeChild(divV.firstChild);\n }\n }\n }\n },\n /**\n * this method is called by this.onRouteComputationSubmit()\n * and it clears all route geometries.\n *\n * @private\n */\n _clearRouteResultsGeometry: function _clearRouteResultsGeometry() {\n var map = this._map;\n if (this._geojsonRoute != null) {\n map.removeLayer(this._geojsonRoute);\n this._geojsonRoute = null;\n }\n },\n /**\n * this method is called by this.onRouteComputationSubmit()\n * and it clears all route geometries.\n *\n * @private\n */\n _clearRouteResultsFeatureGeometry: function _clearRouteResultsFeatureGeometry() {\n var map = this._map;\n if (this._geojsonSections != null) {\n map.removeLayer(this._geojsonSections);\n this._geojsonSections = null;\n }\n },\n // ################################################################### //\n // ############################ Patience ############################# //\n // ################################################################### //\n\n /**\n * this method displays waiting container and sets a timeout\n *\n * @private\n */\n _displayWaitingContainer: function _displayWaitingContainer() {\n this._waitingContainer.className = \"GProuteCalcWaitingContainerVisible\";\n this._waiting = true;\n\n // mise en place d'un timeout pour réinitialiser le panel (cacher la patience)\n // si on est toujours en attente (si la requête est bloquée par exemple)\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n var context = this;\n this._timer = setTimeout(function () {\n if (context._waiting === true) {\n context._hideWaitingContainer();\n } else {\n if (context._timer) {\n clearTimeout(context._timer);\n }\n }\n }, 16000);\n },\n /**\n * this method hides waiting container and clears timeout\n *\n * @private\n */\n _hideWaitingContainer: function _hideWaitingContainer() {\n if (this._waiting) {\n this._waitingContainer.className = \"GProuteCalcWaitingContainerHidden\";\n this._waiting = false;\n clearTimeout(this._timer);\n this._timer = null;\n }\n },\n // ################################################################### //\n // ########################## Geometry ############################### //\n // ################################################################### //\n\n /**\n * simplifies instructions\n *\n * @param {Object[]} instructions - instructions\n *\n * @returns {Object[]} simplified instructions\n *\n * @private\n */\n _simplifiedInstructions: function _simplifiedInstructions(instructions) {\n var newInstructions = [];\n var current = instructions[0];\n // cas où...\n if (instructions.length === 1) {\n newInstructions.push(current);\n }\n for (var i = 1; i < instructions.length; i++) {\n var o = instructions[i];\n if (o.instruction === current.instruction) {\n current.distance = (parseFloat(o.distance) + parseFloat(current.distance)).toString();\n current.duration = (parseFloat(o.duration) + parseFloat(current.duration)).toString();\n for (var j = 1; j < o.geometry.coordinates.length; j++) {\n current.geometry.coordinates.push(o.geometry.coordinates[j]);\n }\n // last\n if (i === instructions.length - 1) {\n newInstructions.push(current);\n current = null;\n }\n } else {\n newInstructions.push(current);\n current = o;\n // last\n if (i === instructions.length - 1) {\n newInstructions.push(o);\n current = null;\n }\n }\n }\n logger.log(newInstructions);\n return newInstructions;\n },\n // ################################################################### //\n // ################# Utils for Distance/Duration ##################### //\n // ################################################################### //\n\n /**\n * convert seconds to time : HH:MM:SS\n *\n * @param {Number} duration - duration in seconds\n *\n * @returns {String} duration in HH:MM:SS\n *\n * @private\n */\n _convertSecondsToTime: function _convertSecondsToTime(duration) {\n var time = \"\";\n duration = Math.round(duration);\n var hours = Math.floor(duration / (60 * 60));\n if (!hours) {\n hours = \"00\";\n }\n var divisor4minutes = duration % (60 * 60);\n var minutes = Math.floor(divisor4minutes / 60);\n if (!minutes) {\n minutes = \"00\";\n }\n var divisor4seconds = divisor4minutes % 60;\n var seconds = Math.ceil(divisor4seconds);\n if (!seconds) {\n seconds = \"00\";\n }\n time = hours + \"h \" + minutes + \"m \" + seconds + \"s\";\n return time;\n },\n /**\n * convert distance in meters or kilometers\n *\n * @param {Number} distance - distance in meters\n *\n * @returns {String} distance in km\n *\n * @private\n */\n _convertDistance: function _convertDistance(distance) {\n var d = \"\";\n var distanceKm = parseInt(distance / 1000, 10);\n if (!distanceKm) {\n d = parseInt(distance, 10) + \" m\"; // arrondi !\n } else {\n d = distanceKm + \" km\";\n }\n return d;\n },\n // ################################################################### //\n // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ //\n // ################################################################### //\n\n /**\n * This method is public.\n * It allows to control the execution of a traitment.\n *\n * @param {Object} positions - positions = [{lng: , lat: }]\n * @param {Object} options - options = {...}\n */\n compute: function compute(positions, options) {\n if (!this._showRouteContainer.checked) {\n this._pictoRouteContainer.click();\n }\n var map = this._map;\n if (!map) {\n return;\n }\n\n // Les options par defauts\n var settings = {\n computation: \"fastest\",\n transport: \"Voiture\",\n exclusions: []\n };\n\n // On recupere les options\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(settings, options);\n\n // Liste des points !\n var points = this._currentPoints;\n var start = 0;\n points[start].setCoordinate(positions[start]);\n var startInput = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GPlocationOrigin_\" + 1 + \"-\" + this._uid);\n startInput.value = positions[start].lng + \" , \" + positions[start].lat;\n var end = positions.length - 1;\n points[6].setCoordinate(positions[end]);\n var endInput = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GPlocationOrigin_\" + 7 + \"-\" + this._uid);\n endInput.value = positions[end].lng + \" , \" + positions[end].lat;\n for (var i = 1; i < positions.length - 1; i++) {\n points[i].setCoordinate(positions[i]);\n var stepInput = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GPlocationOrigin_\" + i + \"-\" + this._uid);\n stepInput.value = positions[i].lng + \" , \" + positions[i].lat;\n }\n settings.transport === \"Voiture\" ? leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GProuteTransportCar-\" + this._uid).checked = true : leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GProuteTransportPedestrian-\" + this._uid).checked = true;\n settings.computation === \"fastest\" ? leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GProuteComputationSelect-\" + this._uid).selectedIndex = 0 : leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GProuteComputationSelect-\" + this._uid).selectedIndex = 1;\n\n // TODO exclusion !\n\n // Calcul\n this.onRouteComputationSubmit(settings);\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Route);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL1JvdXRlLmpzP2NiNTMiXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiUm91dGUiLCJMIiwiQ29udHJvbCIsImV4dGVuZCIsImluY2x1ZGVzIiwiUm91dGVET00iLCJvcHRpb25zIiwicG9zaXRpb24iLCJjb2xsYXBzZWQiLCJncmFwaHMiLCJleGNsdXNpb25zIiwidG9sbCIsInR1bm5lbCIsImJyaWRnZSIsImRpc2FibGVSZXZlcnNlIiwicm91dGVPcHRpb25zIiwiYXV0b2NvbXBsZXRlT3B0aW9ucyIsImluaXRpYWxpemUiLCJVdGlsIiwic2V0T3B0aW9ucyIsIl91aWQiLCJJRCIsImdlbmVyYXRlIiwiX2luaXRUcmFuc3BvcnQiLCJfaW5pdEV4Y2x1c2lvbnMiLCJfaW5pdENvbXB1dGF0aW9uIiwiX3Nob3dSb3V0ZUNvbnRhaW5lciIsIl9waWN0b1JvdXRlQ29udGFpbmVyIiwiX3dhaXRpbmdDb250YWluZXIiLCJfZm9ybVJvdXRlQ29udGFpbmVyIiwiX3Jlc3VsdHNSb3V0ZUNvbnRhaW5lciI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gOiBjb3VudCxcbiAgICAgICAgICAgICAgICB1bmlxdWUgOiB0aGlzLl91aWQsXG4gICAgICAgICAgICAgICAgbGFiZWwgOiBcIkTDqXBhcnRcIixcbiAgICAgICAgICAgICAgICBjb2xvciA6IFwiYmx1ZVwiLFxuICAgICAgICAgICAgICAgIGRpc3BsYXkgOiB0cnVlXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZGlzYWJsZVJldmVyc2UgOiB0aGlzLm9wdGlvbnMuZGlzYWJsZVJldmVyc2UsXG4gICAgICAgICAgICBhdXRvY29tcGxldGVPcHRpb25zIDogdGhpcy5vcHRpb25zLmF1dG9jb21wbGV0ZU9wdGlvbnMgfHwgbnVsbFxuICAgICAgICB9KTtcbiAgICAgICAgc3RhcnQuc2V0TWFwKG1hcCk7XG5cbiAgICAgICAgdmFyIG9wdHMgPSB0aGlzLm9wdGlvbnMucm91dGVPcHRpb25zO1xuXG4gICAgICAgIGlmIChvcHRzLnN0YXJ0UG9pbnQpIHtcbiAgICAgICAgICAgIHN0YXJ0Ll9pbnB1dEF1dG9Db21wbGV0ZUNvbnRhaW5lci52YWx1ZSA9IG9wdHMuc3RhcnRQb2ludC54ICsgXCIgLCBcIiArIG9wdHMuc3RhcnRQb2ludC55O1xuICAgICAgICAgICAgc3RhcnQuc2V0Q29vcmRpbmF0ZSh7XG4gICAgICAgICAgICAgICAgbG5nIDogb3B0cy5zdGFydFBvaW50LngsXG4gICAgICAgICAgICAgICAgbGF0IDogb3B0cy5zdGFydFBvaW50LnlcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcG9pbnRzLnB1c2goc3RhcnQuZ2V0Q29udGFpbmVyKCkpO1xuICAgICAgICB0aGlzLl9jdXJyZW50UG9pbnRzLnB1c2goc3RhcnQpO1xuICAgICAgICAvLyBwb2ludHMgaW50ZXJtZWRpYWlyZXNcbiAgICAgICAgZm9yIChjb3VudCA9IDI7IGNvdW50IDwgNzsgY291bnQrKykge1xuICAgICAgICAgICAgdmFyIHN0ZXAgPSBuZXcgTG9jYXRpb25TZWxlY3Rvcih7XG4gICAgICAgICAgICAgICAgYXBpS2V5IDogdGhpcy5vcHRpb25zLmFwaUtleSB8fCBudWxsLFxuICAgICAgICAgICAgICAgIHRhZyA6IHtcbiAgICAgICAgICAgICAgICAgICAgaWQgOiBjb3VudCxcbiAgICAgICAgICAgICAgICAgICAgdW5pcXVlIDogdGhpcy5fdWlkLFxuICAgICAgICAgICAgICAgICAgICBsYWJlbCA6IFwiRXRhcGVcIixcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgOiBcImdyZWVuXCIsXG4gICAgICAgICAgICAgICAgICAgIGRpc3BsYXkgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgcmVtb3ZlT3B0aW9uIDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgZGlzYWJsZVJldmVyc2UgOiB0aGlzLm9wdGlvbnMuZGlzYWJsZVJldmVyc2UsXG4gICAgICAgICAgICAgICAgYXV0b2NvbXBsZXRlT3B0aW9ucyA6IHRoaXMub3B0aW9ucy5hdXRvY29tcGxldGVPcHRpb25zIHx8IG51bGxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgc3RlcC5zZXRNYXAobWFwKTtcbiAgICAgICAgICAgIHBvaW50cy5wdXNoKHN0ZXAuZ2V0Q29udGFpbmVyKCkpO1xuICAgICAgICAgICAgdGhpcy5fY3VycmVudFBvaW50cy5wdXNoKHN0ZXApO1xuICAgICAgICB9XG4gICAgICAgIC8vIHBvaW50IGQnYXJyaXbDqVxuICAgICAgICB2YXIgZW5kID0gbmV3IExvY2F0aW9uU2VsZWN0b3Ioe1xuICAgICAgICAgICAgYXBpS2V5IDogdGhpcy5vcHRpb25zLmFwaUtleSB8fCBudWxsLFxuICAgICAgICAgICAgdGFnIDoge1xuICAgICAgICAgICAgICAgIGlkIDogY291bnQsXG4gICAgICAgICAgICAgICAgdW5pcXVlIDogdGhpcy5fdWlkLFxuICAgICAgICAgICAgICAgIGxhYmVsIDogXCJBcnJpdsOpZVwiLFxuICAgICAgICAgICAgICAgIGNvbG9yIDogXCJyZWRcIixcbiAgICAgICAgICAgICAgICBkaXNwbGF5IDogdHJ1ZSxcbiAgICAgICAgICAgICAgICBhZGRPcHRpb24gOiB0cnVlLFxuICAgICAgICAgICAgICAgIHJlbW92ZU9wdGlvbiA6IGZhbHNlXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZGlzYWJsZVJldmVyc2UgOiB0aGlzLm9wdGlvbnMuZGlzYWJsZVJldmVyc2UsXG4gICAgICAgICAgICBhdXRvY29tcGxldGVPcHRpb25zIDogdGhpcy5vcHRpb25zLmF1dG9jb21wbGV0ZU9wdGlvbnMgfHwgbnVsbFxuICAgICAgICB9KTtcbiAgICAgICAgZW5kLnNldE1hcChtYXApO1xuXG4gICAgICAgIGlmIChvcHRzLmVuZFBvaW50KSB7XG4gICAgICAgICAgICBlbmQuX2lucHV0QXV0b0NvbXBsZXRlQ29udGFpbmVyLnZhbHVlID0gb3B0cy5lbmRQb2ludC54ICsgXCIgLCBcIiArIG9wdHMuZW5kUG9pbnQueTtcbiAgICAgICAgICAgIGVuZC5zZXRDb29yZGluYXRlKHtcbiAgICAgICAgICAgICAgICBsbmcgOiBvcHRzLmVuZFBvaW50LngsXG4gICAgICAgICAgICAgICAgbGF0IDogb3B0cy5lbmRQb2ludC55XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHBvaW50cy5wdXNoKGVuZC5nZXRDb250YWluZXIoKSk7XG4gICAgICAgIHRoaXMuX2N1cnJlbnRQb2ludHMucHVzaChlbmQpO1xuXG4gICAgICAgIHJldHVybiBwb2ludHM7XG4gICAgfSxcblxuICAgIC8vICMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMgLy9cbiAgICAvLyA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b2ludHNbaV0gJiYgcG9pbnRzW2ldLmdldENvb3JkaW5hdGUpIHtcbiAgICAgICAgICAgICAgICB2YXIgaUNvb3JkaW5hdGUgPSBwb2ludHNbaV0uZ2V0Q29vcmRpbmF0ZSgpO1xuICAgICAgICAgICAgICAgIGlmIChpQ29vcmRpbmF0ZSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgY29vcmRpbmF0ZSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHggOiBpQ29vcmRpbmF0ZS5sb24gfHwgaUNvb3JkaW5hdGUubG5nLFxuICAgICAgICAgICAgICAgICAgICAgICAgeSA6IGlDb29yZGluYXRlLmxhdFxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwic3RlcFwiLCBjb29yZGluYXRlKTtcbiAgICAgICAgICAgICAgICAgICAgc3RlcC5wdXNoKGNvb3JkaW5hdGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHZhbGV1cnMgc2VsZWN0aW9ubsOpZXNcbiAgICAgICAgdGhpcy5fY3VycmVudFRyYW5zcG9ydCA9IG9wdGlvbnMudHJhbnNwb3J0O1xuICAgICAgICB0aGlzLl9jdXJyZW50Q29tcHV0YXRpb24gPSBvcHRpb25zLmNvbXB1dGF0aW9uO1xuICAgICAgICB0aGlzLl9jdXJyZW50RXhjbHVzaW9ucyA9IG9wdGlvbnMuZXhjbHVzaW9ucztcblxuICAgICAgICBpZiAodHlwZW9mIHRoaXMub3B0aW9ucy5yb3V0ZU9wdGlvbnMuZ2VvbWV0cnlJbkluc3RydWN0aW9ucyA9PT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICAgICAgdGhpcy5vcHRpb25zLnJvdXRlT3B0aW9ucy5nZW9tZXRyeUluSW5zdHJ1Y3Rpb25zID0gdHJ1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIG1pc2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AgICAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5vcHRpb25zLnJvdXRlT3B0aW9ucy5vblN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQub3B0aW9ucy5yb3V0ZU9wdGlvbnMub25TdWNjZXNzKHJlc3VsdHMpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGNhbGxiYWNrIG9uRmFpbHVyZVxuICAgICAgICAgICAgb25GYWlsdXJlIDogZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgLy8gRklYTUUgbWlzZSDDoCBqb3VyIGR1IGNvbnRyb2xlIG1haXMgbGUgc2VydmljZSBuZSByZXBvbmQgcGFzIGVuIDIwMCAhP1xuICAgICAgICAgICAgICAgIGNvbnRleHQuX2hpZGVXYWl0aW5nQ29udGFpbmVyKCk7XG5cbiAgICAgICAgICAgICAgICBjb250ZXh0Ll9jbGVhclJvdXRlUmVzdWx0c0RldGFpbHMoKTtcbiAgICAgICAgICAgICAgICBsb2dnZXIubG9nKGVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaXMgY2FsbGVkIGJ5IGV2ZW50ICdjbGljaycgb24gJydcbiAgICAgKiB0YWcgbGFiZWwgKGNmLiB0aGlzLiksXG4gICAgICogYW5kIGl0IGNsZWFucyB0aGUgb2xkIHJvdXRlIGdlb21ldHJ5LlxuICAgICAqXG4gICAgICogQHBhcmFtIHtPYmplY3R9IGUgLSBIVE1MRWxlbWVudFxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBvblNob3dSb3V0ZVJlc3VsdHNOZXdDbGljayA6IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgIGxvZ2dlci5sb2coXCJvblNob3dSb3V0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ZSBkZXNrdG9wICFcbiAgICAgICAgaWYgKCF0aGlzLl9pc0Rlc2t0b3ApIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdGhpcy5fZ2VvanNvblNlY3Rpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLl9nZW9qc29uU2VjdGlvbnMuZWFjaExheWVyKGZ1bmN0aW9uIChsYXllcikge1xuICAgICAgICAgICAgaWYgKGxheWVyLmZlYXR1cmUuaWQgPT09IHBhcnNlSW50KGlkeCwgMTApKSB7XG4gICAgICAgICAgICAgICAgbGF5ZXIuc2V0U3R5bGUoe1xuICAgICAgICAgICAgICAgICAgICB3ZWlnaHQgOiAxMCxcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgOiBcIiMwRjlERThcIixcbiAgICAgICAgICAgICAgICAgICAgb3BhY2l0eSA6IDAuNVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaXMgY2FsbGVkIGJ5IGV2ZW50ICdtb3VzZW91dCcgb24gJydcbiAgICAgKiB0YWcgbGFiZWwgKGNmLiB0aGlzLiksXG4gICAgICogYW5kIGl0IGRlbGV0ZXMgYSBzdHlsZSBvbiBmZWF0dXJlIHJvdXRlLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtPYmplY3R9IGUgLSBIVE1MRWxlbWVudFxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBvblJvdXRlUmVzdWx0c0RldGFpbHNNb3VzZU91dCA6IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgIGxvZ2dlci5sb2coXCJvblJvdXRlUmVzdWx0c0RldGFpbHNNb3VzZU91dFwiLCBlKTtcblxuICAgICAgICB2YXIgaWR4ID0gSUQuaW5kZXgoZS50YXJnZXQuaWQpO1xuXG4gICAgICAgIC8vIHZhbGFibGUgdW5pcXVlbWVudCBwb3VyIGxlIG1vZGUgZGVza3RvcCAhXG4gICAgICAgIGlmICghdGhpcy5faXNEZXNrdG9wKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIXRoaXMuX2dlb2pzb25TZWN0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5fZ2VvanNvblNlY3Rpb25zLmVhY2hMYXllcihmdW5jdGlvbiAobGF5ZXIpIHtcbiAgICAgICAgICAgIGlmIChsYXllci5mZWF0dXJlLmlkID09PSBwYXJzZUludChpZHgsIDEwKSkge1xuICAgICAgICAgICAgICAgIGxheWVyLnNldFN0eWxlKHtcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgOiBcIiNFRDdGMTBcIixcbiAgICAgICAgICAgICAgICAgICAgd2VpZ2h0IDogNSxcbiAgICAgICAgICAgICAgICAgICAgb3BhY2l0eSA6IDAuNzVcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSBldmVudCAnY2xpY2snIG9uICcnXG4gICAgICogdGFnIGxhYmVsIChjZi4gdGhpcy4pLFxuICAgICAqIGFuZCBpdCBkZWxldGVzIGEgc3R5bGUgb24gZmVhdHVyZSByb3V0ZS5cbiAgICAgKiBPbmx5IGZvciBtb2JpbGUgIVxuICAgICAqXG4gICAgICogQHBhcmFtIHtPYmplY3R9IGUgLSBIVE1MRWxlbWVudFxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBvblJvdXRlUmVzdWx0c0RldGFpbHNDbGljayA6IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgIGxvZ2dlci5sb2coXCJvblJvdXRlUmVzdWx0c0RldGFpbHNDbGlja1wiLCBlKTtcblxuICAgICAgICB2YXIgaWR4ID0gSUQuaW5kZXgoZS50YXJnZXQuaWQpO1xuXG4gICAgICAgIHZhciBzZWxmID0gdGhpcztcblxuICAgICAgICAvLyB2YWxhYmxlIHVuaXF1ZW1lbnQgcG91ciBsZSBtb2RlIG1vYmlsZSAhXG4gICAgICAgIGlmICh0aGlzLl9pc0Rlc2t0b3ApIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdGhpcy5fZ2VvanNvblNlY3Rpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBhZmZpY2hlciBsZSBkZXRhaWwgY3VtdWzDqSBkdSBwYXJjb3VycyAhXG4gICAgICAgIHZhciBuZXdJbnN0cnVjdGlvbiA9IGUudGFyZ2V0LnRpdGxlO1xuICAgICAgICB2YXIgb2xkSW5zdHJ1Y3Rpb24gPSBlLnRhcmdldC5pbm5lckhUTUw7XG5cbiAgICAgICAgdGhpcy5fZ2VvanNvblNlY3Rpb25zLmVhY2hMYXllcihmdW5jdGlvbiAobGF5ZXIpIHtcbiAgICAgICAgICAgIGlmIChsYXllci5mZWF0dXJlLmlkID09PSBwYXJzZUludChpZHgsIDEwKSkge1xuICAgICAgICAgICAgICAgIGUudGFyZ2V0LmlubmVySFRNTCA9IG5ld0luc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgIGxheWVyLnNldFN0eWxlKHtcbiAgICAgICAgICAgICAgICAgICAgd2VpZ2h0IDogMTAsXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yIDogXCIjMEY5REU4XCIsXG4gICAgICAgICAgICAgICAgICAgIG9wYWNpdHkgOiAwLjVcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgY2xlYXJUaW1lb3V0KDEwMDApO1xuICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHt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ICAgICAgICBmZWF0dXJlcyA6IFtdXG4gICAgICAgIH07XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBpbnN0cnVjdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBvID0gaW5zdHJ1Y3Rpb25zW2ldO1xuICAgICAgICAgICAgdmFyIGlkID0gaSArIDE7XG5cbiAgICAgICAgICAgIF9nZW9tZXRyeS5mZWF0dXJlcy5wdXNoKHtcbiAgICAgICAgICAgICAgICBpZCA6IGlkLFxuICAgICAgICAgICAgICAgIHR5cGUgOiBcIkZlYXR1cmVcIixcbiAgICAgICAgICAgICAgICBnZW9tZXRyeSA6IG8uZ2VvbWV0cnksXG4gICAgICAgICAgICAgICAgcHJvcGVydGllcyA6IHtcbiAgICAgICAgICAgICAgICAgICAgcG9wdXBDb250ZW50IDogXCIoXCIgKyBpZCArIFwiKSBkaXN0YW5jZSA6IFwiICsgdGhpcy5fY29udmVydERpc3RhbmNlKG8uZGlzdGFuY2UpICtcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiIC8gdGVtcHMgOiBcIiArIHRoaXMuX2NvbnZlcnRTZWNvbmRzVG9UaW1lKG8uZHVyYXRpb24pXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XG5cbiAgICAgICAgZnVuY3Rpb24gcmVzZXRIaWdobGlnaHQgKGUpIHtcbiAgICAgICAgICAgIHZhciBsYXllciA9IGUudGFyZ2V0O1xuICAgICAgICAgICAgc2VsZi5fZ2VvanNvblNlY3Rpb25zLnJlc2V0U3R5bGUobGF5ZXIpO1xuICAgICAgICAgICAgdmFyIGRpdiA9IEwuRG9tVXRpbC5nZXQoXCJHUHJvdXRlUmVzdWx0c0RldGFpbHNJbnN0cnVjdGlvbl9cIiArIGxheWVyLmZlYXR1cmUuaWQgKyBcIi1cIiArIHNlbGYuX3VpZCk7XG4gICAg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biAgICAgICAgICAgICAgICAgICAgZGl2RC5yZW1vdmVDaGlsZChkaXZELmZpcnN0Q2hpbGQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLl9yZXN1bHRzUm91dGVWYWx1ZXNDb250YWluZXIpIHtcbiAgICAgICAgICAgIHZhciBkaXZWID0gdGhpcy5fcmVzdWx0c1JvdXRlVmFsdWVzQ29udGFpbmVyO1xuICAgICAgICAgICAgaWYgKGRpdlYuY2hpbGRFbGVtZW50Q291bnQpIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAoZGl2Vi5maXJzdENoaWxkKSB7XG4gICAgICAgICAgICAgICAgICAgIGRpdlYucmVtb3ZlQ2hpbGQoZGl2Vi5maXJzdENoaWxkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaXMgY2FsbGVkIGJ5IHRoaXMub25Sb3V0ZUNvbXB1dGF0aW9uU3VibWl0KClcbiAgICAgKiBhbmQgaXQgY2xlYXJzIGFsbCByb3V0ZSBnZW9tZXRyaWVzLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBfY2xlYXJSb3V0ZVJlc3VsdHNHZW9tZXRyeSA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIG1hcCA9IHRoaXMuX21hcDtcblxuICAgICAgICBpZiAodGhpcy5fZ2VvanNvblJvdXRlICE9IG51bGwpIHtcbiAgICAgICAgICAgIG1hcC5yZW1vdmVMYXllcih0aGlzLl9nZW9qc29uUm91dGUpO1xuICAgICAgICAgICAgdGhpcy5fZ2VvanNvblJvdXRlID0gbnVsbDtcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiB0aGlzIG1ldGhvZCBpcyBjYWxsZWQgYnkgdGhpcy5vblJv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WaXNpYmxlXCI7XG4gICAgICAgIHRoaXMuX3dhaXRpbmcgPSB0cnVlO1xuXG4gICAgICAgIC8vIG1pc2UgZW4gcGxhY2UgZCd1biB0aW1lb3V0IHBvdXIgcsOpaW5pdGlhbGlzZXIgbGUgcGFuZWwgKGNhY2hlciBsYSBwYXRpZW5jZSlcbiAgICAgICAgLy8gc2kgb24gZXN0IHRvdWpvdXJzIGVuIGF0dGVudGUgKHNpIGxhIHJlcXXDqnRlIGVzdCBibG9xdcOpZSBwYXIgZXhlbXBsZSlcbiAgICAgICAgaWYgKHRoaXMuX3RpbWVyKSB7XG4gICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5fdGltZXIpO1xuICAgICAgICAgICAgdGhpcy5fdGltZXIgPSBudWxsO1xuICAgICAgICB9XG4gICAgICAgIHZhciBjb250ZXh0ID0gdGhpcztcbiAgICAgICAgdGhpcy5fdGltZXIgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmIChjb250ZXh0Ll93YWl0aW5nID09PSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5faGlkZVdhaXRpbmdDb250YWluZXIoKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbnRleHQuX3RpbWVyKSB7XG4gICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChjb250ZXh0Ll90aW1lcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LCAxNjAwMCk7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGhpZGVzIHdhaXRpbmcgY29udGFpbmVyIGFuZCBjbGVhcnMgdGltZW91dFxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBfaGlkZVdhaXRpbmdDb250YWluZXIgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICh0aGlzLl93YWl0aW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N0cnVjdGlvbnMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICBuZXdJbnN0cnVjdGlvbnMucHVzaChjdXJyZW50KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgaW5zdHJ1Y3Rpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgbyA9IGluc3RydWN0aW9uc1tpXTtcbiAgICAgICAgICAgIGlmIChvLmluc3RydWN0aW9uID09PSBjdXJyZW50Lmluc3RydWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudC5kaXN0YW5jZSA9IChwYXJzZUZsb2F0KG8uZGlzdGFuY2UpICsgcGFyc2VGbG9hdChjdXJyZW50LmRpc3RhbmNlKSkudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICBjdXJyZW50LmR1cmF0aW9uID0gKHBhcnNlRmxvYXQoby5kdXJhdGlvbikgKyBwYXJzZUZsb2F0KGN1cnJlbnQuZHVyYXRpb24pKS50b1N0cmluZygpO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAxOyBqIDwgby5nZW9tZXRyeS5jb29yZGluYXRlcy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lmdlb21ldHJ5LmNvb3JkaW5hdGVzLnB1c2goby5nZW9tZXRyeS5jb29yZGluYXRlc1tqXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIGxhc3RcbiAgICAgICAgICAgICAgICBpZiAoaSA9PT0gaW5zdHJ1Y3Rpb25zLmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICAgICAgbmV3SW5zdHJ1Y3Rpb25zLnB1c2goY3VycmVudCk7XG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbmV3SW5zdHJ1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ICAgdmFyIHRpbWUgPSBcIlwiO1xuXG4gICAgICAgIGR1cmF0aW9uID0gTWF0aC5yb3VuZChkdXJhdGlvbik7XG4gICAgICAgIHZhciBob3VycyA9IE1hdGguZmxvb3IoZHVyYXRpb24gLyAoNjAgKiA2MCkpO1xuICAgICAgICBpZiAoIWhvdXJzKSB7XG4gICAgICAgICAgICBob3VycyA9IFwiMDBcIjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBkaXZpc29yNG1pbnV0ZXMgPSBkdXJhdGlvbiAlICg2MCAqIDYwKTtcbiAgICAgICAgdmFyIG1pbnV0ZXMgPSBNYXRoLmZsb29yKGRpdmlzb3I0bWludXRlcyAvIDYwKTtcbiAgICAgICAgaWYgKCFtaW51dGVzKSB7XG4gICAgICAgICAgICBtaW51dGVzID0gXCIwMFwiO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGRpdmlzb3I0c2Vjb25kcyA9IGRpdmlzb3I0bWludXRlcyAlIDYwO1xuICAgICAgICB2YXIgc2Vjb25kcyA9IE1hdGguY2VpbChkaXZpc29yNHNlY29uZHMpO1xuICAgICAgICBpZiAoIXNlY29uZHMpIHtcbiAgICAgICAgICAgIHNlY29uZHMgPSBcIjAwXCI7XG4gICAgICAgIH1cblxuICAgICAgICB0aW1lID0gaG91cnMgKyBcImggXCIgKyBtaW51dGVzICsgXCJtIFwiICsgc2Vjb25kcyArIFwic1wiO1xuICAgICAgICByZXR1cm4gdGltZTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogY29udmVydCBkaXN0YW5jZSBpbiBtZXRlcnMgb3Iga2lsb21ldGVyc1xuICAgICAqXG4gICAgICogQHBhcmFtIHtOdW1iZXJ9IGRpc3RhbmNlIC0gZGlzdGFuY2UgaW4gbWV0ZXJzXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSBkaXN0YW5jZSBpbiBrbVxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBfY29ud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2VsZWN0ZWRJbmRleCA9IDAgOiBMLkRvbVV0aWwuZ2V0KFwiR1Byb3V0ZUNvbXB1dGF0aW9uU2VsZWN0LVwiICsgdGhpcy5fdWlkKS5zZWxlY3RlZEluZGV4ID0gMTtcblxuICAgICAgICAvLyBUT0RPIGV4Y2x1c2lvbiAhXG5cbiAgICAgICAgLy8gQ2FsY3VsXG4gICAgICAgIHRoaXMub25Sb3V0ZUNvbXB1dGF0aW9uU3VibWl0KHNldHRpbmdzKTtcbiAgICB9XG59KTtcblxuZXhwb3J0IGRlZmF1bHQgUm91dGU7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/Route.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Controls/SearchEngine.js": +/*!**********************************************!*\ + !*** ./src/Leaflet/Controls/SearchEngine.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Common_Utils_SearchEngineUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Common/Utils/SearchEngineUtils */ \"./src/Common/Utils/SearchEngineUtils.js\");\n/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Common/Utils/GeocodeUtils */ \"./src/Common/Utils/GeocodeUtils.js\");\n/* harmony import */ var _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Utils/IconDefault */ \"./src/Leaflet/Controls/Utils/IconDefault.js\");\n/* harmony import */ var _Common_Controls_SearchEngineDOM__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/Controls/SearchEngineDOM */ \"./src/Common/Controls/SearchEngineDOM.js\");\n/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Common/Utils */ \"./src/Common/Utils.js\");\n/* global KeyboardEvent */\n\n\n\n\n\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getLogger(\"searchengine\");\n\n/**\n * @classdesc\n *\n * Leaflet Control Class to search positons of geographic identifiers (places names, address, cadastral parcel) using :\n *\n * - the [geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage.html}.\n * - the [autocompletion service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/autocompletion.html}\n *
    \n *\n * Use {@link module :Controls.SearchEngine L.geoportalControl.SearchEngine()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.Control native class.\n *\n * @namespace\n * @alias L.geoportalControl.SearchEngine\n */\nvar SearchEngine = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends L.geoportalControl.SearchEngine.prototype */{\n includes: _Common_Controls_SearchEngineDOM__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n /**\n * options by default\n *\n * @private\n */\n options: {\n position: \"topleft\",\n collapsed: true,\n displayInfo: true,\n zoomTo: \"\",\n resources: [],\n placeholder: \"Rechercher un lieu, une adresse\",\n displayMarker: true,\n markerStyle: \"blue\",\n displayAdvancedSearch: true,\n advancedSearch: {},\n geocodeOptions: {},\n autocompleteOptions: {\n serviceOptions: {},\n triggerGeocode: false,\n triggerDelay: 1000\n }\n },\n /**\n * @constructor SearchEngine\n *\n * @private\n * @alias SearchEngine\n * @extends {L.Control}\n * @param {Object} options - control options\n * @param {String} [options.apiKey] - API key. The \"calcul\" key is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.collapsed] - collapse mode, false by default\n * @param {String} [options.position] - position of component into the map, 'topleft' by default\n * @param {Boolean} [options.displayInfo] - get informations on popup marker\n * @param {String|Numeric|Function} [options.zoomTo] - zoom to results, by default, current zoom.\n * Value possible : auto or zoom level.\n * Possible to overload it with a function :\n * zoomTo : function (info) {\n * // do some stuff...\n * return zoom;\n * }\n * @param {String} [options.placeholder] - set placeholder in search bar. Default is \"Rechercher un lieu, une adresse\".\n * @param {Boolean} [options.displayMarker] - set a marker on search result, defaults to true.\n * @param {String|Object} [options.markerStyle] - set a marker style. Currently possible values are \"blue\" (default value), \"orange\", \"red\" and \"green\". But you can use an L.Icon object (see {@link http://leafletjs.com/reference-1.2.0.html#icon L.Icon }).\n * @param {Sting} [options.apiKey] - API key. The \"calcul\" key is used by default.\n * @param {String} [options.resources.geocode] - resources geocoding, by default : \"location\"\n * @param {Object} [options.resources.autocomplete] - resources to be used by autocompletion service, by default : [\"StreetAddress\", \"PositionOfInterest\"]\n * @param {Boolean} [options.displayAdvancedSearch] - False to disable advanced search tools (it will not be displayed). Default is true (displayed)\n * @param {Object} [options.advancedSearch] - advanced search for geocoding (filters)\n * @param {Object} [options.geocodeOptions] - options of geocode service\n * @param {Object} [options.autocompleteOptions] - options of autocomplete service\n * @param {Object} [options.autocompleteOptions.serviceOptions] - options of autocomplete service\n * @param {Boolean} [options.autocompleteOptions.triggerGeocode] - trigger a geocoding request if the autocompletion does not return any suggestions, false by default\n * @param {Number} [options.autocompleteOptions.triggerDelay] - waiting time before sending the geocoding request, 1000ms by default\n * @example\n * var SearchEngine = L.geoportalControl.SearchEngine({\n * position : \"topright\",\n * collapsed : true,\n * displayInfo : true,\n * displayAdvancedSearch : true,\n * placeholder : \"Rechercher un lieu, une adresse\",\n * displayMarker : true,\n * markerStyle : L.icon(iconUrl : 'https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png');\n * zoomTo : 15,\n * resources : [\"PositionOfInterest\", \"StreetAddress\"],\n * advancedSearch : {\n * PositionOfInterest : [{name : \"municipality\", title : \"Ville\"}],\n * StreetAddress : [{...}],\n * CadastralParcel : null,\n * },\n * apiKey : \"zfgzrgffg57rfg8ar7gr4g5r4\",\n * geocodeOptions : {},\n * autocompleteOptions : {}\n * });\n *\n */\n initialize: function initialize(options) {\n // on transmet les options au controle\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.setOptions(this, options);\n if (typeof this.options.resources === \"undefined\") {\n this.options.resources = {};\n }\n if (typeof this.options.resources.geocode === \"undefined\" || this.options.resources.geocode === \"\") {\n this.options.resources.geocode = \"location\";\n }\n if (typeof this.options.resources.autocomplete === \"undefined\" || this.options.resources.autocomplete.length === 0) {\n this.options.resources.autocomplete = [\"PositionOfInterest\", \"StreetAddress\"];\n }\n\n /** uuid */\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].generate();\n\n /** affichage du container de saisie */\n this._showContainer = null;\n this._pictoContainer = null;\n\n /** container de la saisie du la recherche */\n this._inputContainer = null;\n\n /** container des reponses de l'autocompletion */\n this._suggestedContainer = null;\n\n /** listes des reponses de l'autocompletion */\n this._suggestedLocations = [];\n\n /** container des reponses du geocodage */\n this._geocodedContainer = null;\n\n /** liste des reponses du geocodage */\n this._geocodedLocations = [];\n\n /** container des filtres du geocodage */\n this._filterContainer = null;\n\n /** ressource de geocodage selectionnée pour le geocodage avancé */\n this._currentGeocodingCode = null;\n\n /** localisant */\n this._currentGeocodingLocation = null;\n\n /** liste des filtres du geocodage pour le geocodage avancé */\n this._advancedSearchFilters = {};\n\n /** liste des ressources du geocodage pour le geocodage avancé */\n this._advancedSearchCodes = [];\n\n /** marker */\n this._marker = null;\n\n // trigger geocode\n this._triggerHandler = null;\n },\n /**\n * this method is called by this.addTo(map)\n * and fills variable : this._container = this.onAdd(map)\n *\n * @returns {DOMElement} DOM element\n * @private\n */\n onAdd: function onAdd( /* map */\n ) {\n // TODO initialisation des ressources du geocodage avancé\n this._initAdvancedSearchCodes();\n\n // initialisation des filtres du geocodage avancé\n this._initAdvancedSearchFilters();\n\n // initialisation du DOM du composant\n var container = this._initLayout();\n\n // deactivate of events that may interfere with the map\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container);\n return container;\n },\n /**\n * this method is called when the control is removed from the map\n * and removes events on map.\n *\n * @param {Object} map - the map\n *\n * @private\n */\n onRemove: function onRemove(map) {\n this._clearSuggestedLocation();\n this._clearGeocodedLocation();\n if (this._marker != null) {\n map.removeLayer(this._marker);\n this._marker = null;\n }\n },\n // ################################################################### //\n // ########################## methods DOM ############################ //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd(map)\n * and initialize the container HTMLElement\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n _initLayout: function _initLayout() {\n // create main container\n var container = this._createMainContainerElement();\n\n // create show search engine element\n var inputShow = this._showContainer = this._createShowSearchEngineElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.options.collapsed) {\n inputShow.checked = \"true\";\n }\n\n // create search engine picto\n var picto = this._pictoContainer = this._createShowSearchEnginePictoElement();\n container.appendChild(picto);\n var search = this._createSearchInputElement(this.options.placeholder);\n container.appendChild(search);\n if (this.options.displayAdvancedSearch) {\n var advancedShow = this._createShowAdvancedSearchElement();\n container.appendChild(advancedShow);\n\n // INFO je decompose les appels car j'ai besoin de recuperer le container\n // des filtres\n var advancedPanel = this._createAdvancedSearchPanelElement();\n var advancedHeader = this._createAdvancedSearchPanelHeaderElement();\n var advancedForm = this._createAdvancedSearchPanelFormElement(this._advancedSearchCodes);\n var advancedFormFilters = this._filterContainer = this._createAdvancedSearchFormFiltersElement();\n this._setFilter(this._advancedSearchCodes[0].id); // ex \"PositionOfInterest\"\n var advancedFormInput = this._createAdvancedSearchFormInputElement();\n advancedForm.appendChild(advancedFormFilters);\n advancedForm.appendChild(advancedFormInput);\n advancedPanel.appendChild(advancedHeader);\n advancedPanel.appendChild(advancedForm);\n container.appendChild(advancedPanel);\n }\n\n // INFO je decompose les appels car j'ai besoin de recuperer le container\n // des resultats de l'autocompletion\n var autocomplete = this._createAutoCompleteElement();\n var autocompleteList = this._suggestedContainer = this._createAutoCompleteListElement();\n autocomplete.appendChild(autocompleteList);\n container.appendChild(autocomplete);\n\n // INFO je decompose les appels car j'ai besoin de recuperer le container\n // des resultats du geocodage\n var geocode = this._createGeocodeResultsElement();\n var geocodeList = this._geocodedContainer = this._createGeocodeResultsListElement();\n geocode.appendChild(geocodeList);\n container.appendChild(geocode);\n return container;\n },\n // ################################################################### //\n // ################# methods Filters Geocode Advanced ################ //\n // ################################################################### //\n\n /**\n * this method is called by this.onAdd()\n * and initialize the geocoding resources.\n * TODO\n *\n * @private\n */\n _initAdvancedSearchCodes: function _initAdvancedSearchCodes() {\n // INFORMATION\n // on y ajoute les filtres attributaires pour une table de ressources\n // selectionnée via un evenement (onchange) de la liste deroulante du\n // menu avancé du geocodage.\n // cf. onGeocodingAdvancedSearchCodeChange() pour la selection de la\n // ressource de geocodage à afficher\n\n var geocodeResources = this.options.resources.geocode;\n if (geocodeResources === \"location\") {\n geocodeResources = [\"PositionOfInterest\", \"StreetAddress\", \"CadastralParcel\"];\n }\n if (!Array.isArray(geocodeResources)) {\n geocodeResources = [geocodeResources];\n }\n for (var i = 0; i < geocodeResources.length; i++) {\n switch (geocodeResources[i]) {\n case \"PositionOfInterest\":\n this._advancedSearchCodes.push({\n id: \"PositionOfInterest\",\n title: \"Lieux/toponymes\"\n });\n break;\n case \"StreetAddress\":\n this._advancedSearchCodes.push({\n id: \"StreetAddress\",\n title: \"Adresses\"\n });\n break;\n case \"CadastralParcel\":\n this._advancedSearchCodes.push({\n id: \"CadastralParcel\",\n title: \"Parcelles cadastrales\"\n });\n break;\n default:\n break;\n }\n }\n // par défaut, au cas où aucune ressource passée en option ne correspond à celles attendues\n if (this._advancedSearchCodes.length === 0) {\n this._advancedSearchCodes = [{\n id: \"StreetAddress\",\n title: \"Adresses\"\n }, {\n id: \"PositionOfInterest\",\n title: \"Lieux/toponymes\"\n }, {\n id: \"CadastralParcel\",\n title: \"Cadastre\"\n }];\n }\n logger.log(\"advancedSearchCodes\", this._advancedSearchCodes);\n },\n /**\n * this method is called by this.onAdd()\n * and initialize the advanced geocoding filters.\n * FIXME\n *\n * @private\n */\n _initAdvancedSearchFilters: function _initAdvancedSearchFilters() {\n // FIXME la liste des filtres attributaires doit elle être recuperée\n // de l'objet geocode ? doit on tous les mettre ou doit on faire un choix ?\n\n // liste des filtres par defauts pour toutes les ressources\n this._advancedSearchFilters = _Common_Utils_SearchEngineUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].advancedSearchFiltersByDefault;\n\n // on merge les options avancées avec celles par defaut\n var advancedSearchFiltersCustom = this.options.advancedSearch;\n _Common_Utils__WEBPACK_IMPORTED_MODULE_8__[\"default\"].assign(this._advancedSearchFilters, advancedSearchFiltersCustom);\n logger.log(\"advancedSearchFilters\", this._advancedSearchFilters);\n },\n /**\n * this method is called by :\n * - this._initLayout() : ...\n * - this.onGeocodingAdvancedSearchCodeChoice() : ...\n * and initialize or create the filters container HTMLElement\n * to the geocoding advanced menu.\n *\n * @param {String} code - resource geocoding name\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n _setFilter: function _setFilter(code) {\n // INFORMATION\n // Nous avons 2 solutions possibles pour la mise en place des filtres.\n // 1. Soit on decide de creer tous les filtres pour chaque ressource\n // de geocodage à l'initialisation du composant, et on joue sur le\n // mode 'hidden' pour n'afficher que la ressource selectionnée.\n // 2. Soit on decide de creer à chaque fois les filtres pour la\n // ressource selectionnée.\n // Chaque solution a ses inconvenients/avantages.\n // Implementation du choix 2 car elle offre plus de souplesse pour\n // recuperer les 'form-data'...\n\n var container = this._filterContainer;\n var codeFound = false;\n for (var i = 0; i < this._advancedSearchCodes.length; i++) {\n if (this._advancedSearchCodes[i].id === code) {\n codeFound = true;\n break;\n }\n }\n if (!codeFound) {\n // cette ressource n'est pas disponible,\n // on supprime les anciens enfants...\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n return;\n }\n\n // on sauvegarde la ressource de geocodage sélectionnée\n this._currentGeocodingCode = code;\n\n // on supprime les enfants...\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n var lstAttributs = this._advancedSearchFilters[code];\n if (!lstAttributs || lstAttributs.length === 0) {\n // cette ressource n'est pas parametrable\n return;\n }\n var divTable = this._createAdvancedSearchFiltersTableElement(code, true);\n for (var j = 0; j < lstAttributs.length; j++) {\n var divFilter = this._createAdvancedSearchFiltersAttributElement(lstAttributs[j]);\n divTable.appendChild(divFilter);\n }\n container.appendChild(divTable);\n return container;\n },\n // ################################################################### //\n // ################ methods to request and results ################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onAutoCompleteSearch()\n * and executes a request to the service.\n *\n * @param {Object} settings - service settings\n * @param {String} settings.text - text\n * @param {Function} settings.onSuccess - callback\n * @param {Function} settings.onFailure - callback\n *\n * @private\n */\n _requestAutoComplete: function _requestAutoComplete(settings) {\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!settings || Object.keys(settings).length === 0) {\n return;\n }\n\n // on ne fait pas de requête si la parametre 'text' est vide !\n if (!settings.text) {\n return;\n }\n logger.log(settings);\n var options = {};\n // on recupere les options du service\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.autocompleteOptions.serviceOptions);\n // ainsi que la recherche et les callbacks\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, settings);\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle ou la clé \"calcul\" par défaut.\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n apiKey: options.apiKey || this.options.apiKey\n });\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n ssl: this.options.ssl\n });\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Services.autoComplete(options);\n },\n /**\n * this method is called by this.onGeocodingSearch()\n * and fills the container of the location list.\n * it creates a HTML Element per location\n * (cf. this. ...)\n *\n * @param {Array} locations - Array of Gp.Services.AutoComplete.SuggestedLocation corresponding to autocomplete results list\n * @private\n */\n _fillAutoCompletedLocationListContainer: function _fillAutoCompletedLocationListContainer(locations) {\n if (!locations || locations.length === 0) {\n return;\n }\n\n // on vide la liste avant de la construire\n var element = this._suggestedContainer;\n if (element.childElementCount) {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n }\n for (var i = 0; i < locations.length; i++) {\n // Proposals are dynamically filled in Javascript by autocomplete service\n this._createAutoCompletedLocationElement(locations[i], i);\n }\n },\n /**\n * this method is called by this.onAutoCompleteSearch()\n * and executes a request to the service.\n *\n * @param {Object} settings - service settings\n * @param {String} settings.location - text\n * @param {Function} settings.onSuccess - callback\n * @param {Function} settings.onFailure - callback\n *\n * @private\n */\n _requestGeocoding: function _requestGeocoding(settings) {\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!settings || Object.keys(settings).length === 0) {\n return;\n }\n\n // on ne fait pas de requête si la parametre 'text' est vide !\n if (!settings.query) {\n return;\n }\n logger.log(settings);\n var options = {};\n // on recupere les options du service\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.geocodeOptions);\n // ainsi que la recherche, les filtres du geocodage avancé et les callbacks\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, settings);\n\n // on ajoute le paramètre index spécifiant les ressources.\n var resources = this.options.resources.geocode;\n if (resources) {\n // il se peut que l'utilisateur ait surchargé ce paramètre dans geocodeOptions,\n // ou qu'il ait déjà été rempli (cas de la recherche avancée)\n if (!options.index) {\n options.index = resources;\n }\n }\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle ou la clé \"calcul\" par défaut.\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n apiKey: options.apiKey || this.options.apiKey\n });\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, {\n ssl: this.options.ssl\n });\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Services.geocode(options);\n },\n /**\n * this method is called by this.onGeocodingSearch()\n * and fills the container of the location results.\n * it creates a HTML Element per location\n * (cf. this. ...)\n *\n * @param {Object[]} locations - locations\n *\n * @private\n */\n _fillGeocodedLocationListContainer: function _fillGeocodedLocationListContainer(locations) {\n if (!locations || locations.length === 0) {\n this._clearGeocodedLocation();\n return;\n }\n\n // on vide la liste avant de la construire\n var element = this._geocodedContainer;\n if (element.childElementCount) {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n }\n for (var i = 0; i < locations.length; i++) {\n logger.log(locations[i]);\n // Proposals are dynamically filled in Javascript by autocomplete service\n this._createGeocodedLocationElement(locations[i], i);\n }\n\n // sauvegarde de l'etat des locations\n this._geocodedLocations = locations;\n },\n /**\n * this method is called by Gp.Services.autoComplete callback in case of success\n * (cf. this.onAutoCompleteSearchText), for suggested locations with null coordinates\n * (case of postalCode research for instance).\n * Send a geocode request with suggested location 'fullText' attribute, to get its coordinates and display it in autocomplete results list container.\n *\n * @param {Gp.Services.AutoCompleteResponse.SuggestedLocation} suggestedLocation - autocompletion result (with null coordinates) to be geocoded\n * @param {Number} i - suggestedLocation position in Gp.Services.AutoCompleteResponse.suggestedLocations autocomplete results list\n * @private\n */\n _getGeocodeCoordinatesFromFullText: function _getGeocodeCoordinatesFromFullText(suggestedLocation, i) {\n var _location = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].getSuggestedLocationFreeform(suggestedLocation);\n var context = this;\n this._requestGeocoding({\n query: _location,\n // callback onSuccess\n onSuccess: function onSuccess(response) {\n logger.log(\"request from Geocoding (coordinates null)\", response);\n if (response.locations && response.locations.length !== 0 && response.locations[0].position) {\n // on modifie les coordonnées du résultat en EPSG:4326 donc lat,lon\n if (context._suggestedLocations && context._suggestedLocations[i]) {\n context._suggestedLocations[i].position = {\n lat: response.locations[0].position.y,\n lon: response.locations[0].position.x\n };\n // et on l'affiche dans la liste\n context._locationsToBeDisplayed.unshift(context._suggestedLocations[i]);\n context._fillAutoCompletedLocationListContainer(context._locationsToBeDisplayed);\n }\n }\n },\n // callback onFailure\n onFailure: function onFailure() {\n // si on n'a pas réussi à récupérer les coordonnées, on affiche quand même le résultat\n if (context._suggestedLocations && context._suggestedLocations[i]) {\n context._createAutoCompletedLocationElement(context._suggestedLocations[i], i);\n }\n }\n });\n },\n // ################################################################### //\n // ######################### other methods ########################### //\n // ################################################################### //\n\n /**\n * this sends the label to the input panel.\n *\n * FIXME appel en dur d'un identifiant CSS !\n *\n * @param {String} label - label suggested location\n *\n * @private\n */\n _setLabel: function _setLabel(label) {\n var element = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GPsearchInputText-\" + this._uid);\n element.value = label || \"\";\n },\n /**\n * this method is called by this.on*ResultsItemClick()\n * and move/zoom on a position.\n *\n * @param {Object} position - {x : ..., y : ...}\n * @param {Number} zoom - zoom level\n *\n * @private\n */\n _setPosition: function _setPosition(position, zoom) {\n var map = this._map;\n map.setZoomAround(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(position), zoom, true);\n map.panTo(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(position));\n },\n /**\n * this method is called by this.on*ResultsItemClick()\n * and get zoom.\n *\n * @param {Object} info - info\n *\n * @returns {Integer} zoom level\n *\n * @private\n */\n _getZoom: function _getZoom(info) {\n var map = this._map;\n var key = this.options.zoomTo;\n var zoom = null;\n\n // les valeurs du zooms sont determinées\n // soit par les mots clefs suivants : max, min ou auto\n // soit par un niveau de zoom\n // soit defini par l'utilisateur via une fonction\n\n if (typeof key === \"function\") {\n logger.trace(\"zoom function\");\n zoom = key.call(this, info);\n }\n if (typeof key === \"number\") {\n logger.trace(\"zoom level\");\n zoom = key;\n }\n if (typeof key === \"string\") {\n // if (key === \"max\") {\n // zoom = map.getMaxZoom();\n // } else if (key === \"min\") {\n // zoom = map.getMinZoom();\n // } else\n\n if (key === \"auto\") {\n logger.trace(\"zoom auto\");\n zoom = _Common_Utils_SearchEngineUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].zoomToResultsByDefault(info);\n } else {\n logger.trace(\"zoom level parsing\");\n var value = parseInt(key, 10);\n if (!isNaN(value)) {\n logger.trace(\"zoom parsing\");\n zoom = value;\n }\n }\n }\n\n // polyfill IE\n Number.isInteger = Number.isInteger || function (value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n };\n\n // test de validité du zoom,\n // on prend le zoom courant par defaut ...\n if (!zoom || zoom === \"\" || !Number.isInteger(zoom)) {\n logger.trace(\"zoom not found, current zoom...\");\n zoom = map.getZoom();\n }\n\n // test si le zoom est dans l'espace de la carte\n var min = map.getMinZoom();\n var max = map.getMaxZoom();\n if (zoom < min) {\n logger.trace(\"zoom level min...\");\n zoom = min;\n }\n if (zoom > max) {\n logger.trace(\"zoom level max...\");\n zoom = max;\n }\n logger.trace(\"zoom\", zoom);\n return zoom;\n },\n /**\n * this method is called by this.on*ResultsItemClick()\n * and displays a marker.\n * FIXME\n *\n * @param {Object} position - position {x : ..., y : ...}\n * @param {Object} information - suggested or geocoded information\n * @param {Boolean} display - display a popup information\n * @param {String} marker - style style\n *\n * @private\n */\n _setMarker: function _setMarker(position, information, display, marker) {\n var map = this._map;\n if (this._marker != null) {\n map.removeLayer(this._marker);\n this._marker = null;\n }\n if (position) {\n var _icon = null;\n if (typeof marker === \"string\") {\n _icon = new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__[\"default\"](marker);\n } else if (marker instanceof leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Icon) {\n _icon = marker;\n } else {\n _icon = new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"blue\");\n logger.log(\"Utilisation du marker par défaut !\");\n }\n\n // cf. http://leafletjs.com/reference.html#marker-options\n var options = {\n clickable: true,\n zIndexOffset: 1000,\n icon: _icon\n };\n this._marker = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.marker(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(position), options);\n this._marker.addTo(map);\n\n // FIXME\n // doit on mettre une information\n // - correctement construite ?\n // - uniquement informatif ?\n // - RIEN ?\n if (display) {\n var popupContent = null;\n if (typeof information !== \"string\") {\n if (information.service === \"GeocodedLocation\") {\n popupContent = \"
      \";\n var attributes = information.location.placeAttributes;\n for (var attr in attributes) {\n if (attributes.hasOwnProperty(attr)) {\n if (attr !== \"trueGeometry\" && attr !== \"extraFields\" && attr !== \"houseNumberInfos\" && attr !== \"_count\") {\n popupContent += \"
    • \";\n popupContent += \"\" + attr.toUpperCase() + \" : \";\n popupContent += attributes[attr];\n popupContent += \"
    • \";\n }\n }\n }\n popupContent += \"
    \";\n } else if (information.service === \"SuggestedLocation\") {\n popupContent = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].getSuggestedLocationFreeform(information.location);\n } else {\n popupContent = \"sans informations.\";\n }\n } else {\n popupContent = information;\n }\n this._marker.bindPopup(popupContent);\n }\n }\n },\n /**\n * this method is called by this.onSearchReset()\n * and it clears all results and the marker.\n *\n * @private\n */\n _clearResults: function _clearResults() {\n this._currentGeocodingLocation = null;\n this._clearSuggestedLocation();\n this._clearGeocodedLocation();\n this._setMarker();\n },\n /**\n * this method is called by this.onAutoCompleteSearchText()\n * and it clears all suggested location.\n *\n * @private\n */\n _clearSuggestedLocation: function _clearSuggestedLocation() {\n this._suggestedLocations = [];\n if (this._suggestedContainer) {\n while (this._suggestedContainer.firstChild) {\n this._suggestedContainer.removeChild(this._suggestedContainer.firstChild);\n }\n }\n },\n /**\n * this method is called by this.onGeocodingAdvancedSearchSubmit()\n * and it clears all geocoded location.\n *\n * @private\n */\n _clearGeocodedLocation: function _clearGeocodedLocation() {\n this._geocodedLocations = [];\n if (this._geocodedContainer) {\n while (this._geocodedContainer.firstChild) {\n this._geocodedContainer.removeChild(this._geocodedContainer.firstChild);\n }\n }\n },\n // ################################################################### //\n // ###################### other handlers events ###################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on 'GPshowSearchEnginePicto' tag label\n * (cf. this._createShowSearchEnginePictoElement), and it cleans the component\n * when it's closed.\n * FIXME\n *\n * @private\n */\n onShowSearchEngineClick: function onShowSearchEngineClick() {\n // FIXME on nettoie ou pas ?\n // this._clearResults();\n },\n /**\n * this method is called by event 'click' on 'GPsearchInputReset' tag div\n * (cf. this._createSearchInputElement), and it cleans the value of input.\n *\n * @private\n */\n onSearchResetClick: function onSearchResetClick() {\n this._clearResults();\n },\n // ################################################################### //\n // ################## handlers events AutoComplete ################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'keyup' on 'GPsearchInputText' tag input\n * (cf. this._createSearchInputElement), and it gets the value of input.\n * this value is passed as a parameter for the service autocomplete (text).\n * the results of the request are displayed into a drop down menu.\n * FIXME\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onAutoCompleteSearchText: function onAutoCompleteSearchText(e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n\n // on sauvegarde le localisant\n this._currentGeocodingLocation = value;\n\n // on limite les requêtes à partir de 3 car. saisie !\n if (value.length < 3) {\n return;\n }\n var _triggerGeocode = this.options.autocompleteOptions.triggerGeocode;\n var _triggerDelay = this.options.autocompleteOptions.triggerDelay;\n\n // INFORMATION\n // on effectue la requête au service d'autocompletion.\n // on met en place des callbacks afin de recuperer les resultats ou\n // les messages d'erreurs du service.\n // les resultats sont affichés dans une liste deroulante.\n // les messages d'erreurs sont affichés sur la console (?)\n\n var context = this;\n this._requestAutoComplete({\n text: value,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(\"request from AutoComplete\", results);\n if (results) {\n // on sauvegarde l'etat des résultats\n context._suggestedLocations = results.suggestedLocations;\n context._locationsToBeDisplayed = [];\n\n // on vérifie qu'on n'a pas récupéré des coordonnées nulles (par ex recherche par code postal)\n for (var i = 0; i < context._suggestedLocations.length; i++) {\n var ilocation = context._suggestedLocations[i];\n if (ilocation.position && ilocation.position.x === 0 && ilocation.position.y === 0 && ilocation.fullText) {\n // si les coordonnées sont nulles, il faut relancer une requête de géocodage avec l'attribut \"fullText\" récupéré\n context._getGeocodeCoordinatesFromFullText(ilocation, i);\n } else {\n // sinon on peut afficher normalement le résultat dans la liste\n context._locationsToBeDisplayed.push(ilocation);\n }\n }\n ;\n\n // on affiche les résultats qui n'ont pas des coordonnées nulles\n context._fillAutoCompletedLocationListContainer(context._locationsToBeDisplayed);\n // on annule eventuellement une requete de geocodage en cours car on obtient des\n // de nouveau des resultats d'autocompletion...\n if (context._triggerHandler) {\n clearTimeout(context._triggerHandler);\n context._triggerHandler = null;\n logger.warn(\"Cancel a geocode request !\");\n }\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME\n // où affiche t on les messages : ex. 'No suggestion matching the search' ?\n context._clearSuggestedLocation();\n logger.log(error.message);\n // on envoie une requete de geocodage si aucun resultat d'autocompletion\n // n'a été trouvé ! Et on n'oublie pas d'annuler celle qui est en cours !\n if (error.message === \"No suggestion matching the search\" && _triggerGeocode) {\n if (context._triggerHandler) {\n clearTimeout(context._triggerHandler);\n logger.warn(\"Cancel the last geocode request !\");\n }\n context._triggerHandler = setTimeout(function () {\n logger.warn(\"Launch a geocode request (code postal) !\");\n context._requestGeocoding({\n query: value,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(\"request from Geocoding\", results);\n if (results) {\n context._locationsToBeDisplayed = [];\n // on modifie la structure des reponses pour être\n // compatible avec l'autocompletion !\n var locations = results.locations;\n for (var i = 0; i < locations.length; i++) {\n var location = locations[i];\n location.fullText = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].getGeocodedLocationFreeform(location);\n location.position = {\n x: location.position.lon,\n y: location.position.lat\n };\n context._locationsToBeDisplayed.push(location);\n }\n context._fillAutoCompletedLocationListContainer(locations);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n logger.log(error.message);\n }\n });\n }, _triggerDelay);\n }\n }\n });\n },\n /**\n * this method is called by event 'click' on 'GPautoCompleteResultsList' tag div\n * (cf. this._createAutoCompleteListElement), and it selects the location.\n * this location displays a marker on the map.\n * FIXME\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onAutoCompletedResultsItemClick: function onAutoCompletedResultsItemClick(e) {\n var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].index(e.target.id);\n var label = e.target.innerHTML;\n logger.log(idx, label);\n logger.log(this._locationsToBeDisplayed[idx]);\n if (!idx) {\n return;\n }\n\n // FIXME\n // les coordonnées sont inversées entre les 2 services !?\n // AutoCompletion : lon/lat\n // Geocoding : lat/lon\n var position = {\n lat: this._locationsToBeDisplayed[idx].position.y,\n lon: this._locationsToBeDisplayed[idx].position.x\n };\n var info = {\n service: \"SuggestedLocation\",\n location: this._locationsToBeDisplayed[idx]\n };\n var zoom = this._getZoom(info);\n this._setLabel(label);\n this._setPosition(position, zoom);\n if (this.options.displayMarker) {\n this._setMarker(position, info, this.options.displayInfo, this.options.markerStyle);\n }\n\n /**\n * event triggered when an element of the results is clicked for autocompletion\n *\n * @event searchengine:autocomplete:click\n */\n this.fire(\"searchengine:autocomplete:click\", {\n data: this._locationsToBeDisplayed[idx]\n });\n },\n // ################################################################### //\n // ################### handlers events Geocode ####################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'submit' on 'GPsearchInput' tag form\n * (cf. this._createSearchInputElement), and it gets the value of input.\n * this value is passed as a parameter for the service geocoding.\n * the results of the request are displayed into a window.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onGeocodingSearchSubmit: function onGeocodingSearchSubmit(e) {\n logger.log(e);\n var value = e.target[0].value;\n if (!value) {\n return;\n }\n\n // on sauvegarde le localisant\n this._currentGeocodingLocation = value;\n\n // on met en place l'affichage des resultats dans une fenetre de recherche.\n var context = this;\n this._requestGeocoding({\n query: value,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(\"request from Geocoding\", results);\n if (results) {\n var locations = results.locations;\n context._fillGeocodedLocationListContainer(locations);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME cf. this.onAutoCompleteSearch()\n context._clearGeocodedLocation();\n logger.log(error.message);\n }\n });\n },\n /**\n * this method is called by event 'submit' on 'GPgeocodeResultsList' tag div\n * (cf. this._createGeocodeResultsListElement), and it selects the location.\n * this location displays a marker on the map.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onGeocodedResultsItemClick: function onGeocodedResultsItemClick(e) {\n var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__[\"default\"].index(e.target.id);\n var label = e.target.innerHTML;\n logger.log(idx, label);\n logger.log(this._geocodedLocations[idx]);\n if (!idx) {\n return;\n }\n var position = this._geocodedLocations[idx].position;\n var info = {\n service: \"GeocodedLocation\",\n location: this._geocodedLocations[idx]\n };\n var zoom = this._getZoom(info);\n this._setLabel(label);\n this._setPosition(position, zoom);\n if (this.options.displayMarker) {\n this._setMarker(position, info, this.options.displayInfo, this.options.markerStyle);\n }\n\n /**\n * event triggered when an element of the results is clicked for geocoding\n *\n * @event searchengine:geocode:click\n */\n this.fire(\"searchengine:geocode:click\", {\n data: this._geocodedLocations[idx]\n });\n },\n // ################################################################### //\n // ############## handlers events Geocode Advanced ################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'change' on 'GPadvancedSearchCode' tag select\n * (cf. this._createAdvancedSearchFormCodeElement), and it gets the value of\n * option selected.\n * this value is passed as a parameter to create the attributs container.\n *\n * @param {Object} e - HTMLElement\n *\n * @private\n */\n onGeocodingAdvancedSearchCodeChange: function onGeocodingAdvancedSearchCodeChange(e) {\n logger.log(e);\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n if (!value) {\n return;\n }\n\n // INFORMATION\n // le declenchement de l'evenement va creer un container de filtre à la volée...\n // l'insertion des containers d'attributs dans le DOM sont :\n // - soit GPadvancedSearchFilters > PositionOfInterest\n // - soit GPadvancedSearchFilters > StreetAddress\n // - soit GPadvancedSearchFilters > CadastralParcel\n // cf. _setFilter() pour la creation du container\n\n this._setFilter(value);\n },\n /**\n * this method is called by event 'submit' on 'GPadvancedSearchForm' tag form\n * (cf. this._createAdvancedSearchPanelFormElement), and it gets the value of all input.\n * this value is passed as a parameter for the service geocoding.\n * the results of the request are displayed into a window.\n * TODO\n *\n * @param {Object} e - HTMLElement\n * @param {Array} data - [{key : ..., value : ...}]\n *\n * @private\n */\n onGeocodingAdvancedSearchSubmit: function onGeocodingAdvancedSearchSubmit(e, data) {\n logger.log(data);\n if (!data || data.length === 0) {\n return;\n }\n\n // recuperation des parametres des filtres pour les transmettre\n // à la requête, ainsi que le type de table de ressources de geocodage,\n // et le localisant\n var _index = this._currentGeocodingCode;\n var inputSearchTextContainer = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GPsearchInputText-\" + this._uid);\n var _location = inputSearchTextContainer.value;\n var _filterOptions = {};\n for (var i = 0; i < data.length; i++) {\n var filter = data[i];\n if (filter.value) {\n _filterOptions[filter.key] = filter.value;\n }\n }\n\n // on met en place l'affichage des resultats dans une fenetre de recherche.\n var context = this;\n this._requestGeocoding({\n query: _location,\n index: _index,\n filters: _filterOptions,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results) {\n var locations = results.locations;\n context._fillGeocodedLocationListContainer(locations);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME cf. this.onAutoCompleteSearch()\n context._clearGeocodedLocation();\n logger.log(error.message);\n }\n });\n },\n // ################################################################### //\n // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ //\n // ################################################################### //\n\n /**\n * This method is public.\n * It allows to control the execution of a geocoding or an autocompletion.\n *\n * @param {String} text - location\n * @param {Boolean} type - true (geocoding) / false (autocompletion)\n * @param {Object} options - options\n */\n setText: function setText(text, type, options) {\n if (!this._showContainer.checked) {\n this._pictoContainer.click();\n }\n\n // on récupere les options des services\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(this.options, options);\n var element = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GPsearchInputText-\" + this._uid);\n element.value = text;\n if (type) {\n var form = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(\"GPsearchInput-\" + this._uid);\n form.dispatchEvent(new Event(\"submit\", {\n bubbles: true,\n cancelable: true\n }));\n } else {\n element.dispatchEvent(new KeyboardEvent(\"keyup\"));\n }\n }\n});\n\n/** mix in L.Evented into control */\nleaflet__WEBPACK_IMPORTED_MODULE_1___default.a.extend(SearchEngine.prototype, leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Evented.prototype);\n/* harmony default export */ __webpack_exports__[\"default\"] = (SearchEngine);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0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uX2FkdmFuY2VkU2VhcmNoQ29kZXMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZCA6IFwiUG9zaXRpb25PZkludGVyZXN0XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA6IFwiTGlldXgvdG9wb255bWVzXCJcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJTdHJlZXRBZGRyZXNzXCI6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2FkdmFuY2VkU2VhcmNoQ29kZXMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZCA6IFwiU3RyZWV0QWRkcmVzc1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgOiBcIkFkcmVzc2VzXCJcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJDYWRhc3RyYWxQYXJjZWxcIjpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYWR2YW5jZWRTZWFyY2hDb2Rlcy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkIDogXCJDYWRhc3RyYWxQYXJjZWxcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlIDogXCJQYXJjZWxsZXMgY2FkYXN0cmFsZXNcIlxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gcGFyIGTDqWZhdXQsIGF1IGNhcyBvw7kgYXVjdW5lIHJlc3NvdXJjZSBwYXNzw6llIGVuIG9wdGlvbiBuZSBjb3JyZXNwb25kIMOgIGNlbGxlcyBhdHR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nZXRTdWdnZXN0ZWRMb2NhdGlvbkZyZWVmb3JtKHN1Z2dlc3RlZExvY2F0aW9uKTtcblxuICAgICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG4gICAgICAgIHRoaXMuX3JlcXVlc3RHZW9jb2Rpbmcoe1xuICAgICAgICAgICAgcXVlcnkgOiBfbG9jYXRpb24sXG4gICAgICAgICAgICAvLyBjYWxsYmFjayBvblN1Y2Nlc3NcbiAgICAgICAgICAgIG9uU3VjY2VzcyA6IGZ1bmN0aW9uIChyZXNwb25zZSkge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJyZXF1ZXN0IGZyb20gR2VvY29kaW5nIChjb29yZGluYXRlcyBudWxsKVwiLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmxvY2F0aW9ucyAmJiByZXNwb25zZS5sb2NhdGlvbnMubGVuZ3RoICE9PSAwICYmIHJlc3BvbnNlLmxvY2F0aW9uc1swXS5wb3NpdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbiBtb2RpZmllIGxlcyBjb29yZG9ubsOpZXMgZHUgcsOpc3VsdGF0IGVuIEVQU0c6NDMyNiBkb25jIGxhdCxsb25cbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRleHQuX3N1Z2dlc3RlZExvY2F0aW9ucyAmJiBjb250ZXh0Ll9zdWdnZXN0ZWRMb2NhdGlvbnNbaV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQuX3N1Z2dlc3RlZExvY2F0aW9uc1tpXS5wb3NpdGlvbiA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXQgOiByZXNwb25zZS5sb2NhdGlvbnNbMF0ucG9zaXRpb24ueSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb24gOiByZXNwb25zZS5sb2NhdGlvbnNbMF0ucG9zaXRpb24ueFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICA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gICAgfVxuXG4gICAgICAgIGlmICh0eXBlb2Yga2V5ID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJ6b29tIGxldmVsXCIpO1xuICAgICAgICAgICAgem9vbSA9IGtleTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0eXBlb2Yga2V5ID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAvLyBpZiAoa2V5ID09PSBcIm1heFwiKSB7XG4gICAgICAgICAgICAvLyAgICAgem9vbSA9IG1hcC5nZXRNYXhab29tKCk7XG4gICAgICAgICAgICAvLyB9IGVsc2UgaWYgKGtleSA9PT0gXCJtaW5cIikge1xuICAgICAgICAgICAgLy8gICAgIHpvb20gPSBtYXAuZ2V0TWluWm9vbSgpO1xuICAgICAgICAgICAgLy8gfSBlbHNlXG5cbiAgICAgICAgICAgIGlmIChrZXkgPT09IFwiYXV0b1wiKSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiem9vbSBhdXRvXCIpO1xuICAgICAgICAgICAgICAgIHpvb20gPSBTZWFyY2hFbmdpbmVVdGlscy56b29tVG9SZXN1bHRzQnlEZWZhdWx0KGluZm8pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJ6b29tIGxldmVsIHBhcnNpbmdcIik7XG4gICAgICAgICAgICAgICAgdmFyIHZhbHVlID0gcGFyc2VJbnQoa2V5LCAxMCk7XG4gICAgICAgICAgICAgICAgaWYgKCFpc05hTih2YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiem9vbSBwYXJzaW5nXCIpO1xuICAgICAgICAgICAgICAgICAgICB6b29tID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gcG9seWZpbGwgSUVcbiAgICAgICAgTnVtYmVyLmlzSW50ZWdlciA9IE51bWJlci5pc0ludGVnZXIgfHwgZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICByZXR1cm4gdHlwZW9mIHZhbHVlID09PSBcIm51bWJlclwiICYmXG4gICAgICAgICAgICAgICAgaXNGaW5pdGUodmFsdWUpICYmXG4gICAgICAgICAgICAgICAgTWF0aC5mbG9vcih2YWx1ZSkgPT09IHZhbHVlO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8vIHRlc3QgZGUgdmFsaWRpdMOpIGR1IHpvb20sXG4gICAgICAgIC8vIG9uIHByZW5kIGxlIHpvb20gY291cmFudCBwYXIgZGVmYXV0IC4uLlxuICAgICAgICBpZiAoIXpvb20gfHwgem9vbSA9PT0gXCJcIiB8fCAhTnVtYmVyLmlzSW50ZWdlcih6b29tKSkge1xuICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiem9vbSBub3QgZm91bmQsIGN1cnJlbnQgem9vbS4uLlwiKTtcbiAgICAgICAgICAgIHpvb20gPSBtYXAuZ2V0Wm9vbSgpO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gdGVzdCBzaSBsZSB6b29tIGVzdCBkYW5zIGwnZXNwYWNlIGRlIGxhIGNhcnRlXG4gICAgICAgIHZhciBtaW4gPSBtYXAuZ2V0TWluWm9vbSgpO1xuICAgICAgICB2YXIgbWF4ID0gbWFwLmdldE1heFpvb20oKTtcbiAgICAgICAgaWYgKHpvb20gPCBtaW4pIHtcbiAgICAgICAgICAgIGxvZ2dlci50cmFjZShcInpvb20gbGV2ZWwgbWluLi4uXCIpO1xuICAgICAgICAgICAgem9vbSA9IG1pbjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoem9vbSA+IG1heCkge1xuICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiem9vbSBsZXZlbCBtYXguLi5cIik7XG4gICAgICAgICAgICB6b29tID0gbWF4O1xuICAgICAgICB9XG5cbiAgICAgICAgbG9nZ2VyLnRyYWNlKFwiem9v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2UgaWYgKG1hcmtlciBpbnN0YW5jZW9mIEwuSWNvbikge1xuICAgICAgICAgICAgICAgIF9pY29uID0gbWFya2VyO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBfaWNvbiA9IG5ldyBJY29uRGVmYXVsdChcImJsdWVcIik7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIlV0aWxpc2F0aW9uIGR1IG1hcmtlciBwYXIgZMOpZmF1dCAhXCIpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBjZi4gaHR0cDovL2xlYWZsZXRqcy5jb20vcmVmZXJlbmNlLmh0bWwjbWFya2VyLW9wdGlvbnNcbiAgICAgICAgICAgIHZhciBvcHRpb25zID0ge1xuICAgICAgICAgICAgICAgIGNsaWNrYWJsZSA6IHRydWUsXG4gICAgICAgICAgICAgICAgekluZGV4T2Zmc2V0IDogMTAwMCxcbiAgICAgICAgICAgICAgICBpY29uIDogX2ljb25cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMuX21hcmtlciA9IEwubWFya2VyKEwubGF0TG5nKHBvc2l0aW9uKSwgb3B0aW9ucyk7XG4gICAgICAgICAgICB0aGlzLl9tYXJrZXIuYWRkVG8obWFwKTtcblxuICAgICAgICAgICAgLy8gRklYTUVcbiAgICAgICAgICAgIC8vIGRvaXQgb24gbWV0dHJlIHVuZSBpbmZvcm1hdGlvblxuICAgICAgICAgICAgLy8gLSBjb3JyZWN0ZW1lbnQgY29uc3RydWl0ZSA/XG4gICAgICAgICAgICAvLyAtIHVuaXF1ZW1lbnQgaW5mb3JtYXRpZiA/XG4gICAgICAgICAgICAvLyAtIFJJRU4gP1xuICAgICAgICAgICAgaWYgKGRpc3BsYXkpIHtcbiAgICAgICAgICAgICAgICB2YXIgcG9wdXBDb250ZW50ID0gbnVsbDtcblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgaW5mb3JtYXRpb24gIT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGluZm9ybWF0aW9uLnNlcnZpY2UgPT09IFwiR2VvY29kZWRMb2NhdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwb3B1cENvbnRlbnQgPSBcIjx1bD5cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhdHRyaWJ1dGVzID0gaW5mb3JtYXRpb24ubG9jYXRpb24ucGxhY2VBdHRyaWJ1dGVzO1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgYXR0ciBpbiBhdHRyaWJ1dGVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGF0dHJpYnV0ZXMuaGFzT3duUHJvcGVydHkoYXR0cikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGF0dHIgIT09IFwidHJ1ZUdlb21ldHJ5XCIgJiYgYXR0ciAhPT0gXCJleHRyYUZpZWxkc1wiICYmIGF0dHIgIT09IFwiaG91c2VOdW1iZXJJbmZvc1wiICYmIGF0dHIgIT09IFwiX2NvdW50XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvcHVwQ29udGVudCArPSBcIjxsaT5cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvcHVwQ29udGVudCArPSBcIjxzcGFuIGNsYXNzPVxcXCJncC1hdHRuYW1lLW90aGVycy1zcGFuXFxcIj5cIiArIGF0dHIudG9VcHBlckNhc2UoKSArIFwiIDogPC9zcGFuPlwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9wdXBDb250ZW50ICs9IGF0dHJpYnV0ZXNbYXR0cl07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3B1cENvbnRlbnQgKz0gXCIgPC9saT5cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHBvcHVwQ29udGVudCArPSBcIiA8L3VsPlwiO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGluZm9ybWF0aW9uLnNlcnZpY2UgPT09IFwiU3VnZ2VzdGVkTG9jYXRpb25cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcG9wdXBDb250ZW50ID0gR2VvY29kZVV0aWxzLmdldFN1Z2dlc3RlZExvY2F0aW9uRnJlZWZvcm0oaW5mb3JtYXRpb24ubG9jYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcG9wdXBDb250ZW50ID0gXCJzYW5zIGluZm9ybWF0aW9ucy5cIjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHBvcHVwQ29udGVudCA9IGluZm9ybWF0aW9uO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMuX21hcmtlci5iaW5kUG9wdXAocG9wdXBDb250ZW50KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiB0aGlzIG1ldGhvZCBpcyBjYWxsZWQgYnkgdGhpcy5vblNlYXJjaFJlc2V0KClcbiAgICAgKiBhbmQgaXQgY2xlYXJzIGFsbCByZXN1bHRzIGFuZCB0aGUgbWFya2VyLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBfY2xlYXJSZXN1bHRzIDogZnVuY3Rpb24gKCkge1xuICAgICAgICB0aGlzLl9jdXJyZW50R2VvY29kaW5nTG9jYXRpb24gPSBudWxsO1xuXG4gICAgICAgIHRoaXMuX2NsZWFyU3VnZ2VzdGVkTG9jYXRpb24oKTtcbiAgICAgICAgdGhpcy5fY2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KyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpbG9jYXRpb24gPSBjb250ZXh0Ll9zdWdnZXN0ZWRMb2NhdGlvbnNbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaWxvY2F0aW9uLnBvc2l0aW9uICYmIGlsb2NhdGlvbi5wb3NpdGlvbi54ID09PSAwICYmIGlsb2NhdGlvbi5wb3NpdGlvbi55ID09PSAwICYmIGlsb2NhdGlvbi5mdWxsVGV4dCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNpIGxlcyBjb29yZG9ubsOpZXMgc29udCBudWxsZXMsIGlsIGZhdXQgcmVsYW5jZXIgdW5lIHJlcXXDqnRlIGRlIGfDqW9jb2RhZ2UgYXZlYyBsJ2F0dHJpYnV0IFwiZnVsbFRleHRcIiByw6ljdXDDqXLDqVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQuX2dldEdlb2NvZGVDb29yZGluYXRlc0Zyb21GdWxsVGV4dChpbG9jYXRpb24sIGkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBzaW5vbiBvbiBwZXV0IGFmZmljaGVyIG5vcm1hbGVtZW50IGxlIHLDqXN1bHRhdCBkYW5zIGxhIGxpc3RlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dC5fbG9jYXRpb25zVG9CZURpc3BsYXllZC5wdXNoKGlsb2NhdGlvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gb24gYWZmaWNoZSBsZXMgcsOpc3VsdGF0cyBxdWkgbidvbnQgcGFzIGRlcyBjb29yZG9ubsOpZXMgbnVsbGVzXG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQuX2ZpbGxBdXRvQ29tcGxldGVkTG9jYXRpb25MaXN0Q29udGFpbmVyKGNvbnRleHQuX2xvY2F0aW9uc1RvQmVEaXNwbGF5ZWQpO1xuICAgICAgICAgICAgICAgICAgICAvLyBvbiBhbm51bGUgZXZlbnR1ZWxsZW1lbnQgdW5lIHJlcXVldGUgZGUgZ2VvY29kYWdlIGVuIGNvdXJzIGNhciBvbiBvYnRpZW50IGRlc1xuICAgICAgICAgICAgICAgICAgICAvLyBkZSBub3V2ZWF1IGRlcyByZXN1bHRhdHMgZCdhdXRvY29tcGxldGlvbi4uLlxuICAgICAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5fdHJpZ2dlckhhbmRsZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChjb250ZXh0Ll90cmlnZ2VySGFuZGxlcik7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0Ll90cmlnZ2VySGFuZGxlciA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIud2FybihcIkNhbmNlbCBhIGdlb2NvZGUgcmVxdWVzdCAhXCIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGNhbGxiYWNrIG9uRmFpbHVyZVxuICAgICAgICAgICAgb25GYWlsdXJlIDogZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgLy8gRklYTUVcbiAgICAgICAgICAgICAgICAvLyBvw7kgYWZmaWNoZSB0IG9uIGxlcyBtZXNzYWdlcyA6IGV4LiAnTm8gc3VnZ2VzdGlvbiBtYXRjaGluZyB0aGUgc2VhcmNoJyA/XG4gICAgICAgICAgICAgICAgY29udGV4dC5fY2xlYXJTdWdnZXN0ZWRMb2NhdGlvbigpO1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgLy8gb24gZW52b2llIHVuZSByZXF1ZXRlIGRlIGdlb2NvZGFnZSBzaSBhdWN1biByZXN1bHRhdCBkJ2F1dG9jb21wbGV0aW9uXG4gICAgICAgICAgICAgICAgLy8gbidhIMOpdMOpIHRyb3V2w6kgISBFdCBvbiBuJ291YmxpZSBwYXMgZCdhbm51bGVyIGNlbGxlIHF1aSBlc3QgZW4gY291cnMgIVxuICAgICAgICAgICAgICAgIGlmIChlcnJvci5tZXNzYWdlID09PSBcIk5vIHN1Z2dlc3Rpb24gbWF0Y2hpbmcgdGhlIHNlYXJjaFwiICYmIF90cmlnZ2VyR2VvY29kZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5fdHJpZ2dlckhhbmRsZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChjb250ZXh0Ll90cmlnZ2VySGFuZGxlcik7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIud2FybihcIkNhbmNlbCB0aGUgbGFzdCBnZW9jb2RlIHJlcXVlc3QgIVwiKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250ZXh0Ll90cmlnZ2VySGFuZGxlciA9IHNldFRpbWVvdXQoXG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLndhcm4oXCJMYXVuY2ggYSBnZW9jb2RlIHJlcXVlc3QgKGNvZGUgcG9zdGFsKSAhXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRleHQuX3JlcXVlc3RHZW9jb2Rpbmcoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWVyeSA6IHZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjYWxsYmFjayBvblN1Y2Nlc3NcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25TdWNjZXNzIDogZnVuY3Rpb24gKHJlc3VsdHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJyZXF1ZXN0IGZyb20gR2VvY29kaW5nXCIsIHJlc3VsdHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0Ll9sb2NhdGlvbnNUb0JlRGlzcGxheWVkID0gW107XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gb24gbW9kaWZpZSBsYSBzdHJ1Y3R1cmUgZGVzIHJlcG9uc2VzIHBvdXIgw6p0cmVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjb21wYXRpYmxlIGF2ZWMgbCdhdXRvY29tcGxldGlvbiAhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxvY2F0aW9ucyA9IHJlc3VsdHMubG9jYXRpb25zO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbG9jYXRpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsb2NhdGlvbiA9IGxvY2F0aW9uc1tpXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uZnVsbFRleHQgPSBHZW9jb2RlVXRpbHMuZ2V0R2VvY29kZWRMb2NhdGlvbkZyZWVmb3JtKGxvY2F0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24ucG9zaXRpb24gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4IDogbG9jYXRpb24ucG9zaXRpb24ubG9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeSA6IGxvY2F0aW9uLnBvc2l0aW9uLmxhdFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0Ll9sb2NhdGlvbnNUb0JlRGlzcGxheWVkLnB1c2gobG9jYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0Ll9maWxsQXV0b0NvbXBsZXRlZExvY2F0aW9uTGlzdENvbnRhaW5lcihsb2NhdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjYWxsYmFjayBvbkZhaWx1cmVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25GYWlsdXJlIDogZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIubG9nKGVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBfdHJpZ2dlckRlbGF5XG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaXMgY2FsbGVkIGJ5IGV2ZW50ICdjbGljaycgb24gJ0dQYXV0b0NvbXBsZXRlUmVzdWx0c0xpc3QnIHRhZyBkaXZcbiAgICAgKiAoY2YuIHRoaXMuX2NyZWF0ZU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V0cmUgZGUgcmVjaGVyY2hlLlxuICAgICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG4gICAgICAgIHRoaXMuX3JlcXVlc3RHZW9jb2Rpbmcoe1xuICAgICAgICAgICAgcXVlcnkgOiB2YWx1ZSxcbiAgICAgICAgICAgIC8vIGNhbGxiYWNrIG9uU3VjY2Vzc1xuICAgICAgICAgICAgb25TdWNjZXNzIDogZnVuY3Rpb24gKHJlc3VsdHMpIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwicmVxdWVzdCBmcm9tIEdlb2NvZGluZ1wiLCByZXN1bHRzKTtcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0cykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbG9jYXRpb25zID0gcmVzdWx0cy5sb2NhdGlvbnM7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQuX2ZpbGxHZW9jb2RlZExvY2F0aW9uTGlzdENvbnRhaW5lcihsb2NhdGlvbnMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBjYWxsYmFjayBvbkZhaWx1cmVcbiAgICAgICAgICAgIG9uRmFpbHVyZSA6IGZ1bmN0aW9uIChlcnJvcikge1xuICAgICAgICAgICAgICAgIC8vIEZJWE1FIGNmLiB0aGlzLm9uQXV0b0NvbXBsZXRlU2VhcmNoKClcbiAgICAgICAgICAgICAgICBjb250ZXh0Ll9jbGVhckdlb2NvZGVkTG9jYXRpb24oKTtcbiAgICAgICAgICAgICAgICBsb2dnZXIubG9nKGVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaXMgY2FsbGVkIGJ5IGV2ZW50ICdzdWJtaXQnIG9uICdHUGdlb2NvZGVSZXN1bHRzTGlzdCcgdGFnIGRpdlxuICAgICAqIChjZi4gdGhpcy5fY3JlYXRlR2VvY29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ZGlzcGF0Y2hFdmVudChuZXcgS2V5Ym9hcmRFdmVudChcImtleXVwXCIpKTtcbiAgICAgICAgfVxuICAgIH1cbn0pO1xuXG4vKiogbWl4IGluIEwuRXZlbnRlZCBpbnRvIGNvbnRyb2wgKi9cbkwuZXh0ZW5kKFNlYXJjaEVuZ2luZS5wcm90b3R5cGUsIEwuRXZlbnRlZC5wcm90b3R5cGUpO1xuXG5leHBvcnQgZGVmYXVsdCBTZWFyY2hFbmdpbmU7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/SearchEngine.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Controls/Utils/IconDefault.js": +/*!***************************************************!*\ + !*** ./src/Leaflet/Controls/Utils/IconDefault.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getLogger(\"icondefault\");\n\n/**\n * @classdesc\n *\n * **Extends** Leaflet L.Icon.Default native class.\n */\nvar IconDefault = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Icon.Default.extend( /** @lends IconDefault.prototype */{\n /**\n * Liste des icones\n * TODO : image retina à convertir en x2...\n */\n images: {\n retina: {\n shadow: \"data:image/png;base64,...\",\n color: {\n blue: \"data:image/png;base64,...\",\n orange: \"data:image/png;base64,...\",\n red: \"data:image/png;base64,...\",\n green: \"data:image/png;base64,...\"\n }\n },\n shadow: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAYAAACoYAD2AAAC5ElEQVRYw+2YW4/TMBCF45S0S1luXZCABy5CgLQgwf//S4BYBLTdJLax0fFqmB07nnQfEGqkIydpVH85M+NLjPe++dcPc4Q8Qh4hj5D/AaQJx6H/4TMwB0PeBNwU7EGQAmAtsNfAzoZkgIa0ZgLMa4Aj6CxIAsjhjOCoL5z7Glg1JAOkaicgvQBXuncwJAWjksLtBTWZe04CnYRktUGdilALppZBOgHGZcBzL6OClABvMSVIzyBjazOgrvACf1ydC5mguqAVg6RhdkSWQFj2uxfaq/BrIZOLEWgZdALIDvcMcZLD8ZbLC9de4yR1sYMi4G20S4Q/PWeJYxTOZn5zJXANZHIxAd4JWhPIloTJZhzMQduM89WQ3MUVAE/RnhAXpTycqys3NZALOBbB7kFrgLesQl2h45Fcj8L1tTSohUwuxhy8H/Qg6K7gIs+3kkaigQCOcyEXCHN07wyQazhrmIulvKMQAwMcmLNqyCVyMAI+BuxSMeTk3OPikLY2J1uE+VHQk6ANrhds+tNARqBeaGc72cK550FP4WhXmFmcMGhTwAR1ifOe3EvPqIegFmF+C8gVy0OfAaWQPMR7gF1OQKqGoBjq90HPMP01BUjPOqGFksC4emE48tWQAH0YmvOgF3DST6xieJgHAWxPAHMuNhrImIdvoNOKNWIOcE+UXE0pYAnkX6uhWsgVXDxHdTfCmrEEmMB2zMFimLVOtiiajxiGWrbU52EeCdyOwPEQD8LqyPH9Ti2kgYMf4OhSKB7qYILbBv3CuVTJ11Y80oaseiMWOONc/Y7kJYe0xL2f0BaiFTxknHO5HaMGMublKwxFGzYdWsBF174H/QDknhTHmHHN39iWFnkZx8lPyM8WHfYELmlLKtgWNmFNzQcC1b47gJ4hL19i7o65dhH0Negbca8vONZoP7doIeOC9zXm8RjuL0Gf4d4OYaU5ljo3GYiqzrWQHfJxA6ALhDpVKv9qY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wkrMzp/nt+Bv0DKbwVUCj0VxxeEAQJKneDRErz/siAk5ONueiJzI7MrAirroe4zJC70NFphem+PnkUWzkUH6CZG9A364iXsKjulTprK98nqV6Fde0F/72/Q8+8hGh8u+fvl/Y89rVWn/tQDaXI6wu3e8ZYYzxLflsjlymU2UN2yAO4zUbVXNeIyLHAHzuJ/w1XY7/mN7mWKUBJHZUy9UttehsMUtYD7EN8/6lZ69fBmiFCxDLuWhBT0b90aN+zm9r/0EfEdfywjLaddRXJ45aYCxa0PjKp53FB0CqN0mzGWFC88/Lz12/sKIzrpjn5FRzLioZZ/B6fMTxQFAkiBY04mS0szOuYKlOHG0g8mazFOGlFGJly0jmfXQ9Rpf1bUT+tG6PX87PiWg+aiDgpbyWpLeARKCIyjHA6JWRG3ZVjxdWojJxpAT8rjkX4We9LSU7KATYhiWu6Bng9OpxtVYCxTHWLEX2XmE6tzGUnyAqx4hj7MrIDd1FsjpcIkJl4oXbYuW8rhqSfUkkduvCSymsdkRzUUmsvLWWp2o9OYqTsWhRb6pcP+ujyzHi5OTVH/8rXJNkLU9EhOrUCxdNzVw1NUN6ILlmsv2MhxhHcy4KgRPr5awr8Z3ghC7r5Uru3oif8YgWNMAb135ys7I+yYbx4O24aiZt5Ej2JjsvGSkPBKJ5rRHGNlLfuuESESqTP7IiLW+UrxBLG0E+aFW3cOrakZuzG5JsHC4BOKUrpuRM64ojTlB+AhGhOa8tMLpZHanN1FOZ/GEIvBlXYvweBSIk+wJ0q7r/8PejN6c3JdnSCevkZLSgtdhWLsSBLmtYdRD+H+ESKlOHZ8XJqbgaExQC4iWD0+58Zerwra2RbM7B8qX8hK7EiBN0WSPC6OoOun5O2NpbnT78kdXunKlbbOQuVqcPX5YtsqgH636M6bIGYbTj/rN5Trb+VKdHLtqme6s6PfLug9j9D/FCc1g2qf7VAAAAAElFTkSuQmCC\"\n }\n },\n /**\n * constructor\n * (extend to L.Icon.Default)\n *\n * @param {String} color - blue, green or red, blue by default.\n * @param {Object} options - options of L.Icon\n */\n initialize: function initialize(color, options) {\n // on merge les options avec celles par defaut\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(this.options, options);\n var _color = null;\n var _images = /* (L.Browser.retina) ? this.images.retina : */this.images;\n switch (color) {\n case \"red\":\n _color = _images.color.red;\n break;\n case \"green\":\n _color = _images.color.green;\n break;\n case \"orange\":\n _color = _images.color.orange;\n break;\n case \"blue\":\n _color = _images.color.blue;\n break;\n default:\n _color = _images.color.blue;\n }\n\n // icones classiques\n this.options.iconUrl = _color;\n this.options.shadowUrl = _images.shadow;\n\n // icones pour écran Retina\n if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Browser.retina) {\n this.options.iconRetinaUrl = _color;\n this.options.shadowRetinaUrl = _images.shadow;\n }\n },\n /**\n * Overload function to ensure compatibility between versions 0.7.X and 1.0.X\n * (extend to L.Icon._getIconUrl)\n *\n * @param {String} name - name\n *\n * @returns {String} url\n *\n */\n _getIconUrl: function _getIconUrl(name) {\n logger.trace(\"OVERWRITTEN L.Icon.Default._getIconUrl(\" + name + \")\");\n return leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Icon.prototype._getIconUrl.call(this, name);\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (IconDefault);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL1V0aWxzL0ljb25EZWZhdWx0LmpzP2RhYjMiXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiSWNvbkRlZmF1bHQiLCJMIiwiSWNvbiIsIkRlZmF1bHQiLCJleHRlbmQiLCJpbWFnZXMiLCJyZXRpbmEiLCJzaGFkb3ciLCJjb2xvciIsImJsdWUiLCJvcmFuZ2UiLCJyZWQiLCJncmVlbiIsImluaXRpYWxpemUiLCJvcH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W47XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwib3JhbmdlXCI6XG4gICAgICAgICAgICAgICAgX2NvbG9yID0gX2ltYWdlcy5jb2xvci5vcmFuZ2U7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwiYmx1ZVwiOlxuICAgICAgICAgICAgICAgIF9jb2xvciA9IF9pbWFnZXMuY29sb3IuYmx1ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgX2NvbG9yID0gX2ltYWdlcy5jb2xvci5ibHVlO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gaWNvbmVzIGNsYXNzaXF1ZXNcbiAgICAgICAgdGhpcy5vcHRpb25zLmljb25VcmwgPSBfY29sb3I7XG4gICAgICAgIHRoaXMub3B0aW9ucy5zaGFkb3dVcmwgPSBfaW1hZ2VzLnNoYWRvdztcblxuICAgICAgICAvLyBpY29uZXMgcG91ciDDqWNyYW4gUmV0aW5hXG4gICAgICAgIGlmIChMLkJyb3dzZXIucmV0aW5hKSB7XG4gICAgICAgICAgICB0aGlzLm9wdGlvbnMuaWNvblJldGluYVVybCA9IF9jb2xvcjtcbiAgICAgICAgICAgIHRoaXMub3B0aW9ucy5zaGFkb3dSZXRpbmFVcmwgPSBfaW1hZ2VzLnNoYWRvdztcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBPdmVybG9hZCBmdW5jdGlvbiB0byBlbnN1cmUgY29tcGF0aWJpbGl0eSBiZXR3ZWVuIHZlcnNpb25zIDAuNy5YIGFuZCAxLjAuWFxuICAgICAqIChleHRlbmQgdG8gTC5JY29uLl9nZXRJY29uVXJsKVxuICAgICAqXG4gICAgICogQHBhcmFtIHtTdHJpbmd9IG5hbWUgLSBuYW1lXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSB1cmxcbiAgICAgKlxuICAgICAqL1xuICAgIF9nZXRJY29uVXJsIDogZnVuY3Rpb24gKG5hbWUpIHtcbiAgICAgICAgbG9nZ2VyLnRyYWNlKFwiT1ZFUldSSVRURU4gTC5JY29uLkRlZmF1bHQuX2dldEljb25VcmwoXCIgKyBuYW1lICsgXCIpXCIpO1xuICAgICAgICByZXR1cm4gTC5JY29uLnByb3RvdHlwZS5fZ2V0SWNvblVybC5jYWxsKHRoaXMsIG5hbWUpO1xuICAgIH1cbn0pO1xuXG5leHBvcnQgZGVmYXVsdCBJY29uRGVmYXVsdDtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/Utils/IconDefault.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Controls/Utils/PositionFormater.js": +/*!********************************************************!*\ + !*** ./src/Leaflet/Controls/Utils/PositionFormater.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n* implementation :\n* cf. http://uihacker.blogspot.fr/2011/07/javascript-formatting-latitudelongitude.html?m=1\n* cf. http://andrew.hedges.name/experiments/convert_lat_long/\n* FIXME formater la sortie\n* cf. http://mottie.github.io/javascript-number-formatter/\n* cf. https://github.com/j-/number-formatter\n*\n*/\n/** ... */\nvar PositionFormater = {\n /** ... */\n NORTH: \"N\",\n /** ... */\n SOUTH: \"S\",\n /** ... */\n EAST: \"E\",\n /** ... */\n WEST: \"O\",\n /** ... */\n digitSecond: 2,\n /** ... */\n digitDecimal: 5,\n /** ... */\n digitRadian: 8,\n /**\n * @param {Number} inputNum -inputNum\n * @param {Integer} numPoints - numPoints\n *\n * @returns {Number} rounded result\n */\n roundToDecimal: function roundToDecimal(inputNum, numPoints) {\n var multiplier = Math.pow(10, numPoints);\n return Math.round(inputNum * multiplier) / multiplier;\n },\n /**\n * @param {Number} location -location\n *\n * @returns {Number} location in radian\n */\n decimalToRadian: function decimalToRadian(location) {\n var d = 0.01745329251994329577;\n return this.roundToDecimal(location * d, this.digitRadian);\n },\n /**\n * @param {Number} location -location\n *\n * @returns {Number} location in grade\n */\n decimalToGrade: function decimalToGrade(location) {\n var d = 1.11111111111111111111;\n return this.roundToDecimal(location * d, this.digitRadian);\n },\n /**\n * @param {Number} location -location\n * @param {String} hemisphere -hemisphere\n * @param {Boolean} obj -specifies if an object must be returned\n *\n * @returns {String|Object} DMS (String or Object depending on obj parameter value)\n */\n decimalToDMS: function decimalToDMS(location, hemisphere, obj) {\n if (location < 0) {\n location *= -1; // strip dash '-'\n }\n\n var degrees = Math.floor(location); // strip decimal remainer for degrees\n var minutesFromRemainder = (location - degrees) * 60; // multiply the remainer by 60\n var minutes = Math.floor(minutesFromRemainder); // get minutes from integer\n var secondsFromRemainder = (minutesFromRemainder - minutes) * 60; // multiply the remainer by 60\n var seconds = this.roundToDecimal(secondsFromRemainder, this.digitSecond); // get minutes by rounding to integer\n\n var dms = degrees + \"° \" + minutes + \"' \" + seconds + \"\\\" \";\n if (hemisphere) {\n dms += hemisphere;\n }\n if (obj) {\n return {\n d: degrees,\n m: minutes,\n s: seconds,\n direction: hemisphere\n };\n }\n return dms;\n },\n /**\n * @param {Number} location -location\n * @param {Boolean} obj -specifies if an object must be returned\n *\n * @returns {String|Object} DMS (String or Object depending on obj parameter value)\n */\n decimalLatToDMS: function decimalLatToDMS(location, obj) {\n var hemisphere = location < 0 ? this.SOUTH : this.NORTH; // south if negative\n return this.decimalToDMS(location, hemisphere, obj);\n },\n /**\n * @param {Number} location -location\n * @param {Boolean} obj -specifies if an object must be returned\n *\n * @returns {String|Object} DMS (String or Object depending on obj parameter value)\n */\n decimalLonToDMS: function decimalLonToDMS(location, obj) {\n var hemisphere = location < 0 ? this.WEST : this.EAST; // west if negative\n return this.decimalToDMS(location, hemisphere, obj);\n },\n /**\n * @param {Number} degrees -degrees\n * @param {Number} minutes -minutes\n * @param {Number} seconds -seconds\n * @param {String} hemisphere -hemisphere\n *\n * @returns {Number} decimal\n */\n DMSToDecimal: function DMSToDecimal(degrees, minutes, seconds, hemisphere) {\n var ddVal = degrees + minutes / 60 + seconds / 3600;\n ddVal = hemisphere === this.SOUTH || hemisphere === this.WEST ? ddVal * -1 : ddVal;\n var decimal = this.roundToDecimal(ddVal, this.digitDecimal);\n return decimal;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PositionFormater);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0NvbnRyb2xzL1V0aWxzL1Bvc2l0aW9uRm9ybWF0ZXIuanM/MzhmZCJdLCJuYW1lcyI6WyJQb3NpdGlvbkZvcm1hdGVyIiwiTk9SVEgiLCJTT1VUSCIsIkVBU1QiLCJXRVNUIiwiZGlnaXRTZWNvbmQiLCJkaWdpdERlY2ltYWwiLCJkaWdpdFJhZGlhbiIsInJvdW5kVG9EZWNpbWFsIiwiaW5wdXROdW0iLCJudW1Qb2ludHMiLCJtdWx0aXBsaWVyIiwiTWF0aCIsInBvdyIsInJvdW5kIiwiZGVjaW1hbFRvUmFkaWFuIiwibG9jYXRpb24iLCJkIiwiZGVjaW1hbFRvR3JhZGUiLCJkZWNpbWFsVG9ETVMiLCJoZW1pc3BoZXJlIiwib2JqIiwiZGVncmVlcyIsImZsb29yIiwibWludXRlc0Zyb21SZW1haW5kZXIiLCJtaW51dGVzIiwic2Vjb25kc0Zyb21SZW1haW5kZXIiLCJzZWNvbmRzIiwiZG1zIiwibSIsInMiLCJkaXJlY3Rpb24iLCJkZWNpbWFsTGF0VG9ETVMiLCJkZWNpbWFsTG9uVG9ETVMiLCJETVNUb0RlY2ltYWwiLCJkZFZhbCIsImRlY2ltYWwiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUF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GdldCBtaW51dGVzIGZyb20gaW50ZWdlclxuICAgICAgICB2YXIgc2Vjb25kc0Zyb21SZW1haW5kZXIgPSAobWludXRlc0Zyb21SZW1haW5kZXIgLSBtaW51dGVzKSAqIDYwOyAvLyBtdWx0aXBseSB0aGUgcmVtYWluZXIgYnkgNjBcbiAgICAgICAgdmFyIHNlY29uZHMgPSB0aGlzLnJvdW5kVG9EZWNpbWFsKHNlY29uZHNGcm9tUmVtYWluZGVyLCB0aGlzLmRpZ2l0U2Vjb25kKTsgLy8gZ2V0IG1pbnV0ZXMgYnkgcm91bmRpbmcgdG8gaW50ZWdlclxuXG4gICAgICAgIHZhciBkbXMgPSBkZWdyZWVzICsgXCLCsCBcIiArIG1pbnV0ZXMgKyBcIicgXCIgKyBzZWNvbmRzICsgXCJcXFwiIFwiO1xuICAgICAgICBpZiAoaGVtaXNwaGVyZSkge1xuICAgICAgICAgICAgZG1zICs9IGhlbWlzcGhlcmU7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob2JqKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIGQgOiBkZWdyZWVzLFxuICAgICAgICAgICAgICAgIG0gOiBtaW51dGVzLFxuICAgICAgICAgICAgICAgIHMgOiBzZWNvbmRzLFxuICAgICAgICAgICAgICAgIGRpcmVjdGlvbiA6IGhlbWlzcGhlcmVcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZG1zO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBAcGFyYW0ge051bWJlcn0gbG9jYXRpb24gLWxvY2F0aW9uXG4gICAgICogQHBhcmFtIHtCb29sZWFufSBvYmogLXNwZWNpZmllcyBpZiBhbiBvYmplY3QgbXVzdCBiZSByZXR1cm5lZFxuICAgICAqXG4gICAgICogQHJldHVybnMge1N0cmluZ3xPYmplY3R9IERNUyAoU3RyaW5nIG9yIE9iamVjdCBkZXBlbmRpbmcgb24gb2JqIHBhcmFtZXR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bSB7U3RyaW5nfSBoZW1pc3BoZXJlIC1oZW1pc3BoZXJlXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7TnVtYmVyfSBkZWNpbWFsXG4gICAgICovXG4gICAgRE1TVG9EZWNpbWFsIDogZnVuY3Rpb24gKGRlZ3JlZXMsIG1pbnV0ZXMsIHNlY29uZHMsIGhlbWlzcGhlcmUpIHtcbiAgICAgICAgdmFyIGRkVmFsID0gZGVncmVlcyArIG1pbnV0ZXMgLyA2MCArIHNlY29uZHMgLyAzNjAwO1xuICAgICAgICBkZFZhbCA9IChoZW1pc3BoZXJlID09PSB0aGlzLlNPVVRIIHx8IGhlbWlzcGhlcmUgPT09IHRoaXMuV0VTVCkgPyBkZFZhbCAqIC0xIDogZGRWYWw7XG5cbiAgICAgICAgdmFyIGRlY2ltYWwgPSB0aGlzLnJvdW5kVG9EZWNpbWFsKGRkVmFsLCB0aGlzLmRpZ2l0RGVjaW1hbCk7XG4gICAgICAgIHJldHVybiBkZWNpbWFsO1xuICAgIH1cblxufTtcblxuZXhwb3J0IGRlZmF1bHQgUG9zaXRpb25Gb3JtYXRlcjtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/Controls/Utils/PositionFormater.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Layers/LayerConfig.js": +/*!*******************************************!*\ + !*** ./src/Leaflet/Layers/LayerConfig.js ***! + \*******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Utils/Config */ \"./src/Common/Utils/Config.js\");\n/* harmony import */ var _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/LayerUtils */ \"./src/Common/Utils/LayerUtils.js\");\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"layer-config\");\n\n/**\n * @classdesc\n *\n * Configuration des couches Geoportail via l'appel de la configuration.\n * @private\n */\nvar LayerConfig = {\n /**\n * options : key, layer, service\n *\n * @param {Object} options - options\n *\n * @returns {Object} layer parameters\n */\n get: function get(options) {\n var params = {};\n if (!_Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isConfigLoaded()) {\n logger.warn(\"WARNING CONFIG_FAILED : config not loaded ?!\");\n return;\n }\n\n // gestion des parametres\n params = _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__[\"default\"].configuration.getLayerParams(options.layer, options.service);\n if (!params || Object.keys(params).length === 0) {\n logger.warn(\"WARNING CONFIG_FAILED : params not found ?!\");\n return;\n }\n\n // gestion des zoom\n params.minZoom = _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getZoomLevelFromScaleDenominator(params.maxScale) || 1;\n params.maxZoom = _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getZoomLevelFromScaleDenominator(params.minScale) || 21;\n return params;\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (LayerConfig);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0xheWVycy9MYXllckNvbmZpZy5qcz9mZGZhIl0sIm5hbWVzIjpbImxvZ2dlciIsIkxvZ2dlciIsImdldExvZ2dlciIsIkxheWVyQ29uZmlnIiwiZ2V0Iiwib3B0aW9ucyIsInBhcmFtcyIsIkNvbmZpZyIsImlzQ29uZmlnTG9hZGVkIiwid2FybiIsImN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AgICB2YXIgcGFyYW1zID0ge307XG5cbiAgICAgICAgaWYgKCFDb25maWcuaXNDb25maWdMb2FkZWQoKSkge1xuICAgICAgICAgICAgbG9nZ2VyLndhcm4oXCJXQVJOSU5HIENPTkZJR19GQUlMRUQgOiBjb25maWcgbm90IGxvYWRlZCA/IVwiKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGdlc3Rpb24gZGVzIHBhcmFtZXRyZXNcbiAgICAgICAgcGFyYW1zID0gQ29uZmlnLmNvbmZpZ3VyYXRpb24uZ2V0TGF5ZXJQYXJhbXMob3B0aW9ucy5sYXllciwgb3B0aW9ucy5zZXJ2aWNlKTtcblxuICAgICAgICBpZiAoIXBhcmFtcyB8fCBPYmplY3Qua2V5cyhwYXJhbXMpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgbG9nZ2VyLndhcm4oXCJXQVJOSU5HIENPTkZJR19GQUlMRUQgOiBwYXJhbXMgbm90IGZvdW5kID8hXCIpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gZ2VzdGlvbiBkZXMgem9vbVxuICAgICAgICBwYXJhbXMubWluWm9vbSA9IFV0aWwuZ2V0Wm9vbUxldmVsRnJvbVNjYWxlRGVub21pbmF0b3IocGFyYW1zLm1heFNjYWxlKSB8fCAxO1xuICAgICAgICBwYXJhbXMubWF4Wm9vbSA9IFV0aWwuZ2V0Wm9vbUxldmVsRnJvbVNjYWxlRGVub21pbmF0b3IocGFyYW1zLm1pblNjYWxlKSB8fCAyMTtcblxuICAgICAgICByZXR1cm4gcGFyYW1zO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IExheWVyQ29uZmlnO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/Layers/LayerConfig.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Layers/LayerEvent.js": +/*!******************************************!*\ + !*** ./src/Leaflet/Layers/LayerEvent.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Utils/LayerUtils */ \"./src/Common/Utils/LayerUtils.js\");\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"layer-event\");\n\n/**\n * @classdesc\n *\n * Evenement sur les couches Geoportail\n * @private\n */\n/** @type {LayerEvent} */\nvar LayerEvent = {\n _id: null,\n _attributions: [],\n _visibility: true,\n _originators: [],\n /**\n * activation du controle attribution\n *\n * @param {Object} map - the map\n *\n * @return {Boolean} attribution controle is enable\n */\n isEnable: function isEnable(map) {\n if (!map.attributionControl) {\n return false;\n }\n return true;\n },\n /**\n * visibilité de la couche\n *\n * @param {Boolean} visibility - true|false\n */\n setVisible: function setVisible(visibility) {\n logger.log(\"visibility\", visibility);\n this._visibility = visibility;\n this.fire(\"visibilitychange\");\n },\n /**\n * visibilité de la couche\n *\n * @returns {Boolean} visibility\n */\n getVisible: function getVisible() {\n return this._visibility;\n },\n /**\n * fonction de suppresion d'un layer du controle des layers\n *\n * @param {Object} e - event\n */\n _onRemoveLayer: function _onRemoveLayer(e) {\n logger.trace(\"onRemove event\", e);\n if (e.layer._geoportal_id !== this._geoportal_id) {\n return;\n }\n // attributions non visibles\n this.setVisible(false);\n },\n /**\n * fonction d'ajout d'un layer du controle des layers\n *\n * @param {Object} e - event\n */\n _onAddLayer: function _onAddLayer(e) {\n logger.trace(\"onAdd event\", e);\n if (e.layer._geoportal_id !== this._geoportal_id) {\n return;\n }\n // attributions visibles\n this.setVisible(true);\n },\n /**\n * fonction de deplacement d'un layer\n *\n * @param {Object} e - event\n */\n _onMoveEndLayer: function _onMoveEndLayer(e) {\n logger.trace(\"moveend event\", e);\n // mise à jour des attributions\n this.updateAttributions(this._map, this);\n },\n /**\n * updateAttributions\n *\n * @param {Object} map - the map\n */\n updateAttributions: function updateAttributions(map) {\n // FIXME on peut realiser une mise à jour plus intelligente que cette manière brutale...\n // Ex. mise en place de la notion 'hidden' de l'originators à desactiver\n\n if (!this.isEnable(map)) {\n return;\n }\n this.removeAttributions(map);\n this.addAttributions(map);\n this.fire(\"attributionchange\");\n },\n /**\n * removeAttributions\n *\n * @param {Object} map - the map\n */\n removeAttributions: function removeAttributions(map) {\n logger.trace(\"removeAttributions...\", this._geoportal_id);\n // suppression des attributions\n // L.Map utilise la methode getAttribution() du layer.\n // La construction concerne le layer courant.\n // Cet evenement declenche la construction des attributions\n\n if (!this.isEnable(map)) {\n return;\n }\n for (var i = 0; i < this._attributions.length; i++) {\n map.attributionControl.removeAttribution(this._attributions[i]);\n }\n\n // suppression des attributions de liste\n this._attributions = [];\n },\n /**\n * addAttributions\n *\n * @param {Object} map - the map\n */\n addAttributions: function addAttributions(map) {\n logger.trace(\"addAttributions...\", this._geoportal_id);\n // on interroge les originators en options pour obtenir les infos\n // suivantes :\n // - echelles\n // - contraintes d'emprise\n // - information sur le(s) proprietaire(s) du layer\n // - ...\n // mais on a besoin de qq informations sur la carte tels que :\n // - zoom\n // - bounds\n // - ...\n\n if (!this.isEnable(map)) {\n return;\n }\n\n // ajout des attributions\n var topLeft = map.getBounds().getNorthWest();\n var bottomRight = map.getBounds().getSouthEast();\n var arrayBounds = [topLeft.lat, topLeft.lng, bottomRight.lat, bottomRight.lng];\n var params = {\n extent: arrayBounds,\n // map.getBounds(),\n zoom: map.getZoom(),\n originators: this._originators,\n visibility: this._visibility\n };\n logger.log(params);\n var attributionsOriginators = _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getAttributions(params);\n logger.log(attributionsOriginators);\n if (attributionsOriginators && attributionsOriginators.length !== 0) {\n // on les ajoute dans la liste\n // et on ajoute les attributions dans le controle Leaflet \"L.Control.Attribution\"\n for (var i = 0; i < attributionsOriginators.length; i++) {\n this._attributions.push(attributionsOriginators[i]);\n map.attributionControl.addAttribution(attributionsOriginators[i]);\n }\n }\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (LayerEvent);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0xheWVycy9MYXllckV2ZW50LmpzP2Y5YTMiXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiTGF5ZXJFdmVudCIsIl9pZCIsIl9hdHRyaWJ1dGlvbnMiLCJfdmlzaWJpbGl0eSIsIl9vcmlnaW5hdG9ycyIsImlzRW5hYmxlIiwibWFwIiwiYXR0cmlidXRpb25Db250cm9sIiwic2V0VmlzaWJsZSIsInZpc2liaWxpdHkiLCJsb2ciLCJmaXJlIiwiZ2V0VmlzaWJsZSIsIl9vblJlbW92ZUxheWVyIiwiZSIsInRyYWNlIiwibGF5ZXIiLCJfZ2VvcG9ydGFsX2lkIiwiX29uQWRkTGF5ZXIiLCJfb25Nb3ZlRW5kTGF5ZXIiLCJ1cGRhdGVBdHRyaWJ1dGlvbnMiLCJfbWFwIiwicmVtb3ZlQXR0cmlidXRpb25zIiwiYWRkQXR0cmlidXRpb25zIiwiaSIsImxlbmd0aCIsInJlbW92ZUF0dHJpYnV0aW9uIiwidG9wTGVmdCIsImdldEJvdW5kcyIsImdldE5vcnRoV2VzdCIsImJvdHRvbVJpZ2h0IiwiZ2V0U291dGhFYXN0IiwiYXJyYXlCb3VuZHMiLCJsYXQiLCJsbmciLCJwYXJhbXMiLCJleHRlbnQiLCJ6b29tIi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dGlvbnNPcmlnaW5hdG9ycyA9IExheWVyVXRpbC5nZXRBdHRyaWJ1dGlvbnMocGFyYW1zKTtcbiAgICAgICAgbG9nZ2VyLmxvZyhhdHRyaWJ1dGlvbnNPcmlnaW5hdG9ycyk7XG4gICAgICAgIGlmIChhdHRyaWJ1dGlvbnNPcmlnaW5hdG9ycyAmJiBhdHRyaWJ1dGlvbnNPcmlnaW5hdG9ycy5sZW5ndGggIT09IDApIHtcbiAgICAgICAgICAgIC8vIG9uIGxlcyBham91dGUgZGFucyBsYSBsaXN0ZVxuICAgICAgICAgICAgLy8gZXQgb24gYWpvdXRlIGxlcyBhdHRyaWJ1dGlvbnMgZGFucyBsZSBjb250cm9sZSBMZWFmbGV0IFwiTC5Db250cm9sLkF0dHJpYnV0aW9uXCJcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYXR0cmlidXRpb25zT3JpZ2luYXRvcnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9hdHRyaWJ1dGlvbnMucHVzaChhdHRyaWJ1dGlvbnNPcmlnaW5hdG9yc1tpXSk7XG4gICAgICAgICAgICAgICAgbWFwLmF0dHJpYnV0aW9uQ29udHJvbC5hZGRBdHRyaWJ1dGlvbihhdHRyaWJ1dGlvbnNPcmlnaW5hdG9yc1tpXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbn07XG5cbmV4cG9ydCBkZWZhdWx0IExheWVyRXZlbnQ7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Leaflet/Layers/LayerEvent.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Layers/Layers.js": +/*!**************************************!*\ + !*** ./src/Leaflet/Layers/Layers.js ***! + \**************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _LayerConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LayerConfig */ \"./src/Leaflet/Layers/LayerConfig.js\");\n/* harmony import */ var _WMS__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./WMS */ \"./src/Leaflet/Layers/WMS.js\");\n/* harmony import */ var _WMTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./WMTS */ \"./src/Leaflet/Layers/WMTS.js\");\n\n\n\n\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getLogger(\"layers\");\n\n/**\n * Geoportal Layers Factory to be used together with Leaflet Maps.\n *\n * @module Layers\n * @alias L.geoportalLayer\n * @example\n * var map = L.Map(...) ;\n * var layer = L.geoportalLayer.WMTS({\n * layer : \"ORTHOIMAGERY.ORTHOPHOTOS\",\n * }).addTo(map) ;\n */\n/** @type {L.geoportalLayer} */\nvar Layers = {\n options: {},\n params: {},\n protocol: null,\n serviceUrl: \"http://localhost?no-rights-found-for=[{layer}]\",\n /**\n * initialize options\n */\n _initOptions: function _initOptions() {\n if (!this.options || Object.keys(this.options).length === 0) {\n throw new Error(\"PARAM_MISSING : options !\");\n }\n if (!this.options.layer) {\n throw new Error(\"PARAM_MISSING : layer !\");\n }\n\n // FIXME est ce utile de le preciser ?\n if (!this.options.apiKey) {\n logger.log(\"PARAM_MISSING : apiKey !\");\n }\n\n // par defaut\n if (typeof this.options.ssl === \"undefined\") {\n this.options.ssl = true;\n }\n },\n /**\n * get runtime context\n */\n _initContext: function _initContext() {\n // si ssl = false on fait du http\n // par défaut, ssl = true, on fait du https\n this.protocol = this.options.ssl === false ? \"http://\" : \"https://\";\n },\n /**\n * initialize parameters\n *\n * @param {String} service - service name, WMS or WMTS\n */\n _initParams: function _initParams(service) {\n // par defaut...\n if (!service) {\n service = \"WMTS\";\n }\n\n // Récupération de la configuration\n this.params = _LayerConfig__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get({\n key: this.options.apiKey,\n layer: this.options.layer,\n service: service\n });\n if (!this.params || Object.keys(this.params).length === 0) {\n this.params = {};\n if (!this.options.apiKey) {\n // FIXME on retire l'exception...\n logger.log(\"WARNING PARAM_MISSING : parameter 'apiKey' is mandatory if the contract key configuration has not been loaded !\");\n }\n }\n },\n /**\n * Factory function for Geoportal or INSPIRE WMS Layers creation.\n *\n * @method WMS\n * @static\n * @alias L.geoportalLayer.WMS\n * @extends {L.TileLayer.WMS}\n *\n * @param {Object} options - options for function call.\n * @param {String} options.layer - layer name (e.g. \"ORTHOIMAGERY.ORTHOPHOTOS\")\n * @param {Boolean} [options.ssl] - if set true, enforce protocol https (only for nodejs)\n * @param {String} [options.apiKey] - access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {Object} [settings] - other options for L.TileLayer.WMS function (see {@link http://leafletjs.com/reference.html#tilelayer-wms-options})\n * @param {Array} [settings.legends] - Overloads the default legends objects associated to the layer\n * @param {Array} [settings.metadata] - Overloads the default Metadata objects associated to the layer\n * @param {String} [settings.title] - Overloads the default title of the layer\n * @param {String} [settings.description] - Overloads the default description of the layer\n * @param {String} [settings.quicklookUrl] - Overloads the default quicklookUrl of the layer\n *\n * @returns {L.geoportalLayer.WMS} WMS layer\n *\n * @example\n * var map = L.Map('divmap').setView();\n * var lyr = L.geoportalLayer.WMS(\n * {\n * layer : \"OI.OrthoimageCoverage\"\n * },\n * {\n * opacity : 1,\n * transparent : true,\n * minZoom : 1,\n * maxZoom : 21\n * ...\n * });\n *\n * lyr.addTo(map); // ou map.addLayer(lyr);\n */\n WMS: function WMS(options, settings) {\n // gestion du logger\n var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getLogger(\"layers-wms\");\n\n /** options du plugins */\n this.options = options || {};\n\n // gestion des options\n this._initOptions();\n\n /** options natives de Leaflet */\n this.settings = settings || {};\n\n // env d'execution : browser ou non ?\n this._initContext();\n\n // Récupération de la configuration\n this._initParams(\"WMS\");\n logger.log(this.params);\n\n // url du service\n var serviceUrl = null;\n if (this.options.apiKey) {\n // si une clé Api est fournie, on la prend pour construire l'url\n serviceUrl = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.template(\"https://wxs.ign.fr/{key}/geoportail/r/wms\", {\n key: this.options.apiKey\n });\n } else if (this.params.url) {\n // sinon on prend la première clé disponible pour la couche dans la Config\n serviceUrl = this.params.url;\n } else {\n // pas de Config, ni de clef API !\n // on évite l'exception en envoyant les requêtes vers localhost...\n serviceUrl = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.template(this.serviceUrl, {\n layer: this.options.layer\n });\n }\n\n // params du service WMS (par defaut)\n var paramsWms = {\n layers: this.options.layer,\n styles: this.params.styles || \"normal\",\n format: this.params.format || \"image/jpeg\",\n version: this.params.version || \"1.3.0\"\n };\n\n // options natives de leaflet (par defaut)\n var paramsNative = {\n // zoom level\n minZoom: this.params.minZoom || 1,\n maxZoom: this.params.maxZoom || 21\n };\n\n // merge des options utilisateur pour le service WMS\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(paramsWms, this.settings);\n // merge des options utilisateur aux options natives de leaflet\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(paramsNative, this.settings);\n return new _WMS__WEBPACK_IMPORTED_MODULE_3__[\"default\"](serviceUrl.replace(/(http|https):\\/\\//, this.protocol), {\n paramsNative: paramsNative,\n paramsWms: paramsWms,\n originators: this.params.originators || this.settings.originators || [],\n legends: this.settings.originators || this.params.legends || [],\n metadata: this.settings.metadata || this.params.metadata || [],\n title: this.settings.title || this.params.title || \"\",\n description: this.settings.description || this.params.description || \"\",\n quicklookUrl: this.settings.quicklookUrl || this.params.quicklookUrl || \"\"\n });\n },\n /**\n * Factory function for Geoportal WMTS Layers creation.\n *\n * @method WMTS\n * @static\n * @alias L.geoportalLayer.WMTS\n * @extends {L.TileLayer}\n *\n * @param {Object} options - options for function call.\n * @param {String} options.layer - layer name (e.g. \"ORTHOIMAGERY.ORTHOPHOTOS\")\n * @param {Boolean} [options.ssl] - if set true, enforce protocol https (only for nodejs)\n * @param {String} [options.apiKey] - free access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {Object} [settings] - other options for L.TileLayer function (see {@link http://leafletjs.com/reference.html#tilelayer-options})\n *\n * @returns {L.geoportalLayer.WMTS} WMTS layer\n *\n * @example\n * var map = L.Map('divmap').setView();\n * var lyr = L.geoportalLayer.WMTS(\n * {\n * layer : \"ORTHOIMAGERY.ORTHOPHOTOS\"\n * },\n * {\n * opacity : 1,\n * transparent : true,\n * minZoom : 1,\n * maxZoom : 21\n * ...\n * });\n *\n * lyr.addTo(map); // ou map.addLayer(lyr);\n */\n WMTS: function WMTS(options, settings) {\n // gestion du logger\n var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getLogger(\"layers-wmts\");\n\n /** options du plugins */\n this.options = options || {};\n\n // gestion des options\n this._initOptions();\n\n /** options natives de Leaflet */\n this.settings = settings || {};\n\n // env d'execution : browser ou non ?\n this._initContext();\n\n // Récupération de la configuration\n this._initParams(\"WMTS\");\n logger.log(this.params);\n\n // url du service\n var serviceUrl = null;\n if (this.options.apiKey) {\n // si une clé Api est fournie, on la prend pour construire l'url\n serviceUrl = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.template(\"https://wxs.ign.fr/{key}/geoportail/wmts\", {\n key: this.options.apiKey\n });\n } else if (this.params.url) {\n // sinon on prend la première clé disponible pour la couche dans la Config\n serviceUrl = this.params.url;\n } else {\n // pas de Config, ni de clef API !\n // on évite l'exception en envoyant les requêtes vers localhost...\n serviceUrl = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.template(this.serviceUrl, {\n layer: this.options.layer\n });\n }\n\n // params du service WMTS (par defaut)\n var paramsWmts = {\n layer: this.options.layer,\n style: this.params.styles || \"normal\",\n format: this.params.format || \"image/jpeg\",\n version: this.params.version || \"1.0.0\",\n tilematrixset: this.params.TMSLink || \"PM\"\n };\n\n // options natives de leaflet (par defaut)\n // minZoom : 0\n // maxZoom : 18\n // tileSize : 256\n // subdomains : 'abc'\n // errorTileUrl : ''\n // attribution : ''\n // zoomOffset : 0\n // opacity : 1\n\n var paramsNative = {\n // zoom level\n minZoom: this.params.minZoom || 1,\n maxZoom: this.params.maxZoom || 21\n };\n\n // merge des options utilisateur pour le service WMTS\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(paramsWmts, this.settings);\n // merge des options utilisateur aux options natives de leaflet\n leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(paramsNative, this.settings);\n return new _WMTS__WEBPACK_IMPORTED_MODULE_4__[\"default\"](serviceUrl.replace(/(http|https):\\/\\//, this.protocol), {\n paramsNative: paramsNative,\n paramsWmts: paramsWmts,\n originators: this.params.originators || this.settings.originators || [],\n legends: this.settings.originators || this.params.legends || [],\n metadata: this.settings.metadata || this.params.metadata || [],\n title: this.settings.title || this.params.title || \"\",\n description: this.settings.description || this.params.description || \"\",\n quicklookUrl: this.settings.quicklookUrl || this.params.quicklookUrl || \"\"\n });\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Layers);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0xheWVycy9MYXllcnMuanM/MDYwMCJdLCJuYW1lcyI6Wy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vcHRpb25zLmFwaUtleSkge1xuICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIlBBUkFNX01JU1NJTkcgOiBhcGlLZXkgIVwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHBhciBkZWZhdXRcbiAgICAgICAgaWYgKHR5cGVvZiB0aGlzLm9wdGlvbnMuc3NsID09PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgICAgICB0aGlzLm9wdGlvbnMuc3NsID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBnZXQgcnVudGltZSBjb250ZXh0XG4gICAgICovXG4gICAgX2luaXRDb250ZXh0IDogZnVuY3Rpb24gKCkge1xuICAgICAgICAvLyBzaSBzc2wgPSBmYWxzZSBvbiBmYWl0IGR1IGh0dHBcbiAgICAgICAgLy8gcGFyIGTDqWZhdXQsIHNzbCA9IHRydWUsIG9uIGZhaXQgZHUgaHR0cHNcbiAgICAgICAgdGhpcy5wcm90b2NvbCA9IHRoaXMub3B0aW9ucy5zc2wgPT09IGZhbHNlID8gXCJodHRwOi8vXCIgOiBcImh0dHBzOi8vXCI7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIGluaXRpYWxpemUgcGFyYW1ldGVyc1xuICAgICAqXG4gICAgICogQHBhcmFtIHtTdHJpbmd9IHNlcnZpY2UgLSBzZXJ2aWNlIG5hbWUsIFdNUyBvciBXTVRTXG4gICAgICovXG4gICAgX2luaXRQYXJhbXMgOiBmdW5jdGlvbiAoc2VydmljZSkge1xuICAgICAgICAvLyBwYXIgZGVmYXV0Li4uXG4gICAgICAgIGlmICghc2VydmljZSkge1xuICAgICAgICAgICAgc2VydmljZSA9IFwiV01UU1wiO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gUsOpY3Vww6lyYXRpb24gZGUgbGEgY29uZmlndXJhdGlvblxuICAgICAgICB0aGlzLnBhcmFtcyA9IExheWVyQ29uZmlnLmdldCh7XG4gICAgICAgICAgIC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bnMgbmF0aXZlcyBkZSBMZWFmbGV0ICovXG4gICAgICAgIHRoaXMuc2V0dGluZ3MgPSBzZXR0aW5ncyB8fCB7fTtcblxuICAgICAgICAvLyBlbnYgZCdleGVjdXRpb24gOiBicm93c2VyIG91IG5vbiA/XG4gICAgICAgIHRoaXMuX2luaXRDb250ZXh0KCk7XG5cbiAgICAgICAgLy8gUsOpY3Vww6lyYXRpb24gZGUgbGEgY29uZmlndXJhdGlvblxuICAgICAgICB0aGlzLl9pbml0UGFyYW1zKFwiV01TXCIpO1xuICAgICAgICBsb2dnZXIubG9nKHRoaXMucGFyYW1zKTtcblxuICAgICAgICAvLyB1cmwgZHUgc2VydmljZVxuICAgICAgICB2YXIgc2VydmljZVVybCA9IG51bGw7XG5cbiAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5hcGlLZXkpIHtcbiAgICAgICAgICAgIC8vIHNpIHVuZSBjbMOpIEFwaSBlc3QgZm91cm5pZSwgb24gbGEgcHJlbmQgcG91ciBjb25zdHJ1aXJlIGwndXJsXG4gICAgICAgICAgICBzZXJ2aWNlVXJsID0gTC5VdGlsLnRlbXBsYXRlKFwiaHR0cHM6Ly93eHMuaWduLmZyL3trZXl9L2dlb3BvcnRhaWwvci93bXNcIiwge1xuICAgICAgICAgICAgICAgIGtleSA6IHRoaXMub3B0aW9ucy5hcGlLZXlcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2UgaWYgKHRoaXMucGFyYW1zLnVybCkge1xuICAgICAgICAgICAgLy8gc2lub24gb24gcHJlbmQgbGEgcHJlbWnDqHJlIGNsw6kgZGlzcG9uaWJsZSBwb3VyIGxhIGNvdWNoZSBkYW5zIGxhIENvbmZpZ1xuICAgICAgICAgICAgc2VydmljZVVybCA9IHRoaXMucGFyYW1zLnVybDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vIHBhcyBkZSBDb25maWcsIG5pIGRlIGNsZWYgQVBJICFcbiAgICAgICAgICAgIC8vIG9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U30gV01UUyBsYXllclxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiAgdmFyIG1hcCA9IEwuTWFwKCdkaXZtYXAnKS5zZXRWaWV3KCk7XG4gICAgICogIHZhciBseXIgPSBMLmdlb3BvcnRhbExheWVyLldNVFMoXG4gICAgICogICAge1xuICAgICAqICAgICAgbGF5ZXIgOiBcIk9SVEhPSU1BR0VSWS5PUlRIT1BIT1RPU1wiXG4gICAgICogICAgfSxcbiAgICAgKiAgICB7XG4gICAgICogICAgICBvcGFjaXR5IDogMSxcbiAgICAgKiAgICAgIHRyYW5zcGFyZW50IDogdHJ1ZSxcbiAgICAgKiAgICAgIG1pblpvb20gOiAxLFxuICAgICAqICAgICAgbWF4Wm9vbSA6IDIxXG4gICAgICogICAgICAuLi5cbiAgICAgKiAgICB9KTtcbiAgICAgKlxuICAgICAqICBseXIuYWRkVG8obWFwKTsgLy8gb3UgbWFwLmFkZExheWVyKGx5cik7XG4gICAgICovXG4gICAgV01UUyA6IGZ1bmN0aW9uIChvcHRpb25zLCBzZXR0aW5ncykge1xuICAgICAgICAvLyBnZXN0aW9uIGR1IGxvZ2dlclxuICAgICAgICB2YXIgbG9nZ2VyID0gTG9nZ2VyLmdldExvZ2dlcihcImxheWVycy13bXRzXCIpO1xuXG4gICAgICAgIC8qKiBvcHRpb25zIGR1IHBsdWdpbnMgKi9cbiAgICAgICAgdGhpcy5vcHRpb25zID0gb3B0aW9ucyB8fCB7fTtcblxuICAgICAgICAvLyBnZXN0aW9uIGRlcyBvcHRpb25zXG4gICAgICAgIHRoaXMuX2luaXRPcHRpb25zKCk7XG5cbiAgICAgICAgLyoqIG9wdGlvbnMgbmF0aXZlcyBkZSBMZWFmbGV0ICovXG4gICAgICAgIHRoaXMuc2V0dGluZ3MgPSBzZXR0aW5ncyB8fCB7fTtcblxuICAgICAgICAvLyBlbnYgZCdleGVjdXRpb24gOiBicm93c2VyIG91IG5vbiA/XG4gICAgICAgIHRoaXMuX2luaXRDb250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xuICAgICAgICAgICAgICAgIGxheWVyIDogdGhpcy5vcHRpb25zLmxheWVyXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHBhcmFtcyBkdSBzZXJ2aWNlIFdNVFMgKHBhciBkZWZhdXQpXG4gICAgICAgIHZhciBwYXJhbXNXbXRzID0ge1xuICAgICAgICAgICAgbGF5ZXIgOiB0aGlzLm9wdGlvbnMubGF5ZXIsXG4gICAgICAgICAgICBzdHlsZSA6IHRoaXMucGFyYW1zLnN0eWxlcyB8fCBcIm5vcm1hbFwiLFxuICAgICAgICAgICAgZm9ybWF0IDogdGhpcy5wYXJhbXMuZm9ybWF0IHx8IFwiaW1hZ2UvanBlZ1wiLFxuICAgICAgICAgICAgdmVyc2lvbiA6IHRoaXMucGFyYW1zLnZlcnNpb24gfHwgXCIxLjAuMFwiLFxuICAgICAgICAgICAgdGlsZW1hdHJpeHNldCA6IHRoaXMucGFyYW1zLlRNU0xpbmsgfHwgXCJQTVwiXG4gICAgICAgIH07XG5cbiAgICAgICAgLy8gb3B0aW9ucyBuYXRpdmVzIGRlIGxlYWZsZXQgKHBhciBkZWZhdXQpXG4gICAgICAgIC8vICAgIG1pblpvb20gOiAwXG4gICAgICAgIC8vICAgIG1heFpvb20gOiAxOFxuICAgICAgICAvLyAgICB0aWxlU2l6ZSA6IDI1NlxuICAgICAgICAvLyAgICBzdWJkb21haW5zIDogJ2FiYydcbiAgICAgICAgLy8gICAgZXJyb3JUaWxlVXJsIDogJydcbiAgICAgICAgLy8gICAgYXR0cmlidXRpb24gOiAnJ1xuICAgICAgICAvLyAgICB6b29tT2Zmc2V0IDogMFxuICAgICAgICAvLyAgICBvcGFjaXR5IDogMVxuXG4gICAgICAgIHZhciBwYXJhbXNOYXRpdmUgPSB7XG4gICAgICAgICAgICAvLyB6b29tIGxldmVsXG4gICAgICAgICAgICBtaW5ab29tIDogdGhpcy5wYXJhbXMubWluWm9vbSB8fCAxLFxuICAgICAgICAgICAgb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AgICAgICBkZXNjcmlwdGlvbiA6IHRoaXMuc2V0dGluZ3MuZGVzY3JpcHRpb24gfHwgdGhpcy5wYXJhbXMuZGVzY3JpcHRpb24gfHwgXCJcIixcbiAgICAgICAgICAgICAgICBxdWlja2xvb2tVcmwgOiB0aGlzLnNldHRpbmdzLnF1aWNrbG9va1VybCB8fCB0aGlzLnBhcmFtcy5xdWlja2xvb2tVcmwgfHwgXCJcIlxuICAgICAgICAgICAgfVxuICAgICAgICApO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IExheWVycztcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/Layers/Layers.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Layers/WMS.js": +/*!***********************************!*\ + !*** ./src/Leaflet/Layers/WMS.js ***! + \***********************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _LayerEvent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./LayerEvent */ \"./src/Leaflet/Layers/LayerEvent.js\");\n/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../package.json */ \"./package.json\");\nvar _package_json__WEBPACK_IMPORTED_MODULE_4___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../../../package.json */ \"./package.json\", 1);\n/**\n* desativation JSHINT\n* W106 - Identifier '_geoportal_id' is not in camel case\n*/\n/* jshint -W106 */\n\n\n\n\n\n// package.json (extract version)\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getLogger(\"wms\");\n\n/**\n * @namespace\n * @alias L.geoportalLayers.WMS\n * @classdesc\n *\n * Leaflet Layer Class for Geoportal or INSPIRE WMS Layers.\n *\n * Use {@link module:Layers.WMS L.geoportalLayer.WMS()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.TileLayer.WMS native class.\n *\n */\nvar WMS = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.WMS.extend( /** @lends WMS.prototype */{\n includes: _LayerEvent__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n /**\n *\n * @constructor\n * @param {String} url - url service\n * @param {Object} options - options for function call.\n * @param {Array} [options.originators] - originators\n * @param {Array} [options.legends] - legends\n * @param {Array} [options.metadata] - metadata\n * @param {String} [options.title] - title\n * @param {String} [options.description] - description\n * @param {String} [options.quicklookUrl] - quicklookUrl\n * @param {Object} options.paramsWms - WMS options\n * @param {String} options.paramsWms.layers - eg \"ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO\",\n * @param {String} options.paramsWms.styles - \"normal\",\n * @param {String} options.paramsWms.format - \"image/jpeg\",\n * @param {String} options.paramsWms.version - \"1.3.0\"\n * @param {Object} [options.paramsNative] - other options for L.TileLayer.WMS function (see {@link http://leafletjs.com/reference.html#tilelayer-wms-options})\n * @example\n * var wms = new WMS(\"http://wxs.ign.fr/jhyvi0fgmnuxvfv0zjzorvdn/geoportail/r/wms\", {\n * paramsNative : {\n * minZoom : 1,\n * maxZoom : 21\n * },\n * paramsWms : {\n * layers : \"ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO\",\n * styles : \"normal\",\n * format : \"image/jpeg\",\n * version : \"1.3.0\"\n * },\n * originators : [],\n * legends : [],\n * metadata : [],\n * title : \"\",\n * description : \"\",\n * quicklookUrl : \"\"\n * });\n *\n * @ignore\n */\n initialize: function initialize(url, options) {\n var settings = {};\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(settings, options.paramsWms, options.paramsNative);\n\n // appel du constructeur de la classe étendue\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.WMS.prototype.initialize.call(this,\n // tracker extension leaflet\n // FIXME : gp-ext version en mode AMD\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Helper.normalyzeUrl(url, {\n \"gp-leaflet-ext\": _package_json__WEBPACK_IMPORTED_MODULE_4__.leafletExtVersion || _package_json__WEBPACK_IMPORTED_MODULE_4__.version\n }, false), settings);\n\n // sauvegarde\n this._originators = options.originators;\n this._legends = options.legends;\n this._metadata = options.metadata;\n this._title = options.title;\n this._description = options.description;\n this._quicklookUrl = options.quicklookUrl;\n\n // init id du Layer\n this._geoportal_id = 0; // FIXME L.stamp(this);\n },\n\n /**\n * event\n * (overwritten)\n *\n * @param {Object} map - map leaflet object\n * @private\n */\n onAdd: function onAdd(map) {\n logger.trace(\"onAdd layer\", this._geoportal_id);\n\n // recuperation de la map\n this._map = map;\n\n // enregistrement de l'id Geoportal\n this._geoportal_id = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.stamp(this);\n\n // appel de la methode de la classe étendue\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.WMS.prototype.onAdd.call(this, map);\n this.setVisible(true);\n\n // y a t il des attributions/originators pour ce layer ?\n this.updateAttributions(map);\n\n /**\n * Evenement sur l'ajout du layer sur la carte avec gestion des deplacements (zoom)\n * Les deplacemnts sur la carte permettent de mettre à jour la liste des attributions.\n */\n map.on({\n /**\n * Permet de desactiver la visibilité des attributions sur le retrait\n * d'un layer de type overlay.\n * Les attributions ne doivent plus apparaitre si le layer est invisible !\n * @private\n */\n overlayremove: this._onRemoveLayer,\n /**\n * Permet d'activer la visibilité des attributions sur l'ajout\n * d'un layer de type overlay.\n * Les attributions doivent apparaitre si le layer est visible !\n * @private\n */\n overlayadd: this._onAddLayer,\n /**\n * Permet de desactiver la visibilité des attributions sur le retrait\n * d'un layer de type layer.\n * Les attributions ne doivent plus apparaitre si le layer est invisible !\n * @private\n */\n layerremove: this._onRemoveLayer,\n /**\n * Permet d'activer la visibilité des attributions sur l'ajout\n * d'un layer de type layer.\n * Les attributions doivent apparaitre si le layer est visible !\n * @private\n */\n layeradd: this._onAddLayer,\n /**\n * Permet d'ajouter des fonctionnalités lors de la creation du layer\n * sur les evenements de fin de mouvemenent (move ou zoom)\n * @private\n */\n moveend: this._onMoveEndLayer\n }, this);\n\n // if (map.attributionControl) {\n //\n // // ceci permet de mofifier le prefixe leaflet !\n // // ce dernier etant obligatoire...\n // // Ex. map.attributionControl.setPrefix(\"Plugin © IGN with Leaflet - 2016\");\n // // map.attributionControl.setPrefix(\"Leaflet + Géoportail\");\n // map.attributionControl.setPrefix(\"Plugin © \" +\n // \"IGN\" +\n // \" with \" +\n // \"Leaflet\" +\n // \" - 2016\");\n // }\n },\n\n /**\n * event\n * (overwritten)\n *\n * @param {Object} map - map leaflet object\n * @private\n */\n onRemove: function onRemove(map) {\n logger.trace(\"onRemove layer\", this._geoportal_id);\n\n // recuperation de la map\n this._map = map;\n\n // appel de la methode de la classe étendue\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.prototype.onRemove.call(this, map);\n this.setVisible(false);\n\n // suppression des attributions\n this.removeAttributions(map);\n\n // supprimer les evenements\n map.off({\n overlayremove: this._onRemoveLayer,\n overlayadd: this._onAddLayer,\n layerremove: this._onRemoveLayer,\n layeradd: this._onAddLayer,\n moveend: this._onMoveEndLayer\n }, this);\n },\n /**\n * event\n * (overwritten)\n *\n * @param {Object} tilePoint - Point object\n *\n * @returns {String} url\n * @private\n */\n getTileUrl: function getTileUrl(tilePoint) {\n // (Point, Number) -> String\n\n // FIXME\n // on surcharge cette methode à cause d'un BUG Leaflet sur l'inversion de\n // coordonnées sur les codes EPSG en geographiques en WMS 1.3.0.\n // En attente de resolution du ticket suivant :\n // Axis option for crs, Issue 4253 on Leaflet/Leaflet\n // https://github.com/Leaflet/Leaflet/issues/4253\n\n var lstProjEpsgGeographic = [\"EPSG:4326\"]; // ex. \"EPSG:4641\"\n\n var map = this._map;\n var tileSize = this.options.tileSize;\n var nwPoint = tilePoint.multiplyBy(tileSize);\n var sePoint = nwPoint.add([tileSize, tileSize]);\n var nw = this._crs.project(map.unproject(nwPoint, tilePoint.z));\n var se = this._crs.project(map.unproject(sePoint, tilePoint.z));\n var bbox = this._wmsVersion >= 1.3 && lstProjEpsgGeographic.indexOf(this._crs.code) !== -1 ? [se.y, nw.x, nw.y, se.x].join(\",\") : [nw.x, se.y, se.x, nw.y].join(\",\");\n var url = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.template(this._url, {\n s: this._getSubdomain(tilePoint)\n });\n return url + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.getParamString(this.wmsParams, url, true) + \"&BBOX=\" + bbox;\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (WMS);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0xheWVycy9XTVMuanM/YzNiYiJdLCJuYW1lcyI6WyJsb2dnZXIiLCJMb2dnZXIiLCJnZXRMb2dnZXIiLCJXTVMiLCJMIiwiVGlsZUxheWVyIiwiZXh0ZW5kIiwiaW5jbHVkZXMiLCJMYXllckV2ZW50IiwiaW5pdGlhbGl6ZSIsInVybCIsIm9wdGlvbnMiLCJzZXR0aW5ncyIsIlV0aWwiLCJwYXJhbXNXbXMiLCJwYXJhbXNOYXRpdmUiLCJwcm90b3R5cGUiLCJjYWxsIiwiR3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biAgICAgKiAgICAgb3JpZ2luYXRvcnMgIDogW10sXG4gICAgICogICAgIGxlZ2VuZHMgICAgICA6IFtdLFxuICAgICAqICAgICBtZXRhZGF0YSAgICAgOiBbXSxcbiAgICAgKiAgICAgdGl0bGUgICAgICAgIDogXCJcIixcbiAgICAgKiAgICAgZGVzY3JpcHRpb24gIDogXCJcIixcbiAgICAgKiAgICAgcXVpY2tsb29rVXJsIDogXCJcIlxuICAgICAqIH0pO1xuICAgICAqXG4gICAgICogQGlnbm9yZVxuICAgICAqL1xuICAgIGluaXRpYWxpemUgOiBmdW5jdGlvbiAodXJsLCBvcHRpb25zKSB7XG4gICAgICAgIHZhciBzZXR0aW5ncyA9IHt9O1xuICAgICAgICBMLlV0aWwuZXh0ZW5kKHNldHRpbmdzLCBvcHRpb25zLnBhcmFtc1dtcywgb3B0aW9ucy5wYXJhbXNOYXRpdmUpO1xuXG4gICAgICAgIC8vIGFwcGVsIGR1IGNvbnN0cnVjdGV1ciBkZSBsYSBjbGFzc2Ugw6l0ZW5kdWVcbiAgICAgICAgTC5UaWxlTGF5ZXIuV01TLnByb3RvdHlwZS5pbml0aWFsaXplLmNhbGwoXG4gICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgLy8gdHJhY2tlciBleHRlbnNpb24gbGVhZmxldFxuICAgICAgICAgICAgLy8gRklYTUUgOiBncC1leHQgdmVyc2lvbiBlbiBtb2RlIEFNRFxuICAgICAgICAgICAgR3AuSGVscGVyLm5vcm1hbHl6ZVVybCh1cmwsIHtcbiAgICAgICAgICAgICAgICBcImdwLWxlYWZsZXQtZXh0XCIgOiBQa2cubGVhZmxldEV4dFZlcnNpb24gfHwgUGtnLnZlcnNpb25cbiAgICAgICAgICAgIH0sIGZhbHNlKSxcbiAgICAgICAgICAgIHNldHRpbmdzXG4gICAgICAgICk7XG5cbiAgICAgICAgLy8gc2F1dmVnYXJkZVxuICAgICAgICB0aGlzLl9vcmlnaW5hdG9ycyA9IG9wdGlvbnMub3JpZ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BzOi8vZ2l0aHViLmNvbS9MZWFmbGV0L0xlYWZsZXQvaXNzdWVzLzQyNTNcblxuICAgICAgICB2YXIgbHN0UHJvakVwc2dHZW9ncmFwaGljID0gW1wiRVBTRzo0MzI2XCJdOyAvLyBleC4gXCJFUFNHOjQ2NDFcIlxuXG4gICAgICAgIHZhciBtYXAgPSB0aGlzLl9tYXA7XG4gICAgICAgIHZhciB0aWxlU2l6ZSA9IHRoaXMub3B0aW9ucy50aWxlU2l6ZTtcblxuICAgICAgICB2YXIgbndQb2ludCA9IHRpbGVQb2ludC5tdWx0aXBseUJ5KHRpbGVTaXplKTtcbiAgICAgICAgdmFyIHNlUG9pbnQgPSBud1BvaW50LmFkZChbdGlsZVNpemUsIHRpbGVTaXplXSk7XG5cbiAgICAgICAgdmFyIG53ID0gdGhpcy5fY3JzLnByb2plY3QobWFwLnVucHJvamVjdChud1BvaW50LCB0aWxlUG9pbnQueikpO1xuICAgICAgICB2YXIgc2UgPSB0aGlzLl9jcnMucHJvamVjdChtYXAudW5wcm9qZWN0KHNlUG9pbnQsIHRpbGVQb2ludC56KSk7XG5cbiAgICAgICAgdmFyIGJib3ggPSAodGhpcy5fd21zVmVyc2lvbiA+PSAxLjMgJiYgbHN0UHJvakVwc2dHZW9ncmFwaGljLmluZGV4T2YodGhpcy5fY3JzLmNvZGUpICE9PSAtMSkgPyBbc2UueSwgbncueCwgbncueSwgc2UueF0uam9pbihcIixcIikgOiBbbncueCwgc2UueSwgc2UueCwgbncueV0uam9pbihcIixcIik7XG5cbiAgICAgICAgdmFyIHVybCA9IEwuVXRpbC50ZW1wbGF0ZSh0aGlzLl91cmwsIHtcbiAgICAgICAgICAgIHMgOiB0aGlzLl9nZXRTdWJkb21haW4odGlsZVBvaW50KVxuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gdXJsICsgTC5VdGlsLmdldFBhcmFtU3RyaW5nKHRoaXMud21zUGFyYW1zLCB1cmwsIHRydWUpICsgXCImQkJPWD1cIiArIGJib3g7XG4gICAgfVxuXG59KTtcblxuZXhwb3J0IGRlZmF1bHQgV01TO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/Leaflet/Layers/WMS.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Layers/WMTS.js": +/*!************************************!*\ + !*** ./src/Leaflet/Layers/WMTS.js ***! + \************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _LayerEvent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./LayerEvent */ \"./src/Leaflet/Layers/LayerEvent.js\");\n/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../package.json */ \"./package.json\");\nvar _package_json__WEBPACK_IMPORTED_MODULE_4___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../../../package.json */ \"./package.json\", 1);\n/**\n* desativation JSHINT\n* W106 - Identifier '_geoportal_id' is not in camel case\n*/\n\n\n\n\n\n// package.json (extract version)\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getLogger(\"wmts\");\n\n/**\n * @namespace\n * @alias L.geoportalLayers.WMTS\n * @classdesc\n *\n * Leaflet Layer Class for Geoportal WMTS Layers.\n *\n * Use {@link module:Layers.WMTS L.geoportalLayer.WMTS()} factory to create instances of that class.\n *\n * **Extends** Leaflet L.TileLayer native class.\n *\n */\nvar WMTS = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.extend( /** @lends WMTS.prototype */{\n includes: _LayerEvent__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n defaultWmtsParams: {\n service: \"WMTS\",\n request: \"GetTile\",\n version: \"1.0.0\",\n layer: \"\",\n style: \"\",\n tilematrixset: \"PM\",\n format: \"image/jpeg\"\n },\n /**\n *\n * @constructor\n * @param {String} url - url service\n * @param {Object} options - options for function call.\n * @param {Array} [options.originators] - originators\n * @param {Array} [options.legends] - legends\n * @param {Array} [options.metadata] - metadata\n * @param {String} [options.title] - title\n * @param {String} [options.description] - description\n * @param {String} [options.quicklookUrl] - quicklookUrl\n * @param {Object} options.paramsWmts - WMTS options\n * @param {String} options.paramsWmts.service - \"WMTS\",\n * @param {String} options.paramsWmts.request - \"GetTile\",\n * @param {String} options.paramsWmts.version - \"1.0.0\",\n * @param {String} options.paramsWmts.layer - \"\",\n * @param {String} options.paramsWmts.style - \"\",\n * @param {String} options.paramsWmts.tilematrixset - \"PM\",\n * @param {String} options.paramsWmts.format - \"image/jpeg\"\n * @param {Object} [options.paramsNative] - other options for L.TileLayer function (see {@link http://leafletjs.com/reference.html#tilelayer-options})\n * @example\n * var wmts = new WMTS(\"http://wxs.ign.fr/jhyvi0fgmnuxvfv0zjzorvdn/geoportail/wmts\", {\n * paramsNative : {\n * minZoom : 1,\n * maxZoom : 21\n * },\n * paramsWmts : {\n * layer : \"ORTHOIMAGERY.ORTHOPHOTOS\",\n * style : \"normal\",\n * format : \"image/jpeg\",\n * version : \"1.0.0\",\n * tilematrixset : \"PM\"\n * },\n * originators : [],\n * legends : [],\n * metadata : [],\n * title : \"\",\n * description : \"\",\n * quicklookUrl : \"\"\n * });\n *\n * @ignore\n */\n initialize: function initialize(url, options) {\n logger.log(\"initialize\");\n\n // parametres WMTS\n this._wmtsParams = {};\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(this._wmtsParams, this.defaultWmtsParams, options.paramsWmts);\n\n // appel du constructeur de la classe étendue\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.prototype.initialize.call(this,\n // tracker extension leaflet\n // FIXME : gp-ext version en mode AMD\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Helper.normalyzeUrl(url, {\n \"gp-leaflet-ext\": _package_json__WEBPACK_IMPORTED_MODULE_4__.leafletExtVersion || _package_json__WEBPACK_IMPORTED_MODULE_4__.version\n }, false), options.paramsNative);\n\n // sauvegarde des originators\n this._originators = options.originators;\n this._legends = options.legends;\n this._metadata = options.metadata;\n this._title = options.title;\n this._description = options.description;\n this._quicklookUrl = options.quicklookUrl;\n\n // id du Layer\n this._geoportal_id = 0; // FIXME L.stamp(this);\n },\n\n /**\n * event 'onAdd'\n * (overwritten)\n *\n * @param {Object} map - map leaflet object\n * @private\n */\n onAdd: function onAdd(map) {\n logger.trace(\"onAdd layer\", this._geoportal_id);\n\n // recuperation de la map\n this._map = map;\n\n // enregistrement de l'id Geoportal\n this._geoportal_id = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.stamp(this);\n\n // appel de la methode de la classe étendue\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.prototype.onAdd.call(this, map);\n this.setVisible(true);\n\n // y a t il des attributions/originators pour ce layer ?\n this.updateAttributions(map);\n\n /**\n * Evenement sur l'ajout du layer sur la carte avec gestion des deplacements (zoom)\n * Les deplacemnts sur la carte permettent de mettre à jour la liste des attributions.\n */\n map.on({\n /**\n * Permet de desactiver la visibilité des attributions sur le retrait\n * d'un layer de type overlay.\n * Les attributions ne doivent plus apparaitre si le layer est invisible !\n * @private\n */\n overlayremove: this._onRemoveLayer,\n /**\n * Permet d'activer la visibilité des attributions sur l'ajout\n * d'un layer de type overlay.\n * Les attributions doivent apparaitre si le layer est visible !\n * @private\n */\n overlayadd: this._onAddLayer,\n /**\n * Permet de desactiver la visibilité des attributions sur le retrait\n * d'un layer de type layer.\n * Les attributions ne doivent plus apparaitre si le layer est invisible !\n * @private\n */\n layerremove: this._onRemoveLayer,\n /**\n * Permet d'activer la visibilité des attributions sur l'ajout\n * d'un layer de type layer.\n * Les attributions doivent apparaitre si le layer est visible !\n * @private\n */\n layeradd: this._onAddLayer,\n /**\n * Permet d'ajouter des fonctionnalités lors de la creation du layer\n * sur les evenements de fin de mouvemenent (move ou zoom)\n * @private\n */\n moveend: this._onMoveEndLayer\n }, this);\n\n // if (map.attributionControl) {\n // // ceci permet de mofifier le prefixe leaflet !\n // // ce dernier etant obligatoire...\n // // Ex. map.attributionControl.setPrefix(\"Plugin © IGN with Leaflet - 2016\");\n // // map.attributionControl.setPrefix(\"Leaflet + Géoportail\");\n // map.attributionControl.setPrefix(\"Plugin © \" +\n // \"IGN\" +\n // \" with \" +\n // \"Leaflet\" +\n // \" - 2016\");\n // }\n },\n\n /**\n * event 'onRemove'\n * (overwritten)\n *\n * @param {Object} map - map leaflet object\n * @private\n */\n onRemove: function onRemove(map) {\n logger.trace(\"onRemove layer\", this._geoportal_id);\n\n // recuperation de la map\n this._map = map;\n\n // appel de la methode de la classe étendue\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.prototype.onRemove.call(this, map);\n this.setVisible(false);\n\n // suppression des attributions\n this.removeAttributions(map);\n\n // supprimer les evenements\n map.off({\n overlayremove: this._onRemoveLayer,\n overlayadd: this._onAddLayer,\n layerremove: this._onRemoveLayer,\n layeradd: this._onAddLayer,\n moveend: this._onMoveEndLayer\n }, this);\n },\n /**\n * event 'getTileUrl'\n * (overwritten)\n *\n * @param {Object} tilePoint - Point leaflet object\n *\n * @returns {String} url\n * @private\n */\n getTileUrl: function getTileUrl(tilePoint) {\n // (Point, Number) -> String\n\n // ex http://wxs.ign.fr/j5tcdln4ya4xggpdu4j0f0cn/geoportail/wmts?\n // SERVICE=WMTS&\n // REQUEST=GetTile&\n // VERSION=1.0.0&\n // LAYER=ORTHOIMAGERY.ORTHOPHOTOS&\n // STYLE=normal&\n // TILEMATRIXSET=PM&\n // TILEMATRIX=2&\n // TILEROW=2&\n // TILECOL=1&\n // FORMAT=image%2Fjpeg\n\n var zoom = this._getZoomForUrl();\n var url = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.template(this._url, {\n s: this._getSubdomain(tilePoint)\n });\n return url + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.getParamString(this._wmtsParams, url) + \"&tilematrix=\" + zoom + \"&tilerow=\" + tilePoint.y + \"&tilecol=\" + tilePoint.x;\n },\n /**\n * event 'setParams'\n * (overwritten)\n *\n * @param {Object} params - parameters\n * @param {Object} noRedraw - no redraw\n *\n * @returns {Object} this\n * @private\n */\n setParams: function setParams(params, noRedraw) {\n leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.extend(this._wmtsParams, params);\n if (!noRedraw) {\n this.redraw();\n }\n return this;\n }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (WMTS);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L0xheWVycy9XTVRTLmpzPzlmYTQiXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiV01UUyIsIkwiLCJUaWxlTGF5ZXIiLCJleHRlbmQiLCJpbmNsdWRlcyIsIkxheWVyRXZlbnQiLCJkZWZhdWx0V210c1BhcmFtcyIsInNlcnZpY2UiLCJyZXF1ZXN0IiwidmVyc2lvbiIsImxheWVyIiwic3R5bGUiLCJ0aWxlbWF0cml4c2V0IiwiZm9ybWF0IiwiaW5pdGlhbGl6ZSIsInVybCIsIm9wdGlvbnMiLCJsb2ciLCJfd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gICAgICAgICovXG4gICAgICAgICAgICBvdmVybGF5cmVtb3ZlIDogdGhpcy5fb25SZW1vdmVMYXllcixcblxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBQZXJtZXQgZCdhY3RpdmVyIGxhIHZpc2liaWxpdMOpIGRlcyBhdHRyaWJ1dGlvbnMgc3VyIGwnYWpvdXRcbiAgICAgICAgICAgICAqIGQndW4gbGF5ZXIgZGUgdHlwZSBvdmVybGF5LlxuICAgICAgICAgICAgICogTGVzIGF0dHJpYnV0aW9ucyBkb2l2ZW50IGFwcGFyYWl0cmUgc2kgbGUgbGF5ZXIgZXN0IHZpc2libGUgIVxuICAgICAgICAgICAgICogQHByaXZhdGVcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgb3ZlcmxheWFkZCA6IHRoaXMuX29uQWRkTGF5ZXIsXG5cbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogUGVybWV0IGRlIGRlc2FjdGl2ZXIgbGEgdmlzaWJpbGl0w6kgZGVzIGF0dHJpYnV0aW9ucyBzdXIgbGUgcmV0cmFpdFxuICAgICAgICAgICAgICogZCd1biBsYXllciBkZSB0eXBlIGxheWVyLlxuICAgICAgICAgICAgICogTGVzIGF0dHJpYnV0aW9ucyBuZSBkb2l2ZW50IHBsdXMgYXBwYXJhaXRyZSBzaSBsZSBsYXllciBlc3QgaW52aXNpYmxlICFcbiAgICAgICAgICAgICAqIEBwcml2YXRlXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIGxheWVycmVtb3ZlIDogdGhpcy5fb25SZW1vdmVMYXllcixcblxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBQZXJtZXQgZCdhY3RpdmVyIGxhIHZpc2liaWxpdMOpIGRlcyBhdHRyaWJ1dGlvbnMgc3VyIGwnYWpvdXRcbiAgICAgICAgICAgICAqIGQndW4gbGF5ZXIgZGUgdHlwZSBsYXllci5cbiAgICAgICAgICAgICAqIExlcyBhdHRyaWJ1dGlvbnMgZG9pdmVudCBhcHBhcmFpdHJlIHNpIGxlIGxheWVyIGVzdCB2aXNpYmxlICFcbiAgICAgICAgICAgICAqIEBwcml2YXRlXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIGxheWVyYWRkIDogdGhpcy5fb25BZGRMYXllcixcblxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBQZXJtZXQgZCdham91dGVyIGRlcyBmb25jdGlvbm5hbGl0w6lzIGxvcnMgZGUgbGEgY3JlYXRpb24gZHUgbGF5ZXJcbiAgICAgICAgICAgICAqIHN1ciBsZXMgZXZlbmVtZW50cyBkZSBmaW4gZGUgbW91dmVtZW5lbnQgKG1vdmUgb3Ugem9vbSlcbiAgICAgICAgICAgICAqIEBwcml2YXRlXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIG1vdmVlbmQgOiB0aGlzLl9vbk1vdmVFbmRMYXllclxuXG4gICAgICAgIH0sIHRoaXMpO1xuXG4gICAgICAgIC8vIGlmIChtYXAuYXR0cmlidXRpb25Db250cm9sKSB7XG4gICAgICAgIC8vICAgICAvLyBjZWNpIHBlcm1ldCBkZSBtb2ZpZmllciBsZSBwcmVmaXhlIGxlYWZsZXQgIVxuICAgICAgICAvLyAgICAgLy8gY2UgZGVybmllciBldGFudCBvYmxpZ2F0b2lyZS4uLlxuICAgICAgICAvLyAgICAgLy8gRXguIG1hcC5hdHRyaWJ1dGlvbkNvbnRyb2wuc2V0UHJlZml4KFwiUGx1Z2luIMKpIElHTiB3aXRoIExlYWZsZXQgLSAyMDE2XCIpO1xuICAgICAgICAvLyAgICAgLy8gbWFwLmF0dHJpYnV0aW9uQ29udHJvbC5zZXRQcmVmaXgoXCJMZWFmbGV0ICsgR8Opb3BvcnRhaWxcIik7XG4gICAgICAgIC8vICAgICBtYXAuYXR0cmlidXRpb25Db250cm9sLnNldFByZWZpeChcIlBsdWdpbiDCqSBcIiArXG4gICAgICAgIC8vICAgICAgICAgXCI8YSBocmVmPV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uICAgICAgICAvLyBWRVJTSU9OPTEuMC4wJlxuICAgICAgICAvLyBMQVlFUj1PUlRIT0lNQUdFUlkuT1JUSE9QSE9UT1MmXG4gICAgICAgIC8vIFNUWUxFPW5vcm1hbCZcbiAgICAgICAgLy8gVElMRU1BVFJJWFNFVD1QTSZcbiAgICAgICAgLy8gVElMRU1BVFJJWD0yJlxuICAgICAgICAvLyBUSUxFUk9XPTImXG4gICAgICAgIC8vIFRJTEVDT0w9MSZcbiAgICAgICAgLy8gRk9STUFUPWltYWdlJTJGanBlZ1xuXG4gICAgICAgIHZhciB6b29tID0gdGhpcy5fZ2V0Wm9vbUZvclVybCgpO1xuICAgICAgICB2YXIgdXJsID0gTC5VdGlsLnRlbXBsYXRlKHRoaXMuX3VybCwge1xuICAgICAgICAgICAgcyA6IHRoaXMuX2dldFN1YmRvbWFpbih0aWxlUG9pbnQpXG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdXJsICsgTC5VdGlsLmdldFBhcmFtU3RyaW5nKHRoaXMuX3dtdHNQYXJhbXMsIHVybCkgK1xuICAgICAgICAgICAgXCImdGlsZW1hdHJpeD1cIiArIHpvb20gK1xuICAgICAgICAgICAgXCImdGlsZXJvdz1cIiArIHRpbGVQb2ludC55ICtcbiAgICAgICAgICAgIFwiJnRpbGVjb2w9XCIgKyB0aWxlUG9pbnQueDtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogZXZlbnQgJ3NldFBhcmFtcydcbiAgICAgKiAob3ZlcndyaXR0ZW4pXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gcGFyYW1zIC0gcGFyYW1ldGVyc1xuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBub1JlZHJhdyAtIG5vIHJlZHJhd1xuICAgICAqXG4gICAgICogQHJldHVybnMge09iamVjdH0gdGhpc1xuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgc2V0UGFyYW1zIDogZnVuY3Rpb24gKHBhcmFtcywgbm9SZWRyYXcpIHtcbiAgICAgICAgTC5leHRlbmQodGhpcy5fd210c1BhcmFtcywgcGFyYW1zKTtcblxuICAgICAgICBpZiAoIW5vUmVkcmF3KSB7XG4gICAgICAgICAgICB0aGlzLnJlZHJhdygpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxufSk7XG5cbmV4cG9ydCBkZWZhdWx0IFdNVFM7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/Leaflet/Layers/WMTS.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/Styles.js": +/*!*******************************!*\ + !*** ./src/Leaflet/Styles.js ***! + \*******************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS_GPgeneralWidgetLeaflet_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CSS/GPgeneralWidgetLeaflet.css */ \"./src/Leaflet/CSS/GPgeneralWidgetLeaflet.css\");\n/* harmony import */ var _CSS_GPgeneralWidgetLeaflet_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPgeneralWidgetLeaflet_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CSS_Controls_ElevationPath_GPelevationPathLeaflet_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CSS/Controls/ElevationPath/GPelevationPathLeaflet.css */ \"./src/Leaflet/CSS/Controls/ElevationPath/GPelevationPathLeaflet.css\");\n/* harmony import */ var _CSS_Controls_ElevationPath_GPelevationPathLeaflet_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_ElevationPath_GPelevationPathLeaflet_css__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _CSS_Controls_Isochrone_GPisochronLeaflet_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CSS/Controls/Isochrone/GPisochronLeaflet.css */ \"./src/Leaflet/CSS/Controls/Isochrone/GPisochronLeaflet.css\");\n/* harmony import */ var _CSS_Controls_Isochrone_GPisochronLeaflet_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Isochrone_GPisochronLeaflet_css__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _CSS_Controls_LayerSwitcher_GPlayerSwitcherLeaflet_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CSS/Controls/LayerSwitcher/GPlayerSwitcherLeaflet.css */ \"./src/Leaflet/CSS/Controls/LayerSwitcher/GPlayerSwitcherLeaflet.css\");\n/* harmony import */ var _CSS_Controls_LayerSwitcher_GPlayerSwitcherLeaflet_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_LayerSwitcher_GPlayerSwitcherLeaflet_css__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _CSS_Controls_LocationSelector_GPlocationLeaflet_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CSS/Controls/LocationSelector/GPlocationLeaflet.css */ \"./src/Leaflet/CSS/Controls/LocationSelector/GPlocationLeaflet.css\");\n/* harmony import */ var _CSS_Controls_LocationSelector_GPlocationLeaflet_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_LocationSelector_GPlocationLeaflet_css__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _CSS_Controls_MousePosition_GPmousePositionLeaflet_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CSS/Controls/MousePosition/GPmousePositionLeaflet.css */ \"./src/Leaflet/CSS/Controls/MousePosition/GPmousePositionLeaflet.css\");\n/* harmony import */ var _CSS_Controls_MousePosition_GPmousePositionLeaflet_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_MousePosition_GPmousePositionLeaflet_css__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _CSS_Controls_ReverseGeocoding_GPreverseGeocodingLeaflet_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CSS/Controls/ReverseGeocoding/GPreverseGeocodingLeaflet.css */ \"./src/Leaflet/CSS/Controls/ReverseGeocoding/GPreverseGeocodingLeaflet.css\");\n/* harmony import */ var _CSS_Controls_ReverseGeocoding_GPreverseGeocodingLeaflet_css__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_ReverseGeocoding_GPreverseGeocodingLeaflet_css__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _CSS_Controls_Route_GProuteLeaflet_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CSS/Controls/Route/GProuteLeaflet.css */ \"./src/Leaflet/CSS/Controls/Route/GProuteLeaflet.css\");\n/* harmony import */ var _CSS_Controls_Route_GProuteLeaflet_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Route_GProuteLeaflet_css__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _CSS_Controls_SearchEngine_GPsearchEngineLeaflet_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CSS/Controls/SearchEngine/GPsearchEngineLeaflet.css */ \"./src/Leaflet/CSS/Controls/SearchEngine/GPsearchEngineLeaflet.css\");\n/* harmony import */ var _CSS_Controls_SearchEngine_GPsearchEngineLeaflet_css__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_SearchEngine_GPsearchEngineLeaflet_css__WEBPACK_IMPORTED_MODULE_8__);\n/* global true */\n\n// En module ES6, on n'a pas besoin de ces CSS, car on utile le CSS géneré avec WebPack.\n// L'utilisation de ces imports est utile lors de la creation du bundle...\n\n\n\n\n\n\n\n\n\n\n// ce flag est substitué via le script de publication des sources du package...\nif (true) {\n // plugin leaflet-draw !\n __webpack_require__(/*! ../../node_modules/leaflet-draw/dist/leaflet.draw-src.css */ \"./node_modules/leaflet-draw/dist/leaflet.draw-src.css\");\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L1N0eWxlcy5qcz8zODViIl0sIm5hbWVzIjpbIl9fRkxBR19QTFVHSU5fQ1NTX18iLCJyZXF1aXJlIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUVBO0FBQ0E7QUFDMEM7QUFFdUI7QUFDVDtBQUNTO0FBQ0Y7QUFDRTtBQUNNO0FBQ3RCO0FBQ2M7O0FBRS9EO0FBQ0EsSUFBSUEsbUJBQW1CLEVBQUU7RUFDckI7RUFDQUMsbUJBQU8sQ0FBQyx3SEFBMkQsQ0FBQztBQUN4RSIsImZpbGUiOiIuL3NyYy9MZWFmbGV0L1N0eWxlcy5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qIGdsb2JhbCBfX0ZMQUdfUExVR0lOX0NTU19fICovXG5cbi8vIEVuIG1vZHVsZSBFUzYsIG9uIG4nYSBwYXMgYmVzb2luIGRlIGNlcyBDU1MsIGNhciBvbiB1dGlsZSBsZSBDU1MgZ8OpbmVyw6kgYXZlYyBXZWJQYWNrLlxuLy8gTCd1dGlsaXNhdGlvbiBkZSBjZXMgaW1wb3J0cyBlc3QgdXRpbGUgbG9ycyBkZSBsYSBjcmVhdGlvbiBkdSBidW5kbGUuLi5cbmltcG9ydCBcIi4vQ1NTL0dQZ2VuZXJhbFdpZGdld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//# sourceURL=webpack-internal:///./src/Leaflet/Styles.js\n"); + +/***/ }), + +/***/ "./src/Leaflet/index.js": +/*!******************************!*\ + !*** ./src/Leaflet/index.js ***! + \******************************/ +/*! exports provided: Services, Error, Helper, Protocols, servicesDate, servicesVersion, leafletExtVersion, leafletExtDate, LayerUtils, ProxyUtils, ColorUtils, MathUtils, Logger, Config, LExtended */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Services\", function() { return Services; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Error\", function() { return Error; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Helper\", function() { return Helper; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Protocols\", function() { return Protocols; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"servicesDate\", function() { return servicesDate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"servicesVersion\", function() { return servicesVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"leafletExtVersion\", function() { return leafletExtVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"leafletExtDate\", function() { return leafletExtDate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Config\", function() { return Config; });\n/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../package.json */ \"./package.json\");\nvar _package_json__WEBPACK_IMPORTED_MODULE_0___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../../package.json */ \"./package.json\", 1);\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ \"leaflet\");\n/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, \"LExtended\", function() { return leaflet__WEBPACK_IMPORTED_MODULE_1___default.a; });\n/* harmony import */ var _Common_Styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/Styles */ \"./src/Common/Styles.js\");\n/* harmony import */ var _Styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Styles */ \"./src/Leaflet/Styles.js\");\n/* harmony import */ var _Controls_Controls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Controls/Controls */ \"./src/Leaflet/Controls/Controls.js\");\n/* harmony import */ var _Controls_ElevationPath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Controls/ElevationPath */ \"./src/Leaflet/Controls/ElevationPath.js\");\n/* harmony import */ var _Layers_Layers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Layers/Layers */ \"./src/Leaflet/Layers/Layers.js\");\n/* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CRS/CRS */ \"./src/Leaflet/CRS/CRS.js\");\n/* harmony import */ var _Common_Utils_AutoLoadConfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Common/Utils/AutoLoadConfig */ \"./src/Common/Utils/AutoLoadConfig.js\");\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Common/Utils/LayerUtils */ \"./src/Common/Utils/LayerUtils.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"LayerUtils\", function() { return _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _Common_Utils_ProxyUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Common/Utils/ProxyUtils */ \"./src/Common/Utils/ProxyUtils.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ProxyUtils\", function() { return _Common_Utils_ProxyUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Common/Utils/ColorUtils */ \"./src/Common/Utils/ColorUtils.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ColorUtils\", function() { return _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Common/Utils/MathUtils */ \"./src/Common/Utils/MathUtils.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"MathUtils\", function() { return _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Logger\", function() { return _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/**\n* Global variable Gp.\n*\n* @module Gp\n* @alias Gp\n* @desc\n*\n* This is the global variable that is exposed in the browser environment.\n* Content is composed of constructor, functions and properties...\n*\n* > Config: (...)\n*\n* > ColorUtils: (...)\n* > LayerUtils: (...)\n* > MathUtils: (...)\n* > ProxyUtils: (...)\n* > Logger: (...)\n*\n* > LExtended: (...)\n*\n* > leafletExtDate: \"YYYY-MM-DD\"\n* > leafletExtVersion: \"X.X.X\"\n*\n* > Error: (...)\n* > Helper: (...)\n* > Protocols: (...)\n* > Services: (...)\n* > servicesDate: \"YYYY-MM-DD\"\n* > servicesVersion: \"X.X.X\"\n*\n* The following variables are aslo global :\n* - proj4,\n* - L\n*/\n\n\n\n\n// CSS communes aux extensions !\n\n\n\n\n\n// import WMTS from \"./Layers/WMTS\";\n// import WMS from \"./Layers/WMS\";\n\n\n\n// Autoload...\n\n\n// export des services\n\n\n// reconstruction des ns\nvar Services = geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Services;\nvar Error = geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Error;\nvar Helper = geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Helper;\nvar Protocols = geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Protocols;\nvar servicesDate = geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__[\"default\"].servicesDate;\nvar servicesVersion = geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__[\"default\"].servicesVersion;\n\n\n// Rajout des propriétés de l'extension dans le namespace\n/** Version */\nvar leafletExtVersion = _package_json__WEBPACK_IMPORTED_MODULE_0__.leafletExtVersion || _package_json__WEBPACK_IMPORTED_MODULE_0__.version;\n/** Publication date */\nvar leafletExtDate = _package_json__WEBPACK_IMPORTED_MODULE_0__.date;\n\n// Classes utilitaires\n\n\n\n\n\n\n// HACK !?\nvar Config = window.Gp ? window.Gp.Config : {};\n\n// creation du namespace pour les extensions leaflet\nleaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalLayer = _Layers_Layers__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; // WMS et WMTS\n// L.geoportalLayers = {};\n// L.geoportalLayers.WMTS = WMTS;\n// L.geoportalLayers.WMS = WMS;\nleaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalControl = _Controls_Controls__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; // IsoChrone, SearchEngine, ...\n\nleaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_LIB_D3 = _Controls_ElevationPath__WEBPACK_IMPORTED_MODULE_5__[\"default\"].DISPLAY_PROFILE_LIB_D3;\nleaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS = _Controls_ElevationPath__WEBPACK_IMPORTED_MODULE_5__[\"default\"].DISPLAY_PROFILE_LIB_AMCHARTS;\nleaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_RAW = _Controls_ElevationPath__WEBPACK_IMPORTED_MODULE_5__[\"default\"].DISPLAY_PROFILE_RAW;\nleaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_BY_DEFAULT = _Controls_ElevationPath__WEBPACK_IMPORTED_MODULE_5__[\"default\"].DISPLAY_PROFILE_BY_DEFAULT;\nleaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalCRS = _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; // lambert 93 et lambert 2 étendu\nleaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalCRS.EPSG2154 = _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__[\"default\"].EPSG2154(); // lambert 93\nleaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalCRS.EPSG27572 = _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__[\"default\"].EPSG27572(); // lambert 2 étendu\nleaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalCRS.EPSG4326 = _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__[\"default\"].EPSG4326();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9MZWFmbGV0L2luZGV4LmpzP2Y3NTMiXSwibmFtZXMiOlsiU2VydmljZXMiLCJHcCIsIkVycm9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ZX1BST0ZJTEVfTElCX0FNQ0hBUlRTID0gRWxldmF0aW9uUGF0aC5ESVNQTEFZX1BST0ZJTEVfTElCX0FNQ0hBUlRTO1xuTC5nZW9wb3J0YWxDb250cm9sLkVsZXZhdGlvblBhdGguRElTUExBWV9QUk9GSUxFX1JBVyA9IEVsZXZhdGlvblBhdGguRElTUExBWV9QUk9GSUxFX1JBVztcbkwuZ2VvcG9ydGFsQ29udHJvbC5FbGV2YXRpb25QYXRoLkRJU1BMQVlfUFJPRklMRV9CWV9ERUZBVUxUID0gRWxldmF0aW9uUGF0aC5ESVNQTEFZX1BST0ZJTEVfQllfREVGQVVMVDtcblxuTC5nZW9wb3J0YWxDUlMgPSBDUlM7IC8vIGxhbWJlcnQgOTMgZXQgbGFtYmVydCAyIMOpdGVuZHVcbkwuZ2VvcG9ydGFsQ1JTLkVQU0cyMTU0ID0gQ1JTLkVQU0cyMTU0KCk7IC8vIGxhbWJlcnQgOTNcbkwuZ2VvcG9ydGFsQ1JTLkVQU0cyNzU3MiA9IENSUy5FUFNHMjc1NzIoKTsgLy8gbGFtYmVydCAyIMOpdGVuZHVcbkwuZ2VvcG9ydGFsQ1JTLkVQU0c0MzI2ID0gQ1JTLkVQU0c0MzI2KCk7XG5cbmV4cG9ydCB7XG4gICAgLyoqIEV4cG9zZSBleHRlbnNpb25zIGxlYWZsZXQgZXh0ZW5kZWQgKi9cbiAgICBMIGFzIExFeHRlbmRlZFxufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/Leaflet/index.js\n"); + +/***/ }), + +/***/ "leaflet": +/*!****************************************************************************************!*\ + !*** external {"commonjs":"leaflet","commonjs2":"leaflet","amd":"leaflet","root":"L"} ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_leaflet__;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC9leHRlcm5hbCB7XCJjb21tb25qc1wiOlwibGVhZmxldFwiLFwiY29tbW9uanMyXCI6XCJsZWFmbGV0XCIsXCJhbWRcIjpcImxlYWZsZXRcIixcInJvb3RcIjpcIkxcIn0/ZTliZiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiJsZWFmbGV0LmpzIiwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBfX1dFQlBBQ0tfRVhURVJOQUxfTU9EVUxFX2xlYWZsZXRfXzsiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///leaflet\n"); + +/***/ }), + +/***/ "node-fetch": +/*!***********************************************************************************!*\ + !*** external {"commonjs2":"node-fetch","commonjs":"node-fetch","amd":"require"} ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_node_fetch__;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcIm5vZGUtZmV0Y2hcIixcImNvbW1vbmpzXCI6XCJub2RlLWZldGNoXCIsXCJhbWRcIjpcInJlcXVpcmVcIn0/YWJiZiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiJub2RlLWZldGNoLmpzIiwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBfX1dFQlBBQ0tfRVhURVJOQUxfTU9EVUxFX25vZGVfZmV0Y2hfXzsiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///node-fetch\n"); + +/***/ }), + +/***/ "xmldom": +/*!***************************************************************************!*\ + !*** external {"commonjs2":"xmldom","commonjs":"xmldom","amd":"require"} ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_xmldom__;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcInhtbGRvbVwiLFwiY29tbW9uanNcIjpcInhtbGRvbVwiLFwiYW1kXCI6XCJyZXF1aXJlXCJ9P2E2YmIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoieG1sZG9tLmpzIiwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBfX1dFQlBBQ0tfRVhURVJOQUxfTU9EVUxFX3htbGRvbV9fOyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///xmldom\n"); + +/***/ }) + +/******/ }); +}); \ No newline at end of file diff --git a/leaflet-2.3.4/dist/GpPluginLeaflet-src.css b/leaflet-2.3.4/dist/GpPluginLeaflet-src.css new file mode 100644 index 000000000..f0de31a41 --- /dev/null +++ b/leaflet-2.3.4/dist/GpPluginLeaflet-src.css @@ -0,0 +1,3573 @@ +/*! + * @brief French Geoportal Extension for Leaflet + * + * This software is released under the licence CeCILL-B (Free BSD compatible) + * @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt + * @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt + * @see http://www.cecill.info/ + * + * @copyright copyright (c) IGN + * @license CeCILL-B + * @author IGN + * @version 2.3.4 + * @date 30/08/2023 + * + */ + +/*! + * @overview Proj4Leaflet - Smooth Proj4js integration with Leaflet + * @copyright Copyright (c) 2012, Kartena AB + * @license BSD 2-Clause "Simplified" License + * See https://raw.githubusercontent.com/kartena/Proj4Leaflet/master/LICENSE + * @version 1.0.2 + */ + +/*! + * @overview leaflet-draw - Vector drawing and editing plugin for Leaflet + * @copyright Copyright (c) 2012-2017 Jon West, Jacob Toye, and Leaflet + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/Leaflet/Leaflet.draw/master/MIT-LICENSE.md + * @version 1.0.4 + */ + +/*! + * Sortable -- JavaScript library for reorderable drag-and-drop lists on modern + * browsers and touch devices. No jQuery required. Supports Meteor, AngularJS, + * React, Polymer, Vue, Knockout and any CSS library, e.g. Bootstrap. + * + * Released under MIT LICENSE + * + * Copyright Lebedev Konstantin + * https://github.com/SortableJS/Sortable + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * @version 1.14.0 + */ + +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.4 + */ + +/*! + * @overview Proj4js - Javascript reprojection library. + * + * @authors + * - Mike Adair madairATdmsolutions.ca + * - Richard Greenwood richATgreenwoodmap.com + * - Didier Richard didier.richardATign.fr + * - Stephen Irons stephen.ironsATclear.net.nz + * - Olivier Terral oterralATgmail.com + * - Calvin Metcalf cmetcalfATappgeo.com + * + * @copyright Copyright (c) 2014, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons, Olivier Terral and Calvin Metcalf + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/proj4js/proj4js/master/LICENSE.md + * @version 2.7.5 + */ + +/* BOOST RELIEF */ + + div[id^=GPboostRelief-] { + font-size: 11px; + width: 150px; + } + + div[id^=GPboostRelief-] label { + display: block; + } + + div[id^=GPBoostReliefListContainer-] { + position: relative; + width: 100%; + height: 28px; + padding-left: 8px; + line-height: 28px; + } + + .GPlayerRelief, + .GPlayerReliefValue { + position: absolute; + top: 0; + } + + .GPlayerRelief { + width: calc(100% - 60px); + height: 28px; + padding-left: 8px; + } + + .GPlayerReliefValue { + width: 32px; + left: calc(100% - 40px); + line-height: 28px; + font-size: 10px; + font-style: italic; + cursor: default; + } + + /* Showing/hiding boost relief panel */ + + label[id^=GPshowBoostReliefPicto] { + display: inline-block; + } + + input[id^=GPshowBoostRelief-] + label { + display: block; + } + + input[id^=GPshowBoostRelief-]:checked + label { + display: none; + } + + input[id^=GPshowBoostRelief-] + label + div { + display: none; + } + + input[id^=GPshowBoostRelief-]:checked + label + div { + display: block; + } + + /* Showing layer advanced tools */ + + div[id^=GPboostRelief-] input[type="checkbox"]:checked + label + .GPlayerAdvancedToolsRelief { + max-height: 28px; + opacity: 1; + } + + .GPlayerAdvancedToolsRelief { + display: block; + position: relative; + width: 100%; + border-bottom : 1px dotted #CCC; + background-color : #FFF; + } + + .GPlayerReliefLayerId { + position: relative; + width: 100px; + height: 28px; + padding-left: 8px; + line-height: 28px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + /* Relief slider : general */ + + .GPlayerRelief input { + -webkit-appearance: none; + -moz-appearance: none; + background: none; + display: block; + width: 100%; + height: 100%; + margin: 0; + padding: 0; + overflow: hidden; + cursor: pointer; + } + + .GPlayerRelief input[type="range"]:focus { + box-shadow: none; + outline: none; + } + + /* Relief slider : Chrome, Safari, Opera */ + + .GPlayerRelief input[type="range"]::-webkit-slider-runnable-track { + -webkit-appearance: none; + height: 3px; + } + + .GPlayerRelief input[type="range"]::-webkit-slider-thumb:before { + position: absolute; + top: 0; + right: 50%; + left: -200px; + height: 3px; + pointer-events: none; + } + + .GPlayerRelief input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + width: 9px; + height: 17px; + -webkit-appearance: none; + border: 2px solid #FFF; + background-color: #505050; + position: relative; + top: -7px; + } + + /* Relief slider : Firefox */ + + .GPlayerRelief input[type="range"]::-moz-range-track { + width: 80px; + height: 3px; + } + + .GPlayerRelief input[type="range"]::-moz-range-thumb { + width: 5px; + height: 13px; + border: 2px solid #FFF; + border-radius: 0; + box-shadow: 0; + background-color: #505050; + position: relative; + } + + /* Relief slider : IE */ + + .GPlayerRelief input[type="range"]::-ms-track { + border: 0; + border-color: transparent; + border-radius: 0; + border-width: 0; + color: transparent; + height: 3px; + width: 80px; + } + + .GPlayerRelief input[type="range"]::-ms-fill-lower, + .GPlayerRelief input[type="range"]::-ms-fill-upper { + background: transparent; + border-radius: 0; + } + + .GPlayerRelief input[type="range"]::-ms-thumb { + width: 5px; + height: 13px; + border: 2px solid #FFF; + background-color: #505050; + } + + .GPlayerRelief input[type="range"]::-ms-tooltip { + display: none; + } +/* BUILDINGS */ + + div[id^=GPbuildings-] { + font-size: 11px; + } + + div[id^=GPbuildings-] label { + display: block; + } + + label[id^=GPshowBuildingsPicto] { + display: inline-block; + cursor: pointer; + } + + +/* MOUSE POSITION */ + +/* Showing/hiding drawing panel */ + +label[id^=GPshowDrawingPicto-] { + display: inline-block; +} + +input[id^=GPshowDrawing-] + label { + display: block; +} + +input[id^=GPshowDrawing-]:checked + label { + display: none; +} + +input[id^=GPshowDrawing-] + label + div { + display: none; +} + +input[id^=GPshowDrawing-]:checked + label + div { + display: block; +} + +/* General panels */ + +div[id^=GPdrawingPanel-] { + width: 240px; + overflow: hidden; +} + +/* Basic infos */ + +div[id^=GPdrawingBasicPanel-] { + padding: 10px 15px; +} + +.GPdrawingLabel, +.GPdrawingCoords { + display: inline-block; + line-height: 20px; +} + +.GPdrawingLabel { + width: 80px; + font-weight: bold; +} + +.GPdrawingCoords { + width: 110px; +} + +/* markers selector */ +.marker-input-radio { + display : none ; +} + +input.marker-input-radio:checked + label { + border: 1px solid red; +} + + +div[id^=GPelevationPathPanelInfo] { + display: none; /* on n'affiche pas le bouton d'information par defaut */ +} + +/* Calc waiting */ + +.GPelevationPathCalcWaitingContainerVisible, +.GPelevationPathCalcWaitingContainerHidden { + position: absolute; + top: 32px; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255,255,255,0.9); + font-size: 1.5em; + font-weight: bold; + overflow: hidden; +} + +.GPelevationPathInformationsContainerVisible, +.GPelevationPathInformationsContainerHidden { + position: absolute; + top: 32px; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255,255,255,0.9); + font-size: 13px; + font-weight: bold; + overflow: hidden; +} + +.GPelevationPathCalcWaitingContainerVisible { + display: -webkit-flex; + display: -webkit-box; + display: -ms-flexbox; + display: flex; +} + +.GPelevationPathInformationsContainerVisible { + display: -webkit-flex; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + flex-direction: column; +} + +.GPelevationPathCalcWaitingContainerHidden, +.GPelevationPathInformationsContainerHidden { + display: none; +} + +.GPelevationPathCalcWaiting, +.GPelevationPathInformations { + margin: auto; +} + +.GPelevationPathInformations { + font-size: 0.8em; +} + +.GPelevationPathCalcWaitingContainerVisible, +.GPelevationPathCalcWaitingContainerHidden, +.GPelevationPathInformationsContainerVisible, +.GPelevationPathInformationsContainerHidden { + border-radius: 5px; +} + +/* CSS : Raw */ + +#profileElevationRaw { + resize: none; + padding: unset; +} + +/* CSS : default */ + +#profileElevationByDefault { + display:-webkit-flex; + display:-webkit-box; + display:-ms-flexbox; + display:flex; + -webkit-box-orient:vertical; + -webkit-box-direction:normal; + -webkit-flex-direction:column; + -ms-flex-direction:column; + flex-direction:column; + height:100%; +} + +.altiPathValue { + font-weight: 700; + fill: #5E5E5E; +} + +.altiPathCoords { + font-style: italic; + fill: #5E5E5E; +} + +.tooltipInit { + opacity: 0; +} + +.tooltipFadeIn { + transition: opacity 300ms ease 0ms, transform 50ms ease 0s, top 50ms ease 0s, left 50ms ease 0s; + opacity: 1; +} + +.tooltipFadeOut { + transition: opacity 500ms ease 0ms; + opacity: 0; +} + + + +/* CSS : D3 */ + +.axis-d3 > text { + fill: rgb(94, 94, 94); + font-family: Verdana; + font-size: 10px; + opacity: 1; + text-anchor: end; +} + +.axis-d3 { + fill: none; + stroke: #5E5E5E; + stroke-width: 1; + shape-rendering: crispEdges; +} + +.area-d3 { + fill: #C77A04; + stroke: #5E5E5E; + stroke-width: 0; + fill-opacity: 0.4; +} + +.line-d3 { + fill: none; + stroke: #C77A04; + stroke-width: 1px; +} + +.grid-d3 .tick { + stroke: lightgrey; + opacity: 0.7; +} + +.grid-d3 path { + stroke-width: 0; +} + +.grid-d3 .tick { + stroke: lightgrey; + opacity: 0.7; +} + +.grid-d3 path { + stroke-width: 0; +} + +.overlay-d3 { + fill: none; + pointer-events: all; +} + +.focusLine-d3 { + fill: none; + stroke: #C77A04; + stroke-width: 0.5px; +} + +.focusCircle-d3 { + fill: #C77A04; +} + +div.tooltip-d3 { + position: inherit;; + text-align: left; + width: 80px; + height: 45px; + padding: 5px; + font: 8px sans-serif; + background: white; + border: 0px; + border-radius: 8px; + pointer-events: none; +} + +/* Widgets : general */ + +.GPwidget { + position: absolute; + font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; + font-size: 13px; + color: #333; +} + +.GPwidget input[type='text'], +.GPwidget input[type='button'] { + -webkit-appearance: none; + color: #333333; +} + +.GPwidget input[type="checkbox"] { + display: none; +} + +.GPwidget select { + padding-left: 3px; + border-radius: 3px; +} + +.GPwidget form { + margin-bottom: 0; +} + +.GPwidget * { + box-sizing: border-box; + background-repeat: no-repeat; +} + +/* waiting */ + +.GPwaiting { + background-image : url(data:image/gif;base64,R0lGODlhNAA0AIQSAAFkpSZ5sAGV3k2Ruiao3kOj1/GUBk225pe/B4S83XrK75HH3qrS5szMzNbW1sHe797e3ubm5v///////////////////////////////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFAQAfACwAAAAANAA0AAAF5uAnjmRpnmiqrmzrvnAsz3T9FXhh72Ke8zWfDzgT/ogxIw55cjgiJ6XOhKjaII1sNio8Vb8ImnbMXVLBVhl2vI2hvzIHOwt9veGxyLwhu4dlcw59bzVjgjNoPHU2f0yOj5CRkpMocg2HjwaaBitzmZuaKWuGTKCgKHt8SKabqHulrJwno1qYQLGyJ56OrCuWtrChlMPExcbHH4s1ymK1NJZtM4Fxu3mvMXvMLdBj2ip60zG0WoBzENLVJL+66TDj7GQmbOc1EE9N4SURDvSRqcgj/gH8wC0LsGPtAK7pN7Chw4cQSYQAACH5BAUBAB8ALBYABAAaACcAAAVw4PdBTQOJaKquX+k2bJw6b+nIcu3isV7yLFrttioYczWWcVmICYkq5hKolB6pKOsUm9Vyu9JvKiyOls/otHqNQ7gR6ff7LJeX63Mx3n3f0+txeWyDhIVlBmsGiopoi45njo9fkZKTlIhil42RaYsxIQAh+QQFAQAfACwWAAkAGgAnAAAFdOAnjmQZOVCprmTjuikrf289y/Ub32SUuw6e6teICEuO31GVfC1Zxqd0Sq1arYVsAavNUrvdKVgrHm+l5jMazPVe3/C4/IN4I+73Kn5P3fOffn+AgXUqBocGK4QriIiKfoaNjip4LJKTT5eHU5qJnJJWjVUhACH5BAUBAB8ALAkAFgAnABoAAAV04CeOZGmepdM0Duq+5yo3cO2qcwPZPJnLveBvFezhZrsi76cM4lrNqHRKrVpPhmoBZuh2o4VwGOUtK8VoU9lcRKdJazbP/R7Fv236tnQ/If4IJ3pYa36Af4JuLl6Gh4gmYlKOgFclk4+VIpeBmSOTnZaUTSEAIfkEBQEAHwAsBAAWACcAGgAABXfg9xmkIZ5oqq5rWbJwnLqubLP0e+9nTvJAnwnIyxGJtaNyyWw6n1Ao4hmRIa7XpaPBbbCw4OO2y1WBw0Ryt4o6o3cRNdeRcmfTcojZvSr4CytyXntvKH9/gWR6X3cph4crEQ6LSo+IUYaWgJgnmpucIpagjpc3IQAh+QQFAQAfACwEAAkAGgAnAAAFb+AnjqJhkmiamqyhvmjLwrA806p946Tu8isbMNca1ozIpHLJTCKeiCYUupxOlVaqMxvdZqtWqbZJLpvPyEK5wGYz23AlPJ6c0412t9yucjQaDi98KX+FDTBtfYZ/gUmLhUqPf0p+i42Oi00QfxAiIQAh+QQFAQAfACwEAAQAGgAnAAAFc+AnjmRZGqhhrmyasrDounE7o/V64yvi6zuTb4gA0oTEn+lYSg5zSGcROpJOqVUntknc9rzgsHhMLhXOhTEaHV6vwW62N36G09tutbzM7/v/JhFlDYQNDmKFhYdeEYmFYA6OhIJbEJINYZdhlolkEA6UUCEAIfkEAQEAHwAsBAAEACcAGgAABXXgJ45kWSIoYq5sS6apK8swPN9mHeP8p6O9UmG4+qlMhmRryCwUa6uk1LBqMp9A5FQptBKDW2nX6+SFxSRyuXemjpvBz5lljYu2srX9vu/7/4CBgh8NhQ6DK4WKDYgkEIuGjSKQipKElIySj5CHlpSWIw6RoCEAOw==); + background-position : center center; + background-repeat : no-repeat; +} + +/* General panels */ + +.GPpanel { + background-color: #FFF; +} + +.GPpanelHeader { + position: relative; + width: 100%; +} + +.GPpanelTitle { + width: 100%; + height: 100%; + text-align: center; + font-weight: bold; +} + +.GPpanelClose, .GPpanelReduce, .GPpanelInfo { + position: absolute; + cursor: pointer; +} + +/* Showing/hiding advanced panels */ + +.GPshowAdvancedToolPicto { + position: relative; + box-sizing: border-box; + cursor: pointer; +} + +.GPshowAdvancedToolOpen { + position: absolute; + display: block; + box-sizing: border-box; +} + +/* Flex inputs */ + +.GPflexInput { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; + transition: max-height 0.3s ease-out, opacity 0.3s ease-out; +} + +/* FIXME tempory hack with :not(.GPlocationOriginHidden) ! +.GPflexInput > *:not(.GPlocationOriginHidden) */ +.GPflexInput > * { + display: block; + height: 28px; + line-height: 26px; + border: 1px solid #999; + border-radius: 0; +} + +.GPflexInput *:not(:last-child) { + border-right:none; +} + +.GPflexInput *:first-child { + border-radius: 3px 0 0 3px; +} + +.GPflexInput *:last-child { + border-radius: 0 3px 3px 0; +} + +.GPflexInput > *:not(input) { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.GPflexInput > input { + -webkit-flex: 1; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + padding: 0 5px; + min-width: 0; +} + +.GPflexInput > select { + -webkit-flex: 1; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + padding-right: 7px; +} + +.GPflexInput > label { + background-color: #F2F2F2; + color: #666; + padding-left: 7px; + padding-right: 9px; + cursor: pointer; +} + +/* Particular inputs */ + +.GPinputSelect { + display: block; + height: 28px; + line-height: 26px; + margin: auto; + border: 1px solid #999; + color: #333; + cursor: pointer; +} + +input.GPinputSubmit { + display: block; + width: 80px; + margin: auto; + height: 28px; + line-height: 26px; + padding: 0; + background: none; + border: none; + border-radius: 3px; + font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; + color: #FFF; + font-weight: bold; + opacity: 0.8; + transition: opacity 0.2s ease-out; + cursor: pointer; +} + +input.GPinputSubmit:hover { + opacity: 1; +} + +/* Autocomplete/geocode results */ + +.GPautoCompleteList, +.GPadvancedAutoCompleteList { + z-index: 2; + display: none; + position: absolute; + max-height: 140px; + background-color: #FFF; + border: 1px solid #999; + overflow-y: hidden; +} + +.GPadvancedAutoCompleteList { + width: calc(100% - 28px); + border-top: none; + font-size: 0.9em; +} + +.GPautoCompleteProposal { + width: 100%; + height: 28px; + line-height: 16px; + padding: 6px 10px; + color: #5E5E5E; + font-size: 1.0em; + overflow: hidden; + white-space: nowrap; + text-overflow:ellipsis; + cursor: pointer; +} + +.GPautoCompleteProposal:hover { + color: #000000; + background-color: #CEDBEF +} + +/* Showing additional hidden options */ + +.GPshowMoreOptions { + display: block; + position: absolute; + width: 28px; + height: 28px; + cursor: pointer; + transition: all 0.5s ease-out 0s; +} + +input[type="checkbox"]:checked + .GPshowMoreOptions { + -webkit-transform: rotateX(180deg); + transform: rotateX(180deg); + /* bottom: 90px; */ +} + +/* GET FEATURE INFO */ + +label[id^=GPgetFeatureInfoPicto] { + display: inline-block; +} + +div[id^=GPgetFeatureInfo-] + label { + display: block; +} + +span[id^=GPgetFeatureInfoActivate], +span[id^=GPgetFeatureInfoDeactivate] { + position: absolute; + display: block; + transition: border-radius 0.5s ease-out 0s, opacity 0.5s ease-out 0s; +} + +span[id^=GPgetFeatureInfoActivate] { + background-position: 0 0; + opacity: 1; +} + +span[id^=GPgetFeatureInfoDeactivate] { + opacity: 0; +} + +div[id^=GPgetFeatureInfo-] input[type="checkbox"]:not(:checked) + label[id^=GPgetFeatureInfoPicto] span[id^=GPgetFeatureInfoDeactivate] { + opacity: 1; +} + +/* ISOCHRON */ + +div[id^=GPisochron-] { + top: 140px; +} + +/* Showing/hiding mouse position panel */ + +label[id^=GPshowIsochronPicto] { + display: inline-block; +} + +input[id^=GPshowIsochron-] + label { + display: block; +} + +input[id^=GPshowIsochron-]:checked + label { + display: none; +} + +input[id^=GPshowIsochron-] + label + div { + display: none; +} + +input[id^=GPshowIsochron-]:checked + label + div { + display: block; +} + +/* General panels */ + +div[id^=GPisochronPanel-] { + width: 280px; +} + +/* Calc waiting */ + +.GPisochronCalcWaitingContainerVisible, +.GPisochronCalcWaitingContainerHidden { + position: absolute; + top: 32px; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255,255,255,0.9); + font-size: 1.5em; + font-weight: bold; + overflow: hidden; +} + +.GPisochronCalcWaitingContainerVisible { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; +} + +.GPisochronCalcWaitingContainerHidden { + display: none; +} + +.GPisochronCalcWaiting { + margin: auto; +} + +/* Isochron form */ + +form[id^=GPisochronForm] { + padding: 15px; +} + +.GPisochronFormMini { + max-height: 58px; + overflow: hidden; +} + +.GPisochronFormMini div[id^="GPisochronReset-"], +.GPisochronFormMini label[id^="GPshowIsoExclusionsPicto-"] { + display: none; +} + +.GPisochronOriginVisible { + display: block; +} + +.GPisochronOriginHidden { + display: none; +} + +.GPisochronOriginPointerImg { + width: 28px; + background-color: #F2F2F2; + cursor: pointer; +} + +input[id^="GPisochronOriginPointer"] + .GPisochronOriginPointerImg { + background-position: -1px -1px; +} + +input[id^="GPisochronOriginPointer"]:checked + .GPisochronOriginPointerImg { + background-position: -29px -1px; +} + +input[id^=GPisochronSubmit] { + margin-top: 5px; +} + +/* Alternative choice */ + +div[id^=GPisochronChoice] { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; + width: 160px; + -webkit-justify-content: space-between; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + margin: auto; + margin-top: 15px; + margin-bottom: 5px; +} + +.GPisochronChoiceAlt input { + display: none; +} + +.GPisochronChoiceAltImg { + display: block; + width: 28px; + height: 28px; + margin: auto; + cursor: pointer; +} + +input[id^=GPisochronChoiceAltChron] + .GPisochronChoiceAltImg { + background-position: -56px 0; +} + +input[id^=GPisochronChoiceAltChron]:checked + .GPisochronChoiceAltImg { + background-position: -84px 0; +} + +input[id^=GPisochronChoiceAltDist] + .GPisochronChoiceAltImg { + background-position: -112px 0; +} + +input[id^=GPisochronChoiceAltDist]:checked + .GPisochronChoiceAltImg { + background-position: -140px 0; +} + +.GPisochronChoiceAlt span { + cursor: pointer; + display:block; + color: #999; +} + +.GPisochronValueHidden { + display: none; +} + +div[id^=GPisochronValueChron], +div[id^=GPisochronValueDist] { + width: 220px; + margin: auto; +} + +/* Mode choice */ + +div[id^=GPisochronModeChoice] { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; + -webkit-justify-content: space-between; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + margin: 15px 0; +} + +.GPisochronModeLabel { + display: block; + text-align: center; + margin-bottom: 5px; +} + +div[id^=GPisochronTransportChoice] input { + display: none; +} + +.GPisochronTransportImg { + display: inline-block; + width: 28px; + height: 28px; + cursor: pointer; +} + +.GPisochronTransportImg:first-of-type { + margin-left: 18px; + margin-right: 10px; +} + +input[id^=GPisochronTransportCar] + .GPisochronTransportImg { + background-position: -168px 0; +} + +input[id^=GPisochronTransportCar]:checked + .GPisochronTransportImg { + background-position: -196px 0; +} + +input[id^=GPisochronTransportPedestrian] + .GPisochronTransportImg { + background-position: -224px 0; +} + +input[id^=GPisochronTransportPedestrian]:checked + .GPisochronTransportImg { + background-position: -252px 0; +} + +select[id^=GPisochronDirectionSelect] { + width: 80px; +} + +/* Showing/hiding exclusions */ + +input[id^=GPshowIsoExclusions] { + display: none; +} + +.GPshowIsoExclusionsPicto { + top: 250px; + right: 0; + transition: all 0.5s ease-out 0s; +} + +input[id^=GPshowIsoExclusions] + label + div[id^=GPisoExclusions] { + max-height: 0; + opacity: 0; + margin-bottom: 0; +} + +input[id^=GPshowIsoExclusions]:checked + label + div[id^=GPisoExclusions] { + display: block; + max-height: 60px; + opacity: 1; + margin-bottom: 15px; +} + +/* Exclusions */ + +div[id^=GPisoExclusions] { + transition: max-height 0.5s ease-in-out 0.25s, opacity 0.5s ease-in-out 0.25s, margin 0.3s ease-in-out 0.25s; + overflow: hidden; +} + +.GPisoExclusionsLabel { + display: block; + text-align: center; + margin-bottom: 10px; + font-weight: bold; + line-height: 16px; +} + +.GPisoExclusionsOptions { + display: -webkit-flex; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-justify-content: space-around; + -ms-flex-pack: distribute; + justify-content: space-around; +} + +.GPisoExclusionsOption { + display: block; + height: 28px; + line-height: 26px; + color: #A77; + background-color: #FEE; + padding-left: 28px; + padding-right: 5px; + border: 1px solid #A77; + border-radius: 3px; + cursor: pointer; +} + +input:checked + .GPisoExclusionsOption { + background-color: #EFE; + background-position: 0 -28px; + color: #797; + border: 1px solid #797; +} + +/* Reset picto */ +div[id^=GPisochronReset] { + position: absolute; + margin-top: 5px; + width: 28px; + height: 28px; + border-radius: 3px; + opacity: 0.8; + background-position: -281px 0; + transition: opacity 0.2s ease-out; + cursor: pointer; +} + +div[id^=GPisochronReset]:hover { + opacity: 1; +} + +/* LAYER SWITCHER */ + +div[id^=GPlayerSwitcher-] { + font-size: 11px; +} + +div[id^=GPlayerSwitcher-] [draggable] { + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + user-select: none; + /* Required to make elements draggable in old WebKit */ + -khtml-user-drag: element; + -webkit-user-drag: element; +} + +/* Manage opening of the components through hiden checkboxes */ + +div[id^=GPlayerSwitcher-] input[type="checkbox"] + div, +div[id^=GPlayerSwitcher-] input[type="checkbox"] + label + div { + max-height: 0px; +} + +div[id^=GPlayerSwitcher-] label { + display: block; +} + +/* Showing/hiding layers list */ + +label[id^=GPshowLayersListPicto] { + position: relative; + float: right; + display: block; + opacity: 1; + transition: opacity 0.5s ease-out 0s, box-shadow 0.5s ease-out 0s, border 0.5s ease-out 0s, border-radius 0.5s ease-out 0s; + cursor: pointer; +} + +span[id^=GPshowLayersListOpen], +span[id^=GPshowLayersListClose] { + position: absolute; + display: block; + transition: border-radius 0.5s ease-out 0s, opacity 0.5s ease-out 0s; +} + +span[id^=GPshowLayersListOpen] { + background-position: 0 0; + opacity: 1; +} + +span[id^=GPshowLayersListClose] { + opacity: 0; +} + +div[id^=GPlayerSwitcher-] input[type="checkbox"]:checked + div + label[id^=GPshowLayersListPicto] { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +div[id^=GPlayerSwitcher-] input[type="checkbox"]:checked + div + label[id^=GPshowLayersListPicto] span[id^=GPshowLayersListClose] { + opacity: 1; +} + +/* Layers list */ + +div[id^=GPlayersList] { + position: relative; + width: 180px; + border-bottom-right-radius: 0; + opacity: 0; + overflow: auto; + transition: max-height 0.5s ease-out 0s, opacity 0.5s ease-out 0.25s; +} + +div[id^=GPlayerSwitcher-] input[type="checkbox"]:checked + div[id^=GPlayersList] { + max-height: 232px; + opacity: 1; + transition: max-height 0.5s ease-in 0s, opacity 0.25s ease-in 0s; +} + +/* Layer : general */ + +.GPlayerSwitcher_layer { + position: relative; + top: 0; + background-color: #FFF; + border-bottom: 1px dotted #CCC; + overflow: hidden; +} + +div[id^=GPlayersList] .GPlayerSwitcher_layer:last-child { + border-bottom: none; +} + +.GPlayerBasicTools, +.GPlayerAdvancedTools { + position: relative; + width: 100%; + height: 28px; +} + +.GPlayerVisibility, +.GPlayerInfo, +.GPlayerInfoOpened, +.GPlayerRemove { + width: 28px; + height: 28px; + cursor: pointer; +} + +.GPlayerVisibility, +.GPlayerName, +.GPlayerInfo, +.GPlayerInfoOpened, +.GPlayerRemove, +.GPlayerOpacity, +.GPlayerOpacityValue { + position: absolute; + top: 0; +} + +.GPghostLayer { + opacity: 0; +} + +/* Layer basic tools */ + +.GPlayerBasicTools { + background-color: #FFF; +} + +.GPlayerVisibility { + left: 0; + background-position: -28px 0; +} + +input[type="checkbox"]:checked + .GPlayerVisibility { + background-position: 0 0; +} + +.GPlayerName { + left: 28px; + width: calc(100% - 56px); + line-height: 28px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + padding-left: 4px; + cursor: move; +} + +.outOfRange .GPlayerName { + color: #AAA; +} + +/* Showing layer advanced tools */ + +.GPshowLayerAdvancedTools { + top: 0; + right: 0; + background-position: -112px 0; +} + +.GPlayerAdvancedTools { + display: block; + max-height: 0; + opacity: 0; + transition: max-height 0.5s ease-out 0s, opacity 0.5s ease-out 0s; +} + +div[id^=GPlayerSwitcher-] input[type="checkbox"]:checked + label + .GPlayerAdvancedTools { + max-height: 28px; + opacity: 1; +} + +/* Layer advanced tools */ + +.GPlayerInfo { + left: 0; + background-position: -55px 0; +} + +.GPlayerInfoOpened { + left: 0; + background-position: -83px 0; +} + +.GPlayerOpacity { + left: 28px; + width: calc(100% - 100px); + height: 28px; + padding-left: 8px; +} + +.GPlayerOpacityValue { + width: 32px; + left: calc(100% - 60px); + line-height: 28px; + font-size: 10px; + font-style: italic; + cursor: default; +} + +.GPlayerRemove { + right: 0; + background-position: -140px 0; +} + +/* Opacity slider : general */ + +.GPlayerOpacity input { + -webkit-appearance: none; + -moz-appearance: none; + background: none; + display: block; + width: 100%; + height: 100%; + margin: 0; + padding: 0; + overflow: hidden; + cursor: pointer; +} + +.GPlayerOpacity input[type="range"]:focus { + box-shadow: none; + outline: none; +} + +/* Opacity slider : Chrome, Safari, Opera */ + +.GPlayerOpacity input[type="range"]::-webkit-slider-runnable-track { + -webkit-appearance: none; + height: 3px; +} + +.GPlayerOpacity input[type="range"]::-webkit-slider-thumb:before { + position: absolute; + top: 0; + right: 50%; + left: -200px; + height: 3px; + pointer-events: none; +} + +.GPlayerOpacity input[type="range"]::-webkit-slider-thumb { + width: 9px; + height: 17px; + -webkit-appearance: none; + border: 2px solid #FFF; + background-color: #505050; + position: relative; + top: -7px; +} + +/* Opacity slider : Firefox */ + +.GPlayerOpacity input[type="range"]::-moz-range-track { + width: 80px; + height: 3px; +} + +.GPlayerOpacity input[type="range"]::-moz-range-thumb { + width: 5px; + height: 13px; + border: 2px solid #FFF; + border-radius: 0; + box-shadow: 0; + background-color: #505050; + position: relative; +} + +/* Opacity slider : IE */ + +.GPlayerOpacity input[type="range"]::-ms-track { + border: 0; + border-color: transparent; + border-radius: 0; + border-width: 0; + color: transparent; + height: 3px; + width: 80px; +} + +.GPlayerOpacity input[type="range"]::-ms-fill-lower, +.GPlayerOpacity input[type="range"]::-ms-fill-upper { + background: transparent; + border-radius: 0; +} + +.GPlayerOpacity input[type="range"]::-ms-thumb { + width: 5px; + height: 13px; + border: 2px solid #FFF; + background-color: #505050; +} + +.GPlayerOpacity input[type="range"]::-ms-tooltip { + display: none; +} + +/* Layer info panel */ + +div[id^=GPlayerInfoPanel] { + position: absolute; + top: 0; + overflow-y: hidden; + padding-top: 10px; + padding-bottom: 10px; +} + +.GPlayerInfoPanelOpened { + display: block; +} + +.GPlayerInfoPanelClosed { + display: none; +} + +div[id^=GPlayerInfoContent] { + position: relative; + width: 280px; + max-height: 200px; + overflow-y: auto; + padding-left: 10px; + padding-right: 10px; +} + +div[id^=GPlayerInfoTitle] { + width: calc(100% - 52px); + margin: auto; + margin-bottom: 10px; + padding-bottom: 5px; + text-align: center; + font-size: 1.1em; + font-weight: bold; +} + +div[id^=GPlayerInfoQuicklook] { + position: absolute; + top: -2px; + left: 10px; + width: 20px; + height: 20px; + cursor: pointer; +} + +div[id^=GPlayerInfoClose] { + position: absolute; + top: -8px; + right: 10px; + width: 28px; + height: 28px; + cursor: pointer; +} + +div[id^=GPlayerInfoDescription] { + font-size: 0.9em; +} + +div[id^=GPlayerInfoLegend] { + +} + +div[id^=GPlayerInfoMetadata] { + +} + +.GPlayerInfoSubtitle { + padding-left: 35px; + font-weight: bold; + margin-top: 10px; + margin-bottom: 4px; +} + +.GPlayerInfoLink, +.GPlayerInfoPopup { + line-height: 20px; + padding-left: 23px; + white-space: nowrap; + overflow-x: hidden; + text-overflow: ellipsis; + color: #999999; + background-repeat: no-repeat; + cursor: pointer; +} + +.GPlayerInfoLink { + background-position: 0 -20px; +} + +.GPlayerInfoLink:hover, +.GPlayerInfoPopup:hover { + color: #333; +} + +.GPlayerInfoLink a, +.GPlayerInfoLink a:visited +.GPlayerInfoLink a:focus +.GPlayerInfoLink a:hover { + text-decoration: none; + color: inherit; +} + +/* Location */ + +/* Location form */ + +.GPlocationStageFlexInput { + max-height: 28px; + opacity: 1; +} + +.GPlocationStageFlexInputHidden { + max-height: 0; + opacity: 0; + overflow: hidden; +} + +.GPlocationOriginVisible { + display: block; +} + +.GPlocationOriginHidden { + display: none; +} + +label.GPlocationOriginPointerImg[id*="GPlocationOriginPointerImg"] { + width: 28px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-right: 1px solid #999; +} + +input[id*="GPlocationOriginPointer"] + .GPlocationOriginPointerImg { + background-position: -1px -1px; +} + +input[id*="GPlocationOriginPointer"]:checked + .GPlocationOriginPointerImg { + background-position: -29px -1px; +} + +.GPlocationStageRemove, +div[id^=GPlocationStageAdd] { + width: 28px; + border: none; + cursor: pointer; +} + +.GPlocationStageRemove { + background-position: -84px 0; +} + +div[id^=GPlocationStageAdd] { + background-position: -56px 0; +} + +/* Showing/hiding drawing panel */ + +label[id^=GPshowMeasureAreaPicto-] { + display: inline-block; +} + +input[id^=GPshowMeasureArea-] + label { + display: block; +} + +input[id^=GPshowMeasureArea-]:checked + label { + display: block; + background-color: rgba(0,60,136,0.5); +} + +input[id^=GPshowMeasureArea-] + label + div { + display: block; +} + +input[id^=GPshowMeasureArea-]:checked + label + div { + display: block; +} + +/* Showing/hiding drawing panel */ + +label[id^=GPshowMeasureAzimuthPicto-] { + display: inline-block; +} + +input[id^=GPshowMeasureAzimuth-] + label { + display: block; +} + +input[id^=GPshowMeasureAzimuth-]:checked + label { + display: block; + background-color: rgba(0,60,136,0.5); +} + +input[id^=GPshowMeasureAzimuth-] + label + div { + display: block; +} + +input[id^=GPshowMeasureAzimuth-]:checked + label + div { + display: block; +} + +/* Showing/hiding drawing panel */ + +label[id^=GPshowMeasureLengthPicto-] { + display: inline-block; +} + +input[id^=GPshowMeasureLength-] + label { + display: block; +} + +input[id^=GPshowMeasureLength-]:checked + label { + display: block; + background-color: rgba(0,60,136,0.5); +} + +input[id^=GPshowMeasureLength-] + label + div { + display: block; +} + +input[id^=GPshowMeasureLength-]:checked + label + div { + display: block; +} + +/* MEASURE TOOL */ + +.GPmeasureTooltip { + position: relative; + background: rgba(0, 0, 0, 0.5); + border-radius: 4px; + color: white; + padding: 4px 8px; + white-space: nowrap; +} + +.GPmeasureTooltip-measure { + font-weight: bold; +} + +.GPmeasureTooltip-info { + font-size: 0.75em; + text-align: center; +} + +.GPmeasureTooltip-static { + background-color: #ffcc33; + color: black; + border: 1px solid white; +} + +.GPmeasureTooltip-hidden { + display: none; +} + +.GPmeasureTooltip-measure::before, +.GPmeasureTooltip-info::before, +.GPmeasureTooltip-static::before { + border-top: 6px solid rgba(0, 0, 0, 0.5); + border-right: 6px solid transparent; + border-left: 6px solid transparent; + content: ""; + position: absolute; + bottom: -6px; + margin-left: -7px; + left: 50%; +} + +.GPmeasureTooltip-static::before { + border-top-color: #ffcc33; +} + +/* MOUSE POSITION */ + +/* Showing/hiding mouse position panel */ + +label[id^=GPshowMousePositionPicto] { + display: inline-block; +} + +input[id^=GPshowMousePosition-] + label { + display: block; +} + +input[id^=GPshowMousePosition-]:checked + label { + display: none; +} + +input[id^=GPshowMousePosition-] + label + div { + display: none; +} + +input[id^=GPshowMousePosition-]:checked + label + div { + display: block; +} + +/* General panels */ + +div[id^=GPmousePositionPanel-] { + width: 300px; + overflow: hidden; +} + +/* Basic infos */ + +div[id^=GPmousePositionBasicPanel] { + padding: 10px 15px; + position: relative; +} + +.GPmousePositionLabel, +.GPmousePositionCoords { + display: inline-block; + line-height: 20px; +} + +.GPmousePositionLabel { + width: 80px; + font-weight: bold; +} + +.GPmousePositionCoords { + width: 110px; +} + +/* Showing settings */ + +.GPshowMousePositionSettingsPicto { + bottom: 5px; + right: 0; + transition: all 0.5s ease-out 0s; +} + +div[id^=GPmousePosition-] input[type="checkbox"]:checked + .GPshowMousePositionSettingsPicto { + bottom: 100px; +} + +div[id^=GPmousePositionSettings-] { + display: block; + max-height: 0; + opacity: 0; + transition: max-height 0.5s ease-out 0s, opacity 0.5s ease-out 0s; +} + +div[id^=GPmousePosition-] input[type="checkbox"]:checked + label + div[id^=GPmousePositionSettings-] { + max-height: 95px; + opacity: 1; +} + +/* Settings */ + +div[id^=GPmousePositionSettings-] { + height: 95px; + padding-left: 0 15px; + overflow: hidden; +} + +.GPmousePositionSettingsLabel { + display: block; + margin: auto; + text-align: center; + font-weight: bold; + line-height: 16px; +} + +.GPmousePositionSettingsSelect { + width: 180px; + margin-top: 5px; +} + +/* General panels */ + +div[id^=GPmousePositionCoordinate-] input.error { + border: 1px solid rgb(255, 0, 0); +} +div[id^=GPmousePositionCoordinate-] input[readonly] { + border: 1px solid transparent; + padding: 2px; + text-align: right; +} + +input[id^=GPmousePositionLat-], input[id^=GPmousePositionLon-] { + width: 120px; +} + +span[id^=GPmousePositionAlt-] { + display: inline-block; + padding: 2px; + width: 120px; + line-height: 20px; + text-align: right; +} + +/* sexagesimal coordinates */ + +.GPSexagesimal, .GPSexagesimalsec { + margin:0; + border: 1px solid rgb(204, 204, 204); + border-radius: 4px; +} + +input:read-only.GPSexagesimal, input:read-only.GPSexagesimalsec { + text-align: right; +} + +.GPSexagesimal { + width: 30px; +} + +.GPSexagesimalsec { + width: 45px; +} +.GPmousePositionSexagesimalLabel { + font-size: 1.2em; + vertical-align: middle; + padding: 0; +} + +/* direction N/S ou E/O */ +select.GPmousePositionDirection { + border: 1px solid #999; + margin-left: 2px; +} + +select.GPmousePositionDirection:disabled{ + border: none; + background: transparent; + color: black; + /*For FireFox*/ + -webkit-appearance: none; + /*For Chrome*/ + -moz-appearance: none; +} + +/*For IE10+*/ +select.GPmousePositionDirection:disabled::-ms-expand { + display: none; +} +select.GPmousePositionDirection:disabled::-ms-value { + color: black; +} + +.GPmousePositionUnits, +.GPmousePositionAltitudeUnits { + margin-left: 5px; +} + +/* EDIT COORDINATES TOOLS */ +.GPmousePositionPanelEditTools { + position: absolute; + top: 20px; + right: 5px; +} + +.GPmousePositionEditTool { + width: 18px; + height: 18px; + display: inline-block; + cursor: pointer; +} + +span[id^=GPmousePositionCloseEdit] { + background-position: -18px 0; + margin-left: 5px; +} + +img[id^=GPmousePositionMarker]:hover { + cursor: pointer; + opacity: 0.7; +} + +/* Map center localisation */ + +#GPmapCenter { + display: none; + position: absolute; + top: 50%; + left: 50%; + width: 50px; + height: 50px; + margin-top: -25px; + margin-left: -25px; +} + +#GPmapCenter.GPmapCenterVisible { + display: block; +} + +/* REVERSE GEOCODING */ + +[id^="GPreverseGeocoding-"] { + top: 180px; +} + +/* Showing/hiding reverse geocoding panel */ + +[id^="GPshowReverseGeocodingPicto-"] { + display: inline-block; +} + +[id^="GPshowReverseGeocoding-"] + label { + display: block; +} + +[id^="GPshowReverseGeocoding-"]:checked + label { + display: none; +} + +[id^="GPshowReverseGeocoding-"] + label + div { + display: none; +} + +[id^="GPshowReverseGeocoding-"]:checked + label + div { + display: block; +} + +/* General panels */ + +div[id^=GPreverseGeocodingResultsClose] { + top: 0; + right: 0; + width: 30px; + height: 32px; + /*background-position: -26px 0;*/ +} + +[id^="GPreverseGeocodingPanel-"] { + width: 280px; +} + +.GPreverseGeocodingComponentHidden { + display: none; +} + +div[id^="GPreverseGeocodingReturnPicto-"] { + position: absolute; + width: 26px; + height: 26px; + border-radius: 3px; + opacity: 1; + background-position: 0 0; + cursor: pointer; +} + +.GPreverseGeocodingReturnPictoHidden { + display: none; +} + +/* Calc waiting */ + +.GPreverseGeocodingCalcWaitingContainerVisible, +.GPreverseGeocodingCalcWaitingContainerHidden { + position: absolute; + top: 32px; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255,255,255,0.9); + font-size: 1.5em; + font-weight: bold; + overflow: hidden; +} + +.GPreverseGeocodingCalcWaitingContainerVisible { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; +} + +.GPreverseGeocodingCalcWaitingContainerHidden { + display: none; +} + +.GPreverseGeocodingCalcWaiting { + margin: auto; +} + +/* Search panel */ + +[id^="GPreverseGeocodingForm-"] { + position: relative; + max-height: 270px; + overflow-y: auto; + padding-left: 15px; + padding-right: 15px; + padding-top: 10px; +} + +.GPreverseGeocodingCodeLabel, +.GPreverseGeocodingFilterLabel { + max-width: 105px; +} + +.GPreverseGeocodingCodeLabel, +.GPreverseGeocodingCode { + margin-top: 5px; + margin-bottom: 0; +} + +.GPreverseGeocodingFilterLabel, +.GPreverseGeocodingFilterInput { + margin-bottom: 5px; +} + +input[id^="GPreverseGeocodingSubmit-"] { + margin-top: 5px; + margin-bottom: 15px; + width: 100px; +} + +/* Calc waiting */ + +/* TODO: waiting */ +.GPreverseGeocodingCalcWaitingContainerVisible, +.GPreverseGeocodingCalcWaitingContainerHidden { + position: absolute; + top: 32px; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255,255,255,0.9); + font-size: 1.5em; + font-weight: bold; + overflow: hidden; +} + +.GPreverseGeocodingCalcWaitingContainerVisible { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; +} + +.GPreverseGeocodingCalcWaitingContainerHidden { + display: none; +} + +.GPreverseGeocodingCalcWaiting { + margin: auto; +} + +/* Result panel */ + +div[id^=GPreverseGeocodingResultsList-] { + position: relative; + max-height: 210px; + overflow-y: auto; +} + +/* ROUTE */ + +div[id^=GProute-] { + top: 100px; +} + +/* Showing/hiding route panel */ + +label[id^=GPshowRoutePicto] { + display: inline-block; +} + +input[id^=GPshowRoute-] + label { + display: block; +} + +input[id^=GPshowRoute-]:checked + label { + display: none; +} + +input[id^=GPshowRoute-] + label + div { + display: none; +} + +input[id^=GPshowRoute-]:checked + label + div { + display: block; +} + +/* General panels */ + +div[id^=GProutePanel-] { + width: 320px; +} + +.GProuteComponentHidden { + display: none; +} + +/* Calc waiting */ + +.GProuteCalcWaitingContainerVisible, +.GProuteCalcWaitingContainerHidden { + position: absolute; + top: 32px; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255,255,255,0.9); + font-size: 1.5em; + font-weight: bold; + overflow: hidden; +} + +.GProuteCalcWaitingContainerVisible { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; +} + +.GProuteCalcWaitingContainerHidden { + display: none; +} + +.GProuteCalcWaiting { + margin: auto; +} + +/* Route form */ + +form[id^=GProuteForm] { + padding: 15px; +} + +.GProuteFormMini { + max-height: 58px; + overflow: hidden; + -webkit-transform: translateY(-5px); + transform: translateY(-5px); +} + +.GProuteStageFlexInput { + max-height: 28px; + opacity: 1; +} + +.GProuteStageFlexInputHidden { + max-height: 0; + opacity: 0; + overflow: hidden; +} + +form[id^=GProuteForm] > .GPlocationStageFlexInput { + margin-top: 5px; +} + +form[id^=GProuteForm] > .GPlocationStageFlexInputHidden { + margin-top: 0; +} + +form[id^=GProuteForm].GProuteFormMini .GPlocationStageFlexInput:first-child { + margin-top: 5px; +} + +.GProuteOriginVisible { + display: block; +} + +.GProuteOriginHidden { + display: none; +} + +label.GProuteOriginPointerImg[id*="GProuteOriginPointerImg"] { + width: 28px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-right: 1px solid #999; +} + +input[id*="GProuteOriginPointer"] + .GProuteOriginPointerImg { + background-position: -1px -1px; +} + +input[id*="GProuteOriginPointer"]:checked + .GProuteOriginPointerImg { + background-position: -29px -1px; +} + +.GProuteStageRemove, +div[id^=GProuteStageAdd] { + width: 28px; + border: none; + cursor: pointer; +} + +.GProuteFormMini .GProuteStageRemove, +.GProuteFormMini div[id^=GProuteStageAdd] { + display: none; +} + +.GProuteStageRemove { + background-position: -84px 0; +} + +div[id^=GProuteStageAdd] { + background-position: -56px 0; +} + +/* Mode choice */ + +div[id^=GProuteModeChoice] { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; + -webkit-justify-content: space-around; + -ms-flex-pack: distribute; + justify-content: space-around; + margin: 15px 0; +} + +.GProuteModeLabel { + display: block; + text-align: center; + margin-bottom: 5px; +} + +div[id^=GProuteTransportChoice] input { + display: none; +} + +.GProuteTransportImg { + display: inline-block; + width: 28px; + height: 28px; + cursor: pointer; +} + +.GProuteTransportImg:first-of-type { + margin-left: 18px; + margin-right: 10px; +} + +input[id^=GProuteTransportCar] + .GProuteTransportImg { + background-position: -112px 0; +} + +input[id^=GProuteTransportCar]:checked + .GProuteTransportImg { + background-position: -140px 0; +} + +input[id^=GProuteTransportPedestrian] + .GProuteTransportImg { + background-position: -168px 0; +} + +input[id^=GProuteTransportPedestrian]:checked + .GProuteTransportImg { + background-position: -196px 0; +} + +select[id^=GProuteComputationSelect] { + width: 100px; +} + +/* Showing/hiding exclusions */ + +input[id^=GPshowRouteExclusions] { + display: none; +} + +.GPshowRouteExclusionsPicto { + /* top: 185px; */ + /* bottom: 25px; */ + right: 0; + transition: all 0.3s ease-out 0s; +} + +input[id^=GPshowRouteExclusions] + label + div[id^=GProuteExclusions] { + max-height: 0; + opacity: 0; + margin-bottom: 0; +} + +input[id^=GPshowRouteExclusions]:checked + label + div[id^=GProuteExclusions] { + display: block; + max-height: 60px; + opacity: 1; + margin-bottom: 15px; +} + +/* Exclusions */ + +div[id^=GProuteExclusions] { + transition: max-height 0.5s ease-in-out 0.25s, opacity 0.5s ease-in-out 0.25s, margin 0.3s ease-in-out 0.25s; + overflow: hidden; +} + +.GProuteExclusionsLabel { + display: block; + text-align: center; + margin-bottom: 10px; + font-weight: bold; + line-height: 16px; +} + +.GProuteExclusionsOptions { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; + -webkit-justify-content: space-around; + -ms-flex-pack: distribute; + justify-content: space-around; +} + +.GProuteExclusionsOption { + display: block; + height: 28px; + line-height: 26px; + color: #A77; + background-color: #FEE; + padding-left: 28px; + padding-right: 5px; + border: 1px solid #A77; + border-radius: 3px; + cursor: pointer; +} + +input:checked + .GProuteExclusionsOption { + background-color: #EFE; + background-position: 0 -28px; + color: #797; + border: 1px solid #797; +} + +/* Reset picto */ +div[id^=GProuteReset] { + position: absolute; + width: 28px; + height: 28px; + border-radius: 3px; + opacity: 0.8; + background-position: -224px 0; + transition: opacity 0.2s ease-out; + cursor: pointer; +} + +div[id^=GProuteReset]:hover { + opacity: 1; +} + +/* Result panel */ + +div[id^=GProuteResultsPanel] { + padding: 15px; +} + +.GProuteResultStage { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; +} + +div[id^=GProuteResultsStages] { + margin-bottom: 15px; +} + +.GProuteResultStageLabel, +.GProuteResultStageValue, +.GProuteResultsValueLabel, +div[id^=GProuteResultsValueDist], +div[id^=GProuteResultsValueTime] { + display: inline-block; + line-height: 18px; +} + +.GProuteResultStageLabel, +.GProuteResultsValueLabel { + color: #666; +} + +.GProuteResultStageLabel { + width: 60px; +} + +.GProuteResultsValueLabel { + width: 65px; +} + +.GProuteResultStageValue { + -webkit-flex: 1; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + overflow-x: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +div[id^=GProuteResultsValueDist], +div[id^=GProuteResultsValueTime] { + width: 80px; + font-weight: bold; +} + +div[id^=GProuteResults-] { + display: -webkit-flex; + display: -ms-flexbox; + display: -webkit-box; + display: flex; + -webkit-justify-content: space-between; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + margin-bottom: 10px; +} + +select[id^=GProuteResultsComputationSelect] { + width: 100px; +} + +div[id^=GProuteResultsNew] { + width: 28px; + height: 28px; + border-radius: 3px; + opacity: 0.8; + background-position: -224px 0; + transition: opacity 0.2s ease-out; + cursor: pointer; +} + +div[id^=GProuteResultsNew]:hover { + opacity: 1; +} + +/* Results details header */ + +.GPfakeBorder { + display: inline-block; + height: 14px; + width: 60px; + border-bottom: 1px solid #999; +} + +.GPfakeBorderLeft { + margin-left:15px; +} + +input[id^=GProuteResultsShowDetails] + label, +input[id^=GProuteResultsShowDetails] + label + label { + width: 130px; + line-height: 28px; + vertical-align: top; + text-align: center; + font-weight: bold; + cursor: pointer; + transition: color 0.2s ease-out; +} + +input[id^=GProuteResultsShowDetails] + label, +input[id^=GProuteResultsShowDetails]:checked + label + label { + display: inline-block; +} + +input[id^=GProuteResultsShowDetails]:checked + label, +input[id^=GProuteResultsShowDetails] + label + label { + display: none; +} + +input[id^=GProuteResultsShowDetails] + label + label + div + div[id^=GProuteResultsDetails] { + max-height: 0; + opacity: 0; +} + +input[id^=GProuteResultsShowDetails]:checked + label + label + div + div[id^=GProuteResultsDetails] { + max-height: 200px; + opacity: 1; +} + +div[id^=GProuteResultsDetails] { + overflow-y: auto; + transition: max-height 0.5s ease-in-out 0.25s, opacity 0.5s ease-in-out 0.25s; +} + +.GProuteResultsDetailsNumber, +.GProuteResultsDetailsInstruction { + display: inline-block; + margin-top: 4px; + line-height: 16px; + color: #666; +} + +.GProuteResultsDetailsNumber { + font-weight: bold; + width: 22px; + text-align: right; + vertical-align: top; +} + +.GProuteResultsDetailsInstruction { + width: calc(100% - 30px); + padding-left: 5px; +} + +/* SEARCH ENGINE */ + +input[id^=GPshowSearchEngine-] + label + form[id^=GPsearchInput-] { + max-width: 0px; +} + +/* Showing/hiding search engine input */ + +input[id^=GPshowSearchEngine-] { + display: none; +} + +label[id^=GPshowSearchEnginePicto] { + display: inline-block; + transition: border-radius 0s ease-out 0s; + transition-delay: 0.5s; +} + +input[id^=GPshowSearchEngine-]:checked + label { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + transition-delay: 0s; +} + +input[id^=GPshowSearchEngine-] + label + form[id^=GPsearchInput-] { + max-width: 0px; + border: none; + transition: max-width 0.5s ease-out 0s; +} + +input[id^=GPshowSearchEngine-]:checked + label + form[id^=GPsearchInput-] { + max-width: 280px; +} + +input[id^=GPshowSearchEngine-] + label + form[id^=GPsearchInput-] + div[id^=GPshowAdvancedSearch] { + display: none; +} + +input[id^=GPshowSearchEngine-]:checked + label + form[id^=GPsearchInput-] + div[id^=GPshowAdvancedSearch] { + display: inline-block; +} + +div[id^=GPautoCompleteList] { + display: none; +} + +input[id^=GPshowSearchEngine-]:checked + label + form[id^=GPsearchInput-] + div[id^=GPautoCompleteList] { + display: block; +} + +/* Simple search input */ + +form[id^=GPsearchInput-] { + display: inline-block; + position: relative; + left: -3px; + width: 280px; + overflow: hidden; +} + +form[id^=GPsearchInput-] input { + display: block; + width: 100%; + height: 100%; + border: 1px solid #999; + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + padding: 0; + padding-right: 30px; + padding-left: 5px; + color: #333; + font-size: 1.0em; +} + +form[id^=GPsearchInput-] input:disabled { + background-color: #DDD; + color: #999; +} + +div[id^=GPsearchInputReset] { + position: absolute; + top: 0; + right: 0; + width: 30px; + height: 32px; + background-position: -30px 0; + cursor: pointer; +} + +/* General panels */ + +div[id^=GPgeocodeResultsClose], +div[id^=GPadvancedSearchClose] { + top: 0; + right: 0; + width: 30px; + height: 32px; +} + +div[id^=GPgeocodeResultsClose] { + background-position: 0 0; +} + +div[id^=GPadvancedSearchClose] { + background-repeat: no-repeat; +} + +/* Advanced search picto */ + +div[id^=GPshowAdvancedSearch] { + transition: border-radius 0s ease-out 0s; + transition-delay: 0.5s; +} + +/* Advanced search panel */ + +div[id^=GPadvancedSearchPanel] { + display: none; + width: 280px; + vertical-align: top; + overflow: hidden; +} + +form[id^=GPadvancedSearchForm] { + max-height: 220px; + overflow-y: auto; + padding-left: 15px; + padding-right: 15px; +} + +.GPadvancedSearchCodeLabel, +.GPadvancedSearchFilterLabel { + max-width: 105px; +} + +.GPadvancedSearchCodeLabel, +.GPadvancedSearchCode, + div[id^=GPadvancedSearchFilters] { + margin-top: 15px; +} + +.GPadvancedSearchFilterLabel, +.GPadvancedSearchFilterInput { + margin-bottom: 5px; +} + +input[id^=GPadvancedSearchSubmit] { + margin-top: 10px; + margin-bottom: 15px; +} + +/* Autocomplete list / geocode results */ + +div[id^=GPautoCompleteList], +div[id^=GPgeocodeResultsList] { + width: 280px; +} + +div[id^=GPautoCompleteList] { + top: 35px; +} + +div[id^=GPgeocodeResultsList] { + display: none; + position: absolute; + top: 40px; + border-radius: 4px; + overflow: hidden; +} + +div[id^=GPgeocodeResults-] { + background-color: #FFF; + max-height: 140px; + overflow-y: auto; +} + +/** +* Map loading +* @sample +* function setMap(map) { +* var center = this._createLoadingElement(); +* map.getViewport().appendChild(center); +* center.className = ""; // invisible ! +* center.className = "GPmapLoadingVisible"; // visible ! +* } +* +* function _createLoadingElement() { +* var div = document.createElement("div"); +* div.id = "GPmapLoading"; +* div.className = ""; +* return div; +* } +*/ + +#GPmapLoading { + display: none; + position: absolute; + z-index: 50; + top: 50%; + left: 50%; + width: 50px; + height: 50px; + margin-top: -25px; + margin-left: -25px; +} + +#GPmapLoading.GPmapLoadingVisible { + display: block; +} + +#GPmapLoading { + background-image: url(data:image/gif;base64,R0lGODlhNAA0AIQSAAFkpSZ5sAGV3k2Ruiao3kOj1/GUBk225pe/B4S83XrK75HH3qrS5szMzNbW1sHe797e3ubm5v///////////////////////////////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFAQAfACwAAAAANAA0AAAF5uAnjmRpnmiqrmzrvnAsz3T9FXhh72Ke8zWfDzgT/ogxIw55cjgiJ6XOhKjaII1sNio8Vb8ImnbMXVLBVhl2vI2hvzIHOwt9veGxyLwhu4dlcw59bzVjgjNoPHU2f0yOj5CRkpMocg2HjwaaBitzmZuaKWuGTKCgKHt8SKabqHulrJwno1qYQLGyJ56OrCuWtrChlMPExcbHH4s1ymK1NJZtM4Fxu3mvMXvMLdBj2ip60zG0WoBzENLVJL+66TDj7GQmbOc1EE9N4SURDvSRqcgj/gH8wC0LsGPtAK7pN7Chw4cQSYQAACH5BAUBAB8ALBYABAAaACcAAAVw4PdBTQOJaKquX+k2bJw6b+nIcu3isV7yLFrttioYczWWcVmICYkq5hKolB6pKOsUm9Vyu9JvKiyOls/otHqNQ7gR6ff7LJeX63Mx3n3f0+txeWyDhIVlBmsGiopoi45njo9fkZKTlIhil42RaYsxIQAh+QQFAQAfACwWAAkAGgAnAAAFdOAnjmQZOVCprmTjuikrf289y/Ub32SUuw6e6teICEuO31GVfC1Zxqd0Sq1arYVsAavNUrvdKVgrHm+l5jMazPVe3/C4/IN4I+73Kn5P3fOffn+AgXUqBocGK4QriIiKfoaNjip4LJKTT5eHU5qJnJJWjVUhACH5BAUBAB8ALAkAFgAnABoAAAV04CeOZGmepdM0Duq+5yo3cO2qcwPZPJnLveBvFezhZrsi76cM4lrNqHRKrVpPhmoBZuh2o4VwGOUtK8VoU9lcRKdJazbP/R7Fv236tnQ/If4IJ3pYa36Af4JuLl6Gh4gmYlKOgFclk4+VIpeBmSOTnZaUTSEAIfkEBQEAHwAsBAAWACcAGgAABXfg9xmkIZ5oqq5rWbJwnLqubLP0e+9nTvJAnwnIyxGJtaNyyWw6n1Ao4hmRIa7XpaPBbbCw4OO2y1WBw0Ryt4o6o3cRNdeRcmfTcojZvSr4CytyXntvKH9/gWR6X3cph4crEQ6LSo+IUYaWgJgnmpucIpagjpc3IQAh+QQFAQAfACwEAAkAGgAnAAAFb+AnjqJhkmiamqyhvmjLwrA806p946Tu8isbMNca1ozIpHLJTCKeiCYUupxOlVaqMxvdZqtWqbZJLpvPyEK5wGYz23AlPJ6c0412t9yucjQaDi98KX+FDTBtfYZ/gUmLhUqPf0p+i42Oi00QfxAiIQAh+QQFAQAfACwEAAQAGgAnAAAFc+AnjmRZGqhhrmyasrDounE7o/V64yvi6zuTb4gA0oTEn+lYSg5zSGcROpJOqVUntknc9rzgsHhMLhXOhTEaHV6vwW62N36G09tutbzM7/v/JhFlDYQNDmKFhYdeEYmFYA6OhIJbEJINYZdhlolkEA6UUCEAIfkEAQEAHwAsBAAEACcAGgAABXXgJ45kWSIoYq5sS6apK8swPN9mHeP8p6O9UmG4+qlMhmRryCwUa6uk1LBqMp9A5FQptBKDW2nX6+SFxSRyuXemjpvBz5lljYu2srX9vu/7/4CBgh8NhQ6DK4WKDYgkEIuGjSKQipKElIySj5CHlpSWIw6RoCEAOw==); +} + + +.GPwidget { + position: relative; /* overwritten */ +} + + +#GPadvancedToolsPanel { + position: initial; /* overwritten */ +} + +/* General panels */ + +.GPpanel { + box-shadow: 0 1px 6px #000; + border-radius: 5px; +} + +.GPpanelHeader { + height: 32px; + background-color: #FFF; + border-top-left-radius: 5px; + border-top-right-radius: 5px; +} + +.GPpanelTitle { + width: calc(100% - 60px); + margin: auto; + line-height: 32px; + color: #C77A04; + border-bottom: 1px solid #C77A04; +} + +.GPpanelClose { + top: 0; + right: 0; + width: 30px; + height: 32px; + background-position: -30px 1px; +} + +.GPpanelReduce { + top: 0; + right: 30px; + width: 30px; + height: 32px; + background-position: -60px 1px; +} + +.GPpanelInfo { + top: 0; + left: 0px; + width: 30px; + height: 32px; + background-position: -90px 1px; +} + +/* Showing/hiding advanced panel */ + +.GPshowAdvancedToolPicto { + width: 30px; + height: 30px; + box-shadow: 0 1px 6px #000; + background-color: #FFF; + border-radius: 5px; +} + +.GPshowAdvancedToolPicto:hover { + background-color: #F4F4F4; +} + +.GPshowAdvancedToolOpen { + width: 100%; + height: 100%; +} + +/* Submit inputs */ + +input.GPinputSubmit { + background-color: #C77A04; +} + +/* Showing additional hidden options */ + +.GPshowMoreOptionsImage { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAA7klEQVRIx+3UsUtCURTH8e/x3eciSAhC/QnRGIQPHPoTHPJfyLEpyFqcXkGT/0HQ4uBQs4s4VAiO0b/QJKIIcn333QYVnErIt53PeO7hnnv4wQWllMqa7NL0fmu+wPeLeXd10sJun322yE9t0AY5j+Lk+K+7cjs+rAPSmFnTGzQpb4qDJuWZNT2QxqpnTxsCvN0FdfHyBIwllVoaihXnXkGOxPvLyr173utAgI+b8NTn/AtwsC5NJJVa5WE5yizD+ZySC00XIFgmF4UC40wzXBhcFCfVKE6qC4PTDP81EGB4zeF2hmePfOt3ppT61Q8G2258CD5NRAAAAABJRU5ErkJggg==); +} + +div[id^=GPelevationPath-] { + top: 0; /*overwritten*/ +} + +/* Showing/hiding elevationPath panel */ + +label[id^=GPshowElevationPathPicto] { + display: inline-block; +} + +input[id^=GPshowElevationPath-] + label { + display: block; +} + +input[id^=GPshowElevationPath-]:checked + label { + /* display: none; */ +} + +input[id^=GPshowElevationPath-] + label + div { + display: none; +} + +input[id^=GPshowElevationPath-]:checked + label + div { + display: block; +} + +span[id^=GPshowElevationPathOpen] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAeCAYAAADnydqVAAAABGdBTUEAALGPC/xhBQAAAA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A/U62XCihVHH+mFfAFyIei+riePRI2l5ZgqWoLn4U8eSlnWQdSc0ZeF8hww/8zvNwJ068QncddX5vdfsbzLmSwL2sItvA6YOci+piq5v9WDGMn1zA/1fdDjhjxFwXuAicGzXfE+GW8Qa9Ks49FHATA7U/iZWVlZWVlZWVlZXV/OlfogGsuXT788cAAAAASUVORK5CYII=); +} + + +/* Panel */ + +[id^=GPelevationPathPanelClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAeCAYAAADnydqVAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAOwwAADsMBx2+oZAAAA4VJREFUaN7tmEFv3EQUx3/PHkdIFT3RIk4gAZVAHIrEwUslJM7tsfABQlBLk+ZuL0K+ZPfOpgpRmg+AhLhQPgBFja1euCAObXqlatUL4oDqXe/jkHXj7jqNvesmWZj/xdbYY83Mz/837w1YWVlZWVlZWVk1LjnshTg0Ot7W6gzELt0cqwxq3n7QM6s5cXARYNGpefuL3FvlHaujlXNQ+K0L96VEksD7cid0NzWaHGcuBYkDt7fT9lYszkmZquG6DG4cGs3bi84vts8CF9HvBHGS1HU0yq5IxHACbuj2BFkWVd1pe3y81l+fdyh3Is46qVkVuKjw7ijW3gN+HnqD3oWIx1M7+EWgi3vw+LX5zWN4fn98spSk7roWthQFSUL3hiDLeQ/R4XvzDnen7X7mpGYXaCucB04Bp1A+RPnaSc1uEriXZ8qiqziwCthZXKwgSeB+i0gh9OpNfyG7QoTmzt2fiW75XnZ13OXzBldUvq9Q3aiofu53sx8ac3BduA1kf+p3s1VUCyFXlu6m7mYSuuv/Nbh3Is6KyvY4XH+tj7/Wn1geFdm+HXCmccBHWSaVQc6QJZBrxwU3Do3EoSkmoDL23IlD80rtbDc1q8CrNbqcNmKuz5xknYA6TrWbrd4NXDKRledjl95sCm4cmgj4FHiz4vsAT4GncWj+Ae4Dv7Y6g804NP0pJnqJEuskbe/gLsIl4JvGAB/nIUcmiExu1NKEI1udQT6vT6b4RDq6vg/sju7r/3DK22XNeXguBa2805iDjwtusRQq+YW/SFJXy0qoqirABfgFeKvmJxZG1z8LIVv2hl53qtMsTwOATxRc0S0ZkqrkbbKUpC7TQs4d3OoMosJ+emgW2+oMNA7NG8DrwGvAE+DR6IepvV4CD0ZlUZ1ODxo76DgpcH0vu0qEJoGr+yXU9JCLDi7ca8W+D4GHjcxXuIXWAyzw00xZ9HHuuROlELrhr+0BfJZdoxvFEipJ3d68lklDb9AD/q7R5S+z16f5Ovho5Pz2LFkR3fIXshUpOEtA/U62XCihVHH+mFfAFyIei+riePRI2l5ZgqWoLn4U8eSlnWQdSc0ZeF8hww/8zvNwJ068QncddX5vdfsbzLmSwL2sItvA6YOci+piq5v9WDGMn1zA/1fdDjhjxFwXuAicGzXfE+GW8Qa9Ks49FHATA7U/iZWVlZWVlZWVlZXV/OlfogGsuXT788cAAAAASUVORK5CYII=); +} + +div[id^=GPelevationPathPanelReduce] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAeCAYAAADnydqVAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAOwwAADsMBx2+oZAAAA4VJREFUaN7tmEFv3EQUx3/PHkdIFT3RIk4gAZVAHIrEwUslJM7tsfABQlBLk+ZuL0K+ZPfOpgpRmg+AhLhQPgBFja1euCAObXqlatUL4oDqXe/jkHXj7jqNvesmWZj/xdbYY83Mz/837w1YWVlZWVlZWVk1LjnshTg0Ot7W6gzELt0cqwxq3n7QM6s5cXARYNGpefuL3FvlHaujlXNQ+K0L96VEksD7cid0NzWaHGcuBYkDt7fT9lYszkmZquG6DG4cGs3bi84vts8CF9HvBHGS1HU0yq5IxHACbuj2BFkWVd1pe3y81l+fdyh3Is46qVkVuKjw7ijW3gN+HnqD3oWIx1M7+EWgi3vw+LX5zWN4fn98spSk7roWthQFSUL3hiDLeQ/R4XvzDnen7X7mpGYXaCucB04Bp1A+RPnaSc1uEriXZ8qiqziwCthZXKwgSeB+i0gh9OpNfyG7QoTmzt2fiW75XnZ13OXzBldUvq9Q3aiofu53sx8ac3BduA1kf+p3s1VUCyFXlu6m7mYSuuv/Nbh3Is6KyvY4XH+tj7/Wn1geFdm+HXCmccBHWSaVQc6QJZBrxwU3Do3EoSkmoDL23IlD80rtbDc1q8CrNbqcNmKuz5xknYA6TrWbrd4NXDKRledjl95sCm4cmgj4FHiz4vsAT4GncWj+Ae4Dv7Y6g804NP0pJnqJEuskbe/gLsIl4JvGAB/nIUcmiExu1NKEI1udQT6vT6b4RDq6vg/sju7r/3DK22XNeXguBa2805iDjwtusRQq+YW/SFJXy0qoqirABfgFeKvmJxZG1z8LIVv2hl53qtMsTwOATxRc0S0ZkqrkbbKUpC7TQs4d3OoMosJ+emgW2+oMNA7NG8DrwGvAE+DR6IepvV4CD0ZlUZ1ODxo76DgpcH0vu0qEJoGr+yXU9JCLDi7ca8W+D4GHjcxXuIXWAyzw00xZ9HHuuROlELrhr+0BfJZdoxvFEipJ3d68lklDb9AD/q7R5S+z16f5Ovho5Pz2LFkR3fIXshUpOEtA/U62XCihVHH+mFfAFyIei+riePRI2l5ZgqWoLn4U8eSlnWQdSc0ZeF8hww/8zvNwJ068QncddX5vdfsbzLmSwL2sItvA6YOci+piq5v9WDGMn1zA/1fdDjhjxFwXuAicGzXfE+GW8Qa9Ks49FHATA7U/iZWVlZWVlZWVlZXV/OlfogGsuXT788cAAAAASUVORK5CYII=); +} + +div[id^=GPelevationPathPanelInfo] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAeCAYAAADnydqVAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAOwwAADsMBx2+oZAAAA4VJREFUaN7tmEFv3EQUx3/PHkdIFT3RIk4gAZVAHIrEwUslJM7tsfABQlBLk+ZuL0K+ZPfOpgpRmg+AhLhQPgBFja1euCAObXqlatUL4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VlZWVlZXV/OlfogGsuXT788cAAAAASUVORK5CYII=); +} + +[id^=GPelevationPathPanel-] { + width: 280px; +} + +/* ELEVATION PATH DISPLAY */ + +[id^=GPelevationPathProfil] { + height: 150px; + width: inherit; + line-height: normal; /* surcharge leaflet container */ +} + +/*.GPpanelHeader { + padding: unset; +}*/ + +/* +@media (min-width:720px) and (min-height:720px) { + +[id^=GPelevationPathPanel] { +top: 15px; +left: 15px; +} + +} + +@media (min-width:720px) and (min-height:520px) { + +[id^=GPelevationPathPanel] { +width: 460px; +} + +[id^=GPelevationPathProfil] { +height: 220px; +} + +} + +@media (max-width:560px), (max-height:340px) { + +[id^=GPelevationPathPanel] { +display: none !important; +} + +} +*/ + +/* ISOCHRON */ + +div[id^=GPisochron-] { + /* left: 10px; */ + top: 0; /*overwritten*/ +} + +/* Showing/hiding isochron panel */ + +span[id^=GPshowIsochronOpen] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4AUXCjIhczCQjQAABBBJREFUaN7tmE9oI2UYxn/vTCeQHjxou2ULroIHsazYg4ekiiDSk+AtSiyZNqbLtrYUFC8NKwTcbW+LuNm20ubQySGwvfWwe1gvImuDFxXqgqhgPWzp0t1jo0knr4dOutO0tmkTpcV5IJCZL+/Mlx/P93x/IFCgQIECBQoU6L+QnKTItu17QJ93ec9xnNcDlIfLOGFdn+/7awHGFjt6aGjo5Wq1mgIuAe3e7S1gXlUX8vn8ais7tzJpXVKpvhoNuaOSoXrQbxSkOGl+oYbxc9+1SvZMg47FYqFwOPw5cNkbBS7w0Gs+B5iAKyJzW1tbHy8tLZVbARnRuZ336UIk5F6uh60gK2nzhiBjgKrIxGmFbTQI+Q4wCqwDI5ZlnXMcp9txnG7Lss6p6iiwoapj4XD4diwWCzVvgWrvk/7JcLFsZtVnDAUpps2bHmQAEa2+dGYdbdv2jAd5pVKpvFMoFDYP+l08Hu+wLGsZiIrIzcXFxfFmOlaLBER8z9lxNhnU52Tvn+h8xHJH/iliTjVoL5N/ANYrlUpvPeREIpESkQnHcV7xwf4R6FLV3mYz+yDYBrpQhTLIh2cFMkDbYY3exGcAnx3kZBEZ2OGxo0KhsDk4OHhVVWcMw0gBHzXpAtVpd6I4aVKD7SLDe9zRJOSVdNtJzam+a62L41B0avvPhkGLSL+qupZlLdW3DQwMPOUt7a7vcaHqLSCrqv0tGnKq0+7Ed5Mmrsj43iGoCy10cgZ4E3juGDV/eZ8S8AvwDfAlUDmWo1X1ArCRy+Ue27b9PvCsr/kFICQid/w1juM8sm37IXChlUPPFUT2Z4u0KD5rjnzjBPW1FVYP8GstDI4Fum6oXAHqZ/Xf1tbWvj1gJIiqaisA1y3h6l+UKpZN1cz+pd/xXrGrr4Hnj1lfW2E98PGqj5Mjo+MPVX0xlUo9ncvlehrcnj+jqp3A/X8Fsui8VCmr1O7JcLFs0gTsGpSMz1RHjRSNTm3rSrrtPNAFdACbwEZ0alvrITcSHXeBnnK5/C4w12DH3wMMr7blkCOWO0IGLU6a+mQ1cnLYHph6d2uDteve3qK5DYuqLng7vk/j8XjHUQ9LJpOdXsS4hmHkmgFdTJvZvXGhs5FrOyAFNDLtToDO+ow5XCybN87koVI+n18VkTmg27Ks5cNgJ5PJTtd1l4HzwMzi4uJPTXbt+91JRXQ+EnLHxec0AY1MuWOoZnd9gXH/tII+ctb2tuC3gbeAByJyVVVvOY7zqJbJXlxc8SB/VSqV3m7ReccoUr0YmdoLed+mJm1mUWM1Ol2ZPfOHSu3t7ddVdcQ7QKoCG15zl++gaaZUKn3SCsj/62PSRCJxEfhARPp9y6DfVfWuYRi55uMiUKBAgQIFChQoUHP6G9rPw3e7WtEyAAAAAElFTkSuQmCC); +} + +/* General panels */ + +div[id^=GPisochronPanel-] { + left: 10px; +} + +div[id^=GPisochronPanelClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSU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QAEa2+dGYdbdv2jAd5pVKpvFMoFDYP+l08Hu+wLGsZiIrIzcXFxfFmOlaLBER8z9lxNhnU52Tvn+h8xHJH/iliTjVoL5N/ANYrlUpvPeREIpESkQnHcV7xwf4R6FLV3mYz+yDYBrpQhTLIh2cFMkDbYY3exGcAnx3kZBEZ2OGxo0KhsDk4OHhVVWcMw0gBHzXpAtVpd6I4aVKD7SLDe9zRJOSVdNtJzam+a62L41B0avvPhkGLSL+qupZlLdW3DQwMPOUt7a7vcaHqLSCrqv0tGnKq0+7Ed5Mmrsj43iGoCy10cgZ4E3juGDV/eZ8S8AvwDfAlUDmWo1X1ArCRy+Ue27b9PvCsr/kFICQid/w1juM8sm37IXChlUPPFUT2Z4u0KD5rjnzjBPW1FVYP8GstDI4Fum6oXAHqZ/Xf1tbWvj1gJIiqaisA1y3h6l+UKpZN1cz+pd/xXrGrr4Hnj1lfW2E98PGqj5Mjo+MPVX0xlUo9ncvlehrcnj+jqp3A/X8Fsui8VCmr1O7JcLFs0gTsGpSMz1RHjRSNTm3rSrrtPNAFdACbwEZ0alvrITcSHXeBnnK5/C4w12DH3wMMr7blkCOWO0IGLU6a+mQ1cnLYHph6d2uDteve3qK5DYuqLng7vk/j8XjHUQ9LJpOdXsS4hmHkmgFdTJvZvXGhs5FrOyAFNDLtToDO+ow5XCybN87koVI+n18VkTmg27Ks5cNgJ5PJTtd1l4HzwMzi4uJPTXbt+91JRXQ+EnLHxec0AY1MuWOoZnd9gXH/tII+ctb2tuC3gbeAByJyVVVvOY7zqJbJXlxc8SB/VSqV3m7ReccoUr0YmdoLed+mJm1mUWM1Ol2ZPfOHSu3t7ddVdcQ7QKoCG15zl++gaaZUKn3SCsj/62PSRCJxEfhARPp9y6DfVfWuYRi55uMiUKBAgQIFChQoUHP6G9rPw3e7WtEyAAAAAElFTkSuQmCC); +} + +/* Calc waiting */ + +.GPisochronCalcWaitingContainerVisible, +.GPisochronCalcWaitingContainerHidden { + border-radius: 5px; +} + +/* Isochron form */ + +.GPisochronChoiceAlt input:checked + label + span { + color: #C77A04; +} + +.GPisochronOriginPointerImg, +.GPisochronChoiceAltImg, +.GPisochronTransportImg { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAAcCAYAAADvCUNwAAAV90lEQVR42u1ce1RU173+fmceqMNTlIcoMYCVC6LUWl4Gn9Wbq4lGrpLXutZEwxCTmFsTY0BsaasQTWp6YxJmJj6aZNVWEhStWbUxMSGmgo9eNUgwcbDXRxQVZgRRcJg5v/sHZ2AYBpgZBpvS+dZiMXP2mfOds8/e3/72bz8AL7zwwgsvvPDCCy++XyBvFnRAo9GsJKJfAVBJh24BWKtWq1/vD77yNfKVYNjx0drUgtbX/xHPz8w+AJYAGA+gFsA7RFQ7UPi8GPiQe7PARt07ixmkz78C0D8C01nMJD7uP77esQPAAgDHAMQDUDNzAhEZBwjfgEFRUVGEIAhvM7OvKIrLly9f/k1/8h1egwiB6W0wfGUyXv7jdfjm+5gvgrdodILKwTHfAcTXk1sKBvAAAB0RJQN4GkAEgBkDgW+gQRAELYB5RDRDJpPt6nc+Ji1A80A0wyIKu76v+eKWQ9NqtQwAarX6rnRZy3PlDACpBeZ+4SsuLlYaDIYFzGwmIvs8Met0uszAwMDSzMxMkyf4qvKhbGyVLQDD7OAdmMtzZZn+SktpfD5Md6sgEFE9Mw8C4CMdCpb+Xx8IfAMQU20+x92FEtKvfMy8AUAWgFlEdNzb5XQTGo1modFo3EhE93aXR8y802g01mg0mpeys7P71DpV5MgWNpqwEeieD6CdjSZZTXkOXkottDjFZ21kHEGtVpMz6TqdDgBQWlqK1tZWNDQ0YPfu3WVwEGu1NjKOkFpgJmfSK9YoAACnNemwmJrQcv1bVBalOuTzoosAJBPRPsnRZ/Q/oZgMEvYR4MskZvSDmL0kfU0C0P+CVlRUFCIIwgoAc20q0Qki2ieXy9948sknPdqy/jUfIYJJvoKAudaaUZErP8GEfa2i+Y0phX1ryfPz84WwsLANRPSikz+JJqISjUbzWm1t7er8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uEADIIgRDkSMwkmIvLIPoQywnACDCSIUY7EzMoH8Iffkyza7i0lXnjhhRdeeOGFF1544YUXXtwl/D97JTQuDxIoMgAAAABJRU5ErkJggg==); +} + +.GPisoExclusionsOption { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAA4CAYAAADuMJi0AAAE60lEQVRYw+2YWWxUZRTHz/fd7y4zzAzTbaAdpgtQWsBiYVxYGpcEMCwRQkx48KHGhKg0WhESNYglwSUgWCKGTaMRBF4MwShpECUshlJqay2U0LCUwrRAp+0Ms997v8UnEl8Gp9Ppg2Z+bzfnn+/knHvud865AFmy/GfZVVZW/vvb9eduNn7Wc+ixGQ3/pm+UcO735VP3/rpsyc39TudHyXQ4maF61cqfZi97ocbjmVi6YGHNxoOeor3JtDskae606uqzFfPmvRqLxFg4EetIpiXJDJqqOHBwEEjIDyXjiVw4t/S1XD34TKs/MX+z4EEAgK0SwhPtjh+qq6tXBjGOtTY11a31D371qEygRxn3F3vWPVE1deN0G82T+m5BbCAIF+8lBttifLoFQeV0Wf7R7XbndsXird19/TUfAhgZeZ8H7eoXHYVWwzdBFTedsmhScfg0wfQPTRF7FfLdmBRRo4Q9RzTS8aeKRaeERAsC8TmRto30HJKqMCrhIcMUMuMcmADQJAQ5GJ4fqUMpFdE2mXgqOe+ewXhJFCHoJNJxu4omz7bhScVMyj/BeFPGUrlZIROOYRT4C0C0S0h8qUhHAAC2yGTFpUka7Skfx9/DZFZGnH2gEHxYwnc6EIguBYnDqtTzT3uDTFb3VdrEcZfWk5GUrgZxaI4QCyyaBAME04sUzTvL+dBD+xnOu8qiwrIgV1leEuf9JxhvTzu6Bgm5ThXkmNcciriaS8R2lXySTHvUqXb/lqsNp3Ju0qstx2Z7sfTZGuKsLAFkV4RK0J5k2s4wXYqYsO6WyYq0HUYN06c9XgX5SxcBuIt4gvJ40sJi7MaVONtVhGHmqIrmyLPzm29tqqf7ilwHUtHvVAjO9tksWbJkyQzehd7xo5ppUqW2tlbzLp380rhxitdB8q/4fD6acnsaKfX19c7Ji+QNJU/at7mmWaaZpklHNSY+irq6urzSxbBBy1PqEoJZfFdYoK2tjY2Jw4aGBpurJvKOmme8xWTTmgjq1DApAwAxoo6fIkieEnoF2+NvUDVqCekRiNIY4ip1eb1ekvEI39/65nOyO7hWtyWc0biOogkDooYOBhhujLEDAIZG4xADAH/4sH796y42ZWBNxBGrCEZMlNBNER1k8fBtdixwwzzY2toaTCtCr9drLXzKthgSiv7ztycfjvQo4O5fpWqR5eGojg2DCX1IBHUf3n2nSey5cOpCXzrfIXp6WZXXMtdYh8pi74JTL3WTijO913tDq2qXVxplA5vijgdTIvE4RO6zYOwO3t5/GhpbTrYMjnh78nq9VlwRfRmVRdewArM6rgJBTLbxErYEAL4J5vetwFJ4jghQxMNSSAyoO42Ttl0Xz58PpzXqS5JE7G5tqrAbM6lMiyljkimoQg1m8VhK7xrFwTpdixcbAaGz2/I+ekba0dzc/iDt3SIUCtH+Lv+lArWwjWPOOeMVJjI1imgRsyXKDas+mxoc83vKUfOC/dO2lst3M7LM3L816LdLBedlTIKU05lUNfJM2ZzEBZORXzuHrtk+vnSu63JGF9LhvmH9/uVAu8s9MUQFnWUSIweHFJ90z7qlq+n6L2OyAQMA918NdLrcrqgwoQrHyAHWqX49PDzMxsohAIAUuZ0YsHJHSO+G5t7eXj+k8ZsEjfCmsQGABgAmAMQBIJEdN7L8//gb3FshBGMt81oAAAAASUVORK5CYII=); +} + +/* Reset picto */ +div[id^=GPisochronReset] { + background-color: #C77A04; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAAcCAYAAADvCUNwAAAV90lEQVR42u1ce1RU173+fmceqMNTlIcoMYCVC6LUWl4Gn9Wbq4lGrpLXutZEwxCTmFsTY0BsaasQTWp6YxJmJj6aZNVWEhStWbUxMSGmgo9eNUgwcbDXRxQVZgRRcJg5v/sHZ2AYBpgZBpvS+dZiMXP2mfOds8/e3/72bz8AL7zwwgsvvPDCCy++Xy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cpdFoXrPutNHY2Jj87rvvGqKioj6Pj48PCw4OHgW0LU6vqqqqPXfu3HhmthEX2qBWq/c4y5daaNl1OEf+Gkk7bbQYziUf+3WIYVjCos9DU54JGxI+bhQA3L5SebG2/M3a+tMl48Fiss0lNqSst+xBP0IURUyePBkNDQ04evQoEhISwMy4evVqv/AxWzD6wf9BS70eF/6Si/DJ/w2wiJsXyp2+RlNT03MqlWoeABOA3wUFBb3qxM/ypAprjaE5f8+3xeeEwcI8BkwE/O68XuyVj4E8kvjIRT4AKC4ullnjnE899dRBu4q9U+p+TvXUeyle1DEYkLzOfNDOue0E8wzyIF8f8A4cLJ9ya6uOgbDBoxvbB1mx8cqVKznubh9ETm8f1P6GNqYozDl3Y/sgZp4DYBuAUClA/iIRaQcK3z8jtFrtPrQteSpTq9XT7NICANzwZF2syKV9AM0lUFlygaUT3/HVCDDLhBsAkFIg/kP3rGNmFYAzRDSqz4I2kKDT6RYw86sAons5VQ9glVqtLu0L3+E1sgXEeBWgXvhYz4xVaYWW0rtcUASpC3aViMwDje+fCVu2bImxWCxnAMgEQZhp79A8bS4Ov4wYQRDOAJCRIMzs4tDQtvTr+yBoUtnZTETPdTKR/+qFJisra3dQUFAcgExm/j2AM5JbaAJQzcy/Z+ZFAOL6KmYAkLbesttfaYlj4kwwdeED0++JeZGizhJ3t8XMGssgou/ulrjcbb5/JpjN5uEADIIgRDkSMwkmIvLIPoQywnACDCSIUY7EzMoH8Iffkyza7i0lXnjhhRdeeOGFF1544YUXXtwl/D97JTQuDxIoMgAAAABJRU5ErkJggg==); +} + +/* LAYER SWITCHER LEAFLET */ + +div[id^=GPlayerSwitcher-] { + top: 10px; + right: 10px; +} + +/* Showing/hiding layers list */ + +label[id^=GPshowLayersListPicto] { + width: 36px; + height: 36px; +} + +span[id^=GPshowLayersListOpen], +span[id^=GPshowLayersListClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAkCAYAAAAq23xmAAAGfklEQVRo3u2Y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qHMvCnS5cuPcrUC7a9CVVVxa1btwDo6Ohgp1uqWWSRRRZZ/B/jn0nf6l+CD/6FAAAAAElFTkSuQmCC); +} + +span[id^=GPshowLayersListClose] { + background-position: -36px 0; +} + +div[id^=GPlayerSwitcher-] input[type="checkbox"]:checked + div + label[id^=GPshowLayersListPicto] { + box-shadow: 0 2px 2px #000; + border-top: 1px solid #CCC; +} + +div[id^=GPlayerSwitcher-] input[type="checkbox"]:checked + div + label[id^=GPshowLayersListPicto] span[id^=GPshowLayersListOpen] { + opacity: 0.4; +} + +/* Layers list */ + +.GPlayerVisibility, +.GPshowLayerAdvancedTools, +.GPlayerInfo, +.GPlayerInfoOpened, +.GPlayerRemove { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAAAcCAYAAAD1EPTXAAAIRUlEQVR42u2aXUyU2R3Gf4eZQZjxo2peQzCCsSL6NkZjHQWrDjEYqxKjySy9MZpsooYLGIia1K+tXogaQhC8mKvGQJW0drKa1ErMbohYK7QzRal2LFiN7LiTcV8Tg2RGw3ycXshM/WCV+bAum/e5mjnnvO/D/5znPOf/Pwzo0KFDhw4dOnTo0KFDhw4dOiYGhD4FOj4W9u7du9BgMKx9vS0ajV5vbGz893jfYZxoQV+5ckU+efKEefPmYbPZMrbBGhoaZmVnZ9dIKTcDRaPNA8Cfw+Hwmf3793+XyTj+epRZWSPGGgGbZZxPvOKLmSJnfnGU7ya6QA0Gw1op5RohxF8ApJRrDAYDwLgFOuEcdM+ePfLhw4ccPnw4YwI9ffr0Z8BvgSnfM2RYSvl5XV2dKxN8Nw8ZPhNSvJdPSPl5yYmoayKtTVNT07ysrKxyKWU58Mv3xPdSCHFDSvm1EOJrh8Pxj4w56Llz52RXVxeapiXaFEXBZrOxffv2jAre5/NJv9/Po0ePCIVCALS3twOQk5ODz+eTc+bMERkQ5x8+sFmnCCEuNDU1VaYr0lFxfpBPCnGh54ChciKJVAjxQEo5nqE5oyIuHx0v0nbQpqYm6fF42LhxIz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OnTo0KFDh44fC/4LLzyqAy83zsEAAAAASUVORK5CYII=); +} + +/* Opacity slider : Chrome, Safari, Opera */ + +.GPlayerOpacity input[type="range"]::-webkit-slider-runnable-track { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAECAYAAAAZDrhMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAwSURBVDiNY/z379//v3//Mvz9+5fh379/DITYxKobKWYxMYwCisBoAFIIRgOQQgAADrTuhXfc36kAAAAASUVORK5CYII=); +} + +/* Opacity slider : Firefox */ + +.GPlayerOpacity input[type="range"]::-moz-range-track { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAECAYAAAAZDrhMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAwSURBVDiNY/z379//v3//Mvz9+5fh379/DITYxKobKWYxMYwCisBoAFIIRgOQQgAADrTuhXfc36kAAAAASUVORK5CYII=); +} + +/* Opacity slider : IE */ + +.GPlayerOpacity input[type="range"]::-ms-track { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAECAYAAAAZDrhMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAwSURBVDiNY/z379//v3//Mvz9+5fh379/DITYxKobKWYxMYwCisBoAFIIRgOQQgAADrTuhXfc36kAAAAASUVORK5CYII=); +} + +/* Layer info panel */ + +div[id^=GPlayerInfoPanel] { + right: 190px; +} + +div[id^=GPlayerInfoTitle] { + color: #C77A04; + border-bottom: 1px solid #C77A04; +} + +div[id^=GPlayerInfoQuicklook] { + background-image: url(data:image/png;base64,iVBOR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wt11Hnb2Gz92+Wsnz15viCfS3dpHbTLKzvlSMOetLyLdlclpwuZJn3x5mMhlc1/0zuHQXSS2SXhiEpt0Ktz4ieoBM4+X52b7Nhv44+apA27aTKysrN0pjZwK3m9vScwO+rc/tAI5mfPp+qvNla3p+qinkuyJjzh01hutV6aFkjeijlqlLwmyYkbI7oXaoqT+yTF0sU39aiNXV5UgsNwo8A7VWd3YnOs6qeMItU5fCsyjpj47n45ap3wcmS9dFYrl9fq+DnVKouIa2tmt+DPLioAyr3tgKZYVjTn9hnBj2dQjSexDwUK9e4oEvLJq8BQwgg5KZuoCuSDcQBDJKqZ7IeH4AeFgzMBrLTShhRCnVEx53EsnhxovKVa8qrT3wu1xQeCJX7HBey08K0keFU/Lv/hwEiSRM32y1uSMDgQu7ZZ3of9dvep7Bwy5Q9Q8AAAAASUVORK5CYII=); +} + +/* Location */ + +.GPlocationStageFlexInput { + margin-bottom: 5px; /*overwritten*/ +} + +/* Location form */ + +.GPlocationOriginPointerImg, +.GPlocationStageRemove, +div[id^=GPlocationStageAdd], +.GPlocationTransportImg { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAAcCAYAAABF79LlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAzSSURBVHic7Zx/bFxVdsc/575nl+BAGLWJYmVF1RUI9UfKbqGJHZKFghZVSgiriEQVlbKAnXmTHyTdVNtgJ1mGruNAqw1tQrDfOD8olSLFUNJ0UzVaxI9AcYyEGgQFiSXaKtsfNqTylOA2qvPmnv7xZuzxeH7POCjb+UjWzNx73v3esXzeufec+wwNGjRo0KBBgwYNGjS4hpGvegINGswGfX19i4wxz6vqXGvtpk2bNn0ym3pDO1lkVJ5Hmes4uul3e5hVvWpxv+oJNGgwGxhjfGCliOA4zivAb86qnooPshKBlJVXwM6qXrWYai7yfV9939d6T6YQZ7tdPdv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Te5aMykXgp9UpBJPQPbhr5X32SmiFwhfABokYiUc2x3f/r16zPGKlf0yJEj84Mg2KqqKwlLIADnCPfs+z3P+89yxyqHt7qY32Tc8GEdTesJ51Q51dwc7L8zTl31Msz203K+729U1d/yPG+as2ejqpJeDfyz53l91WolEolDOafmujzPe7rE/KbNqdzSKsDZneaQKFN6SlfbXltUL/fwSluvrbhKkZmzMea+DRs2vJ5p7+/vfy1dpjzmeV5u8qtqMnMWY+5b2hNM6g13yWuI3KtwrL3X1k2vGlT1LLBQRH4tu73sslx6qb4b2J1Vh68qG18O4amrYDewe7IOX0U2vlIq+QOvcvw+gFgsVtAmfSMotYwvyfj4+OMtLS2rCfd0L0QikT8v47JdhOUgBzhWiZ7+j33czDGrFSYEXrhw3pbUU9glaT2pUA9gcHDQSSaTAGQ7O4CIHCdc3tetojC4lskDLdnODoAxx1G9V65OxaQUA+Q5ntuow/8Ckz4kU1ZZK4PneXuocs8bHpIpr4yWob3XVq0HkEwmT6bfnsnTfRzwgUXVjp/LzbfKSQgTjrl9bpA6Hjimrno1cBx4Krexqv9443mezHYkzKa9N5BKTtE1+P/BoUOHbiH9QJAx5k9z+z3P+6KeekNPcAukHwgyMkPvzmeoq14tiMh/A3+b296I8A2uWYIgmC8iY8aYpRs2bPiXAmYTIvJ39dBzhPnAGMYuXdpjC+qB1kWvDhwtbdKgQYMGDRo0aNCgQYNriP8DimGotcEqvNwAAAAASUVORK5CYII=); +} + +/* MOUSE POSITION */ + +div[id^=GPmousePosition-] { + /* bottom: 10px; */ + /* left: 10px; */ +} + +/* Showing/hiding mouse position panel */ + +span[id^=GPshowMousePositionOpen] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAHjSURBVFiF7ZixctpAEIb/PVk09otkxkUKF8LPc45NwO5RGhqL3jZxHO55InVpMpnxg7iBOf0pLGEQaIREFJj4vhl1dzv7z7+7twA4HI53idaaWmvuO4+6qH0n4HD8XaTpxbx/jTGNY1QRD/0LSnrW7diejJBuOkNAkqF3R6Wez2/nD1UxD7aH46F/AeE3gXxKZt4TR+u5EpA49O4hMhDy7scXf1AV96hpQm06CwCQ9CMgmUjRycybE7YvAIHM2dCbCKSX3xCmH6rCHqzDQWQHIJdKVHpJ6H3nCGrh7JtYQDgNOva6Km5tl8re3jYcz/sTIotSVaBJgRkgnxcHhdPAt1dlfb7MLg6/ZF9rCMBgbG+WnbYQ3VQssEFwcYMq2ahejDEnxpgTFERveX9rctGKfCCKJUlTRyxwwD1cxApkrWdYvyV36eHc2WOgvamdDyiB9EtOmKBjLxuXdA2Os681NooVToWcvJ0SXfZOb6Ldt3QHysQGvr3CCCxO722dPljBcehNVqYx+BhE64vHylsMfu1GtqT0X2lc0u3/HlY/gcyt16VikIsFsukd2f7Sk0VC/a6K2ni1bJtuNDfx0Pch6Wlwuyo2RwBybG+S0FOg+nU+nj/uI1fHf4H7T8vhcDj+AX8AnMTkomeXEcwAAAAASUVORK5CYII=); +} + +div[id^=GPmousePositionPanelClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAHjSURBVFiF7ZixctpAEIb/PVk09otkxkUKF8LPc45NwO5RGhqL3jZxHO55InVpMpnxg7iBOf0pLGEQaIREFJj4vhl1dzv7z7+7twA4HI53idaaWmvuO4+6qH0n4HD8XaTpxbx/jTGNY1QRD/0LSnrW7diejJBuOkNAkqF3R6Wez2/nD1UxD7aH46F/AeE3gXxKZt4TR+u5EpA49O4hMhDy7scXf1AV96hpQm06CwCQ9CMgmUjRycybE7YvAIHM2dCbCKSX3xCmH6rCHqzDQWQHIJdKVHpJ6H3nCGrh7JtYQDgNOva6Km5tl8re3jYcz/sTIotSVaBJgRkgnxcHhdPAt1dlfb7MLg6/ZF9rCMBgbG+WnbYQ3VQssEFwcYMq2ahejDEnxpgTFERveX9rctGKfCCKJUlTRyxwwD1cxApkrWdYvyV36eHc2WOgvamdDyiB9EtOmKBjLxuXdA2Os681NooVToWcvJ0SXfZOb6Ldt3QHysQGvr3CCCxO722dPljBcehNVqYx+BhE64vHylsMfu1GtqT0X2lc0u3/HlY/gcyt16VikIsFsukd2f7Sk0VC/a6K2ni1bJtuNDfx0Pch6Wlwuyo2RwBybG+S0FOg+nU+nj/uI1fHf4H7T8vhcDj+AX8AnMTkomeXEcwAAAAASUVORK5CYII=); +} + +.GPmousePositionEditTool { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAASCAYAAAAzI3woAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QYXCC4cQlf82gAAAvFJREFUSMfllk9PE1EUxc99DDQBxZV8BKGUlkJKQjEK6rIWDQETFy5o17JwQ1s0QEKhbNTA1kLixogkhIBbURL+JDYyFKTtZ9DEgIQEmb7rojNkWmYoG42Jb/fm3rz5zbnn3jdAmbURU3gjpjD+0hL4xxZZPVwbQZ34pQwQEGDAqyeqTFg+kdrUzQl8O+/Q6cE7r2vohy/kCDZhdFTavXsm0qYe4lJuILHywBZofaiij5iSAC7bHHRAzOH2ify8HUyrWH0kiJGVnly/I9hoAUWvIr5tl1DdzECKb7wzoIQFzFsdZkESOo0YM7oYWARQy0Rzm9GKXiugatpvEVSwXINI188cv0+XfDjNRHw7LqG6AYAIqMFP5xkPrY2gTleGwBj0j2s91+PaqhHvmNA+dYxr94kRBUBMlFyN4mopUDiR8mRkS9rYO4Xqmo20ZjA8LAxlnEJ1GfEse7JhR6D5TMk2YsoYgCEAC/5xradM5y0C6AZhzB/Xntn5wym2PMaDnGzO5YGTRrHdZIbprwq6zCU1lywIAJLwslwnMOM5ABDjrl1KKPHZa1bqmtiuLwcDAGQ3Y/zjGhlzyGpvl1+q1GykTa0XWx5zMCvduX5Ht5XZ//wcyoPpDClbj5tiDw0pKhjNktBpNrOlh54qXZBYAWHLH9da7c42WtsqaDcSzAot6b54UvazZSGHGcsXhcmyJ5vJe3eMfYNI188eL+3p3XcWSFZq0wAOCLi3GVUidnfZekyJ6g2wr7E2fVGY/qqgKzSZajYb3QqqqJab0YpeJporCIVFMF4Q4aOOfktXJghAMnFvRzy/UEqTjPh2GoV62k0Z6f0aSqTcANg8GM2zaE96d8OFnGJTt0/k54m4z1DqFKZQphVDGTD3WcEAwCGufJFMp8qEHAGPCUYfCSm3oRQzcITavXMv19UorlYKZQBAAIwWPXOLGctVVdqUbwTfz79cb7+ppoOmcCJVClNU2mTElz7i2t3Hkx8eXrht//v/od8GMV64Yi7NnAAAAABJRU5ErkJggg==); +} + +/* Map center localisation */ + +#GPmapCenter { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAc0SURBVGiB1ZptTBzHGcefmdnz+e72bvcAO8UYUCtTKgMGmsSpGhtcJSTCRTXIaoJUjNUm5kCkFv7SSLaVqpUdKeqHIDcIDqdSgnFLXUXGqmUrNVV9pI0UavsM2FYoqKl5MQ0Gbve4F69vZ6YfeCkQXm7JwSU/6T7cvD3//+3u7MzNgzjnEAumGhyJgFkJRyQXESEVOKRwzpKBs62IM8Sx8DlCeBQQjHCqDyFOu4Hhy/Za/0Qs4qMvY0RpsKRjREpBML8ETM8j9u13UULOIBaTfUjcrhL5Oz5hS77CAIA99MpU7Zf51H2ZBUaddPJOKg8MZQESukHXLjBO2+Xa8P0NNeJrtqYRtvktQGw/ljJ6hLSi3k27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0; /*overwritten*/ +} + +/* Showing/hiding reverse geocoding panel */ + +[id^="GPshowReverseGeocodingOpen-"] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPcSURBVFiF7ZZPaBxVHMc/vxl3UggSwYMGAkVEqwfRQ4VNQRTUSw/2ksWiJZTs27QxaSGe3FRhpXS9qWiyavZPsBRLWal/QBHxIK2QPSiClYAeS8BbygTFkt15Pw87m2w2s91kiQgyn9sM733n9+H93nsDMTExMTExMf8Vsh8hxpj7gCngBeBhoA6sAO+USqVP+81dziYyKvbwqBdMSQ4bNUZBaln3PXWc345cqM/3yryjcDqdnhCRWZoSa8CXqpotl8tr7eOMMb8Aj0UWpPpyuVz+pFchnSxnExlEPwQc0FLSC051SivI8pz7viDTgKrI2V7STpf3kk6nL4tIGXgA+AnYACZF5NfJyckHO6QuAioi3wJ5VX0b+BtARF7dq2yzAvvEVn1iahvuvLYtkILU5tyFULb5KbWP9oq9K+qlMWYCOA587zjOawCNRuO267pHVTVvrV0Cnm5+F1zXLdbr9a+XlpZWWhmZTMZT1RngkT50SeaDmVrWtYjMhD5TtTk3oV5wihwaruzU5gTRYjIRnOmVG9nSxpgbNFf2OeAAgIgoUFfVWWDMWvtkpVL5sVuwMeZz4Bhws1QqHdytaDut/bklDQ5asrAB8sqWhRaTieB0t33eTreWfgi44TiObn5cVVTVcxznOoDruoe6hWYymddpyrbavS8ENPlWcBbVzX0ZIKZfWegufAsYbjQat8OVbWaLaBAE9wOo6q2oicaYN1T1fPj4zfr6+vmocbulJe2oziudLamlvchCF2ER+QI46LruUZpXzGZLi8gUsGatvd45zxjzDPBm+PiZ7/vHqtXqxm6LuROBIDv2n+79Wo0UttbOAX+oal5VZ0XkcRF5XlW/Au5R1TOVSuXPiKljNBfhd9/3j++HbMfVsx2RdG3D/UhzXTt1B5EDy+XymuM4T6nqD8CYqr5rrT0HWOAlERk2xlzO5XKdp/wBmtvh2r8mK1oU1YWtUWL2It2rJSSTyRxW1UPAmud51wqFwl/GmIvACeCS7/snq9VqsGebHnSTTSaC0+TQztO728/JDqF+ikmlUu7Q0FAFGAeujIyMnMjlco3x8fF7BwYGnhWR2uLi4s1+slssz7kL205j9INkPpiW8O5v/XjQfhejhdF8sLP129h177dTrVYD3/cngEvAi6urqyUAz/OuquoVa20tlUq5/WS3lfYzhKslWkx6wUxLFsLTOx9Mt11ZqjgrEUHbU/stJ5Q+CXwMfBe+bv1yDg8ODt7dbzbAaL5eQmUGtJC8EN2qm/c0WkBl+ki+vhCV1TFn/zDGnAOyInK1WCyO72d2TExMTEzM/5B/AE2JsceuwAzdAAAAAElFTkSuQmCC); +} + +/* General panels */ + +[id^="GPreverseGeocodingPanel-"] { + left: 10px; +} + +[id^="GPreverseGeocodingPanelClose-"] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPcSURBVFiF7ZZPaBxVHMc/vxl3UggSwYMGAkVEqwfRQ4VNQRTUSw/2ksWiJZTs27QxaSGe3FRhpXS9qWiyavZPsBRLWal/QBHxIK2QPSiClYAeS8BbygTFkt15Pw87m2w2s91kiQgyn9sM733n9+H93nsDMTExMTExMf8Vsh8hxpj7gCngBeBhoA6sAO+USqVP+81dziYyKvbwqBdMSQ4bNUZBaln3PXWc345cqM/3yryjcDqdnhCRWZoSa8CXqpotl8tr7eOMMb8Aj0UWpPpyuVz+pFchnSxnExlEPwQc0FLSC051SivI8pz7viDTgKrI2V7STpf3kk6nL4tIGXgA+AnYACZF5NfJyckHO6QuAioi3wJ5VX0b+BtARF7dq2yzAvvEVn1iahvuvLYtkILU5tyFULb5KbWP9oq9K+qlMWYCOA587zjOawCNRuO267pHVTVvrV0Cnm5+F1zXLdbr9a+XlpZWWhmZTMZT1RngkT50SeaDmVrWtYjMhD5TtTk3oV5wihwaruzU5gTRYjIRnOmVG9nSxpgbNFf2OeAAgIgoUFfVWWDMWvtkpVL5sVuwMeZz4Bhws1QqHdytaDut/bklDQ5asrAB8sqWhRaTieB0t33eTreWfgi44TiObn5cVVTVcxznOoDruoe6hWYymddpyrbavS8ENPlWcBbVzX0ZIKZfWegufAsYbjQat8OVbWaLaBAE9wOo6q2oicaYN1T1fPj4zfr6+vmocbulJe2oziudLamlvchCF2ER+QI46LruUZpXzGZLi8gUsGatvd45zxjzDPBm+PiZ7/vHqtXqxm6LuROBIDv2n+79Wo0UttbOAX+oal5VZ0XkcRF5XlW/Au5R1TOVSuXPiKljNBfhd9/3j++HbMfVsx2RdG3D/UhzXTt1B5EDy+XymuM4T6nqD8CYqr5rrT0HWOAlERk2xlzO5XKdp/wBmtvh2r8mK1oU1YWtUWL2It2rJSSTyRxW1UPAmud51wqFwl/GmIvACeCS7/snq9VqsGebHnSTTSaC0+TQztO728/JDqF+ikmlUu7Q0FAFGAeujIyMnMjlco3x8fF7BwYGnhWR2uLi4s1+slssz7kL205j9INkPpiW8O5v/XjQfhejhdF8sLP129h177dTrVYD3/cngEvAi6urqyUAz/OuquoVa20tlUq5/WS3lfYzhKslWkx6wUxLFsLTOx9Mt11ZqjgrEUHbU/stJ5Q+CXwMfBe+bv1yDg8ODt7dbzbAaL5eQmUGtJC8EN2qm/c0WkBl+ki+vhCV1TFn/zDGnAOyInK1WCyO72d2TExMTEzM/5B/AE2JsceuwAzdAAAAAElFTkSuQmCC); +} + +/* Calc waiting */ + +.GPreverseGeocodingCalcWaitingContainerVisible, +.GPreverseGeocodingCalcWaitingContainerHidden { + border-radius: 5px; +} + +/* Results panel */ + +[id^="GPreverseGeocodingReturnPicto-"] { + width: 30px !important; + height: 30px !important; + background-color: #C77A04; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4AYBCQs6x0UYEQAAATZJREFUSMftliFLBFEURs/dVUQURJvYLCaLGESz1T9gUJsoWARBEBRM/obFIFgMygabTQSbVoNgMCqYLMLusawwYVdnZ8bdsHvS8Oab97377p33LvTp09OoJ+qHOt9p0x+28s5XSml6DOwlhuLfjdVD4KDoHRz4w3QfOGryakUdBerAG/AMPEXEexE53bU96uqtuqaWs5rumI87dSJLjmdybtgScNl25GqoFfOz3sojfjEvAadAs49vgIfG8yAwDkwDC8BQQncfEYtZcl1Wz5tEst1CP6aeJXQ1dSproZXVizTGiTRdJ7QbmQ6QiKgBq8BVmoVGhMAm8FVIoaqDarXxvy6n0P8U52URh0pJnUypnW0YP3bjGr1XXzLfTjmoAMPdiHhEfe14xBHxCVS71S7N9ZvG3uQbY/KgCDQBMlkAAAAASUVORK5CYII=); +} + +.GPreverseGeocodedLocationHighlight { + background-color: rgba(255,200,0,0.25); + color: #222; +} + +/* ROUTE */ + +div[id^=GProute-] { + /* left: 10px; */ + top: 0; /*overwritten*/ +} + +.GProuteStageFlexInput { + margin-bottom: 5px; /*overwritten*/ +} + +/* Showing/hiding route panel */ + +span[id^=GPshowRouteOpen] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAJySURBVFiF7Za/btNQFMa/z46rRkwIiXdAYmBAwilrxQBvENS7kJZWcbsnSChLk70tKk07OSISDwALf7Y2VhcWhMQjFAmxVklvDkPqNHFtktwmUCH/Nl/rfDlfzp9rICUlJSXlP0MpdaKUOvnXeZiQMYy7PdUs/iKJhpeWlm6QfAvgyeC57/scfFZKSVy8iNSz2axXr9c7psm1Ss6ysHs/N6fXWEE39ncABiV7Syzr+8JmZ2eUphV3qJS6RfIDImYngeTK6enp+3w+f9MkvlVylkF5TXAlaNt7UrmcqwBsle1tkB5Fto5eON4o3VjDAN4AyJkkGmExk8n4RpHs3kM/PxaCtr0jQL+7BGBQtl8RLIYRlO6dUbJJhp8CODJKdJiPZ2dnyiTQrWoPIgMtyrWgbNelAqtfWXDt4rXsu3N6fZRurGHf93+KyCMA70ySBXozPD8//7jZbP4yiScgbk1vREwXjtv2XlC2dwYq2zPr6NWkOY/oTk64qKILbBaESwmkd/48nPQEZgHza6lPZEsfisjLRqPx+aq6IQREanrjuGRDk97wPywHk5gFkmfYlIckP01ZEwCgCV5qJ5m8Q6dt+JDk4jQFwwU1NLMh5LOkKyuJK7f0LOc41ixln120heEZC0HbhlT083Fae9oVnhpJZl1Hrz6o6fXo9h630tfW8KWrB7Lrbvaq2L+yILsX71kI2vb2KN1raxiwvgDnLdr7qPDYu5V6R4C4VV0cqLQIrG+jVK88w7MiV+0ctEqOA3bvupvDZkPCKyso2xbE+rpQ6+zGaQ1ybQ0DQG4MAwQEVV0E9FiapoZ/GMalpKSkpKT8gd85//Z5bfxYOAAAAABJRU5ErkJggg==); +} + +/* General panels */ + +div[id^=GProutePanel-] { + left: 10px; +} + +div[id^=GProutePanelClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAJySURBVFiF7Za/btNQFMa/z46rRkwIiXdAYmBAwilrxQBvENS7kJZWcbsnSChLk70tKk07OSISDwALf7Y2VhcWhMQjFAmxVklvDkPqNHFtktwmUCH/Nl/rfDlfzp9rICUlJSXlP0MpdaKUOvnXeZiQMYy7PdUs/iKJhpeWlm6QfAvgyeC57/scfFZKSVy8iNSz2axXr9c7psm1Ss6ysHs/N6fXWEE39ncABiV7Syzr+8JmZ2eUphV3qJS6RfIDImYngeTK6enp+3w+f9MkvlVylkF5TXAlaNt7UrmcqwBsle1tkB5Fto5eON4o3VjDAN4AyJkkGmExk8n4RpHs3kM/PxaCtr0jQL+7BGBQtl8RLIYRlO6dUbJJhp8CODJKdJiPZ2dnyiTQrWoPIgMtyrWgbNelAqtfWXDt4rXsu3N6fZRurGHf93+KyCMA70ySBXozPD8//7jZbP4yiScgbk1vREwXjtv2XlC2dwYq2zPr6NWkOY/oTk64qKILbBaESwmkd/48nPQEZgHza6lPZEsfisjLRqPx+aq6IQREanrjuGRDk97wPywHk5gFkmfYlIckP01ZEwCgCV5qJ5m8Q6dt+JDk4jQFwwU1NLMh5LOkKyuJK7f0LOc41ixln120heEZC0HbhlT083Fae9oVnhpJZl1Hrz6o6fXo9h630tfW8KWrB7Lrbvaq2L+yILsX71kI2vb2KN1raxiwvgDnLdr7qPDYu5V6R4C4VV0cqLQIrG+jVK88w7MiV+0ctEqOA3bvupvDZkPCKyso2xbE+rpQ6+zGaQ1ybQ0DQG4MAwQEVV0E9FiapoZ/GMalpKSkpKT8gd85//Z5bfxYOAAAAABJRU5ErkJggg==); +} + +/* Calc waiting */ + +.GProuteCalcWaitingContainerVisible, +.GProuteCalcWaitingContainerHidden { + border-radius: 5px; +} + +/* Route form */ + +.GProuteOriginPointerImg, +.GProuteStageRemove, +div[id^=GProuteStageAdd], +.GProuteTransportImg { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAAcCAYAAABF79LlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAzSSURBVHic7Zx/bFxVdsc/575nl+BAGLWJYmVF1RUI9UfKbqGJHZKFghZVSgiriEQVlbKAnXmTHyTdVNtgJ1mGruNAqw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+qbkxeHe/YHgC9UdW00Gj1R0bfJQ9ve1MsiupZ0pBdhUg/LpB6qa5ftSdWsdzURkXOEeytUdWBkZGRL+q6c6ddoNLqZqUivIvJxqXE9z/vQcZwVwF+nm8Y6OzvPq+rDOabRYuNEIpGzuW3z5s07A4yq6uvGmE0Ay37IhzZlVyBTesue5rwo0/S0hN7Pf8oMvQufBGcQRlF93VrdlO+6XFKp1GSlw1r7JPBoVve2ffv21Te5aMykXgp9UpBJPQPbhr5X32SmiFwhfABokYiUc2x3f/r16zPGKlf0yJEj84Mg2KqqKwlLIADnCPfs+z3P+89yxyqHt7qY32Tc8GEdTesJ51Q51dwc7L8zTl31Msz203K+729U1d/yPG+as2ejqpJeDfyz53l91WolEolDOafmujzPe7rE/KbNqdzSKsDZneaQKFN6SlfbXltUL/fwSluvrbhKkZmzMea+DRs2vJ5p7+/vfy1dpjzmeV5u8qtqMnMWY+5b2hNM6g13yWuI3KtwrL3X1k2vGlT1LLBQRH4tu73sslx6qb4b2J1Vh68qG18O4amrYDewe7IOX0U2vlIq+QOvcvw+gFgsVtAmfSMotYwvyfj4+OMtLS2rCfd0L0QikT8v47JdhOUgBzhWiZ7+j33czDGrFSYEXrhw3pbUU9glaT2pUA9gcHDQSSaTAGQ7O4CIHCdc3tetojC4lskDLdnODoAxx1G9V65OxaQUA+Q5ntuow/8Ckz4kU1ZZK4PneXuocs8bHpIpr4yWob3XVq0HkEwmT6bfnsnTfRzwgUXVjp/LzbfKSQgTjrl9bpA6Hjimrno1cBx4Krexqv9443mezHYkzKa9N5BKTtE1+P/BoUOHbiH9QJAx5k9z+z3P+6KeekNPcAukHwgyMkPvzmeoq14tiMh/A3+b296I8A2uWYIgmC8iY8aYpRs2bPiXAmYTIvJ39dBzhPnAGMYuXdpjC+qB1kWvDhwtbdKgQYMGDRo0aNCgQYNriP8DimGotcEqvNwAAAAASUVORK5CYII=); +} + +.GProuteExclusionsOption { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA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OyO7hWtyWc0biOogkDooYOBhhujLEDAIZG4xADAH/4sH796y42ZWBNxBGrCEZMlNBNER1k8fBtdixwwzzY2toaTCtCr9drLXzKthgSiv7ztycfjvQo4O5fpWqR5eGojg2DCX1IBHUf3n2nSey5cOpCXzrfIXp6WZXXMtdYh8pi74JTL3WTijO913tDq2qXVxplA5vijgdTIvE4RO6zYOwO3t5/GhpbTrYMjnh78nq9VlwRfRmVRdewArM6rgJBTLbxErYEAL4J5vetwFJ4jghQxMNSSAyoO42Ttl0Xz58PpzXqS5JE7G5tqrAbM6lMiyljkimoQg1m8VhK7xrFwTpdixcbAaGz2/I+ekba0dzc/iDt3SIUCtH+Lv+lArWwjWPOOeMVJjI1imgRsyXKDas+mxoc83vKUfOC/dO2lst3M7LM3L816LdLBedlTIKU05lUNfJM2ZzEBZORXzuHrtk+vnSu63JGF9LhvmH9/uVAu8s9MUQFnWUSIweHFJ90z7qlq+n6L2OyAQMA918NdLrcrqgwoQrHyAHWqX49PDzMxsohAIAUuZ0YsHJHSO+G5t7eXj+k8ZsEjfCmsQGABgAmAMQBIJEdN7L8//gb3FshBGMt81oAAAAASUVORK5CYII=); +} + +/* Results panel */ + +div[id^=GProuteResultsValueDist], +div[id^=GProuteResultsValueTime] { + color: #C77A04; +} + +div[id^=GProuteResultsNew] { + background-color: #C77A04; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAAcCAYAAABF79LlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAzSSURBVHic7Zx/bFxVdsc/575nl+BAGLWJYmVF1RUI9UfKbqGJHZKFghZVSgiriEQVlbKAnXmTHyTdVNtgJ1mGruNAqw1tQrDfOD8olSLFUNJ0UzVaxI9AcYyEGgQFiSXaKtsfNqTylOA2qvPmnv7xZuzxeH7POCjb+UjWzNx73v3esXzeufec+wwNGjRo0KBBgwYN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9z/vQcZwVwF+nm8Y6OzvPq+rDOabRYuNEIpGzuW3z5s07A4yq6uvGmE0Ay37IhzZlVyBTesue5rwo0/S0hN7Pf8oMvQufBGcQRlF93VrdlO+6XFKp1GSlw1r7JPBoVve2ffv21Te5aMykXgp9UpBJPQPbhr5X32SmiFwhfABokYiUc2x3f/r16zPGKlf0yJEj84Mg2KqqKwlLIADnCPfs+z3P+89yxyqHt7qY32Tc8GEdTesJ51Q51dwc7L8zTl31Msz203K+729U1d/yPG+as2ejqpJeDfyz53l91WolEolDOafmujzPe7rE/KbNqdzSKsDZneaQKFN6SlfbXltUL/fwSluvrbhKkZmzMea+DRs2vJ5p7+/vfy1dpjzmeV5u8qtqMnMWY+5b2hNM6g13yWuI3KtwrL3X1k2vGlT1LLBQRH4tu73sslx6qb4b2J1Vh68qG18O4amrYDewe7IOX0U2vlIq+QOvcvw+gFgsVtAmfSMotYwvyfj4+OMtLS2rCfd0L0QikT8v47JdhOUgBzhWiZ7+j33czDGrFSYEXrhw3pbUU9glaT2pUA9gcHDQSSaTAGQ7O4CIHCdc3tetojC4lskDLdnODoAxx1G9V65OxaQUA+Q5ntuow/8Ckz4kU1ZZK4PneXuocs8bHpIpr4yWob3XVq0HkEwmT6bfnsnTfRzwgUXVjp/LzbfKSQgTjrl9bpA6Hjimrno1cBx4Krexqv9443mezHYkzKa9N5BKTtE1+P/BoUOHbiH9QJAx5k9z+z3P+6KeekNPcAukHwgyMkPvzmeoq14tiMh/A3+b296I8A2uWYIgmC8iY8aYpRs2bPiXAmYTIvJ39dBzhPnAGMYuXdpjC+qB1kWvDhwtbdKgQYMGDRo0aNCgQYNriP8DimGotcEqvNwAAAAASUVORK5CYII=); +} + +input[id^=GProuteResultsShowDetails] + label:hover, +input[id^=GProuteResultsShowDetails] + label + label:hover { + color: #C77A04; +} + +.GProuteResultsDetailsHighlight { + background-color: rgba(255,200,0,0.25); + color: #222; +} + +/* SEARCH ENGINE */ + +div[id^=GPsearchEngine-] { + /* top: 10px; */ + /* left: 46px; */ +} + +/* Showing/hiding search engine input */ + +span[id^=GPshowSearchEngineOpen] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAGbElEQVRo3u2Zf4xUVxXHP+e+mV2QdVdCaaAZagoNbRMxEpeuP0CXbqupURuNVFqzK84OryxIjYJt0vjH9I/+Q0VNy9r17ZsJQrDo1hqNqdEKbECKRQjVxugGS8kyFZDS7UKxu8ube/znTvPcALuZfftHdb7/TO6ZM+/c9z0/7x2ooYYaaqihhv9BZLPZ5q6urtmT0ZUaXdVhzZo1M1Kp1ADwXuDjYRj+7Vr6pkZZdUin098AbhSRwUwmM5BYRHd2dn5CRDYAK4DrgHPAAaA7DMMD0xw53wc+NDY29tkdO3acB+jo6JhTV1f3a+ClKIq+uX379pEk7fq+n46i6F7P8zIjIyPbdu7ceQmgvb191syZM79trd0ENIjIXb29vb+fMtG+76ettU8A666h1pPJZDbm8/lomoh+2y1Pi8guAFX9CjAfYHh4uL6vr28saaKttdvcclhEXnR2W4C7gQ+o6m8KhcJnJvO81EQKqvok8IBbngWettb+0xhzA3A/cD2w7tSpUxbYMA0pulxVK8v5qrp5vE5jY+MKYE+Sdq21N8eWTar6KcdHo4jcBijw1GSf501ULoCKV5+PoujLnue9KiJnPc/7i4g8paq3AgtFZFlzc/Oeo0ePDiYYVS2q+jTQGBO/BVwG6t5JS5G2pUuX/uHYsWOvJWE3l8vdpKo5EZkRE4+KSBlYCcwBBoC3W1pa/nHkyJE3p1Q6crncT4F7gbNRFLWmUql543WiKDqTSqX2A3NVdXehULgvgRd9xJWqTGyPB1R1c6FQOFxxQrlc/q6ILK8kH1ACfhSG4WPV2F27du3d1tpPGmPep6rinHjc87xnenp6TnZ2dt4uIn8EIlXtE5G3RESttW+KyP4wDJ+rdupY4dJld319/RXnRWPMbGC329SKhIL5fmBBnOTh4eE7KyQDBEHw4oULF9qAg7GgWQBU7WhVvV1EZsdJPn78+A96enpOOpWtg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6Ojj4rICWvt/tbW1sk7bjrukH3fX2Kt3eNq+d4wDNt4lyCfz5tSqXQY+DDwUBiGjydyLpiOzQZB8LIxpg3YWy6XV/MuQqlUugVYCAxGUfQkNUwfurq6Zmez2eYaEzXUUEMN/x/4D41MuU8OSr8EAAAAAElFTkSuQmCC); +} + +/* Simple search input */ + +form[id^=GPsearchInput-] { + height: 30px; +} + +div[id^=GPsearchInputReset] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAKPSURBVFiF7Za9ctpAFIXPkQY39oukS+GZyHkeGKOA3YALqNSEFJbsGWzZscX7wKRJlxk/B3JDRntToD9kCUkJnjT7dYgVh2/v7t4FNBqNRqPR/C/YZNBy0ukJ1enZUWTTgSobIwBXE3MuhvHy+evv+0P8uevr6x7J0zAMbcdxynNFeHNzM1dKvVxdXdXm1govJ50eKN8BGIAsrKPovCgtAJdT847gAIAIefmv0rFsnItFGIbnRWkRoed5dwC2uSKXddJGbTLVx2wcu6uNeS+5iRKAq6npx7IAQIr60MKtPJbM5aJ7fHx8LyJZrghd1/WxlY1fYW1urbA1i4YQyc0a7dXUfBYHRlJZgHb2tQTWUXTRyGoPo9FoSDLNJWl7nvfsOI6RVJbMckkGYRjW5jbaw8n+BDlMnhmQhQI2AL9kvyaB1Yn6Vfu8Lcn+FJE0l+RCKbUhs1ySwXq97lft8zyNhIG30lJ8+cCyaW6J9E5sC1mghTCwlf4xMecROdx9sfwwOxQiwtvb27lSqihdepjto/7QKhARfDNL0m7i/gal1NvY3CHWlFZLOtd6yka8S5ULraeMVlVuVOFSWUpAET8bxe5qYz6J037VVOaWyJIMAORy0T05OXlyHKdRbu2gKlmrE/U/fYsuCi3rYNJVsuv1uj8ajS7yLQstpOtvWlPT32k9kEdrFg24PajTi8dOL4Y8nM2iqiXYiPhSkeaKyON4PB6QlPgzXdf1870YwMN4PN6b26ASxk8g3pfbS8UwkQUAAmLNokGu0iIwfjX02keaSzJ4fX0dJrLxM4knIM0leYhcYDnp2Mup6cueFREvfX856dhVY9rieZ7tuq6/7zROKu153sFyNRqNRqPRvA9/AHtLag4LyzlCAAAAAElFTkSuQmCC); +} + +/* General panels */ + +div[id^=GPgeocodeResultsClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAKPSURBVFiF7Za9ctpAFIXPkQY39oukS+GZyHkeGKOA3YALqNSEFJbsGWzZscX7wKRJlxk/B3JDRntToD9kCUkJnjT7dYgVh2/v7t4FNBqNRqPR/C/YZNBy0ukJ1enZUWTTgSobIwBXE3MuhvHy+evv+0P8uevr6x7J0zAMbcdxynNFeHNzM1dKvVxdXdXm1govJ50eKN8BGIAsrKPovCgtAJdT847gAIAIefmv0rFsnItFGIbnRWkRoed5dwC2uSKXddJGbTLVx2wcu6uNeS+5iRKAq6npx7IAQIr60MKtPJbM5aJ7fHx8LyJZrghd1/WxlY1fYW1urbA1i4YQyc0a7dXUfBYHRlJZgHb2tQTWUXTRyGoPo9FoSDLNJWl7nvfsOI6RVJbMckkGYRjW5jbaw8n+BDlMnhmQhQI2AL9kvyaB1Yn6Vfu8Lcn+FJE0l+RCKbUhs1ySwXq97lft8zyNhIG30lJ8+cCyaW6J9E5sC1mghTCwlf4xMecROdx9sfwwOxQiwtvb27lSqihdepjto/7QKhARfDNL0m7i/gal1NvY3CHWlFZLOtd6yka8S5ULraeMVlVuVOFSWUpAET8bxe5qYz6J037VVOaWyJIMAORy0T05OXlyHKdRbu2gKlmrE/U/fYsuCi3rYNJVsuv1uj8ajS7yLQstpOtvWlPT32k9kEdrFg24PajTi8dOL4Y8nM2iqiXYiPhSkeaKyON4PB6QlPgzXdf1870YwMN4PN6b26ASxk8g3pfbS8UwkQUAAmLNokGu0iIwfjX02keaSzJ4fX0dJrLxM4knIM0leYhcYDnp2Mup6cueFREvfX856dhVY9rieZ7tuq6/7zROKu153sFyNRqNRqPRvA9/AHtLag4LyzlCAAAAAElFTkSuQmCC); +} + +div[id^=GPadvancedSearchClose] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAGbElEQVRo3u2Zf4xUVxXHP+e+mV2QdVdCaaAZagoNbRMxEpeuP0CXbqupURuNVFqzK84OryxIjYJt0vjH9I/+Q0VNy9r17ZsJQrDo1hqNqdEKbECKRQjVxugGS8kyFZDS7UKxu8ube/znTvPcALuZfftHdb7/TO6ZM+/c9z0/7x2ooYYaaqihhv9BZLPZ5q6urtmT0ZUaXdVhzZo1M1Kp1ADwXuDjYRj+7Vr6pkZZdUin098AbhSRwUwmM5BYRHd2dn5CRDYAK4DrgHPAAaA7DMMD0xw53wc+NDY29tkdO3acB+jo6JhTV1f3a+ClKIq+uX379pEk7fq+n46i6F7P8zIjIyPbdu7ceQmgvb191syZM79trd0ENIjIXb29vb+fMtG+76ettU8A666h1pPJZDbm8/lomoh+2y1Pi8guAFX9CjAfYHh4uL6vr28saaKttdvcclhEXnR2W4C7gQ+o6m8KhcJnJvO81EQKqvok8IBbngWettb+0xhzA3A/cD2w7tSpUxbYMA0pulxVK8v5qrp5vE5jY+MKYE+Sdq21N8eWTar6KcdHo4jcBijw1GSf501ULoCKV5+PoujLnue9KiJnPc/7i4g8paq3AgtFZFlzc/Oeo0ePDiYYVS2q+jTQGBO/BVwG6t5JS5G2pUuX/uHYsWOvJWE3l8vdpKo5EZkRE4+KSBlYCcwBBoC3W1pa/nHkyJE3p1Q6crncT4F7gbNRFLWmUql543WiKDqTSqX2A3NVdXehULgvgRd9xJWqTGyPB1R1c6FQOFxxQrlc/q6ILK8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gcmMzzErsmDYLg78aYlcAZYK61NpEy0tDQEK/7r4nIFuBx4HRFePHixYMkDBHpcoH4V2vtIPBba+3vgOGKzokTJ16Z9DST5Oamg+yhoSEFeoAX0un0kt7e3ofDMHxobGxsCXAI6Jk3b16if2Bks9mVqvpp4N/As57nPRqG4bPFYvHno6Ojj4rICWvt/tbW1sk7bjrukH3fX2Kt3eNq+d4wDNt4lyCfz5tSqXQY+DDwUBiGjydyLpiOzQZB8LIxpg3YWy6XV/MuQqlUugVYCAxGUfQkNUwfurq6Zmez2eYaEzXUUEMN/x/4D41MuU8OSr8EAAAAAElFTkSuQmCC); + background-position: -60px 0; +} + +/* Advanced search picto */ + +span[id^=GPshowAdvancedSearchOpen] { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAGbElEQVRo3u2Zf4xUVxXHP+e+mV2QdVdCaaAZagoNbRMxEpeuP0CXbqupURuNVFqzK84OryxIjYJt0vjH9I/+Q0VNy9r17ZsJQrDo1hqNqdEKbECKRQjVxugGS8kyFZDS7UKxu8ube/znTvPcALuZfftHdb7/TO6ZM+/c9z0/7x2ooYYaaqihhv9BZLPZ5q6urtmT0ZUaXdVhzZo1M1Kp1ADwXuDjYRj+7Vr6pkZZdUin098AbhSRwUwmM5BYRHd2dn5CRDYAK4DrgHPAAaA7DMMD0xw53wc+NDY29tkdO3acB+jo6JhTV1f3a+ClKIq+uX379pEk7fq+n46i6F7P8zIjIyPbdu7ceQmgvb191syZM79trd0ENIjIXb29vb+fMtG+76ettU8A666h1pPJZDbm8/lomoh+2y1Pi8guAFX9CjAfYHh4uL6vr28saaKttdvcclhEXnR2W4C7gQ+o6m8KhcJnJvO81EQKqvok8IBbngWettb+0xhzA3A/cD2w7tSpUxbYMA0pulxVK8v5qrp5vE5jY+MKYE+Sdq21N8eWTar6KcdHo4jcBijw1GSf501ULoCKV5+PoujLnue9KiJnPc/7i4g8paq3AgtFZFlzc/Oeo0ePDiYYVS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3Fh/5swZbWxsXCEiO4AbYl9fcvt+T0xWEpEv9vb2/mkq3s3n86n+/n4WL158s6p+TVXvAW4BXhGR59xoVxeL5KF0Ot0TG/+m/5rU9/1brbX7XJpNmezYIeJOVX1+gnHwjmKxuC/JI3gul7sH+IWL5p+p6oUr2P1esVgcmMzzErsmDYLg78aYlcAZYK61NpEy0tDQEK/7r4nIFuBx4HRFePHixYMkDBHpcoH4V2vtIPBba+3vgOGKzokTJ16Z9DST5Oamg+yhoSEFeoAX0un0kt7e3ofDMHxobGxsCXAI6Jk3b16if2Bks9mVqvpp4N/As57nPRqG4bPFYvHno6Ojj4rICWvt/tbW1sk7bjrukH3fX2Kt3eNq+d4wDNt4lyCfz5tSqXQY+DDwUBiGjydyLpiOzQZB8LIxpg3YWy6XV/MuQqlUugVYCAxGUfQkNUwfurq6Zmez2eYaEzXUUEMN/x/4D41MuU8OSr8EAAAAAElFTkSuQmCC); + background-position: -30px 0; +} + +/* Autocomplete list / geocode results */ + +div[id^=GPautoCompleteList], +div[id^=GPgeocodeResultsList] { + margin-left: 27px; + box-shadow: 0 1px 5px #000; +} + +div[id^=GPgeocodeResultsList] { + top: 38px; + border-radius: 5px; +} + +/* ================================================================== */ +/* Toolbars +/* ================================================================== */ + +.leaflet-draw-section { + position: relative; +} + +.leaflet-draw-toolbar { + margin-top: 12px; +} + +.leaflet-draw-toolbar-top { + margin-top: 0; +} + +.leaflet-draw-toolbar-notop a:first-child { + border-top-right-radius: 0; +} + +.leaflet-draw-toolbar-nobottom a:last-child { + border-bottom-right-radius: 0; +} + +.leaflet-draw-toolbar a { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAAeCAYAAACWuCNnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAG7AAABuwBHnU4NQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAbvSURBVHic7dtdbBxXFQfw/9nZ3SRKwAP7UFFUQOoHqGnUoEAoN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Yu27a/Mzs7CyI6gMVX/u/CzJeZ+Ue2bcc9pb1aXc8lJZms18YLANE2wkOu694N4OFGo3E8DMMPAHiDiCaY+ZOb4YCsEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhEjYfwGO+b5dFNs4OgAAAABJRU5ErkJggg==); + background-image: linear-gradient(transparent, transparent), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNlZm9yZ2UubmV0L0RURC9zb2RpcG9kaS0wLmR0ZCIKICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiCiAgIHZpZXdCb3g9IjAgMCA2MDAgNjAiCiAgIGhlaWdodD0iNjAiCiAgIHdpZHRoPSI2MDAiCiAgIGlkPSJzdmc0MjI1IgogICB2ZXJzaW9uPSIxLjEiCiAgIGlua3NjYXBlOnZlcnNpb249IjAuOTEgcjEzNzI1IgogICBzb2RpcG9kaTpkb2NuYW1lPSJzcHJpdGVzaGVldC5zdmciCiAgIGlua3NjYXBlOmV4cG9ydC1maWxlbmFtZT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yLWN1cnZhdHVyZT0iMCIgLz4KPC9zdmc+Cg==); + background-repeat: no-repeat; + background-size: 300px 30px; + background-clip: padding-box; +} + +.leaflet-retina .leaflet-draw-toolbar a { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAA8CAYAAAC6nMS5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA16SURBVHic7d1/jBxneQfw7zNzvotdn+9sVQkxoRKoammBqqpbk6uT5mLfvHPn42yn1VFRVCEhoFH5IYpoSaUCKi1NcGkcfrbCVRFKEwG2aHLn83pmLvY2CTqT1AmCOBE0EOT4B0nBPw/snb2dp3/sLr6s77i923dud/a+H8ny7tzMo8f3eud99p133gGIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiFYGaXYCRETUPMYYrWe/MAzZX2QQ27d5OpqdABFROxgZGVlz5cqVrzuOc18QBJPNzofsYvvSYrVcgTVftZ2l6npgYODXHMc5oKoHHcfZHQTB2WbnRETpGRkZWVMoFA6IyO2qutX3/R1Z64TnO8fWOwLSzti+mSKDg4M3l0qlnSJyG4CbAFwP4ByAlwE8paoPX3fddcH4+PjP00yk5QqsrDPGvAZAHsBrReRNqvpeY8x/iMg9QRCcaXJ6ZIHv+xtUdReAHQBej/IHGABOAnhORMY6OjoempiYONe0JC3zPM84jjOqqrfi6r/3RQCPAdgXhmHUvOyaa3R01L1w4cJBALdVNq1W1THP87woir7ZzNyocWzf7PA8b4uI7E6S5A9Frqknb6j8eZOIvKNQKPzU9/1/dhznvlwuV0gjn5YbFapW09Vqu/Z9K9u2bdsNruvmUe50axUAfMV13X/I5XInlzcze2x/28lCu1b19fWt7u7u/hCAvwGwboHdL6jq7unp6T1TU1OXlyG9VAwODv5mkiR7Ady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w4cPN3KVYk7WVkE1xsx5aSBLT+duhDEmQrkSnssZlIeXnxWRY6p6PI7j41nveFeq4eHh9XEc7xSRnQBej6t3kp5EuWh+OI7jh+dYsDDTfN/frKrjAKpPmv9pkiS7JicnH29mXku1devWV3d0dBxAuRNeMhF5ulgsjqRxgk7DfOfqxWr1czvbtzGt3r5zGRwc7FPV3ap6y0L7ishPAHx63bp1e/bt2xenkQ8LLEuMMZtE5JCqfhfAMwCeSZLkO2vWrDk+NjbGyZHUFjzP2yginwcAVX1fVi99Vo2OjnaeP3/+3SLydgBvBNBd56GXAHxXVR/s7e3dm9YJOg0rqQNm+y5dFtp3HmKM2QxgF8qr9b8GwA0AzgH4MYBjIjJ28eLFkFeOiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIhWgv8Hnffz4dmwY9cAAAAASUVORK5CYII=); + background-image: linear-gradient(transparent, transparent), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNl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iAgICAgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzQ2NDY0NjtzdHJva2Utd2lkdGg6MjtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgIGlkPSJjaXJjbGUtMyIKICAgICBkPSJtIDU4MS42NTcyNSwzMCBjIDAsNi4wNzggLTQuOTI2LDExIC0xMSwxMSAtNi4wNzQsMCAtMTEsLTQuOTIyIC0xMSwtMTEgMCwtNi4wNzQgNC45MjYsLTExIDExLC0xMSA2LjA3NCwwIDExLDQuOTI2IDExLDExIHoiCiAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIgLz4KPC9zdmc+Cg==); +} + +.leaflet-draw a { + display: block; + text-align: center; + text-decoration: none; +} + +.leaflet-draw a .sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} + +/* ================================================================== */ +/* Toolbar actions menu +/* ================================================================== */ + +.leaflet-draw-actions { + display: none; + list-style: none; + margin: 0; + padding: 0; + position: absolute; + left: 26px; /* leaflet-draw-toolbar.left + leaflet-draw-toolbar.width */ + top: 0; + white-space: nowrap; +} + +.leaflet-touch .leaflet-draw-actions { + left: 32px; +} + +.leaflet-right .leaflet-draw-actions { + right: 26px; + left: auto; +} + +.leaflet-touch .leaflet-right .leaflet-draw-actions { + right: 32px; + left: auto; +} + +.leaflet-draw-actions li { + display: inline-block; +} + +.leaflet-draw-actions li:first-child a { + border-left: none; +} + +.leaflet-draw-actions li:last-child a { + -webkit-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.leaflet-right .leaflet-draw-actions li:last-child a { + -webkit-border-radius: 0; + border-radius: 0; +} + +.leaflet-right .leaflet-draw-actions li:first-child a { + -webkit-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.leaflet-draw-actions a { + background-color: #919187; + border-left: 1px solid #AAA; + color: #FFF; + font: 11px/19px "Helvetica Neue", Arial, Helvetica, sans-serif; + line-height: 28px; + text-decoration: none; + padding-left: 10px; + padding-right: 10px; + height: 28px; +} + +.leaflet-touch .leaflet-draw-actions a { + font-size: 12px; + line-height: 30px; + height: 30px; +} + +.leaflet-draw-actions-bottom { + margin-top: 0; +} + +.leaflet-draw-actions-top { + margin-top: 1px; +} + +.leaflet-draw-actions-top a, +.leaflet-draw-actions-bottom a { + height: 27px; + line-height: 27px; +} + +.leaflet-draw-actions a:hover { + background-color: #A0A098; +} + +.leaflet-draw-actions-top.leaflet-draw-actions-bottom a { + height: 26px; + line-height: 26px; +} + +/* ================================================================== */ +/* Draw toolbar +/* ================================================================== */ + +.leaflet-draw-toolbar .leaflet-draw-draw-polyline { + background-position: -2px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline { + background-position: 0 -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-polygon { + background-position: -31px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon { + background-position: -29px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-rectangle { + background-position: -62px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle { + background-position: -60px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-circle { + background-position: -92px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle { + background-position: -90px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-marker { + background-position: -122px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker { + background-position: -120px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker { + background-position: -273px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker { + background-position: -271px -1px; +} + +/* ================================================================== */ +/* Edit toolbar +/* ================================================================== */ + +.leaflet-draw-toolbar .leaflet-draw-edit-edit { + background-position: -152px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit { + background-position: -150px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-edit-remove { + background-position: -182px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove { + background-position: -180px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled { + background-position: -212px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled { + background-position: -210px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled { + background-position: -242px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled { + background-position: -240px -2px; +} + +/* ================================================================== */ +/* Drawing styles +/* ================================================================== */ + +.leaflet-mouse-marker { + background-color: #fff; + cursor: crosshair; +} + +.leaflet-draw-tooltip { + background: rgb(54, 54, 54); + background: rgba(0, 0, 0, 0.5); + border: 1px solid transparent; + -webkit-border-radius: 4px; + border-radius: 4px; + color: #fff; + font: 12px/18px "Helvetica Neue", Arial, Helvetica, sans-serif; + margin-left: 20px; + margin-top: -21px; + padding: 4px 8px; + position: absolute; + visibility: hidden; + white-space: nowrap; + z-index: 6; +} + +.leaflet-draw-tooltip:before { + border-right: 6px solid black; + border-right-color: rgba(0, 0, 0, 0.5); + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + content: ""; + position: absolute; + top: 7px; + left: -7px; +} + +.leaflet-error-draw-tooltip { + background-color: #F2DEDE; + border: 1px solid #E6B6BD; + color: #B94A48; +} + +.leaflet-error-draw-tooltip:before { + border-right-color: #E6B6BD; +} + +.leaflet-draw-tooltip-single { + margin-top: -12px +} + +.leaflet-draw-tooltip-subtext { + color: #f8d5e4; +} + +.leaflet-draw-guide-dash { + font-size: 1%; + opacity: 0.6; + position: absolute; + width: 5px; + height: 5px; +} + +/* ================================================================== */ +/* Edit styles +/* ================================================================== */ + +.leaflet-edit-marker-selected { + background-color: rgba(254, 87, 161, 0.1); + border: 4px dashed rgba(254, 87, 161, 0.6); + -webkit-border-radius: 4px; + border-radius: 4px; + box-sizing: content-box; +} + +.leaflet-edit-move { + cursor: move; +} + +.leaflet-edit-resize { + cursor: pointer; +} + +/* ================================================================== */ +/* Old IE styles +/* ================================================================== */ + +.leaflet-oldie .leaflet-draw-toolbar { + border: 1px solid #999; +} + diff --git a/leaflet-2.3.4/dist/GpPluginLeaflet-src.js b/leaflet-2.3.4/dist/GpPluginLeaflet-src.js new file mode 100644 index 000000000..a6f428e9d --- /dev/null +++ b/leaflet-2.3.4/dist/GpPluginLeaflet-src.js @@ -0,0 +1,46451 @@ +/*! + * @brief French Geoportal Extension for Leaflet + * + * This software is released under the licence CeCILL-B (Free BSD compatible) + * @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt + * @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt + * @see http://www.cecill.info/ + * + * @copyright copyright (c) IGN + * @license CeCILL-B + * @author IGN + * @version 2.3.4 + * @date 30/08/2023 + * + */ + +/*! + * @overview Proj4Leaflet - Smooth Proj4js integration with Leaflet + * @copyright Copyright (c) 2012, Kartena AB + * @license BSD 2-Clause "Simplified" License + * See https://raw.githubusercontent.com/kartena/Proj4Leaflet/master/LICENSE + * @version 1.0.2 + */ + +/*! + * @overview leaflet-draw - Vector drawing and editing plugin for Leaflet + * @copyright Copyright (c) 2012-2017 Jon West, Jacob Toye, and Leaflet + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/Leaflet/Leaflet.draw/master/MIT-LICENSE.md + * @version 1.0.4 + */ + +/*! + * Sortable -- JavaScript library for reorderable drag-and-drop lists on modern + * browsers and touch devices. No jQuery required. Supports Meteor, AngularJS, + * React, Polymer, Vue, Knockout and any CSS library, e.g. Bootstrap. + * + * Released under MIT LICENSE + * + * Copyright Lebedev Konstantin + * https://github.com/SortableJS/Sortable + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * @version 1.14.0 + */ + +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.4 + */ + +/*! + * @overview Proj4js - Javascript reprojection library. + * + * @authors + * - Mike Adair madairATdmsolutions.ca + * - Richard Greenwood richATgreenwoodmap.com + * - Didier Richard didier.richardATign.fr + * - Stephen Irons stephen.ironsATclear.net.nz + * - Olivier Terral oterralATgmail.com + * - Calvin Metcalf cmetcalfATappgeo.com + * + * @copyright Copyright (c) 2014, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons, Olivier Terral and Calvin Metcalf + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/proj4js/proj4js/master/LICENSE.md + * @version 2.7.5 + */ + +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("leaflet"), require("node-fetch"), require("xmldom")); + else if(typeof define === 'function' && define.amd) + define("Gp", ["leaflet", "require", "require"], factory); + else if(typeof exports === 'object') + exports["Gp"] = factory(require("leaflet"), require("node-fetch"), require("xmldom")); + else + root["Gp"] = factory(root["L"], root[undefined], root[undefined]); +})(this, function(__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__53__, __WEBPACK_EXTERNAL_MODULE__54__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Services", function() { return Services; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Error", function() { return Error; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Helper", function() { return Helper; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Protocols", function() { return Protocols; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "servicesDate", function() { return servicesDate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "servicesVersion", function() { return servicesVersion; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "leafletExtVersion", function() { return leafletExtVersion; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "leafletExtDate", function() { return leafletExtDate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Config", function() { return Config; }); +/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); +var _package_json__WEBPACK_IMPORTED_MODULE_0___namespace = /*#__PURE__*/__webpack_require__.t(1, 1); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__); +/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "LExtended", function() { return leaflet__WEBPACK_IMPORTED_MODULE_1___default.a; }); +/* harmony import */ var _Common_Styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3); +/* harmony import */ var _Styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22); +/* harmony import */ var _Controls_Controls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(33); +/* harmony import */ var _Controls_ElevationPath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(125); +/* harmony import */ var _Layers_Layers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(129); +/* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(107); +/* harmony import */ var _Common_Utils_AutoLoadConfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(135); +/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(41); +/* harmony import */ var _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(131); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LayerUtils", function() { return _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + +/* harmony import */ var _Common_Utils_ProxyUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(136); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProxyUtils", function() { return _Common_Utils_ProxyUtils__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + +/* harmony import */ var _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(137); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorUtils", function() { return _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + +/* harmony import */ var _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(105); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MathUtils", function() { return _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_13__["default"]; }); + +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(35); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + +/** +* Global variable Gp. +* +* @module Gp +* @alias Gp +* @desc +* +* This is the global variable that is exposed in the browser environment. +* Content is composed of constructor, functions and properties... +* +* > Config: (...) +* +* > ColorUtils: (...) +* > LayerUtils: (...) +* > MathUtils: (...) +* > ProxyUtils: (...) +* > Logger: (...) +* +* > LExtended: (...) +* +* > leafletExtDate: "YYYY-MM-DD" +* > leafletExtVersion: "X.X.X" +* +* > Error: (...) +* > Helper: (...) +* > Protocols: (...) +* > Services: (...) +* > servicesDate: "YYYY-MM-DD" +* > servicesVersion: "X.X.X" +* +* The following variables are aslo global : +* - proj4, +* - L +*/ + + + + +// CSS communes aux extensions ! + + + + + +// import WMTS from "./Layers/WMTS"; +// import WMS from "./Layers/WMS"; + + + +// Autoload... + + +// export des services + + +// reconstruction des ns +var Services = geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__["default"].Services; +var Error = geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__["default"].Error; +var Helper = geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__["default"].Helper; +var Protocols = geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__["default"].Protocols; +var servicesDate = geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__["default"].servicesDate; +var servicesVersion = geoportal_access_lib__WEBPACK_IMPORTED_MODULE_9__["default"].servicesVersion; + + +// Rajout des propriétés de l'extension dans le namespace +/** Version */ +var leafletExtVersion = _package_json__WEBPACK_IMPORTED_MODULE_0__.leafletExtVersion || _package_json__WEBPACK_IMPORTED_MODULE_0__.version; +/** Publication date */ +var leafletExtDate = _package_json__WEBPACK_IMPORTED_MODULE_0__.date; + +// Classes utilitaires + + + + + + +// HACK !? +var Config = window.Gp ? window.Gp.Config : {}; + +// creation du namespace pour les extensions leaflet +leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalLayer = _Layers_Layers__WEBPACK_IMPORTED_MODULE_6__["default"]; // WMS et WMTS +// L.geoportalLayers = {}; +// L.geoportalLayers.WMTS = WMTS; +// L.geoportalLayers.WMS = WMS; +leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalControl = _Controls_Controls__WEBPACK_IMPORTED_MODULE_4__["default"]; // IsoChrone, SearchEngine, ... + +leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_LIB_D3 = _Controls_ElevationPath__WEBPACK_IMPORTED_MODULE_5__["default"].DISPLAY_PROFILE_LIB_D3; +leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS = _Controls_ElevationPath__WEBPACK_IMPORTED_MODULE_5__["default"].DISPLAY_PROFILE_LIB_AMCHARTS; +leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_RAW = _Controls_ElevationPath__WEBPACK_IMPORTED_MODULE_5__["default"].DISPLAY_PROFILE_RAW; +leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_BY_DEFAULT = _Controls_ElevationPath__WEBPACK_IMPORTED_MODULE_5__["default"].DISPLAY_PROFILE_BY_DEFAULT; +leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalCRS = _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__["default"]; // lambert 93 et lambert 2 étendu +leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalCRS.EPSG2154 = _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__["default"].EPSG2154(); // lambert 93 +leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalCRS.EPSG27572 = _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__["default"].EPSG27572(); // lambert 2 étendu +leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoportalCRS.EPSG4326 = _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__["default"].EPSG4326(); + + +/***/ }), +/* 1 */ +/***/ (function(module) { + +module.exports = JSON.parse("{\"name\":\"geoportal-extensions\",\"description\":\"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries\",\"version\":\"2.8.6\",\"date\":\"30/08/2023\",\"leafletExtName\":\"French Geoportal Extension for Leaflet\",\"leafletExtVersion\":\"2.3.4\",\"olExtName\":\"French Geoportal Extension for OpenLayers\",\"olExtVersion\":\"3.3.4\",\"itownsExtName\":\"French Geoportal Extension for Itowns\",\"itownsExtVersion\":\"2.4.3\",\"main\":\"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js\",\"types\":\"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts\",\"module\":\"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js\",\"directories\":{},\"scripts\":{\"setup\":\"npm install\",\"clean\":\"echo \\\"Warning: target not yet implemented!\\\" && exit 0\",\"eslint\":\"eslint src/\",\"test\":\"npm run test:serve\",\"test:serve\":\"cd test && webpack-dev-server --hot --config webpack.test.serve.js\",\"sample\":\"npm run sample:serve\",\"sample:serve\":\"npm run sample:ol:serve\",\"sample:itowns:serve\":\"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path '/dist/itowns/' --port 9001 --open\",\"sample:leaflet:serve\":\"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path '/dist/leaflet/' --port 9001 --open\",\"sample:ol:serve\":\"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path '/dist/openlayers/' --port 9001 --open\",\"generate-types:ol\":\"npx tsc -p build/types/tsconfig-openlayers.json\",\"generate-types:leaflet\":\"npx tsc -p build/types/tsconfig-leaflet.json\",\"generate-types:itowns\":\"npx tsc -p build/types/tsconfig-itowns.json\",\"generate-jsdoc:ol\":\"jsdoc -c build/jsdoc/jsdoc-openlayers.json\",\"generate-jsdoc:leaflet\":\"jsdoc -c build/jsdoc/jsdoc-leaflet.json\",\"generate-jsdoc:itowns\":\"jsdoc -c build/jsdoc/jsdoc-itowns.json\",\"doc\":\"npm run doc:serve\",\"doc:serve\":\"npm run doc:ol:serve\",\"doc:itowns:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open\",\"doc:leaflet:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open\",\"doc:ol:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open\",\"build:dev\":\"npm-run-all --print-label --print-name build:*:dev\",\"build:prod\":\"npm-run-all --print-label --print-name build:*:prod\",\"build:src\":\"npm-run-all --print-label --print-name build:*:src\",\"build\":\"npm-run-all --print-label --print-name build:*:*\",\"build:itowns\":\"npm-run-all --print-label --print-name build:itowns:*\",\"build:itowns:dev\":\"webpack --config build/webpack/webpack.config.itowns --mode=development\",\"build:itowns:prod\":\"webpack --config build/webpack/webpack.config.itowns --mode=production\",\"build:itowns:src\":\"webpack --config build/webpack/webpack.config.itowns --mode=none\",\"build:ol\":\"npm-run-all --print-label --print-name build:ol:*\",\"build:ol:dev\":\"webpack --config build/webpack/webpack.config.openlayers --mode=development\",\"build:ol:prod\":\"webpack --config build/webpack/webpack.config.openlayers --mode=production\",\"build:ol:src\":\"webpack --config build/webpack/webpack.config.openlayers --mode=none\",\"build:leaflet\":\"npm-run-all --print-label --print-name build:leaflet:*\",\"build:leaflet:dev\":\"webpack --config build/webpack/webpack.config.leaflet --mode=development\",\"build:leaflet:prod\":\"webpack --config build/webpack/webpack.config.leaflet --mode=production\",\"build:leaflet:src\":\"webpack --config build/webpack/webpack.config.leaflet --mode=none\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/IGNF/geoportal-extensions.git\"},\"author\":\"IGNF\",\"keywords\":[\"geoportail\",\"javascript\",\"OpenLayers\",\"Leaflet\",\"Itowns\",\"3D\"],\"license\":\"CECILL-B\",\"bugs\":{\"url\":\"https://github.com/IGNF/geoportal-extensions/issues\"},\"homepage\":\"https://github.com/IGNF/geoportal-extensions#readme\",\"dependencies\":{\"@mapbox/mapbox-gl-style-spec\":\"13.20.1\",\"eventbusjs\":\"0.2.0\",\"geoportal-access-lib\":\"3.3.4\",\"itowns\":\"2.38.2\",\"leaflet\":\"1.7.1\",\"leaflet-draw\":\"1.0.4\",\"loglevel\":\"^1.6.7\",\"markdown-toc\":\"^1.2.0\",\"ol\":\"6.9.0\",\"ol-mapbox-style\":\"6.7.0\",\"proj4\":\"2.7.5\",\"proj4leaflet\":\"1.0.2\",\"sortablejs\":\"1.14.0\",\"three\":\"0.137.5\",\"typescript\":\"^4.5.5\",\"whatwg-fetch\":\"3.0.0\"},\"devDependencies\":{\"@babel/core\":\"^7.4.4\",\"@babel/plugin-transform-template-literals\":\"^7.7.4\",\"@babel/preset-env\":\"^7.4.4\",\"babel-loader\":\"^8.0.5\",\"chai\":\"^4.2.0\",\"chalk\":\"^4.0.0\",\"clean-webpack-plugin\":\"^3.0.0\",\"copy-webpack-plugin\":\"^5.0.3\",\"core-js\":\"^3.6.4\",\"css-loader\":\"^3.4.2\",\"eslint\":\"^6.8.0\",\"eslint-config-standard\":\"^14.1.1\",\"eslint-loader\":\"^4.0.0\",\"eslint-plugin-import\":\"^2.17.2\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"^4.1.1\",\"eslint-plugin-standard\":\"^4.0.0\",\"exports-loader\":\"^0.7.0\",\"expose-loader\":\"^0.7.5\",\"fs-extra\":\"^9.0.0\",\"handlebars\":\"^4.7.5\",\"handlebars-layouts\":\"^3.1.4\",\"html-webpack-plugin\":\"^4.0.4\",\"jsdoc-webpack-plugin\":\"^0.3.0\",\"mini-css-extract-plugin\":\"^0.9.0\",\"mocha\":\"^7.1.1\",\"mocha-loader\":\"^5.0.0\",\"npm-run-all\":\"^4.1.5\",\"optimize-css-assets-webpack-plugin\":\"^5.0.1\",\"path\":\"^0.12.7\",\"replace-bundle-webpack-plugin\":\"^1.0.0\",\"requirejs\":\"^2.3.6\",\"responsive-loader\":\"^1.2.0\",\"speed-measure-webpack-plugin\":\"^1.3.0\",\"string-template\":\"^1.0.0\",\"style-loader\":\"^1.1.3\",\"terser-webpack-plugin\":\"^2.0.0\",\"url-loader\":\"^4.0.0\",\"webpack\":\"^4.30.0\",\"webpack-cli\":\"^3.3.1\",\"webpack-dev-server\":\"^3.3.1\",\"webpack-node-externals\":\"^1.7.2\"}}"); + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__2__; + +/***/ }), +/* 3 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _CSS_GPboostRelief_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var _CSS_GPboostRelief_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPboostRelief_css__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _CSS_GPbuildings_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5); +/* harmony import */ var _CSS_GPbuildings_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPbuildings_css__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _CSS_GPdrawing_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6); +/* harmony import */ var _CSS_GPdrawing_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPdrawing_css__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _CSS_GPelevationPath_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7); +/* harmony import */ var _CSS_GPelevationPath_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPelevationPath_css__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _CSS_GPgeneralWidget_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8); +/* harmony import */ var _CSS_GPgeneralWidget_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPgeneralWidget_css__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _CSS_GPgetFeatureInfo_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9); +/* harmony import */ var _CSS_GPgetFeatureInfo_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPgetFeatureInfo_css__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _CSS_GPisochron_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10); +/* harmony import */ var _CSS_GPisochron_css__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPisochron_css__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _CSS_GPlayerSwitcher_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11); +/* harmony import */ var _CSS_GPlayerSwitcher_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPlayerSwitcher_css__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _CSS_GPlocation_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12); +/* harmony import */ var _CSS_GPlocation_css__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPlocation_css__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var _CSS_GPmeasureArea_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(13); +/* harmony import */ var _CSS_GPmeasureArea_css__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPmeasureArea_css__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var _CSS_GPmeasureAzimuth_css__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14); +/* harmony import */ var _CSS_GPmeasureAzimuth_css__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPmeasureAzimuth_css__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var _CSS_GPmeasureLength_css__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(15); +/* harmony import */ var _CSS_GPmeasureLength_css__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPmeasureLength_css__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var _CSS_GPmeasureToolTip_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(16); +/* harmony import */ var _CSS_GPmeasureToolTip_css__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPmeasureToolTip_css__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var _CSS_GPmousePosition_css__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(17); +/* harmony import */ var _CSS_GPmousePosition_css__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPmousePosition_css__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var _CSS_GPreverseGeocoding_css__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(18); +/* harmony import */ var _CSS_GPreverseGeocoding_css__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPreverseGeocoding_css__WEBPACK_IMPORTED_MODULE_14__); +/* harmony import */ var _CSS_GProute_css__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(19); +/* harmony import */ var _CSS_GProute_css__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_CSS_GProute_css__WEBPACK_IMPORTED_MODULE_15__); +/* harmony import */ var _CSS_GPsearchEngine_css__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(20); +/* harmony import */ var _CSS_GPsearchEngine_css__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPsearchEngine_css__WEBPACK_IMPORTED_MODULE_16__); +/* harmony import */ var _CSS_GPwaiting_css__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(21); +/* harmony import */ var _CSS_GPwaiting_css__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPwaiting_css__WEBPACK_IMPORTED_MODULE_17__); + + + + + + + + + + + + + + + + + + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 22 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _CSS_GPgeneralWidgetLeaflet_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23); +/* harmony import */ var _CSS_GPgeneralWidgetLeaflet_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_GPgeneralWidgetLeaflet_css__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _CSS_Controls_ElevationPath_GPelevationPathLeaflet_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24); +/* harmony import */ var _CSS_Controls_ElevationPath_GPelevationPathLeaflet_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_ElevationPath_GPelevationPathLeaflet_css__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _CSS_Controls_Isochrone_GPisochronLeaflet_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25); +/* harmony import */ var _CSS_Controls_Isochrone_GPisochronLeaflet_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Isochrone_GPisochronLeaflet_css__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _CSS_Controls_LayerSwitcher_GPlayerSwitcherLeaflet_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26); +/* harmony import */ var _CSS_Controls_LayerSwitcher_GPlayerSwitcherLeaflet_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_LayerSwitcher_GPlayerSwitcherLeaflet_css__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _CSS_Controls_LocationSelector_GPlocationLeaflet_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27); +/* harmony import */ var _CSS_Controls_LocationSelector_GPlocationLeaflet_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_LocationSelector_GPlocationLeaflet_css__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _CSS_Controls_MousePosition_GPmousePositionLeaflet_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(28); +/* harmony import */ var _CSS_Controls_MousePosition_GPmousePositionLeaflet_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_MousePosition_GPmousePositionLeaflet_css__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _CSS_Controls_ReverseGeocoding_GPreverseGeocodingLeaflet_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(29); +/* harmony import */ var _CSS_Controls_ReverseGeocoding_GPreverseGeocodingLeaflet_css__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_ReverseGeocoding_GPreverseGeocodingLeaflet_css__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _CSS_Controls_Route_GProuteLeaflet_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30); +/* harmony import */ var _CSS_Controls_Route_GProuteLeaflet_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Route_GProuteLeaflet_css__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _CSS_Controls_SearchEngine_GPsearchEngineLeaflet_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31); +/* harmony import */ var _CSS_Controls_SearchEngine_GPsearchEngineLeaflet_css__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_SearchEngine_GPsearchEngineLeaflet_css__WEBPACK_IMPORTED_MODULE_8__); +/* global true */ + +// En module ES6, on n'a pas besoin de ces CSS, car on utile le CSS géneré avec WebPack. +// L'utilisation de ces imports est utile lors de la creation du bundle... + + + + + + + + + + +// ce flag est substitué via le script de publication des sources du package... +if (true) { + // plugin leaflet-draw ! + __webpack_require__(32); +} + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 33 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34); +/* harmony import */ var _Isocurve__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(40); +/* harmony import */ var _MousePosition__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(104); +/* harmony import */ var _ReverseGeocoding__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(116); +/* harmony import */ var _Route__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(119); +/* harmony import */ var _SearchEngine__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(121); +/* harmony import */ var _ElevationPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(125); +/* harmony import */ var _Logo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(128); + + + + + + + + + +/** + * Geoportal Controls Factory to be used together with Leaflet Maps. + * + * @module Controls + * @alias L.geoportalControl + * @example + * var layerSwitcher = L.geoportalControl.LayerSwitcher(options); + */ +var Controls = { + /** + * Factory function for LayerSwitcher Control creation. + * + * @method LayerSwitcher + * @static + * @alias L.geoportalControl.LayerSwitcher + * @param {Object} options - options for function call. + * @param {String} [options.position] - position of component into the map, 'topleft' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values. + * @param {Boolean} [options.collapsed = true] - collapse mode, false by default + * @param {Array} [options.layers] - list of layers to be configured. Each array element is an object, with following properties : + * @param {Object} [options.layers.layer] - layer object + * @param {Boolean} [options.layers.display] - display layer in widget layer list + * @param {Object} [options.layers.config] - layer display config + * @param {String} [options.layers.config.visibility] - layer visibility on map + * @param {String} [options.layers.config.title] - layer alias, to be displayed in widget layer list. E.g. : "Cartes IGN" + * @param {String} [options.layers.config.description] - layer description, to be displayed on title hover, or in layer information panel. + * @param {String} [options.layers.config.quicklookUrl] - link to a quick look image for this layer. + * @param {Array} [options.layers.config.legends] - array of layer legends. Each array element is an object, with following properties : + * - url (String, mandatory) : link to a legend + * - minScaleDenominator (Number, optional) : min scale denominator for legend validity. + * @param {Array} [options.layers.config.metadata] - array of layer metadata. Each array element is an object, with property url (String, mandatory) : link to a metadata + * @returns {L.geoportalControl.LayerSwitcher} - LayerSwitcher Object + * @example + * layers = [ + * { + * layer : wms1, + * display : false, + * config : { + * title : "test layer name 1", + * description : "test layer desc 1", + * } + * } + * ]; + * + * options = { + * position : "topright", + * collapsed : true, + * layers : layers + * }; + * + * var layerSwitcher = L.geoportalControl.LayerSwitcher(options); + */ + LayerSwitcher: function LayerSwitcher(options) { + return new _LayerSwitcher__WEBPACK_IMPORTED_MODULE_0__["default"](options); + }, + /** + * Factory function for Isocurve Control creation. + * + * @method Isocurve + * @static + * @alias L.geoportalControl.Isocurve + * @param {Object} options - Isocurve control options + * @param {String} [options.apiKey] - API key for services call (isocurve and autocomplete services). The key "calcul" is used by default. + * @param {String} [options.position] - position of component into the map, 'topleft' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values. + * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true. + * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol) + * @param {Object} [options.exclusions = {"toll" : false, "tunnel" : false, "bridge" : false}] - list of exclusions with status (true = checked), by default : ["toll":false, "tunnel":false, "bridge":false]. + * @param {Array} [options.graphs = ["Voiture", "Pieton"]] - list of graph resources to be used for isocurve calculation, by default : ["Voiture", "Pieton"]. The first element is selected. + * @param {Array} [options.methods = ["time", "distance"]] - list of methods, by default : ["time", "distance"]. The first element is selected by default. + * @param {Array} [options.directions = ["departure", "arrival"]] - list of directions to be displayed, by default : ["departure", "arrival"]. The first element is selected by default. + * Directions enable to specify if input location point will be used as a departure point ("departure") or as an arrival point ("arrival") + * @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding + * @param {Object} [options.isocurveOptions = {}] - isocurve service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~isoCurve Gp.Services.isoCurve} + * @param {Object} [options.autocompleteOptions = {}] - autocomplete service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~autoComplete Gp.Services.autoComplete} + * @returns {L.geoportalControl.Isocurve} - Isocurve Object + * @example + * var iso = L.geoportalControl.Isocurve({ + * collapsed : false + * methods : ["time", "distance"], + * exclusions : { + * toll : true, + * bridge : false, + * tunnel : true + * }, + * graphs : ["Pieton", "Voiture"], + * isocurveOptions : {}, + * autocompleteOptions : {} + * }); + */ + Isocurve: function Isocurve(options) { + return new _Isocurve__WEBPACK_IMPORTED_MODULE_1__["default"](options); + }, + /** + * Factory function for Geoportal MousePosition Control creation. + * + * @method MousePosition + * @static + * @alias L.geoportalControl.MousePosition + * @param {Object} options - options for function call. + * @param {String} [options.apiKey] - API key. The "calcul" key is used by default. + * @param {String} [options.position] - position of component into the map, 'bottomleft' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values. + * @param {Boolean} [options.collapsed = true] - collapse mode, false by default + * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol) + * @param {Array} [options.systems] - list of projection systems, GEOGRAPHIC, MERCATOR, LAMB93 and LAMB2E by default + * Each array element (=system) is an object with following properties : + * @param {String} options.systems.crs - Proj4 crs alias (from proj4 defs). e.g. : "EPSG:4326". Required + * @param {String} [options.systems.label] - CRS label to be displayed in control. Default is crs code (e.g. "EPSG:4326") + * @param {String} [options.systems.type] - CRS units type for coordinates conversion : "Geographical" or "Metric". Default: "Metric" + * @param {Object} [options.systems.geoBBox] - Aera covered by the system (WGS84 coordinates). + * @param {Number} options.systems.geoBBox.right - Right bound. + * @param {Number} options.systems.geoBBox.left - Left bound. + * @param {Number} options.systems.geoBBox.top - Top bound. + * @param {Number} options.systems.geoBBox.bottom - Bottom bound. + * @param {Array} [options.units] - list of units by system, Geographical and Metric by default + * Values may be "DEC" (decimal degrees), "DMS" (sexagecimal), "RAD" (radians) and "GON" (grades) for geographical coordinates, + * and "M" or "KM" for metric coordinates + * @param {Boolean} [options.displayAltitude = true] - active/desactivate the altitude panel, if desactivate, have just the coordinate panel, true by default + * @param {Boolean} [options.displayCoordinates = true] - active/desactivate the coordinate panel, if desactivate, have just the altitude panel, true by default + * @param {Boolean} [options.editCoordinates = false] - If true, coordinates from the MousePosition control can be edited by users to re-center the view. False by default. + * @param {Object} [options.altitude] - elevation configuration + * @param {Object} [options.altitude.serviceOptions] - options of elevation service. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~getAltitude Gp.Services.getAltitude} + * @param {Number} [options.altitude.responseDelay] - latency for altitude request, 500 ms by default + * @param {Number} [options.altitude.triggerDelay] - immobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default + * @param {Number} [options.altitude.noDataValue] - value used for altitude service no data (default is -99999). In this case, "---m" will be displayed instead of "-99999m" + * @param {Number} [options.altitude.noDataValueTolerance] - tolerance for no data value : + * values in [noDataValue - noDataValueTolerance ; noDataValue + noDataValueTolerance] interval will not be displayed, but "---m" will be displayed instead. + * Default is 90000 + * @returns {L.geoportalControl.MousePosition} - MousePosition Object + * @example + * var MousePosition = L.geoportalControl.MousePosition({ + * position : 'bottomleft', + * collapsed : false, + * displayAltitude : true, + * editCoordinates : false, + * altitude : { + * triggerDelay : 100, + * responseDelay : 500, + * noDataValue : -99999, + * noDataValueTolerance : 90000, + * serviceOptions : {} + * }, + * systems : [ + * { + * crs : L.CRS.EPSG4326, + * label : "Lon,Lat", + * type : "Geographical" + * }, + * { + * crs : L.geoportalCRS.EPSG2154, + * label : "Lambert 93", + * type : "Metric" + * } + * ], + * units : ["DEC", "DMS"] + * }); + */ + MousePosition: function MousePosition(options) { + return new _MousePosition__WEBPACK_IMPORTED_MODULE_2__["default"](options); + }, + /** + * Factory function for Geoportal ReverseGeocode Control creation. + * + * @method ReverseGeocode + * @static + * @alias L.geoportalControl.ReverseGeocode + * @extends {L.Control} + * @param {Object} options - ReverseGeocoding control options + * @param {String} [options.apiKey] - API key for services call (reverse geocode service). The "calcul" key is used by default. + * @param {String} [options.position] - position of component into the map, 'topleft' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values. + * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true. + * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol) + * @param {Array} [options.resources = ["StreetAddress", "PositionOfInterest", "CadastralParcel"]] - resources for geocoding, by default : ["StreetAddress", "PositionOfInterest"] + * @param {Array} [options.delimitations = ["Point", "Circle", "Extent"]] - delimitations for reverse geocoding, by default : ["Point", "Circle", "Extent"] + * @param {Object} [options.ReverseGeocodeOptions = {}] - reverse geocode service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~reverseGeocode Gp.Services.reverseGeocode} to know all reverse geocode options. + * @returns {L.geoportalControl.ReverseGeocode} - ReverseGeocode Object + * @fires reverse:onclickresult + * @example + * var reverse = L.geoportalControl.ReverseGeocode({ + * collapsed : false, + * position : "topright", + * resources : ["StreetAddress", "PositionOfInterest"], + * delimitations : ["Point", "Circle"], + * reverseGeocodeOptions : {} + * }); + * reverse.on("reverse:onclickresult", function (e) { + * console.log(e.data): + * }); + */ + ReverseGeocode: function ReverseGeocode(options) { + return new _ReverseGeocoding__WEBPACK_IMPORTED_MODULE_3__["default"](options); + }, + /** + * Factory function for Geoportal Route Control creation. + * + * @method Route + * @static + * @alias L.geoportalControl.Route + * @extends {L.Control} + * @param {Object} options - options for function call. + * @param {String} [options.apiKey] - API key. The "calcul" key is used by default. + * @param {String} [options.position = "topleft"] - position of component into the map, 'topleft' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values. + * @param {Boolean} [options.collapsed = false] - collapse mode, false by default + * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol) + * @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding when entering points. + * Active by default. But, you can disable it when entering with the "ctrl" key on the keyboard + * @param {Object} [options.exclusions = {"toll" : false, "tunnel" : false, "bridge" : false}] - list of exclusions with status + * @param {Array} [options.graphs = ["Voiture", "Pieton"]] - list of resources, by default : ["Voiture", "Pieton"], and the first element is selected. + * @param {Object} [options.autocompleteOptions = {}] - options of autocomplete service. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~autoComplete Gp.Services.autoComplete} + * @param {Object} [options.routeOptions = {}] - options of route service. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~route Gp.Services.route} + * @returns {L.geoportalControl.Route} - Route Object + * @example + * var route = L.geoportalControl.Route({ + * position : "topright", + * collapsed : true, + * exclusions : { + * "toll" : true, + * "bridge" : false, + * "tunnel" : true + * }, + * graphs : ['Pieton', 'Voiture'], + * autocompleteOptions : {}, + * routeOptions : {} + * }); + */ + Route: function Route(options) { + return new _Route__WEBPACK_IMPORTED_MODULE_4__["default"](options); + }, + /** + * Factory function for Geoportal SearchEngine Control creation. + * + * @method SearchEngine + * @static + * @alias L.geoportalControl.SearchEngine + * @extends {L.Control} + * @param {Object} options - control options + * @param {String} [options.apiKey] - API key. The "calcul" key is used by default. + * @param {Boolean} [options.collapsed = false] - collapse mode + * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol) + * @param {String} [options.position = "topleft"] - position of component into the map. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values. + * @param {String} [options.placeholder = "Rechercher un lieu, une adresse"] - set placeholder in search bar + * @param {Boolean} [options.displayMarker = true] - set a marker on search result + * @param {String|Object} [options.markerStyle = "blue"] - set a marker style. Currently possible values are "blue" (default value), "orange", "red" and "green". But you can use an L.Icon object (see {@link http://leafletjs.com/reference-1.2.0.html#icon L.Icon }) + * @param {Boolean} [options.displayInfo = true] - get informations on popup marker + * @param {String|Numeric|Function} [options.zoomTo] - zoom to results, by default, current zoom. + * possible values : "auto", any fixed zoom level or a function retruning a zoom : + * + * ``` + * zoomTo : function (info) { + * // do some stuff... + * return zoom; // required : return the zoom level ! + * } + * + * With parameter 'info' : { + * type : "PositionOfInterest" | "StreetAddress" | ... + * service : "SuggestedLocation" | "GeocodedLocation" + * fields : { // fields of service response } + * } + * ``` + * @param {String} [options.apiKey] - API key. The "calcul" key is used by default. + * @param {Object} [options.resources] - resources to be used by geocode and autocompletion services, by default : ["StreetAddress", "PositionOfInterest"] + * @param {Boolean} [options.displayAdvancedSearch] - False to disable advanced search tools (it will not be displayed). Default is true (displayed) + * @param {Object} [options.advancedSearch] - advanced search for geocoding (filters) + * @param {Object} [options.geocodeOptions] - options of geocode service. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~geocode Gp.Services.geocode} + * @param {Object} [options.autocompleteOptions] - options of autocomplete service. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~autoComplete Gp.Services.autoComplete} + * @param {Object} [options.autocompleteOptions.serviceOptions] - options of autocomplete service + * @param {Boolean} [options.autocompleteOptions.triggerGeocode = false] - trigger a geocoding request if the autocompletion does not return any suggestions, false by default + * @param {Number} [options.autocompleteOptions.triggerDelay = 1000] - waiting time before sending the geocoding request, 1000ms by default + * @returns {L.geoportalControl.SearchEngine} - SearchEngine Object + * @fires searchengine:autocomplete:click + * @fires searchengine:geocode:click + * @example + * var SearchEngine = L.geoportalControl.SearchEngine({ + * position : "topright", + * collapsed : true, + * zoomTo : "auto", + * displayInfo : true, + * displayAdvancedSearch : true, + * resources : ["PositionOfInterest", "StreetAddress"], + * advancedSearch : { + * PositionOfInterest : [{name : "municipality", title : "Ville"}], + * StreetAddress : [{...}], + * CadastralParcel : null, + * }, + * apiKey : "zfgzrgffg57rfg8ar7gr4g5r4", + * geocodeOptions : {}, + * autocompleteOptions : {} + * }); + * SearchEngine.on("searchengine:autocomplete:click", function (e) { + * console.log(e.data): + * }); + * SearchEngine.on("searchengine:geocode:click", function (e) { + * console.log(e.data): + * }); + */ + SearchEngine: function SearchEngine(options) { + return new _SearchEngine__WEBPACK_IMPORTED_MODULE_5__["default"](options); + }, + /** + * Factory function for ElevationPath Control creation. + * + * @method ElevationPath + * @static + * @alias L.geoportalControl.ElevationPath + * @param {Object} options - options for function call. + * @param {String} [options.apiKey] - API key for elevation service call, mandatory if configuration service has not been loaded in advance. See {@link https://github.com/IGNF/geoportal-extensions/blob/master/README-leaflet.md#user-content-config "Configuration de l'accès à la plateforme Géoportail" documentation chapter} for more information. + * @param {String} [options.position] - position of component into the map, 'topleft' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values. + * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol) + * @param {Boolean} [options.active = false] - specify if control should be actived at startup. Default is false. + * @param {Object} [options.stylesOptions = DEFAULT_STYLES] - Styles to use when drawing. see [leaflet options](http://leafletjs.com/reference.html#path-options) for available properties. + * @param {Object} [options.elevationPathOptions = {}] - elevation path service options. See {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~getAltitude options} for available options + * @param {Object} [options.displayProfileOptions = {}] - profile options. + * @param {Function} [options.displayProfileOptions.apply] - function to display profile if you want to cutomise it. By default, [DISPLAY_PROFILE_BY_DEFAULT()](./L.geoportalControl.ElevationPath.html#.DISPLAY_PROFILE_BY_DEFAULT) is used. Helper functions to use with D3 [DISPLAY_PROFILE_LIB_D3()](./L.geoportalControl.ElevationPath.html#.DISPLAY_PROFILE_LIB_D3) or AmCharts [DISPLAY_PROFILE_LIB_AMCHARTS()](./L.geoportalControl.ElevationPath.html#.DISPLAY_PROFILE_LIB_AMCHARTS) frameworks are also provided. You may also provide your own function. + * @param {Object} [options.displayProfileOptions.target] - DOM container to use to display the profile. + * @param {Boolean} [options.displayProfileOptions.greaterSlope = true] - display the greater slope into the graph + * @param {Boolean} [options.displayProfileOptions.meanSlope = true] - display the mean slope into the graph + * @param {Boolean} [options.displayProfileOptions.ascendingElevation = true] - display the ascending elevation into the graph + * @param {Boolean} [options.displayProfileOptions.descendingElevation = true] - display the descending elevation into the graph + * @param {Boolean} [options.displayProfileOptions.currentSlope = true] - display current slope value on profile mouseover + * + * @returns {L.geoportalControl.ElevationPath} - ElevationPath Object + * @example + * var e = L.geoportalControl.ElevationPath({ + * active : false + * position : "topleft" + * stylesOptions : {}, + * elevationPathOptions : {}, + * displayProfileOptions : { + * apply : L.geoportalControl.DISPLAY_PROFILE_LIB_AMCHARTS + * target : null, // by default + * meanSlope : true, // by default + * greaterSlope : true, // by default + * ascendingElevation : false, + * descendingElevation : false, + * currentSlope : false + * } + * }); + */ + ElevationPath: function ElevationPath(options) { + return new _ElevationPath__WEBPACK_IMPORTED_MODULE_6__["default"](options); + }, + /** + * Control Logo + * + * @private + * @method Logo + * @extends {L.Control} + * @alias L.geoportalControl.Logo + * @param {Object} options - options for function call. + * @param {String} options.position - 'topright' by default. See {@link http://leafletjs.com/reference-1.0.2.html#control-option L.Control options} for available values. + * @param {String} options.url - URL + * @param {String} options.text - text + * @param {String} options.picto - picto + * @param {String|Object} options.size - picto size + * @returns {Logo} - Logo Object + * @example + * var map = L.map('map').setView([48, 2], 4); + * var logo = L.geoportalControl.Logo({ + * position : "topright", + * picto : "http://www.ign.fr/logo-ign.jpg", + * url : "http://www.ign.fr", + * text : "© IGN" + * size : {width : '50px', height : '30px'} + * }); + * logo.addTo(map); + */ + Logo: function Logo(options) { + return new _Logo__WEBPACK_IMPORTED_MODULE_7__["default"](options); + } +}; +/* harmony default export */ __webpack_exports__["default"] = (Controls); + +/***/ }), +/* 34 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(37); +/* harmony import */ var _Common_Controls_LayerSwitcherDOM__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38); + + + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__["default"].getLogger("layerswitcher"); + +/** + * @classdesc + * + * Leaflet Control Class to manage map layers : their order, visibility and opacity, and display their informations (title, description, legends, metadata...) + * + * Use {@link module:Controls.LayerSwitcher L.geoportalControl.LayerSwitcher()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control.Layers native class. + * + * @namespace + * @alias L.geoportalControl.LayerSwitcher + */ +var LayerSwitcher = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Control.Layers.extend( /** @lends L.geoportalControl.LayerSwitcher.prototype */{ + includes: _Common_Controls_LayerSwitcherDOM__WEBPACK_IMPORTED_MODULE_3__["default"], + /** + * options by default + * (extend to L.Control.Layers) + * + * @private + */ + options: { + collapsed: true, + position: "topright", + autoZIndex: true, + layers: [] + }, + // ################################################################### // + // ##################### Methodes surchargées ######################## // + // ################################################################### // + + /** + * @constructor LayerSwitcher + * + * @private + * @alias LayerSwitcher + * @extends {L.Control} + * @param {Object} options - options of component + * @param {String} [options.position] - position of component into the map, 'topleft' by default + * @param {Boolean} [options.collapsed = true] - collapse mode, false by default + * @param {Array} [options.layers] - list of layers to be configured. Each array element is an object, with following properties : + * @param {Object} [options.layers.layer] - layer object + * @param {Boolean} [options.layers.display] - display layer in widget layer list + * @param {String} [options.layers.config.visibility] - layer visibility on map + * @param {String} [options.layers.config.title] - layer alias, to be displayed in widget layer list. E.g. : "Cartes IGN" + * @param {String} [options.layers.config.description] - layer description, to be displayed on title hover, or in layer information panel. + * @param {String} [options.layers.config.quicklookUrl] - link to a quick look image for this layer. + * @param {Array} [options.layers.config.legends] - array of layer legends. Each array element is an object, with following properties : + * - url (String, mandatory) : link to a legend + * - minScaleDenominator (Number, optional) : min scale denominator for legend validity. + * @param {Array} [options.layers.config.metadata] - array of layer metadata. Each array element is an object, with property url (String, mandatory) : link to a metadata + * + * @example + * layers = [ + * { + * layer : wms1, + * display : false, + * config : { + * title : "test layer name 1", + * description : "test layer desc 1", + * } + * } + * ] + * options = { + * position : "topright", + * collapsed : true, + * layers : layers + * } + * + * var layerSwitcher = L.geoportalControl.LayerSwitcher(options); + */ + initialize: function initialize(options) { + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.setOptions(this, options); + + // uuid + this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__["default"].generate(); + + // il faut recuperer tous les layers de la carte (cf. onAdd). + // si une configuration de layers est renseignée, on exploite cette + // information pour les layers renseignés. + // Par contre, pour ceux qui n'ont pas de configuration, on exploite + // les informations issues de la configuration (geoportal-configuration) pour les layers IGN, + // et, pour les layers non IGN, on gère avec l'ID pours les valeurs + // de titre ou description ... + + // a ton une configuration des layers ? + this._hasLayersConfig = !(!this.options.layers || Object.keys(this.options.layers).length === 0); + + // configuration des layers + this._layersConfig = this._hasLayersConfig ? this.options.layers : []; + + // liste des layers (c'est l'interface avec le dom !) + this._layers = {}; + + // indice : ordre des layers sur la carte + // plus c'est haut, plus c'est au dessus de la pile + this._lastZIndex = 0; + + // si on a une configuration de layers, on l'exploite tout de suite... + if (this._hasLayersConfig) { + for (var i = 0; i < this._layersConfig.length; i++) { + var obj = this._layersConfig[i]; + // signature de la fonction pour une compatibilité avec leaflet... + this._addLayer(obj.layer, null, true); + } + } + }, + /** + * Method 'onAdd' + * (extend to L.Control.Layers) + * Method to add the control on the map. + * + * @param {Object} map - L.Map + * @returns {HTMLElement} container + * + * @private + */ + onAdd: function onAdd(map) { + // on charge tous les layers dans le controle avec une + // configuration automatique des layers pour ceux qui ne sont pas + // renseignés. + var layersMap = map._layers; + + // on est dans le cas où nous avons des layers ajoutés à la carte + if (Object.keys(layersMap).length !== 0) { + // pour gerer l'ordre d'affichage des layers sur la map + // ainsi que dans le controle, on veut le fonctionnement suivant : + // layers ID : [21 , 23 , 25 , 27] + // layers Map : [21:1, 23:2, 25:3, 27:4] + // mais l'ordre dans le controle doit être inversé + // layers Ctrl : [27, 25, 23, 21], et ceci sera realisé lors de + // la creation du DOM pour chaque layer (cf. _update()) + + var layersKeys = Object.keys(layersMap); // trie + this._lastZIndex = 0; + for (var i = 0; i < layersKeys.length; i++) { + var layerId = layersKeys[i]; + + // gestion des ordres d'affichage des layers + if (this.options.autoZIndex && layersMap[layerId].setZIndex) { + this._lastZIndex++; + layersMap[layerId].setZIndex(this._lastZIndex); + } + + // y'a t il une configuration des layers ? + // si oui, le layer renseigné a déjà été pris en compte dans + // le constructeur..., on passe à la suite... + if (this._hasLayersConfig) { + if (this._layers[layerId]) { + continue; + } + } + + // sans configuration, on gére en mode auto le layer. + // on utilise cette methode + // this.addOverlay() -> this._addLayer()... + this.addOverlay(layersMap[layerId]); + } + } + + // FIXME au cas où les layers n'ont pas été renseignés sur la carte + // (via addTo ou options.layers), on decide de prendre ceux qui + // sont renseignés dans la configuration ? + if (Object.keys(layersMap).length === 0) { + var config = this._layersConfig; + this._lastZIndex = 0; + for (var j = 0; j < config.length; j++) { + var layer = config[j].layer; + if (!map.hasLayer(layer)) { + // on ajoute le layer à la carte + map.addLayer(layer); + + // on met en place la structure + this.addOverlay(layer, null); + + // on gère l'ordres d'affichage des layers + if (this.options.autoZIndex && layer.setZIndex) { + this._lastZIndex++; + layer.setZIndex(this._lastZIndex); + } + } + } + } + + // mise à jour des visibilités (au niveau du DOM, oeil coché ou non...) + for (var k in this._layers) { + if (this._layers.hasOwnProperty(k)) { + var obj = this._layers[k]; + var _layer = obj.layer; + var _visibility = obj.visibility; + // par defaut, la visibilité de la couche est active, donc avec un oeil non coché ! + if (!_visibility) { + // on met à jour la liste des layers à afficher ! + this._updateVisibilityLayer(_layer); + } + } + } + + // le constructeur retourne this._container ! + // on appelle la methode hérité car elle va realisée le boulot : + // - _initLayout + // - _update + // - evenements sur la carte : layeradd + layerremove + // this._container = L.Control.Layers.prototype.onAdd.call(this, map); + + this._initLayout(); + this._update(); + map.on("layeradd", this._onLayerChange, this); + map.on("layerremove", this._onLayerChange, this); + + // expiremental ! + map.eachLayer(function (layer) { + // ecouteur sur la visibilité des attributions d'un layer IGN + layer.on("visibilitychange", function () { + logger.trace("visibilitychange", layer); + }, this); + // ecouteur sur la liste des attributions d'un layer IGN + layer.on("attributionchange", function () { + logger.trace("attributionchange", layer); + }, this); + }); + return this._container; + }, + /** + * this method is called when the control is removed from the map + * and removes events on map. + * @param {Object} map - the map + * + * @private + */ + onRemove: function onRemove(map) { + map.off("layeradd", this._onLayerChange, this); + map.off("layerremove", this._onLayerChange, this); + }, + /** + * Method '_addLayer' + * (overwritten : L.Control.Layers) + * Methode creation of a useful structure for the interface with the DOM + * Method private call by this.initialize() or this.addOverlay() + * + * @example + * { + * layer : objectlayer, + * id : id, + * title : title, + * description : description + * (...) + * }; + * @param {Object} layer - object type 'L.TileLayer' + * @param {String} name - layer name or title + * @param {Boolean} overlay - overlay or not + * + * @private + */ + _addLayer: function _addLayer(layer, name, overlay) { + // id du layer (IGN ou non) + var id = layer._geoportal_id ? layer._geoportal_id : layer._leaflet_id; + + // pas d'ID !? + // le layer n'est pas chargé dans la carte... + if (typeof id === "undefined") { + return; + } + + // recherche de la config pour un layer donné + var layerConfig = {}; + for (var i in this._layersConfig) { + if (this._layersConfig.hasOwnProperty(i)) { + if (id === leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(this._layersConfig[i].layer)) { + layerConfig = this._layersConfig[i].config; + // display + // ce layer n'est pas pris en compte dans le controle + // mais il peut être affiché dans la map + // si au préalable, le client l'a ajouté... + var display = typeof this._layersConfig[i].display !== "undefined" ? this._layersConfig[i].display : true; + if (!display) { + return; + } + break; + } + } + } + + // construit un objet simplifié pour le dom, + // par defaut, on prend en compte les layers de type IGN + // (info de la configuration). + this._layers[id] = { + layer: layer, + id: id, + overlay: overlay, + // not use ! + title: layer._geoportal_id && layer._title ? layer._title : name || id, + description: layer._geoportal_id && layer._description ? layer._description : name || id, + visibility: true, + // par defaut, sauf si surcharge via la config... + legends: layer._geoportal_id ? layer._legends : null, + metadata: layer._geoportal_id ? layer._metadata : null, + quicklookUrl: layer._geoportal_id ? layer._quicklookUrl : null + }; + + // surcharge la config ci dessus avec les options de configuration saisies + if (layerConfig && Object.keys(layerConfig).length) { + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(this._layers[id], layerConfig); + } + + // mise à jour de la visibilité + var _visibility = this._layers[id].visibility; + if (layer._geoportal_id) { + // mise à jour de la visibilité des attributions pour un layer IGN + layer.setVisible(_visibility); + } + if (!_visibility) { + // on met à jour la liste des layers à afficher ! + this._updateVisibilityLayer(layer); + } + }, + /** + * Method 'addTo' + * (overwritten : L.Control.Layers because of exception with _expandIfNotCollapsed()) + * + * @param {Object} map - the map + * + * @returns {Object} this + */ + addTo: function addTo(map) { + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Control.prototype.addTo.call(this, map); + return this; + }, + /** + * Creation of layers of container + * (extend to L.Control.Layers) + * + * Method private call by this.onAdd() + * + * @private + */ + _initLayout: function _initLayout() { + // fonctionnement lors de l'initialisation : + // onAdd -> this._update -> this._addItem (on boucle sur layers) + // onAdd -> this._initLayout + + // creation du container principal + var container = this._container = this._createMainContainerElement(); + + // ajout dans le container principal d'affichage des layers + var input = this._createMainLayersShowElement(); + container.appendChild(input); + + // gestion du mode "collapsed" + if (!this.options.collapsed) { + input.checked = true; + } + + // ajout dans le container principal de la liste des layers + var divL = this._overlaysList = this._createMainLayersElement(); + container.appendChild(divL); + + // ajout dans le container principal du picto du controle + var picto = this._createMainPictoElement(); + container.appendChild(picto); + + // ajout dans le container principal du panneau d'information + var divI = this._createMainInfoElement(); + container.appendChild(divI); + + // creation du mode draggable + this._createDraggableElement(this._overlaysList, this); + + // desactivation des evenements qui peuvent interférer avec la carte + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container); + + // gestion des evenements en interaction avec la carte + this._map.on("moveend", this._onOutOfRangeLayerZoom, this); + + // gestion des CSS en fonction du placement du controle + switch (this.getPosition()) { + case "topright": + container.style.position = "relative"; + container.style.top = "0"; + container.style.right = "0"; + break; + case "topleft": + container.style.position = "relative"; + container.style.top = "0"; + container.style.right = "initial"; + picto.style["float"] = "left"; + divL.style.borderBottomRightRadius = "5px"; + divL.style.borderBottomLeftRadius = "0"; + divI.style.right = "initial"; + divI.style.left = "190px"; + break; + case "bottomleft": + container.style.position = "relative"; + container.style.top = "0"; + container.style.right = "initial"; + picto.style["float"] = "left"; + divL.style.borderBottomRightRadius = "5px"; + divL.style.borderBottomLeftRadius = "0"; + divI.style.right = "initial"; + divI.style.left = "190px"; + // divI.style.top = "initial"; + // divI.style.bottom = "190px"; + break; + case "bottomright": + container.style.position = "relative"; + container.style.top = "0"; + container.style.right = "0"; + // divI.style.top = "initial"; + // divI.style.bottom = "190px"; + break; + default: + container.style.position = "relative"; + container.style.top = "0"; + container.style.right = "0"; + } + }, + /** + * Update the construction of DOM for each layer + * (extend to L.Control.Layers) + * + * Method private call by this.onAdd() + * + * @private + */ + _update: function _update() { + if (!this._container) { + return; + } + this._overlaysList.innerHTML = ""; + var layersId = []; + for (var i in this._layers) { + if (this._layers.hasOwnProperty(i)) { + layersId.push(i); + } + } + + // inversion du sens des layers dans le controle + // car on veut le même ordre que sur la map, et comme je suis un peu + // parano, je re-trie la liste... + var layers = layersId.sort(function (a, b) { + var ia = parseInt(a, 10); + var ib = parseInt(b, 10); + return ia - ib; + }).reverse(); + for (var j = 0; j < layers.length; j++) { + var id = layers[j]; + var obj = this._layers[id]; + this._addItem(obj); + } + }, + /** + * Construction of the DOM for each layer + * (extend to L.Control.Layers) + * + * Method private call by this._update() + * + * @private + * @param {Object} obj - layer + * @returns {HTMLElement} container + */ + _addItem: function _addItem(obj) { + logger.log("_addItem", obj); + obj.opacity = obj.layer.options.opacity; // ajout de cette option ! + var container = this._createContainerLayerElement(obj); + + // gestion outOfRange + obj.layer.options.minZoom > this._map.getZoom() || obj.layer.options.maxZoom < this._map.getZoom() ? leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(container, "outOfRange") : leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(container, "outOfRange"); + + // ajout du container dans la liste des layers (de type overlay uniquement !) + this._overlaysList.appendChild(container); + return container; + }, + /** + * Event onLayer change + * (extend to L.Control.Layers because of version 1.0.0) + * + * @private + * @param {Event} e - event + */ + _onLayerChange: function _onLayerChange(e) { + var obj = this._layers[leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(e.layer)]; + if (!obj) { + return; + } + if (!this._handlingClick) { + this._update(); + } + this._map.fire(e.type === "layeradd" ? "overlayadd" : "overlayremove", obj); + }, + /** + * Event onLayer remove + * (extend to L.Control.Layers because of version 1.0.0) + * + * @private + * @param {Object} layer - event + * @returns {Object} layer + */ + removeLayer: function removeLayer(layer) { + // clean DOM ! + var id = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(layer); + delete this._layers[id]; + this._update(); + + // clean Layers + var map = this._map; + if (map) { + if (map.hasLayer(layer)) { + map.removeLayer(layer); + } + } + return this; + }, + // ################################################################### // + // ################ Methodes de l'instance (privées) ################# // + // ################################################################### // + + /** + * Set visibility of attribution layer + * (call by this._onVisibilityLayerClick()) + * + * @private + * @param {Object} layer - layer + */ + _updateVisibilityLayer: function _updateVisibilityLayer(layer) { + if (!this._map) { + return; + } + this._handlingClick = true; + var visibility = this._layers[leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(layer)].visibility; + if (visibility && !this._map.hasLayer(layer)) { + // input non checked dans le DOM, on ouvre l'oeil + // et on ajoute la couche ! + this._map.addLayer(layer); + } else if (!visibility && this._map.hasLayer(layer)) { + // input checked dans le DOM, on ferme l'oeil + // et on supprime la couche ! + this._map.removeLayer(layer); + } else { + logger.log("Status unknown layer !?"); + } + this._handlingClick = false; + this._refocusOnMap(); + }, + /** + * Set visibility of layer (DOM) + * (call by this.setVisibility()) + * + * @private + * @param {Object} layer - layer + */ + _updateVisibilityDOMLayer: function _updateVisibilityDOMLayer(layer) { + var layerIdx = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(layer); + var visibilityElement = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID("GPvisibility_ID_" + layerIdx)); // FIXME ID ! + var visibilityValue = this._layers[layerIdx].visibility; + visibilityElement.checked = visibilityValue; + }, + /** + * Set opacity of layer (DOM) + * (call by this.setOpacity()) + * + * @private + * @param {Object} layer - layer + */ + _updateOpacityDOMLayer: function _updateOpacityDOMLayer(layer) { + var layerIdx = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(layer); + var opacityValue = layer.options.opacity; + var opacityElement = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID("GPopacityValue_ID_" + layerIdx)); // FIXME ID ! + opacityElement.innerHTML = parseInt(opacityValue * 100, 10) + "%"; + opacityElement.value = parseInt(opacityValue * 100, 10); + }, + // ################################################################### // + // ################## GESTIONNAIRES d'evenements ##################### // + // ################################################################### // + + /** + * Event 'zoom' on layers visibility + * + * FIXME contrainte sur l'emprise du layer ? + * + * @private + */ + _onOutOfRangeLayerZoom: function _onOutOfRangeLayerZoom() { + var map = this._map; + var layers = this._layers; + for (var i in layers) { + if (layers.hasOwnProperty(i)) { + var layer = layers[i].layer; + var id = layers[i].id; + var div = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID("GPlayerSwitcher_ID_" + id)); // FIXME ID ! + if (layer.options.minZoom > map.getZoom() || layer.options.maxZoom < map.getZoom()) { + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(div, "outOfRange"); + } else { + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(div, "outOfRange"); + } + } + } + }, + /** + * Event 'click' on layer visibility + * + * @private + * @param {Event} e - MouseEvent + */ + _onVisibilityLayerClick: function _onVisibilityLayerClick(e) { + var visibilityElement = e.target.id; // ex GPvisibilityPicto_ID_26 + var visibilityOrder = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__["default"].index(visibilityElement); // ex. 26 + + // on met à jour cette interface... + this._layers[visibilityOrder].visibility = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(visibilityElement).checked; + var layer = this._layers[visibilityOrder].layer; + this._updateVisibilityLayer(layer); + }, + /** + * Event 'click' on layer deleted + * + * @private + * @param {Event} e - MouseEvent + */ + _onDropLayerClick: function _onDropLayerClick(e) { + var layerElement = e.target.id; // ex GPvisibilityPicto_ID_26 + var layerOrder = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__["default"].index(layerElement); // ex. 26 + var layer = this._layers[layerOrder].layer; + this.removeLayer(layer); + }, + /** + * Event 'onchange' on layer opacity + * + * FIXME appel en dur d'un identifiant CSS ! + * + * @private + * @param {Event} e - ChangeEvent + */ + _onChangeLayerOpacity: function _onChangeLayerOpacity(e) { + var layerElement = e.target.id; // ex GPvisibilityPicto_ID_26 + var layerOrder = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__["default"].index(layerElement); // ex. 26 + var layer = this._layers[layerOrder].layer; + var opacityValue = e.target.value; + var opacityId = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID("GPopacityValue_ID_" + layerOrder)); // FIXME ID ! + opacityId.innerHTML = opacityValue + "%"; + if (this._map.hasLayer(layer)) { + if (typeof layer.setOpacity !== "undefined") { + layer.setOpacity(opacityValue / 100); + } else { + // Particularité du format GeoJSON + layer.setStyle({ + fillOpacity: opacityValue / 100, + opacity: opacityValue / 100 + }); + } + } + }, + /** + * Event 'click' on opening the information window + * + * FIXME appel en dur d'un identifiant CSS ! + * + * @private + * @param {Event} e - MouseEvent + */ + _onOpenLayerInfoClick: function _onOpenLayerInfoClick(e) { + var layerElement = e.target.id; // ex GPvisibilityPicto_ID_26 + var layerOrder = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__["default"].index(layerElement); // ex. 26 + var layer = this._layers[layerOrder]; + + // Close layer info panel + var divId = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(e.target.id); + var panel = null; + var info = null; + if (divId.className === "GPlayerInfoOpened") { + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(divId, "GPlayerInfoOpened"); + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(divId, "GPlayerInfo"); + panel = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID("GPlayerInfoPanel")); + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(panel, "GPpanel"); + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(panel, "GPlayerInfoPanelOpened"); + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(panel, "GPlayerInfoPanelClosed"); + info = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID("GPlayerInfoContent")); + panel.removeChild(info); + return; + } + var layers = document.getElementsByClassName("GPlayerInfoOpened"); + for (var i = 0; i < layers.length; i++) { + layers[i].className = "GPlayerInfo"; + } + + // Open layer info panel + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(divId, "GPlayerInfo"); + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(divId, "GPlayerInfoOpened"); + panel = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID("GPlayerInfoPanel")); + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(panel, "GPpanel"); + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.removeClass(panel, "GPlayerInfoPanelClosed"); + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.addClass(panel, "GPlayerInfoPanelOpened"); + info = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get(this._addUID("GPlayerInfoContent")); + if (info) { + panel.removeChild(info); + } + + // on récupére les infos associées au layer pour mettre à jour + // dynamiquement le contenu du panel d"infos + var infoLayer = this._createContainerLayerInfoElement(layer); + panel.appendChild(infoLayer); + }, + /** + * Event "drag & drop" on move layer + * + * FIXME appel en dur d'un identifiant CSS ! + * + * @private + * @param {Event} e - MouseEvent + */ + _onDragAndDropLayerClick: function _onDragAndDropLayerClick(e) { + var layerElement = e.target.id; // ex GPvisibilityPicto_ID_26 + var layerOrder = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__["default"].index(layerElement); // ex. 26 + var layer = this._layers[layerOrder]; + logger.log(layer); + var matchesLayers = document.querySelectorAll("div.GPlayerSwitcher_layer"); + this._lastZIndex = matchesLayers.length; + for (var i = 0; i < matchesLayers.length; i++) { + var tag = matchesLayers[i].id; + var order = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__["default"].index(tag); + var _layer = this._layers[order].layer; + if (this.options.autoZIndex && _layer.setZIndex) { + this._lastZIndex--; + _layer.setZIndex(this._lastZIndex); + } + } + }, + // ################################################################### // + // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ // + // ################################################################### // + + /** + * Adding layer configuration to be displayed by the control + * + * @param {Object} layer - layer to add to layer switcher + * @param {Object} config - See {@link module:Controls.LayerSwitcher L.geoportalControl.LayerSwitcher()} for layer display config object definition. + */ + addLayer: function addLayer(layer, config) { + var map = this._map; + var cfg = this._layersConfig; + if (!layer) { + logger.log("[ERROR] LayerSwitcher:addLayer - missing layer parameter !"); + return; + } + if (!map.hasLayer(layer)) { + logger.log("[WARN] LayerSwitcher:addLayer - layer has not been added on map !"); + map.addLayer(layer); + } + var id = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(layer); + for (var i in cfg) { + if (cfg.hasOwnProperty(i)) { + // layer already added ! + if (id === leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(cfg[i].layer)) { + delete cfg[i]; + break; + } + } + } + var _config = config || {}; + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(_config, { + layer: layer + }); + cfg.push(_config); + + // layer déjà configuré, il reprend sa place ! + if (!this._layers[id]) { + layer.setZIndex(this._lastZIndex++); + } + this.addOverlay(layer); + this._update(); + }, + /** + * Set the opacity of a layer, and opacity must be a number from 0 to 1. + * + * @param {Object} layer - layer into layerswitcher + * @param {Number} opacity - 0-1. + */ + setOpacity: function setOpacity(layer, opacity) { + logger.trace(layer, opacity); + if (opacity > 1 || opacity < 0) { + return; + } + if (this._map.hasLayer(layer)) { + if (typeof layer.setOpacity !== "undefined") { + layer.setOpacity(opacity); + } else { + // Particularité du format GeoJSON pour l'opacité + layer.options.opacity = opacity; + layer.setStyle({ + fillOpacity: opacity, + opacity: opacity + }); + } + this._updateOpacityDOMLayer(layer); + } + }, + /** + * Set the visibility of a layer. + * + * @param {Object} layer - layer into layerswitcher + * @param {Object} visibility - true/false. + */ + setVisibility: function setVisibility(layer, visibility) { + logger.trace(layer, visibility); + this._layers[leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.stamp(layer)].visibility = visibility; + this._updateVisibilityDOMLayer(layer); + this._updateVisibilityLayer(layer); + } +}); +/* harmony default export */ __webpack_exports__["default"] = (LayerSwitcher); + +/***/ }), +/* 35 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var loglevel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36); +/* harmony import */ var loglevel__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(loglevel__WEBPACK_IMPORTED_MODULE_0__); + + +/** + * @module LoggerByDefault + * @alias [private] LoggerByDefault + * @description + * ... + * + * @example + * getLogger(); + * disableAll(); + * enableAll(); + */ +var LoggerByDefault = { + /** + * creation d'un logger statique + * + * @function getLogger + * @param {String} [name="default"] - the logger name + * @returns {Object} logger + */ + getLogger: function getLogger(name) { + // INFO : + // à la compilation en mode production, on substitue false + // avec "true", ceci desactive les loggers ! + // + // à la compilation en mode developpement, on substitue false + // avec "false", ceci permet d'avoir les loggers actifs ! + // + // lors d'une utilisation en module es6, il n'y a pas de substitution de false, + // les loggers sont donc actifs par defaut ! + // + // > Substitute global constants configured at compile time + // cf. webpack.config.js + // on masque cette constante afin d'eviter "referenceerror not defined" + "false".match(/true/) ? loglevel__WEBPACK_IMPORTED_MODULE_0__["disableAll"]() : loglevel__WEBPACK_IMPORTED_MODULE_0__["enableAll"](); + var logname = name || "default"; + return loglevel__WEBPACK_IMPORTED_MODULE_0__["getLogger"](logname); + }, + /** + * desactive tous les loggers + * @function disableAll + */ + disableAll: function disableAll() { + var loggers = loglevel__WEBPACK_IMPORTED_MODULE_0__["getLoggers"](); + for (var key in loggers) { + if (Object.hasOwnProperty.call(loggers, key)) { + var logger = loggers[key]; + logger.disableAll(); + } + } + }, + /** + * active tous les loggers + * @function enableAll + */ + enableAll: function enableAll() { + var loggers = loglevel__WEBPACK_IMPORTED_MODULE_0__["getLoggers"](); + for (var key in loggers) { + if (Object.hasOwnProperty.call(loggers, key)) { + var logger = loggers[key]; + logger.enableAll(); + } + } + } +}; +/* harmony default export */ __webpack_exports__["default"] = (LoggerByDefault); + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* +* loglevel - https://github.com/pimterry/loglevel +* +* Copyright (c) 2013 Tim Perry +* Licensed under the MIT license. +*/ +(function (root, definition) { + "use strict"; + if (true) { + !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : + __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}(this, function () { + "use strict"; + + // Slightly dubious tricks to cut down minimized file size + var noop = function() {}; + var undefinedType = "undefined"; + var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && ( + /Trident\/|MSIE /.test(window.navigator.userAgent) + ); + + var logMethods = [ + "trace", + "debug", + "info", + "warn", + "error" + ]; + + // Cross-browser bind equivalent that works at least back to IE6 + function bindMethod(obj, methodName) { + var method = obj[methodName]; + if (typeof method.bind === 'function') { + return method.bind(obj); + } else { + try { + return Function.prototype.bind.call(method, obj); + } catch (e) { + // Missing bind shim or IE8 + Modernizr, fallback to wrapping + return function() { + return Function.prototype.apply.apply(method, [obj, arguments]); + }; + } + } + } + + // Trace() doesn't print the message in IE, so for that case we need to wrap it + function traceForIE() { + if (console.log) { + if (console.log.apply) { + console.log.apply(console, arguments); + } else { + // In old IE, native console methods themselves don't have apply(). + Function.prototype.apply.apply(console.log, [console, arguments]); + } + } + if (console.trace) console.trace(); + } + + // Build the best logging method possible for this env + // Wherever possible we want to bind, not wrap, to preserve stack traces + function realMethod(methodName) { + if (methodName === 'debug') { + methodName = 'log'; + } + + if (typeof console === undefinedType) { + return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives + } else if (methodName === 'trace' && isIE) { + return traceForIE; + } else if (console[methodName] !== undefined) { + return bindMethod(console, methodName); + } else if (console.log !== undefined) { + return bindMethod(console, 'log'); + } else { + return noop; + } + } + + // These private functions always need `this` to be set properly + + function replaceLoggingMethods(level, loggerName) { + /*jshint validthis:true */ + for (var i = 0; i < logMethods.length; i++) { + var methodName = logMethods[i]; + this[methodName] = (i < level) ? + noop : + this.methodFactory(methodName, level, loggerName); + } + + // Define log.log as an alias for log.debug + this.log = this.debug; + } + + // In old IE versions, the console isn't present until you first open it. + // We build realMethod() replacements here that regenerate logging methods + function enableLoggingWhenConsoleArrives(methodName, level, loggerName) { + return function () { + if (typeof console !== undefinedType) { + replaceLoggingMethods.call(this, level, loggerName); + this[methodName].apply(this, arguments); + } + }; + } + + // By default, we use closely bound real methods wherever possible, and + // otherwise we wait for a console to appear, and then try again. + function defaultMethodFactory(methodName, level, loggerName) { + /*jshint validthis:true */ + return realMethod(methodName) || + enableLoggingWhenConsoleArrives.apply(this, arguments); + } + + function Logger(name, defaultLevel, factory) { + var self = this; + var currentLevel; + defaultLevel = defaultLevel == null ? "WARN" : defaultLevel; + + var storageKey = "loglevel"; + if (typeof name === "string") { + storageKey += ":" + name; + } else if (typeof name === "symbol") { + storageKey = undefined; + } + + function persistLevelIfPossible(levelNum) { + var levelName = (logMethods[levelNum] || 'silent').toUpperCase(); + + if (typeof window === undefinedType || !storageKey) return; + + // Use localStorage if available + try { + window.localStorage[storageKey] = levelName; + return; + } catch (ignore) {} + + // Use session cookie as fallback + try { + window.document.cookie = + encodeURIComponent(storageKey) + "=" + levelName + ";"; + } catch (ignore) {} + } + + function getPersistedLevel() { + var storedLevel; + + if (typeof window === undefinedType || !storageKey) return; + + try { + storedLevel = window.localStorage[storageKey]; + } catch (ignore) {} + + // Fallback to cookies if local storage gives us nothing + if (typeof storedLevel === undefinedType) { + try { + var cookie = window.document.cookie; + var location = cookie.indexOf( + encodeURIComponent(storageKey) + "="); + if (location !== -1) { + storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1]; + } + } catch (ignore) {} + } + + // If the stored level is not valid, treat it as if nothing was stored. + if (self.levels[storedLevel] === undefined) { + storedLevel = undefined; + } + + return storedLevel; + } + + function clearPersistedLevel() { + if (typeof window === undefinedType || !storageKey) return; + + // Use localStorage if available + try { + window.localStorage.removeItem(storageKey); + return; + } catch (ignore) {} + + // Use session cookie as fallback + try { + window.document.cookie = + encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC"; + } catch (ignore) {} + } + + /* + * + * Public logger API - see https://github.com/pimterry/loglevel for details + * + */ + + self.name = name; + + self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3, + "ERROR": 4, "SILENT": 5}; + + self.methodFactory = factory || defaultMethodFactory; + + self.getLevel = function () { + return currentLevel; + }; + + self.setLevel = function (level, persist) { + if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) { + level = self.levels[level.toUpperCase()]; + } + if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) { + currentLevel = level; + if (persist !== false) { // defaults to true + persistLevelIfPossible(level); + } + replaceLoggingMethods.call(self, level, name); + if (typeof console === undefinedType && level < self.levels.SILENT) { + return "No console available for logging"; + } + } else { + throw "log.setLevel() called with invalid level: " + level; + } + }; + + self.setDefaultLevel = function (level) { + defaultLevel = level; + if (!getPersistedLevel()) { + self.setLevel(level, false); + } + }; + + self.resetLevel = function () { + self.setLevel(defaultLevel, false); + clearPersistedLevel(); + }; + + self.enableAll = function(persist) { + self.setLevel(self.levels.TRACE, persist); + }; + + self.disableAll = function(persist) { + self.setLevel(self.levels.SILENT, persist); + }; + + // Initialize with the right level + var initialLevel = getPersistedLevel(); + if (initialLevel == null) { + initialLevel = defaultLevel; + } + self.setLevel(initialLevel, false); + } + + /* + * + * Top-level API + * + */ + + var defaultLogger = new Logger(); + + var _loggersByName = {}; + defaultLogger.getLogger = function getLogger(name) { + if ((typeof name !== "symbol" && typeof name !== "string") || name === "") { + throw new TypeError("You must supply a name when creating a logger."); + } + + var logger = _loggersByName[name]; + if (!logger) { + logger = _loggersByName[name] = new Logger( + name, defaultLogger.getLevel(), defaultLogger.methodFactory); + } + return logger; + }; + + // Grab the current global log variable in case of overwrite + var _log = (typeof window !== undefinedType) ? window.log : undefined; + defaultLogger.noConflict = function() { + if (typeof window !== undefinedType && + window.log === defaultLogger) { + window.log = _log; + } + + return defaultLogger; + }; + + defaultLogger.getLoggers = function getLoggers() { + return _loggersByName; + }; + + // ES6 default export, for compatibility + defaultLogger['default'] = defaultLogger; + + return defaultLogger; +})); + + +/***/ }), +/* 37 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module SelectorID + * @alias [private] SelectorID + * @description + * formalisme d'un tag ID : + * -> NAME(_ORDER)-1460636385836 + * + * @example + * Ex. + * GProutePoints-1460636385836 + * GProutePoint_10-1460636385836 + */ +var SelectorID = { + /** + * Construction d'un identifiant statique basé sur le timestamp, + * et qui s'incremente de +1 à chaque appel + * @function generate + */ + generate: function () { + var timestamp = Math.floor(Date.now()); + return function () { + return timestamp++; + }; + }(), + /** + * nom du tag + * @function name + * @param {String} id - the id + * @returns {String} index + */ + name: function name(id) { + var name = null; + var i = id.lastIndexOf("-"); + if (i === -1) { + name = id; + } else { + name = id.substring(0, i); + } + return name; + }, + /** + * numero d'identifiant du tag + * + * @function index + * @param {String} id - the id + * @returns {String} index + */ + index: function index(id) { + var index = null; + var name = this.name(id); + // if (name !== id) { + var i = name.lastIndexOf("_"); + if (i !== -1) { + index = name.substring(i + 1); + } + // } + + return index; + }, + /** + * uuid du tag + * + * @function uuid + * @param {String} id - the id + * @returns {String} uuid + */ + uuid: function uuid(id) { + var uuid = null; + var i = id.lastIndexOf("-"); + if (i !== -1) { + uuid = parseInt(id.substring(i + 1), 10); + } + return uuid; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (SelectorID); + +/***/ }), +/* 38 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var sortablejs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39); + +var LayerSwitcherDOM = { + /** + * Creation du drag and drop + * + * @param {Object} elementDraggable - Element HTML (DOM) Container + * @param {Object} context - this + */ + _createDraggableElement: function _createDraggableElement(elementDraggable, context) { + // FIXME retirer cette détection user-agent pour solution propre + // option forcefallback pour réparer sortable sous Chrome 97 + // option forcefallback casse le layerswitcher du portail sous firefox + if (navigator.userAgent.match(/chrome|chromium|crios/i)) { + sortablejs__WEBPACK_IMPORTED_MODULE_0__["default"].create(elementDraggable, { + handle: ".GPlayerName", + draggable: ".draggable-layer", + ghostClass: "GPghostLayer", + animation: 200, + forceFallback: true, + // Call event function on drag and drop + onEnd: function onEnd(e) { + // FIXME pas terrrible, mais il faut bien passer ce contexte... + context._onDragAndDropLayerClick(e); + } + }); + } else { + sortablejs__WEBPACK_IMPORTED_MODULE_0__["default"].create(elementDraggable, { + handle: ".GPlayerName", + draggable: ".draggable-layer", + ghostClass: "GPghostLayer", + animation: 200, + // Call event function on drag and drop + onEnd: function onEnd(e) { + // FIXME pas terrrible, mais il faut bien passer ce contexte... + context._onDragAndDropLayerClick(e); + } + }); + } + }, + // ################################################################### // + // ######################### Main container ########################## // + // ################################################################### // + + /** + * Add uuid to the tag ID + * @param {String} id - id selector + * @returns {String} uid - id selector with an unique id + */ + _addUID: function _addUID(id) { + var uid = this._uid ? id + "-" + this._uid : id; + return uid; + }, + /** + * Creation du container principal (DOM) + * + * @returns {DOMElement} container - layer switcher DOM element + */ + _createMainContainerElement: function _createMainContainerElement() { + var container = document.createElement("div"); + container.id = this._addUID("GPlayerSwitcher"); + container.className = "GPwidget"; + return container; + }, + /** + * Creation du container principal d"affichage des layers (DOM) + * + * @returns {DOMElement} input - element for minimizing/maximizing the layer switcher + */ + _createMainLayersShowElement: function _createMainLayersShowElement() { + // + var input = document.createElement("input"); + input.id = this._addUID("GPshowLayersList"); + input.type = "checkbox"; + return input; + }, + /** + * Creation du container principal des layers (DOM) + * + * @returns {DOMElement} container - layers list container + */ + _createMainLayersElement: function _createMainLayersElement() { + // ajout de la liste des layers dans le container principal + //
    + // (...) + //
    + var div = document.createElement("div"); + div.id = this._addUID("GPlayersList"); + div.className = "GPpanel"; + return div; + }, + /** + * Creation du container du picto du controle (DOM) + * + * @returns {DOMElement} label + */ + _createMainPictoElement: function _createMainPictoElement() { + var self = this; + + // exemple : + // + // + + var label = document.createElement("label"); + label.id = this._addUID("GPshowLayersListPicto"); + label.className = "GPshowAdvancedToolPicto"; + label.htmlFor = this._addUID("GPshowLayersList"); + label.title = "Afficher/masquer le gestionnaire de couches"; + var spanOpen = document.createElement("span"); + spanOpen.id = this._addUID("GPshowLayersListOpen"); + spanOpen.className = "GPshowAdvancedToolOpen"; + spanOpen.addEventListener("click", function () { + if (document.getElementById(self._addUID("GPshowLayersList")).checked) { + var layers = document.getElementsByClassName("GPlayerInfoOpened"); + for (var i = 0; i < layers.length; i++) { + layers[i].className = "GPlayerInfo"; + } + document.getElementById(self._addUID("GPlayerInfoPanel")).className = "GPlayerInfoPanelClosed"; + } + }); + label.appendChild(spanOpen); + var spanClose = document.createElement("span"); + spanClose.addEventListener("click", function () { + if (document.getElementById(self._addUID("GPshowLayersList")).checked) { + var layers = document.getElementsByClassName("GPlayerInfoOpened"); + for (var i = 0; i < layers.length; i++) { + layers[i].className = "GPlayerInfo"; + } + document.getElementById(self._addUID("GPlayerInfoPanel")).className = "GPlayerInfoPanelClosed"; + } + }); + spanClose.id = self._addUID("GPshowLayersListClose"); + label.appendChild(spanClose); + return label; + }, + /** + * Creation du container du panneau d"information (DOM) + * + * @returns {DOMElement} container + */ + _createMainInfoElement: function _createMainInfoElement() { + // gestion du panneau d"information dans le container principal + //
    ...
    + var div = document.createElement("div"); + div.id = this._addUID("GPlayerInfoPanel"); + div.className = "GPpanel GPlayerInfoPanelClosed"; + return div; + }, + // ################################################################### // + // ######################### Layer container ######################### // + // ################################################################### // + + /** + * Creation du container du layer (DOM) + * + * @param {Object} obj - options de la couche à ajouter dans le layer switcher + * @param {Object} obj.layer - couche (ol ou leaflet) + * @param {String} obj.id - identifiant de la couche (pour ol ou leaflet) + * @param {String} obj.title - nom de la couche à afficher dans le controle + * @param {String} obj.description - description de la couche à afficher + * @param {Boolean} obj.visibility - visibilité de la couche dans la carte (true or false) + * @param {Float} obj.opacity - opacité de la couche + * + * @returns {DOMElement} container + */ + _createContainerLayerElement: function _createContainerLayerElement(obj) { + // exemple : + //
    + // + // + // + //
    + + // + // + var container = document.createElement("div"); + container.id = this._addUID("GPlayerSwitcher_ID_" + obj.id); + container.className = "GPlayerSwitcher_layer draggable-layer"; + + // ajout des outils basiques (visibility / layer name) + container.appendChild(this._createBasicToolElement(obj)); + + // liste des outils avancés (layer info / opacity slider / opacity value / removal) + var array = this._createAdvancedToolShowElement(obj); + for (var i = 0; i < array.length; i++) { + container.appendChild(array[i]); + } + + // ajout des outils avancés + container.appendChild(this._createAdvancedToolElement(obj)); + return container; + }, + // ################################################################### // + // ############################ Layer tool ########################### // + // ################################################################### // + + /** + * Creation du container des outils basiques du layer (DOM) + * + * @param {Object} obj - options de la couche à ajouter dans le layer switcher + * + * @returns {DOMElement} container + */ + _createBasicToolElement: function _createBasicToolElement(obj) { + // exemple : + //
    + // + // + //
    + + var div = document.createElement("div"); + div.id = this._addUID("GPbasicTools_ID_" + obj.id); + div.className = "GPlayerBasicTools"; + div.appendChild(this._createBasicToolNameElement(obj)); + var array = this._createBasicToolVisibilityElement(obj); + for (var i = 0; i < array.length; i++) { + div.appendChild(array[i]); + } + return div; + }, + /** + * Creation du nom du layer (DOM) + * + * @param {Object} obj - options de la couche à ajouter dans le layer switcher + * + * @returns {DOMElement} container + */ + _createBasicToolNameElement: function _createBasicToolNameElement(obj) { + // exemple : + // Quartiers prioritaires de la ville + var span = document.createElement("span"); + span.id = this._addUID("GPname_ID_" + obj.id); + span.className = "GPlayerName"; + span.title = obj.description || obj.title; + span.innerHTML = obj.title; + return span; + }, + /** + * Creation de l'icone de visibilité du layer (DOM) + * + * @param {Object} obj - options de la couche à ajouter dans le layer switcher + * @returns {DOMElement[]} array containing input and label elements + */ + _createBasicToolVisibilityElement: function _createBasicToolVisibilityElement(obj) { + // exemple : + // + // + + var list = []; + var checked = typeof obj.visibility !== "undefined" ? obj.visibility : true; + var id = this._addUID("GPvisibility_ID_" + obj.id); + var input = document.createElement("input"); + input.id = id; + input.type = "checkbox"; + input.checked = checked; + var label = document.createElement("label"); + label.htmlFor = id; + label.id = this._addUID("GPvisibilityPicto_ID_" + obj.id); + label.className = "GPlayerVisibility"; + label.title = "Afficher/masquer la couche"; + + // add event for visibility change + var context = this; + if (input.addEventListener) { + input.addEventListener("click", function (e) { + context._onVisibilityLayerClick(e); + }); + } else if (input.attachEvent) { + // internet explorer + input.attachEvent("onclick", function (e) { + context._onVisibilityLayerClick(e); + }); + } + list.push(input); + list.push(label); + return list; + }, + /** + * Creation de l'affichage du menu des outils avancés du layer (DOM) + * + * @param {Object} obj - options de la couche à ajouter dans le layer switcher + * + * @returns {DOMElement[]} array containing input and label elements + */ + _createAdvancedToolShowElement: function _createAdvancedToolShowElement(obj) { + // + // + + var list = []; + var label = document.createElement("label"); + label.id = this._addUID("GPshowAdvancedToolsPicto_ID_" + obj.id); + label.htmlFor = this._addUID("GPshowAdvancedTools_ID_" + obj.id); + label.title = "Plus d'outils"; + label.className = "GPshowMoreOptions GPshowLayerAdvancedTools"; + var input = document.createElement("input"); + input.type = "checkbox"; + input.id = this._addUID("GPshowAdvancedTools_ID_" + obj.id); + list.push(input); + list.push(label); + return list; + }, + /** + * Creation du container des outils avancés du layer (DOM) + * + * @param {Object} obj - options de la couche à ajouter dans le layer switcher + * + * @returns {DOMElement} container + */ + _createAdvancedToolElement: function _createAdvancedToolElement(obj) { + // exemple : + //
    + // + // + // + //
    + + var container = document.createElement("div"); + container.id = this._addUID("GPadvancedTools_ID_" + obj.id); + container.className = "GPlayerAdvancedTools"; + container.appendChild(this._createAdvancedToolDeleteElement(obj)); + + // si on n'a de l'informations à afficher, on met en place ce composant + if (obj.title && obj.description) { + container.appendChild(this._createAdvancedToolInformationElement(obj)); + } + if (obj.type !== "feature") { + var array = this._createAdvancedToolOpacityElement(obj); + for (var i = 0; i < array.length; i++) { + container.appendChild(array[i]); + } + } + return container; + }, + /** + * Creation de l'icone de suppression du layer (DOM) + * + * @param {Object} obj - options de la couche à ajouter dans le layer switcher + * + * @returns {DOMElement} container + */ + _createAdvancedToolDeleteElement: function _createAdvancedToolDeleteElement(obj) { + // exemple : + //
    + + var div = document.createElement("div"); + div.id = this._addUID("GPremove_ID_" + obj.id); + div.className = "GPlayerRemove"; + div.title = "Supprimer la couche"; + div.layerId = obj.id; + var context = this; + if (div.addEventListener) { + div.addEventListener("click", function (e) { + context._onDropLayerClick(e); + }); + } else if (div.attachEvent) { + // internet explorer + div.attachEvent("onclick", function (e) { + context._onDropLayerClick(e); + }); + } + return div; + }, + /** + * Creation de l'icone d'information du layer (DOM) + * + * @param {Object} obj - options de la couche à ajouter dans le layer switcher + * + * @returns {DOMElement} container + */ + _createAdvancedToolInformationElement: function _createAdvancedToolInformationElement(obj) { + // exemple : + //
    + + var div = document.createElement("div"); + div.id = this._addUID("GPinfo_ID_" + obj.id); + div.className = "GPlayerInfo"; + div.title = "Informations/légende"; + div.layerId = obj.id; + // add event on click + var context = this; + if (div.addEventListener) { + div.addEventListener("click", function (e) { + context._onOpenLayerInfoClick(e); + }); + } else if (div.attachEvent) { + // internet explorer + div.attachEvent("onclick", function (e) { + context._onOpenLayerInfoClick(e); + }); + } + return div; + }, + /** + * Creation de l'icone de gestion de l'opacité du layer (DOM) + * + * @param {Object} obj - options de la couche à ajouter dans le layer switcher + * + * @returns {DOMElement[]} array of two containers + */ + _createAdvancedToolOpacityElement: function _createAdvancedToolOpacityElement(obj) { + // exemple : + //
    + // + //
    + //
    + // 100 + // % + //
    + + var list = []; + + // curseur pour changer l'opacité + var divO = document.createElement("div"); + divO.id = this._addUID("GPopacity_ID_" + obj.id); + divO.className = "GPlayerOpacity"; + divO.title = "Opacité"; + var opacity = typeof obj.opacity !== "undefined" ? obj.opacity : 1; + opacity = Math.round(opacity * 100); + var input = document.createElement("input"); + input.id = this._addUID("GPopacityValueDiv_ID_" + obj.id); + input.type = "range"; + input.value = opacity; + + // add event for opacity change + var context = this; + if (input.addEventListener) { + input.addEventListener("change", function (e) { + context._onChangeLayerOpacity(e); + }); + } else if (input.attachEvent) { + // internet explorer + input.attachEvent("onchange", function (e) { + context._onChangeLayerOpacity(e); + }); + } + if (input.addEventListener) { + input.addEventListener("input", function (e) { + context._onChangeLayerOpacity(e); + }); + } else if (input.attachEvent) { + // internet explorer + input.attachEvent("oninput", function (e) { + context._onChangeLayerOpacity(e); + }); + } + divO.appendChild(input); + + // Valeur d'opacité + var divC = document.createElement("div"); + divC.id = this._addUID("GPopacityValueDiv_ID_" + obj.id); + divC.className = "GPlayerOpacityValue"; + var span = document.createElement("span"); + span.id = this._addUID("GPopacityValue_ID_" + obj.id); + span.innerHTML = opacity + "%"; + divC.appendChild(span); + list.push(divO); + list.push(divC); + return list; + }, + // ################################################################### // + // ############################ Layer info ########################### // + // ################################################################### // + + /** + * Creation du container du layer info (DOM) + * + * TODO GPlayerInfoPopup : ??? + * TODO GPlayerInfoLink : mettre en forme les échelles ! + * + * @param {Object} obj - options de la couche à ajouter dans le layer switcher + * + * @returns {DOMElement} container + */ + _createContainerLayerInfoElement: function _createContainerLayerInfoElement(obj) { + var container = document.createElement("div"); + container.id = this._addUID("GPlayerInfoContent"); + var title = document.createElement("div"); + title.id = this._addUID("GPlayerInfoTitle"); + title.innerHTML = obj.title; + container.appendChild(title); + if (obj.quicklookUrl) { + var quick = document.createElement("div"); + quick.id = this._addUID("GPlayerInfoQuicklook"); + quick.title = "Afficher un aperçu de la couche"; + var refquick = document.createElement("a"); + refquick.href = obj.quicklookUrl; + refquick.appendChild(quick); + container.appendChild(refquick); + } + var close = document.createElement("div"); + close.id = this._addUID("GPlayerInfoClose"); + close.title = "Fermer la fenêtre"; + var self = this; + /** Call event function on close click */ + var onCloseClick = function onCloseClick() { + document.getElementById(self._addUID("GPlayerInfoPanel")).className = "GPlayerInfoPanelClosed"; + var layers = document.getElementsByClassName("GPlayerInfoOpened"); + for (var i = 0; i < layers.length; i++) { + layers[i].className = "GPlayerInfo"; + } + }; + if (close.addEventListener) { + close.addEventListener("click", onCloseClick); + } else if (close.attachEvent) { + // internet explorer + close.attachEvent("onclick", onCloseClick); + } + container.appendChild(close); + var desc = document.createElement("div"); + desc.id = this._addUID("GPlayerInfoDescription"); + desc.innerHTML = obj.description; + container.appendChild(desc); + if (obj.metadata) { + var mtd = document.createElement("div"); + mtd.id = this._addUID("GPlayerInfoMetadata"); + var mtdtitle = document.createElement("div"); + mtdtitle.className = "GPlayerInfoSubtitle"; + mtdtitle.innerHTML = "Métadonnées"; + mtd.appendChild(mtdtitle); + for (var i = 0; i < obj.metadata.length; i++) { + var urlmtd = obj.metadata[i].url; + var mtdlink = document.createElement("div"); + mtdlink.className = "GPlayerInfoLink"; + var refmtd = document.createElement("a"); + refmtd.href = urlmtd; + refmtd.innerHTML = urlmtd; + mtdlink.appendChild(refmtd); + mtd.appendChild(mtdlink); + } + if (obj.metadata.length !== 0) { + container.appendChild(mtd); + } + } + if (obj.legends) { + var lgd = document.createElement("div"); + lgd.id = this._addUID("GPlayerInfoLegend"); + var lgdtitle = document.createElement("div"); + lgdtitle.className = "GPlayerInfoSubtitle"; + lgdtitle.innerHTML = "Légende"; + lgd.appendChild(lgdtitle); + var legends = {}; + var maxScale = obj.maxScaleDenominator || 560000000; + + // on crée un tableau temporaire pour ordonner les légendes selon le dénominateur d'échelle + for (var k = 0; k < obj.legends.length; k++) { + var minScale = obj.legends[k].minScaleDenominator; + if (minScale) { + var s = minScale.toString(); + minScale = Math.round(parseInt(s.substring(0, 3), 10) / 10) * Math.pow(10, s.length - 2); + } else { + minScale = 270; + } + legends[minScale] = obj.legends[k]; + } + for (var scale in legends) { + if (legends.hasOwnProperty(scale)) { + var urllgd = legends[scale].url; + // on n'affiche pas les légendes pointant vers "nolegend.jpg" + if (typeof urllgd === "string" && urllgd.toLowerCase().indexOf("nolegend.jpg") === -1) { + // TODO GPlayerInfoPopup + var lgdlink = document.createElement("div"); + lgdlink.className = "GPlayerInfoLink"; + maxScale = legends[scale].maxScaleDenominator || maxScale; + var reflgd = document.createElement("a"); + reflgd.href = urllgd; + reflgd.innerHTML = "Du 1/" + scale + " au 1/" + maxScale; + lgdlink.appendChild(reflgd); + lgd.appendChild(lgdlink); + } else { + delete legends[scale]; + } + } + } + if (Object.keys(legends).length !== 0) { + container.appendChild(lgd); + } + } + return container; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (LayerSwitcherDOM); + +/***/ }), +/* 39 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiDrag", function() { return MultiDragPlugin; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sortable", function() { return Sortable; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Swap", function() { return SwapPlugin; }); +/**! + * Sortable 1.14.0 + * @author RubaXa + * @author owenm + * @license MIT + */ +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); +} + +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + + var target = _objectWithoutPropertiesLoose(source, excluded); + + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); +} + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); +} + +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +var version = "1.14.0"; + +function userAgent(pattern) { + if (typeof window !== 'undefined' && window.navigator) { + return !! /*@__PURE__*/navigator.userAgent.match(pattern); + } +} + +var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i); +var Edge = userAgent(/Edge/i); +var FireFox = userAgent(/firefox/i); +var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i); +var IOS = userAgent(/iP(ad|od|hone)/i); +var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i); + +var captureMode = { + capture: false, + passive: false +}; + +function on(el, event, fn) { + el.addEventListener(event, fn, !IE11OrLess && captureMode); +} + +function off(el, event, fn) { + el.removeEventListener(event, fn, !IE11OrLess && captureMode); +} + +function matches( +/**HTMLElement*/ +el, +/**String*/ +selector) { + if (!selector) return; + selector[0] === '>' && (selector = selector.substring(1)); + + if (el) { + try { + if (el.matches) { + return el.matches(selector); + } else if (el.msMatchesSelector) { + return el.msMatchesSelector(selector); + } else if (el.webkitMatchesSelector) { + return el.webkitMatchesSelector(selector); + } + } catch (_) { + return false; + } + } + + return false; +} + +function getParentOrHost(el) { + return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode; +} + +function closest( +/**HTMLElement*/ +el, +/**String*/ +selector, +/**HTMLElement*/ +ctx, includeCTX) { + if (el) { + ctx = ctx || document; + + do { + if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) { + return el; + } + + if (el === ctx) break; + /* jshint boss:true */ + } while (el = getParentOrHost(el)); + } + + return null; +} + +var R_SPACE = /\s+/g; + +function toggleClass(el, name, state) { + if (el && name) { + if (el.classList) { + el.classList[state ? 'add' : 'remove'](name); + } else { + var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' '); + el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' '); + } + } +} + +function css(el, prop, val) { + var style = el && el.style; + + if (style) { + if (val === void 0) { + if (document.defaultView && document.defaultView.getComputedStyle) { + val = document.defaultView.getComputedStyle(el, ''); + } else if (el.currentStyle) { + val = el.currentStyle; + } + + return prop === void 0 ? val : val[prop]; + } else { + if (!(prop in style) && prop.indexOf('webkit') === -1) { + prop = '-webkit-' + prop; + } + + style[prop] = val + (typeof val === 'string' ? '' : 'px'); + } + } +} + +function matrix(el, selfOnly) { + var appliedTransforms = ''; + + if (typeof el === 'string') { + appliedTransforms = el; + } else { + do { + var transform = css(el, 'transform'); + + if (transform && transform !== 'none') { + appliedTransforms = transform + ' ' + appliedTransforms; + } + /* jshint boss:true */ + + } while (!selfOnly && (el = el.parentNode)); + } + + var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix; + /*jshint -W056 */ + + return matrixFn && new matrixFn(appliedTransforms); +} + +function find(ctx, tagName, iterator) { + if (ctx) { + var list = ctx.getElementsByTagName(tagName), + i = 0, + n = list.length; + + if (iterator) { + for (; i < n; i++) { + iterator(list[i], i); + } + } + + return list; + } + + return []; +} + +function getWindowScrollingElement() { + var scrollingElement = document.scrollingElement; + + if (scrollingElement) { + return scrollingElement; + } else { + return document.documentElement; + } +} +/** + * Returns the "bounding client rect" of given element + * @param {HTMLElement} el The element whose boundingClientRect is wanted + * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container + * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr + * @param {[Boolean]} undoScale Whether the container's scale() should be undone + * @param {[HTMLElement]} container The parent the element will be placed in + * @return {Object} The boundingClientRect of el, with specified adjustments + */ + + +function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) { + if (!el.getBoundingClientRect && el !== window) return; + var elRect, top, left, bottom, right, height, width; + + if (el !== window && el.parentNode && el !== getWindowScrollingElement()) { + elRect = el.getBoundingClientRect(); + top = elRect.top; + left = elRect.left; + bottom = elRect.bottom; + right = elRect.right; + height = elRect.height; + width = elRect.width; + } else { + top = 0; + left = 0; + bottom = window.innerHeight; + right = window.innerWidth; + height = window.innerHeight; + width = window.innerWidth; + } + + if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) { + // Adjust for translate() + container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312) + // Not needed on <= IE11 + + if (!IE11OrLess) { + do { + if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) { + var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container + + top -= containerRect.top + parseInt(css(container, 'border-top-width')); + left -= containerRect.left + parseInt(css(container, 'border-left-width')); + bottom = top + elRect.height; + right = left + elRect.width; + break; + } + /* jshint boss:true */ + + } while (container = container.parentNode); + } + } + + if (undoScale && el !== window) { + // Adjust for scale() + var elMatrix = matrix(container || el), + scaleX = elMatrix && elMatrix.a, + scaleY = elMatrix && elMatrix.d; + + if (elMatrix) { + top /= scaleY; + left /= scaleX; + width /= scaleX; + height /= scaleY; + bottom = top + height; + right = left + width; + } + } + + return { + top: top, + left: left, + bottom: bottom, + right: right, + width: width, + height: height + }; +} +/** + * Checks if a side of an element is scrolled past a side of its parents + * @param {HTMLElement} el The element who's side being scrolled out of view is in question + * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom') + * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom') + * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element + */ + + +function isScrolledPast(el, elSide, parentSide) { + var parent = getParentAutoScrollElement(el, true), + elSideVal = getRect(el)[elSide]; + /* jshint boss:true */ + + while (parent) { + var parentSideVal = getRect(parent)[parentSide], + visible = void 0; + + if (parentSide === 'top' || parentSide === 'left') { + visible = elSideVal >= parentSideVal; + } else { + visible = elSideVal <= parentSideVal; + } + + if (!visible) return parent; + if (parent === getWindowScrollingElement()) break; + parent = getParentAutoScrollElement(parent, false); + } + + return false; +} +/** + * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible) + * and non-draggable elements + * @param {HTMLElement} el The parent element + * @param {Number} childNum The index of the child + * @param {Object} options Parent Sortable's options + * @return {HTMLElement} The child at index childNum, or null if not found + */ + + +function getChild(el, childNum, options, includeDragEl) { + var currentChild = 0, + i = 0, + children = el.children; + + while (i < children.length) { + if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) { + if (currentChild === childNum) { + return children[i]; + } + + currentChild++; + } + + i++; + } + + return null; +} +/** + * Gets the last child in the el, ignoring ghostEl or invisible elements (clones) + * @param {HTMLElement} el Parent element + * @param {selector} selector Any other elements that should be ignored + * @return {HTMLElement} The last child, ignoring ghostEl + */ + + +function lastChild(el, selector) { + var last = el.lastElementChild; + + while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) { + last = last.previousElementSibling; + } + + return last || null; +} +/** + * Returns the index of an element within its parent for a selected set of + * elements + * @param {HTMLElement} el + * @param {selector} selector + * @return {number} + */ + + +function index(el, selector) { + var index = 0; + + if (!el || !el.parentNode) { + return -1; + } + /* jshint boss:true */ + + + while (el = el.previousElementSibling) { + if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) { + index++; + } + } + + return index; +} +/** + * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements. + * The value is returned in real pixels. + * @param {HTMLElement} el + * @return {Array} Offsets in the format of [left, top] + */ + + +function getRelativeScrollOffset(el) { + var offsetLeft = 0, + offsetTop = 0, + winScroller = getWindowScrollingElement(); + + if (el) { + do { + var elMatrix = matrix(el), + scaleX = elMatrix.a, + scaleY = elMatrix.d; + offsetLeft += el.scrollLeft * scaleX; + offsetTop += el.scrollTop * scaleY; + } while (el !== winScroller && (el = el.parentNode)); + } + + return [offsetLeft, offsetTop]; +} +/** + * Returns the index of the object within the given array + * @param {Array} arr Array that may or may not hold the object + * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find + * @return {Number} The index of the object in the array, or -1 + */ + + +function indexOfObject(arr, obj) { + for (var i in arr) { + if (!arr.hasOwnProperty(i)) continue; + + for (var key in obj) { + if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i); + } + } + + return -1; +} + +function getParentAutoScrollElement(el, includeSelf) { + // skip to window + if (!el || !el.getBoundingClientRect) return getWindowScrollingElement(); + var elem = el; + var gotSelf = false; + + do { + // we don't need to get elem css if it isn't even overflowing in the first place (performance) + if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) { + var elemCSS = css(elem); + + if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) { + if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement(); + if (gotSelf || includeSelf) return elem; + gotSelf = true; + } + } + /* jshint boss:true */ + + } while (elem = elem.parentNode); + + return getWindowScrollingElement(); +} + +function extend(dst, src) { + if (dst && src) { + for (var key in src) { + if (src.hasOwnProperty(key)) { + dst[key] = src[key]; + } + } + } + + return dst; +} + +function isRectEqual(rect1, rect2) { + return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width); +} + +var _throttleTimeout; + +function throttle(callback, ms) { + return function () { + if (!_throttleTimeout) { + var args = arguments, + _this = this; + + if (args.length === 1) { + callback.call(_this, args[0]); + } else { + callback.apply(_this, args); + } + + _throttleTimeout = setTimeout(function () { + _throttleTimeout = void 0; + }, ms); + } + }; +} + +function cancelThrottle() { + clearTimeout(_throttleTimeout); + _throttleTimeout = void 0; +} + +function scrollBy(el, x, y) { + el.scrollLeft += x; + el.scrollTop += y; +} + +function clone(el) { + var Polymer = window.Polymer; + var $ = window.jQuery || window.Zepto; + + if (Polymer && Polymer.dom) { + return Polymer.dom(el).cloneNode(true); + } else if ($) { + return $(el).clone(true)[0]; + } else { + return el.cloneNode(true); + } +} + +function setRect(el, rect) { + css(el, 'position', 'absolute'); + css(el, 'top', rect.top); + css(el, 'left', rect.left); + css(el, 'width', rect.width); + css(el, 'height', rect.height); +} + +function unsetRect(el) { + css(el, 'position', ''); + css(el, 'top', ''); + css(el, 'left', ''); + css(el, 'width', ''); + css(el, 'height', ''); +} + +var expando = 'Sortable' + new Date().getTime(); + +function AnimationStateManager() { + var animationStates = [], + animationCallbackId; + return { + captureAnimationState: function captureAnimationState() { + animationStates = []; + if (!this.options.animation) return; + var children = [].slice.call(this.el.children); + children.forEach(function (child) { + if (css(child, 'display') === 'none' || child === Sortable.ghost) return; + animationStates.push({ + target: child, + rect: getRect(child) + }); + + var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation + + + if (child.thisAnimationDuration) { + var childMatrix = matrix(child, true); + + if (childMatrix) { + fromRect.top -= childMatrix.f; + fromRect.left -= childMatrix.e; + } + } + + child.fromRect = fromRect; + }); + }, + addAnimationState: function addAnimationState(state) { + animationStates.push(state); + }, + removeAnimationState: function removeAnimationState(target) { + animationStates.splice(indexOfObject(animationStates, { + target: target + }), 1); + }, + animateAll: function animateAll(callback) { + var _this = this; + + if (!this.options.animation) { + clearTimeout(animationCallbackId); + if (typeof callback === 'function') callback(); + return; + } + + var animating = false, + animationTime = 0; + animationStates.forEach(function (state) { + var time = 0, + target = state.target, + fromRect = target.fromRect, + toRect = getRect(target), + prevFromRect = target.prevFromRect, + prevToRect = target.prevToRect, + animatingRect = state.rect, + targetMatrix = matrix(target, true); + + if (targetMatrix) { + // Compensate for current animation + toRect.top -= targetMatrix.f; + toRect.left -= targetMatrix.e; + } + + target.toRect = toRect; + + if (target.thisAnimationDuration) { + // Could also check if animatingRect is between fromRect and toRect + if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect + (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) { + // If returning to same place as started from animation and on same axis + time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options); + } + } // if fromRect != toRect: animate + + + if (!isRectEqual(toRect, fromRect)) { + target.prevFromRect = fromRect; + target.prevToRect = toRect; + + if (!time) { + time = _this.options.animation; + } + + _this.animate(target, animatingRect, toRect, time); + } + + if (time) { + animating = true; + animationTime = Math.max(animationTime, time); + clearTimeout(target.animationResetTimer); + target.animationResetTimer = setTimeout(function () { + target.animationTime = 0; + target.prevFromRect = null; + target.fromRect = null; + target.prevToRect = null; + target.thisAnimationDuration = null; + }, time); + target.thisAnimationDuration = time; + } + }); + clearTimeout(animationCallbackId); + + if (!animating) { + if (typeof callback === 'function') callback(); + } else { + animationCallbackId = setTimeout(function () { + if (typeof callback === 'function') callback(); + }, animationTime); + } + + animationStates = []; + }, + animate: function animate(target, currentRect, toRect, duration) { + if (duration) { + css(target, 'transition', ''); + css(target, 'transform', ''); + var elMatrix = matrix(this.el), + scaleX = elMatrix && elMatrix.a, + scaleY = elMatrix && elMatrix.d, + translateX = (currentRect.left - toRect.left) / (scaleX || 1), + translateY = (currentRect.top - toRect.top) / (scaleY || 1); + target.animatingX = !!translateX; + target.animatingY = !!translateY; + css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)'); + this.forRepaintDummy = repaint(target); // repaint + + css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : '')); + css(target, 'transform', 'translate3d(0,0,0)'); + typeof target.animated === 'number' && clearTimeout(target.animated); + target.animated = setTimeout(function () { + css(target, 'transition', ''); + css(target, 'transform', ''); + target.animated = false; + target.animatingX = false; + target.animatingY = false; + }, duration); + } + } + }; +} + +function repaint(target) { + return target.offsetWidth; +} + +function calculateRealTime(animatingRect, fromRect, toRect, options) { + return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation; +} + +var plugins = []; +var defaults = { + initializeByDefault: true +}; +var PluginManager = { + mount: function mount(plugin) { + // Set default static properties + for (var option in defaults) { + if (defaults.hasOwnProperty(option) && !(option in plugin)) { + plugin[option] = defaults[option]; + } + } + + plugins.forEach(function (p) { + if (p.pluginName === plugin.pluginName) { + throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once"); + } + }); + plugins.push(plugin); + }, + pluginEvent: function pluginEvent(eventName, sortable, evt) { + var _this = this; + + this.eventCanceled = false; + + evt.cancel = function () { + _this.eventCanceled = true; + }; + + var eventNameGlobal = eventName + 'Global'; + plugins.forEach(function (plugin) { + if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable + + if (sortable[plugin.pluginName][eventNameGlobal]) { + sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({ + sortable: sortable + }, evt)); + } // Only fire plugin event if plugin is enabled in this sortable, + // and plugin has event defined + + + if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) { + sortable[plugin.pluginName][eventName](_objectSpread2({ + sortable: sortable + }, evt)); + } + }); + }, + initializePlugins: function initializePlugins(sortable, el, defaults, options) { + plugins.forEach(function (plugin) { + var pluginName = plugin.pluginName; + if (!sortable.options[pluginName] && !plugin.initializeByDefault) return; + var initialized = new plugin(sortable, el, sortable.options); + initialized.sortable = sortable; + initialized.options = sortable.options; + sortable[pluginName] = initialized; // Add default options from plugin + + _extends(defaults, initialized.defaults); + }); + + for (var option in sortable.options) { + if (!sortable.options.hasOwnProperty(option)) continue; + var modified = this.modifyOption(sortable, option, sortable.options[option]); + + if (typeof modified !== 'undefined') { + sortable.options[option] = modified; + } + } + }, + getEventProperties: function getEventProperties(name, sortable) { + var eventProperties = {}; + plugins.forEach(function (plugin) { + if (typeof plugin.eventProperties !== 'function') return; + + _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name)); + }); + return eventProperties; + }, + modifyOption: function modifyOption(sortable, name, value) { + var modifiedValue; + plugins.forEach(function (plugin) { + // Plugin must exist on the Sortable + if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin + + if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') { + modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value); + } + }); + return modifiedValue; + } +}; + +function dispatchEvent(_ref) { + var sortable = _ref.sortable, + rootEl = _ref.rootEl, + name = _ref.name, + targetEl = _ref.targetEl, + cloneEl = _ref.cloneEl, + toEl = _ref.toEl, + fromEl = _ref.fromEl, + oldIndex = _ref.oldIndex, + newIndex = _ref.newIndex, + oldDraggableIndex = _ref.oldDraggableIndex, + newDraggableIndex = _ref.newDraggableIndex, + originalEvent = _ref.originalEvent, + putSortable = _ref.putSortable, + extraEventProperties = _ref.extraEventProperties; + sortable = sortable || rootEl && rootEl[expando]; + if (!sortable) return; + var evt, + options = sortable.options, + onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature + + if (window.CustomEvent && !IE11OrLess && !Edge) { + evt = new CustomEvent(name, { + bubbles: true, + cancelable: true + }); + } else { + evt = document.createEvent('Event'); + evt.initEvent(name, true, true); + } + + evt.to = toEl || rootEl; + evt.from = fromEl || rootEl; + evt.item = targetEl || rootEl; + evt.clone = cloneEl; + evt.oldIndex = oldIndex; + evt.newIndex = newIndex; + evt.oldDraggableIndex = oldDraggableIndex; + evt.newDraggableIndex = newDraggableIndex; + evt.originalEvent = originalEvent; + evt.pullMode = putSortable ? putSortable.lastPutMode : undefined; + + var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable)); + + for (var option in allEventProperties) { + evt[option] = allEventProperties[option]; + } + + if (rootEl) { + rootEl.dispatchEvent(evt); + } + + if (options[onName]) { + options[onName].call(sortable, evt); + } +} + +var _excluded = ["evt"]; + +var pluginEvent = function pluginEvent(eventName, sortable) { + var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + originalEvent = _ref.evt, + data = _objectWithoutProperties(_ref, _excluded); + + PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({ + dragEl: dragEl, + parentEl: parentEl, + ghostEl: ghostEl, + rootEl: rootEl, + nextEl: nextEl, + lastDownEl: lastDownEl, + cloneEl: cloneEl, + cloneHidden: cloneHidden, + dragStarted: moved, + putSortable: putSortable, + activeSortable: Sortable.active, + originalEvent: originalEvent, + oldIndex: oldIndex, + oldDraggableIndex: oldDraggableIndex, + newIndex: newIndex, + newDraggableIndex: newDraggableIndex, + hideGhostForTarget: _hideGhostForTarget, + unhideGhostForTarget: _unhideGhostForTarget, + cloneNowHidden: function cloneNowHidden() { + cloneHidden = true; + }, + cloneNowShown: function cloneNowShown() { + cloneHidden = false; + }, + dispatchSortableEvent: function dispatchSortableEvent(name) { + _dispatchEvent({ + sortable: sortable, + name: name, + originalEvent: originalEvent + }); + } + }, data)); +}; + +function _dispatchEvent(info) { + dispatchEvent(_objectSpread2({ + putSortable: putSortable, + cloneEl: cloneEl, + targetEl: dragEl, + rootEl: rootEl, + oldIndex: oldIndex, + oldDraggableIndex: oldDraggableIndex, + newIndex: newIndex, + newDraggableIndex: newDraggableIndex + }, info)); +} + +var dragEl, + parentEl, + ghostEl, + rootEl, + nextEl, + lastDownEl, + cloneEl, + cloneHidden, + oldIndex, + newIndex, + oldDraggableIndex, + newDraggableIndex, + activeGroup, + putSortable, + awaitingDragStarted = false, + ignoreNextClick = false, + sortables = [], + tapEvt, + touchEvt, + lastDx, + lastDy, + tapDistanceLeft, + tapDistanceTop, + moved, + lastTarget, + lastDirection, + pastFirstInvertThresh = false, + isCircumstantialInvert = false, + targetMoveDistance, + // For positioning ghost absolutely +ghostRelativeParent, + ghostRelativeParentInitialScroll = [], + // (left, top) +_silent = false, + savedInputChecked = []; +/** @const */ + +var documentExists = typeof document !== 'undefined', + PositionGhostAbsolutely = IOS, + CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float', + // This will not pass for IE9, because IE9 DnD only works on anchors +supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'), + supportCssPointerEvents = function () { + if (!documentExists) return; // false when <= IE11 + + if (IE11OrLess) { + return false; + } + + var el = document.createElement('x'); + el.style.cssText = 'pointer-events:auto'; + return el.style.pointerEvents === 'auto'; +}(), + _detectDirection = function _detectDirection(el, options) { + var elCSS = css(el), + elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth), + child1 = getChild(el, 0, options), + child2 = getChild(el, 1, options), + firstChildCSS = child1 && css(child1), + secondChildCSS = child2 && css(child2), + firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width, + secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width; + + if (elCSS.display === 'flex') { + return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal'; + } + + if (elCSS.display === 'grid') { + return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal'; + } + + if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') { + var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right'; + return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal'; + } + + return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal'; +}, + _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) { + var dragElS1Opp = vertical ? dragRect.left : dragRect.top, + dragElS2Opp = vertical ? dragRect.right : dragRect.bottom, + dragElOppLength = vertical ? dragRect.width : dragRect.height, + targetS1Opp = vertical ? targetRect.left : targetRect.top, + targetS2Opp = vertical ? targetRect.right : targetRect.bottom, + targetOppLength = vertical ? targetRect.width : targetRect.height; + return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2; +}, + +/** + * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold. + * @param {Number} x X position + * @param {Number} y Y position + * @return {HTMLElement} Element of the first found nearest Sortable + */ +_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) { + var ret; + sortables.some(function (sortable) { + var threshold = sortable[expando].options.emptyInsertThreshold; + if (!threshold || lastChild(sortable)) return; + var rect = getRect(sortable), + insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold, + insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold; + + if (insideHorizontally && insideVertically) { + return ret = sortable; + } + }); + return ret; +}, + _prepareGroup = function _prepareGroup(options) { + function toFn(value, pull) { + return function (to, from, dragEl, evt) { + var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name; + + if (value == null && (pull || sameGroup)) { + // Default pull value + // Default pull and put value if same group + return true; + } else if (value == null || value === false) { + return false; + } else if (pull && value === 'clone') { + return value; + } else if (typeof value === 'function') { + return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt); + } else { + var otherGroup = (pull ? to : from).options.group.name; + return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1; + } + }; + } + + var group = {}; + var originalGroup = options.group; + + if (!originalGroup || _typeof(originalGroup) != 'object') { + originalGroup = { + name: originalGroup + }; + } + + group.name = originalGroup.name; + group.checkPull = toFn(originalGroup.pull, true); + group.checkPut = toFn(originalGroup.put); + group.revertClone = originalGroup.revertClone; + options.group = group; +}, + _hideGhostForTarget = function _hideGhostForTarget() { + if (!supportCssPointerEvents && ghostEl) { + css(ghostEl, 'display', 'none'); + } +}, + _unhideGhostForTarget = function _unhideGhostForTarget() { + if (!supportCssPointerEvents && ghostEl) { + css(ghostEl, 'display', ''); + } +}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position + + +if (documentExists) { + document.addEventListener('click', function (evt) { + if (ignoreNextClick) { + evt.preventDefault(); + evt.stopPropagation && evt.stopPropagation(); + evt.stopImmediatePropagation && evt.stopImmediatePropagation(); + ignoreNextClick = false; + return false; + } + }, true); +} + +var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) { + if (dragEl) { + evt = evt.touches ? evt.touches[0] : evt; + + var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY); + + if (nearest) { + // Create imitation event + var event = {}; + + for (var i in evt) { + if (evt.hasOwnProperty(i)) { + event[i] = evt[i]; + } + } + + event.target = event.rootEl = nearest; + event.preventDefault = void 0; + event.stopPropagation = void 0; + + nearest[expando]._onDragOver(event); + } + } +}; + +var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) { + if (dragEl) { + dragEl.parentNode[expando]._isOutsideThisEl(evt.target); + } +}; +/** + * @class Sortable + * @param {HTMLElement} el + * @param {Object} [options] + */ + + +function Sortable(el, options) { + if (!(el && el.nodeType && el.nodeType === 1)) { + throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el)); + } + + this.el = el; // root element + + this.options = options = _extends({}, options); // Export instance + + el[expando] = this; + var defaults = { + group: null, + sort: true, + disabled: false, + store: null, + handle: null, + draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*', + swapThreshold: 1, + // percentage; 0 <= x <= 1 + invertSwap: false, + // invert always + invertedSwapThreshold: null, + // will be set to same as swapThreshold if default + removeCloneOnHide: true, + direction: function direction() { + return _detectDirection(el, this.options); + }, + ghostClass: 'sortable-ghost', + chosenClass: 'sortable-chosen', + dragClass: 'sortable-drag', + ignore: 'a, img', + filter: null, + preventOnFilter: true, + animation: 0, + easing: null, + setData: function setData(dataTransfer, dragEl) { + dataTransfer.setData('Text', dragEl.textContent); + }, + dropBubble: false, + dragoverBubble: false, + dataIdAttr: 'data-id', + delay: 0, + delayOnTouchOnly: false, + touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1, + forceFallback: false, + fallbackClass: 'sortable-fallback', + fallbackOnBody: false, + fallbackTolerance: 0, + fallbackOffset: { + x: 0, + y: 0 + }, + supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari, + emptyInsertThreshold: 5 + }; + PluginManager.initializePlugins(this, el, defaults); // Set default options + + for (var name in defaults) { + !(name in options) && (options[name] = defaults[name]); + } + + _prepareGroup(options); // Bind all private methods + + + for (var fn in this) { + if (fn.charAt(0) === '_' && typeof this[fn] === 'function') { + this[fn] = this[fn].bind(this); + } + } // Setup drag mode + + + this.nativeDraggable = options.forceFallback ? false : supportDraggable; + + if (this.nativeDraggable) { + // Touch start threshold cannot be greater than the native dragstart threshold + this.options.touchStartThreshold = 1; + } // Bind events + + + if (options.supportPointer) { + on(el, 'pointerdown', this._onTapStart); + } else { + on(el, 'mousedown', this._onTapStart); + on(el, 'touchstart', this._onTapStart); + } + + if (this.nativeDraggable) { + on(el, 'dragover', this); + on(el, 'dragenter', this); + } + + sortables.push(this.el); // Restore sorting + + options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager + + _extends(this, AnimationStateManager()); +} + +Sortable.prototype = +/** @lends Sortable.prototype */ +{ + constructor: Sortable, + _isOutsideThisEl: function _isOutsideThisEl(target) { + if (!this.el.contains(target) && target !== this.el) { + lastTarget = null; + } + }, + _getDirection: function _getDirection(evt, target) { + return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction; + }, + _onTapStart: function _onTapStart( + /** Event|TouchEvent */ + evt) { + if (!evt.cancelable) return; + + var _this = this, + el = this.el, + options = this.options, + preventOnFilter = options.preventOnFilter, + type = evt.type, + touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt, + target = (touch || evt).target, + originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, + filter = options.filter; + + _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group. + + + if (dragEl) { + return; + } + + if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) { + return; // only left button and enabled + } // cancel dnd if original target is content editable + + + if (originalTarget.isContentEditable) { + return; + } // Safari ignores further event handling after mousedown + + + if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') { + return; + } + + target = closest(target, options.draggable, el, false); + + if (target && target.animated) { + return; + } + + if (lastDownEl === target) { + // Ignoring duplicate `down` + return; + } // Get the index of the dragged element within its parent + + + oldIndex = index(target); + oldDraggableIndex = index(target, options.draggable); // Check filter + + if (typeof filter === 'function') { + if (filter.call(this, evt, target, this)) { + _dispatchEvent({ + sortable: _this, + rootEl: originalTarget, + name: 'filter', + targetEl: target, + toEl: el, + fromEl: el + }); + + pluginEvent('filter', _this, { + evt: evt + }); + preventOnFilter && evt.cancelable && evt.preventDefault(); + return; // cancel dnd + } + } else if (filter) { + filter = filter.split(',').some(function (criteria) { + criteria = closest(originalTarget, criteria.trim(), el, false); + + if (criteria) { + _dispatchEvent({ + sortable: _this, + rootEl: criteria, + name: 'filter', + targetEl: target, + fromEl: el, + toEl: el + }); + + pluginEvent('filter', _this, { + evt: evt + }); + return true; + } + }); + + if (filter) { + preventOnFilter && evt.cancelable && evt.preventDefault(); + return; // cancel dnd + } + } + + if (options.handle && !closest(originalTarget, options.handle, el, false)) { + return; + } // Prepare `dragstart` + + + this._prepareDragStart(evt, touch, target); + }, + _prepareDragStart: function _prepareDragStart( + /** Event */ + evt, + /** Touch */ + touch, + /** HTMLElement */ + target) { + var _this = this, + el = _this.el, + options = _this.options, + ownerDocument = el.ownerDocument, + dragStartFn; + + if (target && !dragEl && target.parentNode === el) { + var dragRect = getRect(target); + rootEl = el; + dragEl = target; + parentEl = dragEl.parentNode; + nextEl = dragEl.nextSibling; + lastDownEl = target; + activeGroup = options.group; + Sortable.dragged = dragEl; + tapEvt = { + target: dragEl, + clientX: (touch || evt).clientX, + clientY: (touch || evt).clientY + }; + tapDistanceLeft = tapEvt.clientX - dragRect.left; + tapDistanceTop = tapEvt.clientY - dragRect.top; + this._lastX = (touch || evt).clientX; + this._lastY = (touch || evt).clientY; + dragEl.style['will-change'] = 'all'; + + dragStartFn = function dragStartFn() { + pluginEvent('delayEnded', _this, { + evt: evt + }); + + if (Sortable.eventCanceled) { + _this._onDrop(); + + return; + } // Delayed drag has been triggered + // we can re-enable the events: touchmove/mousemove + + + _this._disableDelayedDragEvents(); + + if (!FireFox && _this.nativeDraggable) { + dragEl.draggable = true; + } // Bind the events: dragstart/dragend + + + _this._triggerDragStart(evt, touch); // Drag start event + + + _dispatchEvent({ + sortable: _this, + name: 'choose', + originalEvent: evt + }); // Chosen item + + + toggleClass(dragEl, options.chosenClass, true); + }; // Disable "draggable" + + + options.ignore.split(',').forEach(function (criteria) { + find(dragEl, criteria.trim(), _disableDraggable); + }); + on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent); + on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent); + on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent); + on(ownerDocument, 'mouseup', _this._onDrop); + on(ownerDocument, 'touchend', _this._onDrop); + on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox) + + if (FireFox && this.nativeDraggable) { + this.options.touchStartThreshold = 4; + dragEl.draggable = true; + } + + pluginEvent('delayStart', this, { + evt: evt + }); // Delay is impossible for native DnD in Edge or IE + + if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) { + if (Sortable.eventCanceled) { + this._onDrop(); + + return; + } // If the user moves the pointer or let go the click or touch + // before the delay has been reached: + // disable the delayed drag + + + on(ownerDocument, 'mouseup', _this._disableDelayedDrag); + on(ownerDocument, 'touchend', _this._disableDelayedDrag); + on(ownerDocument, 'touchcancel', _this._disableDelayedDrag); + on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler); + on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler); + options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler); + _this._dragStartTimer = setTimeout(dragStartFn, options.delay); + } else { + dragStartFn(); + } + } + }, + _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( + /** TouchEvent|PointerEvent **/ + e) { + var touch = e.touches ? e.touches[0] : e; + + if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) { + this._disableDelayedDrag(); + } + }, + _disableDelayedDrag: function _disableDelayedDrag() { + dragEl && _disableDraggable(dragEl); + clearTimeout(this._dragStartTimer); + + this._disableDelayedDragEvents(); + }, + _disableDelayedDragEvents: function _disableDelayedDragEvents() { + var ownerDocument = this.el.ownerDocument; + off(ownerDocument, 'mouseup', this._disableDelayedDrag); + off(ownerDocument, 'touchend', this._disableDelayedDrag); + off(ownerDocument, 'touchcancel', this._disableDelayedDrag); + off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler); + off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler); + off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler); + }, + _triggerDragStart: function _triggerDragStart( + /** Event */ + evt, + /** Touch */ + touch) { + touch = touch || evt.pointerType == 'touch' && evt; + + if (!this.nativeDraggable || touch) { + if (this.options.supportPointer) { + on(document, 'pointermove', this._onTouchMove); + } else if (touch) { + on(document, 'touchmove', this._onTouchMove); + } else { + on(document, 'mousemove', this._onTouchMove); + } + } else { + on(dragEl, 'dragend', this); + on(rootEl, 'dragstart', this._onDragStart); + } + + try { + if (document.selection) { + // Timeout neccessary for IE9 + _nextTick(function () { + document.selection.empty(); + }); + } else { + window.getSelection().removeAllRanges(); + } + } catch (err) {} + }, + _dragStarted: function _dragStarted(fallback, evt) { + + awaitingDragStarted = false; + + if (rootEl && dragEl) { + pluginEvent('dragStarted', this, { + evt: evt + }); + + if (this.nativeDraggable) { + on(document, 'dragover', _checkOutsideTargetEl); + } + + var options = this.options; // Apply effect + + !fallback && toggleClass(dragEl, options.dragClass, false); + toggleClass(dragEl, options.ghostClass, true); + Sortable.active = this; + fallback && this._appendGhost(); // Drag start event + + _dispatchEvent({ + sortable: this, + name: 'start', + originalEvent: evt + }); + } else { + this._nulling(); + } + }, + _emulateDragOver: function _emulateDragOver() { + if (touchEvt) { + this._lastX = touchEvt.clientX; + this._lastY = touchEvt.clientY; + + _hideGhostForTarget(); + + var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY); + var parent = target; + + while (target && target.shadowRoot) { + target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY); + if (target === parent) break; + parent = target; + } + + dragEl.parentNode[expando]._isOutsideThisEl(target); + + if (parent) { + do { + if (parent[expando]) { + var inserted = void 0; + inserted = parent[expando]._onDragOver({ + clientX: touchEvt.clientX, + clientY: touchEvt.clientY, + target: target, + rootEl: parent + }); + + if (inserted && !this.options.dragoverBubble) { + break; + } + } + + target = parent; // store last element + } + /* jshint boss:true */ + while (parent = parent.parentNode); + } + + _unhideGhostForTarget(); + } + }, + _onTouchMove: function _onTouchMove( + /**TouchEvent*/ + evt) { + if (tapEvt) { + var options = this.options, + fallbackTolerance = options.fallbackTolerance, + fallbackOffset = options.fallbackOffset, + touch = evt.touches ? evt.touches[0] : evt, + ghostMatrix = ghostEl && matrix(ghostEl, true), + scaleX = ghostEl && ghostMatrix && ghostMatrix.a, + scaleY = ghostEl && ghostMatrix && ghostMatrix.d, + relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent), + dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1), + dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging + + if (!Sortable.active && !awaitingDragStarted) { + if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) { + return; + } + + this._onDragStart(evt, true); + } + + if (ghostEl) { + if (ghostMatrix) { + ghostMatrix.e += dx - (lastDx || 0); + ghostMatrix.f += dy - (lastDy || 0); + } else { + ghostMatrix = { + a: 1, + b: 0, + c: 0, + d: 1, + e: dx, + f: dy + }; + } + + var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")"); + css(ghostEl, 'webkitTransform', cssMatrix); + css(ghostEl, 'mozTransform', cssMatrix); + css(ghostEl, 'msTransform', cssMatrix); + css(ghostEl, 'transform', cssMatrix); + lastDx = dx; + lastDy = dy; + touchEvt = touch; + } + + evt.cancelable && evt.preventDefault(); + } + }, + _appendGhost: function _appendGhost() { + // Bug if using scale(): https://stackoverflow.com/questions/2637058 + // Not being adjusted for + if (!ghostEl) { + var container = this.options.fallbackOnBody ? document.body : rootEl, + rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container), + options = this.options; // Position absolutely + + if (PositionGhostAbsolutely) { + // Get relatively positioned parent + ghostRelativeParent = container; + + while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) { + ghostRelativeParent = ghostRelativeParent.parentNode; + } + + if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) { + if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement(); + rect.top += ghostRelativeParent.scrollTop; + rect.left += ghostRelativeParent.scrollLeft; + } else { + ghostRelativeParent = getWindowScrollingElement(); + } + + ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent); + } + + ghostEl = dragEl.cloneNode(true); + toggleClass(ghostEl, options.ghostClass, false); + toggleClass(ghostEl, options.fallbackClass, true); + toggleClass(ghostEl, options.dragClass, true); + css(ghostEl, 'transition', ''); + css(ghostEl, 'transform', ''); + css(ghostEl, 'box-sizing', 'border-box'); + css(ghostEl, 'margin', 0); + css(ghostEl, 'top', rect.top); + css(ghostEl, 'left', rect.left); + css(ghostEl, 'width', rect.width); + css(ghostEl, 'height', rect.height); + css(ghostEl, 'opacity', '0.8'); + css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed'); + css(ghostEl, 'zIndex', '100000'); + css(ghostEl, 'pointerEvents', 'none'); + Sortable.ghost = ghostEl; + container.appendChild(ghostEl); // Set transform-origin + + css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%'); + } + }, + _onDragStart: function _onDragStart( + /**Event*/ + evt, + /**boolean*/ + fallback) { + var _this = this; + + var dataTransfer = evt.dataTransfer; + var options = _this.options; + pluginEvent('dragStart', this, { + evt: evt + }); + + if (Sortable.eventCanceled) { + this._onDrop(); + + return; + } + + pluginEvent('setupClone', this); + + if (!Sortable.eventCanceled) { + cloneEl = clone(dragEl); + cloneEl.draggable = false; + cloneEl.style['will-change'] = ''; + + this._hideClone(); + + toggleClass(cloneEl, this.options.chosenClass, false); + Sortable.clone = cloneEl; + } // #1143: IFrame support workaround + + + _this.cloneId = _nextTick(function () { + pluginEvent('clone', _this); + if (Sortable.eventCanceled) return; + + if (!_this.options.removeCloneOnHide) { + rootEl.insertBefore(cloneEl, dragEl); + } + + _this._hideClone(); + + _dispatchEvent({ + sortable: _this, + name: 'clone' + }); + }); + !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events + + if (fallback) { + ignoreNextClick = true; + _this._loopId = setInterval(_this._emulateDragOver, 50); + } else { + // Undo what was set in _prepareDragStart before drag started + off(document, 'mouseup', _this._onDrop); + off(document, 'touchend', _this._onDrop); + off(document, 'touchcancel', _this._onDrop); + + if (dataTransfer) { + dataTransfer.effectAllowed = 'move'; + options.setData && options.setData.call(_this, dataTransfer, dragEl); + } + + on(document, 'drop', _this); // #1276 fix: + + css(dragEl, 'transform', 'translateZ(0)'); + } + + awaitingDragStarted = true; + _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt)); + on(document, 'selectstart', _this); + moved = true; + + if (Safari) { + css(document.body, 'user-select', 'none'); + } + }, + // Returns true - if no further action is needed (either inserted or another condition) + _onDragOver: function _onDragOver( + /**Event*/ + evt) { + var el = this.el, + target = evt.target, + dragRect, + targetRect, + revert, + options = this.options, + group = options.group, + activeSortable = Sortable.active, + isOwner = activeGroup === group, + canSort = options.sort, + fromSortable = putSortable || activeSortable, + vertical, + _this = this, + completedFired = false; + + if (_silent) return; + + function dragOverEvent(name, extra) { + pluginEvent(name, _this, _objectSpread2({ + evt: evt, + isOwner: isOwner, + axis: vertical ? 'vertical' : 'horizontal', + revert: revert, + dragRect: dragRect, + targetRect: targetRect, + canSort: canSort, + fromSortable: fromSortable, + target: target, + completed: completed, + onMove: function onMove(target, after) { + return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after); + }, + changed: changed + }, extra)); + } // Capture animation state + + + function capture() { + dragOverEvent('dragOverAnimationCapture'); + + _this.captureAnimationState(); + + if (_this !== fromSortable) { + fromSortable.captureAnimationState(); + } + } // Return invocation when dragEl is inserted (or completed) + + + function completed(insertion) { + dragOverEvent('dragOverCompleted', { + insertion: insertion + }); + + if (insertion) { + // Clones must be hidden before folding animation to capture dragRectAbsolute properly + if (isOwner) { + activeSortable._hideClone(); + } else { + activeSortable._showClone(_this); + } + + if (_this !== fromSortable) { + // Set ghost class to new sortable's ghost class + toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false); + toggleClass(dragEl, options.ghostClass, true); + } + + if (putSortable !== _this && _this !== Sortable.active) { + putSortable = _this; + } else if (_this === Sortable.active && putSortable) { + putSortable = null; + } // Animation + + + if (fromSortable === _this) { + _this._ignoreWhileAnimating = target; + } + + _this.animateAll(function () { + dragOverEvent('dragOverAnimationComplete'); + _this._ignoreWhileAnimating = null; + }); + + if (_this !== fromSortable) { + fromSortable.animateAll(); + fromSortable._ignoreWhileAnimating = null; + } + } // Null lastTarget if it is not inside a previously swapped element + + + if (target === dragEl && !dragEl.animated || target === el && !target.animated) { + lastTarget = null; + } // no bubbling and not fallback + + + if (!options.dragoverBubble && !evt.rootEl && target !== document) { + dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted + + + !insertion && nearestEmptyInsertDetectEvent(evt); + } + + !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation(); + return completedFired = true; + } // Call when dragEl has been inserted + + + function changed() { + newIndex = index(dragEl); + newDraggableIndex = index(dragEl, options.draggable); + + _dispatchEvent({ + sortable: _this, + name: 'change', + toEl: el, + newIndex: newIndex, + newDraggableIndex: newDraggableIndex, + originalEvent: evt + }); + } + + if (evt.preventDefault !== void 0) { + evt.cancelable && evt.preventDefault(); + } + + target = closest(target, options.draggable, el, true); + dragOverEvent('dragOver'); + if (Sortable.eventCanceled) return completedFired; + + if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) { + return completed(false); + } + + ignoreNextClick = false; + + if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list + : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) { + vertical = this._getDirection(evt, target) === 'vertical'; + dragRect = getRect(dragEl); + dragOverEvent('dragOverValid'); + if (Sortable.eventCanceled) return completedFired; + + if (revert) { + parentEl = rootEl; // actualization + + capture(); + + this._hideClone(); + + dragOverEvent('revert'); + + if (!Sortable.eventCanceled) { + if (nextEl) { + rootEl.insertBefore(dragEl, nextEl); + } else { + rootEl.appendChild(dragEl); + } + } + + return completed(true); + } + + var elLastChild = lastChild(el, options.draggable); + + if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) { + // Insert to end of list + // If already at end of list: Do not insert + if (elLastChild === dragEl) { + return completed(false); + } // if there is a last element, it is the target + + + if (elLastChild && el === evt.target) { + target = elLastChild; + } + + if (target) { + targetRect = getRect(target); + } + + if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) { + capture(); + el.appendChild(dragEl); + parentEl = el; // actualization + + changed(); + return completed(true); + } + } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) { + // Insert to start of list + var firstChild = getChild(el, 0, options, true); + + if (firstChild === dragEl) { + return completed(false); + } + + target = firstChild; + targetRect = getRect(target); + + if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) { + capture(); + el.insertBefore(dragEl, firstChild); + parentEl = el; // actualization + + changed(); + return completed(true); + } + } else if (target.parentNode === el) { + targetRect = getRect(target); + var direction = 0, + targetBeforeFirstSwap, + differentLevel = dragEl.parentNode !== el, + differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical), + side1 = vertical ? 'top' : 'left', + scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'), + scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0; + + if (lastTarget !== target) { + targetBeforeFirstSwap = targetRect[side1]; + pastFirstInvertThresh = false; + isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel; + } + + direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target); + var sibling; + + if (direction !== 0) { + // Check if target is beside dragEl in respective direction (ignoring hidden elements) + var dragIndex = index(dragEl); + + do { + dragIndex -= direction; + sibling = parentEl.children[dragIndex]; + } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl)); + } // If dragEl is already beside target: Do not insert + + + if (direction === 0 || sibling === target) { + return completed(false); + } + + lastTarget = target; + lastDirection = direction; + var nextSibling = target.nextElementSibling, + after = false; + after = direction === 1; + + var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after); + + if (moveVector !== false) { + if (moveVector === 1 || moveVector === -1) { + after = moveVector === 1; + } + + _silent = true; + setTimeout(_unsilent, 30); + capture(); + + if (after && !nextSibling) { + el.appendChild(dragEl); + } else { + target.parentNode.insertBefore(dragEl, after ? nextSibling : target); + } // Undo chrome's scroll adjustment (has no effect on other browsers) + + + if (scrolledPastTop) { + scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop); + } + + parentEl = dragEl.parentNode; // actualization + // must be done before animation + + if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) { + targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]); + } + + changed(); + return completed(true); + } + } + + if (el.contains(dragEl)) { + return completed(false); + } + } + + return false; + }, + _ignoreWhileAnimating: null, + _offMoveEvents: function _offMoveEvents() { + off(document, 'mousemove', this._onTouchMove); + off(document, 'touchmove', this._onTouchMove); + off(document, 'pointermove', this._onTouchMove); + off(document, 'dragover', nearestEmptyInsertDetectEvent); + off(document, 'mousemove', nearestEmptyInsertDetectEvent); + off(document, 'touchmove', nearestEmptyInsertDetectEvent); + }, + _offUpEvents: function _offUpEvents() { + var ownerDocument = this.el.ownerDocument; + off(ownerDocument, 'mouseup', this._onDrop); + off(ownerDocument, 'touchend', this._onDrop); + off(ownerDocument, 'pointerup', this._onDrop); + off(ownerDocument, 'touchcancel', this._onDrop); + off(document, 'selectstart', this); + }, + _onDrop: function _onDrop( + /**Event*/ + evt) { + var el = this.el, + options = this.options; // Get the index of the dragged element within its parent + + newIndex = index(dragEl); + newDraggableIndex = index(dragEl, options.draggable); + pluginEvent('drop', this, { + evt: evt + }); + parentEl = dragEl && dragEl.parentNode; // Get again after plugin event + + newIndex = index(dragEl); + newDraggableIndex = index(dragEl, options.draggable); + + if (Sortable.eventCanceled) { + this._nulling(); + + return; + } + + awaitingDragStarted = false; + isCircumstantialInvert = false; + pastFirstInvertThresh = false; + clearInterval(this._loopId); + clearTimeout(this._dragStartTimer); + + _cancelNextTick(this.cloneId); + + _cancelNextTick(this._dragStartId); // Unbind events + + + if (this.nativeDraggable) { + off(document, 'drop', this); + off(el, 'dragstart', this._onDragStart); + } + + this._offMoveEvents(); + + this._offUpEvents(); + + if (Safari) { + css(document.body, 'user-select', ''); + } + + css(dragEl, 'transform', ''); + + if (evt) { + if (moved) { + evt.cancelable && evt.preventDefault(); + !options.dropBubble && evt.stopPropagation(); + } + + ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl); + + if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') { + // Remove clone(s) + cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl); + } + + if (dragEl) { + if (this.nativeDraggable) { + off(dragEl, 'dragend', this); + } + + _disableDraggable(dragEl); + + dragEl.style['will-change'] = ''; // Remove classes + // ghostClass is added in dragStarted + + if (moved && !awaitingDragStarted) { + toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false); + } + + toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event + + _dispatchEvent({ + sortable: this, + name: 'unchoose', + toEl: parentEl, + newIndex: null, + newDraggableIndex: null, + originalEvent: evt + }); + + if (rootEl !== parentEl) { + if (newIndex >= 0) { + // Add event + _dispatchEvent({ + rootEl: parentEl, + name: 'add', + toEl: parentEl, + fromEl: rootEl, + originalEvent: evt + }); // Remove event + + + _dispatchEvent({ + sortable: this, + name: 'remove', + toEl: parentEl, + originalEvent: evt + }); // drag from one list and drop into another + + + _dispatchEvent({ + rootEl: parentEl, + name: 'sort', + toEl: parentEl, + fromEl: rootEl, + originalEvent: evt + }); + + _dispatchEvent({ + sortable: this, + name: 'sort', + toEl: parentEl, + originalEvent: evt + }); + } + + putSortable && putSortable.save(); + } else { + if (newIndex !== oldIndex) { + if (newIndex >= 0) { + // drag & drop within the same list + _dispatchEvent({ + sortable: this, + name: 'update', + toEl: parentEl, + originalEvent: evt + }); + + _dispatchEvent({ + sortable: this, + name: 'sort', + toEl: parentEl, + originalEvent: evt + }); + } + } + } + + if (Sortable.active) { + /* jshint eqnull:true */ + if (newIndex == null || newIndex === -1) { + newIndex = oldIndex; + newDraggableIndex = oldDraggableIndex; + } + + _dispatchEvent({ + sortable: this, + name: 'end', + toEl: parentEl, + originalEvent: evt + }); // Save sorting + + + this.save(); + } + } + } + + this._nulling(); + }, + _nulling: function _nulling() { + pluginEvent('nulling', this); + rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null; + savedInputChecked.forEach(function (el) { + el.checked = true; + }); + savedInputChecked.length = lastDx = lastDy = 0; + }, + handleEvent: function handleEvent( + /**Event*/ + evt) { + switch (evt.type) { + case 'drop': + case 'dragend': + this._onDrop(evt); + + break; + + case 'dragenter': + case 'dragover': + if (dragEl) { + this._onDragOver(evt); + + _globalDragOver(evt); + } + + break; + + case 'selectstart': + evt.preventDefault(); + break; + } + }, + + /** + * Serializes the item into an array of string. + * @returns {String[]} + */ + toArray: function toArray() { + var order = [], + el, + children = this.el.children, + i = 0, + n = children.length, + options = this.options; + + for (; i < n; i++) { + el = children[i]; + + if (closest(el, options.draggable, this.el, false)) { + order.push(el.getAttribute(options.dataIdAttr) || _generateId(el)); + } + } + + return order; + }, + + /** + * Sorts the elements according to the array. + * @param {String[]} order order of the items + */ + sort: function sort(order, useAnimation) { + var items = {}, + rootEl = this.el; + this.toArray().forEach(function (id, i) { + var el = rootEl.children[i]; + + if (closest(el, this.options.draggable, rootEl, false)) { + items[id] = el; + } + }, this); + useAnimation && this.captureAnimationState(); + order.forEach(function (id) { + if (items[id]) { + rootEl.removeChild(items[id]); + rootEl.appendChild(items[id]); + } + }); + useAnimation && this.animateAll(); + }, + + /** + * Save the current sorting + */ + save: function save() { + var store = this.options.store; + store && store.set && store.set(this); + }, + + /** + * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. + * @param {HTMLElement} el + * @param {String} [selector] default: `options.draggable` + * @returns {HTMLElement|null} + */ + closest: function closest$1(el, selector) { + return closest(el, selector || this.options.draggable, this.el, false); + }, + + /** + * Set/get option + * @param {string} name + * @param {*} [value] + * @returns {*} + */ + option: function option(name, value) { + var options = this.options; + + if (value === void 0) { + return options[name]; + } else { + var modifiedValue = PluginManager.modifyOption(this, name, value); + + if (typeof modifiedValue !== 'undefined') { + options[name] = modifiedValue; + } else { + options[name] = value; + } + + if (name === 'group') { + _prepareGroup(options); + } + } + }, + + /** + * Destroy + */ + destroy: function destroy() { + pluginEvent('destroy', this); + var el = this.el; + el[expando] = null; + off(el, 'mousedown', this._onTapStart); + off(el, 'touchstart', this._onTapStart); + off(el, 'pointerdown', this._onTapStart); + + if (this.nativeDraggable) { + off(el, 'dragover', this); + off(el, 'dragenter', this); + } // Remove draggable attributes + + + Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) { + el.removeAttribute('draggable'); + }); + + this._onDrop(); + + this._disableDelayedDragEvents(); + + sortables.splice(sortables.indexOf(this.el), 1); + this.el = el = null; + }, + _hideClone: function _hideClone() { + if (!cloneHidden) { + pluginEvent('hideClone', this); + if (Sortable.eventCanceled) return; + css(cloneEl, 'display', 'none'); + + if (this.options.removeCloneOnHide && cloneEl.parentNode) { + cloneEl.parentNode.removeChild(cloneEl); + } + + cloneHidden = true; + } + }, + _showClone: function _showClone(putSortable) { + if (putSortable.lastPutMode !== 'clone') { + this._hideClone(); + + return; + } + + if (cloneHidden) { + pluginEvent('showClone', this); + if (Sortable.eventCanceled) return; // show clone at dragEl or original position + + if (dragEl.parentNode == rootEl && !this.options.group.revertClone) { + rootEl.insertBefore(cloneEl, dragEl); + } else if (nextEl) { + rootEl.insertBefore(cloneEl, nextEl); + } else { + rootEl.appendChild(cloneEl); + } + + if (this.options.group.revertClone) { + this.animate(dragEl, cloneEl); + } + + css(cloneEl, 'display', ''); + cloneHidden = false; + } + } +}; + +function _globalDragOver( +/**Event*/ +evt) { + if (evt.dataTransfer) { + evt.dataTransfer.dropEffect = 'move'; + } + + evt.cancelable && evt.preventDefault(); +} + +function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) { + var evt, + sortable = fromEl[expando], + onMoveFn = sortable.options.onMove, + retVal; // Support for new CustomEvent feature + + if (window.CustomEvent && !IE11OrLess && !Edge) { + evt = new CustomEvent('move', { + bubbles: true, + cancelable: true + }); + } else { + evt = document.createEvent('Event'); + evt.initEvent('move', true, true); + } + + evt.to = toEl; + evt.from = fromEl; + evt.dragged = dragEl; + evt.draggedRect = dragRect; + evt.related = targetEl || toEl; + evt.relatedRect = targetRect || getRect(toEl); + evt.willInsertAfter = willInsertAfter; + evt.originalEvent = originalEvent; + fromEl.dispatchEvent(evt); + + if (onMoveFn) { + retVal = onMoveFn.call(sortable, evt, originalEvent); + } + + return retVal; +} + +function _disableDraggable(el) { + el.draggable = false; +} + +function _unsilent() { + _silent = false; +} + +function _ghostIsFirst(evt, vertical, sortable) { + var rect = getRect(getChild(sortable.el, 0, sortable.options, true)); + var spacer = 10; + return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left; +} + +function _ghostIsLast(evt, vertical, sortable) { + var rect = getRect(lastChild(sortable.el, sortable.options.draggable)); + var spacer = 10; + return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer; +} + +function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) { + var mouseOnAxis = vertical ? evt.clientY : evt.clientX, + targetLength = vertical ? targetRect.height : targetRect.width, + targetS1 = vertical ? targetRect.top : targetRect.left, + targetS2 = vertical ? targetRect.bottom : targetRect.right, + invert = false; + + if (!invertSwap) { + // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold + if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) { + // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2 + // check if past first invert threshold on side opposite of lastDirection + if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) { + // past first invert threshold, do not restrict inverted threshold to dragEl shadow + pastFirstInvertThresh = true; + } + + if (!pastFirstInvertThresh) { + // dragEl shadow (target move distance shadow) + if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow + : mouseOnAxis > targetS2 - targetMoveDistance) { + return -lastDirection; + } + } else { + invert = true; + } + } else { + // Regular + if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) { + return _getInsertDirection(target); + } + } + } + + invert = invert || invertSwap; + + if (invert) { + // Invert of regular + if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) { + return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1; + } + } + + return 0; +} +/** + * Gets the direction dragEl must be swapped relative to target in order to make it + * seem that dragEl has been "inserted" into that element's position + * @param {HTMLElement} target The target whose position dragEl is being inserted at + * @return {Number} Direction dragEl must be swapped + */ + + +function _getInsertDirection(target) { + if (index(dragEl) < index(target)) { + return 1; + } else { + return -1; + } +} +/** + * Generate id + * @param {HTMLElement} el + * @returns {String} + * @private + */ + + +function _generateId(el) { + var str = el.tagName + el.className + el.src + el.href + el.textContent, + i = str.length, + sum = 0; + + while (i--) { + sum += str.charCodeAt(i); + } + + return sum.toString(36); +} + +function _saveInputCheckedState(root) { + savedInputChecked.length = 0; + var inputs = root.getElementsByTagName('input'); + var idx = inputs.length; + + while (idx--) { + var el = inputs[idx]; + el.checked && savedInputChecked.push(el); + } +} + +function _nextTick(fn) { + return setTimeout(fn, 0); +} + +function _cancelNextTick(id) { + return clearTimeout(id); +} // Fixed #973: + + +if (documentExists) { + on(document, 'touchmove', function (evt) { + if ((Sortable.active || awaitingDragStarted) && evt.cancelable) { + evt.preventDefault(); + } + }); +} // Export utils + + +Sortable.utils = { + on: on, + off: off, + css: css, + find: find, + is: function is(el, selector) { + return !!closest(el, selector, el, false); + }, + extend: extend, + throttle: throttle, + closest: closest, + toggleClass: toggleClass, + clone: clone, + index: index, + nextTick: _nextTick, + cancelNextTick: _cancelNextTick, + detectDirection: _detectDirection, + getChild: getChild +}; +/** + * Get the Sortable instance of an element + * @param {HTMLElement} element The element + * @return {Sortable|undefined} The instance of Sortable + */ + +Sortable.get = function (element) { + return element[expando]; +}; +/** + * Mount a plugin to Sortable + * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted + */ + + +Sortable.mount = function () { + for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) { + plugins[_key] = arguments[_key]; + } + + if (plugins[0].constructor === Array) plugins = plugins[0]; + plugins.forEach(function (plugin) { + if (!plugin.prototype || !plugin.prototype.constructor) { + throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin)); + } + + if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils); + PluginManager.mount(plugin); + }); +}; +/** + * Create sortable instance + * @param {HTMLElement} el + * @param {Object} [options] + */ + + +Sortable.create = function (el, options) { + return new Sortable(el, options); +}; // Export + + +Sortable.version = version; + +var autoScrolls = [], + scrollEl, + scrollRootEl, + scrolling = false, + lastAutoScrollX, + lastAutoScrollY, + touchEvt$1, + pointerElemChangedInterval; + +function AutoScrollPlugin() { + function AutoScroll() { + this.defaults = { + scroll: true, + forceAutoScrollFallback: false, + scrollSensitivity: 30, + scrollSpeed: 10, + bubbleScroll: true + }; // Bind all private methods + + for (var fn in this) { + if (fn.charAt(0) === '_' && typeof this[fn] === 'function') { + this[fn] = this[fn].bind(this); + } + } + } + + AutoScroll.prototype = { + dragStarted: function dragStarted(_ref) { + var originalEvent = _ref.originalEvent; + + if (this.sortable.nativeDraggable) { + on(document, 'dragover', this._handleAutoScroll); + } else { + if (this.options.supportPointer) { + on(document, 'pointermove', this._handleFallbackAutoScroll); + } else if (originalEvent.touches) { + on(document, 'touchmove', this._handleFallbackAutoScroll); + } else { + on(document, 'mousemove', this._handleFallbackAutoScroll); + } + } + }, + dragOverCompleted: function dragOverCompleted(_ref2) { + var originalEvent = _ref2.originalEvent; + + // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached) + if (!this.options.dragOverBubble && !originalEvent.rootEl) { + this._handleAutoScroll(originalEvent); + } + }, + drop: function drop() { + if (this.sortable.nativeDraggable) { + off(document, 'dragover', this._handleAutoScroll); + } else { + off(document, 'pointermove', this._handleFallbackAutoScroll); + off(document, 'touchmove', this._handleFallbackAutoScroll); + off(document, 'mousemove', this._handleFallbackAutoScroll); + } + + clearPointerElemChangedInterval(); + clearAutoScrolls(); + cancelThrottle(); + }, + nulling: function nulling() { + touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null; + autoScrolls.length = 0; + }, + _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) { + this._handleAutoScroll(evt, true); + }, + _handleAutoScroll: function _handleAutoScroll(evt, fallback) { + var _this = this; + + var x = (evt.touches ? evt.touches[0] : evt).clientX, + y = (evt.touches ? evt.touches[0] : evt).clientY, + elem = document.elementFromPoint(x, y); + touchEvt$1 = evt; // IE does not seem to have native autoscroll, + // Edge's autoscroll seems too conditional, + // MACOS Safari does not have autoscroll, + // Firefox and Chrome are good + + if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) { + autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change + + var ogElemScroller = getParentAutoScrollElement(elem, true); + + if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) { + pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour + + pointerElemChangedInterval = setInterval(function () { + var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true); + + if (newElem !== ogElemScroller) { + ogElemScroller = newElem; + clearAutoScrolls(); + } + + autoScroll(evt, _this.options, newElem, fallback); + }, 10); + lastAutoScrollX = x; + lastAutoScrollY = y; + } + } else { + // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll + if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) { + clearAutoScrolls(); + return; + } + + autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false); + } + } + }; + return _extends(AutoScroll, { + pluginName: 'scroll', + initializeByDefault: true + }); +} + +function clearAutoScrolls() { + autoScrolls.forEach(function (autoScroll) { + clearInterval(autoScroll.pid); + }); + autoScrolls = []; +} + +function clearPointerElemChangedInterval() { + clearInterval(pointerElemChangedInterval); +} + +var autoScroll = throttle(function (evt, options, rootEl, isFallback) { + // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521 + if (!options.scroll) return; + var x = (evt.touches ? evt.touches[0] : evt).clientX, + y = (evt.touches ? evt.touches[0] : evt).clientY, + sens = options.scrollSensitivity, + speed = options.scrollSpeed, + winScroller = getWindowScrollingElement(); + var scrollThisInstance = false, + scrollCustomFn; // New scroll root, set scrollEl + + if (scrollRootEl !== rootEl) { + scrollRootEl = rootEl; + clearAutoScrolls(); + scrollEl = options.scroll; + scrollCustomFn = options.scrollFn; + + if (scrollEl === true) { + scrollEl = getParentAutoScrollElement(rootEl, true); + } + } + + var layersOut = 0; + var currentParent = scrollEl; + + do { + var el = currentParent, + rect = getRect(el), + top = rect.top, + bottom = rect.bottom, + left = rect.left, + right = rect.right, + width = rect.width, + height = rect.height, + canScrollX = void 0, + canScrollY = void 0, + scrollWidth = el.scrollWidth, + scrollHeight = el.scrollHeight, + elCSS = css(el), + scrollPosX = el.scrollLeft, + scrollPosY = el.scrollTop; + + if (el === winScroller) { + canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible'); + canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible'); + } else { + canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll'); + canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll'); + } + + var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX); + var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY); + + if (!autoScrolls[layersOut]) { + for (var i = 0; i <= layersOut; i++) { + if (!autoScrolls[i]) { + autoScrolls[i] = {}; + } + } + } + + if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) { + autoScrolls[layersOut].el = el; + autoScrolls[layersOut].vx = vx; + autoScrolls[layersOut].vy = vy; + clearInterval(autoScrolls[layersOut].pid); + + if (vx != 0 || vy != 0) { + scrollThisInstance = true; + /* jshint loopfunc:true */ + + autoScrolls[layersOut].pid = setInterval(function () { + // emulate drag over during autoscroll (fallback), emulating native DnD behaviour + if (isFallback && this.layer === 0) { + Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely + + } + + var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0; + var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0; + + if (typeof scrollCustomFn === 'function') { + if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') { + return; + } + } + + scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY); + }.bind({ + layer: layersOut + }), 24); + } + } + + layersOut++; + } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false))); + + scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not +}, 30); + +var drop = function drop(_ref) { + var originalEvent = _ref.originalEvent, + putSortable = _ref.putSortable, + dragEl = _ref.dragEl, + activeSortable = _ref.activeSortable, + dispatchSortableEvent = _ref.dispatchSortableEvent, + hideGhostForTarget = _ref.hideGhostForTarget, + unhideGhostForTarget = _ref.unhideGhostForTarget; + if (!originalEvent) return; + var toSortable = putSortable || activeSortable; + hideGhostForTarget(); + var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent; + var target = document.elementFromPoint(touch.clientX, touch.clientY); + unhideGhostForTarget(); + + if (toSortable && !toSortable.el.contains(target)) { + dispatchSortableEvent('spill'); + this.onSpill({ + dragEl: dragEl, + putSortable: putSortable + }); + } +}; + +function Revert() {} + +Revert.prototype = { + startIndex: null, + dragStart: function dragStart(_ref2) { + var oldDraggableIndex = _ref2.oldDraggableIndex; + this.startIndex = oldDraggableIndex; + }, + onSpill: function onSpill(_ref3) { + var dragEl = _ref3.dragEl, + putSortable = _ref3.putSortable; + this.sortable.captureAnimationState(); + + if (putSortable) { + putSortable.captureAnimationState(); + } + + var nextSibling = getChild(this.sortable.el, this.startIndex, this.options); + + if (nextSibling) { + this.sortable.el.insertBefore(dragEl, nextSibling); + } else { + this.sortable.el.appendChild(dragEl); + } + + this.sortable.animateAll(); + + if (putSortable) { + putSortable.animateAll(); + } + }, + drop: drop +}; + +_extends(Revert, { + pluginName: 'revertOnSpill' +}); + +function Remove() {} + +Remove.prototype = { + onSpill: function onSpill(_ref4) { + var dragEl = _ref4.dragEl, + putSortable = _ref4.putSortable; + var parentSortable = putSortable || this.sortable; + parentSortable.captureAnimationState(); + dragEl.parentNode && dragEl.parentNode.removeChild(dragEl); + parentSortable.animateAll(); + }, + drop: drop +}; + +_extends(Remove, { + pluginName: 'removeOnSpill' +}); + +var lastSwapEl; + +function SwapPlugin() { + function Swap() { + this.defaults = { + swapClass: 'sortable-swap-highlight' + }; + } + + Swap.prototype = { + dragStart: function dragStart(_ref) { + var dragEl = _ref.dragEl; + lastSwapEl = dragEl; + }, + dragOverValid: function dragOverValid(_ref2) { + var completed = _ref2.completed, + target = _ref2.target, + onMove = _ref2.onMove, + activeSortable = _ref2.activeSortable, + changed = _ref2.changed, + cancel = _ref2.cancel; + if (!activeSortable.options.swap) return; + var el = this.sortable.el, + options = this.options; + + if (target && target !== el) { + var prevSwapEl = lastSwapEl; + + if (onMove(target) !== false) { + toggleClass(target, options.swapClass, true); + lastSwapEl = target; + } else { + lastSwapEl = null; + } + + if (prevSwapEl && prevSwapEl !== lastSwapEl) { + toggleClass(prevSwapEl, options.swapClass, false); + } + } + + changed(); + completed(true); + cancel(); + }, + drop: function drop(_ref3) { + var activeSortable = _ref3.activeSortable, + putSortable = _ref3.putSortable, + dragEl = _ref3.dragEl; + var toSortable = putSortable || this.sortable; + var options = this.options; + lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false); + + if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) { + if (dragEl !== lastSwapEl) { + toSortable.captureAnimationState(); + if (toSortable !== activeSortable) activeSortable.captureAnimationState(); + swapNodes(dragEl, lastSwapEl); + toSortable.animateAll(); + if (toSortable !== activeSortable) activeSortable.animateAll(); + } + } + }, + nulling: function nulling() { + lastSwapEl = null; + } + }; + return _extends(Swap, { + pluginName: 'swap', + eventProperties: function eventProperties() { + return { + swapItem: lastSwapEl + }; + } + }); +} + +function swapNodes(n1, n2) { + var p1 = n1.parentNode, + p2 = n2.parentNode, + i1, + i2; + if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return; + i1 = index(n1); + i2 = index(n2); + + if (p1.isEqualNode(p2) && i1 < i2) { + i2++; + } + + p1.insertBefore(n2, p1.children[i1]); + p2.insertBefore(n1, p2.children[i2]); +} + +var multiDragElements = [], + multiDragClones = [], + lastMultiDragSelect, + // for selection with modifier key down (SHIFT) +multiDragSortable, + initialFolding = false, + // Initial multi-drag fold when drag started +folding = false, + // Folding any other time +dragStarted = false, + dragEl$1, + clonesFromRect, + clonesHidden; + +function MultiDragPlugin() { + function MultiDrag(sortable) { + // Bind all private methods + for (var fn in this) { + if (fn.charAt(0) === '_' && typeof this[fn] === 'function') { + this[fn] = this[fn].bind(this); + } + } + + if (sortable.options.supportPointer) { + on(document, 'pointerup', this._deselectMultiDrag); + } else { + on(document, 'mouseup', this._deselectMultiDrag); + on(document, 'touchend', this._deselectMultiDrag); + } + + on(document, 'keydown', this._checkKeyDown); + on(document, 'keyup', this._checkKeyUp); + this.defaults = { + selectedClass: 'sortable-selected', + multiDragKey: null, + setData: function setData(dataTransfer, dragEl) { + var data = ''; + + if (multiDragElements.length && multiDragSortable === sortable) { + multiDragElements.forEach(function (multiDragElement, i) { + data += (!i ? '' : ', ') + multiDragElement.textContent; + }); + } else { + data = dragEl.textContent; + } + + dataTransfer.setData('Text', data); + } + }; + } + + MultiDrag.prototype = { + multiDragKeyDown: false, + isMultiDrag: false, + delayStartGlobal: function delayStartGlobal(_ref) { + var dragged = _ref.dragEl; + dragEl$1 = dragged; + }, + delayEnded: function delayEnded() { + this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1); + }, + setupClone: function setupClone(_ref2) { + var sortable = _ref2.sortable, + cancel = _ref2.cancel; + if (!this.isMultiDrag) return; + + for (var i = 0; i < multiDragElements.length; i++) { + multiDragClones.push(clone(multiDragElements[i])); + multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex; + multiDragClones[i].draggable = false; + multiDragClones[i].style['will-change'] = ''; + toggleClass(multiDragClones[i], this.options.selectedClass, false); + multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false); + } + + sortable._hideClone(); + + cancel(); + }, + clone: function clone(_ref3) { + var sortable = _ref3.sortable, + rootEl = _ref3.rootEl, + dispatchSortableEvent = _ref3.dispatchSortableEvent, + cancel = _ref3.cancel; + if (!this.isMultiDrag) return; + + if (!this.options.removeCloneOnHide) { + if (multiDragElements.length && multiDragSortable === sortable) { + insertMultiDragClones(true, rootEl); + dispatchSortableEvent('clone'); + cancel(); + } + } + }, + showClone: function showClone(_ref4) { + var cloneNowShown = _ref4.cloneNowShown, + rootEl = _ref4.rootEl, + cancel = _ref4.cancel; + if (!this.isMultiDrag) return; + insertMultiDragClones(false, rootEl); + multiDragClones.forEach(function (clone) { + css(clone, 'display', ''); + }); + cloneNowShown(); + clonesHidden = false; + cancel(); + }, + hideClone: function hideClone(_ref5) { + var _this = this; + + var sortable = _ref5.sortable, + cloneNowHidden = _ref5.cloneNowHidden, + cancel = _ref5.cancel; + if (!this.isMultiDrag) return; + multiDragClones.forEach(function (clone) { + css(clone, 'display', 'none'); + + if (_this.options.removeCloneOnHide && clone.parentNode) { + clone.parentNode.removeChild(clone); + } + }); + cloneNowHidden(); + clonesHidden = true; + cancel(); + }, + dragStartGlobal: function dragStartGlobal(_ref6) { + var sortable = _ref6.sortable; + + if (!this.isMultiDrag && multiDragSortable) { + multiDragSortable.multiDrag._deselectMultiDrag(); + } + + multiDragElements.forEach(function (multiDragElement) { + multiDragElement.sortableIndex = index(multiDragElement); + }); // Sort multi-drag elements + + multiDragElements = multiDragElements.sort(function (a, b) { + return a.sortableIndex - b.sortableIndex; + }); + dragStarted = true; + }, + dragStarted: function dragStarted(_ref7) { + var _this2 = this; + + var sortable = _ref7.sortable; + if (!this.isMultiDrag) return; + + if (this.options.sort) { + // Capture rects, + // hide multi drag elements (by positioning them absolute), + // set multi drag elements rects to dragRect, + // show multi drag elements, + // animate to rects, + // unset rects & remove from DOM + sortable.captureAnimationState(); + + if (this.options.animation) { + multiDragElements.forEach(function (multiDragElement) { + if (multiDragElement === dragEl$1) return; + css(multiDragElement, 'position', 'absolute'); + }); + var dragRect = getRect(dragEl$1, false, true, true); + multiDragElements.forEach(function (multiDragElement) { + if (multiDragElement === dragEl$1) return; + setRect(multiDragElement, dragRect); + }); + folding = true; + initialFolding = true; + } + } + + sortable.animateAll(function () { + folding = false; + initialFolding = false; + + if (_this2.options.animation) { + multiDragElements.forEach(function (multiDragElement) { + unsetRect(multiDragElement); + }); + } // Remove all auxiliary multidrag items from el, if sorting enabled + + + if (_this2.options.sort) { + removeMultiDragElements(); + } + }); + }, + dragOver: function dragOver(_ref8) { + var target = _ref8.target, + completed = _ref8.completed, + cancel = _ref8.cancel; + + if (folding && ~multiDragElements.indexOf(target)) { + completed(false); + cancel(); + } + }, + revert: function revert(_ref9) { + var fromSortable = _ref9.fromSortable, + rootEl = _ref9.rootEl, + sortable = _ref9.sortable, + dragRect = _ref9.dragRect; + + if (multiDragElements.length > 1) { + // Setup unfold animation + multiDragElements.forEach(function (multiDragElement) { + sortable.addAnimationState({ + target: multiDragElement, + rect: folding ? getRect(multiDragElement) : dragRect + }); + unsetRect(multiDragElement); + multiDragElement.fromRect = dragRect; + fromSortable.removeAnimationState(multiDragElement); + }); + folding = false; + insertMultiDragElements(!this.options.removeCloneOnHide, rootEl); + } + }, + dragOverCompleted: function dragOverCompleted(_ref10) { + var sortable = _ref10.sortable, + isOwner = _ref10.isOwner, + insertion = _ref10.insertion, + activeSortable = _ref10.activeSortable, + parentEl = _ref10.parentEl, + putSortable = _ref10.putSortable; + var options = this.options; + + if (insertion) { + // Clones must be hidden before folding animation to capture dragRectAbsolute properly + if (isOwner) { + activeSortable._hideClone(); + } + + initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location + + if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) { + // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible + var dragRectAbsolute = getRect(dragEl$1, false, true, true); + multiDragElements.forEach(function (multiDragElement) { + if (multiDragElement === dragEl$1) return; + setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted + // while folding, and so that we can capture them again because old sortable will no longer be fromSortable + + parentEl.appendChild(multiDragElement); + }); + folding = true; + } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out + + + if (!isOwner) { + // Only remove if not folding (folding will remove them anyways) + if (!folding) { + removeMultiDragElements(); + } + + if (multiDragElements.length > 1) { + var clonesHiddenBefore = clonesHidden; + + activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden + + + if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) { + multiDragClones.forEach(function (clone) { + activeSortable.addAnimationState({ + target: clone, + rect: clonesFromRect + }); + clone.fromRect = clonesFromRect; + clone.thisAnimationDuration = null; + }); + } + } else { + activeSortable._showClone(sortable); + } + } + } + }, + dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) { + var dragRect = _ref11.dragRect, + isOwner = _ref11.isOwner, + activeSortable = _ref11.activeSortable; + multiDragElements.forEach(function (multiDragElement) { + multiDragElement.thisAnimationDuration = null; + }); + + if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) { + clonesFromRect = _extends({}, dragRect); + var dragMatrix = matrix(dragEl$1, true); + clonesFromRect.top -= dragMatrix.f; + clonesFromRect.left -= dragMatrix.e; + } + }, + dragOverAnimationComplete: function dragOverAnimationComplete() { + if (folding) { + folding = false; + removeMultiDragElements(); + } + }, + drop: function drop(_ref12) { + var evt = _ref12.originalEvent, + rootEl = _ref12.rootEl, + parentEl = _ref12.parentEl, + sortable = _ref12.sortable, + dispatchSortableEvent = _ref12.dispatchSortableEvent, + oldIndex = _ref12.oldIndex, + putSortable = _ref12.putSortable; + var toSortable = putSortable || this.sortable; + if (!evt) return; + var options = this.options, + children = parentEl.children; // Multi-drag selection + + if (!dragStarted) { + if (options.multiDragKey && !this.multiDragKeyDown) { + this._deselectMultiDrag(); + } + + toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1)); + + if (!~multiDragElements.indexOf(dragEl$1)) { + multiDragElements.push(dragEl$1); + dispatchEvent({ + sortable: sortable, + rootEl: rootEl, + name: 'select', + targetEl: dragEl$1, + originalEvt: evt + }); // Modifier activated, select from last to dragEl + + if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) { + var lastIndex = index(lastMultiDragSelect), + currentIndex = index(dragEl$1); + + if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) { + // Must include lastMultiDragSelect (select it), in case modified selection from no selection + // (but previous selection existed) + var n, i; + + if (currentIndex > lastIndex) { + i = lastIndex; + n = currentIndex; + } else { + i = currentIndex; + n = lastIndex + 1; + } + + for (; i < n; i++) { + if (~multiDragElements.indexOf(children[i])) continue; + toggleClass(children[i], options.selectedClass, true); + multiDragElements.push(children[i]); + dispatchEvent({ + sortable: sortable, + rootEl: rootEl, + name: 'select', + targetEl: children[i], + originalEvt: evt + }); + } + } + } else { + lastMultiDragSelect = dragEl$1; + } + + multiDragSortable = toSortable; + } else { + multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1); + lastMultiDragSelect = null; + dispatchEvent({ + sortable: sortable, + rootEl: rootEl, + name: 'deselect', + targetEl: dragEl$1, + originalEvt: evt + }); + } + } // Multi-drag drop + + + if (dragStarted && this.isMultiDrag) { + folding = false; // Do not "unfold" after around dragEl if reverted + + if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) { + var dragRect = getRect(dragEl$1), + multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')'); + if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null; + toSortable.captureAnimationState(); + + if (!initialFolding) { + if (options.animation) { + dragEl$1.fromRect = dragRect; + multiDragElements.forEach(function (multiDragElement) { + multiDragElement.thisAnimationDuration = null; + + if (multiDragElement !== dragEl$1) { + var rect = folding ? getRect(multiDragElement) : dragRect; + multiDragElement.fromRect = rect; // Prepare unfold animation + + toSortable.addAnimationState({ + target: multiDragElement, + rect: rect + }); + } + }); + } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert + // properly they must all be removed + + + removeMultiDragElements(); + multiDragElements.forEach(function (multiDragElement) { + if (children[multiDragIndex]) { + parentEl.insertBefore(multiDragElement, children[multiDragIndex]); + } else { + parentEl.appendChild(multiDragElement); + } + + multiDragIndex++; + }); // If initial folding is done, the elements may have changed position because they are now + // unfolding around dragEl, even though dragEl may not have his index changed, so update event + // must be fired here as Sortable will not. + + if (oldIndex === index(dragEl$1)) { + var update = false; + multiDragElements.forEach(function (multiDragElement) { + if (multiDragElement.sortableIndex !== index(multiDragElement)) { + update = true; + return; + } + }); + + if (update) { + dispatchSortableEvent('update'); + } + } + } // Must be done after capturing individual rects (scroll bar) + + + multiDragElements.forEach(function (multiDragElement) { + unsetRect(multiDragElement); + }); + toSortable.animateAll(); + } + + multiDragSortable = toSortable; + } // Remove clones if necessary + + + if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') { + multiDragClones.forEach(function (clone) { + clone.parentNode && clone.parentNode.removeChild(clone); + }); + } + }, + nullingGlobal: function nullingGlobal() { + this.isMultiDrag = dragStarted = false; + multiDragClones.length = 0; + }, + destroyGlobal: function destroyGlobal() { + this._deselectMultiDrag(); + + off(document, 'pointerup', this._deselectMultiDrag); + off(document, 'mouseup', this._deselectMultiDrag); + off(document, 'touchend', this._deselectMultiDrag); + off(document, 'keydown', this._checkKeyDown); + off(document, 'keyup', this._checkKeyUp); + }, + _deselectMultiDrag: function _deselectMultiDrag(evt) { + if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable + + if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable + + if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click + + if (evt && evt.button !== 0) return; + + while (multiDragElements.length) { + var el = multiDragElements[0]; + toggleClass(el, this.options.selectedClass, false); + multiDragElements.shift(); + dispatchEvent({ + sortable: this.sortable, + rootEl: this.sortable.el, + name: 'deselect', + targetEl: el, + originalEvt: evt + }); + } + }, + _checkKeyDown: function _checkKeyDown(evt) { + if (evt.key === this.options.multiDragKey) { + this.multiDragKeyDown = true; + } + }, + _checkKeyUp: function _checkKeyUp(evt) { + if (evt.key === this.options.multiDragKey) { + this.multiDragKeyDown = false; + } + } + }; + return _extends(MultiDrag, { + // Static methods & properties + pluginName: 'multiDrag', + utils: { + /** + * Selects the provided multi-drag item + * @param {HTMLElement} el The element to be selected + */ + select: function select(el) { + var sortable = el.parentNode[expando]; + if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return; + + if (multiDragSortable && multiDragSortable !== sortable) { + multiDragSortable.multiDrag._deselectMultiDrag(); + + multiDragSortable = sortable; + } + + toggleClass(el, sortable.options.selectedClass, true); + multiDragElements.push(el); + }, + + /** + * Deselects the provided multi-drag item + * @param {HTMLElement} el The element to be deselected + */ + deselect: function deselect(el) { + var sortable = el.parentNode[expando], + index = multiDragElements.indexOf(el); + if (!sortable || !sortable.options.multiDrag || !~index) return; + toggleClass(el, sortable.options.selectedClass, false); + multiDragElements.splice(index, 1); + } + }, + eventProperties: function eventProperties() { + var _this3 = this; + + var oldIndicies = [], + newIndicies = []; + multiDragElements.forEach(function (multiDragElement) { + oldIndicies.push({ + multiDragElement: multiDragElement, + index: multiDragElement.sortableIndex + }); // multiDragElements will already be sorted if folding + + var newIndex; + + if (folding && multiDragElement !== dragEl$1) { + newIndex = -1; + } else if (folding) { + newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')'); + } else { + newIndex = index(multiDragElement); + } + + newIndicies.push({ + multiDragElement: multiDragElement, + index: newIndex + }); + }); + return { + items: _toConsumableArray(multiDragElements), + clones: [].concat(multiDragClones), + oldIndicies: oldIndicies, + newIndicies: newIndicies + }; + }, + optionListeners: { + multiDragKey: function multiDragKey(key) { + key = key.toLowerCase(); + + if (key === 'ctrl') { + key = 'Control'; + } else if (key.length > 1) { + key = key.charAt(0).toUpperCase() + key.substr(1); + } + + return key; + } + } + }); +} + +function insertMultiDragElements(clonesInserted, rootEl) { + multiDragElements.forEach(function (multiDragElement, i) { + var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)]; + + if (target) { + rootEl.insertBefore(multiDragElement, target); + } else { + rootEl.appendChild(multiDragElement); + } + }); +} +/** + * Insert multi-drag clones + * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted + * @param {HTMLElement} rootEl + */ + + +function insertMultiDragClones(elementsInserted, rootEl) { + multiDragClones.forEach(function (clone, i) { + var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)]; + + if (target) { + rootEl.insertBefore(clone, target); + } else { + rootEl.appendChild(clone); + } + }); +} + +function removeMultiDragElements() { + multiDragElements.forEach(function (multiDragElement) { + if (multiDragElement === dragEl$1) return; + multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement); + }); +} + +Sortable.mount(new AutoScrollPlugin()); +Sortable.mount(Remove, Revert); + +/* harmony default export */ __webpack_exports__["default"] = (Sortable); + + + +/***/ }), +/* 40 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35); +/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37); +/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98); +/* harmony import */ var _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(103); +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } + + + + + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__["default"].getLogger("Isocurve"); + +/** + * @classdesc + * + * Leaflet Control Class to compute and display Isochrone or isodistances curves. + * + * Use {@link module:Controls.Isocurve L.geoportalControl.Isocurve()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control native class. + * + * @namespace + * @alias L.geoportalControl.Isocurve + */ +var Isocurve = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Control.extend( /** @lends L.geoportalControl.Isocurve.prototype */{ + includes: _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_5__["default"], + /** + * Options du service + * + * @private + */ + options: { + position: "topleft", + collapsed: true, + // plier ! + methods: ["time", "distance"], + graphs: ["Voiture", "Pieton"], + exclusions: { + toll: false, + tunnel: false, + bridge: false + }, + directions: ["departure", "arrival"], + disableReverse: false, + isocurveOptions: {}, + autocompleteOptions: {} + }, + /** + * @constructor Isocurve + * + * @private + * @param {Object} options - Isocurve control options + * @param {String} [options.apiKey] - API key for services call (isocurve and autocomplete services). The "calcul" key is used by default. + * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol) + * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true. + * @param {Object} [options.exclusions = {"toll" : false, "tunnel" : false, "bridge" : false}] - list of exclusions with status (true = checked), by default : ["toll":false, "tunnel":false, "bridge":false]. + * @param {Array} [options.graphs = ["Voiture", "Pieton"]] - list of graph resources to be used for isocurve calculation, by default : ["Voiture", "Pieton"]. The first element is selected. + * @param {Array} [options.methods = ["time", "distance"]] - list of methods, by default : ["time", "distance"]. The first element is selected by default. + * @param {Array} [options.directions = ["departure", "arrival"]] - list of directions to be displayed, by default : ["departure", "arrival"]. The first element is selected by default. + * Directions enable to specify if input location point will be used as a departure point ("departure") or as an arrival point ("arrival") + * @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding + * @param {Object} [options.isocurveOptions = {}] - isocurve service options. + * @param {Object} [options.autocompleteOptions = {}] - autocomplete service options. + * @example + * var iso = L.geoportalControl.Isocurve({ + * collapsed : false + * methods : ["time", "distance"], + * exclusions : { + * toll : true, + * bridge : false, + * tunnel : true + * }, + * graphs : ["Pieton", "Voiture"], + * isocurveOptions : {}, + * autocompleteOptions : {} + * }); + */ + initialize: function initialize(options) { + // on transmet les options au controle + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.setOptions(this, options); + + /** uuid */ + this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__["default"].generate(); + + /** detection du support : desktop ou tactile */ + this._isDesktop = this._detectSupport(); + + /** detection si le panneau est reduit */ + // on desactive l'impl. reduction de la fenetre + // this._reducePanel = false; + + /** container principaux */ + this._waitingContainer = null; + this._showContainer = null; + this._pictoContainer = null; + this._formContainer = null; + this._submitContainer = null; + + /** Mode de transport selectionné : 'Voiture' ou 'Pieton' */ + this._currentTransport = null; + + /** Sens du parcours selectionné : 'Départ' ou 'Arrivée' */ + this._currentDirection = null; + + /** Type d'isochrone et valeur selectionné : 'isochrone' ou 'distance' */ + this._currentComputation = null; + this._currentTimeHour = 0; + this._currentTimeMinute = 0; + this._currentDistance = 0; + + /** Exclusions selectionnées : Tunnel, Toll et Bridge */ + this._currentExclusions = []; + + // initialisation + this._initTransport(); + this._initComputation(); + this._initDirection(); + this._initExclusions(); + + /** le point */ + this._currentPoint = null; + + /** la geometrie de l'isochrone */ + this._geojsonIso = null; + + /** si un calcul est en cours ou non */ + this._waiting = false; + /** timer pour cacher la patience après un certain temps */ + this._timer = null; + + /** + * reponse du service + * Ex. { + * totalTime, totalDistance, bbox, routeGeometry, + * routeInstructions : [{duration, distance, code, instruction, bbox, geometry}] + * } + */ + this._currentIsoResults = null; + + /** + * liste des ressources avec droits par service + * Ex. { + * "IsoChrone" : { + * key : "ger4g456re45er456t4er5ge5", + * resources : ["Pieton", "Voiture"] + * } + * } + */ + this._resources = {}; + }, + /** + * this method is called by this.addTo(map) when the control is added on the map + * and fills variable 'this._container = this.onAdd(map)', + * and create or disable events on map. + * @param {L.Map} map - object map + * @returns {DOMElement} container + * @private + */ + onAdd: function onAdd(map) { + // initialisation du DOM du composant + var container = this._container = this._initLayout(map); + + // deactivate of events that may interfere with the map + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container); + return container; + }, + /** + * TODO this method is called when the control is removed from the map + * and removes events on map. + * + * @private + */ + onRemove: function onRemove( /* map */) {}, + // ################################################################### // + // ####################### init application ########################## // + // ################################################################### // + + /** + * this method is called by the constructor and initialize the ... + * + * @private + */ + _initTransport: function _initTransport() { + // Mode de transport selectionné + this._currentTransport = "Voiture"; // par defaut + + // par defaut + var transport = this.options.graphs; + if (!transport || transport.length === 0) { + this.options.graphs = ["Voiture", "Pieton"]; + } + + // option + if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.isArray(transport) && transport.length) { + // FIXME pb si le 1er graphe n'est pas une ressource connue ! + if (transport[0] === "Voiture" || transport[0] === "Pieton") { + this._currentTransport = transport[0]; + } + } + + // option sur le service + var serviceOptions = this.options.isocurveOptions; + if (serviceOptions.graph) { + this._currentTransport = serviceOptions.graph; + } + }, + /** + * this method is called by the constructor and initialize the ... + * + * @private + */ + _initDirection: function _initDirection() { + this._currentDirection = "departure"; // par defaut + + // par defaut + var directions = this.options.directions; + if (!directions || directions.length === 0) { + this.options.directions = ["departure", "arrival"]; + } + + // option + if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.isArray(directions) && directions.length) { + // FIXME pb si le 1er graphe n'est pas une ressource connue ! + if (directions[0] === "departure" || directions[0] === "arrival") { + this._currentDirection = directions[0]; + } + } + + // si l'utilisateur a spécifié une méthode dans le service, on surcharge les options du widget + var serviceOptions = this.options.isocurveOptions; + if (!serviceOptions.reverse) { + this._currentDirection = "departure"; + } + if (serviceOptions.reverse === true) { + this._currentDirection = "arrival"; + this.options.directions = ["arrival", "departure"]; + } + }, + /** + * this method is called by the constructor and initialize the ... + * + * @private + */ + _initComputation: function _initComputation() { + // Mode de calcul selectionné + this._currentComputation = "time"; // par defaut + + // par defaut + var methods = this.options.methods; + if (!methods || methods.length === 0) { + this.options.methods = ["time", "distance"]; + } + + // option + if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.isArray(methods) && methods.length) { + // FIXME pb si le 1er graphe n'est pas une ressource connue ! + if (methods[0] === "time" || methods[0] === "distance") { + this._currentComputation = methods[0]; + } + } + + // si l'utilisateur a spécifié une méthode dans le service, on surcharge les options du widget + var serviceOptions = this.options.isocurveOptions; + if (serviceOptions.method) { + this._currentComputation = serviceOptions.method; + } + if (serviceOptions.time) { + this._currentComputation = "time"; + } + if (serviceOptions.distance) { + this._currentComputation = "distance"; + } + }, + /** + * this method is called by the constructor and initialize the ... + * + * @private + */ + _initExclusions: function _initExclusions() { + // Exclusions selectionnées : Tunnel, Toll et Bridge + this._currentExclusions = []; // par defaut + + // par defaut + var exclusion = this.options.exclusions; + if (!exclusion || _typeof(exclusion) === "object" && Object.keys(exclusion).length === 0) { + this.options.exclusions = { + toll: false, + tunnel: false, + bridge: false + }; + } + + // option + if (exclusion && _typeof(exclusion) === "object" && Object.keys(exclusion).length) { + for (var k in exclusion) { + if (exclusion.hasOwnProperty(k)) { + if (exclusion.k) { + this._currentExclusions.push(k); + } + } + } + } + + // si l'utilisateur a spécifié des exclusions dans le service, on surcharge les options du widget + var serviceOptions = this.options.isocurveOptions; + if (Array.isArray(serviceOptions.exclusions)) { + this._currentExclusions = serviceOptions.exclusions; + } + }, + // ################################################################### // + // ############################## other init ######################### // + // ################################################################### // + + /** + * this method is called by the constructor. + * this information is useful to switch to touch mode. + * Detection : test for desktop or tactile + * @returns {Boolean} desktop or tactile + * @private + */ + _detectSupport: function _detectSupport() { + // TODO + // Choix de gérer la détection dans le code du composant au lieu du DOM car : + // Utilisation de l'implémentation Leaflet + // http://leafletjs.com/reference.html#browser + + var isDesktop = true; + var userAgent = window.navigator.userAgent.toLowerCase(); + if (userAgent.indexOf("iphone") !== -1 || userAgent.indexOf("ipod") !== -1 || userAgent.indexOf("ipad") !== -1 || userAgent.indexOf("android") !== -1 || userAgent.indexOf("mobile") !== -1 || userAgent.indexOf("blackberry") !== -1 || userAgent.indexOf("tablet") !== -1 || userAgent.indexOf("phone") !== -1 || userAgent.indexOf("touch") !== -1) { + isDesktop = false; + } + if (userAgent.indexOf("msie") !== -1 || userAgent.indexOf("trident") !== -1) { + isDesktop = true; + } + return isDesktop; + }, + // ################################################################### // + // ########################### init dom ############################## // + // ################################################################### // + + /** + * this method is called by this.onAdd(map) + * and initialize the container HTMLElement + * @param {L.Map} map - object map + * @returns {DOMElement} container + * @private + */ + _initLayout: function _initLayout(map) { + // create main container + var container = this._createMainContainerElement(); + var inputShow = this._showContainer = this._createShowIsoElement(); + container.appendChild(inputShow); + + // mode "collapsed" + if (!this.options.collapsed) { + inputShow.checked = true; + } + var picto = this._pictoContainer = this._createShowIsoPictoElement(); + container.appendChild(picto); + + // panneau + var panel = this._createIsoPanelElement(); + + // header + var header = this._createIsoPanelHeaderElement(); + panel.appendChild(header); + + // form + var form = this._formContainer = this._createIsoPanelFormElement(); + + // form: menu des points + var point = this._createIsoPanelFormPointElement(map); + form.appendChild(point); + + // form: menu du choix de la méthode de calcul (time ou distance) + var isoChronChecked = false; + var isoDistChecked = false; + var typeChoice = this._createIsoPanelFormTypeChoiceElement(); + for (var i = 0; i < this.options.methods.length; i++) { + if (this.options.methods[i] === "time") { + isoChronChecked = i === 0; + typeChoice.appendChild(this._createIsoPanelFormTypeChoiceChronElement(isoChronChecked)); + } + if (this.options.methods[i] === "distance") { + isoDistChecked = i === 0; + typeChoice.appendChild(this._createIsoPanelFormTypeChoiceDistElement(isoDistChecked)); + } + } + form.appendChild(typeChoice); + + // form: menu du choix des valeurs + form.appendChild(this._createIsoPanelFormValueIsochronElement(isoChronChecked)); + form.appendChild(this._createIsoPanelFormValueIsodistanceElement(isoDistChecked)); + + // form: menu du choix du transport et du sens du parcours + var modeChoice = this._createIsoPanelFormModeChoiceElement(); + modeChoice.appendChild(this._createIsoPanelFormModeChoiceTransportElement(this.options.graphs)); + modeChoice.appendChild(this._createIsoPanelFormModeChoiceDirectionElement(this.options.directions)); + form.appendChild(modeChoice); + + // form: menu des exclusions + if (this.options.exclusions && _typeof(this.options.exclusions) === "object" && Object.keys(this.options.exclusions).length !== 0) { + form.appendChild(this._createShowIsoExclusionsElement()); + form.appendChild(this._createShowIsoExclusionsPictoElement()); + var exclusion = this._createIsoPanelFormExclusionsElement(); + exclusion.appendChild(this._createIsoPanelFormExclusionOptionsElement(this.options.exclusions)); + form.appendChild(exclusion); + } + var divReset = this._createIsoFormResetElement(); + form.appendChild(divReset); + + // form: bouton du calcul + var submit = this._submitContainer = this._createIsoSubmitFormElement(); + form.appendChild(submit); + panel.appendChild(form); + + // waiting + var waiting = this._waitingContainer = this._createIsoWaitingElement(); + panel.appendChild(waiting); + container.appendChild(panel); + return container; + }, + // ################################################################### // + // ############################## DOM ################################ // + // ################################################################### // + + /** + * Create a Point + * OVERWRITTEN + * @param {L.Map} map - object map + * @returns {Object} DOM element + * @private + */ + _createIsoPanelFormPointElement: function _createIsoPanelFormPointElement(map) { + // point de depart + this._currentPoint = new _LocationSelector__WEBPACK_IMPORTED_MODULE_4__["default"]({ + apiKey: this.options.apiKey || null, + tag: { + id: 0, + unique: this._uid, + label: "Départ", + color: "red", + display: true + }, + displayInfo: true, + disableReverse: this.options.disableReverse, + autocompleteOptions: this.options.autocompleteOptions || null + }); + this._currentPoint.setMap(map); + return this._currentPoint.getContainer(); + }, + // ################################################################### // + // ####################### handlers events to dom #################### // + // ################################################################### // + + /** + * this method is called by event 'click' on 'GPshowIsochronPicto' picto + * (cf. this._createShowIsoPictoElement), + * and clear inputs and previous isochrone drawings + * + * @param {Object} e - HTMLElement + * + * @private + */ + onShowIsoPanelClick: function onShowIsoPanelClick(e) { + logger.log("onShowIsoPanelClick", e); + // on desactive l'impl. reduction de la fenetre + // if (this._geojsonIso && !this._reducePanel) { + // this._clear(); + // } + // this._reducePanel = false; + }, + + /** + * this method is called by event 'click' on '' arrow button + * (cf. this.), + * and clear inputs and previous isochrone drawings + * + * @param {Object} e - HTMLElement + * + * @private + */ + onIsoResetClick: function onIsoResetClick(e) { + logger.log("onIsoResetClick", e); + this._clear(); + }, + // // on desactive l'impl. reduction de la fenetre + // /** + // * this method is called by event 'click' on 'GPisochronPanelReduce' picto + // * (cf. this.), + // * and reduce the panel + // * + // * @private + // */ + // onReduceIsoPanelClick : function () { + // logger.log("onReduceIsoPanelClick"); + // this._reducePanel = true; + // }, + + /** + * this method is called by event 'change' on 'GPisochronChoiceAltDist' or 'GPisochronChoiceAltChron' + * input (cf. this._createIsoPanelFormTypeChoiceElement), + * and updates current computation mode + * + * @param {Object} e - HTMLElement + * + * @private + */ + onIsoTypeChoiceChange: function onIsoTypeChoiceChange(e) { + var value = e.target.value; + if (!value) { + return; + } + if (value === "isodistance") { + this._currentComputation = "distance"; + } + if (value === "isochron") { + this._currentComputation = "time"; + } + }, + /** + * this method is called by event 'click' on 'GPisochronTransportPedestrian' or 'GPisochronTransportCar' + * input (cf. this._createIsoPanelFormModeChoiceTransportElement), + * and updates current transport mode + * + * @param {Object} e - HTMLElement + * + * @private + */ + onIsoModeTransportChange: function onIsoModeTransportChange(e) { + var value = e.target.value; + if (!value) { + return; + } + this._currentTransport = value; + }, + /** + * this method is called by event 'change' on 'GPisochronDirectionSelect' select + * (cf. this._createIsoPanelFormModeChoiceDirectionElement), + * and updates current direction mode + * + * @param {Object} e - HTMLElement + * + * @private + */ + onIsoModeDirectionChange: function onIsoModeDirectionChange(e) { + var value = e.target.value; + if (!value) { + return; + } + this._currentDirection = value; + }, + /** + * this method is called by event 'change' on '' + * input (cf. this.), + * and updates current time value + * + * @param {Object} e - HTMLElement + * + * @private + */ + onIsoValueChronTimeHourChange: function onIsoValueChronTimeHourChange(e) { + var value = e.target.value; + + // pointer to... + this._timeHourContainer = e.target; + if (!value) { + return; + } + this._currentTimeHour = value; + }, + /** + * this method is called by event 'change' on '' + * input (cf. this.), + * and updates current time value + * + * @param {Object} e - HTMLElement + * + * @private + */ + onIsoValueChronTimeMinuteChange: function onIsoValueChronTimeMinuteChange(e) { + var value = e.target.value; + + // pointer to... + this._timeMinuteContainer = e.target; + if (!value) { + return; + } + this._currentTimeMinute = value; + }, + /** + * this method is called by event 'change' on '' + * input (cf. this.), + * and updates current distance value + * + * @param {Object} e - HTMLElement + * + * @private + */ + onIsoValueDistChange: function onIsoValueDistChange(e) { + var value = e.target.value; + + // pointer to... + this._distanceContainer = e.target; + if (!value) { + return; + } + this._currentDistance = value; + }, + /** + * this method is called by event 'change' on 'GPIsoExclusionsToll' + * or 'GPIsoeExclusionsTunnel' or 'GPIsoExclusionsBridge' tag input + * (cf. this._createIsoPanelFormExclusionOptionsElement). + * this value is saved as a parameter for the service isocurve. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onIsoExclusionsChange: function onIsoExclusionsChange(e) { + var value = e.target.value; + var checked = e.target.checked; + if (!value) { + return; + } + var bFound = false; + var iFound = null; + for (var i = 0; i < this._currentExclusions.length; i++) { + if (deepEqual(this._currentExclusions[i], value.toLowerCase())) { + iFound = i; + bFound = true; + } + } + // on l'ajoute si la valeur n'existe pas et est selectionnée + if (!bFound && !checked) { + this._currentExclusions.push(value.toLowerCase()); + } + // on la retire si la valeur existe et est deselectionnée + if (bFound && checked) { + this._currentExclusions.splice(iFound, 1); + } + }, + /** + * this method is called by event 'submit' on 'GPisochronForm' tag form + * (cf. this._createIsoPanelFormElement), + * and call isocurve service to display results + * + * @private + */ + onIsoComputationSubmit: function onIsoComputationSubmit() { + if (!this._currentPoint || !this._currentPoint.getCoordinate || !this._currentPoint.getCoordinate()) { + return; + } + + // récupération du temps + var time; + if (this._currentComputation.toLowerCase() === "time") { + // durée exprimée en secondes + time = this._currentTimeHour * 3600 + this._currentTimeMinute * 60; + logger.log("time : ", time); + } + + // récupération de la distance + var distance; + if (this._currentComputation.toLowerCase() === "distance") { + // distance exprimée en mètres + distance = this._currentDistance * 1000; + logger.log("distance : ", distance); + } + + // si on n'a pas de valeur de calcul renseignée, on ne lance pas la requête. + if (!time && !distance) { + logger.log("Missing time or distance parameter"); + return; + } + + // mise en place de la patience + this._displayWaitingContainer(); + var self = this; + var pointCoordinate = self._currentPoint.getCoordinate(); + var position = { + x: pointCoordinate.lon || pointCoordinate.lng, + y: pointCoordinate.lat + }; + this._requestIsoCurve({ + position: position, + graph: self._currentTransport, + exclusions: self._currentExclusions, + method: self._currentComputation, + reverse: self._currentDirection.toLowerCase() === "arrival", + time: time, + distance: distance, + smoothing: true, + timeout: 7000, + protocol: "XHR", + // callback onSuccess + onSuccess: function onSuccess(results) { + logger.log(results); + if (results) { + self._drawIsoResults(results); + } + }, + // callback onFailure + onFailure: function onFailure(error) { + // FIXME mise à jour du controle mais le service ne repond pas en 200 !? + self._hideWaitingContainer(); + self._clearIsoResultsGeometry(); + logger.log(error.message); + } + }); + }, + // ################################################################### // + // ######################## isocurve calculation ##################### // + // ################################################################### // + + /** + * this method is called by this.onIsoComputationSubmit + * and executes a request to the service. + * + * @param {Object} settings - service settings + * + * @private + */ + _requestIsoCurve: function _requestIsoCurve(settings) { + // on ne fait pas de requête si on n'a pas renseigné de parametres ! + if (!settings || _typeof(settings) === "object" && Object.keys(settings).length === 0) { + return; + } + + // on ne fait pas de requête si on n'a pas de point d'origine + if (!settings.position) { + return; + } + var options = {}; + // on recupere les parametres de saisie et les callbacks + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(options, settings); + // ainsi que les options du service + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(options, this.options.isocurveOptions); + options.apiKey = this.options.isocurveOptions.apiKey || this.options.apiKey; + + // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert + // true par défaut (https) + options.ssl = this.options.ssl; + logger.log(options); + geoportal_access_lib__WEBPACK_IMPORTED_MODULE_2__["default"].Services.isoCurve(options); + }, + /** + * this method is called by this.onIsoComputationSubmit (in case of success) + * and draw isocurve results geometry on map + * + * @param {Object} results - isocurve response results + * + * @private + */ + _drawIsoResults: function _drawIsoResults(results) { + this._clearIsoResultsGeometry(); + + // sauvegarde de l'etat des resultats + this._currentIsoResults = results; + if (!results.geometry) { + // cache la patience + this._hideWaitingContainer(); + return; + } + var map = this._map; + var _geometry = results.geometry; + var _style = { + color: "#ff7800", + weight: 5, + opacity: 0.65 + }; + this._geojsonIso = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.geoJson(_geometry, { + style: _style + }).addTo(map); + + // cache la patience + this._hideWaitingContainer(); + this._formContainer.className = "GPisochroComponentHidden"; + }, + // ################################################################### // + // ############################# Clean ############################### // + // ################################################################### // + + /** + * this method is called by this.onShowIsoPanelClick() + * and it clears all elements (reinit). + * + * @private + */ + _clear: function _clear() { + this._initTransport(); + this._initExclusions(); + this._initComputation(); + this._initDirection(); + + // resultats du service + this._currentIsoResults = null; + + // la geometrie + this._clearIsoResultsGeometry(); + + // les points + this._currentPoint.clear(); + + // nettoyer les valeurs dans le DOM ! + if (this._timeHourContainer) { + this._timeHourContainer.value = 0; + } + if (this._timeMinuteContainer) { + this._timeMinuteContainer.value = 0; + } + if (this._distanceContainer) { + this._distanceContainer.value = 0; + } + }, + /** + * this method is called by this.onIsoComputationSubmit() + * and it clears all route geometries. + * + * @private + */ + _clearIsoResultsGeometry: function _clearIsoResultsGeometry() { + var map = this._map; + if (this._geojsonIso != null) { + map.removeLayer(this._geojsonIso); + this._geojsonIso = null; + } + }, + // ################################################################### // + // ############################ Patience ############################# // + // ################################################################### // + + /** + * this method displays waiting container and sets a timeout + * + * @private + */ + _displayWaitingContainer: function _displayWaitingContainer() { + this._waitingContainer.className = "GPisochronCalcWaitingContainerVisible"; + this._waiting = true; + + // mise en place d'un timeout pour réinitialiser le panel (cacher la patience) + // si on est toujours en attente (si la requête est bloquée par exemple) + if (this._timer) { + clearTimeout(this._timer); + this._timer = null; + } + var context = this; + this._timer = setTimeout(function () { + if (context._waiting === true) { + context._hideWaitingContainer(); + } else { + if (context._timer) { + clearTimeout(context._timer); + } + } + }, 16000); + }, + /** + * this method hides waiting container and clears timeout + * + * @private + */ + _hideWaitingContainer: function _hideWaitingContainer() { + if (this._waiting) { + this._waitingContainer.className = "GPisochronCalcWaitingContainerHidden"; + this._waiting = false; + clearTimeout(this._timer); + this._timer = null; + } + }, + // ################################################################### // + // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ // + // ################################################################### // + + /** + * This method is public. + * It allows to control the execution of a traitment. + * + * @param {Object} position - position = {lon: , lat: } + * @param {Object} value - distance en km ou heures-minutes + * @param {Object} options - options = {...} + */ + compute: function compute(position, value, options) { + if (!this._showContainer.checked) { + this._pictoContainer.click(); + } + var map = this._map; + if (!map) { + return; + } + + // Les options par defauts + var settings = { + direction: "departure", + method: "time", + transport: "Voiture", + exclusions: [] + }; + + // On recupere les options + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(settings, options); + this._currentPoint.setCoordinate(position); + var input = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get("GPlocationOrigin_" + 0 + "-" + this._uid); + input.value = position.lng + " , " + position.lat; + this._currentTransport = settings.transport; + if (settings.transport === "Voiture") { + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get("GPisochronTransportCar-" + this._uid).checked = true; + } else { + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get("GPisochronTransportPedestrian-" + this._uid).checked = true; + } + this._currentExclusions = settings.exclusions; + this._currentComputation = settings.method; + if (settings.method === "time") { + var time = value.split("."); + this._currentTimeHour = time[0] || 0; + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get("GPisochronValueChronInput1-" + this._uid).value = this._currentTimeHour; + this._currentTimeMinute = time[1] || 0; + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get("GPisochronValueChronInput2-" + this._uid).value = this._currentTimeMinute; + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get("GPisochronChoiceAltChron-" + this._uid).click(); + } else { + this._currentDistance = value; + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get("GPisochronValueDistInput-" + this._uid).value = this._currentDistance; + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get("GPisochronChoiceAltDist-" + this._uid).click(); + } + this._currentDirection = settings.direction; + settings.direction === "departure" ? leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get("GPisochronDirectionSelect-" + this._uid).selectedIndex = 0 : leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.get("GPisochronDirectionSelect-" + this._uid).selectedIndex = 1; + this.onIsoComputationSubmit(); + map.flyTo(position); + } +}); +/* harmony default export */ __webpack_exports__["default"] = (Isocurve); +var deepEqual = function deepEqual(x, y) { + if (x === y) { + return true; + } else if (_typeof(x) === "object" && x != null && _typeof(y) === "object" && y != null) { + if (Object.keys(x).length !== Object.keys(y).length) { + return false; + } + for (var prop in x) { + if (y.hasOwnProperty(prop)) { + if (!deepEqual(x[prop], y[prop])) { + return false; + } + } else { + return false; + } + } + return true; + } else { + return false; + } +}; + +/***/ }), +/* 41 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "servicesVersion", function() { return servicesVersion; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "servicesDate", function() { return servicesDate; }); +/* harmony import */ var _Services_Services__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42); +/* harmony import */ var _Services_DefaultUrlService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57); +/* harmony import */ var _Services_Alti_Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71); +/* harmony import */ var _Services_Alti_Response_model_Elevation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(72); +/* harmony import */ var _Services_AutoComplete_Response_model_AutoCompleteResponse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84); +/* harmony import */ var _Services_AutoComplete_Response_model_SuggestedLocation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(85); +/* harmony import */ var _Services_ProcessIsoCurve_Response_model_ProcessIsoCurveResponse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(97); +/* harmony import */ var _Services_Route_Response_model_RouteResponse__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91); +/* harmony import */ var _Services_Route_Response_model_RouteInstruction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(92); +/* harmony import */ var _Services_Config_Config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(43); +/* harmony import */ var _Protocols_XHR__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(49); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(56); +/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(47); +/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(58); +var _package_json__WEBPACK_IMPORTED_MODULE_13___namespace = /*#__PURE__*/__webpack_require__.t(58, 1); +/** +* Global variable Gp. +* +* @module Gp +* @alias Gp +* @description +* +* This is the global variable that is exposed in the browser environment. +* Content is composed of constructor, functions and properties... +* +* > {@link Gp.Error Error()} +* - .TYPE_SRVERR : "SERVICE_ERROR" +* - .TYPE_UNKERR : "UNKNOWN_ERROR" +* - .TYPE_USEERR : "USAGE_ERROR" +* +* > {@link module:Helper Helper} +* - .indent() +* - .normalyzeParameters() +* - .normalyzeUrl() +* +* > {@link module:XHR Protocols.XHR} +* - .call() +* +* > {@link module:Services Services (objects)} +* - .Alti +* - {@link Gp.Services.Alti.Elevation .Elevation()} +* - {@link Gp.Services.AltiResponse .AltiResponse()} +* - .AutoComplete +* - {@link Gp.Services.AutoComplete.SuggestedLocation .SuggestedLocation()} +* - {@link Gp.Services.AutoCompleteResponse .AutoCompleteResponse()} +* - {@link Gp.Services.Config .Config()} +* - {@link Gp.Services.DefaultUrl .DefaultUrl()} +* - {@link Gp.Services.GeocodeResponse .GeocodeResponse()} +* - {@link Gp.Services.GetConfigResponse .GetConfigResponse()} +* - {@link Gp.Services.IsoCurveResponse .IsoCurveResponse()} +* - .Route +* - {@link Gp.Services.Route.RouteInstruction .RouteInstruction()} +* - {@link Gp.Services.RouteResponse .RouteResponse()} +* +* > Services (factory) +* - {@link module:Services~autoComplete .autoComplete()} +* - {@link module:Services~geocode .geocode()} +* - {@link module:Services~getAltitude .getAltitude()} +* - {@link module:Services~getConfig .getConfig()} +* - {@link module:Services~isoCurve .isoCurve()} +* - {@link module:Services~reverseGeocode .reverseGeocode()} +* - {@link module:Services~route .route()} +* +* > servicesDate : "YYYY-MM-DD" +* +* > servicesVersion : "X.X.X" +* +*/ + + + + + + + + + + + + + + + + + +/** Version */ +const servicesVersion = _package_json__WEBPACK_IMPORTED_MODULE_13__.version; +/** Publication date */ +const servicesDate = _package_json__WEBPACK_IMPORTED_MODULE_13__.date; + +// on declare les ns dans root global +var Gp = {}; + +Gp.servicesVersion = servicesVersion; +Gp.servicesDate = servicesDate; + +// Export Protocols +Gp.Protocols = {}; +Gp.Protocols.XHR = _Protocols_XHR__WEBPACK_IMPORTED_MODULE_10__["default"]; +// Export services +Gp.Services = _Services_Services__WEBPACK_IMPORTED_MODULE_0__["default"]; +// Export DefaultUrls +Gp.Services.DefaultUrl = _Services_DefaultUrlService__WEBPACK_IMPORTED_MODULE_1__["default"]; +// Export Alti +Gp.Services.AltiResponse = _Services_Alti_Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_2__["default"]; +Gp.Services.Alti = {}; +Gp.Services.Alti.Elevation = _Services_Alti_Response_model_Elevation__WEBPACK_IMPORTED_MODULE_3__["default"]; +// Export Autocomplete +Gp.Services.AutoCompleteResponse = _Services_AutoComplete_Response_model_AutoCompleteResponse__WEBPACK_IMPORTED_MODULE_4__["default"]; +Gp.Services.AutoComplete = {}; +Gp.Services.AutoComplete.SuggestedLocation = _Services_AutoComplete_Response_model_SuggestedLocation__WEBPACK_IMPORTED_MODULE_5__["default"]; +// Export Config +Gp.Services.Config = _Services_Config_Config__WEBPACK_IMPORTED_MODULE_9__["default"]; +// Export IsoCurve +Gp.Services.IsoCurveResponse = _Services_ProcessIsoCurve_Response_model_ProcessIsoCurveResponse__WEBPACK_IMPORTED_MODULE_6__["default"]; +// Export Route +Gp.Services.RouteResponse = _Services_Route_Response_model_RouteResponse__WEBPACK_IMPORTED_MODULE_7__["default"]; +Gp.Services.Route = {}; +Gp.Services.Route.RouteInstruction = _Services_Route_Response_model_RouteInstruction__WEBPACK_IMPORTED_MODULE_8__["default"]; +// Export Erreurs et Outils +Gp.Error = _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_11__["default"]; +Gp.Helper = _Utils_Helper__WEBPACK_IMPORTED_MODULE_12__["default"]; + +/* harmony default export */ __webpack_exports__["default"] = (Gp); + + +/***/ }), +/* 42 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Config_Config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43); +/* harmony import */ var _Alti_Alti__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60); +/* harmony import */ var _Geocode_Geocode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73); +/* harmony import */ var _Geocode_ReverseGeocode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(81); +/* harmony import */ var _AutoComplete_AutoComplete__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(82); +/* harmony import */ var _Route_Route__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(86); +/* harmony import */ var _ProcessIsoCurve_ProcessIsoCurve__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(93); +/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "point|circle|bbox" }] */ + +/** +* Geoportal web services invocation namespace. +* +* @module Services +* @alias Gp.Services +*/ + + + + + + + + +var Services = { + /** + * Access to Geoportal resources metadata availables with one ore several keys + * + * @method getConfig + * @param {Object} options - Options for function call. + * @param {String} [options.apiKey] - Access key(s) ("," as separator, no spaces) to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web} + * @param {String} [options.customConfigFile] - path to a local config file. Overload the apiKey parameter + * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GetConfigResponse} object as a parameter except if "rawResponse" parameter is set to true : a String will be returned. + * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter. + * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled. + */ + getConfig : function (options) { + var configService = new _Config_Config__WEBPACK_IMPORTED_MODULE_0__["default"](options); + configService.call(); + }, + /** + * Getting elevations in or along of one or several points on french territories using the [elevation services of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/alti.html}.
    + * Two use cases are availables :
    + * 1. getting elevations of the given points : don't use the options.sampling parameter ;
    + * 2. getting a regular set of elevations along the given points : use the options.sampling parameter. + * + * @method getAltitude + * @param {Object} options - Options for function call. + * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}. + * @param {Array.} options.positions - Array of positions ({lon:float, lat:float}) expressed in CRS:84 coordinates system, where to get elevations. 50 positions maximum may be given. 2 positions minimum are required if you use the options.sampling parameter. + * @param {Number} [options.sampling] - Number of points to use (between 2 and 5000) in order to compute an elevation path. The points given with the options.positions parameter are used to fix the planimetric path along which the elevations will be computed.
    + * If not used, only elevations of these positions will be returned. + * @param {Boolean} [options.zonly=false] - Set this parameter to true if you only want to have elevations returned without corresponding coordinates. + * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.AltiResponse} object as a parameter, except if "rawResponse" is set to true. + * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter. + * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled. + * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/alti/rest/elevation.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing. + * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true). + * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing. + * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing. + * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing. + * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing. + * @param {String} [options.contentType="application/xml"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing. + * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing. + * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing. + * @param {String} [options.api='REST'] - What API to use for interacting with underlying web service : 'REST' or 'WPS'. Only use if you know what you are doing. + * @param {String} [options.outputFormat='xml'] - Output format for underlying web service response : 'xml' or 'json'. Only use if you know what you are doing. + */ + getAltitude : function (options) { + var altiService = new _Alti_Alti__WEBPACK_IMPORTED_MODULE_1__["default"](options); + altiService.call(); + }, + /** + * Getting positon of a geographic identifier (places names, address, cadastral parcel, other...) using the [geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage.html}. + * + * @example + * Gp.Services.geocode ({ + * apiKey : "carte", + * location : "73 avenue de Paris, Saint-Mandé", + * // traitement des resultats + * onSuccess : function (result) { + * console.log("found (x:"+result.position.x+", y:"+result.position.y+")") ; + * } + * }) ; + * + * + * @method geocode + * @param {Object} options - Options for function call. + * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}. + * @param {String} [options.index="StreetAddress"] - Geographical identifier type to search. Values currently availables are : "PositionOfInterest" for place names, "StreetAddress" for address search, "CadastralParcel" for Cadastral parcels search, "location" for a multi-index search on "StreetAddress" and "PositionOfInterest". Default is "StreetAddress". + * @param {String} options.query - Geographic identifier to locate. + * @param {Object} [options.filters] - Additional filters to apply to search. The following properties may be given. + * @param {String} [options.filters.[prop]] - Additionnal properties to filter search. Properties depends on options.index, and values type should be "String". + *

    + * Properties availables for address search :
    + * "postalCode", "inseeCode" and "city". + *

    + * Properties availables for place names search :
    + * "postalCode", "inseeCode" and "type". + *

    + * Properties availables for cadastral parcels search :
    + * "codeDepartement", "codeCommune", "nomCommune", "codeCommuneAbs", "codeArrondissement", "section", "numero", "feuille". + * @param {Number} [options.maximumResponses=20] - Maximum number of responses. Default underlying service value applies (20) if not provided. + * @param {Boolean} [options.returnTrueGeometry=false] - Set this parameter to true if you wish to have the true geometrie returned. + * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GeocodeResponse} object as a parameter except if "rawResponse" is set to true. + * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter. + * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled. + * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/geoportail/ols] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing. + * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true). + * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing. + * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing. + * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing. + * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing. + */ + geocode : function (options) { + var geocodeService = new _Geocode_Geocode__WEBPACK_IMPORTED_MODULE_2__["default"](options); + geocodeService.call(); + }, + /** + * Retrieving geographical identifiers (place names, address, cadastral parcels, ...) near a given position, using the [reverse geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage-inverse.html}. + * + * @method reverseGeocode + * @param {Object} options - Options for function call. + * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}. + * @param {String} [options.index="StreetAddress"] - Geographical identifier type to search. Values currently availables are : "PositionOfInterest" for place names, "StreetAddress" for address search, "CadastralParcel" for Cadastral parcels search, "location" for a multi-index search on "StreetAddress" and "PositionOfInterest". Default is "StreetAddress". + * @param {Object} options.position - Reference position where to search geographical identifiers. + * @param {Float} options.position.lon - Longitude + * @param {Float} options.position.lat - Latitude + * @param {Object} [options.filters] - Additional filters to apply to search. The following properties may be given. + * @param {String} [options.filters.[prop]] - Additionnal properties to filter search. Properties depends on options.index, and values type should be "String". + *

    + * Properties availables for address search :
    + * "postalCode", "inseeCode" and "city". + *

    + * Properties availables for place names search :
    + * "postalCode", "inseeCode" and "type". + *

    + * Properties availables for cadastral parcels search :
    + * "codeDepartement", "codeCommune", "nomCommune", "codeCommuneAbs", "codeArrondissement", "section", "numero", "feuille". + * @param {Object} [options.searchGeometry] - Location where to perform the search. + * @param {String} options.searchGeometry.type - Geometry type (Point|Circle|Linestring|Polygon) + * @param {Array.|Array.Array.} options.searchGeometry.coordinates - Coordinates + * @param {Float} [options.searchGeometry.radius] - Radius (only for type 'Circle') + * @param {Number} [options.maximumResponses=20] - Maximum number of responses. Default underlying service value applies (20) if not provided. + * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GeocodeResponse} object as a parameter except if "rawResponse" is set to true. + * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter. + * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled. + * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/geoportail/ols] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing. + * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true). + * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing. + * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing. + * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing. + * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing. + */ + reverseGeocode : function (options) { + var reverseGeocodeService = new _Geocode_ReverseGeocode__WEBPACK_IMPORTED_MODULE_3__["default"](options); + reverseGeocodeService.call(); + }, + /** + * Getting suggestions of probable places names or address based on uncomplete texts, using the [autocompletion service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/autocompletion.html} + * + * @method autoComplete + * @param {Object} options - Options for function call. + * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}. + * @param {String} options.text - Text input to complete. + * @param {Array.} [options.filterOptions.type = "StreetAddress"] - Suggestion types to provide : address ("StreetAddress") and/or place name ("PositionOfInterest"). + * @param {Array.} [options.filterOptions.territory] - Places where to limit the search of suggestions : "METROPOLE" (Corsica and metropolitan France), "DOMTOM" (French overseas departments and territories), or an INSEE code of a department. No limitation by default. For instance : ['METROPOLE', '31'] + * @param {Number} [options.maximumResponses = 10] - Maximum number of responses. + * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.AutoCompleteResponse} object as a parameter except if "rawResponse" is set to true. + * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter. + * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled. + * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/ols/apis/completion] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing. + * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true). + * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing. + * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing. + * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing. + * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing. + * @param {String} [options.contentType="application/xml"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing. + * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing. + * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing. + */ + autoComplete : function (options) { + var autoCompleteService = new _AutoComplete_AutoComplete__WEBPACK_IMPORTED_MODULE_4__["default"](options); + autoCompleteService.call(); + }, + /** + * Getting a route from one point to another using the [route service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/itineraires.html}. + * + * @method route + * @param {Object} options - Options for function call. + * @param {String} options.resource - Resource used to compute the route. Available values are in the GetCapabilities. + * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}. + * @param {String} [options.routePreference = "fastest"] - Indicates the way to compute the route : "fastest" (time optimisation) or "shortest" (distance optimisation). Available values are in the GetCapabilities. + * @param {Gp.Point} options.startPoint - Start point of the route. Expressed in CRS:84 coordinates system (startPoint.x corresponds to longitude, startPoint.y corresponds to latitude). Available bbox are in the GetCapabilities. + * @param {Gp.Point} options.endPoint - End point of the route. Expressed in CRS:84 coordinates system (endPoint.x corresponds to longitude, endPoint.y corresponds to latitude). Available bbox are in the GetCapabilities. + * @param {Array.} [options.viaPoints] - Ordered via Points of the route. Expressed in CRS:84 coordinates system (viaPoints[i].x corresponds to longitude, viaPoints[i].y corresponds to latitude). Available bbox are in the GetCapabilities. + * @param {String} [options.graph = "Voiture"] - User profile to use to compute the route : "Voiture" (using a vehicule) or "Pieton" (pedestrian). Has an influence on the kind of roads the route may use and the average speed. Available bbox are in the GetCapabilities. + * @param {Array.} [options.exclusions] - DEPRECATED: use options.constraints. Indicates if route has to avoid some features ("toll", "bridge" or "tunnel"). + * @param {Boolean} [options.geometryInInstructions = false] - Indicates if route geometry has to be also returned with route instructions. + * @param {Boolean} [options.provideBoundingBox = true] - Indicates if route instructions has to be localised with a BBOX in the response. + * @param {String} [options.distanceUnit = "m"] - The unit used to provide distances in the response ("meter" or "kilometer"). + * @param {String} [options.timeUnit = "second"] - The unit used to provide duration in the response ("standard", "second", "minute", "hour"). + * @param {Array.} [options.waysAttributes] - Way Attributes to add in the response. Available values are in the GetCapabilities. + * @param {Array.} [options.constraints] - Constraints used ({'constraintType':'banned','key':'ways_type','operator':'=','value':'autoroute'}). Available values are in the GetCapabilities. + * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.RouteResponse} object as a parameter except if "rawResponse" is set to true. + * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter. + * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled. + * @param {String} [options.outputFormat='json'] - Output format ("json" or "xml") to use for underlying webService. Only use if you know what you are doing. + * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/itineraire/rest/route.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing. + * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true). + * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing. + * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing. + * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing. + * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing. + * @param {String} [options.contentType="application/xml"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing. + * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing. + * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing. + */ + route : function (options) { + var routeService = new _Route_Route__WEBPACK_IMPORTED_MODULE_5__["default"](options); + routeService.call(); + }, + /** + * Computing a set of places (curve) reachable from a given point (or from where to start to reach a given point) within a time or distance constraint using the [isochrone service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/isochrones.html}. + * + * @method isoCurve + * @param {Object} options - Options for function call. + * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}. + * @param {String} options.resource - Resource used to compute the route. Available values are in the GetCapabilities. + * @param {Gp.Point} options.position - Start or Arrival (options.reverse===true) Point for the computing. Expressed in CRS:84 coordinates system (position.x corresponds to longitude, position.y corresponds to latitude). + * @param {String} [options.graph = "Voiture"] - User profile to use to compute the isoCurve : "Voiture" (using a vehicule) or "Pieton" (pedestrian). Has an influence on the kind of roads to use and the average speed. Available values are in the GetCapabilities. + * @param {Array.} [options.exclusions] - DEPRECATED: use options.constraints. Indicates if route has to avoid some features ("toll", "bridge" or "tunnel"). + * @param {Array.} [options.constraints] - Constraints used ({'constraintType':'banned','key':'ways_type','operator':'=','value':'autoroute'}). Available values are in the GetCapabilities. + * @param {String} [options.method = "time"] - Computing method to use : "time" (using a duration as a constraint) or "distance" (using a distance as a constraint). Available values are in the GetCapabilities. + * @param {Float} options.time - Maximum duration (expressed in seconds) to use when options.method is set to "time". + * @param {Float} options.distance - Maximum distance (expressed in meters) to use when options.method is set to "distance". + * @param {Boolean} [options.reverse = false] - Set this parameter to true if you want options.position to be the destination (instead of departure) for the computing. + * @param {String} [options.distanceUnit = "km"] - The unit used to provide distances in the response ("m" or "km"). + * @param {String} [options.timeUnit = "second"] - The unit used to provide duration in the response ("standard", "second", "minute", "hour"). + * @param {Boolean} [options.smoothing = false] - DEPRECATED: Set this parameter to true if you want the resulting geometry to be smoothed. + * @param {Boolean} [options.holes = false] - DEPRECATED: Set this parameter to true if you want the resulting geometry (polygon) to have holes if pertinent. + * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.IsoCurveResponse} object as a parameter except if "rawResponse" is set to true. + * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter. + * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled. + * @param {String} [options.outputFormat='json'] - Output format ("json") to use for underlying webService. Only use if you know what you are doing. + * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/isochrone/isochrone.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing. + * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true). + * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing. + * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing. + * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing. + * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing. + * @param {String} [options.contentType="application/xml"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing. + * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing. + * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing. + */ + isoCurve : function (options) { + var processIsoCurveService = new _ProcessIsoCurve_ProcessIsoCurve__WEBPACK_IMPORTED_MODULE_6__["default"](options); + processIsoCurveService.call(); + } +}; + +/** + * Point object. + * + * @namespace + * @alias Gp.Point + * + * @property {Float} x - Point abscissa + * @property {Float} y - Point ordinate + */ +var point = {}; + +/** + * Circle object. + * + * @namespace + * @alias Gp.Circle + * + * @property {Float} x - Circle center abscissa. + * @property {Float} y - Circle center ordinate. + * @property {Float} radius - Circle radius. + */ +var circle = {}; + +/** + * Bounding box object, expressed with four coordinates. + * + * @namespace + * @alias Gp.BBox + * + * @property {Float} left - minimum abscissa + * @property {Float} right - maximum abscissa + * @property {Float} bottom - minimum ordinate + * @property {Float} top - maximum ordinate + */ +var bbox = {}; + +/* harmony default export */ __webpack_exports__["default"] = (Services); + + +/***/ }), +/* 43 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46); +/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57); +/* harmony import */ var _ConfigInterface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59); + + + + + + +/** + * @classdesc + * + * Recupération de la configuration de clés Géoportail sous forme de JSON + * + * @constructor + * @extends {Gp.Services.CommonService} + * @alias Gp.Services.Config + * @param {Object} options - options spécifiques au service (+ les options heritées) + * @param {Sting} options.apiKey - clé(s) dont on veut obtenir la configuration. Si plusieurs clés, séparer chacune par une virgule + * @param {Boolean} [options.sync=false] - force le mode synchrone + * @param {String} options.customConfigFile - chemin vers un fichier de configuration personnalisé. Surcharge le paramètre apiKey. + * + * @example + * var options = { + * apiKey : "cartes,ortho", + * sync : false, + * onSuccess : function (response) {}, + * onFailure : function (error) {}, + * }; + * + */ +function Config (options) { + if (!(this instanceof Config)) { + throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("CLASS_CONSTRUCTOR", "Config")); + } + + /** + * Nom de la classe (heritage) + */ + this.CLASSNAME = "Config"; + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("Gp.Config"); + this.logger.trace("[Constructeur Config (options)]"); + + // ##################### + // analyse des options + // ##################### + + // gestion du callback onSuccess + var bOnSuccess = !!(options.onSuccess !== null && typeof options.onSuccess === "function"); + if (!bOnSuccess) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "onSuccess()")); + } + if (!options.apiKey && !options.customConfigFile) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "apiKey", "customConfigFile")); + } + this.options = {}; + this.options.onSuccess = options.onSuccess; + this.options.onFailure = options.onFailure; + + // mode sync + this.options.sync = options.sync || false; + + // gestion d'un tableau d'url des fichiers de configuration + this.options.listConfigUrls = (options.customConfigFile) + ? [options.customConfigFile] + : !Array.isArray(options.apiKey) + ? _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__["default"].Config.url(options.apiKey.split(",")) + : _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__["default"].Config.url(options.apiKey); +} + +/** + * @lends module:Config# + */ +Config.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_2__["default"].prototype, { + // todo + // getter/setter +}); + +/** + * Constructeur (alias) + */ +Config.prototype.constructor = Config; + +/** + * Création de la requête + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + * @overload + */ +Config.prototype.buildRequest = function (error, success) { + // liste des urls des fichiers de configuration en JSON + this.listConfigUrls = this.options.listConfigUrls; + + if (!this.listConfigUrls) { + error.call(this, new Error("url by default not found !")); + return; + } + + // INFO : + // il n'y a pas de construction de requête, + // on passe directement à l'appel des requêtes + success.call(this, this.listConfigUrls); +}; + +/** + * Récupération des configuration + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + * @overload + */ +Config.prototype.callService = function (error, success) { + if (this.options.sync) { + __callServiceSync.call(this, error, success); + } else { + __callService.call(this, error, success); + } +}; + +/** + * Requêtes en mode asynchrone + * + * @param {*} error + * @param {*} success + * @private + */ +var __callService = function (error, success) { + // liste des resultats au format JSON + this.listConfigResults = []; + + // test on env. nodejs or browser + let Fetch = null; + if (typeof window === "undefined") { + var nodefetch = __webpack_require__(53); + Fetch = nodefetch; + } else { + Fetch = window.fetch; + } + + // the factory of fetch ! + var fetchFactory = (url) => { + return Fetch(url, { credentials : "same-origin" }) + .then((response) => { + if (response.ok) { + return response.json() + .then((json) => { + // TODO : + // tester le contenu ! + return json; + }) + .catch((error) => { + throw new Error("Exception Json : " + error); + }); + } else { + throw new Error("Exception HTTP : " + response.status + " (status code) !"); + } + }) + .catch((error) => { + return new Promise((resolve, reject) => { + // eslint-disable-line no-unused-vars + reject(error); + }); + }); + }; + + // construction des promises fetch + var promises = []; + for (let index = 0; index < this.listConfigUrls.length; index++) { + const url = this.listConfigUrls[index]; + promises.push(fetchFactory(url)); + } + + Promise.all(promises) + .then((results) => { + if (!results) { + throw new Error("results config empty !?"); + } + results.forEach((result) => { + // TODO : + // verification des resultats + this.listConfigResults.push(result); + }); + }) + .then(() => { + success.call(this, this.listConfigResults); + }) + .catch((e) => { + // TODO : + // construction d'un message + error.call(this, e); + }); +}; + +/** + * Requêtes en mode synchrone + * + * @param {*} error + * @param {*} success + * @private + */ +var __callServiceSync = function (error, success) { + // liste des resultats au format JSON + this.listConfigResults = []; + + // FIXME : + // boucle synchrone ! + for (var i = 0; i < this.listConfigUrls.length; i++) { + const url = this.listConfigUrls[i]; + // TODO : + // prévoir le CORS, headers, ... + const request = new XMLHttpRequest(); + request.open("GET", url, false); + request.send(null); + if (request.status === 200) { + // TODO : + // tester la reponse ! + var response = JSON.parse(request.responseText); + this.listConfigResults.push(response); + } + } + // callback + if (this.listConfigResults.length !== 0) { + success.call(this, this.listConfigResults); + } else { + error.call(this, new Error("...")); + } +}; + +/** + * Analyse et mise en forme de la réponse en fusionnant les configurations + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + * @overload + */ +Config.prototype.analyzeResponse = function (error, success) { + // fonction de merge des objects JSON + var mergeConfig = function (objects) { + // objet fusion des couches + var allLayersConfig = {}; + // objet fusion des clés + var allKeysConfig = {}; + // objet fusion des TMS + var allTMSConfig = {}; + + // on fusionne les résultat + for (var i = 0; i < objects.length; i++) { + if (!objects[i].generalOptions || !objects[i].layers) { + return; + } + allKeysConfig = { + ...allKeysConfig, + ...objects[i].generalOptions.apiKeys + }; + allLayersConfig = { + ...allLayersConfig, + ...objects[i].layers + }; + allTMSConfig = { + ...allTMSConfig, + ...objects[i].tileMatrixSets + }; + } + + var mergedConfig = { + generalOptions : { + apiKeys : allKeysConfig + }, + layers : allLayersConfig, + tileMatrixSets : allTMSConfig + }; + return mergedConfig; + }; + + // fusion des configurations JSON + var ConfigJSON = mergeConfig(this.listConfigResults); + if (!ConfigJSON) { + error.call(this, new Error("configuration structure not conforme !")); + return; + } + + // creation des interfaces + var IConfig = new _ConfigInterface__WEBPACK_IMPORTED_MODULE_4__["default"](); + // ajout des interfaces avec la configuration JSON + Object.assign(IConfig, ConfigJSON); + + // définition de la variable globale Gp.Config + var scope = typeof window !== "undefined" ? window : {}; + if (!scope.Gp) { + scope.Gp = {}; + } + + // enregistrement + if (scope.Gp.Config) { + Object.assign(scope.Gp.Config, IConfig); + // dans le doute..., ceinture et bretelles ! + for (var property in IConfig) { + scope.Gp.Config[property] = IConfig[property]; + } + } else { + scope.Gp.Config = IConfig; + } + + // INFO : + // il n'y a pas d'analyse des résultats, + // on passe directement à l'appel de la callback utilisateur + success.call(this, scope.Gp.Config); +}; + +/* harmony default export */ __webpack_exports__["default"] = (Config); + + +/***/ }), +/* 44 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var loglevel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36); +/* harmony import */ var loglevel__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(loglevel__WEBPACK_IMPORTED_MODULE_0__); + + +var LoggerByDefault = { + /** + * logger statique + * + * @static + * @param {String} name - nom du logger + * @returns {Object} retourne un logger + */ + getLogger : function (name) { + // Substitute global constants configured at compile time + // cf. webpack.config.js + // FIXME howtodo !? DefineWebpackPlugin ? EnvironmentWebpackPlugin ? + ("false".match(/true/)) ? loglevel__WEBPACK_IMPORTED_MODULE_0__["disableAll"]() : loglevel__WEBPACK_IMPORTED_MODULE_0__["enableAll"](); + var logname = name || "default"; + return loglevel__WEBPACK_IMPORTED_MODULE_0__["getLogger"](logname); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (LoggerByDefault); + + +/***/ }), +/* 45 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * Classe de gestion des erreurs qui permer d'associer un message d'erreur à l'exception lancée. + * + * @example + * MessagesResources.getMessage("ERROR_PARAM_MISSING", "x", "y", "z"))); + * // --> output : Parameter(s) 'x - y - z' missing + * + * @module MessagesResources + * @alias Gp.Utils.MessagesResources + * @private + */ +var MessagesResources = { + + // Paramètres + PARAM_MISSING : "Parameter(s) '%var%' missing", + PARAM_EMPTY : "Parameter(s) '%var%' empty", + PARAM_TYPE : "Wrong type(s) for parameter(s) '%var%'", + PARAM_FORMAT : "Parameter(s) '%var%' not correctly formatted", + PARAM_NOT_SUPPORT : "Value(s) for parameter(s) '%var%' not supported", + PARAM_NOT_SUPPORT_NODEJS : "Value(s) for parameter(s) '%var%' not supported to NodeJS", + PARAM_UNKNOWN : "Value(s) for parameter(s) '%var%' unknown", + + // Services + // Requête + SERVICE_REQUEST_BUILD : "An error occurred during the request building of the service", + SERVICE_REQUEST_EMPTY : "The request sent to the service is empty", + + // Réponse + SERVICE_RESPONSE_EXCEPTION : "The service returned an exception : '%var%'", + SERVICE_RESPONSE_EXCEPTION_2 : "The service returned an exception", + SERVICE_RESPONSE_ANALYSE : "An error occurred while parsing the response '%var%' of the service", + SERVICE_RESPONSE_ANALYSE_2 : "An unknown error occurred while parsing the response", + SERVICE_RESPONSE_EMPTY : "The response of the service is empty", + SERVICE_RESPONSE_EMPTY_2 : "The response from the service could not be analyzed or is empty", + SERVICE_RESPONSE_FORMAT : "The format of the service response is not supported (handled format(s) : '%var%')", + SERVICE_RESPONSE_FORMAT_2 : "The format of the service response is not supported", + SERVICE_RESPONSE_FORMAT_3 : "No suggestion matching the search", + + // Classes + CLASS_CONSTRUCTOR : "'%var%' constructor cannot be called as a function.", + + /** + * Fonction qui va retourner le message d'erreur associé à la clé donnée + * + * @method getMessage + * @param {String} clef - Clef de l'erreur (ex : ERROR_PARAM) + * @param {String[]} parametres - Paramètres/variables concernés par le message d'erreur associé à la clef donnée + * @return {String} message - String contenant le message de l'exception + */ + getMessage : function (clef, parametres) { + // param de la fonction uniquement pour la documentation... + + if (Object.keys(arguments).length === 0) { + return "Message indefined !"; + } + + var params = Array.prototype.slice.call(arguments); + var key = params.shift(); + var args = params; + + var message = this[key]; + + try { + if (Array.isArray(args) && args.length > 0) { + message = message.replace("%var%", args.join(" - ")); + } else { + message = message.replace("%var%", "%var% (not specified)"); + } + } catch (e) { + // error de string.replace() + + } + + return message; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (MessagesResources); + + +/***/ }), +/* 46 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(47); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45); +/* harmony import */ var _Protocols_Protocol__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(56); +/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(57); +/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(58); +var _package_json__WEBPACK_IMPORTED_MODULE_6___namespace = /*#__PURE__*/__webpack_require__.t(58, 1); + + + + + + +// package.json (extract version) + + +/** + * @classdesc + * Composant Service + * + * @constructor + * @alias Gp.Services.CommonService + * @param {Object} options - options communes à tous les services + * + * @param {String} [options.serverUrl] - URL d'accès au service. Par défaut "https://wxs.ign.fr/calcul/geoportail/SERVICE/". + * Permet de forcer l'utilisation d'un service équivalent déployé derrière une éventuelle autre URL d'accès. + * Si ce paramètre est renseigné alors, le paramètre par défaut est ignoré. + * + * @param {String} [options.protocol] - Le protocole à utiliser pour récupérer les informations du service : + * peut valoir 'JSONP' ou 'XHR'. + * Par défaut, c'est le protocole XHR qui sera utilisé. + * Attention, le protocole JSONP n'est pas valide dans un environnement NodeJS (Utilisation du mode XHR). + * + * @param {Boolean} [options.ssl] - Indique si l'on souhaite intérroger les services en https. + * Ce paramètre ne fonctionne que pour une utilisation hors navigateur (ex. NodeJS). + * Sur un navigateur, le protocole est automatiquement extrait de l'url du site... + * Par défaut, on utilise le protocole http (ssl=false). + * + * @param {String} [options.proxyURL] - Le proxy à utiliser pour pallier au problème de cross-domain dans le cas d'une requête XHR. + * Utile si le paramètre 'protocol' vaut 'XHR', il ne sera pas pris en compte si protocol vaut JSONP. + * + * @param {String} [options.callbackSuffix] - Suffixe de la fonction de callback à utiliser, dans le cas du protocole JSONP. + * Par défaut, la fonction de callback portera un nom du type "callback"+ID, où ID est soit un identifiant unique généré à chaque requête, + * soit le paramètre callbackSuffix s'il est spécifié. Par exemple, si callbackSuffix="_2", la fonction sera "callback_2 ()". + * Utile pour utiliser une réponse déjà encapsulée dans une fonction de callback, dont le nom est connu + * Utile seulement si le paramètre 'protocol' vaut 'JSONP', il ne sera pas pris en compte si protocol vaut 'XHR'. + * + * @param {String} [options.httpMethod] - La méthode HTTP + * à utiliser dans le cas d'une requête XHR : peut valoir 'GET' ou 'POST'. + * Non pris en compte si 'protocol' vaut JSONP qui fonctionne obligatoirement en GET. + * Par défaut, c'est la méthode GET qui est utilisée. + * + * @param {String} [options.contentType] - Content-Type de la requete + * à utiliser dans le cas d'une requête XHR en mode POST. + * Non pris en compte si 'protocol' vaut JSONP et/ou la méthode HTTP vaut GET. + * Par défaut, c'est la méthode GET qui est utilisée donc on n'utilise pas de Content-Type. + * + * @param {Number} [options.timeOut] - Délai d'attente maximal (en ms) de la réponse du service (à partir de l'envoi de la requête). + * Par défaut, aucun timeOut n'est pris en compte (timeoutDelay= 0). + * + * @param {Boolean} [options.rawResponse] - Indique si l'on souhaite que la réponse du service ne soit pas parsée par l'API avant d'être restituée. + * (Cf. paramètre « onSuccess » pour plus de détails). + * + * @param {Function} [options.onSuccess] - Fonction appelée lorsque le service répond correctement à la requête + * (code HTTP 200, sans message d'erreur). + * Cette fonction prend en paramètre la réponse du service, + * soit sous la forme d'un Object Javascript formaté par le parseur dédié à la syntaxe du service (comportement par défaut) ; + * soit brute au format String non prétraité si le paramètre « rawResponse » a été précisé avec la valeur « true ». + * + * @param {Function} [options.onFailure] - Fonction appelée lorsque le service ne répond pas correctement + * (code HTTP de retour différent de 200 ou pas de réponse). + * + * @param {Function} [options.onBeforeParse] - Fonction appelée avant le parsing de la réponse + * Permet de modifier la réponse avant parsing et la fonction doit retourner une String. + * Cette fonction prend en paramètre la réponse telle que renvoyée par le service + * (cad au format json ou xml). + * Pour le JSONP, si le paramètre "rawResponse" a été précisé avec la valeur "true", + * la fonction prend en paramètre un Object JavaScript contenant la réponse XML. + * + * @example + * var options = { + * serverUrl : 'http://localhost/service/', + * protocol : 'JSONP', // JSONP|XHR + * ssl : false, + * proxyURL : null, + * callbackName : null, + * httpMethod : 'GET', // GET|POST + * timeOut : 10000, // ms + * rawResponse : false, // true|false + * scope : null, // this + * onSuccess : function (response) {}, + * onFailure : function (error) {}, + * onBeforeParse : function (rawResponse) {} + * }; + */ +function CommonService (options) { + if (!(this instanceof CommonService)) { + throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__["default"].getMessage("CLASS_CONSTRUCTOR")); + } + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("CommonService"); + this.logger.trace("[Constructeur CommonService (options)]"); + + // ##################### + // récupération des options par défaut pour les paramètres optionnels + // ##################### + + /** + * Options du service + * @type {Object} + */ + this.options = { + // protocol : "JSONP", + protocol : "XHR", + ssl : true, + proxyURL : "", + // callbackName : "", + callbackSuffix : null, + httpMethod : "GET", + timeOut : 0, + rawResponse : false, + scope : this, + /** + * callback par defaut pour la reponse + * @param {Object} response - response + * @private + */ + onSuccess : function (response) { + console.log("onSuccess - la reponse est la suivante : ", response); + }, + /** + * callback par defaut pour les erreurs + * @param {Object} error - error + * @private + */ + onFailure : function (error) { + if (error.status === 200 || !error.status) { + console.log("onFailure : ", error.message); + } else { + console.log("onFailure - Erreur (", error.status, ") : ", error.message); + } + } + }; + + // et on ajoute les options en paramètre aux options par défaut + for (var opt in options) { + if (options.hasOwnProperty(opt)) { + this.options[opt] = options[opt]; + } + } + + // ##################### + // analyse des options + // ##################### + + // modification de la fonction de callback onSuccess dans le cas où la réponse brute est demandée + if (this.options.rawResponse && !this.options.onSuccess) { + /** + * callback par defaut pour la reponse + * @param {Object} response - response + * @private + */ + this.options.onSuccess = function (response) { + console.log("onSuccess - la réponse brute du service est la suivante : ", response); + }; + } + + // gestion du callback onSuccess + var bOnSuccess = !!(this.options.onSuccess !== null && typeof this.options.onSuccess === "function"); + if (!bOnSuccess) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__["default"].getMessage("PARAM_MISSING", "onSuccess()")); + } + + // gestion de l'url du service par defaut + if (!this.options.serverUrl) { + // INFO + // gestion de l'url du service par defaut pour les services qui ne possèdent qu'une seul url par defaut + // les cas particuliers des services avec plusieurs urls (ex. Alti) devront être traité dans la classe du composant + // donc si l'url n'est pas renseignée, il faut utiliser les urls par defaut + _DefaultUrlService__WEBPACK_IMPORTED_MODULE_5__["default"].ssl = this.options.ssl; + var urlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_5__["default"][this.CLASSNAME].url("calcul"); + if (typeof urlByDefault === "string") { + this.options.serverUrl = urlByDefault; + } else { + this.logger.trace("URL par defaut à determiner au niveau du composant..."); + } + } + + // FIXME nettoyage des KVP dans l'url du service + // if (this.options.serverUrl) { + // // INFO + // // si l'url est renseignée, il faut la nettoyer de tous ses KVP + // // ex. on ne veut pas de params. 'callback' ou 'output' car ceci declencherait + // // des opérations d'encapsulations des reponses légèrement farfelues ... + // var urlsource = this.options.serverUrl; + // var urlparts = urlsource.split("?"); + // this.options.serverUrl = urlparts[0]; + // } + + // gestion de la methode HTTP + this.options.httpMethod = (typeof options.httpMethod === "string") ? options.httpMethod.toUpperCase() : "GET"; + + switch (this.options.httpMethod) { + case "POST": + case "GET": + break; + case "PUT": + case "DELETE": + case "HEAD": + case "OPTIONS": + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__["default"].getMessage("PARAM_NOT_SUPPORT", "httpMethod")); + default: + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__["default"].getMessage("PARAM_UNKNOWN", "httpMethod")); + } + + // gestion du protocole + // this.options.protocol = (typeof options.protocol === "string" ) ? options.protocol.toUpperCase() : "JSONP"; + this.options.protocol = (typeof options.protocol === "string") ? options.protocol.toUpperCase() : "XHR"; + + switch (this.options.protocol) { + case "JSONP": + case "XHR": + break; + default: + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__["default"].getMessage("PARAM_UNKNOWN", "protocol")); + } + + // on determine l'environnement d'execution : browser ou non ? + // et on lance une exception sur l'utilisation du protocole JSONP pour nodeJS... + if (typeof window === "undefined" && this.options.protocol === "JSONP") { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__["default"].getMessage("PARAM_NOT_SUPPORT_NODEJS", "protocol=JSONP (instead use XHR)")); + } + + // le protocole JSONP ne fonctionne qu'en GET. + if (this.options.protocol === "JSONP") { + this.options.httpMethod = "GET"; + } + + // gestion du cache + this.options.nocache = options.nocache || false; + + // ##################### + // attributs d'instances + // ##################### + + /** + * Format de réponse du service + */ + this.options.outputFormat = null; + /** + * Requête envoyée au service + */ + this.request = null; + /** + * Reponse du service + */ + this.response = null; +} + +/** + * @lends module:CommonService + */ +CommonService.prototype = { + + /* + * Constructeur (alias) + */ + constructor : CommonService, + + /** + * Appel du service Géoportail + */ + call : function () { + /* jshint validthis : true */ + this.logger.trace("CommonService::call ()"); + + var context = this; + /** fonction d'execution */ + function run () { + this.logger.trace("CommonService::run ()"); + this.buildRequest.call(context, onError, onBuildRequest); + } + + run.call(context); + + // callback de fin de construction de la requête + function onBuildRequest (result) { + this.logger.trace("CommonService::onBuildRequest : ", result); + this.callService.call(context, onError, onCallService); + } + + // callback de fin d'appel au service + function onCallService (result) { + this.logger.trace("CommonService::onCallService : ", result); + this.analyzeResponse.call(context, onError, onAnalyzeResponse); + } + + // callback de fin de lecture de la reponse + function onAnalyzeResponse (result) { + this.logger.trace("CommonService::onAnalyzeResponse : ", result); + if (result) { + this.options.onSuccess.call(this, result); + } else { + return onError.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__["default"]("Analyse de la reponse en échec !?")); + } + } + + // callback de gestion des erreurs : renvoit un objet de type ErrorService + function onError (error) { + this.logger.trace("CommonService::onError()"); + // error : l'objet est du type ErrorService ou Error + var e = error; + if (!(e instanceof _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__["default"])) { + e = new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__["default"](error.message); + } + this.options.onFailure.call(this, e); + } + }, + + /** + * Création de la requête + * @param {Function} error - callback + * @param {Function} success - callback + */ + buildRequest : function (error, success) { + // INFO + this.logger.error("overwritten method !"); + // retourne l'objet 'this.request' + if (error) { + error.call(this, "This method must be overwritten !"); + } + success.call(this, "This method must be overwritten !"); + }, + + /** + * Appel du service + * @param {Function} error - callback + * @param {Function} success - callback + */ + callService : function (error, success) { + // INFO + // retourne l'objet 'this.response' + + // NOTES + // Pour le mode XHR, on recupère une reponse sous forme d'un json ou xml (#document). + // Pour le mode JSONP, on a toujours un objet JSON mais sous 2 formes : + // - natif + // - XML encapsulé : + // {http : {status:200, error:null},xml :'réponse du service'} + // {http : {status:400, error:'reponse du service'},xml :null} + // En XHR, la reponse est directement sauvegardée dans 'this.response'. + // Par contre, en JSONP, on doit analyser la reponse (status ou non vide), + // et ne renvoyer que le contenu (xml ou l'objet) + + // gestion de la proxification du service + var strUrlProxified = null; + var strData = this.request; + + // a t on mis en place un proxy ? + // la proxyfication est valable uniquement en mode XHR ! + var bUrlProxified = !!(this.options.proxyURL && this.options.protocol === "XHR"); + + // rajout de l'option gpbibaccess + // INFO : acces au numero de version de package.conf aprés compilation ! + if (this.CLASSNAME !== "Geocode" && this.CLASSNAME !== "ReverseGeocode" && this.CLASSNAME !== "AutoComplete") { + this.options.serverUrl = _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__["default"].normalyzeUrl(this.options.serverUrl, { + "gp-access-lib" : _package_json__WEBPACK_IMPORTED_MODULE_6__.version + }, false); + } + + // si le proxy est renseigné, on proxifie l'url du service + if (bUrlProxified) { + if (this.options.httpMethod === "GET") { + strUrlProxified = this.options.proxyURL + _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__["default"].normalyzeUrl(this.options.serverUrl, this.request, true); + strData = null; + } + + if (this.options.httpMethod === "POST") { + strUrlProxified = this.options.proxyURL + _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__["default"].normalyzeUrl(this.options.serverUrl, null, true); + strData = this.request; + } + } + + // contexte du composant spécifique ! + var self = this; + + var options = { + url : strUrlProxified || this.options.serverUrl, + method : this.options.httpMethod, + protocol : this.options.protocol, + timeOut : this.options.timeOut || 0, + format : this.options.outputFormat, // ceci declenche le parsing de la reponse du service, mais on souhaite toujours une reponse brute (string) ! + nocache : this.options.nocache || false, // ceci permet d'ajouter un timestamp dans la requête + wrap : this.options.protocol !== "XHR", // ceci declenche l'encapsulation de la reponse XML du service dans du JSON, mais pas en mode XHR ! + callbackSuffix : this.options.callbackSuffix, + // callbackName : this.options.callbackName || null, + data : strData, + headers : null, // TODO... + content : this.options.contentType || "application/xml", + scope : this.options.scope || this, + // callback de reponse + onResponse : function (response) { + self.logger.trace("callService::onResponse()"); + + // le contenu de la reponse à renvoyer ! + var content = null; + + // XHR : on renvoie toujours la reponse brute du service (json ou xml) + // au parser du composant... + if (self.options.protocol === "XHR") { + self.logger.trace("Response XHR", response); + content = response; // par defaut, la reponse du service ! + } + + // JSONP : on pre-analyse la reponse brute du service (encapsuler ou pas) + // avant de l'envoyer au parser du composant... + if (self.options.protocol === "JSONP") { + self.logger.trace("Response JSON", response); + if (response) { + if (response.http) { + // reponse encapsulée : + // ex. reponse du service en xml + // > {http : {status:200, error:null},xml :'réponse du service'} + if (response.http.status !== 200) { + error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__["default"]({ + status : response.http.status, + message : response.http.error, + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__["default"].TYPE_SRVERR + })); + return; + } else { + content = response.xml; // par defaut ! + if (self.options.rawResponse) { + content = response; + } + } + } else { + // reponse non encapsulée : + // ex. reponse du service en json ou xml + content = response; + } + } else { + error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__["default"]("Le contenu de la reponse est vide !?")); + return; + } + } + + // si on souhaite parser la reponse du service + if (typeof self.options.onBeforeParse === "function") { + var newResponse = self.options.onBeforeParse(content); + if (typeof newResponse === "string") { + // la reponse parsée par l'utilisateur est retournée sous + // forme de string ! + content = newResponse; + } + } + // sauvegarde de la reponse dans l'objet parent (CommonService) + self.response = content; + // on renvoie la reponse... + success.call(self, content); + }, + // callback des erreurs + onFailure : function (e) { + self.logger.trace("callService::onFailure()"); + // on est forcement sur une erreur levée par un service ! + e.type = _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__["default"].TYPE_SRVERR; + error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__["default"](e)); + }, + // callback de timeOut + onTimeOut : function () { + self.logger.trace("callService::onTimeOut()"); + error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__["default"]("TimeOut!")); + } + }; + + _Protocols_Protocol__WEBPACK_IMPORTED_MODULE_3__["default"].send(options); + }, + + /** + * Analyse de la réponse + * @param {Function} error - callback + * @param {Function} success - callback + */ + analyzeResponse : function (error, success) { + // INFO + this.logger.error("overwritten method !"); + // retourne l'objet spécifique au type de composant (json) + if (error) { + error.call(this, "This method must be overwritten !"); + } + success.call(this, "This method must be overwritten !"); + } + +}; + +/* harmony default export */ __webpack_exports__["default"] = (CommonService); + + +/***/ }), +/* 47 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * Classe utilitaire + * + * @module Helper + * @alias Gp.Helper + */ +var Helper = { + + /** + * concatenation des parametres key/value dans les urls + * + * @method normalyzeParameters + * @static + * @param {Object} params - tableau de clef/valeur + * + * @example + * Gp.Utils.Helper.normalyzeParameters ({ + * key1:value1, + * key2:value2, + * key3:value3 + * }); + * // out : "key1=value1&key2=value2&key3=value3" + * + * @returns {String} retourne les paramètres concaténés + */ + normalyzeParameters : function (params) { + var myParams = null; + + if (params) { + var tabParams = []; + for (var key in params) { + if (params.hasOwnProperty(key)) { + var value = params[key]; + if (!value) { + value = ""; + } + tabParams.push(key + "=" + value); + } + } + + myParams = tabParams.join("&"); + } + + return myParams; + }, + + /** + * Concaténation et encodage des urls. + * + * @method normalyzeUrl + * @static + * @param {String} url - url + * @param {Object|String} params - tableau de clef/valeur ou string + * @param {Boolean} encode - true|false, false par defaut + * + * @example + * Gp.Utils.Helper.normalyzeUrl (url, { + * key1:value1, + * key2=:value2, + * key3:value3 + * }); + * // out : "url?key1=value1&key2=value2&key3=value3" + * + * @returns {String} retourne une url normalisée + */ + normalyzeUrl : function (url, params, encode) { + var myUrl = url; + + if (url) { + var k = url.indexOf("?"); + if (k === -1) { // pas de ? et KVP + myUrl += "?"; + } + + if (k !== -1 && k !== url.length - 1) { // KVP + myUrl += "&"; + } + } + + if (params) { + if (typeof params === "string") { + myUrl += params; + } else { + myUrl += this.normalyzeParameters(params); + } + } + + if (encode) { + // FIXME bonne idée ? + myUrl = encodeURIComponent(myUrl); + } + + return myUrl; + }, + + /** + * Indentation d'une chaine + * + * @method indent + * @static + * @param {Number} n - nombre de tabulation + * @param {String} msg - chaine + * + * @example + * Gp.Utils.Helper.indent (2, "message à indenter") + * // out + * // ........message à indenter + * + * @returns {String} retourne une chaine indentée + */ + indent : function (n, msg) { + var num = n || 0; + return new Array(num + 1).join("\t") + msg; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (Helper); + + +/***/ }), +/* 48 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47); +/* harmony import */ var _XHR__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49); +/* harmony import */ var _JSONP__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55); +/** + * Interface de dialogue avec les webservices + * + * @module Protocols + * @private + * @alias Gp.Protocols + */ + + + + +var Protocol = { + + /** + * Interface unique d"envoi d"une requête. + * + * @method send + * @static + * @param {Object} options - options generales + * @param {String} options.url - url du service + * @param {String} options.method - GET, POST, PUT, DELETE + * @param {String} options.protocol - XHR | JSONP + * @param {String} options.format - format de la reponse du service : json, xml ou null (brute)... + * @param {String} options.wrap - encapsuler la reponse du service dans du JSON : true|false (true par defaut sur le protocole JSONP) + * @param {String} options.callbackSuffix - suffixe de la fonction de callback (JSONP uniquement) (ex: si callbackSuffix="", la fonction s'appellera "callback") + * @param {String} options.timeOut - 0 ms + * @param {Boolean} options.nocache - true|false + * @param {Object|String} options.data - content (post) ou param (get) + * @param {Object|String} options.headers - (post) ex. referer + * @param {Object|String} options.content - (post) ex. "application/json" + * @param {String} options.scope - this (TODO) + * @param {Function} options.onResponse - callback + * @param {Function} options.onFailure - callback + * @param {Function} options.onTimeOut - callback + * @param {String} options.proxyUrl - (TODO) + */ + send : function (options) { + // INFO + // "output" - param est interne à la classe "Protocol" (parametrable via "wrap"), et à ajouter à l"url + // ce param est independant du service car il est géré par le filtre LUA : + // ex. json|xml (json par defaut). + // Ce param. permet d"encapsuler du XML dans du JSON : + // {http : {status:200, error:null},xml :"réponse du service"} + // Utile pour les services qui ne repondent que du XML (ex. Geocodage) + // + // |-------------------------------------------------| + // | \service | | | | + // | output\ format| json | xml | remarques | + // |--------\------|------|-----|--------------------| + // | json | json | json| json/xml encapsulé | + // | xml | json | xml | param inactif | + // |-------------------------------------------------| + // ex. le service demande une reponse native au "format" json et avec un "output" json. + // on a donc une reponse json encapsulé dans un json : ce qu'on ne souhaite pas ! + // dans ce cas on ne renseigne pas output=json + + // INFO + // "wrap" - choix d"encapsuler ou non les reponses dans du JSON. + // Par defaut, on encapsule uniquement les reponses sur le protocole JSONP (et qui sont en xml) ! + + // INFO + // "callback" - param est interne à la classe "Protocol" (non parametrable), et à ajouter à l"url + // ce param est independant du service car il est géré aussi par le filtre LUA : + // ex. callback|null + // Ce param. permet de renvoyer une reponse javascript : + // callback ({http : {status:200, error:null},xml :"réponse du service"}) + // Ce param. est non renseigné par defaut car pour du JSONP, on utilise le + // le protocol JSONP, et ce dernier implemente déjà le callback ! + + // settings par defaut + var settings = options || { + method : "GET", + // protocol : "JSONP", + protocol : "XHR", + timeOut : 0, + format : null, + wrap : true, + nocache : true, + output : "json", + callback : null, + callbackSuffix : null + }; + + // on determine l'environnement d'execution : browser ou non ? + // et on stoppe pour nodeJS... sur un protocole JSONP ! + if (typeof window === "undefined" && options.protocol === "JSONP") { + console.log("Value (s) for parameter (s) 'protocol=JSONP (instead use XHR)' not supported to NodeJS"); + return; + } + + if (options.protocol === "XHR" || options.format === "json") { + settings.wrap = false; + } else if (options.protocol === "JSONP" && options.format === "xml") { + settings.wrap = true; + } + + settings.callback = null; // FIXME non géré !? + settings.output = settings.wrap ? "json" : null; + + // on encapsule les reponses dans un objet JSON + if (settings.wrap) { + var params = {}; + params.output = settings.output; + params.callback = settings.callback; + delete params.callback; // FIXME non géré !? + settings.url = _Utils_Helper__WEBPACK_IMPORTED_MODULE_0__["default"].normalyzeUrl(options.url, params); + } + + // choix de l"implementation : + // XHR ou JSONP + switch (settings.protocol) { + case "XHR": + // on normalise l'url (gestion du cache) + if (options.method === "GET" && options.nocache) { + settings.url = _Utils_Helper__WEBPACK_IMPORTED_MODULE_0__["default"].normalyzeUrl(settings.url, { + t : new Date().getTime() + }); + } + // appel du service en XHR + _XHR__WEBPACK_IMPORTED_MODULE_1__["default"].call(settings); + break; + case "JSONP": + + // on normalise l'url si les params. sont renseignés dans la string|object "data" + if (settings.data) { + settings.url = _Utils_Helper__WEBPACK_IMPORTED_MODULE_0__["default"].normalyzeUrl(settings.url, settings.data); + } + + // appel du service en JSONP + _JSONP__WEBPACK_IMPORTED_MODULE_2__["default"].call(settings); + break; + default: + throw new Error("protocol not supported (XHR|JSONP) !"); + } + } + +}; + +/* harmony default export */ __webpack_exports__["default"] = (Protocol); + + +/***/ }), +/* 49 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(47); +/* harmony import */ var es6_promise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50); +/* harmony import */ var es6_promise__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(es6_promise__WEBPACK_IMPORTED_MODULE_2__); +/* global Promise, require, XDomainRequest */ + + + + +// import __request from "request"; +// import __xmldom from "xmldom"; + +/** + * Ajax Request (use of Promises) + * + * @module XHR + * @alias Gp.Protocols.XHR + * @see dependance 'es6-promise' + */ + +// cf. https://xhr.spec.whatwg.org/ +// cf. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest + +var XHR = { + + /** + * Interface unique d'envoi d'une requête. + * + * @method call + * @static + * @param {Object} settings - options generales + * @param {String} settings.url - url du service + * @param {String} settings.method - GET, POST, PUT, DELETE + * @param {String} settings.format - format de la reponse du service : json, xml ou null (brute) + * @param {String} settings.data - content (post) ou param (get) + * @param {String} settings.proxy - proxy url + * @param {Object|String} settings.headers - (post) ex. referer + * @param {Object|String} settings.content - (post) ex. 'application/json' + * @param {String} settings.timeOut - timeout = 0 par defaut + * @param {String} settings.scope - this + * @param {Function} settings.onResponse - callback + * @param {Function} settings.onFailure - callback + */ + call : function (settings) { + // logger + var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("XHR"); + logger.trace("[XHR::call()]"); + + // FIXME + // To polyfill the global environment + es6_promise__WEBPACK_IMPORTED_MODULE_2___default.a.polyfill(); + + // test sur les settings obligatoires + if (!settings.url) { + throw new Error("missing parameter : url is not defined !"); + } + + if (!settings.method) { + throw new Error("missing parameter : method is not defined !"); + } + + if (!settings.format) { + settings.format = "text"; // reponse brute ! + } + + var options = {}; + options.url = settings.url; + options.data = settings.data ? settings.data : null; + options.method = settings.method; + options.timeOut = settings.timeOut || 0; + options.scope = settings.scope || this; + options.proxy = settings.proxy || null; + options.content = settings.content || null; + options.headers = settings.headers || { + referer : "http://localhost" + }; + + // test sur les valeurs de 'settings.method' + switch (settings.method) { + case "DELETE": + case "GET": + break; + case "PUT": + case "POST": + // on force sur ces params spécifiques au mode POST + options.content = settings.content ? settings.content : "application/x-www-form-urlencoded"; // FIXME en attente des services : bascule en "application/xml" ou "application/json" + options.headers = settings.headers ? settings.headers : { referer : "http://localhost" }; // FIXME parametrable... + break; + case "HEAD": + case "OPTIONS": + throw new Error("HTTP method not yet supported !"); + default: + throw new Error("HTTP method unknown !"); + } + + // test sur les valeurs de 'settings.format' + switch (settings.format) { + case "text": + this.__call(options) + .then(function (response) { + logger.trace(response); + settings.onResponse.call(this, response); + }) + .catch(function (error) { + settings.onFailure.call(this, error); + }); + break; + case "json": + this.__callJSON(options) + .then(function (response) { + logger.trace(response); + settings.onResponse.call(this, response); + }) + .catch(function (error) { + settings.onFailure.call(this, error); + }); + break; + case "xml": + this.__callXML(options) + .then(function (response) { + logger.trace(response); + settings.onResponse.call(this, response); + }) + .catch(function (error) { + settings.onFailure.call(this, error); + }); + break; + default: + throw new Error("This output Format is not yet supported !"); + } + }, + + /** + * Requete + * + * @method __call + * @private + * @param {Object} options - options + * @return {Object} promise + */ + __call : function (options) { + var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("XHR"); + logger.trace("[XHR::__call()]"); + + var promise = new Promise( + function (resolve, reject) { + // traitement du corps de la requête + var corps = (options.method === "POST" || options.method === "PUT") ? 1 : 0; + + // seulement si options.data n'est pas vide (peut être un objet ou une chaine de caractères) + if (options.data && ((typeof options.data === "object" && Object.keys(options.data).length) || (typeof options.data === "string" && options.data.length)) && !corps) { + if (options.scope.CLASSNAME === "Geocode" || options.scope.CLASSNAME === "ReverseGeocode") { + options.url = options.url + options.data; + } else { + options.url = _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__["default"].normalyzeUrl(options.url, options.data); + } + } + + logger.trace("URL = ", options.url); + + var hXHR = null; + + // test on env. nodejs or browser + if (typeof window === "undefined") { + var nodefetch = __webpack_require__(53); + + var opts = { + headers : { + Referer : "https://localhost" + } + }; + + if (options.data && typeof options.data === "string" && corps) { + opts = { + method : options.method, + body : options.data, + headers : { + "Content-Type" : options.content, + Referer : "https://localhost" + } + }; + } + + return nodefetch(options.url, opts) + .then(function (response) { + if (response.ok) { // res.status >= 200 && res.status < 300 + resolve(response.text()); + } else { + var message = "Errors Occured on Http Request (status : '" + response.statusText + "' | url : '" + response.url + "')"; + var status = response.status; + reject({ + message : message, + status : status + }); + } + }) + .catch(function (e) { + reject({ + message : e, + status : -1 + }); + }); + } else { + if (window.XMLHttpRequest) { + logger.trace("XMLHttpRequest"); + + hXHR = new XMLHttpRequest(); + hXHR.open(options.method, options.url, true); // async + hXHR.overrideMimeType = options.content; + + // gestion du timeout + var onTimeOutTrigger = null; + if (options.timeOut > 0) { + // FIXME le timeout interne ne me permet pas de declencher le bon message... + // hXHR.timeout = options.timeOut; + logger.trace("XHR - TimeOut actif !"); + /** + * Description + * + * @method onTimeOutTrigger + * @private + */ + onTimeOutTrigger = window.setTimeout( + function () { + var message = "TimeOut Occured on Http Request with XMLHttpRequest !"; + reject({ + message : message, + status : -1 + }); + }, options.timeOut); + } + + if (corps) { + // headers, data, content of data + // cf. https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-xmlhttprequest-setrequestheader + logger.trace("data = ", options.data); + hXHR.setRequestHeader("Content-type", options.content); + // FIXME refused to set unsafe header content-length javascript + // hXHR.setRequestHeader ("Content-length", options.data.length); + // hXHR.setRequestHeader ("Referer", options.headers.referer); + } + + /** + * On Error + * FIXME ne se declenche pas !? + * + * @param {Object} e - Event + * @method onerror + * @private + */ + hXHR.onerror = function (e) { + console.log(e); + reject(new Error("Errors Occured on Http Request with XMLHttpRequest !")); + }; + + /** + * On Timeout + * FIXME ne se declenche pas !? + * + * @param {Object} e - Event + * @method ontimeout + * @private + */ + hXHR.ontimeout = function (e) { + console.log(e); + reject(new Error("TimeOut Occured on Http Request with XMLHttpRequest !")); + }; + + /** + * Description + * + * @method onreadystatechange + * @private + */ + hXHR.onreadystatechange = function (e) { + if (hXHR.readyState === 4) { // DONE + if (hXHR.status === 200) { + window.clearTimeout(onTimeOutTrigger); + resolve(hXHR.response); + } else { + var message = "Errors Occured on Http Request (status : '" + e.target.statusText + "' | url : '" + e.target.responseURL + "' | response : '" + e.target.response + "')"; + var status = e.target.status; + reject({ + message : message, + status : status + }); + } + } + }; + + // gestion du content data + var data4xhr = (options.data && corps) ? options.data : null; + + hXHR.send(data4xhr); + } else if (window.XDomainRequest) { + // worked in Internet Explorer 8–10 only ! + logger.trace("XDomainRequest"); + + hXHR = new XDomainRequest(); + hXHR.open(options.method, options.url); + + hXHR.overrideMimeType = options.content; + + if (options.timeOut > 0) { + hXHR.timeout = options.timeout; + logger.trace("XHR - TimeOut actif !"); + } + + if (corps) { + // headers, data, content of data + // cf. https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-xmlhttprequest-setrequestheader + hXHR.setRequestHeader("Content-type", options.content); + // FIXME refused to set unsafe header content-length javascript + // hXHR.setRequestHeader ("Content-length", options.data.length); + // hXHR.setRequestHeader ("Referer", options.headers.referer); + } + + /** + * Description + * + * @method onerror + * @private + */ + hXHR.onerror = function () { + reject(new Error("Errors Occured on Http Request with XMLHttpRequest !")); + }; + + /** + * Description + * + * @method ontimeout + * @private + */ + hXHR.ontimeout = function () { + reject(new Error("TimeOut Occured on Http Request with XMLHttpRequest !")); + }; + + /** + * On Load + * + * @method onload + * @private + */ + hXHR.onload = function (e) { + if (hXHR.status === 200) { + resolve(hXHR.responseText); + } else { + var message = "Errors Occured on Http Request (status : '" + e.target.statusText + "' | url : '" + e.target.responseURL + "')"; + var status = e.target.status; + reject({ + message : message, + status : status + }); + } + }; + + var data4xdr = (options.data && corps) ? options.data : null; + + hXHR.send(data4xdr); + } else { + throw new Error("CORS not supported"); + } + } + } + ); + + return promise; + }, + + /** + * Requete avec parser JSON + * + * @method __callJSON + * @private + * @param {Object} options - options + * @return {Object} promise + */ + __callJSON : function (options) { + return this.__call(options) + .then(JSON.parse) + .catch(function (error) { + console.log("_callJSON failed on : ", options.url, error); + // FIXME pas d'exception, laissons le fil se derouler... + // throw error; + }); + }, + + /** + * Requete avec parser XML + * + * @method __callXML + * @private + * @param {Object} options - options + * @return {Object} promise + */ + __callXML : function (options) { + return this.__call(options) + .then(function (response) { + var xmlDoc; + + // test on env. nodejs or browser + if (typeof window === "undefined") { + var DOMParser = __webpack_require__(54).DOMParser; // __xmldom.DOMParser + xmlDoc = new DOMParser().parseFromString(response, "text/xml"); + } else { + if (window.DOMParser) { + var parser = new window.DOMParser(); + xmlDoc = parser.parseFromString(response, "text/xml"); + } else { // IE + xmlDoc = new window.ActiveXObject("Microsoft.XMLDOM"); + xmlDoc.async = false; + xmlDoc.loadXML(response); + } + } + + return xmlDoc; + }) + .catch(function (error) { + console.log("__callXML failed on : ", options.url, error); + // FIXME pas d'exception, laissons le fil se derouler... + // throw error; + }); + } + +}; + +/* harmony default export */ __webpack_exports__["default"] = (XHR); + + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process, global) {/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.8+1e68dce6 + */ + +(function (global, factory) { + true ? module.exports = factory() : + undefined; +}(this, (function () { 'use strict'; + +function objectOrFunction(x) { + var type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} + +function isFunction(x) { + return typeof x === 'function'; +} + + + +var _isArray = void 0; +if (Array.isArray) { + _isArray = Array.isArray; +} else { + _isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; +} + +var isArray = _isArray; + +var len = 0; +var vertxNext = void 0; +var customSchedulerFn = void 0; + +var asap = function asap(callback, arg) { + queue[len] = callback; + queue[len + 1] = arg; + len += 2; + if (len === 2) { + // If len is 2, that means that we need to schedule an async flush. + // If additional callbacks are queued before the queue is flushed, they + // will be processed by this flush that we are scheduling. + if (customSchedulerFn) { + customSchedulerFn(flush); + } else { + scheduleFlush(); + } + } +}; + +function setScheduler(scheduleFn) { + customSchedulerFn = scheduleFn; +} + +function setAsap(asapFn) { + asap = asapFn; +} + +var browserWindow = typeof window !== 'undefined' ? window : undefined; +var browserGlobal = browserWindow || {}; +var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; +var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + +// test for web worker but not in IE10 +var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; + +// node +function useNextTick() { + // node version 0.10.x displays a deprecation warning when nextTick is used recursively + // see https://github.com/cujojs/when/issues/410 for details + return function () { + return process.nextTick(flush); + }; +} + +// vertx +function useVertxTimer() { + if (typeof vertxNext !== 'undefined') { + return function () { + vertxNext(flush); + }; + } + + return useSetTimeout(); +} + +function useMutationObserver() { + var iterations = 0; + var observer = new BrowserMutationObserver(flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + + return function () { + node.data = iterations = ++iterations % 2; + }; +} + +// web worker +function useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = flush; + return function () { + return channel.port2.postMessage(0); + }; +} + +function useSetTimeout() { + // Store setTimeout reference so es6-promise will be unaffected by + // other code modifying setTimeout (like sinon.useFakeTimers()) + var globalSetTimeout = setTimeout; + return function () { + return globalSetTimeout(flush, 1); + }; +} + +var queue = new Array(1000); +function flush() { + for (var i = 0; i < len; i += 2) { + var callback = queue[i]; + var arg = queue[i + 1]; + + callback(arg); + + queue[i] = undefined; + queue[i + 1] = undefined; + } + + len = 0; +} + +function attemptVertx() { + try { + var vertx = Function('return this')().require('vertx'); + vertxNext = vertx.runOnLoop || vertx.runOnContext; + return useVertxTimer(); + } catch (e) { + return useSetTimeout(); + } +} + +var scheduleFlush = void 0; +// Decide what async method to use to triggering processing of queued callbacks: +if (isNode) { + scheduleFlush = useNextTick(); +} else if (BrowserMutationObserver) { + scheduleFlush = useMutationObserver(); +} else if (isWorker) { + scheduleFlush = useMessageChannel(); +} else if (browserWindow === undefined && "function" === 'function') { + scheduleFlush = attemptVertx(); +} else { + scheduleFlush = useSetTimeout(); +} + +function then(onFulfillment, onRejection) { + var parent = this; + + var child = new this.constructor(noop); + + if (child[PROMISE_ID] === undefined) { + makePromise(child); + } + + var _state = parent._state; + + + if (_state) { + var callback = arguments[_state - 1]; + asap(function () { + return invokeCallback(_state, child, callback, parent._result); + }); + } else { + subscribe(parent, child, onFulfillment, onRejection); + } + + return child; +} + +/** + `Promise.resolve` returns a promise that will become resolved with the + passed `value`. It is shorthand for the following: + + ```javascript + let promise = new Promise(function(resolve, reject){ + resolve(1); + }); + + promise.then(function(value){ + // value === 1 + }); + ``` + + Instead of writing the above, your code now simply becomes the following: + + ```javascript + let promise = Promise.resolve(1); + + promise.then(function(value){ + // value === 1 + }); + ``` + + @method resolve + @static + @param {Any} value value that the returned promise will be resolved with + Useful for tooling. + @return {Promise} a promise that will become fulfilled with the given + `value` +*/ +function resolve$1(object) { + /*jshint validthis:true */ + var Constructor = this; + + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + + var promise = new Constructor(noop); + resolve(promise, object); + return promise; +} + +var PROMISE_ID = Math.random().toString(36).substring(2); + +function noop() {} + +var PENDING = void 0; +var FULFILLED = 1; +var REJECTED = 2; + +function selfFulfillment() { + return new TypeError("You cannot resolve a promise with itself"); +} + +function cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); +} + +function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { + try { + then$$1.call(value, fulfillmentHandler, rejectionHandler); + } catch (e) { + return e; + } +} + +function handleForeignThenable(promise, thenable, then$$1) { + asap(function (promise) { + var sealed = false; + var error = tryThen(then$$1, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + resolve(promise, value); + } else { + fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + + reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + + if (!sealed && error) { + sealed = true; + reject(promise, error); + } + }, promise); +} + +function handleOwnThenable(promise, thenable) { + if (thenable._state === FULFILLED) { + fulfill(promise, thenable._result); + } else if (thenable._state === REJECTED) { + reject(promise, thenable._result); + } else { + subscribe(thenable, undefined, function (value) { + return resolve(promise, value); + }, function (reason) { + return reject(promise, reason); + }); + } +} + +function handleMaybeThenable(promise, maybeThenable, then$$1) { + if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) { + handleOwnThenable(promise, maybeThenable); + } else { + if (then$$1 === undefined) { + fulfill(promise, maybeThenable); + } else if (isFunction(then$$1)) { + handleForeignThenable(promise, maybeThenable, then$$1); + } else { + fulfill(promise, maybeThenable); + } + } +} + +function resolve(promise, value) { + if (promise === value) { + reject(promise, selfFulfillment()); + } else if (objectOrFunction(value)) { + var then$$1 = void 0; + try { + then$$1 = value.then; + } catch (error) { + reject(promise, error); + return; + } + handleMaybeThenable(promise, value, then$$1); + } else { + fulfill(promise, value); + } +} + +function publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + + publish(promise); +} + +function fulfill(promise, value) { + if (promise._state !== PENDING) { + return; + } + + promise._result = value; + promise._state = FULFILLED; + + if (promise._subscribers.length !== 0) { + asap(publish, promise); + } +} + +function reject(promise, reason) { + if (promise._state !== PENDING) { + return; + } + promise._state = REJECTED; + promise._result = reason; + + asap(publishRejection, promise); +} + +function subscribe(parent, child, onFulfillment, onRejection) { + var _subscribers = parent._subscribers; + var length = _subscribers.length; + + + parent._onerror = null; + + _subscribers[length] = child; + _subscribers[length + FULFILLED] = onFulfillment; + _subscribers[length + REJECTED] = onRejection; + + if (length === 0 && parent._state) { + asap(publish, parent); + } +} + +function publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + + if (subscribers.length === 0) { + return; + } + + var child = void 0, + callback = void 0, + detail = promise._result; + + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + + if (child) { + invokeCallback(settled, child, callback, detail); + } else { + callback(detail); + } + } + + promise._subscribers.length = 0; +} + +function invokeCallback(settled, promise, callback, detail) { + var hasCallback = isFunction(callback), + value = void 0, + error = void 0, + succeeded = true; + + if (hasCallback) { + try { + value = callback(detail); + } catch (e) { + succeeded = false; + error = e; + } + + if (promise === value) { + reject(promise, cannotReturnOwn()); + return; + } + } else { + value = detail; + } + + if (promise._state !== PENDING) { + // noop + } else if (hasCallback && succeeded) { + resolve(promise, value); + } else if (succeeded === false) { + reject(promise, error); + } else if (settled === FULFILLED) { + fulfill(promise, value); + } else if (settled === REJECTED) { + reject(promise, value); + } +} + +function initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + resolve(promise, value); + }, function rejectPromise(reason) { + reject(promise, reason); + }); + } catch (e) { + reject(promise, e); + } +} + +var id = 0; +function nextId() { + return id++; +} + +function makePromise(promise) { + promise[PROMISE_ID] = id++; + promise._state = undefined; + promise._result = undefined; + promise._subscribers = []; +} + +function validationError() { + return new Error('Array Methods must be provided an Array'); +} + +var Enumerator = function () { + function Enumerator(Constructor, input) { + this._instanceConstructor = Constructor; + this.promise = new Constructor(noop); + + if (!this.promise[PROMISE_ID]) { + makePromise(this.promise); + } + + if (isArray(input)) { + this.length = input.length; + this._remaining = input.length; + + this._result = new Array(this.length); + + if (this.length === 0) { + fulfill(this.promise, this._result); + } else { + this.length = this.length || 0; + this._enumerate(input); + if (this._remaining === 0) { + fulfill(this.promise, this._result); + } + } + } else { + reject(this.promise, validationError()); + } + } + + Enumerator.prototype._enumerate = function _enumerate(input) { + for (var i = 0; this._state === PENDING && i < input.length; i++) { + this._eachEntry(input[i], i); + } + }; + + Enumerator.prototype._eachEntry = function _eachEntry(entry, i) { + var c = this._instanceConstructor; + var resolve$$1 = c.resolve; + + + if (resolve$$1 === resolve$1) { + var _then = void 0; + var error = void 0; + var didError = false; + try { + _then = entry.then; + } catch (e) { + didError = true; + error = e; + } + + if (_then === then && entry._state !== PENDING) { + this._settledAt(entry._state, i, entry._result); + } else if (typeof _then !== 'function') { + this._remaining--; + this._result[i] = entry; + } else if (c === Promise$1) { + var promise = new c(noop); + if (didError) { + reject(promise, error); + } else { + handleMaybeThenable(promise, entry, _then); + } + this._willSettleAt(promise, i); + } else { + this._willSettleAt(new c(function (resolve$$1) { + return resolve$$1(entry); + }), i); + } + } else { + this._willSettleAt(resolve$$1(entry), i); + } + }; + + Enumerator.prototype._settledAt = function _settledAt(state, i, value) { + var promise = this.promise; + + + if (promise._state === PENDING) { + this._remaining--; + + if (state === REJECTED) { + reject(promise, value); + } else { + this._result[i] = value; + } + } + + if (this._remaining === 0) { + fulfill(promise, this._result); + } + }; + + Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) { + var enumerator = this; + + subscribe(promise, undefined, function (value) { + return enumerator._settledAt(FULFILLED, i, value); + }, function (reason) { + return enumerator._settledAt(REJECTED, i, reason); + }); + }; + + return Enumerator; +}(); + +/** + `Promise.all` accepts an array of promises, and returns a new promise which + is fulfilled with an array of fulfillment values for the passed promises, or + rejected with the reason of the first passed promise to be rejected. It casts all + elements of the passed iterable to promises as it runs this algorithm. + + Example: + + ```javascript + let promise1 = resolve(1); + let promise2 = resolve(2); + let promise3 = resolve(3); + let promises = [ promise1, promise2, promise3 ]; + + Promise.all(promises).then(function(array){ + // The array here would be [ 1, 2, 3 ]; + }); + ``` + + If any of the `promises` given to `all` are rejected, the first promise + that is rejected will be given as an argument to the returned promises's + rejection handler. For example: + + Example: + + ```javascript + let promise1 = resolve(1); + let promise2 = reject(new Error("2")); + let promise3 = reject(new Error("3")); + let promises = [ promise1, promise2, promise3 ]; + + Promise.all(promises).then(function(array){ + // Code here never runs because there are rejected promises! + }, function(error) { + // error.message === "2" + }); + ``` + + @method all + @static + @param {Array} entries array of promises + @param {String} label optional string for labeling the promise. + Useful for tooling. + @return {Promise} promise that is fulfilled when all `promises` have been + fulfilled, or rejected if any of them become rejected. + @static +*/ +function all(entries) { + return new Enumerator(this, entries).promise; +} + +/** + `Promise.race` returns a new promise which is settled in the same way as the + first passed promise to settle. + + Example: + + ```javascript + let promise1 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 1'); + }, 200); + }); + + let promise2 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 2'); + }, 100); + }); + + Promise.race([promise1, promise2]).then(function(result){ + // result === 'promise 2' because it was resolved before promise1 + // was resolved. + }); + ``` + + `Promise.race` is deterministic in that only the state of the first + settled promise matters. For example, even if other promises given to the + `promises` array argument are resolved, but the first settled promise has + become rejected before the other promises became fulfilled, the returned + promise will become rejected: + + ```javascript + let promise1 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 1'); + }, 200); + }); + + let promise2 = new Promise(function(resolve, reject){ + setTimeout(function(){ + reject(new Error('promise 2')); + }, 100); + }); + + Promise.race([promise1, promise2]).then(function(result){ + // Code here never runs + }, function(reason){ + // reason.message === 'promise 2' because promise 2 became rejected before + // promise 1 became fulfilled + }); + ``` + + An example real-world use case is implementing timeouts: + + ```javascript + Promise.race([ajax('foo.json'), timeout(5000)]) + ``` + + @method race + @static + @param {Array} promises array of promises to observe + Useful for tooling. + @return {Promise} a promise which settles in the same way as the first passed + promise to settle. +*/ +function race(entries) { + /*jshint validthis:true */ + var Constructor = this; + + if (!isArray(entries)) { + return new Constructor(function (_, reject) { + return reject(new TypeError('You must pass an array to race.')); + }); + } else { + return new Constructor(function (resolve, reject) { + var length = entries.length; + for (var i = 0; i < length; i++) { + Constructor.resolve(entries[i]).then(resolve, reject); + } + }); + } +} + +/** + `Promise.reject` returns a promise rejected with the passed `reason`. + It is shorthand for the following: + + ```javascript + let promise = new Promise(function(resolve, reject){ + reject(new Error('WHOOPS')); + }); + + promise.then(function(value){ + // Code here doesn't run because the promise is rejected! + }, function(reason){ + // reason.message === 'WHOOPS' + }); + ``` + + Instead of writing the above, your code now simply becomes the following: + + ```javascript + let promise = Promise.reject(new Error('WHOOPS')); + + promise.then(function(value){ + // Code here doesn't run because the promise is rejected! + }, function(reason){ + // reason.message === 'WHOOPS' + }); + ``` + + @method reject + @static + @param {Any} reason value that the returned promise will be rejected with. + Useful for tooling. + @return {Promise} a promise rejected with the given `reason`. +*/ +function reject$1(reason) { + /*jshint validthis:true */ + var Constructor = this; + var promise = new Constructor(noop); + reject(promise, reason); + return promise; +} + +function needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); +} + +function needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); +} + +/** + Promise objects represent the eventual result of an asynchronous operation. The + primary way of interacting with a promise is through its `then` method, which + registers callbacks to receive either a promise's eventual value or the reason + why the promise cannot be fulfilled. + + Terminology + ----------- + + - `promise` is an object or function with a `then` method whose behavior conforms to this specification. + - `thenable` is an object or function that defines a `then` method. + - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). + - `exception` is a value that is thrown using the throw statement. + - `reason` is a value that indicates why a promise was rejected. + - `settled` the final resting state of a promise, fulfilled or rejected. + + A promise can be in one of three states: pending, fulfilled, or rejected. + + Promises that are fulfilled have a fulfillment value and are in the fulfilled + state. Promises that are rejected have a rejection reason and are in the + rejected state. A fulfillment value is never a thenable. + + Promises can also be said to *resolve* a value. If this value is also a + promise, then the original promise's settled state will match the value's + settled state. So a promise that *resolves* a promise that rejects will + itself reject, and a promise that *resolves* a promise that fulfills will + itself fulfill. + + + Basic Usage: + ------------ + + ```js + let promise = new Promise(function(resolve, reject) { + // on success + resolve(value); + + // on failure + reject(reason); + }); + + promise.then(function(value) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Advanced Usage: + --------------- + + Promises shine when abstracting away asynchronous interactions such as + `XMLHttpRequest`s. + + ```js + function getJSON(url) { + return new Promise(function(resolve, reject){ + let xhr = new XMLHttpRequest(); + + xhr.open('GET', url); + xhr.onreadystatechange = handler; + xhr.responseType = 'json'; + xhr.setRequestHeader('Accept', 'application/json'); + xhr.send(); + + function handler() { + if (this.readyState === this.DONE) { + if (this.status === 200) { + resolve(this.response); + } else { + reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); + } + } + }; + }); + } + + getJSON('/posts.json').then(function(json) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Unlike callbacks, promises are great composable primitives. + + ```js + Promise.all([ + getJSON('/posts'), + getJSON('/comments') + ]).then(function(values){ + values[0] // => postsJSON + values[1] // => commentsJSON + + return values; + }); + ``` + + @class Promise + @param {Function} resolver + Useful for tooling. + @constructor +*/ + +var Promise$1 = function () { + function Promise(resolver) { + this[PROMISE_ID] = nextId(); + this._result = this._state = undefined; + this._subscribers = []; + + if (noop !== resolver) { + typeof resolver !== 'function' && needsResolver(); + this instanceof Promise ? initializePromise(this, resolver) : needsNew(); + } + } + + /** + The primary way of interacting with a promise is through its `then` method, + which registers callbacks to receive either a promise's eventual value or the + reason why the promise cannot be fulfilled. + ```js + findUser().then(function(user){ + // user is available + }, function(reason){ + // user is unavailable, and you are given the reason why + }); + ``` + Chaining + -------- + The return value of `then` is itself a promise. This second, 'downstream' + promise is resolved with the return value of the first promise's fulfillment + or rejection handler, or rejected if the handler throws an exception. + ```js + findUser().then(function (user) { + return user.name; + }, function (reason) { + return 'default name'; + }).then(function (userName) { + // If `findUser` fulfilled, `userName` will be the user's name, otherwise it + // will be `'default name'` + }); + findUser().then(function (user) { + throw new Error('Found user, but still unhappy'); + }, function (reason) { + throw new Error('`findUser` rejected and we're unhappy'); + }).then(function (value) { + // never reached + }, function (reason) { + // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. + // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. + }); + ``` + If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. + ```js + findUser().then(function (user) { + throw new PedagogicalException('Upstream error'); + }).then(function (value) { + // never reached + }).then(function (value) { + // never reached + }, function (reason) { + // The `PedgagocialException` is propagated all the way down to here + }); + ``` + Assimilation + ------------ + Sometimes the value you want to propagate to a downstream promise can only be + retrieved asynchronously. This can be achieved by returning a promise in the + fulfillment or rejection handler. The downstream promise will then be pending + until the returned promise is settled. This is called *assimilation*. + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // The user's comments are now available + }); + ``` + If the assimliated promise rejects, then the downstream promise will also reject. + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // If `findCommentsByAuthor` fulfills, we'll have the value here + }, function (reason) { + // If `findCommentsByAuthor` rejects, we'll have the reason here + }); + ``` + Simple Example + -------------- + Synchronous Example + ```javascript + let result; + try { + result = findResult(); + // success + } catch(reason) { + // failure + } + ``` + Errback Example + ```js + findResult(function(result, err){ + if (err) { + // failure + } else { + // success + } + }); + ``` + Promise Example; + ```javascript + findResult().then(function(result){ + // success + }, function(reason){ + // failure + }); + ``` + Advanced Example + -------------- + Synchronous Example + ```javascript + let author, books; + try { + author = findAuthor(); + books = findBooksByAuthor(author); + // success + } catch(reason) { + // failure + } + ``` + Errback Example + ```js + function foundBooks(books) { + } + function failure(reason) { + } + findAuthor(function(author, err){ + if (err) { + failure(err); + // failure + } else { + try { + findBoooksByAuthor(author, function(books, err) { + if (err) { + failure(err); + } else { + try { + foundBooks(books); + } catch(reason) { + failure(reason); + } + } + }); + } catch(error) { + failure(err); + } + // success + } + }); + ``` + Promise Example; + ```javascript + findAuthor(). + then(findBooksByAuthor). + then(function(books){ + // found books + }).catch(function(reason){ + // something went wrong + }); + ``` + @method then + @param {Function} onFulfilled + @param {Function} onRejected + Useful for tooling. + @return {Promise} + */ + + /** + `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same + as the catch block of a try/catch statement. + ```js + function findAuthor(){ + throw new Error('couldn't find that author'); + } + // synchronous + try { + findAuthor(); + } catch(reason) { + // something went wrong + } + // async with promises + findAuthor().catch(function(reason){ + // something went wrong + }); + ``` + @method catch + @param {Function} onRejection + Useful for tooling. + @return {Promise} + */ + + + Promise.prototype.catch = function _catch(onRejection) { + return this.then(null, onRejection); + }; + + /** + `finally` will be invoked regardless of the promise's fate just as native + try/catch/finally behaves + + Synchronous example: + + ```js + findAuthor() { + if (Math.random() > 0.5) { + throw new Error(); + } + return new Author(); + } + + try { + return findAuthor(); // succeed or fail + } catch(error) { + return findOtherAuther(); + } finally { + // always runs + // doesn't affect the return value + } + ``` + + Asynchronous example: + + ```js + findAuthor().catch(function(reason){ + return findOtherAuther(); + }).finally(function(){ + // author was either found, or not + }); + ``` + + @method finally + @param {Function} callback + @return {Promise} + */ + + + Promise.prototype.finally = function _finally(callback) { + var promise = this; + var constructor = promise.constructor; + + if (isFunction(callback)) { + return promise.then(function (value) { + return constructor.resolve(callback()).then(function () { + return value; + }); + }, function (reason) { + return constructor.resolve(callback()).then(function () { + throw reason; + }); + }); + } + + return promise.then(callback, callback); + }; + + return Promise; +}(); + +Promise$1.prototype.then = then; +Promise$1.all = all; +Promise$1.race = race; +Promise$1.resolve = resolve$1; +Promise$1.reject = reject$1; +Promise$1._setScheduler = setScheduler; +Promise$1._setAsap = setAsap; +Promise$1._asap = asap; + +/*global self*/ +function polyfill() { + var local = void 0; + + if (typeof global !== 'undefined') { + local = global; + } else if (typeof self !== 'undefined') { + local = self; + } else { + try { + local = Function('return this')(); + } catch (e) { + throw new Error('polyfill failed because global object is unavailable in this environment'); + } + } + + var P = local.Promise; + + if (P) { + var promiseToString = null; + try { + promiseToString = Object.prototype.toString.call(P.resolve()); + } catch (e) { + // silently ignored + } + + if (promiseToString === '[object Promise]' && !P.cast) { + return; + } + } + + local.Promise = Promise$1; +} + +// Strange compat.. +Promise$1.polyfill = polyfill; +Promise$1.Promise = Promise$1; + +return Promise$1; + +}))); + + + +//# sourceMappingURL=es6-promise.map + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(51), __webpack_require__(52))) + +/***/ }), +/* 51 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__53__; + +/***/ }), +/* 54 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__54__; + +/***/ }), +/* 55 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/** + * JSONP : Implémentation du protocole JSONP de la plateforme Géoportail + * + * @module JSONP + * @private + * @alias Gp.Protocols.JSONP + */ + + +// cf. https://github.com/sobstel/jsonp.js +var JSONP = { + + /** + * Construction d'un identifiant statique basé sur le timestamp, + * et qui s'incremente de +1 à chaque appel + */ + uuid : (function () { + var id = Math.floor(Date.now()); + return function () { + return id++; + }; + })(), + + /** + * Cette fonction réalise l'appel du service fourni via le paramètre "options.url" + * en mettant en œuvre le protocole JSONP. + * + * @method call + * @static + * @param {Object} options - parametres d'invocation du service en JSONP + * @param {String} options.url - URL du service à invoquer (indépendamment du protocole JSONP). + * Cette URL contient déjà les paramètres du service. + * Si le paramètre dédié à la mise en oeuvre du protocole JSONP (callback=xxx) n'est pas présent, il est rajouté par la fonction ; + * sa valeur est déterminée en fonction du paramètre callbackName. + * @param {Number} [options.timeOut = 0] - Nombre de ms au bout duquel on considère que le service n'a pas répondu. + * Une valeur de 0 pour ce paramètre permet de désactiver la gestion du timeOut. + * @param {String} [options.callbackSuffix = null] - Suffixe de la fonction de callback à rajouter sur l'URL. + * Si aucun suffixe n'est spécifié (cas par défaut), on utilisera l'identifiant this.uuid () comme suffixe. Ex: "callback1458574396582 ()" + * @param {String} [options.callbackName = gp.protocol.jsonp] - Valeur du paramètre callback à rajouter sur l'URL. + * Si l'URL fournie contient déjà le paramètre callback, le paramètre callbackName ne sera pas pris en compte. + * La fonction de callback est créée dynamiquement par la fonction JSONP ; + * elle a deux fonctions : + * elle annule la condition de timeOut + * puis appelle la fonction fournie par l'utilisateur via le paramètre onResponse. + * @param {Function} options.onResponse - Nom de la fonction qui sera appelée lors de la réception des résultats du service. + * Ce paramètre sera ignoré si l'URL contient déjà le paramètre callback. + * La fonction de rappel appelée sera alors celle ayant pour nom la valeur de ce paramètre. + * @param {Function} [options.onTimeOut] - Nom de la fonction qui sera appelée en cas de non réponse du service. + * Le temps au bout duquel on considère que le service n'a pas répondu est déterminé par le paramètre timeOut. + * @example + * var options = { + * url : 'http://localhost/some/test.json&callback=myResults', + * timeOut : 100, + * callbackName : 'myResults', + * callbackSuffix : "", + * onResponse : function (response) { + * console.log('results : ', response); + * }, + * + * }; + * JSONP.call(options); + */ + call : function (options) { + // logger + var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("JSONP"); + logger.trace("[JSONP::call ()]"); + + // analyse parametres + + if (!options) { + logger.error("missing parameter : options !"); + throw new Error("missing parameter : options !"); + } + + if (!options.url) { + logger.error("missing parameter : options.url !"); + throw new Error("missing parameter : options.url !"); + } + + if (!options.timeOut) { + logger.info("setting 'options.timeOut' default value"); + options.timeOut = 0; + } + + // FIXME si un callback coté client a été mis en place, + // cette condition sur cette methode n'a pas de sens !? + if (!options.onResponse) { + logger.error("missing parameter : options.onResponse !"); + throw new Error("missing parameter : options.onResponse !"); + // FIXME doit on definir un callback interne par defaut !? + // options.onResponse = function (data) { + // console.log("response callback (inner) : ", data); + // }; + } + + // ID du callback à utiliser : null ou string. + // si l'utilisateur a spécifié un suffixe pour le callback, on le récupère comme un ID (ex: options.callbackSuffix = "") + // sinon, on utilise un timestamp : this.uuid () + var callbackId = (typeof options.callbackSuffix === "string") ? options.callbackSuffix : this.uuid(); + + // on recherche le parametre callback et son nom de fonction dans l'url + var urlHasCallbackKey = false; + var urlHasCallbackName = false; + + var idx = options.url.indexOf("callback="); + + if (idx !== -1) { + urlHasCallbackKey = true; + // extraction callbackName de l'url : entre "callback=" et "&" ou fin de ligne + var j = options.url.indexOf("&", idx); + if (j === -1) { + j = options.url.length; + } + + // on ecrase le parametre options.callbackName s'il avait été défini + var callbackName = options.url.substring(idx + 9, j); + + if (callbackName) { + urlHasCallbackName = true; + options.callbackName = callbackName; + logger.info("setting 'options.callbackName' value (" + options.callbackName + ") from 'options.url' parameter"); + } + } + + // on ajoute le parametre callback dans l'URL s'il n'existe pas + if (!urlHasCallbackKey) { + // gestion des autres param. et "?" + var k = options.url.indexOf("?"); + if (k === -1) { + // aucun param., ni de '?' + options.url = options.url + "?" + "callback="; + } else if (k === options.url.length) { + // uniquement le '?' + options.url = options.url + "callback="; + } else { + // le '?' et les param. existent + options.url = options.url + "&" + "callback="; + } + logger.info("setting callback default key in 'options.url' : " + options.url); + } + + // utilisation de la fonction callback coté client ? + var HasCallbackName = options.callbackName ? true : urlHasCallbackName; + + // on ajoute le nom de la fonction callback dans l'URL si elle n'existe pas + if (!urlHasCallbackName) { + // fonction callback par defaut + if (!options.callbackName) { + logger.info("setting 'options.callbackName' default value"); + options.callbackName = "callback"; // ou "gp.protocol.jsonp" ? + // info : si on ne veut pas gerer d'ID dans le callback, + // options.callbackSuffix = "" + if (callbackId || callbackId === "") { + options.callbackName += callbackId; + } + } + options.url = options.url.replace("callback=", "callback=" + options.callbackName); + logger.info("setting callback function name in 'options.url' : " + options.url); + } + + // timeOut par defaut + if (!options.onTimeOut) { + logger.info("setting 'options.onTimeOut' default value"); + /** callback timeout par defaut */ + options.onTimeOut = function (/* error */) { + console.log("TimeOut while invoking url : " + options.url); + }; + } + + if (!HasCallbackName) { + var self = this; + + // event du timeout + var onTimeOutTrigger = null; + + // declenche le timeout si > à 0 ! + if (options.timeOut > 0) { + onTimeOutTrigger = window.setTimeout( + function () { + /** fonction de reponse du service */ + window[options.callbackName] = function () {}; + options.onTimeOut(); + self._deleteScript(callbackId); + }, options.timeOut); + } + + // FIXME le nom de la fonction n'accepte pas de namespace ! + // ex. Gp.Function.callback + /** + * fonction de reponse du service + * @param {Object} data - data + * @private + */ + window[options.callbackName] = function (data) { + window.clearTimeout(onTimeOutTrigger); + options.onResponse(data); + self._deleteScript(callbackId); + }; + } + + this._createScript(callbackId, options.url); + }, + + /** + * create Script + * @param {String} callbackId - callback Id + * @param {String} url - url + * @private + */ + _createScript : function (callbackId, url) { + var scriptu; + var scripto = document.getElementById("results" + callbackId); + + scriptu = document.createElement("script"); + scriptu.setAttribute("type", "text/javascript"); + scriptu.setAttribute("src", url); + scriptu.setAttribute("charset", "UTF-8"); + scriptu.setAttribute("id", "results" + callbackId); + scriptu.setAttribute("async", "true"); // FIXME async ? + // head ou body ou autres ? + var node = document.documentElement || document.getElementsByTagName("head")[0]; + if (scripto === null) { + node.appendChild(scriptu); + } else { + // s'il existe déjà, on le remplace ! + node.replaceChild(scriptu, scripto); + } + }, + + /** + * delete Script + * @param {String} callbackId - callback Id + * @private + */ + _deleteScript : function (callbackId) { + var script = document.getElementById("results" + callbackId); + if (script) { + var node = script.parentNode || document.documentElement; + if (!node) { + return; + } + node.removeChild(script); + } + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (JSONP); + + +/***/ }), +/* 56 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * Errors raised by API for one among three reasons : wrong API usage, underlying service error or unknown reason. + * + * @property {String} message - Error message + * @property {Number} status - Error status : when {@link Gp.Error.TYPE_SRVERR}, gives the [HTTP status of the underlying web service response]{@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} ; -1 otherwise. + * @property {String} type - Error type ({@link Gp.Error.TYPE_SRVERR}, {@link Gp.Error.TYPE_USEERR} or {@link Gp.Error.TYPE_UNKERR}). + * + * @namespace + * @alias Gp.Error + * @param {Object|String} error - Options for creating error object. Can be a String (message) or an Object. + * @param {String} error.message - Error message to return to user. + * @param {enum} [error.type=TYPE_UNKERR] - Error type + * @param {status} [error.status=-1] - Error status : when {@link Gp.Error.TYPE_SRVERR}, gives the [HTTP status of the underlying web service response]{@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}. + * + */ +function ErrorService (error) { + if (!(this instanceof ErrorService)) { + throw new TypeError("ErrorService constructor cannot be called as a function."); + } + + var e = error; + if (typeof error === "string" || error instanceof String) { + this.message = error; + this.status = -1; + this.type = ErrorService.TYPE_UNKERR; + } else { + this.message = e.message || "undefined!?"; + this.type = e.type; + this.status = e.status || -1; + } + + this.name = "ErrorService"; + this.stack = (new Error()).stack; +} + +/** + * Error raised when underlying geoportal service answers on error. + * + * @type {String} + * @constant + * @static + */ +ErrorService.TYPE_SRVERR = "SERVICE_ERROR"; +/** + * Error raised when funcion use is inappropriate + * + * @type {String} + * @constant + * @static + */ +ErrorService.TYPE_USEERR = "USAGE_ERROR"; +/** + * Error raised when API can't perform the job for a reason other than the two other ones. + * + * @type {String} + * @constant + * @static + */ +ErrorService.TYPE_UNKERR = "UNKNOWN_ERROR"; + +/** + * @lends module:ErrorService + */ +ErrorService.prototype = Object.create(Error.prototype, { + constructor : { + value : ErrorService, + writable : true, + configurable : true + } +}); + +/* harmony default export */ __webpack_exports__["default"] = (ErrorService); + + +/***/ }), +/* 57 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +// cette classe contient les URLs par defaut des services. +// DefaultUrlService.Alti.url(key)[elevation-json] +// DefaultUrlService.Alti.url(key)[elevation-xml] +// DefaultUrlService.Alti.url(key)[profil-json] +// DefaultUrlService.Alti.url(key)[profil-xml] +// DefaultUrlService.Alti.url(key)[wps] +// DefaultUrlService.ProcessIsoCurve.url(key) +// DefaultUrlService.AutoComplete.url(key) +// DefaultUrlService.ReverseGeocode.url(key) +// DefaultUrlService.Geocode.url(key) +// DefaultUrlService.Route.url(key) + +// Example : +// +// DefaultUrlService.Alti.url('alti')[elevation-json] +// output {String} -> http://wxs.ign.fr/calcul/alti/rest/elevation.json +// +// DefaultUrlService.Alti.url('calcul') +// output {Object|String} +// -> http://wxs.ign.fr/calcul/alti/rest/elevation.json +// -> http://wxs.ign.fr/calcul/alti/rest/elevation.xml +// -> http://wxs.ign.fr/calcul/alti/rest/elevationLine.json +// -> http://wxs.ign.fr/calcul/alti/rest/elevationLine.xml +// -> http://wxs.ign.fr/calcul/alti/wps +// +// ssl by default. +// +// Force to not do ssl : +// DefaultUrlService.ssl = false; +// +// DefaultUrlService.AutoComplete.url('calcul') +// output {Object|String} +// -> https://wxs.ign.fr/calcul/ols/apis/completion + +// constantes internes +var HOSTNAME = "wxs.ign.fr"; + +/** + * Default Geoportal web services URLs access. + * + * @namespace + * @alias Gp.Services.DefaultUrl + */ +var DefaultUrlService = { + + /** if set true, require the use of https protocol */ + ssl : true, + + /** + * base url of services (ssl protocol management) + * @param {String} key - key + * @param {String} path - path + * @returns {String} url + */ + url : function (key, path) { + // comportement par défaut => https + // sinon, il est fixé par l'option 'ssl' (false => http) + var _protocol; + if (DefaultUrlService.ssl === false) { + _protocol = "http://"; + } else { + _protocol = "https://"; + } + + return _protocol + HOSTNAME.concat("/", key, path); + }, + + /** + * Elevation web service access + * + * @member {Object} + * @property {Function} url (key) - Returns elevation service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols ("elevation-json", "elevation-xml", "profil-json" or "profil-xml"). + */ + Alti : { + _key : { + // rest + "elevation-json" : "/alti/rest/elevation.json", + "elevation-xml" : "/alti/rest/elevation.xml", + "profil-json" : "/alti/rest/elevationLine.json", + "profil-xml" : "/alti/rest/elevationLine.xml", + // other + wps : "/alti/wps" + }, + /** + * url + * @param {String} key - key + * @returns {String} url + */ + url : function (key) { + return { + // rest + "elevation-json" : DefaultUrlService.url(key, this._key["elevation-json"]), + "elevation-xml" : DefaultUrlService.url(key, this._key["elevation-xml"]), + "profil-json" : DefaultUrlService.url(key, this._key["profil-json"]), + "profil-xml" : DefaultUrlService.url(key, this._key["profil-xml"]), + // other + wps : DefaultUrlService.url(key, this._key["wps"]) + }; + } + }, + /** + * IsoCurve web service access + * + * @member {Object} + * @property {Function} url (key) - Returns isocurve service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols ("iso-json" or "iso-xml"). + */ + ProcessIsoCurve : { + _key : "/geoportail/isochrone/rest/1.0.0/isochrone", + /** + * url + * @param {String} key - key + * @returns {String} url + */ + url : function (key) { + return DefaultUrlService.url(key, this._key); + } + }, + /** + * Config web service access + * + * @member {Object} + * @property {Function} url (key) - Returns config service default urls with or without geoportal access key given as a parameter. + */ + Config : { + _key : "https://raw.githubusercontent.com/IGNF/geoportal-configuration/main/dist/", + /** + * url + * @param {String} key - key + * @returns {String} url + */ + url : function (key) { + // key must be an array of one or several keys + if (!Array.isArray(key)) { + key = key.split(","); + } + // not homogeneous with others geoportal services URLs + var url = []; + for (var i = 0; i < key.length; i++) { + url[i] = this._key + key[i] + "Config.json"; + } + return url; + } + }, + /** + * Autocompletion web service access + * + * @member {Object} + * @property {Function} url (key) - Returns autocomplete service default urls with or without geoportal access key given as a parameter. The result is a String. + */ + AutoComplete : { + _key : "/ols/apis/completion", + /** + * url + * @param {String} key - key + * @returns {String} url + */ + url : function (key) { + return DefaultUrlService.url(key, this._key); + } + }, + /** + * Reverse geocoding web service access + * + * @member {Object} + * @property {Function} url (key) - Returns reverse geocoding service default urls with or without geoportal access key given as a parameter. The result is a String. + */ + ReverseGeocode : { + _key : "/geoportail/ols", + /** + * url + * @param {String} key - key + * @returns {String} url + */ + url : function (key) { + return DefaultUrlService.url(key, this._key); + } + }, + /** + * Geocoding web service access + * + * @member {Object} + * @property {Function} url (key) - Returns geocoding service default urls with or without geoportal access key given as a parameter. The result is a String. + */ + Geocode : { + _key : "/geoportail/ols", + /** + * url + * @param {String} key - key + * @returns {String} url + */ + url : function (key) { + return DefaultUrlService.url(key, this._key); + } + }, + /** + * Routing web service access + * + * @member {Object} + * @property {Function} url (key) - Returns routing service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols. + */ + Route : { + _key : "/geoportail/itineraire/rest/1.0.0/route", + /** + * url + * @param {String} key - key + * @returns {String} url + */ + url : function (key) { + return DefaultUrlService.url(key, this._key); + } + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (DefaultUrlService); + + +/***/ }), +/* 58 */ +/***/ (function(module) { + +module.exports = JSON.parse("{\"_from\":\"geoportal-access-lib@3.3.4\",\"_id\":\"geoportal-access-lib@3.3.4\",\"_inBundle\":false,\"_integrity\":\"sha512-0D0YT93mRjhm7tvKC7tM0V/10CoftWqZ836AR/O79BEUwSk/CicmE85IK5NLh/sFclQX8hvaYexpn3ZetVbJWg==\",\"_location\":\"/geoportal-access-lib\",\"_phantomChildren\":{},\"_requested\":{\"type\":\"version\",\"registry\":true,\"raw\":\"geoportal-access-lib@3.3.4\",\"name\":\"geoportal-access-lib\",\"escapedName\":\"geoportal-access-lib\",\"rawSpec\":\"3.3.4\",\"saveSpec\":null,\"fetchSpec\":\"3.3.4\"},\"_requiredBy\":[\"/\"],\"_resolved\":\"https://registry.npmjs.org/geoportal-access-lib/-/geoportal-access-lib-3.3.4.tgz\",\"_shasum\":\"5a82701a7c12c54a40c4d0b5f2aa145acb22a434\",\"_spec\":\"geoportal-access-lib@3.3.4\",\"_where\":\"/home/runner/work/geoportal-extensions/geoportal-extensions\",\"author\":{\"name\":\"IGNF\"},\"bugs\":{\"url\":\"https://github.com/IGNF/geoportal-access-lib/issues\"},\"bundleDependencies\":false,\"date\":\"29/08/2023\",\"dependencies\":{\"es6-promise\":\"^4.2.4\",\"node-fetch\":\"^2.6.1\",\"xmldom\":\"^0.1.27\"},\"deprecated\":false,\"description\":\"French Geoportal resources access library\",\"devDependencies\":{\"@babel/core\":\"^7.12.10\",\"@babel/plugin-transform-template-literals\":\"^7.12.1\",\"@babel/preset-env\":\"^7.12.11\",\"babel-loader\":\"^8.2.2\",\"chai\":\"^4.1.2\",\"clean-webpack-plugin\":\"^3.0.0\",\"copy-webpack-plugin\":\"^5.1.2\",\"eslint\":\"^7.18.0\",\"eslint-config-standard\":\"^16.0.2\",\"eslint-loader\":\"^4.0.2\",\"eslint-plugin-import\":\"^2.22.1\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"^4.2.1\",\"eslint-plugin-standard\":\"^5.0.0\",\"glob\":\"^7.1.2\",\"handlebars-layouts\":\"^3.1.4\",\"handlebars-webpack-plugin\":\"^1.4.1\",\"html-webpack-plugin\":\"^4.5.1\",\"istanbul-instrumenter-loader\":\"^3.0.1\",\"jsdoc-webpack-plugin\":\"^0.3.0\",\"loglevel\":\"^1.6.1\",\"mocha\":\"^7.2.0\",\"mocha-loader\":\"^5.1.5\",\"mocha-webpack\":\"^2.0.0-beta.0\",\"mochawesome\":\"^6.2.1\",\"nyc\":\"^15.1.0\",\"path\":\"^0.12.7\",\"replace-bundle-webpack-plugin\":\"^1.0.0\",\"sinon\":\"^9.2.4\",\"sinon-es6\":\"0.0.3\",\"speed-measure-webpack-plugin\":\"^1.4.2\",\"string-template\":\"^1.0.0\",\"terser-webpack-plugin\":\"^2.3.8\",\"webpack\":\"^4.46.0\",\"webpack-cli\":\"^3.3.12\",\"webpack-dev-server\":\"^3.11.2\",\"webpack-node-externals\":\"^2.5.2\",\"webpack-shell-plugin\":\"^0.5.0\"},\"homepage\":\"https://github.com/IGNF/geoportal-access-lib#readme\",\"keywords\":[\"geoportail\",\"webservice\",\"javascript\",\"es6\"],\"license\":\"CECILL-B\",\"main\":\"dist/GpServices-src.js\",\"module\":\"src/Gp.js\",\"name\":\"geoportal-access-lib\",\"nyc\":{\"include\":[\"src/**/*.js\"],\"instrument\":false,\"sourceMap\":false},\"optionalDependencies\":{},\"peerDependencies\":{},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/IGNF/geoportal-access-lib.git\"},\"scripts\":{\"build\":\"webpack --mode=none\",\"build:dev\":\"webpack --mode=development\",\"build:prod\":\"webpack --mode=production\",\"clean\":\"echo \\\"Warning: no yet implemented!\\\" && exit 0\",\"cover\":\"nyc --reporter=lcov --reporter=text npm run test\",\"doc\":\"npm run doc:serve\",\"doc:serve\":\"webpack-dev-server --content-base jsdoc --port 9001 --open\",\"eslint\":\"eslint src/\",\"sample\":\"npm run sample:serve\",\"sample:serve\":\"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path '/dist/' --port 9001 --open\",\"sample:serve:dev\":\"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path '/dist/' --port 9001 --open\",\"sample:serve:prod\":\"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path '/dist/' --port 9001 --open\",\"setup\":\"npm install\",\"test\":\"mocha-webpack --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob \\\"test_*.js\\\" test/spec/\",\"test:end-to-end:serve\":\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js\",\"test:end-to-end:serve:docker\":\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js\",\"test:serve\":\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js\",\"test:serve:docker\":\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js\"},\"version\":\"3.3.4\"}"); + +/***/ }), +/* 59 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +/** + * Response object for {@link module:Services~getConfig Gp.Services.getConfig ()} invocation when successful. Received as the argument of onSuccess callback function. + * + * @property {Object} generalOptions - General properties for default map configuration resources. + * @property {Object} generalOptions.apiKeys - Object that associates apiKey (s) with an array of resources IDs availables with that key. + * @property {String} generalOptions.title - Underlying web service Title. + * @property {String} generalOptions.defaultGMLGFIStyle - XSL URL used by default to translate an XML GetFeatureInfo response into an HTML array. + * @property {String} generalOptions.theme - default theme (FIXME : for what ?) + * @property {Array.} generalOptions.wgs84Resolutions - geographical resolutions Array for each [zoom level of the Geoportal platform]{@link http://api.ign.fr/tech-docs-js/webmaster/layers.html#Geoportal_resolutions} from 0 to 21. Expressed in degrees/pixel. + * @property {Object} layers - Associative array mapping resources availables IDs (keys) with their properties (values given as {@link Gp.Services.Config.Layer}). + * @property {Object} tileMatrixSets - Associative Array mapping TileMatrixSets IDs (keys) availables with their properties (values given as {@link Gp.Services.Config.TileMatrixSet}). + * + * @namespace + * @alias Gp.Services.GetConfigInterface + */ +function ConfigInterface () { + if (!(this instanceof ConfigInterface)) { + throw new TypeError("ConfigInterface constructor cannot be called as a function."); + } + + this.generalOptions = { + apiKeys : {}, + title : null, + defaultGMLGFIStyle : null, + theme : null, + wgs84Resolutions : [] + }; + + this.layers = {}; + + this.tileMatrixSets = {}; +} + +ConfigInterface.prototype = { + + /* + * Constructor (alias) + */ + constructor : ConfigInterface, + + /** + * Check if config is loaded for a given key + * + * @param {String} apiKey - Access key to Geoportal platform + * @returns {Boolean} isKeyConfLoaded - true if config of the key is already loaded, false otherwise + */ + isKeyConfLoaded : function (apiKey) { + if (!apiKey) { + return; + } + if (this.generalOptions.apiKeys[apiKey]) { + return true; + } + return false; + }, + + /** + * Returns an array of Geoportal layers identifiers, corresponding to an API contract key. + * + * @param {String} apiKey - Access key to Geoportal platform + * @returns {Array} apiKeys - Array of geoportal layers identifiers + */ + getLayersId : function (apiKey) { + return this.generalOptions.apiKeys[apiKey]; + }, + + /** + * Returns the id of a Geoportal layer with its name and its service. + * + * @param {String} layerName - name of the layer (ex. "ORTHOIMAGERY.ORTHOPHOTOS") + * @param {String} service - name of the service (ex. "WMS" ou "WMTS") + * @returns {String} Id of the layer (ex. "ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS") + */ + getLayerId : function (layerName, service) { + if (!layerName || !service) { + return; + } + var layerId = null; + + // layer + // key : [layerName]$[contexte]:OGC:[service] + // ex : "ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS" + + // service + // key : [layerName]$[contexte];[service] + // ex : PositionOfInterest$OGC:OPENLS;ReverseGeocode + + if (this.layers) { + var layers = this.layers; + for (var key in layers) { + if (layers.hasOwnProperty(key)) { + var parts = key.split("$"); + if (layerName === parts[0]) { + if (parts[1]) { + var servicePartsLayer = parts[1].split(":"); + var servicePartsService = parts[1].split(";"); + + if (servicePartsService[1] === service.toUpperCase()) { + layerId = key; + break; + } + if (servicePartsLayer[2] === service.toUpperCase()) { + layerId = key; + break; + } + } + } + } + } + } + if (!layerId) { + return; + } + return layerId; + }, + + /** + * Returns an associative array of Geoportal layers configurations, corresponding to an API contract key. + * If no key is specified, all layers from configuration are returned. + * + * @param {String} apiKey - Access key to Geoportal platform + * @returns {Object} layers - Object which properties are layers identifiers. + */ + getLayersConf : function (apiKey) { + var layers = {}; + var layersIdArray = this.getLayersId(apiKey); + if (layersIdArray) { + for (var i = 0; i < layersIdArray.length; i++) { + var lyrId = layersIdArray[i]; + layers[lyrId] = this.layers[lyrId]; + } + } + return layers; + }, + + /** + * Returns a geoportal layer configuration, given its identifier + * + * @param {String} layerId - Geoportal layer identifier (e.g. "GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS") + * @return {Object} layer - Layer configuration + */ + getLayerConf : function (layerId) { + if (!this.layers) { + return; + } + return this.layers[layerId]; + }, + + /** + * Get all parameters needed to display a WMS or WMTS layer given its name, its service and its key + * + * @param {String} layerName - name of the layer (ex. "ORTHOIMAGERY.ORTHOPHOTOS") + * @param {String} service - name of the service (ex. "WMS" ou "WMTS") + * @param {String} [apiKey] - Contract API key + * @returns {Object} params - params of the service (WMS or WMTS) for the given layer + * @returns {String} params.url - Url of the service to reach to display the layer + * @returns {String} params.version - Version of the service + * @returns {String} params.styles - Default style of the layer + * @returns {String} params.format - Default format of the layer + * @returns {String} params.projection - Default projection of the layer + * @returns {Number} params.minScale - Min scale denominator of the layer + * @returns {Number} params.maxScale - Max scale denominator of the layer + * @returns {Gp.BBox} params.extent - Extent of the layer, in the projection of the layer + * @returns {Array} params.legends - Array of legends associated to the layer + * @returns {Array} params.title - Name of the layer, readable by a human + * @returns {Array} params.description - Description of the layer + * @returns {String} params.[TMSLink] - Id of the Tile Matrix Set (TMS), in the case of WMTS layer + * @returns {Gp.Point} params.[matrixOrigin] - Originof the tile matrix (top left corner), in the case of WMTS layer + * @returns {Array} params.[nativeResolutions] - Array with the resolution of each level of the tile matrix set, in the case of WMTS layer + * @returns {Array} params.[matrixIds] - Array with the ID of each level of the tile matrix set, in the case of WMTS layer + */ + getLayerParams : function (layerName, service) { + var params = {}; + + if ((service === "WMS" || Object.keys(this.tileMatrixSets).length !== 0) && Object.keys(this.layers).length !== 0) { + // get the layerId of the layer + var layerId = this.getLayerId(layerName, service); + + if (layerId) { + // get the layer Conf Object + var layerConf = this.getLayerConf(layerId); + + var keys = this.getLayerKey(layerId); + if (keys.length === 0) { + return; + } + + // get services params + for (var i = 0; i < keys.length; i++) { + // only one serverUrl is saved in Gp.Config : with multiKeys, we have to retrieve the key used in the serverUrl property + if (layerConf.serviceParams.serverUrl[keys[i]]) { + params.url = layerConf.serviceParams.serverUrl[keys[i]]; + } + } + + const wmsTypeRegex = /\/v\//; + // WMS vector style always empty (not in getCap) + if (wmsTypeRegex.test(params.url)) { + params.styles = " "; + } else { + // WMS raster style is defined in getCap + params.styles = layerConf.styles[0].name; + } + + params.version = layerConf.serviceParams.version; + params.format = layerConf.formats[0].name; + params.projection = layerConf.defaultProjection; + + // get layer info and constraints + params.minScale = layerConf.globalConstraint.minScaleDenominator; + params.maxScale = layerConf.globalConstraint.maxScaleDenominator; + params.extent = layerConf.globalConstraint.bbox; + params.legends = layerConf.legends; + params.title = layerConf.title; + params.description = layerConf.description; + + if (service === "WMS") { + params.metadata = layerConf.metadata; + } + + // Informations non disponibles avec les getCap + // params.metadata = layerConf.getMetadata(); + // params.originators = layerConf.getOriginators(); + // params.quicklookUrl = layerConf.getQuicklookUrl(); + + // WMTS : get the tileMatrixSetLimits + if (layerConf.wmtsOptions) { + params.tileMatrixSetLimits = layerConf.wmtsOptions.tileMatrixSetLimits; + var TMSLink = layerConf.wmtsOptions.tileMatrixSetLink; + if (TMSLink) { + params.TMSLink = TMSLink; + var tmsConf = this.getTMSConf(TMSLink); + // Get matrix origin : Gp.Point = Object{x:Float, y:Float} + // params.matrixOrigin = tmsConf.getTopLeftCorner(); + params.matrixIds = Object.keys(tmsConf.tileMatrices); + params.tileMatrices = tmsConf.tileMatrices; + // by default, pseudo mercator resolutions + params.nativeResolutions = tmsConf.nativeResolutions || this.getTMSConf("PM").nativeResolutions; + } + } + } + } + return params; + }, + + /** + * Get the contract key(s) associated to a given layer. + * + * @param {String} layerId - Geoportal layer identifier (e.g. "GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS") + * @return {Array} layerKey - array of key(s) associated to the given layer + */ + getLayerKey : function (layerId) { + var layerKey = []; + if (this.generalOptions && this.generalOptions.apiKeys && Object.keys(this.generalOptions.apiKeys).length !== 0) { + var resourcesByKey = this.generalOptions.apiKeys; + for (var key in resourcesByKey) { + var resourcesArray = resourcesByKey[key]; + resourcesArray.forEach(function (arrayLayerId) { + if (arrayLayerId === layerId) { + layerKey.push(key); + } + }); + } + } + return layerKey; + }, + + /** + * Returns an associative array of Tile Matrix Sets configurations. + * + * @return {Object} tileMatrixSets - Object which properties are TMS identifiers + * + */ + getTileMatrixSets : function () { + return this.tileMatrixSets; + }, + + /** + * Returns a Tile Matrix Sets configuration, given its identifier. + * + * @param {String} tmsID - Tile Matrix Set identifier (e.g. : "PM") + * @return {Object} tileMatrixSet - Tile Matrix Set configuration + */ + getTMSConf : function (tmsID) { + if (!this.tileMatrixSets) { + return; + } + return this.tileMatrixSets[tmsID]; + }, + + /** + * Get global constraints for a given Layer : extent, minScale, maxScale, projection + * + * @param {String} layerId - Geoportal layer identifier (e.g. "GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS") + * @returns {Object} params - layer constraints + * @returns {String} params.projection - default layer projection + * @returns {Number} params.minScale - layer min scale denominator + * @returns {Number} params.maxScale - layer max scale denominator + * @returns {Gp.BBox} params.extent - layer extent expressed in the layer projection + */ + getGlobalConstraints : function (layerId) { + var params = {}; + + if (layerId) { + // get layer configuration object + var layerConf = this.getLayerConf(layerId); + params.projection = layerConf.defaultProjection; + params.minScale = layerConf.globalConstraint.minScaleDenominator; + params.maxScale = layerConf.globalConstraint.maxScaleDenominator; + params.extent = layerConf.globalConstraint.bbox; + } + + return params; + } + +}; + +/* harmony default export */ __webpack_exports__["default"] = (ConfigInterface); + + +/***/ }), +/* 60 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56); +/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46); +/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57); +/* harmony import */ var _Request_AltiRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61); +/* harmony import */ var _Response_AltiResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(68); + + + + + + + + + +/** + * @classdesc + * + * Appel du service d'altimétrie du Géoportail + * + * @todo gestion du parma. output et callback + * @todo outputFormat (REST) et format (WPS) + * @todo La reponse JSON peut encapsuler un XML ! + * + * @constructor + * @extends {Gp.Services.CommonService} + * @alias Gp.Services.Alti + * @param {Object} options - options spécifiques au service (+ les options heritées) + * + * @param {Array.} options.positions - Tableau ({lon:float,lat:float}) contenant les coordonnées des points (CRS:84) + * dont on veut connaître les altitudes (ou à partir desquelles on va calculer le profil). + * Chaque élément du tableau est un objet JavaScript avec deux attributs : lon et lat, qui sont des flottants. + * Minimum 2 éléments si on souhaite calculer un profil altimétrique (ElevationLine). + * Maximum 50 éléments. + * + * @param {String} options.outputFormat - Le format de la réponse du service alti : 'xml' ou 'json'. + * Ce paramètre déterminera l'extension '.xml' ou '.json' du service dans le cas de l'API REST, + * ou la valeur du paramètre 'format' dans le cas de la norme WPS. + * Nécessaire si serverUrl est renseigné, et qu'on souhaite passer par l'API REST, + * pour connaître le format dans lequel sera fournie la réponse (pour son traitement). + * Non nécessaire pour la norme WPS. Par défaut, ce paramètre vaut 'json'. + * + * @param {Number} [options.sampling] - Nombre de points à utiliser pour déterminer le tracé d'un profil altimétrique, compris entre 2 et 5000. + * A spécifier lorsqu'on souhaite accéder à cette fonctionnalité. + * Dans ce cas, les points fournis en entrée (au minimum de deux) servent à déterminer l'axe planimétrique + * le long duquel le profil doit être calculé. + * Si le paramètre sampling n'est pas spécifié ou moins de deux points sont fournis, + * c'est le service Elevation qui sera interrogé (altitudes simples calculées pour les points fournis). + * Une valeur de sampling strictement inférieure à 2 déclenchera un échantillonnage avec la valeur par défaut du service (3 points). + * + * @param {String} [options.api] - Manière d'accéder au service : 'REST' (via l'API REST) ou 'WPS' (via la norme WPS). + * Par défaut, on utilise l'API REST. + * + * @param {Boolean} [options.zonly] - Permet de ne récupérer que les altitudes en sortie s'il vaut 'true'. + * Vaut 'false' par défaut. + * + * @example + * var options = { + * apiKey : null, + * serverUrl : 'http://localhost/service/', + * protocol : 'JSONP', // JSONP|XHR + * proxyURL : null, + * httpMethod : 'GET', // GET|POST + * timeOut : 10000, // ms + * rawResponse : false, // true|false + * scope : null, // this + * onSuccess : function (response) {}, + * onFailure : function (error) {}, + * // spécifique au service + * positions : [{lon:, lat:}, {lon:, lat:}], + * outputFormat : 'json' // json|xml + * sampling : 3, + * api : 'REST', // REST|WPS + * zonly : false // false|true + * }; + * + */ +function Alti (options) { + if (!(this instanceof Alti)) { + throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("CLASS_CONSTRUCTOR", "Alti")); + } + + /** + * Nom de la classe (heritage) + * FIXME instance ou classe ? + */ + this.CLASSNAME = "Alti"; + + // appel du constructeur par heritage + _CommonService__WEBPACK_IMPORTED_MODULE_3__["default"].apply(this, arguments); + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("Gp.Services.Alti"); + this.logger.trace("[Constructeur Alti (options)]"); + + // ##################### + // analyse des options + // ##################### + + if (!options.positions) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "positions")); + } + + if (options.positions.length === 0) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_EMPTY", "positions")); + } + + // ajout des options spécifiques au service + this.options.positions = options.positions; + + // format de réponse du service : "json" ou "xml" (valeur par défaut), en minuscule ! + this.options.outputFormat = (typeof options.outputFormat === "string") ? options.outputFormat.toLowerCase() : "xml"; + + // sampling + this.options.sampling = options.sampling || null; + + // type d'api utilisé pour requeter le service, en majuscule ! + this.options.api = (typeof options.api === "string") ? options.api.toUpperCase() : "REST"; + + // l'api ne peut être interrogée qu'en GET. + if (this.options.api === "REST") { + this.options.httpMethod = "GET"; + } + + // param. zonly + this.options.zonly = options.zonly || false; + + // gestion de l'url du service par defaut + // si l'url n'est pas renseignée, il faut utiliser les urls par defaut + // en fonction du type d'api, REST ou WPS, du format de reponse demandé (outputFormat) + // ainsi que sur le type de service (profil ou elevation) + if (!this.options.serverUrl) { + var lstUrlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__["default"].Alti.url("calcul"); + var urlFound = null; + switch (this.options.api) { + case "WPS": + urlFound = lstUrlByDefault.wps; + break; + case "REST": + var key = (options.sampling ? "profil" : "elevation") + "-" + this.options.outputFormat; + urlFound = lstUrlByDefault[key]; + break; + default: + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_UNKNOWN", "api")); + } + + if (!urlFound) { + throw new Error("Url by default not found !"); + } + this.options.serverUrl = urlFound; + this.logger.trace("Server URL by default : " + this.options.serverUrl); + } + + // gestion du type de service + // si l'extension de l'url est .json ou .xml, on surcharge le format de sortie (outputFormat) + var idx = this.options.serverUrl.lastIndexOf("."); + if (idx !== -1) { + var extension = this.options.serverUrl.substring(idx + 1); + if (extension && extension.length < 5) { // FIXME extension de moins de 4 car. ... + this.logger.trace("Server Extension URL : " + extension); + switch (extension.toLowerCase()) { + case "json": + case "xml": + this.options.outputFormat = extension.toLowerCase(); + break; + default: + throw new Error("type of service : unknown or unsupported (json or xml) !"); + } + } + } +} + +/** + * @lends module:Alti# + */ +Alti.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__["default"].prototype, { + // todo + // getter/setter +}); + +/** + * Constructeur (alias) + */ +Alti.prototype.constructor = Alti; + +/** + * Création de la requête (overwrite) + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + */ +Alti.prototype.buildRequest = function (error, success) { + // utilisation en mode callback + var options = { + httpMethod : this.options.httpMethod, + // callback + onSuccess : function (result) { + // sauvegarde de la requete ! + this.request = result; + success.call(this, this.request); + }, + onError : error, + scope : this, + // spécifique au service : + positions : this.options.positions, + outputFormat : this.options.outputFormat, + sampling : this.options.sampling, + api : this.options.api, + zonly : this.options.zonly + }; + + _Request_AltiRequestFactory__WEBPACK_IMPORTED_MODULE_5__["default"].build(options); +}; + +/** + * Analyse de la reponse (overwrite) + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + */ +Alti.prototype.analyzeResponse = function (error, success) { + // INFO + // Factory pour masquer la complexité du retour du service qui renvoie soit + // - une 'string' qui contient du XML ou JSON natif en mode XHR + // - un objet JSON qui est natif ou encapsulé + + if (this.response) { + var options = { + response : this.response, + outputFormat : this.options.outputFormat, // utile pour parser la string en mode XHR : JSON ou XML ! + rawResponse : this.options.rawResponse, + onError : error, + onSuccess : success, + scope : this + }; + + _Response_AltiResponseFactory__WEBPACK_IMPORTED_MODULE_6__["default"].build(options); + } else { + error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (Alti); + + +/***/ }), +/* 61 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56); +/* harmony import */ var _AltiRequestREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62); +/* harmony import */ var _AltiRequestWPS__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66); +/** + * Creation d'une requête en REST ou WPS + * (Factory) + * + * @module AltiRequestFactory + * @alias Gp.Services.Alti.Request.AltiRequestFactory + * @private + */ + + + + + +var AltiRequestFactory = { + + /** + * interface unique + * + * @method build + * @static + * @param {Object} options - options definies dans le composant Alti + * + * @example + * var options = { + * httpMethod : 'GET', // GET|POST + * onSuccess : function (response) {}, + * onError : function (error) {}, + * scope : this, + * positions : [{lon:, lat:}, {lon:, lat:}], + * outputFormat : 'json' // json|xml + * sampling : 3, + * api : 'REST', // REST|WPS + * zonly : false // false|true + * }; + * + */ + build : function (options) { + // logger + var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("AltiRequestFactory"); + logger.trace(["AltiRequestFactory::build()"]); + + var request = null; + + // on factorise les options par groupe; + // - global, + // - param, les params pour les data inputs + // - wps, les param du service + // - callback + + var settings = { + // ajout des valeurs par defaut spécifiques au service + type : options.sampling ? "Profil" : "Elevation", + method : options.httpMethod, + param : { + positions : null, + delimiter : null, // FIXME par defaut, on ne le met pas en place car ça fait planter la requête !? + indent : null, // par defaut + crs : null, // par defaut + format : null, // (only to POST) + sampling : null, // (only use by Profil) + zonly : null // (only use by Elevation) + } + }; + + // surcharge des valeurs obligatoires + settings.param.positions = options.positions; + settings.param.format = options.outputFormat; + settings.param.sampling = options.sampling; + settings.param.zonly = options.zonly; + + // gestion des callback + var bOnError = !!(options.onError !== null && typeof options.onError === "function"); // cast variable to boolean + var bOnSuccess = !!(options.onSuccess !== null && typeof options.onSuccess === "function"); + + var message = null; + switch (options.api) { + case "REST": + // FIXME les exceptions ne sont pas 'catchées' sur le constructeur ! + var myReq = new _AltiRequestREST__WEBPACK_IMPORTED_MODULE_2__["default"](settings); + if (!myReq.processRequestString()) { + message = "Error in process request (rest) !"; + if (bOnError) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__["default"](message)); + return; + } + throw new Error(message); + } + request = myReq.requestString; + break; + case "WPS": + // ajout des valeurs par defaut spécifiques au service WPS + settings.wps = { + service : null, // par defaut + version : null, // par defaut + identifier : null, // par defaut + rawdataoutput : null, // par defaut + request : null // par defaut + }; + + request = _AltiRequestWPS__WEBPACK_IMPORTED_MODULE_3__["default"].build(settings); + if (!request) { + message = "Error in process request (wps) !"; + if (bOnError) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__["default"](message)); + return; + } + throw new Error(message); + } + break; + default: + message = "Type of API is not supported by service (REST or WPS) !"; + if (bOnError) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__["default"](message)); + return; + } + throw new Error(message); + } + + if (bOnSuccess) { + options.onSuccess.call(options.scope, request); + } + + return request; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (AltiRequestFactory); + + +/***/ }), +/* 62 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _model_AltiElevationRequest__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63); +/* harmony import */ var _model_AltiProfilRequest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65); +/* jshint multistr : true */ + + + + + + +/** + * @classdesc + * Classe de gestion des requêtes de type REST sur le service altimetrique. + * + * @todo Le service Alti n'implemente pas le POST !? + * @constructor + * @alias Gp.Services.Alti.Request.AltiRequestREST + * @param {Object} options - options + * @param {Object} options.param.positions - tableau de coordonnées lon/lat + * @param {String} options.param.delimiter - '|' + * @param {Boolean} options.param.indent - false|true + * @param {String} options.param.crs - 'CRS:84' + * @param {String} options.param.sampling - 3 + * @param {Boolean} options.param.zonly - false|true + * @param {String} options.param.format - "JSON|XML" + * @param {String} options.type - "Profil|Elevation" + * @param {String} options.method - GET|POST + * + * @example + * var options = { + * type : 'Profil', // Elevation + * method : 'GET', // par defaut + * param : { + * positions : [ + * {lon:'1.11', lat:'1.11'}, + * {lon:'1.10', lat:'1.10'}, + * {lon:'1.12', lat:'1.12'} + * ], + * delimiter : ";", // par defaut + * indent : true, // par defaut + * crs : 'EPSG:4326', // par defaut + * format : 'json', // par defaut (only to POST) + * sampling : 3 , // par defaut (only use by Profil) + * zonly : false // par defaut (only use by Elevation) + * } + * }; + * + * var result; + * try { + * var obj = new AltiRequestREST (options); + * if (! obj.processRequestString ()) { + * throw new Error("Request empty !?") + * } + * result = obj.requestString; + * } catch (e) { + * // exceptions... + * } + * @private + */ +function AltiRequestREST (options) { + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("AltiRequestREST"); + this.logger.trace("[Constructeur AltiRequestREST ()]"); + + if (!(this instanceof AltiRequestREST)) { + throw new TypeError("AltiRequestREST constructor cannot be called as a function."); + } + + this.options = options || {}; + + // existance des options + if (!this.options) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_EMPTY", "options")); + } + + // type de requete : Altitude ou Profil + // (param. à determiner en fonction des parametres d'entrée) + if (!this.options.type) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_EMPTY", "type (Elevation or Profil)")); + } + + // construction du modele de requête + // (test du type d'objet candidat) + this.DataObject = null; + switch (this.options.type) { + case "Elevation": + this.DataObject = new _model_AltiElevationRequest__WEBPACK_IMPORTED_MODULE_2__["default"](this.options.param); + break; + case "Profil": + this.DataObject = new _model_AltiProfilRequest__WEBPACK_IMPORTED_MODULE_3__["default"](this.options.param); + break; + default: + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_TYPE", "type (Elevation or Profil)")); + } + + /** + * methode. + * Par defaut, "GET". + */ + this.method = this.options.method || "GET"; +} + +AltiRequestREST.prototype = { + + /** + * request + * @type {String} + */ + requestString : null, + + /** + * Constructeur (alias) + */ + constructor : AltiRequestREST, + + /** + * Template de la requête. + */ + template : { + get : { + // FIXME on retire le param 'delimiter' : &delimiter='__DELIMITER__' + value : "lon=__LON__&lat=__LAT__&indent=__INDENT__&crs='__CRS__'", + input : { + point : "&zonly=__ZONLY__", + profil : "&sampling=__SAMPLING__" + } + }, + post : { + // FIXME on retire le param 'delimiter' : delimiter='__DELIMITER__'\n\ + value : "lon=__LON__\n" + + "lat=__LAT__\n" + + "indent=__INDENT__\n" + + "crs='__CRS__'\n", + input : { + point : "zonly=__ZONLY__", + profil : "sampling=__SAMPLING__" + } + } + }, + + /** + * Construction de la requête. + * + * @example + * // GET out : lon=0.2367,2.1570&lat=48.0551,46.6077&delimiter=,&indent=true&zonly=true&crs='CRS:84' + * // POST out : Not yet supported method POST ! + * @returns {String} + */ + processRequestString : function () { + this.logger.trace("AltiRequestREST::processRequestString ()"); + + var template = ""; + if (this.method === "POST") { + template = this.template.post.value; + } else if (this.method === "GET") { + template = this.template.get.value; + } + + template = template.replace(/__LON__/g, this.DataObject.getLon()); + template = template.replace(/__LAT__/g, this.DataObject.getLat()); + // FIXME on retire le param 'delimiter' + // template = template.replace(/__DELIMITER__/g, this.DataObject.delimiter); + template = template.replace(/__INDENT__/g, this.DataObject.indent); + template = template.replace(/__CRS__/g, this.DataObject.crs); + + // ajout + + template = template + this.__addDataInputs(); + this.logger.trace("traduction tmpl", template); + + // sauvegarde + this.requestString = template; + + return this.requestString; + }, + + /** + * Ajout de parametres spécifiques (ex. zonly) + * + * @returns {String} + */ + __addDataInputs : function () { + this.logger.trace("AltiRequestREST::addDataInput ()"); + + var myTemplate; + if (this.method === "POST") { + myTemplate = this.template.post; + } else if (this.method === "GET") { + myTemplate = this.template.get; + } else { + throw new Error("No other HTTP method supported by the service !"); + } + + var tmpl = null; + if (this.DataObject.CLASSNAME === "AltiElevationRequest") { + tmpl = myTemplate.input.point; + return tmpl.replace(/__ZONLY__/g, this.DataObject.zonly); + } else if (this.DataObject.CLASSNAME === "AltiProfilRequest") { + tmpl = myTemplate.input.profil; + return tmpl.replace(/__SAMPLING__/g, this.DataObject.sampling); + } else { + throw new Error("No other object supported than elevation or profil !?"); + } + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (AltiRequestREST); + + +/***/ }), +/* 63 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _AltiRequest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64); + + + + +/** + * @classdesc + * + * Classe de gestion des param. des requêtes de type POINT du service altimetrique. + * + * @constructor + * @alias Gp.Services.Alti.Request.AltiElevationRequest + * @param {Object} options - options + * @param {Boolean} options.zonly - false|true + * + * @private + */ +function AltiElevationRequest (options) { + if (!(this instanceof AltiElevationRequest)) { + throw new TypeError("AltiElevationRequest constructor cannot be called as a function."); + } + + /** + * Nom de la classe (heritage) + */ + this.CLASSNAME = "AltiElevationRequest"; + + // appel du constructeur par heritage + _AltiRequest__WEBPACK_IMPORTED_MODULE_1__["default"].apply(this, arguments); + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger(); + this.logger.trace("[Constructeur AltiElevationRequest ()]"); + + /** + * Z uniquement. + * true|false + */ + this.zonly = this.options.zonly || false; // test des options héritées ! +} + +/** + * @lends module:AltiElevationRequest# + */ + +AltiElevationRequest.prototype = Object.create(_AltiRequest__WEBPACK_IMPORTED_MODULE_1__["default"].prototype, { + + /** + * Setter/getter pour "zonly" + */ + zonly : { + /** getter */ + get : function () { + return this._zonly; + }, + /** setter */ + set : function (z) { + this._zonly = z; + } + } + +}); + +/** + * Constructeur (alias) + */ +AltiElevationRequest.prototype.constructor = AltiElevationRequest; + +/** + * Tableau de clefs/valeurs pour param. + * + * @returns {Array} + */ +AltiElevationRequest.prototype.getData = function () { + // par glop..., appel de AltiRequest::getData () ! + var map = []; + map.push({ + k : "lon", + v : this.getLon() + }); + map.push({ + k : "lat", + v : this.getLat() + }); + // map.push({k : "delimiter", v : this.delimiter}); // FIXME on retire le param "delimiter" + map.push({ + k : "indent", + v : this.indent + }); + map.push({ + k : "crs", + v : this.crs + }); + map.push({ + k : "zonly", + v : this.zonly + }); + map.push({ + k : "format", + v : this.format + }); + + return map; +}; + +/* harmony default export */ __webpack_exports__["default"] = (AltiElevationRequest); + + +/***/ }), +/* 64 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); + + + +/** + * @classdesc + * Classe de gestion des param. des requêtes du service altimetrique. + * + * @constructor + * @alias Gp.Services.Alti.Request.AltiRequest + * @param {Object} options - options + * @param {Object} options.positions - tableau de coordonnées lon/lat + * @param {String} options.delimiter - "|" + * @param {Boolean} options.indent - false|true + * @param {String} options.crs - "CRS:84" + * @param {String} options.format - "JSON|XML" + * + * @private + */ +function AltiRequest (options) { + if (!(this instanceof AltiRequest)) { + throw new TypeError("AltiRequest constructor cannot be called as a function."); + } + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger(); + this.logger.trace("[Constructeur AltiRequest ()]"); + + /** + * Options en paramêtres du constructeur. + */ + this.options = options || {}; + + /** + * Liste des coordonnées. + * @example + * var c = [{lon : "", lat : ""}, {lon : "", lat : ""}]; + */ + this.positions = this.options.positions || []; + + /** + * Caractère de séparation. + * Par defaut, "|". + */ + this.delimiter = this.options.delimiter || "|"; + + /** + * Indentation. + * true|false + */ + this.indent = this.options.indent || false; + + /** + * Projection. + * Par defaut, CRS:84. + */ + this.crs = this.options.crs || "CRS:84"; + + /** + * format de sortie. + * Par defaut, "json". + */ + this.format = this.options.format || "json"; +} + +/** + * CLASSNAME + */ +AltiRequest.CLASSNAME = "AltiRequest"; + +AltiRequest.prototype = { + + /** + * @lends module:AltiRequest# + */ + + /** + * Constructeur (alias) + */ + constructor : AltiRequest, + + /** + * Ajout d"une liste de coordonnées. + * + * @param {Object[]} lstPosition - liste de positions + * @example + * obj.setPositions ([{lon : "0.15", lat : "0.15"}, {lon : "1.15", lat : "1.15"}]); + */ + setPositions : function (lstPosition) { + var positions = []; + for (var i = 0; i < lstPosition.length; i++) { + var o = lstPosition[i]; + if (o.lon && o.lat) { + positions.push(o); + } + } + + this.positions = positions; + }, + + /** + * Liste des coordonnées. + * + * @param {Int} pos - position + * @returns {positions} + * @example + * obj.getPositions (); // [{lon : "", lat : ""}, {lon : "", lat : ""}] + * obj.getPositions (0); // [{lon : "", lat : ""}] + */ + getPositions : function (pos) { + // FIXME test if not a number !? + if (!pos) { + return this.positions; + } + + var index = this.positions.length - 1; + if (pos > index || pos < index) { + this.logger.warn("index out of range !"); + return this.positions; + } + + return this.positions[pos]; + }, + + /** + * Ajout d"une liste de coordonnées. + * + * @param {Object[]} lstPosition - liste de positions + * @example + * obj.addPositions ([{lon : "0.15", lat : "0.15"}, {lon : "1.15", lat : "1.15"}]); + */ + addPositions : function (lstPosition) { + for (var i = 0; i < lstPosition.length; i++) { + var o = lstPosition[i]; + if (o.lon && o.lat) { + this.positions.push(lstPosition[i]); + } + } + }, + + /** + * Retourne la liste des longitudes avec un caractère de séparation. + * + * @returns {String} - une liste de longitudes + * @example + * // out : 0.2367|2.1570|43.789|... + */ + getLon : function () { + var lstLon = []; + for (var i = 0; i < this.positions.length; i++) { + lstLon.push(this.positions[i].lon); + } + this.logger.trace(lstLon); + return lstLon.join(this.delimiter); + }, + + /** + * Retourne la liste des lattitudes avec un caractère de séparation. + * + * @returns {String} - une liste de lattitudes + * @example + * // out : 0.2367|2.1570|43.789|... + */ + getLat : function () { + var lstLat = []; + for (var i = 0; i < this.positions.length; i++) { + lstLat.push(this.positions[i].lat); + } + this.logger.trace(lstLat); + return lstLat.join(this.delimiter); + } + +}; + +/** + * Tableau de clefs/valeurs pour param. + * + * @returns {Object[]} + */ +AltiRequest.prototype.getData = function () { + var map = []; + + map.push({ + k : "lon", + v : this.getLon() + }); + map.push({ + k : "lat", + v : this.getLat() + }); + map.push({ + k : "delimiter", + v : this.delimiter + }); + map.push({ + k : "indent", + v : this.indent + }); + map.push({ + k : "crs", + v : this.crs + }); + map.push({ + k : "format", + v : this.format + }); + + return map; +}; + +/* harmony default export */ __webpack_exports__["default"] = (AltiRequest); + + +/***/ }), +/* 65 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _AltiRequest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64); + + + + +/** + * @classdesc + * Classe de gestion des param. des requêtes de type PROFIL du service altimetrique. + * + * @constructor + * @alias Gp.Services.Alti.Request.AltiProfilRequest + * @param {Object} options - options + * @param {String} options.sampling - 3 + * + * @private + */ +function AltiProfilRequest (options) { + if (!(this instanceof AltiProfilRequest)) { + throw new TypeError("AltiProfilRequest constructor cannot be called as a function."); + } + + /** + * Nom de la classe (heritage) + */ + this.CLASSNAME = "AltiProfilRequest"; + + // appel du constructeur par heritage + _AltiRequest__WEBPACK_IMPORTED_MODULE_1__["default"].apply(this, arguments); + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger(); + this.logger.trace("[Constructeur AltiProfilRequest ()]"); + + /** + * Sampling + * Par defaut, 3 + */ + this.sampling = this.options.sampling || 3; // test des options héritées ! +} + +/** + * @lends module:AltiProfilRequest# + */ + +AltiProfilRequest.prototype = Object.create(_AltiRequest__WEBPACK_IMPORTED_MODULE_1__["default"].prototype, { + + /** + * Setter/getter pour "sampling" + */ + sampling : { + /** getter */ + get : function () { + return this._sampling; + }, + /** setter */ + set : function (value) { + this._sampling = value; + } + } +}); + +/** + * Constructeur (alias) + */ +AltiProfilRequest.prototype.constructor = AltiProfilRequest; + +/** + * Tableau de clefs/valeurs pour param. + * + * @returns {Object[]} + */ +AltiProfilRequest.prototype.getData = function () { + // par glop..., appel de AltiRequest::getData () ! + var map = []; + map.push({ + k : "lon", + v : this.getLon() + }); + map.push({ + k : "lat", + v : this.getLat() + }); + // map.push({k : "delimiter", v : this.delimiter}); // FIXME on retire le param "delimiter" + map.push({ + k : "indent", + v : this.indent + }); + map.push({ + k : "crs", + v : this.crs + }); + map.push({ + k : "sampling", + v : this.sampling + }); + map.push({ + k : "format", + v : this.format + }); + + return map; +}; + +/* harmony default export */ __webpack_exports__["default"] = (AltiProfilRequest); + + +/***/ }), +/* 66 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _Formats_WPS__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67); +/* harmony import */ var _model_AltiElevationRequest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63); +/* harmony import */ var _model_AltiProfilRequest__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65); +/** + * Classe d'interface des requêtes de type WPS sur le service altimetrique. + * (Factory) + * + * @module Gp.Services.Alti.Request.AltiRequestWPS + * @alias Gp.Services.Alti.Request.AltiRequestWPS + * @private + */ + + + + + + +var AltiRequestWPS = { + + /** + * Interface unique de construction de la requête. + * + * @method build + * @param {Object} options - options + * @param {Object} options.param.positions - tableau de coordonnées lon/lat + * @param {String} options.param.delimiter - '|' + * @param {Boolean} options.param.indent - false|true + * @param {String} options.param.crs - 'CRS:84' + * @param {String} options.param.sampling - 3 + * @param {Boolean} options.param.zonly - false|true + * @param {String} options.param.format - "JSON|XML" (only to POST) + * @param {String} options.wps.service - "WPS" + * @param {String} options.wps.version - "1.0.0" + * @param {String} options.wps.identifier - "gs:WPSElevation|gs:WPSLineElevation" + * @param {String} options.wps.rawdataoutput - "result" + * @param {String} options.wps.request - "Execute" + * @param {String} options.type - "Profil|Elevation" + * @param {String} options.method - GET|POST + * @example + * var options = { + * type : 'Profil', // Elevation + * method : 'GET', // par defaut + * param : { + * positions : [ + * {lon:'1.11', lat:'1.11'}, + * {lon:'1.10', lat:'1.10'}, + * {lon:'1.12', lat:'1.12'} + * ], + * delimiter : ";", // par defaut + * indent : true, // par defaut + * crs : 'EPSG:4326', // par defaut + * format : 'json', // par defaut (only to POST) + * sampling : 3 , // par defaut (only use by Profil) + * zonly : false, // par defaut (only use by Elevation) + * }, + * wps : { + * service : 'WPS', // par defaut + * version : '1.0.0', // par defaut + * identifier : 'gs:WPS', // par defaut, Elevation = gs:WPSElevation, Profil = gs:WPSLineElevation + * rawdataoutput : 'result',// par defaut + * request : 'Execute' // par defaut + * } + * }; + */ + build : function (options) { + // logger + var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("AltiRequestWPS"); + logger.trace(["AltiRequestWPS::build()"]); + + // existance des options + if (!options) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_EMPTY", "options")); + } + + // type de requete : Altitude ou Profil + // (param. à determiner en fonction des parametres d'entrée) + if (!options.type) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_EMPTY", "type (Elevation or Profil)")); + } + + // construction du modele de requête + // (test du type d'objet candidat) + var DataObject = null; + switch (options.type) { + case "Elevation": + // surcharge + options.wps.identifier = "gs:WPSElevation"; + DataObject = new _model_AltiElevationRequest__WEBPACK_IMPORTED_MODULE_3__["default"](options.param); + break; + case "Profil": + // surcharge + options.wps.identifier = "gs:WPSLineElevation"; + DataObject = new _model_AltiProfilRequest__WEBPACK_IMPORTED_MODULE_4__["default"](options.param); + break; + default: + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_TYPE", "type (Elevation or Profil)")); + } + + // construction de la requête WPS + var settings = { + data : DataObject, + method : options.method, + param : options.wps + }; + + var rqstWPS = new _Formats_WPS__WEBPACK_IMPORTED_MODULE_2__["default"](settings); + + if (!rqstWPS.processRequestString()) { + throw new Error("Enable to process request !"); + } + + return rqstWPS.requestString; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (AltiRequestWPS); + + +/***/ }), +/* 67 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); + + +/** + * @classdesc + * Standard WPS + * + * @constructor + * @alias Gp.Formats.WPS + * @param {Object} options - options + * @param {Object} options.data - objet + * @param {String} options.method - POST|GET + * @param {String} options.param.service - "WPS" + * @param {String} options.param.version - "1.0.0" + * @param {String} options.param.identifier - "gs:WPSElevation|gs:WPSLineElevation" + * @param {String} options.param.rawdataoutput - "result" + * @param {String} options.param.request - "Execute" + * @param {Function} options.onsuccess - function callback success (TODO) + * @param {Function} options.onerror - function callback error (TODO) + * @private + */ +function WPS (options) { + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger(); + this.logger.trace("[Constructeur WPS()]"); + + if (!(this instanceof WPS)) { + throw new TypeError("WPS constructor cannot be called as a function."); + } + + this.options = options || {}; + + /** + * Objet DATA + */ + this.DataObject = this.options.data; + + if (!this.DataObject) { + throw new TypeError("This data object is not defined !"); + } + + /** + * param service. + * Par defaut, "WPS". + */ + this.paramservice = this.options.param.service || "WPS"; + + /** + * param version. + * Par defaut, "1.0.0". + */ + this.paramversion = this.options.param.version || "1.0.0"; + + /** + * param identifier + * Par defaut, "gs:WPS" + */ + this.paramidentifier = this.options.param.identifier || "gs:WPS"; + + /** + * param rawdataoutput + * Par defaut, "result". + */ + this.paramrawdataoutput = this.options.param.rawdataoutput || "result"; + + /** + * param request + * Par defaut, "Execute". + */ + this.paramrequest = this.options.param.request || "Execute"; + + /** + * methode. + * Par defaut, "GET". + */ + this.method = this.options.method || "GET"; +} + +WPS.prototype = { + + /** + * @lends module:WPS# + */ + + /** + * request + * @type {String} + */ + requestString : null, + + /** + * Constructeur (alias) + */ + constructor : WPS, + + /** + * Template de la requête. + */ + template : { + get : { + value : "service=__SERVICE__" + + "&version=__VERSION__" + + "&rawdataoutput=__RAWDATAOUTPUT__" + + "&identifier=__IDENTIFIER__" + + "&request=__REQUEST__" + + "&datainputs=", + + input : "__KEY__=__DATA__" + + }, + post : { + + value : "" + + "" + + "__IDENTIFIER__" + + "" + + "" + + "" + + "" + + "" + + "__RAWDATAOUTPUT__" + + "" + + "" + + "", + + input : "" + + "__KEY__" + + "" + + "__DATA__" + + "" + + "" + } + }, + + /** + * Namespace par defaut de la requete POST. + * + * @returns {String} namespace + */ + namespaceByDefault : function () { + var ns = [ + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"", + "xmlns=\"http://www.opengis.net/wps/1.0.0\"", + "xmlns:wfs=\"http://www.opengis.net/wfs\"", + "xmlns:wps=\"http://www.opengis.net/wps/1.0.0\"", + "xmlns:ows=\"http://www.opengis.net/ows/1.1\"", + "xmlns:gml=\"http://www.opengis.net/gml\"", + "xmlns:ogc=\"http://www.opengis.net/ogc\"", + "xmlns:wcs=\"http://www.opengis.net/wcs/1.1.1\"", + "xmlns:xlink=\"http://www.w3.org/1999/xlink\"" + ]; + + return ns.join(" "); + }, + + /** + * Schemalocation par defaut. + * + * @returns {String} schemaLocation + */ + schemaLocationByDefault : function () { + return "xsi:schemaLocation=\"http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd\""; + }, + + /** + * Construction de la requête. + * + * @example + * // GET out : + * // service=__SERVICE__ + * // &version=__VERSION__ + * // &rawdataoutput=__RAWDATAOUTPUT__ + * // &identifier=__IDENTIFIER__ + * // &request=__REQUEST__ + * // &datainputs="__DATAINPUTS__" + * // avec __DATAINPUTS__ = __KEY__=__DATA__;... + * + * // POST out : + * // + * // + * // __IDENTIFIER__ + * // + * // + * // + * // + * // + * // __RAWDATAOUTPUT__ + * // + * // + * // ", + * // avec __DATAINPUTS__ + * // + * // __KEY__ + * // + * // __DATA__ + * // + * // + * + * @returns {Boolean} validation de la construction de la requete + */ + processRequestString : function () { + this.logger.trace("WPS::processRequestString ()"); + + var template = ""; + if (this.method === "POST") { + template = this.template.post.value; + } else if (this.method === "GET") { + template = this.template.get.value; + } else { + this.logger.error("No other method supported by the service !"); + return false; + } + + template = template.replace(/__SERVICE__/g, this.paramservice); + template = template.replace(/__VERSION__/g, this.paramversion); + template = template.replace(/__RAWDATAOUTPUT__/g, this.paramrawdataoutput); + template = template.replace(/__IDENTIFIER__/g, this.paramidentifier); + template = template.replace(/__REQUEST__/g, this.paramrequest); + + // ajout + + if (this.method === "POST") { + template = template.replace(/__NAMESPACE__/g, this.namespaceByDefault); + template = template.replace(/__SCHEMALOCATION__/g, this.schemaLocationByDefault); + } + + // ajout des datainputs + template = template.replace(//g, this.__addDataInputs()); + + if (!template) { + this.logger.warn("traduction tmpl : empty request !?"); + return false; + } + + this.requestString = template; + this.logger.trace("traduction tmpl", template); + + return true; + }, + + /** + * Ajout des données + * + * @returns {String} Données concaténées dans une chaine + */ + __addDataInputs : function () { + this.logger.trace("WPS::__addDataInputs ()"); + + // c'est un peu grossier... + var tmpl = this.method === "GET" ? this.template.get.input : this.template.post.input; + var sep = this.method === "GET" ? ";" : ""; + + var result = ""; + var that = this; + var map = this.DataObject.getData(); + for (var i = 0; i < map.length; i++) { + // FIXME closure ? + (function (j) { + if (sep) { + sep = (j === map.length - 1) ? "" : ";"; + } + result = result.concat(that.__addDataInput(tmpl, map[j].k, map[j].v), sep); + })(i); + } + + return result; + }, + + /** + * Ajout d'une donnée. + * + * @param {String} tmpl - template + * @param {String} key - clef + * @param {String} data - valeur + * @returns {String} chaine avec les substitutions clef/valeur + */ + __addDataInput : function (tmpl, key, data) { + var tmp = tmpl; + tmp = tmp.replace(/__KEY__/g, key); + tmp = tmp.replace(/__DATA__/g, data); + return tmp; + }, + + /** + * Definir le mode de requête + * + * @param {String} method - GET|POST + */ + setMethod : function (method) { + if (method === "GET" || method === "POST") { + this.method = method; + } else { + this.logger.warn("support only GET and POST method !"); + } + }, + + /** + * Retourne le mode de requete (GET|POST). + * + * @returns {AltiRequest.options.mode|String} methode (GET|POST) + */ + getMethod : function () { + return this.method; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (WPS); + + +/***/ }), +/* 68 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56); +/* harmony import */ var _Formats_XML__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(69); +/* harmony import */ var _Formats_AltiResponseReader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70); +/* harmony import */ var _model_AltiResponse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(71); +/* harmony import */ var _model_Elevation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(72); +/** + * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON + * (Factory) + * + * @module AltiResponseFactory + * @private + * @alias Gp.Services.Alti.Response.AltiResponseFactory + */ + + + + + + + + +var AltiResponseFactory = { + + /** + * interface unique + * + * @method build + * @static + * @param {Object} options - options definies dans le composant Alti + * + * @example + * var options = { + * response : + * outputFormat : + * rawResponse : + * scope : + * onSuccess : + * onError : + * }; + * + */ + build : function (options) { + // logger + var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("AltiResponseFactory"); + logger.trace(["AltiResponseFactory::build()"]); + + var data = null; + + if (options.response) { + if (options.rawResponse) { + logger.trace("analyze response : raw"); + data = options.response; + } else { + switch (options.outputFormat) { + case "xml": + logger.trace("analyze response : xml"); + + try { + var p = new _Formats_XML__WEBPACK_IMPORTED_MODULE_3__["default"]({ + reader : _Formats_AltiResponseReader__WEBPACK_IMPORTED_MODULE_4__["default"] + }); + + if (typeof options.response === "string") { + p.setXMLString(options.response); + } else { + p.setXMLDoc(options.response); + } + + data = p.parse(); + + if (!data) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EXCEPTION_2")); + } + } catch (e) { + var message = e.message; + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EXCEPTION", message), + status : 200, + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"].TYPE_SRVERR + })); + return; + } + + break; + + case "json": + logger.trace("analyze response : json"); + logger.trace("analyze response : ", typeof options.response); + + var JSONResponse = null; + if (typeof options.response === "string") { + JSONResponse = JSON.parse(options.response); + } else { + JSONResponse = options.response; + } + + // le service renvoie t il une erreur ? + if (JSONResponse && JSONResponse.error) { + // ex. {"error": {"code": "BAD_PARAMETER","description": "The values () cannot be parsed as a valid longitude (double value such as -180 < lat < 180)."}} + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EXCEPTION", JSONResponse.error.description), + status : 200, + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"].TYPE_SRVERR + })); + return; + } + + // analyse de la reponse + if (JSONResponse) { + var elevations = JSONResponse.elevations; + var altiResponse = new _model_AltiResponse__WEBPACK_IMPORTED_MODULE_5__["default"](); + var elevation; + if (Array.isArray(elevations) && elevations.length) { + for (var i = 0; i < elevations.length; i++) { + elevation = new _model_Elevation__WEBPACK_IMPORTED_MODULE_6__["default"](); + + if (typeof elevations[i] === "object") { + // elevations[i] est un objet elevation + if (elevations[i].lon) { + elevation.lon = elevations[i].lon; + } + if (elevations[i].lat) { + elevation.lat = elevations[i].lat; + } + if (elevations[i].z) { + elevation.z = elevations[i].z; + } + if (elevations[i].acc) { + elevation.acc = elevations[i].acc; + } + } else if (typeof elevations[i] === "number") { + // elevations[i] est un nombre, dans le cas de zonly=true notamment + elevation.z = elevations[i]; + } + + if (Array.isArray(altiResponse.elevations)) { + altiResponse.elevations.push(elevation); + } + } + } + data = altiResponse; + } + + if (!data) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_ANALYSE_2"), + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"].TYPE_UNKERR, + status : -1 + })); + return; + } + break; + + default: + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_FORMAT_2"), + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"].TYPE_UNKERR, + status : -1 + })); + return; + } + + // Si la réponse contenait une exception renvoyée par le service + if (data.exceptionReport) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EXCEPTION", data.exceptionReport), + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"].TYPE_SRVERR, + status : 200 + })); + return; + } else if (data.error) { + var errorMess = data.error.description; + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EXCEPTION", errorMess), + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"].TYPE_SRVERR, + status : 200 + })); + return; + } + } + } else { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); + return; + } + + options.onSuccess.call(options.scope, data); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (AltiResponseFactory); + + +/***/ }), +/* 69 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* global require */ + + +// import __xmldom from "xmldom"; + +/** + * @classdesc + * + * Classe permettant d'écrire ou de lire du XML, sous forme de document DOM, + * éventuellement selon des clés de lecture (readers) ou d'écriture (writers) spécifiques. + * + * @constructor + * @alias Gp.Formats.XML + * + * @param {Object} [options] - options du format XML + * + * @param {Object} [options.reader] - Instance d'un Reader de service (AltiResponseReader, GeocodeRequestReader, etc.) + * utile pour interpréter le XML lorsque sa structure est connue. + * Ce reader doit comporter au moins une fonction statique read (root) permettant d'initialiser la lecture. + * + * @param {Object} [options.writers] - writers + * + * @param {String} [options.xmlString] - chaîne de caractère contenant du XML à interpréter. + * + * @private + */ +function XML (options) { + if (!(this instanceof XML)) { + throw new TypeError("XML constructor cannot be called as a function."); + } + + // FIXME : notion de singleton + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger(); + this.logger.trace("[Constructeur XML ()]"); + + /** + * Chaîne de caractères contenant le texte XML + * @type {String} + */ + this.xmlString = null; + + /** + * DOM Element correspondant à la structure du XML. + * @type {DOMElement} + */ + this.xmlDoc = null; + + /** + * Objet contenant des fonctions de lecture des différentes balises XML. + * @type {Object} + */ + this.reader = null; + + // traitement des paramètres d'options s'il y en a + if (options) { + if (options.xmlString && typeof options.xmlString === "string") { + this.xmlString = options.xmlString; + // Si une chaine de caractère a été passée en entrée : on la transforme aussi en XML document + this.xmlDoc = __getXMLDOC(options.xmlString); + } + if (options.reader) { + this.setReader(options.reader); + } + } +} + +XML.prototype = { + + /** + * @lends module:XML + */ + + /* + * Constructeur (alias) + */ + constructor : XML, + + /** + * Méthode permettant de récupérer la chaîne de caractères associée au format XML + * + * @returns {String} xmlString - la chaîne de caractères correspondant au format XML + */ + getXMLString : function () { + return this.xmlString; + }, + + /** + * Méthode permettant d'attribuer une chaîne de caractères au format XML (attribut xmlString). + * La méthode va aussi transformer cette chaîne de caractères en document XML, + * afin de remplir l'attribut xmlDoc. + * + * @param {String} xmlString - la chaîne de caractères correspondant au format XML + */ + setXMLString : function (xmlString) { + if (xmlString && typeof xmlString === "string") { + this.xmlString = xmlString; + this.xmlDoc = __getXMLDOC(xmlString); + } + }, + + /** + * Méthode permettant de récupérer les readers associés au format XML, s'ils ont été définis + * + * @return {Object} readers - les readers associés au format XML, s'ils existent, + * sous forme d'une collection de fonctions + */ + getReader : function () { + return this.reader; + }, + + /** + * Méthode permettant d'attribuer des readers, sous la forme d'un objet de fonctions (node, data), + * lorsqu'ils n'ont pas été définis lors de l'instanciation par exemple (new XML (options)). + * + * @param {Object} reader - Instance d'un Reader de service (AltiResponseReader, GeocodeRequestReader, etc.) + * utile pour interpréter le XML lorsque sa structure est connue. + * Ce reader doit comporter au moins une fonction statique read (root) permettant d'initialiser la lecture. + */ + setReader : function (reader) { + if (reader && reader.read && typeof reader.read === "function") { + this.reader = reader; + } + }, + + /** + * Méthode permettant de récupérer le document XML associé au format, s'il existe. + * + * @return {DOMElement} xmlDoc - le document XML (DOM document node) s'il existe + */ + getXMLDoc : function () { + return this.xmlDoc; + }, + + /** + * Setter + */ + setXMLDoc : function (doc) { + this.xmlDoc = doc; + }, + /** + * Méthode initialisant la lecture du XML, à partir d'un XML Document : + * création d'un objet JavaScript contenant les informations du XML, + * sauf dans le cas où il n'existe pas de XML Document à interpréter (retourne un objet vide). + * + * @return {Object} [parserOutput] - un objet JavaScript contenant les informations du XML : + * - soit toutes les informations si aucun reader n'a été spécifié à la création du format + * - soit les informations spécifiées dans le reader. + */ + parse : function () { + // build xml document from xmlString + if (!this.xmlDoc && this.xmlString) { + this.xmlDoc = __getXMLDOC(this.xmlString); + } + if (this.xmlDoc) { + var root = __getRootNode(this.xmlDoc); + if (root) { + var parserOutput; + // call reader if exists + if (this.reader && this.reader.read) { + parserOutput = this.reader.read(root); + } else { + parserOutput = {}; + parserOutput[root.nodeName] = __readDefault(root); + } + return parserOutput; + } else { + return {}; + } + } + } + +}; + +/** + * Méthode de la classe (privée) permettant de créer un XML Document à partir d'une chaîne de caractères XML, + * en utilisant DOMParser () lorsque c'est possible. + * For more information, see: https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#the-domparser-interface + * + * @private + * @memberof XML + * @method __getXMLDOC + * @param {String} xmlString - xml string to be converted into DOM element + * @return {DOMElement} - the corresponding XML Document + */ +function __getXMLDOC (xmlString) { + if (typeof window === "undefined") { + // env. nodejs + var DOMParser = __webpack_require__(54).DOMParser; // __xmldom.DOMParser; + return new DOMParser().parseFromString(xmlString, "text/xml"); + } else { + // env. browser + + var parser; + var xmlDoc; + var errorMsg = "Erreur lors du parsing de la réponse du service : XML non conforme"; + + if (window.ActiveXObject) { + // Internet Explorer < 9 + xmlDoc = new window.ActiveXObject("Microsoft.XMLDOM"); + xmlDoc.async = false; + xmlDoc.loadXML(xmlString); + var parseError = xmlDoc.parseError; + if (parseError.errorCode) { + if (parseError.line && parseError.linepos) { + errorMsg += "( ligne " + parseError.line + ", colonne " + parseError.linepos; + } + if (parseError.reason) { + errorMsg += ": " + parseError.reason + ")"; + } + throw new Error(errorMsg); + } + return xmlDoc; + } else if (window.DOMParser) { + // les autres (Chrome, Mozilla, IE >= 9) + parser = new window.DOMParser(); + try { + xmlDoc = parser.parseFromString(xmlString, "text/xml"); + } catch (e) { + // Internet Explorer browser raises exception if xmlString is not valid XML + if (e.message === "SyntaxError") { + throw new Error(errorMsg); + } else { + throw new Error("Erreur lors du parsing de la réponse du service : " + e.message); + } + } + // look for parsing error in case no exception was raised + if (xmlDoc.getElementsByTagName("parsererror").length > 0) { + var parsererror = xmlDoc.getElementsByTagName("parsererror"); + for (var i = 0; i < parsererror.length; i++) { + var content = parsererror[i].innerHTML; + // except in case parsererror is just because of huge xml, but parsing is done. + if (content.indexOf("Huge input lookup") === -1) { + errorMsg += "(" + content + ")"; + throw new Error(errorMsg); + } + } + } else if (!xmlDoc.documentElement) { // may happen in chrome browser + throw new Error(errorMsg); + } + return xmlDoc; + } else { + // FIXME + throw new Error("Incompatible DOM Parser pour ce navigateur !"); + } + } +} + +/** + * Méthode de la classe (privée) permettant de récupérer le noeud racine du document, + * à partir d'un document node (nodeType=9), puis lecture de ce noeud (readNode) + * + * @private + * @memberof XML + * @method __getRootNode + * @param {DOMElement} [xmlDoc] - a Document Node + * @return {DOMElement} root - the document root node + */ +function __getRootNode (xmlDoc) { + var root; + if (xmlDoc.nodeType === 9) { + // INFO : nodeType 9 represents the entire document (the root-node of the DOM tree) + root = xmlDoc.documentElement; + } else if (xmlDoc.nodeType === 1) { + root = xmlDoc; + } + return root; +} + +/** + * Méthode de la classe (privée) permettant de lire automatiquement un noeud XML, + * lorsqu'aucun reader spécifique n'a été spécifié (parser brut) + * + * @private + * @memberof XML + * @method readDefault + * @param {DOMElement} node - a DOM element node + * @example final data object looks like : + * data = { + * attributeName: attributeValue, + * childName: { + * attributeName: attributeValue, + * attributeName: attributeValue, + * childName: { + * "textContent": textContent + * }, + * childName: { + * childName: { + * attributeName:attributeValue + * } + * } + * } + * } + */ +function __readDefault (node) { + var data = {}; + + // if element node has attributes, set their values to data + if (node.attributes.length > 0) { + var dataAttributes = __getAttributes(node); + data["attributes"] = dataAttributes; + } + + // if element node has childNodes, read them and set them to data + if (node.hasChildNodes()) { + var childData = {}; + var child; + var children = node.childNodes; + + for (var i = 0; i < children.length; i++) { + child = children[i]; + + if (child.nodeType === 3) { // TEXT_NODE + data["textContent"] = child.nodeValue; + } else if (child.nodeType === 1) { + childData = __readDefault(child); + + if (!data[child.nodeName]) { + // store childData in an object + data[child.nodeName] = childData; + } else { + // in case several childNodes has the same name : store them in an array. + // if data[nodeName] already exists but is not an array + if (!Array.isArray(data[child.nodeName])) { + var old = data[child.nodeName]; + data[child.nodeName] = []; + data[child.nodeName].push(old); + } + data[child.nodeName].push(childData); + } + } + // TODO : manage other node types (4=CDATA, etc) + } + } + + return data; +} + +/** + * Méthode de la classe (privée) permettant de récupérer les attributs d'un noeud élément + * + * @private + * @memberof XML + * @method __getAttributes + * @param {DOMElement} node - noeud contenant l'attribut recherché + * @return {Object} nodeAttributes - objet contenant les noms et valeurs des différents attributs + */ +function __getAttributes (node) { + if (node.attributes.length > 0) { + var nodeAttributes = {}; + var attributes = node.attributes; + for (var i = 0; i < attributes.length; i++) { + var attribute = attributes[i]; + nodeAttributes[attribute.nodeName] = attribute.nodeValue; + } + return nodeAttributes; + } +} + +/* harmony default export */ __webpack_exports__["default"] = (XML); + + +/***/ }), +/* 70 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71); +/* harmony import */ var _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72); + +/** + * Fonction retournant un objet contenant des clés de lecture (readers) + * qui permettent de parser des réponses XML du service Altimétrique du Géoportail + * (calcul altimétrique simple ou profil altimétrique d'une courbe), + * lorsque le paramètre output = xml, + * afin de récupérer les élévations retournées. + * + * @module AltiResponseReader + * @alias Gp.Services.Alti.Formats.AltiResponseReader + * @private + */ + +// import Logger from "../../../Utils/LoggerByDefault"; + + + +/** + * + * Objet AltiResponseReader + * + * @member {Object} AltiResponseReader + * + * @property {Object} AltiResponseReader.READERS - Objet contenant des fonctions de lecture, appelées "readers" + * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire + * et la valeur associée est une fonction (node, data) + * où node est un noeud du document DOM + * et data est un objet où l'on stocke les informations lues dans le XML. + * + * @property {Method} AltiResponseReader.READERS.elevations - Lecture d'un noeud "elevations" de la réponse XML + * du service alti, correspondant logiquement à la racine du document + * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée) + * + * @property {Method} AltiResponseReader.READERS.elevation - ecture d'un noeud "elevation" de la réponse xml du service alti. + * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc) + * + * @property {Method} AltiResponseReader.READERS.lat - Lecture d'un noeud "lat" de la réponse xml du service alti. + * (contient une valeur de latitude, qui est un flottant) + * + * @property {Method} AltiResponseReader.READERS.lon - Lecture d'un noeud "lon" de la réponse xml du service alti. + * (contient une valeur de longitude, qui est un flottant) + * + * @property {Method} AltiResponseReader.READERS.z - Lecture d'un noeud "z" de la réponse xml du service alti. + * (contient une valeur d'altitude, qui est un flottant) + * + * @property {Method} AltiResponseReader.READERS.acc - Lecture d'un noeud "acc" de la réponse xml du service alti. + * (contient une valeur de précision, qui est un flottant) + * + * @property {Method} AltiResponseReader.READERS.exceptionreport - Lecture d'un noeud "ExceptionReport" de la réponse xml du service alti. + * + * @property {Method} AltiResponseReader.READERS.exception - Lecture d'un noeud "Exception" de la réponse xml du service alti. + * + * @property {Method} AltiResponseReader.read - Méthode permettant de lancer la lecture d'une réponse XML du service altimétrique, + * à l'aide des readers de la classe. + * + */ +var AltiResponseReader = {}; + +AltiResponseReader.READERS = { + + /** + * Lecture d'un noeud "elevations" de la réponse XML du service alti, correspondant logiquement à la racine du document + * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée) + * + * @param {DOMElement} root - racine de la réponse XML + * @static + * @memberof AltiResponseReader + * @returns {Object} Retourne un objet de type AltiResponse + */ + elevations : function (root) { + // INFO : on passe en paramètre l'objet en entrée elevations, vide, à remplir. + var altiResponse = new _Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_0__["default"](); + + if (root.hasChildNodes()) { + var children = root.childNodes; + var child; + var elevation; + + for (var i = 0; i < children.length; i++) { + child = children[i]; + + if (AltiResponseReader.READERS[child.nodeName]) { + elevation = AltiResponseReader.READERS[child.nodeName](child); + altiResponse.elevations.push(elevation); + } + } + } + + return altiResponse; + }, + + /** + * Lecture d'un noeud "elevation" de la réponse xml du service alti. + * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc) + * + * @param {DOMElement} node - noeud elevation à lire pour récupérer les informations de l'élévation retournée (z [, lon, lat, acc]) + * @return {Array} elevationResponse - format de la réponse en sortie, instance de AltiResponse + * @static + * @memberof AltiResponseReader + */ + elevation : function (node) { + var elevation = new _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__["default"](); + + if (node.hasChildNodes()) { + var children = node.childNodes; + var child; + for (var i = 0; i < children.length; i++) { + child = children[i]; + if (AltiResponseReader.READERS[child.nodeName]) { + // INFO : on passe en paramètre l'objet en entrée elevation, vide, à remplir. + AltiResponseReader.READERS[child.nodeName](child, elevation); + } + } + } + return elevation; + }, + + /** + * Lecture d'un noeud "lat" de la réponse xml du service alti. + * (contient une valeur de latitude, qui est un flottant) + * + * @param {DOMElement} node - noeud à lire pour récupérer la latitude + * @param {Object} elevation - objet dans lequel stocker la latitude retournée + * @static + * @memberof AltiResponseReader + */ + lat : function (node, elevation) { + var textNode = node.firstChild; + if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE + elevation.lat = parseFloat(textNode.nodeValue); + } else { + throw new Error("Erreur dans la lecture de la réponse du service : latitude attendue mais absente"); + } + }, + + /** + * Lecture d'un noeud "lon" de la réponse xml du service alti. + * (contient une valeur de longitude, qui est un flottant) + * + * @param {DOMElement} node - noeud à lire pour récupérer la longitude + * @param {Object} elevation - objet dans lequel stocker la longitude retournée + * @static + * @memberof AltiResponseReader + */ + lon : function (node, elevation) { + var textNode = node.firstChild; + if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE + elevation.lon = parseFloat(textNode.nodeValue); + } else { + throw new Error("Erreur dans la lecture de la réponse du service : longitude attendue mais absente"); + } + }, + + /** + * Lecture d'un noeud "z" de la réponse xml du service alti. + * (contient une valeur d'altitude, qui est un flottant) + * + * @param {DOMElement} node - noeud à lire pour récupérer l'altitude + * @param {Object} elevation - objet dans lequel stocker l'altitude retournée + * @static + * @memberof AltiResponseReader + */ + z : function (node, elevation) { + var textNode = node.firstChild; + if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE + if (elevation) { + elevation.z = parseFloat(textNode.nodeValue); + } else { + elevation = new _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__["default"](); + elevation.z = parseFloat(textNode.nodeValue); + return elevation; + } + } else { + throw new Error("Erreur dans la lecture de la réponse du service : altitude attendue mais absente"); + } + }, + + /** + * Lecture d'un noeud "acc" de la réponse xml du service alti. + * (contient une valeur de précision, qui est un flottant) + * + * @param {DOMElement} node - noeud à lire pour récupérer la précision + * @param {Object} elevation - objet dans lequel stocker la précision retournée + * @static + * @memberof AltiResponseReader + */ + acc : function (node, elevation) { + var textNode = node.firstChild; + if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE + elevation.acc = parseFloat(textNode.nodeValue); + } else { + throw new Error("Erreur dans la lecture de la réponse du service : précision (acc) attendue mais absente"); + } + }, + + /** + * Lecture d'un noeud "ExceptionReport" de la réponse xml du service alti. + * + * @param {DOMElement} node - noeud à lire pour récupérer l'exception + * @return {Object} exceptionReport - objet contenant l'exception + * @static + * @memberof AltiResponseReader + */ + exceptionreport : function (node) { + var response = {}; + + if (node.hasChildNodes()) { + var children = node.childNodes; + var child; + for (var i = 0; i < children.length; i++) { + child = children[i]; + if (child.nodeName === "Exception") { + response.exceptionReport = AltiResponseReader.READERS.exception(child); + } + } + } + + return response; + }, + + /** + * Lecture d'un noeud "Exception" de la réponse xml du service alti. + * + * @param {DOMElement} node - noeud à lire pour récupérer l'exception + * @return {Object} exceptionReport - objet contenant l'exception, avec deux attributs : + * {String} exceptionReport.exceptionCode - qui contient l'identifiant du code de l'exception + * {String} exceptionReport.exception - qui contient le message de l'exception + * @static + * @memberof AltiResponseReader + */ + exception : function (node) { + var exceptionReport = {}; + + // get exception code + var exceptionCode = node.getAttribute("exceptionCode"); + if (exceptionCode) { + exceptionReport.exceptionCode = exceptionCode; + } + + // get exception message + var textNode = node.firstChild; + if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE + exceptionReport.exception = textNode.nodeValue; + } + + return exceptionReport; + }, + + /** + * Lecture d'un noeud "Error" de la réponse xml du service alti. + * + * @param {DOMElement} node - noeud à lire pour récupérer l'exception + * @return {Object} error - objet contenant l'exception + * @static + */ + error : function (node) { + var response = { + error : {} + }; + // get error code and description + if (node.hasChildNodes()) { + var children = node.childNodes; + var child; + for (var i = 0; i < children.length; i++) { + child = children[i]; + var textNode; + // get error code + if (child.nodeType === 1 && child.nodeName === "code") { // 1 === node.ELEMENT_NODE + textNode = child.firstChild; + if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE + response.error.code = textNode.nodeValue; + } + } + // get error description + if (child.nodeType === 1 && child.nodeName === "description") { // 1 === node.ELEMENT_NODE + textNode = child.firstChild; + if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE + response.error.description = textNode.nodeValue; + } + } + } + } + return response; + } + +}; + +/** + * Méthode permettant de lancer la lecture d'une réponse XML du service altimétrique, + * à l'aide des readers de la classe. + * + * @method AltiResponseReader.read + * @param {DOMElement} root - racine de la réponse XML à lire + * @static + * @memberof AltiResponseReader + */ +AltiResponseReader.read = function (root) { + if (root.nodeName === "elevations") { + var altiResponse = AltiResponseReader.READERS.elevations(root); + return altiResponse; + } else if (root.nodeName === "ExceptionReport") { + var exceptionReport = AltiResponseReader.READERS.exceptionreport(root); + return exceptionReport; + } else if (root.nodeName === "error") { + var error = AltiResponseReader.READERS.error(root); + return error; + } else { + throw new Error("Erreur lors de la lecture de la réponse : elle n'est pas au format attendu."); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (AltiResponseReader); + + +/***/ }), +/* 71 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * Response object for {@link module:Services~getAltitude Gp.Services.getAltitude ()} invocation when successful. Received as the argument of onSuccess callback function. + * + * @property {Array.} elevations - Elevations array. + * + * @namespace + * @alias Gp.Services.AltiResponse + */ +function AltiResponse () { + if (!(this instanceof AltiResponse)) { + throw new TypeError("AltiResponse constructor cannot be called as a function."); + } + + this.elevations = []; +} + +AltiResponse.prototype = { + + constructor : AltiResponse + +}; + +/* harmony default export */ __webpack_exports__["default"] = (AltiResponse); + + +/***/ }), +/* 72 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +/** + * Single elevation object returned by underlying web service. Contains at least, one elevation (z). May also contain point coordinates and elevation accuracy if "zonly" parameter wasn't set to true. + * + * @property {Float} lat - Point latitude. (only if zonly=false) + * @property {Float} lon - Point longitude. (only if zonly=false) + * @property {Float} z - Point elevation. + * @property {Float} acc - Accuracy of elevation for this point. (only if zonly=false) + * + * @namespace + * @alias Gp.Services.Alti.Elevation + */ +function Elevation () { + if (!(this instanceof Elevation)) { + throw new TypeError("Elevation constructor cannot be called as a function."); + } + + this.z = null; +} + +Elevation.prototype = { + + constructor : Elevation + +}; + +/* harmony default export */ __webpack_exports__["default"] = (Elevation); + + +/***/ }), +/* 73 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56); +/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46); +/* harmony import */ var _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(74); +/* harmony import */ var _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(77); + + + + + + + +/** + * @classdesc + * Appel du service de géocodage direct du Géoportail : + * envoi de la requête construite selon les paramètres en options, + * éventuellement parsing et analyse de la réponse, + * retour d'une réponse en paramètre de la fonction onSuccess. + * + * + * @constructor + * @extends {Gp.Services.CommonService} + * @alias Gp.Services.Geocode + * + * @param {Object} options - options spécifiques au service (+ les options heritées) + * + * @param {String|Object} options.query - Nom de l'adresse, du toponyme, de l'unité administrative ou de la parcelle cadastrale recherchée. + * + * @param {Object} [options.filters] - Les propriétés possibles de cet objet sont décrites ci-après. + * @param {String} [options.filters.[prop]] - Critère supplémentaire pour filtrer la recherche sous la forme + * d'un couple clé/valeur à définir selon les possibilités du serveur ajouté à la requête. + * Le service de géocodage du Géoportail permet de filtrer les adresses postales avec les propriétés : + * "postalCode", "inseeCode", "city". + * Il permet également de filtrer les toponymes avec les propriétés : + * "postalCode", "inseeCode", "type". + * Enfin, il permet de filtrer les parcelles cadastrales avec les propriétés : + * "codeDepartement", "codeCommune", "nomCommune", "codeCommuneAbs", "codeArrondissement", "section", "numero", "feuille". + * + * @param {String} [options.index = "StreetAddress"] - Type de l'objet recherché. + * Le service de géocodage du Géoportail permet de rechercher des 'PositionOfInterest' pour des toponymes, des 'StreetAddress' + * pour des adresses postales ou des 'CadastralParcel' pour des parcelles cadastrales. + * L'index 'location' regroupe les indexes 'StreetAddress' et 'PositionOfInterest'. + * D'autres types pourront être rajoutés selon l'évolution du service. + * Par défaut, index = 'StreetAddress'. + * + * @param {Object} options.position - Position du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs. + * @param {Float} options.position.lon - Longitude du point de référence pour le calcul de proximité. + * @param {Float} options.position.lat - Latitude du point de référence pour le calcul de proximité. + * + * @param {Number} [options.maximumResponses] - Nombre de réponses maximal que l'on souhaite recevoir. + * Pas de valeur par défaut. + * Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 20. + * + * @param {Boolean} [options.returnTrueGeometry = false] - Booléen indiquant si l'on souhaite récupérer la géométrie vraie des objects géolocalisés. + * false par défaut. + * + * + * @example + * var options = { + * apiKey : null, + * serverUrl : 'http://localhost/service/', + * proxyURL : null, + * timeOut : 10000, // ms + * rawResponse : false, // true|false + * scope : null, // this + * onSuccess : function (response) {}, + * onFailure : function (error) {}, + * // spécifique au service + * position : {lon:, lat:}, + * index : 'StreetAddress', + * query : '10 rue du pont Machin-ville' + * (...) + * }; + */ +function Geocode (options_) { + if (!(this instanceof Geocode)) { + throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("CLASS_CONSTRUCTOR", "Geocode")); + } + + /** + * Nom de la classe (heritage) + * FIXME instance ou classe ? + */ + this.CLASSNAME = "Geocode"; + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("Gp.Services.Geocode"); + this.logger.trace("[Constructeur Geocode (options)]"); + + var options = this.patchOptionConvertor(options_); + options.serverUrl = options.serverUrl || "https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/search"; + + // appel du constructeur par heritage + _CommonService__WEBPACK_IMPORTED_MODULE_3__["default"].apply(this, [options]); + + if (!options.hasOwnProperty("query")) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "query")); + } + + // ajout des options spécifiques au service + this.options.query = options.query; + + // on definit l'index par defaut + if (!options.index) { + this.options.index = options.index = "StreetAddress"; + } + + if (options.filters) { + var filter = Object.keys(options.filters); + for (var i = 0; i < filter.length; i++) { + var key = filter[i]; + // on supprime les filtres vides + if (typeof options.filters[key] === "undefined" || + (typeof options.filters[key] === "object" && Object.keys(options.filters[key]).length === 0) || + (typeof options.filters[key] === "string" && options.filters[key].length === 0) || + (Array.isArray(options.filters[key]) && options.filters[key].length === 0) + ) { + delete this.options.filters[key]; + } + } + } + + this.options.index = options.index || "StreetAddress"; + this.options.maximumResponses = options.maximumResponses || 20; +} + +/** + * @lends module:Geocode# + */ +Geocode.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__["default"].prototype, { + // todo + // getter/setter +}); + +/* + * Constructeur (alias) + */ +Geocode.prototype.constructor = Geocode; + +/** + * Patch pour la convertion des options vers le nouveau formalisme. + * + * @param {Object} options_ - options du service + * @return {Object} - options + */ +Geocode.prototype.patchOptionConvertor = function (options_) { + const options = options_; + + if (options.hasOwnProperty("location")) { + this.logger.warn("The parameter 'location' is deprecated"); + + if (!options.query) { + options.query = options.location; + } + delete options.location; + } + + if (options.filterOptions) { + this.logger.warn("The parameter 'filterOptions' is deprecated"); + + if (!options.filters) { + options.filters = options.filterOptions; + + if (options.filters.type) { + this.logger.warn("The parameter 'filterOptions.type' is deprecated"); + if (!options.index) { + if (Array.isArray(options.filters.type) && options.filters.type.length > 0) { + options.index = options.filters.type[0]; + } else { + options.index = options.filters.type; + } + } + delete options.filters.type; + } + + if (options.filters.bbox) { + this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"); + delete options.filters.bbox; + } + } + delete options.filterOptions; + } + + if (options.position) { + if (options.position.x) { + this.logger.warn("The parameter 'position.x' is deprecated"); + + if (!options.position.lon) { + options.position.lon = options.position.x; + } + delete options.position.x; + } + + if (options.position.y) { + this.logger.warn("The parameter 'position.y' is deprecated"); + + if (!options.position.lat) { + options.position.lat = options.position.y; + } + delete options.position.y; + } + } + + if (options.returnFreeForm) { + this.logger.warn("The parameter 'returnFreeForm' is deprecated"); + delete options.returnFreeForm; + } + + if (options.srs) { + this.logger.warn("The parameter 'srs' is deprecated"); + delete options.srs; + } + + return options; +}; + +/** + * Création de la requête (overwrite) + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + */ +Geocode.prototype.buildRequest = function (error, success) { + var options = { + httpMethod : this.options.httpMethod, + // options specifiques du service + geocodeMethod : "search", + query : this.options.query, + index : this.options.index, + returnTrueGeometry : this.options.returnTrueGeometry, + position : this.options.position, + maxResp : this.options.maximumResponses, + filters : this.options.filters + }; + + this.request = _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__["default"].build(options); + + // on teste si la requete a bien été construite ! + (!this.request) + ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_REQUEST_BUILD"))) + : success.call(this, this.request); +}; + +/** + * Analyse de la reponse (overwrite) + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + */ +Geocode.prototype.analyzeResponse = function (error, success) { + /* INFO : + Etape 1 : Création de la requête (URL) + -> stockage de la requête dans this.request + Etape 2 : Envoi de la requête + -> appel du protocol XHR, et envoi (par ex send ()) + -> récupération de la réponse JSON dans la fonction onSuccess () (this.response) + -> si code HTTP 200 et pas de message d'erreur : etape 3 + -> si code HTTP != 200 : lancement de la fonction de callback onFailure avec le message d'erreur + Etape 3 : Analyse de la réponse JSON (si rawResponse === false ) + -> appel du parser pour récupérer le document + Etape 4 : Lancement de la fonction de callback onSuccess avec la réponse : + -> JSON (si rawResponse === true) + -> ou geocodedLocations + */ + + if (this.response) { + var options = { + response : this.response, + rawResponse : this.options.rawResponse, + onError : error, + onSuccess : success, + scope : this + }; + + _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__["default"].build(options); + } else { + error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (Geocode); + + +/***/ }), +/* 74 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _GeocodeRequestREST__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75); + + + +/** + * Creation d'une requête + * (Factory) + * + * @module GeocodeRequestFactory + * @alias Gp.Services.Geocode.Request.GeocodeRequestFactory + * @private + */ +var GeocodeRequestFactory = { + + /** + * interface unique + * + * @method build + * @static + * @param {Object} options - options definies dans le composant Geocode + * + * @example + * var options = { + * // options specifiques du service + * geocodeMethod: + * query: + * filters: + * maximumResponses: + * }; + * var result = GeocodeRequestFactory.build(options); + * if (!result) { + * // error... + * } + * @returns {String} request + */ + build : function (options) { + // logger + var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("GeocodeRequestFactory"); + logger.trace(["GeocodeRequestFactory::build()"]); + + var settings = options || {}; + + var myReq = new _GeocodeRequestREST__WEBPACK_IMPORTED_MODULE_1__["default"](settings); + if (!myReq.processRequestString()) { + throw new Error("Error process request (rest) !"); + } + var request = myReq.requestString; + + logger.trace(request); + + return request; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (GeocodeRequestFactory); + + +/***/ }), +/* 75 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _model_GeocodeParamREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(76); + + + + + +/** + * @classdesc + * Classe de gestion des requêtes de type REST sur le service de calcul d'itineraire + * (uniquement en GET) + * + * @constructor + * @alias Gp.Services.Geocode.Request.GeocodeRequestREST + * @param {Object} options - options definies dans le composant Route + * + * @example + * var options = { + * (...) + * }; + * + * @private + */ +function GeocodeRequestREST (options) { + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("GeocodeRequestREST"); + this.logger.trace("[Constructeur GeocodeRequestREST ()]"); + + if (!(this instanceof GeocodeRequestREST)) { + throw new TypeError("GeocodeRequestREST constructor cannot be called as a function."); + } + + // existance des options + if (!options) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_EMPTY", "options")); + } + + /** liste des options */ + this.settings = options; +} + +GeocodeRequestREST.prototype = { + + /** + * @lends module:GeocodeRequestREST# + */ + + /** + * request + * @type {String} + */ + requestString : null, + + /** + * Constructeur (alias) + */ + constructor : GeocodeRequestREST, + + /** + * Construction de la requête. + * + * @returns {String} request + */ + processRequestString : function () { + var request = ""; + + // Mapping des options avec le service de l'API REST + const oParams = new _model_GeocodeParamREST__WEBPACK_IMPORTED_MODULE_2__["default"](this.settings); + + const params = oParams.getParams(); + for (var i = 0; i < params.length; i++) { + var o = params[i]; + if (request) { + request += "&"; + } + request += o.k + "=" + o.v; + } + + if (!this.settings.geocodeMethod || (this.settings.geocodeMethod !== "search" && this.settings.geocodeMethod !== "reverse")) { + throw new Error("Error geocodeMethod not valid"); + } + + this.requestString = "?" + request; + this.logger.trace(this.requestString); + + return this.requestString; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (GeocodeRequestREST); + + +/***/ }), +/* 76 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); + + + +/** + * @classdesc + * Classe de gestion des param. des requêtes du service de calcul d'itineraire (REST). + * Permet le mapping avec les options du service. + * @constructor + * @alias Gp.Services.Route.Request.RouteParamREST + * @param {Object} options - options + * + * @private + */ +function GeocodeParamREST (options) { + if (!(this instanceof GeocodeParamREST)) { + throw new TypeError("GeocodeParamREST constructor cannot be called as a function."); + } + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger(); + this.logger.trace("[Constructeur GeocodeParamREST ()]"); + + /** + * Options en paramêtres du constructeur. + */ + this.options = options || {}; + + // methode de geocodage + if (!this.options.geocodeMethod || (this.options.geocodeMethod !== "search" && this.options.geocodeMethod !== "reverse")) { + throw new Error("Error geocodeMethod not valid"); + } + this.geocodeMethod = this.options.geocodeMethod; + + // mapping des options avec l'API REST + this.query = (typeof this.options !== "undefined") ? this.options.query : null; + + this.searchGeometry = this.options.searchGeometry || null; + + this.index = this.options.index || null; + + this.lon = this.options.position && this.options.position.lon ? this.options.position.lon : null; + + this.lat = this.options.position && this.options.position.lat ? this.options.position.lat : null; + + this.maxResp = this.options.maxResp || null; + + this.returnTrueGeometry = this.options.returnTrueGeometry || null; + + this.filters = this.options.filters || {}; +} + +/** + * CLASSNAME + */ +GeocodeParamREST.CLASSNAME = "GeocodeParamREST"; + +GeocodeParamREST.prototype = { + + /** + * @lends module:GeocodeParamREST# + */ + + /** + * Constructeur (alias) + */ + constructor : GeocodeParamREST, + + /** + * Retourne les filtres + * @returns {String} les filtres + */ + getFilters : function () { + var filters = {}; + for (var prop in this.filters) { + if (this.filters.hasOwnProperty(prop)) { + filters[prop] = this.filters[prop]; + } + } + return filters; + }, + + /** + * Retourne l'index + * @returns {String} l'index + */ + getIndex : function () { + if (this.index === undefined) { + return null; + } + if (this.index === "StreetAddress") { + return "address"; + } else if (this.index === "CadastralParcel") { + return "parcel"; + } else if (this.index === "PositionOfInterest") { + return "poi"; + } else if (this.index === "location") { + return "location"; + } + return this.index; + }, + + /** + * Retourne la géométrie de recherche + * @returns {String} la géométrie de recherche au format json + */ + getSearchGeometry : function () { + return JSON.stringify(this.searchGeometry); + } +}; + +/** + * Tableau de clefs/valeurs pour param. + * + * @returns {Array} liste de paramêtres + */ +GeocodeParamREST.prototype.getParams = function () { + var map = []; + + if (this.geocodeMethod === "search") { + map.push({ + k : "q", + v : this.query + }); + } + + if (this.index) { + map.push({ + k : "index", + v : this.getIndex() + }); + } + + if (this.geocodeMethod === "reverse" && this.searchGeometry) { + map.push({ + k : "searchgeom", + v : this.getSearchGeometry() + }); + } + + if (this.lon && this.lat) { + map.push({ + k : "lon", + v : this.lon + }); + map.push({ + k : "lat", + v : this.lat + }); + } + + if (this.maxResp) { + map.push({ + k : "limit", + v : this.maxResp + }); + } + + if (this.returnTrueGeometry) { + map.push({ + k : "returntruegeometry", + v : this.returnTrueGeometry + }); + } + + const filters = this.getFilters(); + for (var key in filters) { + map.push({ + k : key, + v : filters[key] + }); + } + + return map; +}; + +/* harmony default export */ __webpack_exports__["default"] = (GeocodeParamREST); + + +/***/ }), +/* 77 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _Formats_GeocodeResponseParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(78); +/** + * Factory pour générer une reponse JSON à partir d'un XML + * (Factory) + * + * @module GeocodeResponseFactory + * @alias Gp.Services.Geocode.Response.GeocodeResponseFactory + * @private + */ +// import Logger from "../../../Utils/LoggerByDefault"; + + + + +var GeocodeReponseFactory = { + + /** + * interface unique + * + * @method build + * @static + * @param {Object} options - options definies dans le composant Geocode + * + * @example + * var options = { + * response : + * rawResponse : + * scope : + * onSuccess : + * onError : + * }; + * + */ + build : function (options) { + // data de type GeocodeResponse + var data = null; + + if (options.response) { + if (options.rawResponse) { + data = options.response; + } else { + try { + const parser = new _Formats_GeocodeResponseParser__WEBPACK_IMPORTED_MODULE_2__["default"](); + data = parser.parse(options.response); + + if (!data) { + throw new Error("L'analyse de la réponse du service !?"); + } + } catch (e) { + var message = e.message; + if (typeof options.response === "string") { + message += "('" + options.response + "')"; + } else { + message += "('" + options.response.documentElement.innerHTML + "')"; + } + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_ANALYSE", message), + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__["default"].TYPE_UNKERR, + status : -1 + })); + return; + } + + // Si la réponse contenait une exception renvoyée par le service + if (data.exceptionReport) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EXCEPTION", data.exceptionReport), + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__["default"].TYPE_SRVERR, + status : 200 // FIXME : 200 ? + })); + return; + } + } + } else { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EMPTY"), + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__["default"].TYPE_SRVERR, + status : -1 // FIXME : status response + })); + return; + } + + options.onSuccess.call(options.scope, data); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (GeocodeReponseFactory); + + +/***/ }), +/* 78 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56); +/* harmony import */ var _Response_model_GeocodeResponse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(79); +/* harmony import */ var _Response_model_GeocodedLocation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80); +// import Logger from "../../../Utils/LoggerByDefault"; + + + + + +/** + * Fonction retournant un objet contenant des clés de lecture (readers) + * qui permettent de parser des réponses XML du service de géocodage direct du Géoportail + * afin de récupérer les résultats retournés. + * @module GeocodeResponseParser + * @alias Gp.Services.Geocode.Formats.GeocodeResponseParser + * @private + */ + +/** + * @classdesc + * + * Classe permettant de parser une réponse GeoJSON + * + * @constructor + * @alias Gp.Formats.GeocodeResponseParser + * + * @private + */ +function GeocodeResponseParser () { + if (!(this instanceof GeocodeResponseParser)) { + throw new TypeError("GeocodeResponseParser constructor cannot be called as a function."); + } +} + +GeocodeResponseParser.prototype = { + + /** + * @lends module:GeocodeResponseParser + */ + + /* + * Constructeur (alias) + */ + constructor : GeocodeResponseParser, + + /** + * Méthode permettant de lancer la lecture d'une réponse GeoJSON, + * + * @param {String} json - réponse au format GeoJSON + * @return {Object} geocodeResponse|exceptionReport : l'objet contenant les informations de la réponse GeoJSON, + * sous la forme d'un objet GeocodeResponse, ou un objet littéral exceptionReport si le service a renvoyé une exception. + */ + parse : function (json) { + var geocodeResponse = new _Response_model_GeocodeResponse__WEBPACK_IMPORTED_MODULE_2__["default"](); + + const obj = JSON.parse(json); + + if (obj.type === "FeatureCollection") { + for (var i = 0; i < obj.features.length; ++i) { + _parseFeature(obj.features[i], geocodeResponse); + } + } else if (obj.type === "Feature") { + _parseFeature(obj, geocodeResponse); + } else if (obj.type === "SERVICE_ERROR") { + return _parseError(obj); + } else { + var mess = _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_0__["default"].getMessage("SERVICE_RESPONSE_ANALYSE", obj.type); + throw new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__["default"]({ + message : mess, + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__["default"].TYPE_UNKERR, + status : 200 + }); + } + + return geocodeResponse; + } +}; + +/** + * Méthode permettant de parser un feature + * + * @private + * + * @param {Object} feature + * @param {Object} geocodeResponse + * + * @memberof GeocodeResponseParser + * @return {Object} objet GeocodedLocation + */ +function _parseFeature (feature, geocodeResponse) { + var location = new _Response_model_GeocodedLocation__WEBPACK_IMPORTED_MODULE_3__["default"](); + if (feature.geometry && feature.geometry.type === "Point") { + location.position = { + lon : feature.geometry.coordinates[0], + lat : feature.geometry.coordinates[1] + }; + } + if (feature.properties) { + for (var prop in feature.properties) { + if (prop === "_score") { + location.accuracy = feature.properties[prop]; + } else if (prop === "_type") { + if (feature.properties[prop] === "address") { + location.type = "StreetAddress"; + } else if (feature.properties[prop] === "poi") { + location.type = "PositionOfInterest"; + } else if (feature.properties[prop] === "parcel") { + location.type = "CadastralParcel"; + } + } else { + location.placeAttributes[prop] = feature.properties[prop]; + } + } + if (feature.properties._type === "address") { + location.matchType = feature.properties.number !== undefined && feature.properties.number !== null ? "street number" : "street"; + } + } + geocodeResponse.locations.push(location); +} + +/** + * Méthode permettant de parser une erreur + * + * @private + * + * @param {Object} error + * + * @memberof GeocodeResponseParser + * @return {Object} + */ +function _parseError (error) { + return { + exceptionReport : error + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (GeocodeResponseParser); + + +/***/ }), +/* 79 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +/** + * Response object for {@link module:Services~geocode Gp.Services.geocode ()} or {@link module:Services~reverseGeocode Gp.Services.reverseGeocode ()} invocation when successful. Received as the argument of onSuccess callback function. + * + * @property {Array.} locations - locations array. + * + * @namespace + * @alias Gp.Services.GeocodeResponse + */ +function GeocodeResponse () { + if (!(this instanceof GeocodeResponse)) { + throw new TypeError("GeocodeResponse constructor cannot be called as a function."); + } + + this.locations = []; +} + +GeocodeResponse.prototype = { + + constructor : GeocodeResponse + +}; + +/* harmony default export */ __webpack_exports__["default"] = (GeocodeResponse); + + +/***/ }), +/* 80 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +/** + * Single location object returned by the underlying geocoding web service. + * + * @property {Gp.Point} position - Position of the location given in the requested coordinates system. + * @property {String} type - location type "StreetAddress" (for an address), "PositionOfInterest" (for a place name) or "CadastralParcel" (for cadastral parcel). + * @property {String} matchType - how geocoding is performed : "street number" (exact address), "street enhanced" (street number calculated by interpolation), "street" (only the street), "city" (only the city). + * @property {Float} accuracy - Accuracy of the response towards the requested location between 0 (unaccurate) and 1 (exact match). + * @property {Object} placeAttributes - Associative array matching the following attributes with their values given by the underlying web service : + * + * *Common attributes : * + * + * - **trueGeometry** - the 'real life' geometry if different from 'Point' type. + * + * *if type === "StreetAddress" :* + * + * - **number** - Street number. + * - **postalCode** - PostCode + * - **street** - Street name + * - **city** - City + * - **houseNumberInfos** - additional street number information + * - **inseeCode** - INSEE Code + * + * + * *if type === "PositionOfInterest" :* + * + * - **type** - Place name type + * - **postalCode** - PostCode + * - **toponyme** - Toponyme + * - **extraFields** - additional place name properties + * - **inseeCode** - INSEE Code + * + * + * *si type = "CadastralParcel" :* + * + * - **codeCommuneAbs** - when a parcel comes from a city that was absorbed by another, code of that old city. "000" otherwise. + * - **codeArrondissement** - arrondissement + * - **identifiant** - cadastral parcel code + * - **feuille** - Parcel Sheet (eg. "1"). + * - **numero** - Parcel Number (eg. "0041") + * - **section** - Parcel Section (eg. "0D"). + * - **nomCommune** - Parcel municipality name. + * - **codeCommune** - Parcel municipality. + * - **codeDepartement** - Parcel Department. + * + * @namespace + * @alias Gp.Services.Geocode.GeocodedLocation + */ +function GeocodedLocation () { + if (!(this instanceof GeocodedLocation)) { + throw new TypeError("GeocodedLocation constructor cannot be called as a function."); + } + + this.position = null; + + this.matchType = null; + + this.placeAttributes = {}; + + this.type = null; + + this.accuracy = null; + + /** + * Nom de la classe : "GeocodedLocation" + * @type {String} + */ + this.CLASSNAME = "GeocodedLocation"; +} + +GeocodedLocation.prototype = { + + constructor : GeocodedLocation + +}; + +/* harmony default export */ __webpack_exports__["default"] = (GeocodedLocation); + + +/***/ }), +/* 81 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56); +/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46); +/* harmony import */ var _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(74); +/* harmony import */ var _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(77); + + + + + + + +/** + * @classdesc + * Appel du service de géocodage inverse du Géoportail : + * envoi de la requête construite selon les paramètres en options, + * éventuellement parsing et analyse de la réponse, + * retour d'une réponse en paramètre de la fonction onSuccess. + * @constructor + * @extends {Gp.Services.CommonService} + * @alias Gp.Services.ReverseGeocode + * + * @param {Object} options - options spécifiques au service (+ les options heritées) + * + * @param {Object} options.position - Position du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs. + * @param {Float} options.position.lon - Longitude du point de référence pour le calcul de proximité. + * @param {Float} options.position.lat - Latitude du point de référence pour le calcul de proximité. + * + * @param {Object} [options.filters] - Les propriétés possibles de cet objet. + * @param {String} [options.filters.[proprietes du filtre]] - Critère supplémentaire pour filtrer la recherche sous la forme + * d'un couple clé/valeur à définir selon les possibilités du serveur ajouté à la requête. + * Le service de géocodage du Géoportail permet de filtrer les adresses postales avec les propriétés : + * "postalCode", "inseeCode", "city". + * Il permet également de filtrer les toponymes avec les propriétés : + * "postalCode", "inseeCode", "type". + * Enfin, il permet de filtrer les parcelles cadastrales avec les propriétés : + * "codeDepartement", "codeCommune", "nomCommune", "codeCommuneAbs", "codeArrondissement", "section", "numero", "feuille". + * + * @param {Object} [options.searchGeometry] - Emprise dans laquelle on souhaite effectuer la recherche. + * Les propriétés possibles de cet objet sont décrites ci-après. + * @param {String} options.searchGeometry.type - Type de géometrie (Point|Circle|Linestring|Polygon) + * @param {Array.|Array.Array.} options.searchGeometry.coordinates - Coordonnées des points constituant la géométrie. + * @param {Float} options.searchGeometry.radius - Rayon. Paramètre applicable uniquement pour le type 'Circle'. + * + * @param {String} [options.index = "StreetAddress"] - Type de l'objet recherché. + * Le service de géocodage du Géoportail permet de rechercher des 'PositionOfInterest' pour des toponymes, des 'StreetAddress' + * pour des adresses postales ou des 'CadastralParcel' pour des parcelles cadastrales. L'index 'location' permet une recherche + * multi-indexes en regroupant les indexes 'PositionOfInterest' et 'StreetAddress'. + * D'autres types pourront être rajoutés selon l'évolution du service. + * Par défaut, index = 'StreetAddress'. + * + * @param {Number} [options.maximumResponses] - Nombre de réponses maximal que l'on souhaite recevoir. + * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 20s. + * + * @param {Boolean} [options.returnTrueGeometry] - Booléen indiquant si l'on souhaite récupérer la géométrie vraie des objects géolocalisés. + * false par défaut. + * + * @example + * var options = { + * apiKey : null, + * serverUrl : 'http://localhost/service/', + * proxyURL : null, + * timeOut : 10000, // ms + * rawResponse : false, // true|false + * scope : null, // this + * onSuccess : function (response) {}, + * onFailure : function (error) {}, + * // spécifique au service + * index : 'StreetAddress', + * searchGeometry : { + * type : Circle, + * coordinates : [48, 2], + * radius : 100 + * }, + * position : {lon:2 , lat:48.5}, + * maximumResponses : 25, + * }; + * + */ +function ReverseGeocode (options_) { + if (!(this instanceof ReverseGeocode)) { + throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("CLASS_CONSTRUCTOR", "ReverseGeocode")); + } + + /** + * Nom de la classe (heritage) + * FIXME instance ou classe ? + */ + this.CLASSNAME = "ReverseGeocode"; + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("Gp.Services.ReverseGeocode"); + this.logger.trace("[Constructeur ReverseGeocode (options)]"); + + var options = this.patchOptionConvertor(options_); + options.serverUrl = options.serverUrl || "https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/reverse"; + + // appel du constructeur par heritage + _CommonService__WEBPACK_IMPORTED_MODULE_3__["default"].apply(this, [options]); + + if (!options.searchGeometry) { + if (!options.position) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "searchGeometry")); + } + } else { + this.options.searchGeometry = options.searchGeometry; + } + + // on definit l'index par defaut + if (!options.index) { + this.options.index = options.index = "StreetAddress"; + } + + if (options.filters) { + var filter = Object.keys(options.filters); + for (var i = 0; i < filter.length; i++) { + var key = filter[i]; + // on supprime les filtres vides + if (typeof options.filters[key] === "undefined" || + (typeof options.filters[key] === "object" && Object.keys(options.filters[key]).length === 0) || + (typeof options.filters[key] === "string" && options.filters[key].length === 0) || + (Array.isArray(options.filters[key]) && options.filters[key].length === 0) + ) { + delete this.options.filters[key]; + } + } + } + + this.options.position = options.position; + this.options.index = options.index || "StreetAddress"; + this.options.maximumResponses = options.maximumResponses || 20; +} + +/** + * @lends module:ReverseGeocode# + */ +ReverseGeocode.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__["default"].prototype, { + // todo + // getter/setter +}); + +/* + * Constructeur (alias) + */ +ReverseGeocode.prototype.constructor = ReverseGeocode; + +/** + * Patch pour la convertion des options vers le nouveau formalisme. + * + * @param {Object} options_ - options du service + * @return {Object} - options + */ +ReverseGeocode.prototype.patchOptionConvertor = function (options_) { + var options = options_; + + if (options.filterOptions) { + this.logger.warn("The parameter 'filterOptions' is deprecated"); + + if (options.filterOptions.type) { + this.logger.warn("The parameter 'filterOptions.type' is deprecated"); + if (!options.index) { + if (Array.isArray(options.filterOptions.type) && options.filterOptions.type.length > 0) { + options.index = options.filterOptions.type[0]; + } else { + options.index = options.filterOptions.type; + } + } + delete options.filterOptions.type; + } + + if (options.filterOptions.bbox) { + this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"); + if (!options.searchGeometry) { + // convertir la geometrie + options.searchGeometry = this.bbox2Json(options.filterOptions.bbox); + } + delete options.filterOptions.bbox; + } + + if (options.filterOptions.circle) { + this.logger.warn("The parameter 'filterOptions.circle' is deprecated"); + if (!options.searchGeometry) { + // convertir la geometrie + options.searchGeometry = this.circle2Json(options.filterOptions.circle); + } + delete options.filterOptions.circle; + } + + if (options.filterOptions.polygon) { + this.logger.warn("The parameter 'filterOptions.polygon' is deprecated"); + if (!options.searchGeometry) { + // convertir la geometrie + options.searchGeometry = this.polygon2Json(options.filterOptions.polygon); + } + delete options.filterOptions.polygon; + } + + if (!options.filters && Object.keys(options.filterOptions).length > 0) { + options.filters = options.filterOptions; + } + + delete options.filterOptions; + } + + if (options.position) { + if (options.position.x) { + this.logger.warn("The parameter 'position.x' is deprecated"); + + if (!options.position.lon) { + options.position.lon = options.position.x; + } + delete options.position.x; + } + + if (options.position.y) { + this.logger.warn("The parameter 'position.y' is deprecated"); + + if (!options.position.lat) { + options.position.lat = options.position.y; + } + delete options.position.y; + } + } + + if (options.srs) { + this.logger.warn("The parameter 'srs' is deprecated"); + delete options.srs; + } + + return options; +}; + +/** + * (overwrite) + * Création de la requête + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + */ +ReverseGeocode.prototype.buildRequest = function (error, success) { + var options = { + httpMethod : this.options.httpMethod, + // options specifiques du service + geocodeMethod : "reverse", + searchGeometry : this.options.searchGeometry, + index : this.options.index, + position : this.options.position, + returnTrueGeometry : this.options.returnTrueGeometry, + maxResp : this.options.maximumResponses, + filters : this.options.filters + }; + + this.request = _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__["default"].build(options); + + // on teste si la requete a bien été construite ! + (!this.request) + ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_REQUEST_BUILD"))) + : success.call(this, this.request); +}; + +/** + * (overwrite) + * Analyse de la reponse + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + */ +ReverseGeocode.prototype.analyzeResponse = function (error, success) { + if (this.response) { + var options = { + response : this.response, + rawResponse : this.options.rawResponse, + onError : error, + onSuccess : success, + scope : this + }; + + _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__["default"].build(options); + } else { + error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); + } +}; + +/** + * Patch pour la convertion des options vers le nouveau formalisme. + * + * @param {Array} bbox - bbox + * @return {Object} - geometrie au format json + */ +ReverseGeocode.prototype.bbox2Json = function (bbox) { + return { + type : "Polygon", + coordinates : [[ + [bbox.left, bbox.top], + [bbox.right, bbox.top], + [bbox.right, bbox.bottom], + [bbox.left, bbox.bottom], + [bbox.left, bbox.top] + ]] + }; +}; + +/** + * Patch pour la convertion des options vers le nouveau formalisme. + * + * @param {Object} circle - circle + * @return {Object} - geometrie au format json + */ +ReverseGeocode.prototype.circle2Json = function (circle) { + return { + type : "Circle", + radius : circle.radius, + coordinates : [circle.x, circle.y] + }; +}; + +/** + * Patch pour la convertion des options vers le nouveau formalisme. + * + * @param {Array} polygon - polygon + * @return {Object} - geometrie au format json + */ +ReverseGeocode.prototype.polygon2Json = function (polygon) { + var jsonGeom = { + type : "Polygon", + coordinates : [[]] + }; + + for (var i = 0; i < polygon.length; ++i) { + jsonGeom.coordinates[0].push([polygon[i].x, polygon[i].y]); + } + + return jsonGeom; +}; + +/** + * Codes EPSG géographiques (lat/lon). Utiles car les coordonnées doivent être inversées. + */ +ReverseGeocode.geoEPSG = ["EPSG:4326"]; + +/* harmony default export */ __webpack_exports__["default"] = (ReverseGeocode); + + +/***/ }), +/* 82 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46); +/* harmony import */ var _Response_AutoCompleteResponseFactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45); +/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(56); + + + + + + + +/** + * @classdesc + * Appel du service d'autocomplétion du Géoportail : + * envoi de la requête construite selon les paramètres en options, + * éventuellement parsing et analyse de la réponse, + * retour d'une réponse en paramètre de la fonction onSuccess. + * @constructor + * @extends {Gp.Services.CommonService} + * @alias Gp.Services.AutoComplete + * + * @param {Object} options - options spécifiques au service (+ les options heritées) + * + * @param {String} options.text - La chaîne de caractère à compléter. + * Cette chaîne n'est pas "URL encodée". + * C'est l'API qui s'occupe de l'encoder pour l'inclure dans la requête. + * + * @param {Array.} [options.type = ["StreetAddress"]] - Type de l'objet recherché. + * Le service d'autocomplétion du Géoportail permet de rechercher des toponymes 'PositionOfInterest' et/ou des adresses postales 'StreetAddress'. + * D'autres types pourront être rajoutés selon l'évolution du service. + * Par défaut, type = ['StreetAddress']. + * + * @param {String} [options.territory] - Limitation de la zone de recherche de localisants. + * Le service d'autocomplétion du Géoportail permet de limiter la recherche à la métropole et la Corse : options.territory = 'METROPOLE', + * DOMS TOMS : options.territory = 'DOMTOM', ou à un département : options.territory = '31' + * Pas de valeur par défaut. + * La valeur par défaut est donc celle du service. + * Le service d'autocomplétion du Géoportail renvoie toutes les informations quand aucun territoire n'est spécifié. + * + * @param {Number} [options.maximumResponses = 10] - Nombre de réponses maximal que l'on souhaite recevoir. + * Pas de valeur par défaut. + * La valeur par défaut sera donc celle du service : 10. + * + * @example + * var options = { + * // options communes aux services + * apiKey : null, + * serverUrl : 'http://localhost/service/', + * protocol : 'JSONP', // JSONP|XHR + * proxyURL : null, + * httpMethod : 'GET', // GET|POST + * timeOut : 10000, // ms + * rawResponse : false, // true|false + * scope : null, // this + * onSuccess : function (response) {}, + * onFailure : function (error) {}, + * // spécifique au service + * text : "", + * type : "StreetAddress", + * territory : 'METROPOLE', + * maximumResponses : 10 + * }; + */ +function AutoComplete (options_) { + if (!(this instanceof AutoComplete)) { + throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__["default"].getMessage("CLASS_CONSTRUCTOR", "AutoComplete")); + } + + /** + * Nom de la classe (heritage) + * FIXME instance ou classe ? + */ + this.CLASSNAME = "AutoComplete"; + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__["default"].getLogger("Gp.Services.AutoComplete"); + this.logger.trace("[Constructeur AutoComplete (options)]"); + + var options = this.patchOptionConvertor(options_); + options.serverUrl = options.serverUrl || "https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/completion"; + + // appel du constructeur par heritage + _CommonService__WEBPACK_IMPORTED_MODULE_0__["default"].apply(this, arguments); + + if (!options.text) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__["default"].getMessage("PARAM_MISSING", "text")); + } + + // ajout des options spécifiques au service + this.options.text = options.text; + + // on definit des parametres par defaut + if (!options.type) { + options.type = ["StreetAddress,PositionOfInterest"]; + } + + this.options.type = options.type; + this.options.territory = options.territory || ""; + this.options.maximumResponses = options.maximumResponses || 10; + + // INFO + // le service ne repond pas en mode POST (405 Method Not Allowed) + if (this.options.protocol === "XHR" && this.options.httpMethod === "POST") { + this.logger.warn("Le service ne gére pas le mode d'interrogation en POST, on bascule sur du GET !"); + this.options.httpMethod = "GET"; // on surcharge ! + } + + // attributs d'instances + + /** + * Format forcé de la réponse du service : "json" + * sauf si l'on souhaite une reponse brute (options.rawResponse) + */ + this.options.outputFormat = (this.options.rawResponse) ? "" : "json"; +} + +/** + * @lends module:AutoComplete# + */ + +AutoComplete.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_0__["default"].prototype, { + // todo + // getter/setter +}); + +/* + * Constructeur (alias) + */ +AutoComplete.prototype.constructor = AutoComplete; + +/** + * Patch pour la convertion des options vers le nouveau formalisme. + * + * @param {Object} options_ - options du service + * @return {Object} - options + */ +AutoComplete.prototype.patchOptionConvertor = function (options_) { + const options = options_; + + if (options.filterOptions) { + this.logger.warn("The parameter 'filterOptions' is deprecated"); + + if (options.filterOptions.type) { + this.logger.warn("The parameter 'filterOptions.type' is deprecated"); + if (!options.type) { + options.type = options.filterOptions.type; + } + } + + if (options.filterOptions.territory) { + this.logger.warn("The parameter 'filterOptions.territory' is deprecated"); + if (!options.terr) { + options.terr = options.filterOptions.territory; + } + } + + delete options.filterOptions; + } + + return options; +}; + +/** + * (overwrite) + * Création de la requête + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + */ +AutoComplete.prototype.buildRequest = function (error, success) { + // ex. + // http://wxs.ign.fr/CLEF/ols/apis/completion? + // text=Brie-Comt& + // type=StreetAddress,PositionOfInterest& + // territory=METROPOLE& + // maximumResponses=10 + + // traitement des param KPV sous forme de tableau + var territory = ""; + if (this.options.territory) { + territory = this.options.territory; + } + + var type = ""; + if (this.options.type) { + type = this.options.type.join(","); + } + + // normalisation de la requete avec param KPV + this.request = _Utils_Helper__WEBPACK_IMPORTED_MODULE_4__["default"].normalyzeParameters({ + text : encodeURIComponent(this.options.text), + type : type, + terr : territory, + maximumResponses : this.options.maximumResponses + }); + + (!this.request) + ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_5__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__["default"].getMessage("SERVICE_REQUEST_BUILD"))) + : success.call(this, this.request); +}; + +/** + * (overwrite) + * Analyse de la reponse + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback de succès de l'analyse de la réponse + */ +AutoComplete.prototype.analyzeResponse = function (error, success) { + if (this.response) { + var options = { + response : this.response, + rawResponse : this.options.rawResponse, + onSuccess : success, + onError : error, + scope : this + }; + + _Response_AutoCompleteResponseFactory__WEBPACK_IMPORTED_MODULE_1__["default"].build(options); + } else { + error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_5__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (AutoComplete); + + +/***/ }), +/* 83 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56); +/* harmony import */ var _model_AutoCompleteResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(84); +/* harmony import */ var _model_SuggestedLocation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(85); +/** + * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON + * (Factory) + * + * @module AutoCompleteResponseFactory + * @private + * @alias Gp.Services.AutoComplete.Response.AutoCompleteResponseFactory + */ + + + + + + +var AutoCompleteResponseFactory = { + + /** + * interface unique + * + * @method build + * @static + * @param {Object} options - options definies dans le composant Alti + * + * @example + * var options = { + * response : + * outputFormat : + * rawResponse : + * scope : + * onSuccess : + * onError : + * }; + * + */ + build : function (options) { + // logger + var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("AutoCompleteResponseFactory"); + logger.trace(["AutoCompleteResponseFactory::build()"]); + + var data = null; + + if (options.response) { + if (options.rawResponse) { + logger.trace("analyze response : raw"); + data = options.response; + } else { + var JSONResponse = null; + if (typeof options.response === "string") { + JSONResponse = JSON.parse(options.response); + } else { + JSONResponse = options.response; + } + + // analyse de la réponse + if (JSONResponse) { + // le service renvoie t il une erreur ? + if (JSONResponse.error) { + // ex. ? + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EXCEPTION", JSONResponse.error.description), + status : JSONResponse.error.code, + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"].TYPE_SRVERR + })); + return; + } + + // création de l'objet réponse + data = new _model_AutoCompleteResponse__WEBPACK_IMPORTED_MODULE_3__["default"](); + + // boucle sur les résultats de l'autocomplétion + if (JSONResponse.results && Array.isArray(JSONResponse.results)) { + var suggestedLocation = null; + + for (var i = 0; i < JSONResponse.results.length; i++) { + var result = JSONResponse.results[i]; + suggestedLocation = new _model_SuggestedLocation__WEBPACK_IMPORTED_MODULE_4__["default"](); + + if (result) { + if (result.country === "StreetAddress") { + suggestedLocation.street = result.street; + suggestedLocation.type = "StreetAddress"; + } else if (result.country === "PositionOfInterest") { + suggestedLocation.poi = result.street; + suggestedLocation.kind = result.kind; + suggestedLocation.type = "PositionOfInterest"; + } + + if (suggestedLocation.position) { + suggestedLocation.position.x = result.x; + suggestedLocation.position.y = result.y; + } + + suggestedLocation.commune = result.city; + suggestedLocation.fullText = result.fulltext; + suggestedLocation.postalCode = result.zipcode; + suggestedLocation.classification = result.classification; + } + // Ajout du résultat au tableau reverseGeocodedLocations de geocodedLocation + data.suggestedLocations.push(suggestedLocation); + } + } else { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_FORMAT_3"))); + return; + } + + if (!data.suggestedLocations.length) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_FORMAT_3"))); + return; + } + } + + if (!data) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_ANALYSE_2"), + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"].TYPE_UNKERR, + status : -1 + })); + return; + } + + // Si la réponse contenait une exception renvoyée par le service + if (data.exceptionReport) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EXCEPTION", data.exceptionReport), + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"].TYPE_SRVERR, + status : 200 + })); + return; + } + } + } else { + // si la réponse (xmlString) est vide, on appelle le callback d'erreur + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); + return; + } + + // si tout s'est bien passé, on appelle le callback de succès + options.onSuccess.call(options.scope, data); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (AutoCompleteResponseFactory); + + +/***/ }), +/* 84 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * Response object for {@link module:Services~autoComplete Gp.Services.autoComplete ()} invocation when successful. Received as the argument of onSuccess callback function. + * + * @property {Array.} suggestedLocations - SuggestedLocations array. + * + * @namespace + * @alias Gp.Services.AutoCompleteResponse + */ +function AutoCompleteResponse () { + if (!(this instanceof AutoCompleteResponse)) { + throw new TypeError("AutoCompleteResponse constructor cannot be called as a function."); + } + + this.suggestedLocations = []; +} + +AutoCompleteResponse.prototype = { + + constructor : AutoCompleteResponse + +}; + +/* harmony default export */ __webpack_exports__["default"] = (AutoCompleteResponse); + + +/***/ }), +/* 85 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +/** + * Single SuggestedLocation Object returned by underlying web service. + * Each suggested location represents a street address ("StreetAddress") or a place name ("PositionOfInterest"). + * + * @property {String} type - Suggested location type : "StreetAddress" ou "PositionOfInterest" + * @property {Gp.Point} position - Position of the suggested location given in requested coordinates system. + * @property {String} commune - Suggested municipality + * @property {String} fullText - Full text representation of the suggested location. + * @property {String} postalCode - Suggested location postcode + * @property {Integer} classification - Number used to classify the importance of the place where is the suggested location from 1 (most important) to 7 (less important). + * @property {String} street - Street name of the suggested location ("StreetAddress" only). + * @property {String} kind - Nature of the suggested location : "prefecture", "monument", "commune", ... for instance ("PositionOfInterest" only). + * + * @namespace + * @alias Gp.Services.AutoComplete.SuggestedLocation + */ +function SuggestedLocation () { + if (!(this instanceof SuggestedLocation)) { + throw new TypeError("SuggestedLocation constructor cannot be called as a function."); + } + + /* REPONSE : + { + "status" : "OK", + "results" : [ + { + "country":"PositionOfInterest", + "x":-1.559185, + "y":47.952603, + "city":"Brie", + "zipcode":"35150", + "street":"corbe", + "kind":"Lieu-dit habité", + "fulltext":"corbe, 35150 Brie", + "classification":6 + }, + { + "country":"StreetAddress", + "x":1.538295, + "y":43.19646, + "city":"Brie", + "zipcode":"09700", + "street":"courreste", + "kind":"", + "fulltext":"courreste, 09700 Brie", + "classification":7 + } + ] + } + */ + + /* REPONSE EN ERREUR + { + status : "ERROR", + results : [ ] + } + */ + + /** + * Suggested location type : "StreetAddress" ou "PositionOfInterest" + * @type {String} + */ + this.type = null; + + /** + * Position of the suggested location given in requested coordinates system. + * @type {Gp.Point} + */ + this.position = { + x : null, + y : null + }; + + /** + * Suggested municipality + * @type {String} + */ + this.commune = null; + + /** + * Full text representation of the suggested location. + * @type {String} + */ + this.fullText = null; + + /** + * Suggested location postcode + * @type {Number} + */ + this.postalCode = null; + + /** + * Number used to classify the importance of the place where is the suggested location from 1 (most important) to 7 (less important). + * @type {Integer} + */ + this.classification = null; + + /** + * Street name of the suggested location ("StreetAddress" only). + * @type {String} + */ + this.street = null; + + /** + * Place name of the suggested location ("PositionOfInterest" only). + * @type {String} + */ + this.poi = null; + + /** + * Nature of the suggested location : "prefecture", "monument", "commune", ... for instance ("PositionOfInterest" only). + * @type {String} + */ + this.kind = null; +} + +SuggestedLocation.prototype = { + + constructor : SuggestedLocation +}; + +/* harmony default export */ __webpack_exports__["default"] = (SuggestedLocation); + + +/***/ }), +/* 86 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56); +/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46); +/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57); +/* harmony import */ var _Request_RouteRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87); +/* harmony import */ var _Response_RouteResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(90); + + + + + + + + + +/** + * @classdesc + * Appel du service d'itinéraire du Géoportail : + * envoi de la requête construite selon les paramètres en options, + * éventuellement parsing et analyse de la réponse, + * retour d'une réponse en paramètre de la fonction onSuccess. + * + * @alias Gp.Services.Route + * @constructor + * @extends {Gp.Services.CommonService} + * @param {Object} options - options spécifiques au service (+ les options heritées) + * + * @param {String} options.resource - La ressource utilisée pour le calcul. Ce paramètre devrait être obligatoire car il l'est dans l'appel au service. Mais il ne l'est pas pour des raisons de rétrocompatibilité. + * + * @param {String} options.outputFormat - Le format de la réponse du service itineraire : 'json' uniquement et par défaut. + * + * @param {String} [options.routePreference = "fastest"] - Mode de calcul à utiliser : + * - le plus rapide « fastest » + * - le plus court « shortest » + * Par défaut : « fastest ». + * + * @param {Object} options.startPoint - Point de départ du calcul. Coordonnées exprimées en longitudes, latitudes (EPSG:4326) + * @param {Float} options.startPoint.x - Abcisse du point de départ du calcul d'itinéraire. + * @param {Float} options.startPoint.y - Ordonnée du point de départ du calcul d'itinéraire. + * + * @param {Object} options.endPoint - Point d'arrivée du calcul. Coordonnées exprimées en longitudes, latitudes (EPSG:4326) + * @param {Float} options.endPoint.x - Abcisse du point d'arrivée du calcul d'itinéraire. + * @param {Float} options.endPoint.y - Ordonnée du point d'arrivée du calcul d'itinéraire. + * + * @param {Object[]} [options.viaPoints] - Liste de point ({x:Float,y:Float}) intermédaires que l'itinéraire doit emprunter dans l'ordre du tableau. + * Coordonnées exprimées en longitudes, latitudes (EPSG:4326) :{x:float, y:float} + * + * @param {String} [options.graph = "voiture"] - Type de graphe utilisé : "Voiture" ou "Pieton". + * Détermine le profil de vitesses utilisé pour le calcul ainsi que les tronçons autorisés ou non. + * Par défaut, c'est la valeur "Voiture" qui sera utilisée. + * + * @param {String[]} [options.exclusions] - DEPRECATED: Critères d'exclusions à appliquer pour le calcul. (correspond au paramètre "avoidFeature" d'OpenLS) + * On précise ici le type de tronçons que l'on ne veut pas que l'itinéraire emprunte + * (valeurs possibles : « toll » (éviter les péages), « bridge », « tunnel »). + * Ce paramètre est conservé pour une rétrocompatibilité de l'api. Le nouveau paramètre à utiliser est options.constraints + * + * @param {Object[]} [options.constraints] - Critères de contraintes à appliquer sur un itinéraire. Les valeurs disponibles dépendent de la ressource utilisée. Il est donc utile de regarder le getCapabilities. + * @param {String} [options.constraints.constraintType] - Type de la contrainte. Généralement "banned". + * @param {String} [options.constraints.key] - Clé de la contrainte. Généralement "wayType". + * @param {String} [options.constraints.operator] - Opérateur de la contrainte. Généralement "=". + * @param {String} [options.constraints.value] - Valeur de la contrainte. Généralement "autoroute". + * + * @param {Boolean} [options.geometryInInstructions = false] - Indique si la géométrie de l'itinéraire doit être reprise morceau par morceau dans les instructions. + * (correspond au paramètre "provideGeometry" d'OpenLS) Par défaut : false. + * + * @param {Boolean} [options.provideBbox = true] - Indique si les instructions doivent être localisées par une bbox dans la réponse. + * Par défaut : true. + * + * @param {String} [options.distanceUnit = "m"] - Indique si la distance doit être exprimée en km ou m dans la réponse. + * Par défaut : m. + * @param {String} [options.timeUnit = "second"] - Indique si la durée doit être exprimée en seconde, minute ou heure dans la réponse. Il peut-être formatté hh:mm::ss avec la valeur standard. + * Les valeurs possibles sont "standard", "second", "minute" ou "hour". + * Par défaut : "standard". + * + * @param {String} [options.srs] - Système de coordonnées dans lequel les paramètres géographiques en entrée et la réponse du service sont exprimés. + * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 'EPSG:4326'. + * + * @param {String[]} [options.waysAttributes] - Nom des attributs des voies. Les valeurs disponibles dépendent de la ressource utilisée. Il est donc utile de regarder le getCapabilities. + * + * @example + * var options = { + * // options communes aux services + * apiKey : null, + * serverUrl : 'http://localhost/service/', + * protocol : 'XHR', + * proxyURL : null, + * httpMethod : 'GET', // GET|POST + * timeOut : 10000, // ms + * rawResponse : false, // true|false + * scope : null, // this + * onSuccess : function (response) {}, + * onFailure : function (error) {}, + * // spécifique au service + * resource : 'bdtopo' + * outputFormat : 'json', + * startPoint : { + * x : 42.1121, + * y : 1.5557 + * }, + * endPoint : { + * x : 42.1121, + * y : 1.5557 + * }, + * provideBbox : true, + * exclusions : ["Bridge", "Tunnel", "Toll"], + * distanceUnit : "km", + * graph : "Voiture", + * geometryInInstructions : true, + * routePreference : "fastest" + * }; + * + */ +function Route (options) { + if (!(this instanceof Route)) { + throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("CLASS_CONSTRUCTOR", "Route")); + } + + /** + * Nom de la classe (heritage) + */ + this.CLASSNAME = "Route"; + + // appel du constructeur par heritage + _CommonService__WEBPACK_IMPORTED_MODULE_3__["default"].apply(this, arguments); + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("Gp.Services.Route"); + this.logger.trace("[Constructeur Route (options)]"); + + if (!options.startPoint) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "startPoint")); + } + + // on lance une exception afin d'eviter au service de le faire... + if (options.startPoint.x === null) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "startPoint.x")); + } + + if (options.startPoint.y === null) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "startPoint.y")); + } + + if (!options.endPoint) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "endPoint")); + } + + // on lance une exception afin d'eviter au service de le faire... + if (options.endPoint.x === null) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "endPoint.x")); + } + + if (options.endPoint.y === null) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "endPoint.y")); + } + + // options par defaut + + // on passe l'option outputFormat en minuscules afin d'éviter des exceptions. + if (options.outputFormat && options.outputFormat !== "json") { + this.logger.warn("options.outputFormat could only be json"); + } + this.options.outputFormat = "json"; + + this.options.resource = options.resource || "bdtopo-osrm"; + this.options.startPoint = options.startPoint; + this.options.endPoint = options.endPoint; + this.options.viaPoints = options.viaPoints || []; + this.options.routePreference = options.routePreference || "fastest"; + /** Gestion des anciennes valeurs de graph */ + if (options.graph) { + if (options.graph === "Voiture") { + this.options.graph = "car"; + } + if (options.graph === "Pieton") { + this.options.graph = "pedestrian"; + } + } else { + this.options.graph = "car"; + } + this.options.constraints = []; + if (options.constraints) { + if (Array.isArray(options.constraints)) { + for (var k = 0; k < options.constraints.length; k++) { + this.options.constraints.push(options.constraints[k]); + } + } else { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_TYPE", "constraints")); + } + } + + /** Gestion de l'ancien paramètre exclusion */ + var constraintTunnel = {}; + var constraintPont = {}; + var constraintAutoroute = {}; + if (options.exclusions) { + if (options.exclusions.length !== 0) { + this.logger.warn("options.exclusions is DEPRECATED !!"); + for (var c = 0; c < options.exclusions.length; c++) { + if (typeof options.exclusions[c] === "string") { + options.exclusions[c] = options.exclusions[c].toLowerCase(); + } else { + // on ne crée pas une erreur pour rétro-compatibilité avec les anciennes versions + continue; + } + if (options.exclusions[c] === "toll") { + constraintAutoroute.constraintType = "banned"; + constraintAutoroute.key = "wayType"; + constraintAutoroute.operator = "="; + constraintAutoroute.value = "autoroute"; + this.options.constraints.push(constraintAutoroute); + } + if (options.exclusions[c] === "tunnel") { + constraintTunnel.constraintType = "banned"; + constraintTunnel.key = "wayType"; + constraintTunnel.operator = "="; + constraintTunnel.value = "tunnel"; + this.options.constraints.push(constraintTunnel); + } + if (options.exclusions[c] === "bridge") { + constraintPont.constraintType = "banned"; + constraintPont.key = "wayType"; + constraintPont.operator = "="; + constraintPont.value = "pont"; + this.options.constraints.push(constraintPont); + } + } + } + } + + this.options.geometryInInstructions = options.geometryInInstructions || false; + this.options.provideBbox = options.provideBbox || true; + this.options.distanceUnit = options.distanceUnit || "m"; + this.options.timeUnit = options.timeUnit || "second"; + this.options.expectedStartTime = null; // FIXME not yet implemented ! + this.options.srs = options.srs || "EPSG:4326"; + this.options.waysAttributes = options.waysAttributes || []; + + // gestion de l'url du service par defaut + // si l'url n'est pas renseignée, il faut utiliser les urls par defaut + if (!this.options.serverUrl) { + var UrlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__["default"].Route.url("calcul"); + if (!UrlByDefault) { + throw new Error("Url by default not found !"); + } + this.options.serverUrl = UrlByDefault; + this.logger.trace("Serveur URL par defaut : " + this.options.serverUrl); + } +} + +/** + * @lends module:Route# + */ +Route.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__["default"].prototype, { + // todo + // getter/setter +}); + +/* + * Constructeur (alias) + */ +Route.prototype.constructor = Route; + +/** + * (overwrite) + * Création de la requête + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + */ +Route.prototype.buildRequest = function (error, success) { + var options = { + // spécifique au service + resource : this.options.resource, + startPoint : this.options.startPoint, + endPoint : this.options.endPoint, + viaPoints : this.options.viaPoints, + provideBbox : this.options.provideBbox, + constraints : this.options.constraints, + distanceUnit : this.options.distanceUnit, + timeUnit : this.options.timeUnit, + graph : this.options.graph, + geometryInInstructions : this.options.geometryInInstructions, + routePreference : this.options.routePreference, + srs : this.options.srs, + waysAttributes : this.options.waysAttributes + }; + + this.request = _Request_RouteRequestFactory__WEBPACK_IMPORTED_MODULE_5__["default"].build(options); + + // on teste si la requete a bien été construite ! + if (!this.request) { + error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_REQUEST_BUILD"))); + } else { + success.call(this, this.request); + } +}; + +/** + * (overwrite) + * Analyse de la reponse + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + */ +Route.prototype.analyzeResponse = function (error, success) { + // INFO + // Factory pour masquer la complexité du retour du service + + if (this.response) { + var options = { + distanceUnit : this.options.distanceUnit, + timeUnit : this.options.timeUnit, + response : this.response, + outputFormat : this.options.outputFormat, // utile pour parser la string en mode XHR : JSON ou XML ! + rawResponse : this.options.rawResponse, + onError : error, + onSuccess : success, + scope : this, + geometryInInstructions : this.options.geometryInInstructions + }; + + _Response_RouteResponseFactory__WEBPACK_IMPORTED_MODULE_6__["default"].build(options); + } else { + error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (Route); + + +/***/ }), +/* 87 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56); +/* harmony import */ var _RouteRequestREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88); + + + + +/** + * Creation d'une requête REST en mode POST ou GET + * (Factory) + * + * @module RouteRequestFactory + * @alias Gp.Services.Route.Request.RouteRequestFactory + * @private + */ +var RouteRequestFactory = { + + /** + * interface unique + * + * @method build + * @static + * @param {Object} options - options definies dans le composant Route + * + * @example + * // utilisation avec les callback + * var options = { + * (...) + * onSuccess : function (response) {}, + * onError : function (error) {}, + * // spécifique au service + * startPoint : { + * x : 42.1121, + * y : 1.5557 + * }, + * endPoint : { + * x : 42.1121, + * y : 1.5557 + * }, + * provideBbox : false, + * exclusions : ["bridge", "tunnel", "toll"], + * distanceUnit : "km", + * graph : "Voiture", + * geometryInInstructions : false, + * routePreference : "fastest" + * }; + * RouteRequestFactory.build(options); + * + * // utilisation sans callback + * var options = {...}; + * try { + * var result = RouteRequestFactory.build(options); + * if (! result) { throw new Error("..."):} + * } catch (e) { + * // todo + * } + * @returns {String} request + */ + build : function (options) { + // logger + var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("RouteRequestFactory"); + logger.trace(["RouteRequestFactory::build()"]); + + var request = null; + + var settings = options || {}; + + // gestion des callback + var bOnError = !!(options.onError !== null && typeof options.onError === "function"); + + var message = null; + + // FIXME les exceptions ne sont pas 'catchées' sur le constructeur ! + var myReq = new _RouteRequestREST__WEBPACK_IMPORTED_MODULE_2__["default"](settings); + if (!myReq.processRequestString()) { + message = "Error process request (rest) !"; + if (bOnError) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__["default"](message)); + return; + } + throw new Error(message); + } + request = myReq.requestString; + + return request; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (RouteRequestFactory); + + +/***/ }), +/* 88 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _model_RouteParamREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89); + + + + + +/** + * @classdesc + * Classe de gestion des requêtes de type REST sur le service de calcul d'itineraire + * (uniquement en GET) + * + * @constructor + * @alias Gp.Services.Route.Request.RouteRequestREST + * @param {Object} options - options definies dans le composant Route + * + * @example + * var options = { + * (...) + * }; + * + * @private + */ +function RouteRequestREST (options) { + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("RouteRequestREST"); + this.logger.trace("[Constructeur RouteRequestREST ()]"); + + if (!(this instanceof RouteRequestREST)) { + throw new TypeError("RouteRequestREST constructor cannot be called as a function."); + } + + // existance des options + if (!options) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_EMPTY", "options")); + } + + /** liste des options */ + this.settings = options; +} + +RouteRequestREST.prototype = { + + /** + * @lends module:RouteRequestREST# + */ + + /** + * request + * @type {String} + */ + requestString : null, + + /** + * Constructeur (alias) + */ + constructor : RouteRequestREST, + + /** + * Construction de la requête. + * + * @example + * // GET out : origin=2.416907353809513,48.8465772142297&destination=2.4248037771493673,48.84591353161838 + * // POST out : Not yet supported method POST ! + * @returns {String} request + */ + processRequestString : function () { + // INFO + // construction simple sans template..., + // mais en attendant que les services soient fixés, on taggue ce composant en mode PROTOTYPE ! + this.logger.warn(" PROTOTYPE !"); + + // Mapping des options avec le service de l'API REST + var oParams = new _model_RouteParamREST__WEBPACK_IMPORTED_MODULE_2__["default"](this.settings); + var params = oParams.getParams(); + + var request = ""; + for (var i = 0; i < params.length; i++) { + var o = params[i]; + if (request) { + request += "&"; + } + request += o.k + "=" + o.v; + } + + // Exemple : + // http://wxs.ign.fr/KEY/itineraire/rest/route.json? + // origin=& + // destination=& + // waypoints=& + // method=DISTANCE& + // graph=Pieton& + // graphName=Pieton& + // exclusions=& + // tolerance=10& + // srs= + + this.logger.trace(request); + this.requestString = request; + + return this.requestString; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (RouteRequestREST); + + +/***/ }), +/* 89 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); + + + +/** + * @classdesc + * Classe de gestion des param. des requêtes du service de calcul d'itineraire (REST). + * Permet le mapping avec les options du service. + * @constructor + * @alias Gp.Services.Route.Request.RouteParamREST + * @param {Object} options - options + * + * @private + */ +function RouteParamREST (options) { + if (!(this instanceof RouteParamREST)) { + throw new TypeError("RouteParamREST constructor cannot be called as a function."); + } + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger(); + this.logger.trace("[Constructeur RouteParamREST ()]"); + /** + * Options en paramêtres du constructeur. + */ + this.options = options || {}; + + // mapping des options avec l'API REST + + /** Ressource utilisée */ + this.resource = this.options.resource; + + /** Coordonnées du point de départ. */ + this.start = this.options.startPoint.x + "," + this.options.startPoint.y; + + /** Coordonnées du point d’arrivée. */ + this.end = this.options.endPoint.x + "," + this.options.endPoint.y; + + /** Coordonnées des étapes point de départ. */ + this.intermediates = this.options.viaPoints; + + /** Nom du profile à utiliser */ + this.profile = this.options.graph; + + /** projection (code EPSG comme epsg:4326 ou wgs84) */ + this.crs = this.options.srs; + + /** Liste des contraintes */ + this.constraints = this.options.constraints; + + /** Nom de l'optimisation à utiliser */ + this.optimization = this.options.routePreference; + + /** Format de sortie (résumé de l’itinéraire) */ + this.getSteps = (this.options.geometryInInstructions) ? "true" : "false"; + + /** Unité des distances */ + this.distanceUnit = this.options.distanceUnit; + + /** Unité des durées */ + this.timeUnit = this.options.timeUnit; + + /** Attributs des voies */ + this.waysAttributes = this.options.waysAttributes; +} + +/** + * CLASSNAME + */ +RouteParamREST.CLASSNAME = "RouteParamREST"; + +RouteParamREST.prototype = { + + /** + * @lends module:RouteParamREST# + */ + + /** + * Constructeur (alias) + */ + constructor : RouteParamREST, + + /** + * Retourne une liste de points + * @returns {String} une liste de points (sep '|') + */ + getIntermediates : function () { + var array = []; + if (this.intermediates.length !== 0) { + for (var i = 0; i < this.intermediates.length; i++) { + var obj = this.intermediates[i]; + array.push(obj.x + "," + obj.y); + } + } + + return array.join("|"); + }, + + /** + * Retourne une liste d'attributs + * @returns {String} une liste d'attributs (sep '|') + */ + getWaysAttributes : function () { + return this.waysAttributes.join("|"); + }, + + /** + * Retourne un profile + * @returns {String} profile + */ + getProfile : function () { + return this.profile; + }, + + /** + * Retourne un distanceUnit + * @returns {String} distanceUnit + */ + getDistanceUnit : function () { + if (this.distanceUnit === "m") { + return "meter"; + } + if (this.distanceUnit === "km") { + return "kilometer"; + } + return ""; + }, + + /** + * Retourne une optimisation + * @returns {String} optimization + */ + getOptimization : function () { + if (this.optimization) { + return this.optimization; + } else { + return ""; + } + }, + + /** + * Retourne la liste des constraints + * @returns {String} une liste des constraints (sep '|') + */ + getConstraints : function () { + var constraintArray = []; + + if (this.constraints.length !== 0) { + for (var k = 0; k < this.constraints.length; k++) { + constraintArray.push(JSON.stringify(this.constraints[k])); + } + } + return constraintArray.join("|"); + } +}; + +/** + * Tableau de clefs/valeurs pour param. + * + * @returns {Array} liste de paramêtres + */ +RouteParamREST.prototype.getParams = function () { + var map = []; + + map.push({ + k : "resource", + v : this.resource + }); + + map.push({ + k : "start", + v : this.start + }); + + map.push({ + k : "end", + v : this.end + }); + + map.push({ + k : "geometryFormat", + v : "geojson" + }); + + if (this.optimization) { + map.push({ + k : "optimization", + v : this.getOptimization() + }); + } + + if (this.intermediates) { + map.push({ + k : "intermediates", + v : this.getIntermediates() + }); + } + + if (this.profile) { + map.push({ + k : "profile", + v : this.getProfile() + }); + } + + if (this.constraints) { + map.push({ + k : "constraints", + v : this.getConstraints() + }); + } + + if (this.crs) { + map.push({ + k : "crs", + v : this.crs + }); + } + + if (this.distanceUnit) { + map.push({ + k : "distanceUnit", + v : this.getDistanceUnit() + }); + } + + if (this.timeUnit) { + map.push({ + k : "timeUnit", + v : this.timeUnit + }); + } + + if (this.waysAttributes) { + map.push({ + k : "waysAttributes", + v : this.getWaysAttributes() + }); + } + + return map; +}; + +/* harmony default export */ __webpack_exports__["default"] = (RouteParamREST); + + +/***/ }), +/* 90 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56); +/* harmony import */ var _model_RouteResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91); +/* harmony import */ var _model_RouteInstruction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92); + + + + + + +/** + * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON + * (Factory) + * + * @module RouteResponseFactory + * @alias Gp.Services.Route.Response.RouteResponseFactory + * @private + */ +var RouteResponseFactory = { + + /** + * interface unique + * + * @method build + * @static + * @param {Object} options - options definies dans le composant Route + * + * @example + * var options = { + * response : + * outputFormat : + * rawResponse : + * scope : + * onSuccess : + * onError : + * }; + * + */ + build : function (options) { + // logger + var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("RouteResponseFactory"); + logger.trace("RouteResponseFactory::build()"); + + var data = null; + + if (options.response) { + if (options.rawResponse) { + logger.trace("analyze response : raw"); + data = options.response; + } else { + logger.trace("analyze response : json"); + + var JSONResponse; + if (typeof options.response === "string") { + JSONResponse = JSON.parse(options.response); + } else { + JSONResponse = options.response; + } + + // construction de l'objet réponse JSON + if (JSONResponse) { + // le service renvoie t il une erreur ? + if (JSONResponse.message) { + // ex. {"message":"message not null", "status":"ERROR"} + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EXCEPTION", JSONResponse.message))); + return; + } + var legs = []; + var legSteps = []; + var steps = []; + + data = new _model_RouteResponse__WEBPACK_IMPORTED_MODULE_3__["default"](); + + if (data.hasOwnProperty("totalTime")) { + data.totalTime = parseFloat(JSONResponse.duration); + } + if (data.hasOwnProperty("totalDistance")) { + data.totalDistance = parseFloat(JSONResponse.distance); + } + + if (data.hasOwnProperty("bbox")) { + data.bbox.left = parseFloat(JSONResponse.bbox[0]); + data.bbox.bottom = parseFloat(JSONResponse.bbox[1]); + data.bbox.right = parseFloat(JSONResponse.bbox[2]); + data.bbox.top = parseFloat(JSONResponse.bbox[3]); + } + + if (data.hasOwnProperty("routeGeometry") && !options.geometryInInstructions) { + data.routeGeometry = JSONResponse.geometry; + } + + if (data.hasOwnProperty("routeInstructions") && options.geometryInInstructions) { + var legList = JSONResponse.portions; + var i; + if (Array.isArray(legList) && legList.length) { + for (i = 0; i < legList.length; i++) { + legs.push(legList[i]); + } + } + if (legs.length) { + for (i = 0; i < legs.length; i++) { + legSteps.push(legs[i].steps); + } + } + if (legSteps.length) { + for (i = 0; i < legSteps.length; i++) { + steps = steps.concat(legSteps[i]); + } + } + + steps.forEach(function (step) { + data.routeInstructions.push(new _model_RouteInstruction__WEBPACK_IMPORTED_MODULE_4__["default"]()); + data.routeInstructions[data.routeInstructions.length - 1].duration = step.duration; + data.routeInstructions[data.routeInstructions.length - 1].distance = step.distance; + data.routeInstructions[data.routeInstructions.length - 1].code = ""; + data.routeInstructions[data.routeInstructions.length - 1].instruction = ""; + data.routeInstructions[data.routeInstructions.length - 1].geometry = step.geometry; + + // on ne souhaite pas de ce type de valeur... + if (step.name === "Valeur non renseignée") { + step.name = ""; + } + + switch (step.instruction.type) { + case "turn": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Tourner"; + break; + case "new name": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Continuer tout droit"; + break; + case "depart": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Départ"; + break; + case "arrive": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Arrivée"; + break; + case "merge": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Rejoindre"; + break; + case "ramp": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Prendre la bretelle"; + break; + case "on ramp": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Prendre la bretelle"; + break; + case "off ramp": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Prendre la sortie"; + break; + case "fork": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Sur la bifurcation, prendre"; + break; + case "end of road": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "À la fin de la route, prendre"; + break; + case "use lane": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Utiliser la file"; + break; + case "continue": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Continuer"; + break; + case "roundabout": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Au rond-point"; + break; + case "rotary": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Au rond-point"; + break; + case "roundabout turn": + data.routeInstructions[data.routeInstructions.length - 1].instruction += "Au rond point, tourner"; + break; + case "notification": + data.routeInstructions[data.routeInstructions.length - 1].instruction += ""; + break; + default: + data.routeInstructions[data.routeInstructions.length - 1].instruction += "?" + step.instruction.type + "?"; + break; + } + + if (step.instruction.modifier) { + switch (step.instruction.modifier) { + case "uturn": + data.routeInstructions[data.routeInstructions.length - 1].instruction = "Faire demi-tour"; + break; + case "sharp right": + data.routeInstructions[data.routeInstructions.length - 1].instruction += " complètement à droite"; + break; + case "right": + data.routeInstructions[data.routeInstructions.length - 1].instruction += " à droite"; + break; + case "slight right": + data.routeInstructions[data.routeInstructions.length - 1].instruction += " légèrement à droite"; + break; + case "straight": + data.routeInstructions[data.routeInstructions.length - 1].instruction = "Continuer tout droit"; + break; + case "slight left": + data.routeInstructions[data.routeInstructions.length - 1].instruction += " lègèrement à gauche"; + break; + case "left": + data.routeInstructions[data.routeInstructions.length - 1].instruction += " à gauche"; + break; + case "sharp left": + data.routeInstructions[data.routeInstructions.length - 1].instruction += " complètement à gauche"; + break; + default: + data.routeInstructions[data.routeInstructions.length - 1].instruction += " ?" + step.instruction.modifier + "?"; + break; + } + } + + if (step.instruction.exit) { + data.routeInstructions[data.routeInstructions.length - 1].instruction += `${step.instruction.exit}e sortie`; + } + + if (step.attributes.name) { + if (step.attributes.name.nom_1_droite || step.attributes.name.toponyme) { + data.routeInstructions[data.routeInstructions.length - 1].instruction += " sur"; + } + + if (step.attributes.name.nom_1_droite) { + data.routeInstructions[data.routeInstructions.length - 1].instruction += ` ${step.attributes.name.nom_1_droite}`; + } + + if (step.attributes.name.toponyme) { + data.routeInstructions[data.routeInstructions.length - 1].instruction += ` ${step.attributes.name.toponyme}`; + } + } + }); + } + } + + if (!data) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_ANALYSE", "json"))); + return; + } + + // Si la réponse contenait une exception renvoyée par le service + if (data.exceptionReport) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EXCEPTION_2"))); + return; + } + } + } else { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); + return; + } + + options.onSuccess.call(options.scope, data); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (RouteResponseFactory); + + +/***/ }), +/* 91 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * Response object for {@link module:Services~route Gp.Services.route ()} invocation when successful. Received as the argument of onSuccess callback function. + * + * @property {Gp.BBox} bbox - Bounding Box of the route. Given when provideBBox parameter is used in function call. + * @property {Object} routeGeometry - Geometry (expressed in [GeoJSON]{@link http://geojson.org/}) of the route. + * @property {Array.} routeInstructions - Instructions of the route. + * @property {String} totalDistance - Length of the route. If distanceUnit parameter was set to "km" (default), totalDistance is a string containing the total distance expressed in kilometers, followed by " Km" (e.g. : "19.6 Km"). If distanceUnit parameter was set to "m", totalDistance is a string containing the total distance expressed in meters (e.g. : "19599.14"). + * @property {Float} totalTime - Route duration in seconds. + * + * @namespace + * @alias Gp.Services.RouteResponse + */ +function RouteResponse () { + if (!(this instanceof RouteResponse)) { + throw new TypeError("RouteResponse constructor cannot be called as a function."); + } + + this.totalTime = null; + + this.totalDistance = null; + + this.bbox = { + left : null, + right : null, + top : null, + bottom : null + }; + + this.routeGeometry = null; // FIXME can be null if option 'geometryInInstructions' is true ! + + this.routeInstructions = []; +} + +RouteResponse.prototype = { + + constructor : RouteResponse + +}; + +/* harmony default export */ __webpack_exports__["default"] = (RouteResponse); + + +/***/ }), +/* 92 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +/** + * Single Route Instruction object. + * + * @property {String} code - Instruction code : + * + * - "F" : Straight forward + * - "B" : U-turn + * - "L" : turn left + * - "R" : turn right + * - "BL" : turn left strongly + * - "BR" : turn right strongly + * - "FL" : turn lightly to the left + * - "FR" : turn lightly to the right + * - "round_about_entry" : round about entry + * - "round_about_exit" : round about exit + * + * @property {String} instruction - Instruction text : translated code + street name + * @property {Object} geometry - Geometry (expressed in [GeoJSON]{@link http://geojson.org/}) of the street. + * @property {Float} distance - Length of the instruction. Expressed in km or m, depending on distanceUnit parameter. + * @property {Float} duration - Instruction duration in seconds. + * + * @namespace + * @alias Gp.Services.Route.RouteInstruction + */ +function RouteInstruction () { + if (!(this instanceof RouteInstruction)) { + throw new TypeError("RouteInstruction constructor cannot be called as a function."); + } + + this.duration = null; + + this.distance = null; + + this.code = null; + + this.instruction = null; + + this.geometry = null; // FIXME can be null if option 'geometryInInstructions' is false ! +} + +RouteInstruction.prototype = { + + constructor : RouteInstruction + +}; + +/* harmony default export */ __webpack_exports__["default"] = (RouteInstruction); + + +/***/ }), +/* 93 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56); +/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46); +/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57); +/* harmony import */ var _Request_ProcessIsoCurveRequest__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94); +/* harmony import */ var _Response_ProcessIsoCurveResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96); + + + + + + + + + +/** + * @classdesc + * Appel du service d'isochrone/distance du Géoportail : + * envoi de la requête construite selon les paramètres en options, + * éventuellement parsing et analyse de la réponse, + * retour d'une réponse en paramètre de la fonction onSuccess. + * @constructor + * @extends {Gp.Services.CommonService} + * @alias Gp.Services.ProcessIsoCurve + * @param {Object} options - options spécifiques au service (+ les options heritées) + * + * @param {String} options.resource - La ressource utilisée pour le calcul. Ce paramètre devrait être obligatoire car il l'est dans l'appel au service. Mais il ne l'est pas pour des raisons de rétrocompatibilité. + * + * @param {String} options.outputFormat - Le format de la réponse du service iso : 'json' uniquement et par défaut. + * + * @param {Object} options.position - Point de départ du calcul. + * Coordonnées exprimées en longitudes, latitudes (EPSG:4326) + * @param {Float} options.position.x - Abcisse du point de départ du calcul d'isochrone/distance. + * @param {Float} options.position.y - Ordonnée du point de départ du calcul d'isochrone/distance. + * + * @param {String} options.srs - Projection. + * Système de coordonnées dans lequel les coordonnées du point « location » sont exprimées et + * dans lequel la géométrie de la courbe résultante sera exprimée. + * Par défaut, le système de coordonnées utilisé sera « EPSG:4326 ». + * + * @param {String} [options.graph = "voiture"] - Nom du graphe à utiliser pour le calcul (« Pieton » ou « Voiture »). + * La valeur par défaut est : «voiture» + * + * @param {Array.} [options.exclusions] - DEPRECATED: Ce paramètre est conservé pour une rétrocompatibilité de l'api. Le nouveau paramètre à utiliser est options.constraints. + * Critères d'exclusions à appliquer pour le calcul. + * On précise ici le type de tronçons que l'on ne veut pas que l'isochrone/distance emprunte + * (valeurs possibles : « toll » (éviter les péages), « bridge », « tunnel »). + * + * @param {Object[]} [options.constraints] - Critères de contraintes à appliquer sur un itinéraire. Les valeurs disponibles dépendent de la ressource utilisée. Il est donc utile de regarder le getCapabilities. + * @param {String} [options.constraints.constraintType] - Type de la contrainte. Généralement "banned". + * @param {String} [options.constraints.key] - Clé de la contrainte. Généralement "wayType". + * @param {String} [options.constraints.operator] - Opérateur de la contrainte. Généralement "=". + * @param {String} [options.constraints.value] - Valeur de la contrainte. Généralement "autoroute". + * + * @param {String} [options.method = "time"] - Méthode utilisée pour le calcul de la courbe iso. + * Les valeurs possible sont "time" pour un calcul d'isochrone, "distance" pour un calcul d'isodistance. + * Pas de valeur spécifié équivaut à un calcul d'isochrone. + * + * @param {String} [options.distanceUnit = "m"] - Indique si la distance doit être exprimée en km ou m dans la réponse ("m" or "km"). + * + * @param {String} [options.timeUnit = "second"] - Indique si la durée doit être exprimée en seconde, minute ou heure dans la réponse ("standard", "second", "minute", "hour"). Il peut-être formatté hh:mm::ss avec la valeur standard. + * + * @param {Float} options.time - Durée maximum (exprimée en secondes) à utiliser pour le calcul de la courbe à partir du ou jusqu'au point « location ». + * Ce paramètre doit être renseigné si l'option "méthod" a la valeur "time". + * Si l'option method n'est pas renseignée, ce paramètre doit être renseigné. + * + * @param {Float} options.distance - Distance maximum (exprimée en metres) à utiliser pour le calcul de la courbe à partir du ou j'usqu'au point « location ». + * Ce paramètre doit être renseigné si l'option "méthod" a la valeur "DISTANCE". + * Si l'option "method" n'est pas renseignée, ce paramètre sera ignoré. + * + * @param {Boolean} [options.reverse = false] - Indique si la géométrie résultante doit être lissée (« true ») pour ne pas avoir d'effet d'escalier. + * Par défaut, la valeur « false » est appliquée. + * + * @param {Boolean} [options.smoothing = false] - Indique si la géométrie résultante doit être lissée (« true ») pour ne pas avoir d'effet d'escalier. + * Par défaut, la valeur « false » est appliquée. + * + * @param {Boolean} [options.holes = false] - Indique si la géométrie résultante (surface) doit être retournée avec des trous (« true »). + * Par défaut, la valeur « false » est appliquée. + * + * @example + * var options = { + * // options communes aux services + * apiKey : null, + * serverUrl : 'http://localhost/service/', + * protocol : 'JSONP', // JSONP|XHR + * proxyURL : null, + * httpMethod : 'GET', // GET|POST + * timeOut : 10000, // ms + * rawResponse : false, // true|false + * scope : null, // this + * onSuccess : function (response) {}, + * onFailure : function (error) {}, + * // spécifique au service + * position : { + * x : 2.3242664298058053, + * y : 48.86118017324745 + * }, + * distance : 200, + * [time : ] + * method : "distance", + * graph : "voiture", + * reverse : false + * }; + */ + +function ProcessIsoCurve (options) { + if (!(this instanceof ProcessIsoCurve)) { + throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("CLASS_CONSTRUCTOR", "ProcessIsoCurve")); + } + + /** + * Nom de la classe (heritage) + * FIXME instance ou classe ? + */ + this.CLASSNAME = "ProcessIsoCurve"; + + // appel du constructeur par heritage + _CommonService__WEBPACK_IMPORTED_MODULE_3__["default"].apply(this, arguments); + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("Gp.Services.ProcessIsoCurve"); + this.logger.trace("[Constructeur ProcessIsoCurve (options)]"); + + if (!options.position) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "position")); + } + + // on lance une exception afin d'eviter au service de le faire... + if (options.position.x === null) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "position.x")); + } + + if (options.position.y === null) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "position.y")); + } + + if (!options.time && !options.distance) { + throw new Error("Parameter (s) 'distance' missing. Parameter time to calculate an isochrone, parameter distance for an isodistance"); + } + + // si on a que le paramètre "distance" en entrée, on calcule une isodistance. + // Le paramètre "méthode" doit pour avoir une réponse du service, être passé à "distance" + if (!options.time && options.distance) { + this.options.method = "distance"; + // on supprime l'éventuel attribut time, résidu d'un appel antérieur + if (this.options.time) { + delete this.options.time; + } + } + + // si on a que le paramètre "time" en entrée, on calcule une isochrone. + // Le paramètre "méthode" doit pour avoir une réponse du service, être passé à "time" + if (options.time && !options.distance) { + this.options.method = "time"; + // on supprime l'éventuel attribut time, résidu d'un appel antérieur + if (this.options.distance) { + delete this.options.distance; + } + } + + // au cas où on a ni l'un, ni l'autre... + this.options.method = this.options.method || "time"; + + // options par defaut du service + // TODO: modifier la ressource lors de la mise en production du service + this.options.resource = options.resource || "bdtopo-iso"; + this.options.exclusions = options.exclusions || []; + this.options.reverse = options.reverse || false; + this.options.srs = options.srs || "EPSG:4326"; + this.options.distanceUnit = options.distanceUnit || "m"; + this.options.timeUnit = options.timeUnit || "second"; + + // options depreciees + if (options.smoothing) { + this.logger.warn("options.smoothing is DEPRECATED"); + } + this.options.smoothing = false; + if (options.holes) { + this.logger.warn("options.holes is DEPRECATED"); + } + this.options.holes = false; + + // Gestion du graphe + if (options.graph) { + if (options.graph === "Voiture") { + this.options.graph = "car"; + } + if (options.graph === "Pieton") { + this.options.graph = "pedestrian"; + } + } else { + this.options.graph = "car"; + } + + // Gestions des contraintes + this.options.constraints = []; + if (options.constraints) { + if (Array.isArray(options.constraints)) { + for (var k = 0; k < options.constraints.length; k++) { + this.options.constraints.push(options.constraints[k]); + } + } else { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_TYPE", "constraints")); + } + } + + // Gestion de l'ancien paramètre exclusions + var constraintTunnel = {}; + var constraintPont = {}; + var constraintAutoroute = {}; + if (options.exclusions) { + if (options.exclusions.length !== 0) { + this.logger.warn("options.exclusions is DEPRECATED !!"); + for (var c = 0; c < options.exclusions.length; c++) { + if (typeof options.exclusions[c] === "string") { + options.exclusions[c] = options.exclusions[c].toLowerCase(); + } else { + // on ne crée pas une erreur pour rétro-compatibilité avec les anciennes versions + continue; + } + if (options.exclusions[c] === "toll") { + constraintAutoroute.constraintType = "banned"; + constraintAutoroute.key = "wayType"; + constraintAutoroute.operator = "="; + constraintAutoroute.value = "autoroute"; + this.options.constraints.push(constraintAutoroute); + } + if (options.exclusions[c] === "tunnel") { + constraintTunnel.constraintType = "banned"; + constraintTunnel.key = "wayType"; + constraintTunnel.operator = "="; + constraintTunnel.value = "tunnel"; + this.options.constraints.push(constraintTunnel); + } + if (options.exclusions[c] === "bridge") { + constraintPont.constraintType = "banned"; + constraintPont.key = "wayType"; + constraintPont.operator = "="; + constraintPont.value = "pont"; + this.options.constraints.push(constraintPont); + } + } + } + } + + // on passe l'option outputFormat en minuscules afin d'éviter des exceptions. + this.options.outputFormat = (typeof options.outputFormat === "string") ? options.outputFormat.toLowerCase() : "json"; + if (options.outputFormat && options.outputFormat !== "json") { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_NOT_SUPPORT", "outputFormat")); + } + this.options.outputFormat = "json"; + + // gestion de l'url du service par defaut + // si l'url n'est pas renseignée, il faut utiliser les urls par defaut + if (!this.options.serverUrl) { + var urlFound = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__["default"].ProcessIsoCurve.url("calcul"); + if (!urlFound) { + throw new Error("Url by default not found !"); + } + this.options.serverUrl = urlFound; + this.logger.trace("Serveur URL par defaut : " + this.options.serverUrl); + } +} + +/** + * @lends module:ProcessIsoCurve# + */ +ProcessIsoCurve.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__["default"].prototype, { + // todo + // getter/setter +}); + +/* + * Constructeur (alias) + */ +ProcessIsoCurve.prototype.constructor = ProcessIsoCurve; + +/** + * Création de la requête (overwrite) + * + * @param {Function} error - callback des erreurs + * @param {Function} success - callback + */ +ProcessIsoCurve.prototype.buildRequest = function (error, success) { + try { + var oIsoCurve = new _Request_ProcessIsoCurveRequest__WEBPACK_IMPORTED_MODULE_5__["default"](this.options); + if (!oIsoCurve.processRequestString()) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_REQUEST_BUILD")); + } + + this.request = oIsoCurve.requestString; + } catch (e) { + error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](e.message)); + return; + } + + success.call(this, this.request); +}; + +/** + * (overwrite) + * Analyse de la reponse + * + * @param {Function} onError - callback des erreurs + * @param {Function} onSuccess - callback de succès de l'analyse de la réponse + */ +ProcessIsoCurve.prototype.analyzeResponse = function (onError, onSuccess) { + if (this.response) { + var options = { + response : this.response, + outputFormat : this.options.outputFormat, + rawResponse : this.options.rawResponse, + onSuccess : onSuccess, + onError : onError, + scope : this + }; + + _Response_ProcessIsoCurveResponseFactory__WEBPACK_IMPORTED_MODULE_6__["default"].build(options); + } else { + onError.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (ProcessIsoCurve); + + +/***/ }), +/* 94 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _model_ProcessIsoCurveParam__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95); + + + + + +/** + * @classdesc + * Classe de gestion des requêtes sur le service de calcul d'isoschrone/isodistance. + * Les requêtes peuvent être en mode GET ou POST, + * et le format de sorti est en JSON. + * + * @constructor + * @alias Gp.Services.ProcessIsoCurve.Request.ProcessIsoCurveRequest + * @param {Object} options - options + * + * @example + * var options = { + * httpMethod : 'GET', // GET|POST + * // spécifique au service + * position : { + * x : 2.3242664298058053, + * y : 48.86118017324745 + * }, + * graph : "car", + * method : 'time', + * time : 1000, //distance : 200 + * reverse : false, + * srs : 'EPSG:4326' + * }; + * + * try { + * + * var oIsoCurve = new ProcessIsoCurveRequest (options); + * if (!oIsoCurve.processRequestString ()) { + * // error + * } + * + * var request = oIsoCurve.requestString; + * + * } catch (e) { + * // error + * } + * @private + */ +function ProcessIsoCurveRequest (options) { + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("ProcessIsoCurveRequest"); + this.logger.trace("[Constructeur ProcessIsoCurveRequest ()]"); + + if (!(this instanceof ProcessIsoCurveRequest)) { + throw new TypeError("ProcessIsoCurveRequest constructor cannot be called as a function."); + } + + // existance des options + if (!options) { + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_EMPTY", "options")); + } + + /** + * Liste des options + */ + this.settings = options; + + /** + * Mode HTPP. + * Par defaut, "GET". + * @type {String} + */ + this.mode = this.settings.httpMethod || "GET"; +} + +ProcessIsoCurveRequest.prototype = { + + /** + * @lends module:ProcessIsoCurveRequest# + */ + + /** + * Requête + * @type {String} + */ + requestString : null, + + /** + * Constructeur (alias) + */ + constructor : ProcessIsoCurveRequest, + + /** + * Construction de la requête. + * + * @example + * // GET out : + * // (http://wxs.ign.fr/KEY/isochrone?) + * // resource=& + * // point=& + * // costValue=& + * // costType=& + * // profile=& + * // constraints=& + * // direction=& + * // crs= + * + * // POST out : + * { + * resource: "bduni-idf-pgr", + * point: "2.337306,48.849319", + * costValue: 100, + * costType: "time", + * profile: "car", + * constraints: [{ + * constraintType: "banned", + * key: "ways_type", + * operator: "=", + * value: "autoroute" + * }] + * } + * + * @returns {String} request + */ + processRequestString : function () { + var request = ""; + var i = 0; + + switch (this.mode) { + case "GET": + this.logger.trace("Process GET Request"); + + // Mapping des options avec le service de l'API REST + var oParams = new _model_ProcessIsoCurveParam__WEBPACK_IMPORTED_MODULE_2__["default"](this.settings); + var params = oParams.getParams(); + + for (i = 0; i < params.length; i++) { + var o = params[i]; + if (request) { + request += "&"; + } + request += o.k + "=" + o.v; + } + + break; + + case "POST": + this.logger.trace("Process POST Request"); + // creation du JSON + var postRequest = {}; + + postRequest.resource = this.settings.resource; + + postRequest.point = this.settings.position.x + "," + this.settings.position.y; + + if (this.settings.method === "distance") { + postRequest.costType = "distance"; + postRequest.costValue = this.settings.distance; + } else { + postRequest.costType = "time"; + postRequest.costValue = this.settings.time; + } + + postRequest.profile = this.settings.graph; + + if (this.settings.reverse) { + postRequest.direction = "arrival"; + } else { + postRequest.direction = "departure"; + } + + postRequest.constraints = this.settings.constraints; + + postRequest.distanceUnit = this.settings.distanceUnit; + + postRequest.timeUnit = this.settings.timeUnit; + + postRequest.crs = this.settings.srs; + + // conversion en chaîne de caractères + request = JSON.stringify(postRequest); + break; + + default: + this.logger.error("No other HTTP method supported by the service !"); + } + + this.logger.trace(request); + this.requestString = request; + + return this.requestString; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (ProcessIsoCurveRequest); + + +/***/ }), +/* 95 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); + + + +/** + * @classdesc + * + * Classe de gestion des param. des requêtes du service de calcul des iso. + * Permet le mapping avec les options du service. + * + * @constructor + * @alias Gp.Services.ProcessIsoCurve.Request.ProcessIsoCurveParam + * @param {Object} options - options + * @private + * + */ +function ProcessIsoCurveParam (options) { + if (!(this instanceof ProcessIsoCurveParam)) { + throw new TypeError("ProcessIsoCurveParam constructor cannot be called as a function."); + } + + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger(); + this.logger.trace("[Constructeur ProcessIsoCurveParam ()]"); + + /** + * Options en paramêtres du constructeur. + */ + this.options = options || {}; + + // mapping des options avec l'API REST + + /** Identifiant de l’isochrone */ + this.id = this.options.id; + + /** Resource */ + this.resource = this.options.resource; + + /** Coordonnées de départ (ou arrivée si le reverse est à true). */ + this.point = this.options.position; + + /** projection (code EPSG comme epsg:4326 ou wgs84) */ + this.crs = this.options.srs; + + /** + * Profil de véhicule à utiliser pour le calcul. + * Voiture ou Pieton + */ + this.profile = this.options.graph; + + /** Liste des règles de restrictions à utiliser */ + this.constraints = this.options.constraints; + + this.reverse = this.options.reverse; + + this.timeUnit = this.options.timeUnit; + + this.distanceUnit = this.options.distanceUnit; + + /** + * "time" pour isochrone ou "distance" for isodistance. + * Par defaut, time... + */ + if (this.options.method === "distance") { + this.costType = "distance"; + this.costValue = this.options.distance; + } else { + this.costType = "time"; + this.costValue = this.options.time; + } +} + +/** + * CLASSNAME + */ +ProcessIsoCurveParam.CLASSNAME = "ProcessIsoCurveParam"; + +ProcessIsoCurveParam.prototype = { + + /** + * @lends module:ProcessIsoCurveParam# + */ + + /** + * Constructeur (alias) + */ + constructor : ProcessIsoCurveParam, + + /** + * Retourne le point + * @returns {String} x,y + */ + getLocation : function () { + return this.point.x + "," + this.point.y; + }, + + /** + * Retourne l'unité de la distance + * @returns {String} + */ + getDistanceUnit : function () { + if (this.distanceUnit === "m") { + return "meter"; + } + if (this.distanceUnit === "km") { + return "kilometer"; + } + return ""; + }, + + /** + * Retourne la liste des contraintes + * @returns {String} + */ + getConstraints : function () { + var constraintArray = []; + + if (this.constraints.length !== 0) { + for (var k = 0; k < this.constraints.length; k++) { + constraintArray.push(JSON.stringify(this.constraints[k])); + } + } + return constraintArray.join("|"); + }, + + /** + * Retourne la direction + * @returns {String} + */ + getDirection : function () { + if (this.reverse) { + return "arrival"; + } else { + return "departure"; + } + } +}; + +/** + * Tableau de clefs/valeurs pour param. + * + * @returns {Object[]} KVP + */ +ProcessIsoCurveParam.prototype.getParams = function () { + var map = []; + + map.push({ + k : "resource", + v : this.resource + }); + + map.push({ + k : "point", + v : this.getLocation() + }); + + map.push({ + k : "direction", + v : this.getDirection() + }); + + map.push({ + k : "costType", + v : this.costType + }); + + map.push({ + k : "costValue", + v : this.costValue + }); + + map.push({ + k : "profile", + v : this.profile + }); + + map.push({ + k : "timeUnit", + v : this.timeUnit + }); + + map.push({ + k : "distanceUnit", + v : this.getDistanceUnit() + }); + + if (this.crs) { + map.push({ + k : "crs", + v : this.crs + }); + } + + if (this.constraints) { + map.push({ + k : "constraints", + v : this.getConstraints() + }); + } + + return map; +}; + +/* harmony default export */ __webpack_exports__["default"] = (ProcessIsoCurveParam); + + +/***/ }), +/* 96 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56); +/* harmony import */ var _model_ProcessIsoCurveResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97); + + + + + +/** + * Factory pour générer une reponse JSON à partir d'un JSON + * (Factory) + * + * @module ProcessIsoCurveResponseFactory + * @alias Gp.Services.ProcessIsoCurve.Response.ProcessIsoCurveResponseFactory + * @private + */ +var ProcessIsoCurveResponseFactory = { + + /** + * interface unique + * + * @method build + * @static + * @param {Object} options - options definies dans le composant ProcessIsoCurve + * + * @example + * var options = { + * response : + * outputFormat : + * rawResponse : + * scope : + * onSuccess : + * onError : + * }; + * + */ + build : function (options) { + // logger + var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("ProcessIsoCurveResponseFactory"); + logger.trace(["ProcessIsoCurveResponseFactory::build()"]); + + var data = null; + + if (options.response) { + if (options.rawResponse) { + logger.trace("analyze response : raw"); + data = options.response; + } else { + logger.trace("analyze response : json"); + + var JSONResponse; + if (typeof options.response === "string") { + JSONResponse = JSON.parse(options.response); + } else { + JSONResponse = options.response; + } + + // analyse de la reponse + // création de l'objet de réponse + data = new _model_ProcessIsoCurveResponse__WEBPACK_IMPORTED_MODULE_3__["default"](); + + // remplissage de l'objet créé avec les attribtuts de la réponse du service + if (JSONResponse) { + if (JSONResponse.costType === "distance") { + data.time = ""; + data.distance = JSONResponse.costValue; + } else { + data.time = JSONResponse.costValue; + data.distance = ""; + } + + data.message = ""; + data.id = ""; + data.srs = JSONResponse.crs; + data.geometry = JSONResponse.geometry; + var coords = JSONResponse.point.split(","); + if (data.location) { + data.location.x = coords[0]; + data.location.y = coords[1]; + } + } else { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_ANALYSE", options.response))); + return; + } + + // info : en cas de problèmes de droits (clé invalide ou autre), la réponse est au format XML !! + // ex. Key does not exist or has expired + // mais le statut est 403, l'erreur est donc remontée plus tôt. + if (data.exceptionReport) { + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"]({ + message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EXCEPTION", data.exceptionReport), + type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"].TYPE_SRVERR, + status : 200 + })); + return; + } + } + } else { + // si la réponse est vide, on appelle le callback d'erreur + options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); + return; + } + + // si tout s'est bien passé, on appelle le callback de succès + options.onSuccess.call(options.scope, data); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (ProcessIsoCurveResponseFactory); + + +/***/ }), +/* 97 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +/** + * Response object for {@link module:Services~isoCurve Gp.Services.isoCurve ()} invocation when successful. Received as the argument of onSuccess callback function. + * + * @property {Float} distance - distance (expressed in meters) used for the request. + * @property {Float} time - time (expressed in seconds) used for the request. + * @property {Object} geometry - Geometry (expressed in [GeoJSON]{@link http://geojson.org/}) of the isocurve. + * @property {String} id - request id (used by underlying webservice). + * @property {Gp.Point} location - Position of the start or end point used for the request (expressed in "srs" coordinates system). + * @property {String} message - message + * @property {String} srs - Identifier of the coordinates system used for the isocurve. + * + * @namespace + * @alias Gp.Services.IsoCurveResponse + * + */ +function ProcessIsoCurveResponse () { + if (!(this instanceof ProcessIsoCurveResponse)) { + throw new TypeError("ProcessIsoCurveResponse constructor cannot be called as a function."); + } + + this.message = null; + + this.id = null; + + this.location = {}; + this.location.x = null; + this.location.y = null; + + this.srs = null; + + this.geometry = null; + + this.time = null; + + this.distance = null; +} + +ProcessIsoCurveResponse.prototype = { + + constructor : ProcessIsoCurveResponse + +}; + +/* harmony default export */ __webpack_exports__["default"] = (ProcessIsoCurveResponse); + + +/***/ }), +/* 98 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37); +/* harmony import */ var _Common_Controls_LocationSelectorDOM__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99); +/* harmony import */ var _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(101); +/* harmony import */ var _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(102); +/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(100); + + + + + + + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__["default"].getLogger("locationselector"); + +/** +* @classdesc +* +* LocationSelector Control. +* +* @private +* @constructor LocationSelector +* @alias LocationSelector +* @extends {L.Control} +* LocationSelector component. Enables to select a location, using autocompletion or picking location on the map +* @param {Object} [options] - component options +* @param {Boolean} [options.displayInfo = true] - whether to display info in a popup or not (not implemented yet) Default is true +* @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding. +* @param {Object} [options.tag] - tag options +* @param {Number} [options.tag.id = 0] - order id number in a locations group, in case several LocationSelector are used. For instance in route case : departure tag id should be 0, arrival tag id should be 1, and other ones : 2, 3, ... +* @param {Number} [options.tag.unique = null] - locationSelector global component id (in case locationSelector is called by another graphic component, e.g. route control) +* @param {String} [options.tag.label = ">"] - text to display in component (e.g. "Departure"). Default is ">" +* @param {String} [options.tag.color = blue] - color of marker (blue, green, orange and red) +* @param {Boolean} [options.tag.display = true] - whether to display or hide component. Default is true +* @param {Boolean} [options.tag.addOption = false] - whether to display picto to add another LocationSelector (in case of route control) +* @param {Boolean} [options.tag.removeOption = false] - whether to display picto to remove a LocationSelector (in case of route control) +* @param {Object} [options.autocompleteOptions] - autocomplete service options +* @param {Object} [options.reverseGeocodeOptions] - reverse geocoding service options + +* @example +* var point = L.geoportalControl.LocationSelector({ +* }); +*/ +var LocationSelector = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends LocationSelector.prototype */{ + includes: _Common_Controls_LocationSelectorDOM__WEBPACK_IMPORTED_MODULE_4__["default"], + /** + * options by default + * + * @private + */ + options: { + position: "topleft", + tag: { + id: 0, + // numero d'ordre sur un groupe de locations ! + unique: null, + // numero unique pour tous les locations d'un groupe ! + label: ">", + color: "blue", + display: true, + addOption: false, + removeOption: false + }, + disableReverse: false, + // on l'active par defaut ! + displayInfo: true, + autocompleteOptions: {}, + reverseGeocodeOptions: {} + }, + /** + * constructor + * (extend to L.Control) + * + * @param {Object} options - options of component + * @param {String} [options.position] - position of component into a map. + * @param {Object} [options.tag] - options ... + * @param {Object} [options.autocompleteOptions] - autocomplete service options + * @param {Object} [options.reverseGeocodeOptions] - reverse geocoding service options + * + * @private + */ + initialize: function initialize(options) { + // FIXME pb de merge sur tag:{} !? + // on transmet les options au controle + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.setOptions(this, options); + + /** uuid */ + this._uid = this.options.tag.unique || null; + + /** mode drag&drop */ + this._activeDragAndDrop = false; + this._pressedKeyOnDragAndDrop = false; + + /** container map */ + this._map = null; + + /** container principal des entrées */ + this._inputsContainer = null; + + /** container du label du point */ + this._inputLabelContainer = null; + + /** container de la saisi de l'autocompletion */ + this._inputAutoCompleteContainer = null; + + /** container du pointer de saisi sur la carte */ + this._inputShowPointerContainer = null; + + /** container des coordonnées */ + this._inputCoordinateContainer = null; + + /** + * coordonnées du point selectionné + * Ces dernieres sont envoyées à l'API service IGN, + */ + this._coordinate = null; + + /** container des reponses de l'autocompletion */ + this._suggestedContainer = null; + + /** listes des reponses de l'autocompletion */ + this._suggestedLocations = []; + + /** localisant */ + this._currentLocation = null; + + /** marker */ + this._marker = null; + + /** ressources du services d'autocompletion et geocodage inverse (ayant droit!) */ + this._resources = {}; + + // creation du DOM dans le constructeur uniquement si ce composant + // est appelé par un autre composant graphique + this._container = this._uid ? this._initLayout() : null; + }, + // ################################################################### // + // ################## handlers for display graphic ################### // + // ################################################################### // + + /** + * this method is called by this.addTo(map) + * and fills variable : this._container = this.onAdd(map) + * + * @returns {DOMElement} DOM element + * @private + */ + onAdd: function onAdd( /* map */ + ) { + // si on ajout ce composant à la carte en tant que objet graphique, + // un uuid doit être generé automatiquement ! + this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__["default"].generate(); + + // DOM du composant + var container = this._initLayout(); + + // deactivate of events that may interfere with the map + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container); + return container; + }, + /** + * this method is called when the control is removed from the map + * and removes events on map. + * + * @private + */ + onRemove: function onRemove( /* map */) {}, + // ################################################################### // + // ########################## publics methods ######################## // + // ################################################################### // + + /** + * get coordinate + * @returns {Object} Coordinate + */ + getCoordinate: function getCoordinate() { + return this._coordinate; + }, + /** + * set coordinate : {lon,lat || x,y || N,E} + * @param {Object} coordinate - Coordinate + */ + setCoordinate: function setCoordinate(coordinate) { + this._displayResultOfCoordinate(coordinate); + }, + /** + * set map + * + * @param {Object} map - the map + */ + setMap: function setMap(map) { + if (!this._map) { + this._map = map; + } + }, + /** + * clean + */ + clear: function clear() { + this._setCursor(); + this._setMarker(); + this._clearResults(); + this._inputLabelContainer.click(); + }, + /** + * disable/enable the drag&drop mode + * + * @param {Boolean} active - true:enable | false:disable + */ + dragging: function dragging(active) { + if (this._marker) { + if (active) { + this._marker.dragging.enable(); + } else { + this._marker.dragging.disable(); + } + } + }, + // ################################################################### // + // ########################## pivates methods ######################## // + // ################################################################### // + + /** + * this method is called by this.onAdd(map) + * and initialize the container HTMLElement + * + * @returns {DOMElement} DOM element + * + * @private + */ + _initLayout: function _initLayout() { + var id = this.options.tag.id; + + // create main container + var container = this._createMainContainerElement(); + var inputs = this._inputsContainer = this._createLocationPointElement(id, this.options.tag.display); + container.appendChild(inputs); + var _inputLabel = this._inputLabelContainer = this._createLocationPointLabelElement(id, this.options.tag.label); + inputs.appendChild(_inputLabel); + var _inputAutoComplete = this._inputAutoCompleteContainer = this._createLocationAutoCompleteteInputElement(id); + inputs.appendChild(_inputAutoComplete); + var _inputCoordinate = this._inputCoordinateContainer = this._createLocationCoordinateInputElement(id); + inputs.appendChild(_inputCoordinate); + var _inputShowPointer = this._inputShowPointerContainer = this._createLocationPointerShowInputElement(id); + inputs.appendChild(_inputShowPointer); + var _inputPointer = this._createLocationPointerInputElement(id); + inputs.appendChild(_inputPointer); + if (this.options.tag.addOption) { + var _inputAddStage = this._createLocationAddPointElement(); + inputs.appendChild(_inputAddStage); + } + if (this.options.tag.removeOption) { + var _inputRemoveStage = this._createLocationRemovePointElement(id); + inputs.appendChild(_inputRemoveStage); + } + var results = this._suggestedContainer = this._createLocationAutoCompleteResultElement(id); + container.appendChild(results); + return container; + }, + // ################################################################### // + // ################# privates methods use by events ################## // + // ################################################################### // + + /** + * this sends the label to the panel. + * + * @param {String} label - label suggested location + * + * @private + */ + _setLabel: function _setLabel(label) { + this._inputAutoCompleteContainer.value = label || ""; + }, + /** + * this sends the coordinates to the panel. + * + * @param {Object} oLatLng - geographic coordinate (L.LatLng) + * + * @private + */ + _setCoordinate: function _setCoordinate(oLatLng) { + // structure + // L.LatLng + // lat: 4.07249425916745 + // lng: 2.4609375 + + // FIXME les coordonnées en lat/lon sur du EPSG:4326 ! + // Mais règle sur les services : X -> LON et Y -> LAT + this._coordinate = oLatLng; + var lat = null; + var lng = null; + + // decimal by default ! + lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__["default"].roundToDecimal(oLatLng.lat, 4); + lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__["default"].roundToDecimal(oLatLng.lng, 4); + + // on envoie du lon/lat à l'affichage + var value = lng + " , " + lat; + this.GPdisplayCoordinate(value); + }, + /** + * this method is called by this.on*ResultsItemClick() + * and move/zoom on a position. + * + * @param {Object} position - {lon: ..., lat: ...} + * + * @private + */ + _setPosition: function _setPosition(position) { + logger.log("_setPosition()", position); + var map = this._map; + // TODO zoom + // map.setZoomAround(L.latLng(position), map.getMaxZoom(), true); + // FIXME on veut du lat/lon sur Leaflet donc on inverse ! + map.panTo(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(position)); + }, + /** + * this method is called by this.on*ResultsItemClick() + * and displays a marker. + * FIXME : marker IGN et informations ? + * + * @param {Object} position - position {lon: ..., lat: ...} + * @param {Object|String} information - suggested or geocoded information + * @param {Boolean} display - display a popup information + * + * @private + */ + _setMarker: function _setMarker(position, information, display) { + logger.log("_setMarker()", position, information, display); + + // sur du drag&drop, on garde le même marker ! + if (this._activeDragAndDrop) { + return; + } + var map = this._map; + // on supprime le marker, ainsi que les events + // sur le drag&drop + if (this._marker != null) { + this._marker.off("mousedown", this.onMouseDownMarker, this); + this._marker.off("dragstart", this.onStartDragMarker, this); + this._marker.off("drag", this.onDragMarker, this); + this._marker.off("dragend", this.onEndDragMarker, this); + map.removeLayer(this._marker); + this._marker = null; + } + if (position) { + // cf. http://leafletjs.com/reference.html#marker-options + var options = { + icon: new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__["default"](this.options.tag.color), + draggable: true, + clickable: true, + zIndexOffset: 1000 + }; + + // FIXME on veut du lat/lon sur Leaflet donc on inverse ! + this._marker = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.marker(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(position), options); + this._marker.on("mousedown", this.onMouseDownMarker, this); + this._marker.on("dragstart", this.onStartDragMarker, this); + this._marker.on("drag", this.onDragMarker, this); + this._marker.on("dragend", this.onEndDragMarker, this); + // this._marker.on("movestart", this.onStartMoveMarker, this); + // this._marker.on("move", this.onMoveMarker, this); + // this._marker.on("moveend", this.onEndMoveMarker, this); + + this._marker.addTo(map); + + // FIXME + // doit on mettre une information + // - correctement construite ? + // - uniquement informatif ? + // - RIEN ? + if (display) { + var popupContent = null; + if (typeof information !== "string") { + if (information.service === "GeocodedLocation") { + popupContent = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_7__["default"].getGeocodedLocationFreeform(information.location); + } else if (information.service === "SuggestedLocation") { + popupContent = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_7__["default"].getSuggestedLocationFreeform(information.location); + } else { + popupContent = "sans informations."; + } + } else { + popupContent = information; + } + this._marker.bindPopup(popupContent); + } + } + }, + /** + * this method is called by this.on() + * and change the cursor of the map when entering a point. + * + * @param {String} cursor - cursor style + * + * @private + */ + _setCursor: function _setCursor(cursor) { + var div = this._map.getContainer(); + if (cursor) { + div.style.cursor = cursor; + } else { + div.style.cursor = null; + } + }, + /** + * this method is called by this.() + * and it clears all results and the marker. + * + * @private + */ + _clearResults: function _clearResults() { + this._currentLocation = null; + this._coordinate = null; + this._clearSuggestedLocation(); + }, + /** + * this method is called by this.onAutoCompleteSearchText() + * and it clears all suggested location. + * + * @private + */ + _clearSuggestedLocation: function _clearSuggestedLocation() { + // suppression du dom + this._suggestedLocations = []; + if (this._suggestedContainer) { + while (this._suggestedContainer.firstChild) { + this._suggestedContainer.removeChild(this._suggestedContainer.firstChild); + } + } + }, + // ################################################################### // + // ############## privates methods use by autocomplete ############### // + // ################################################################### // + + /** + * this method is called by this.onAutoCompleteSearch() + * and executes a request to the service. + * + * @param {Object} settings - service settings + * @param {String} settings.text - text + * @param {Function} settings.onSuccess - callback + * @param {Function} settings.onFailure - callback + * + * @private + */ + _requestAutoComplete: function _requestAutoComplete(settings) { + logger.log("_requestAutoComplete()", settings); + + // on ne fait pas de requête si on n'a pas renseigné de parametres ! + if (!settings || Object.keys(settings).length === 0) { + return; + } + + // on ne fait pas de requête si la parametre 'text' est vide ! + if (!settings.text) { + return; + } + logger.log(settings); + var options = {}; + // on recupere les options du service + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.autocompleteOptions); + // ainsi que la recherche et les callbacks + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, settings); + + // cas où la clef API n'est pas renseignée dans les options du service, + // celle renseignée au niveau du controle ou la clé "calcul" par défaut + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + apiKey: options.apiKey || this.options.apiKey + }); + logger.log(options); + geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__["default"].Services.autoComplete(options); + }, + /** + * this method is called by this.onAutoCompleteSearchText() + * and fills the container of the location list. + * it creates a HTML Element per location + * (cf. this. ...) + * + * @param {Object[]} locations - locations + * + * @private + */ + _fillAutoCompletedLocationListContainer: function _fillAutoCompletedLocationListContainer(locations) { + logger.log("_fillAutoCompletedLocationListContainer()", locations); + if (!locations || locations.length === 0) { + return; + } + + // on vide la liste avant de la construire + var element = this._suggestedContainer; + if (element.childElementCount) { + while (element.firstChild) { + element.removeChild(element.firstChild); + } + } + for (var i = 0; i < locations.length; i++) { + // Proposals are dynamically filled in Javascript by autocomplete service + this._createLocationAutoCompletedLocationElement(this.options.tag.id, locations[i], i); + } + + // sauvegarde de l'etat des locations + this._suggestedLocations = locations; + }, + // ################################################################### // + // ################# privates methods use by reverse ################# // + // ################################################################### // + + /** + * this method is called by this.onMouseMapClick() or this.onEndDragMarker() + * and executes a request to the service. + * + * @param {Object} settings - service settings + * @param {String} settings.position - position + * @param {Function} settings.onSuccess - callback + * @param {Function} settings.onFailure - callback + * + * @private + */ + _requestReverseGeocode: function _requestReverseGeocode(settings) { + logger.log("_requestReverseGeocode()", settings); + + // on ne fait pas de requête si on n'a pas renseigné de parametres ! + if (!settings || Object.keys(settings).length === 0) { + return; + } + + // on ne fait pas de requête si la parametre 'position' est vide ! + if (!settings.searchGeometry || Object.keys(settings.searchGeometry).length === 0) { + return; + } + var options = {}; + // on recupere les options du service + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.reverseGeocodeOptions); + + // ainsi que la positions et les callbacks + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, settings); + + // on force qq options ! + // La table de geocodage est toujours par defaut : StreetAddress ! + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + returnFreeForm: true, + // FIXME cette option n'est pas implementée !? + index: "StreetAddress" + }); + + // cas où la clef API n'est pas renseignée dans les options du service, + // on utilise celle renseignée au niveau du controle + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + apiKey: options.apiKey || this.options.apiKey + }); + logger.log(options); + geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__["default"].Services.reverseGeocode(options); + }, + /** + * display Coordinate on panel, and places the marker on map + * + * @param {Object} oLatLng - geographic coordinate (L.LatLng) + * @private + */ + _displayResultOfCoordinate: function _displayResultOfCoordinate(oLatLng) { + // on transmet les coordonnées au panneau + this._setCoordinate(oLatLng); + + // on met en place le marker + this._setMarker(oLatLng, null, false); + logger.log(this.getCoordinate()); + + // on desactive l'event sur la map en activant le gestionnaire ! + this.onActivateMapPointClick(); + }, + /** + * display Label on panel, and places the marker on map + * + * @param {Object} oLocation - location Object + * @private + */ + _displayResultOfLabel: function _displayResultOfLabel(oLocation) { + // FIXME Le service est intérrogé en SRS EPSG:4326 par defaut, + // donc on récupère du lat/lon en reponse. + // mais on inverse car on souhaite transmettre des coordonnées en lon/lat... + + // FIXME on construit une addresse car l'option freeForm ne semble pas + // être fonctionnelle... + var label = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_7__["default"].getGeocodedLocationFreeform(oLocation); + + // on transmet les coordonnées au panneau, + // même si on ne les affiche pas... + this._setCoordinate({ + lat: oLocation.position.lat, + lng: oLocation.position.lon + }); + + // on transmet le texte au panneau + this._setLabel(label); + var info = { + service: "GeocodedLocation", + location: oLocation + }; + + // on met en place le marker + this._setMarker(oLocation.position, info, true); + this._inputShowPointerContainer.checked = false; + this._inputAutoCompleteContainer.className = "GPlocationOriginVisible"; + this._inputCoordinateContainer.className = "GPlocationOriginHidden"; + + // on desactive l'event sur la map en activant le gestionnaire ! + this.onActivateMapPointClick(); + }, + // ################################################################### // + // ###################### handlers events (dom) ###################### // + // ################################################################### // + + /** + * this method is called by event 'keyup' on 'GPLocationOrigin' tag input + * (cf. this.), and it gets the value of input. + * this value is passed as a parameter for the service autocomplete (text). + * the results of the request are displayed into a drop down menu. + * FIXME + * + * @param {Object} e - HTMLElement + * + * @private + */ + onAutoCompleteSearchText: function onAutoCompleteSearchText(e) { + logger.log("onAutoCompleteSearchText()", e); + var value = e.target.value; + if (!value) { + return; + } + + // on sauvegarde le localisant + this._currentLocation = value; + + // on limite les requêtes à partir de 3 car. saisie ! + if (value.length < 3) { + return; + } + + // INFORMATION + // on effectue la requête au service d'autocompletion. + // on met en place des callbacks afin de recuperer les resultats ou + // les messages d'erreurs du service. + // les resultats sont affichés dans une liste deroulante. + var context = this; + this._requestAutoComplete({ + text: value, + maximumResponses: 5, + // FIXME je limite le nombre de reponse car le container DOM est limité dans l'affichage !!! + // callback onSuccess + onSuccess: function onSuccess(results) { + logger.log(results); + if (results) { + var locations = results.suggestedLocations; + context._fillAutoCompletedLocationListContainer(locations); + } + }, + // callback onFailure + onFailure: function onFailure(error) { + // FIXME + // où affiche t on les messages : ex. 'No suggestion matching the search' ? + // doit on nettoyer la liste des suggestions dernierement enregistrée : + context._clearSuggestedLocation(); + logger.log(error.message); + } + }); + }, + /** + * this method is called by event 'click' on 'GPautoCompleteResultsList' tag div + * (cf. this._createAutoCompleteListElement), and it selects the location. + * this location displays a marker on the map. + * FIXME + * TODO + * + * @param {Object} e - HTMLElement + * + * @private + */ + onAutoCompletedResultsItemClick: function onAutoCompletedResultsItemClick(e) { + logger.log("onAutoCompletedResultsItemClick()", e); + var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__["default"].index(e.target.id); + logger.log(idx); + logger.log(this._suggestedLocations[idx]); + if (!idx) { + return; + } + var position = { + lon: this._suggestedLocations[idx].position.x, + // LON ! + lat: this._suggestedLocations[idx].position.y // LAT ! + }; + + var info = { + service: "SuggestedLocation", + location: this._suggestedLocations[idx] + }; + var label = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_7__["default"].getSuggestedLocationFreeform(this._suggestedLocations[idx]); + this._setLabel(label); + this._setPosition(position); + this._setMarker(position, info, this.options.displayInfo); + + // on sauvegarde le point courant + this._coordinate = position; + }, + /** + * this method is called by event 'click' on '' tag input + * (cf. this.), and it create or remove the event of click map. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onActivateMapPointClick: function onActivateMapPointClick(e) { + logger.trace("onActivateMapPointClick()", e); + var map = this._map; + if (this._inputShowPointerContainer.checked) { + if (!this._activeDragAndDrop) { + map.on("click", this.onMouseMapClick, this); + // on change le curseur + this._setCursor("crosshair"); + // on supprime le marker + this._setMarker(); + // on efface l'ancien resultat + this._clearResults(); + } + } else { + if (!this._activeDragAndDrop) { + map.off("click", this.onMouseMapClick, this); + // on retablie le curseur d'origine + this._setCursor(); + } + } + }, + /** + * this method is called by event 'click' on '(n)' tag label + * (cf. this.). + * this point is erased. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onLocationClearPointClick: function onLocationClearPointClick(e) { + logger.log("onLocationClearPointClick", e); + this._setCursor(); + this._setMarker(); + this._clearResults(); + this._inputAutoCompleteContainer.focus(); + }, + /** + * this method is called by event 'click' on '(n)' tag input + * (cf. this.). + * this point is deleted. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onLocationRemovePointClick: function onLocationRemovePointClick(e) { + logger.log("onLocationRemovePointClick", e); + this._setCursor(); + this._setMarker(); + this._clearResults(); + }, + /** + * TODO this method is called by event 'click' on '(n)' tag input + * (cf. this.). + * this point is added as a parameter for the service Location. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onLocationAddPointClick: function onLocationAddPointClick(e) { + logger.log("onLocationAddPointClick", e); + }, + // ################################################################### // + // #################### handlers events (control) #################### // + // ################################################################### // + + /** + * this method is called by event 'click' on map + * (cf. this.onLocationMapPointClick), and it gets the coordinate of click on map. + * this point is saved as a parameter for the service Location. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onMouseMapClick: function onMouseMapClick(e) { + logger.log("onMouseMapClick", e); + + // les coordonnées + var oLatLng = e.latlng; + + // si le geocodage inverse est desactivé, + // on transmet les coordonnées au panneau, + // sinon, on transmet la reponse du service + if (this.options.disableReverse) { + // on transmet les coordonnées au panneau, puis on place le marker + this._displayResultOfCoordinate(oLatLng); + } else { + // contexte + var self = this; + + // on realise une requête au service, si la reponse est vide ou + // en échec, on transmet les coordonnées ! + this._requestReverseGeocode({ + searchGeometry: { + type: "Circle", + coordinates: [oLatLng.lng, oLatLng.lat], + radius: 50 + }, + maximumResponses: 1, + // callback onSuccess + onSuccess: function onSuccess(results) { + logger.log(results); + if (results.locations.length !== 0) { + var oLocation = results.locations[0]; + self._displayResultOfLabel(oLocation); + } else { + self._displayResultOfCoordinate(oLatLng); + } + }, + // callback onFailure + onFailure: function onFailure(error) { + logger.log(error.message); + self._displayResultOfCoordinate(oLatLng); + } + }); + } + }, + /** + * this method is called by event 'startdrag' on marker + * and it initializes the drag&drop. + * + * @private + */ + onStartDragMarker: function onStartDragMarker() { + if (!this._marker) { + return; + } + this._activeDragAndDrop = true; + this._inputShowPointerContainer.checked = true; + this._inputAutoCompleteContainer.className = "GPlocationOriginHidden"; + this._inputCoordinateContainer.className = "GPlocationOriginVisible"; + this._marker.unbindPopup(); + this._setLabel(); + this._clearResults(); + }, + /** + * this method is called by event 'drag' on marker + * and it updates the panel of coordinate. + * + * @private + */ + onDragMarker: function onDragMarker() { + if (!this._marker) { + return; + } + this._activeDragAndDrop = false; + this._inputShowPointerContainer.checked = true; + + // on transmet les coordonnées au panneau + var oLatLng = this._marker.getLatLng(); + this._setCoordinate(oLatLng); + }, + /** + * this method is called by event 'enddrag' on marker + * and it finishes the drag&drop. + * this point is saved as a parameter for the service Location. + * + * @private + */ + onEndDragMarker: function onEndDragMarker() { + if (!this._marker) { + return; + } + this._inputShowPointerContainer.checked = true; + var oLatLng = this._marker.getLatLng(); + if (this._pressedKeyOnDragAndDrop) { + // on transmet les coordonnées au panneau + this._setCoordinate(oLatLng); + } else { + logger.log("No key pressed, so autocomplete solution !"); + this.onMouseMapClick({ + latlng: oLatLng + }); + } + + // init + this._activeDragAndDrop = false; + this._pressedKeyOnDragAndDrop = false; + }, + /** + * this method is called by event 'mousedown' on marker.. + * this event gets the pressed key code. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onMouseDownMarker: function onMouseDownMarker(e) { + if (!this._marker) { + return; + } + this._pressedKeyOnDragAndDrop = e.originalEvent.ctrlKey; + } +}); +/* harmony default export */ __webpack_exports__["default"] = (LocationSelector); + +/***/ }), +/* 99 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35); +/* harmony import */ var _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(100); + + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__["default"].getLogger("LocationSelectorDOM"); +var LocationSelectorDOM = { + /** + * Add uuid to the tag ID + * @param {String} id - id selector + * @returns {String} uid - id selector with an unique id + */ + _addUID: function _addUID(id) { + var uid = this._uid ? id + "-" + this._uid : id; + return uid; + }, + /** + * Main container (DOM) + * + * @returns {DOMElement} DOM element + */ + _createMainContainerElement: function _createMainContainerElement() { + var container = document.createElement("div"); + container.className = this._addUID("GPlocationPoint"); // ceci permet de gerer les groupes de points ! + container.className += " GPwidget"; + return container; + }, + /** + * Create Container Point + * see event ! + * + * @param {Number} id - tag ID + * @param {Number} display - display + * @returns {DOMElement} DOM element + */ + _createLocationPointElement: function _createLocationPointElement(id, display) { + var div = document.createElement("div"); + div.id = this._addUID("GPlocationPoint_" + id); + div.className = display ? "GPflexInput GPlocationStageFlexInput" : "GPflexInput GPlocationStageFlexInputHidden"; + div.style.cssText = ""; + return div; + }, + /** + * Create Container Point + * see event ! + * + * @param {Number} id - tag ID + * @param {String} text - label + * @returns {DOMElement} DOM element + */ + _createLocationPointLabelElement: function _createLocationPointLabelElement(id, text) { + // contexte d'execution + var self = this; + var labelOrigin = document.createElement("label"); + labelOrigin.id = this._addUID("GPlocationOriginLabel_" + id); + labelOrigin.htmlFor = this._addUID("GPlocationOrigin_" + id); + labelOrigin.innerHTML = text; + labelOrigin.addEventListener("click", function (e) { + var i = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(this.id); + var points = document.getElementsByClassName(self._addUID("GPlocationPoint")); + for (var j = 0; j < points.length; j++) { + var tag = points[j].childNodes[0].id; + var id = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(tag); + document.getElementById(self._addUID("GPlocationPoint_" + id)).style.cssText = ""; + } + document.getElementById(self._addUID("GPlocationOriginCoords_" + i)).value = ""; + document.getElementById(self._addUID("GPlocationOrigin_" + i)).value = ""; + document.getElementById(self._addUID("GPlocationPoint_" + i)).style.cssText = ""; + document.getElementById(self._addUID("GPlocationOriginPointer_" + i)).checked = false; + document.getElementById(self._addUID("GPlocationOrigin_" + i)).className = "GPlocationOriginVisible"; + document.getElementById(self._addUID("GPlocationOriginCoords_" + i)).className = "GPlocationOriginHidden"; + if (document.getElementById(self._addUID("GPlocationStageRemove_" + i))) { + document.getElementById(self._addUID("GPlocationStageRemove_" + i)).className = "GPlocationStageRemove"; + } + if (document.getElementById(self._addUID("GPlocationStageAdd"))) { + document.getElementById(self._addUID("GPlocationStageAdd")).className = ""; + } + // document.getElementById(self._addUID("GPlocationOriginCoords_" + i)).disabled = true; + self.onLocationClearPointClick(e); + }); + return labelOrigin; + }, + /** + * Create Input AutoComplete Point tag + * + * @param {Number} id - tag ID + * @returns {DOMElement} DOM element + */ + _createLocationAutoCompleteteInputElement: function _createLocationAutoCompleteteInputElement(id) { + // contexte d'execution + var self = this; + var inputOrigin = document.createElement("input"); + inputOrigin.id = this._addUID("GPlocationOrigin_" + id); + inputOrigin.className = "GPlocationOriginVisible"; + inputOrigin.type = "text"; + inputOrigin.placeholder = "Saisir une adresse"; + inputOrigin.autocomplete = "off"; + inputOrigin.addEventListener("keyup", function (e) { + var charCode = e.which || e.keyCode; + if (charCode === 13 || charCode === 10 || charCode === 38 || charCode === 40) { + return; + } + var i = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(this.id); + if (document.getElementById(self._addUID("GPlocationOrigin_" + i)).value.length > 2) { + document.getElementById(self._addUID("GPlocationAutoCompleteList_" + i)).style.display = "block"; + } else { + document.getElementById(self._addUID("GPlocationAutoCompleteList_" + i)).style.display = "none"; + } + // gestionnaire d'evenement : + // on récupère la valeur de saisie pour une requête sur le service d'autocompletion. + // le resultat de la requête nous permet de recuperer les coordonnées du point... + self.onAutoCompleteSearchText(e); + }); + inputOrigin.addEventListener("keydown", function (e) { + var charCode = e.which || e.keyCode; + var container = document.getElementById(self._addUID("GPlocationAutoCompleteList_" + id)); + + // si aucun container !? + if (!container) { + return; + } + var curr = container.getElementsByClassName("GPautoCompleteProposal current"); + var list = container.getElementsByClassName("GPautoCompleteProposal"); + + // si aucune suggestion, on ne va pas plus loin ! + var length = list.length; + if (!length) { + return; + } + var current = null; + + // si aucun item courant, on prend le 1er ! + if (!curr.length) { + current = list[0]; + current.className = "GPautoCompleteProposal current"; + current.style.color = "#000000"; + current.style["background-color"] = "#CEDBEF"; + return; + } else { + current = curr[0]; + } + var index = parseInt(_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(current.id), 10); + var next = index === length - 1 ? list[0] : list[index + 1]; + var prev = index === 0 ? list[length - 1] : list[index - 1]; + current.style["background-color"] = ""; + current.style.color = ""; + prev.style["background-color"] = ""; + prev.style.color = ""; + next.style["background-color"] = ""; + next.style.color = ""; + switch (charCode) { + case 38: + // arrow up + logger.log("arrow up"); + current.className = "GPautoCompleteProposal"; + prev.className = "GPautoCompleteProposal current"; + prev.style.color = "#000000"; + prev.style["background-color"] = "#CEDBEF"; + break; + case 40: + // arrow down + logger.log("arrow down"); + current.className = "GPautoCompleteProposal"; + next.className = "GPautoCompleteProposal current"; + next.style.color = "#000000"; + next.style["background-color"] = "#CEDBEF"; + break; + case 13: + // enter + logger.log("enter"); + current.click(e); + break; + } + current.focus(); + }); + return inputOrigin; + }, + /** + * Create Input Coordinate Point tag + * + * @param {Number} id - tag ID + * @returns {DOMElement} DOM element + */ + _createLocationCoordinateInputElement: function _createLocationCoordinateInputElement(id) { + // contexte d'execution + var self = this; + var inputOriginCoord = document.createElement("input"); + inputOriginCoord.id = this._addUID("GPlocationOriginCoords_" + id); + inputOriginCoord.className = "GPlocationOriginHidden"; + inputOriginCoord.type = "text"; + inputOriginCoord.disabled = false; + inputOriginCoord.addEventListener("click", function () { + var i = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(this.id); + document.getElementById(self._addUID("GPlocationOriginLabel_" + i)).click(); + }); + return inputOriginCoord; + }, + /** + * Create Show Pointer tag + * + * @param {Number} id - tag ID + * @returns {DOMElement} DOM element + */ + _createLocationPointerShowInputElement: function _createLocationPointerShowInputElement(id) { + var inputOriginPointer = document.createElement("input"); + inputOriginPointer.id = this._addUID("GPlocationOriginPointer_" + id); + inputOriginPointer.type = "checkbox"; + return inputOriginPointer; + }, + /** + * Create Input Pointer tag + * + * @param {Number} id - tag ID + * @returns {DOMElement} DOM element + */ + _createLocationPointerInputElement: function _createLocationPointerInputElement(id) { + // contexte d'execution + var self = this; + var labelOriginPointer = document.createElement("label"); + labelOriginPointer.id = this._addUID("GPlocationOriginPointerImg_" + id); + labelOriginPointer.htmlFor = this._addUID("GPlocationOriginPointer_" + id); + labelOriginPointer.className = "GPlocationOriginPointerImg"; + labelOriginPointer.title = "Pointer un lieu sur la carte"; + labelOriginPointer.addEventListener("click", function (e) { + e.preventDefault(); + e.stopPropagation(); + var i = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(this.id); + var points = document.getElementsByClassName(self._addUID("GPlocationPoint")); + var j; + var tag; + var id; + for (j = 0; j < points.length; j++) { + tag = points[j].childNodes[0].id; + id = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(tag); + if (i !== id) { + document.getElementById(self._addUID("GPlocationOriginPointer_" + id)).checked = false; + if (document.getElementById(self._addUID("GPlocationOriginCoords_" + id)).value === "Pointer un lieu sur la carte") { + document.getElementById(self._addUID("GPlocationOriginCoords_" + id)).value = ""; + document.getElementById(self._addUID("GPlocationOrigin_" + id)).className = "GPlocationOriginVisible"; + document.getElementById(self._addUID("GPlocationOriginCoords_" + id)).className = "GPlocationOriginHidden"; + } + } + } + if (document.getElementById(self._addUID("GPlocationOriginPointer_" + i)).checked) { + document.getElementById(self._addUID("GPlocationOriginCoords_" + i)).value = ""; + for (j = 0; j < points.length; j++) { + tag = points[j].childNodes[0].id; + id = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(tag); + document.getElementById(self._addUID("GPlocationPoint_" + id)).style.cssText = ""; + } + if (document.getElementById(self._addUID("GPlocationStageRemove_" + i))) { + document.getElementById(self._addUID("GPlocationStageRemove_" + i)).className = "GPlocationStageRemove"; + } + if (document.getElementById(self._addUID("GPlocationStageAdd"))) { + document.getElementById(self._addUID("GPlocationStageAdd")).className = ""; + } + document.getElementById(self._addUID("GPlocationOriginPointer_" + i)).checked = false; + document.getElementById(self._addUID("GPlocationOrigin_" + i)).className = "GPlocationOriginVisible"; + document.getElementById(self._addUID("GPlocationOriginCoords_" + i)).className = "GPlocationOriginHidden"; + } else { + document.getElementById(self._addUID("GPlocationOriginCoords_" + i)).value = "Pointer un lieu sur la carte"; + for (j = 0; j < points.length; j++) { + tag = points[j].childNodes[0].id; + id = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(tag); + if (i === id) { + document.getElementById(self._addUID("GPlocationPoint_" + id)).style.cssText = ""; + } else { + document.getElementById(self._addUID("GPlocationPoint_" + id)).style.display = "none"; + } + } + if (document.getElementById(self._addUID("GPlocationStageRemove_" + i))) { + document.getElementById(self._addUID("GPlocationStageRemove_" + i)).className = "GPlocationOriginHidden"; + } + if (document.getElementById(self._addUID("GPlocationStageAdd"))) { + document.getElementById(self._addUID("GPlocationStageAdd")).className = "GPlocationOriginHidden"; + } + document.getElementById(self._addUID("GPlocationOriginPointer_" + i)).checked = true; + document.getElementById(self._addUID("GPlocationOrigin_" + i)).className = "GPlocationOriginHidden"; + document.getElementById(self._addUID("GPlocationOriginCoords_" + i)).className = "GPlocationOriginVisible"; + document.getElementById(self._addUID("GPlocationOriginCoords_" + i)).disabled = true; + } + // gestionnaire d'evenement : + // on stocke la valeur du point, utilisée pour la requête sur le service de calcul d'itiniraire + self.onActivateMapPointClick(e); + }); + return labelOriginPointer; + }, + /** + * Create Remove Point tag + * see event ! + * + * @param {Number} id - tag ID + * @returns {DOMElement} DOM element + */ + _createLocationRemovePointElement: function _createLocationRemovePointElement(id) { + // contexte d'execution + var self = this; + var divRm = document.createElement("div"); + divRm.id = this._addUID("GPlocationStageRemove_" + id); + divRm.className = "GPlocationStageRemove"; + divRm.title = "Supprimer l'étape"; + divRm.addEventListener("click", function (e) { + var points = document.getElementsByClassName(self._addUID("GPlocationPoint")); + var last = points.length - 1; + var start = points[0].childNodes[0].id; + var end = points[last].childNodes[0].id; + var startID = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(start); + var endID = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(end); + if (id !== startID && id !== endID) { + var i = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(this.id); + document.getElementById(self._addUID("GPlocationPoint_" + i)).className = "GPflexInput GPlocationStageFlexInputHidden"; + document.getElementById(self._addUID("GPlocationOrigin_" + i)).value = ""; + document.getElementById(self._addUID("GPlocationOrigin_" + i)).className = "GPlocationOriginVisible"; + document.getElementById(self._addUID("GPlocationOriginCoords_" + i)).value = ""; + document.getElementById(self._addUID("GPlocationOriginCoords_" + i)).className = "GPlocationOriginHidden"; + document.getElementById(self._addUID("GPlocationStageAdd")).style.display = ""; + // Moving up exclusions picto + // var exclusionsPictoTop = document.getElementById(self._addUID("GPshowLocationExclusionsPicto")).style.top; + // document.getElementById(self._addUID("GPshowLocationExclusionsPicto")).style.top = (parseInt(exclusionsPictoTop) - 33).toString() + "px"; + + // gestionnaire d'evenement : + // on supprime le point, utilisé pour la requête sur le service d'itiniraire + self.onLocationRemovePointClick(e); + } + }); + return divRm; + }, + /** + * Create Add Point tag + * see event ! + * + * @returns {DOMElement} DOM element + */ + _createLocationAddPointElement: function _createLocationAddPointElement() { + // contexte d'execution + var self = this; + var divAdd = document.createElement("div"); + divAdd.id = this._addUID("GPlocationStageAdd"); + divAdd.title = "Ajouter une étape"; + divAdd.addEventListener("click", function (e) { + var lastStage = 1; + var nbStages = 0; + var points = document.getElementsByClassName(self._addUID("GPlocationPoint")); + for (var i = 1; i < points.length - 1; i++) { + var tag = points[i].childNodes[0].id; + var id = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(tag); + if (document.getElementById(self._addUID("GPlocationPoint_" + id))) { + if (document.getElementById(self._addUID("GPlocationPoint_" + id)).className === "GPflexInput GPlocationStageFlexInputHidden") { + if (lastStage === 1) { + lastStage = id; + } + } else { + nbStages++; + } + } + } + // FIXME algo à revoir : lastStage = id hors si id = 300 sur 3 points !? + if (lastStage < points.length) { + document.getElementById(self._addUID("GPlocationPoint_" + lastStage)).className = "GPflexInput GPlocationStageFlexInput"; + // Moving down exclusions picto + // var exclusionsPictoTop = document.getElementById(self._addUID("GPshowLocationExclusionsPicto")).style.top; + // document.getElementById(self._addUID("GPshowLocationExclusionsPicto")).style.top = (parseInt(exclusionsPictoTop) + 33).toString() + "px"; + } + + if (nbStages === 4) { + document.getElementById(self._addUID("GPlocationStageAdd")).style.display = "none"; + } + // gestionnaire d'evenement : + // on ajoute le point, utilisé pour la requête sur le service d'itiniraire + self.onLocationAddPointClick(e); + }); + return divAdd; + }, + /** + * Create Results autocompletion to the point + * see event! + * + * @param {Number} id - tag ID + * @returns {DOMElement} DOM element + */ + _createLocationAutoCompleteResultElement: function _createLocationAutoCompleteResultElement(id) { + // contexte d'execution + var self = this; + var div = document.createElement("div"); + div.id = this._addUID("GPlocationAutoCompleteList_" + id); + div.className = "GPadvancedAutoCompleteList"; + if (div.addEventListener) { + div.addEventListener("click", function (e) { + self.onAutoCompletedResultsItemClick(e); + document.getElementById(self._addUID("GPlocationAutoCompleteList_" + id)).style.display = "none"; + }, false); + } else if (div.attachEvent) { + div.attachEvent("onclick", function (e) { + self.onAutoCompletedResultsItemClick(e); + document.getElementById(self._addUID("GPlocationAutoCompleteList_" + id)).style.display = "none"; + }); + } + return div; + }, + /** + * Autocompletion result to a point. + * Proposals are dynamically filled in Javascript by autocomplete service + * + * TODO formaliser le contenu des reponse + * + * @param {Number} id - tag ID + * @param {Object} location - suggested location result + * @param {Number} n - number of the point + */ + _createLocationAutoCompletedLocationElement: function _createLocationAutoCompletedLocationElement(id, location, n) { + var container = document.getElementById(this._addUID("GPlocationAutoCompleteList_" + id)); + var div = document.createElement("div"); + div.id = this._addUID("AutoCompletedLocation_" + n); + div.className = "GPautoCompleteProposal"; + div.innerHTML = _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_2__["default"].getSuggestedLocationFreeform(location); + container.appendChild(div); + }, + /** + * Display Coordinate + * @param {String} value - a Coordinate + */ + GPdisplayCoordinate: function GPdisplayCoordinate(value) { + var points = document.getElementsByClassName(this._addUID("GPlocationPoint")); + for (var i = 0; i < points.length; i++) { + var tag = points[i].childNodes[0].id; + var id1 = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(tag); + if (document.getElementById(this._addUID("GPlocationOriginPointer_" + id1)).checked) { + document.getElementById(this._addUID("GPlocationOriginCoords_" + id1)).value = value; + document.getElementById(this._addUID("GPlocationOriginCoords_" + id1)).disabled = false; + for (var j = 0; j < points.length; j++) { + tag = points[j].childNodes[0].id; + var id2 = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(tag); + document.getElementById(this._addUID("GPlocationPoint_" + id2)).style.cssText = ""; + if (document.getElementById(this._addUID("GPlocationStageRemove_" + id2))) { + document.getElementById(this._addUID("GPlocationStageRemove_" + id2)).className = "GPlocationStageRemove"; + } + } + document.getElementById(this._addUID("GPlocationOriginPointer_" + id1)).checked = false; + if (document.getElementById(this._addUID("GPlocationStageAdd"))) { + document.getElementById(this._addUID("GPlocationStageAdd")).className = ""; + } + return; + } + } + } +}; +/* harmony default export */ __webpack_exports__["default"] = (LocationSelectorDOM); + +/***/ }), +/* 100 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var GeocodeUtils = { + /** + * Return the freeform of a structured geocoded item + * + * @param {Object} geocodedLocation - Geocoded location + * @returns {String} freeform string + */ + getGeocodedLocationFreeform: function getGeocodedLocationFreeform(geocodedLocation) { + var attributes = geocodedLocation.placeAttributes; + if (attributes.label) { + return attributes.label; + } else if (geocodedLocation.type === "PositionOfInterest") { + return attributes.postcode + " " + attributes.toponym; + } else if (geocodedLocation.type === "StreetAddress") { + return (attributes.housenumber ? attributes.housenumber + " " : "") + attributes.street + " " + (attributes.postcode ? attributes.postcode + ", " : "") + attributes.city; + } else if (geocodedLocation.type === "CadastralParcel") { + return attributes.id; + } else { + return "..."; + } + }, + /** + * Return the freeform of a structured suggested item + * + * @param {Object} suggestedLocation - Suggested location + * @returns {String} freeform string + */ + getSuggestedLocationFreeform: function getSuggestedLocationFreeform(suggestedLocation) { + if (suggestedLocation.fullText) { + return suggestedLocation.fullText; + } else { + var values = []; + values.push(suggestedLocation.street || ""); + values.push(suggestedLocation.postalCode || ""); + values.push(suggestedLocation.commune || ""); + if (suggestedLocation.type === "PositionOfInterest") { + values.push(suggestedLocation.poi || ""); + values.push(suggestedLocation.kind || ""); + } + return values.join(" - "); + } + } +}; +/* harmony default export */ __webpack_exports__["default"] = (GeocodeUtils); + +/***/ }), +/* 101 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** +* implementation : +* cf. http://uihacker.blogspot.fr/2011/07/javascript-formatting-latitudelongitude.html?m=1 +* cf. http://andrew.hedges.name/experiments/convert_lat_long/ +* FIXME formater la sortie +* cf. http://mottie.github.io/javascript-number-formatter/ +* cf. https://github.com/j-/number-formatter +* +*/ +/** ... */ +var PositionFormater = { + /** ... */ + NORTH: "N", + /** ... */ + SOUTH: "S", + /** ... */ + EAST: "E", + /** ... */ + WEST: "O", + /** ... */ + digitSecond: 2, + /** ... */ + digitDecimal: 5, + /** ... */ + digitRadian: 8, + /** + * @param {Number} inputNum -inputNum + * @param {Integer} numPoints - numPoints + * + * @returns {Number} rounded result + */ + roundToDecimal: function roundToDecimal(inputNum, numPoints) { + var multiplier = Math.pow(10, numPoints); + return Math.round(inputNum * multiplier) / multiplier; + }, + /** + * @param {Number} location -location + * + * @returns {Number} location in radian + */ + decimalToRadian: function decimalToRadian(location) { + var d = 0.01745329251994329577; + return this.roundToDecimal(location * d, this.digitRadian); + }, + /** + * @param {Number} location -location + * + * @returns {Number} location in grade + */ + decimalToGrade: function decimalToGrade(location) { + var d = 1.11111111111111111111; + return this.roundToDecimal(location * d, this.digitRadian); + }, + /** + * @param {Number} location -location + * @param {String} hemisphere -hemisphere + * @param {Boolean} obj -specifies if an object must be returned + * + * @returns {String|Object} DMS (String or Object depending on obj parameter value) + */ + decimalToDMS: function decimalToDMS(location, hemisphere, obj) { + if (location < 0) { + location *= -1; // strip dash '-' + } + + var degrees = Math.floor(location); // strip decimal remainer for degrees + var minutesFromRemainder = (location - degrees) * 60; // multiply the remainer by 60 + var minutes = Math.floor(minutesFromRemainder); // get minutes from integer + var secondsFromRemainder = (minutesFromRemainder - minutes) * 60; // multiply the remainer by 60 + var seconds = this.roundToDecimal(secondsFromRemainder, this.digitSecond); // get minutes by rounding to integer + + var dms = degrees + "° " + minutes + "' " + seconds + "\" "; + if (hemisphere) { + dms += hemisphere; + } + if (obj) { + return { + d: degrees, + m: minutes, + s: seconds, + direction: hemisphere + }; + } + return dms; + }, + /** + * @param {Number} location -location + * @param {Boolean} obj -specifies if an object must be returned + * + * @returns {String|Object} DMS (String or Object depending on obj parameter value) + */ + decimalLatToDMS: function decimalLatToDMS(location, obj) { + var hemisphere = location < 0 ? this.SOUTH : this.NORTH; // south if negative + return this.decimalToDMS(location, hemisphere, obj); + }, + /** + * @param {Number} location -location + * @param {Boolean} obj -specifies if an object must be returned + * + * @returns {String|Object} DMS (String or Object depending on obj parameter value) + */ + decimalLonToDMS: function decimalLonToDMS(location, obj) { + var hemisphere = location < 0 ? this.WEST : this.EAST; // west if negative + return this.decimalToDMS(location, hemisphere, obj); + }, + /** + * @param {Number} degrees -degrees + * @param {Number} minutes -minutes + * @param {Number} seconds -seconds + * @param {String} hemisphere -hemisphere + * + * @returns {Number} decimal + */ + DMSToDecimal: function DMSToDecimal(degrees, minutes, seconds, hemisphere) { + var ddVal = degrees + minutes / 60 + seconds / 3600; + ddVal = hemisphere === this.SOUTH || hemisphere === this.WEST ? ddVal * -1 : ddVal; + var decimal = this.roundToDecimal(ddVal, this.digitDecimal); + return decimal; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (PositionFormater); + +/***/ }), +/* 102 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35); + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__["default"].getLogger("icondefault"); + +/** + * @classdesc + * + * **Extends** Leaflet L.Icon.Default native class. + */ +var IconDefault = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Icon.Default.extend( /** @lends IconDefault.prototype */{ + /** + * Liste des icones + * TODO : image retina à convertir en x2... + */ + images: { + retina: { + shadow: "data:image/png;base64,...", + color: { + blue: "data:image/png;base64,...", + orange: "data:image/png;base64,...", + red: "data:image/png;base64,...", + green: "data:image/png;base64,..." + } + }, + shadow: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAYAAACoYAD2AAAC5ElEQVRYw+2YW4/TMBCF45S0S1luXZCABy5CgLQgwf//S4BYBLTdJLax0fFqmB07nnQfEGqkIydpVH85M+NLjPe++dcPc4Q8Qh4hj5D/AaQJx6H/4TMwB0PeBNwU7EGQAmAtsNfAzoZkgIa0ZgLMa4Aj6CxIAsjhjOCoL5z7Glg1JAOkaicgvQBXuncwJAWjksLtBTWZe04CnYRktUGdilALppZBOgHGZcBzL6OClABvMSVIzyBjazOgrvACf1ydC5mguqAVg6RhdkSWQFj2uxfaq/BrIZOLEWgZdALIDvcMcZLD8ZbLC9de4yR1sYMi4G20S4Q/PWeJYxTOZn5zJXANZHIxAd4JWhPIloTJZhzMQduM89WQ3MUVAE/RnhAXpTycqys3NZALOBbB7kFrgLesQl2h45Fcj8L1tTSohUwuxhy8H/Qg6K7gIs+3kkaigQCOcyEXCHN07wyQazhrmIulvKMQAwMcmLNqyCVyMAI+BuxSMeTk3OPikLY2J1uE+VHQk6ANrhds+tNARqBeaGc72cK550FP4WhXmFmcMGhTwAR1ifOe3EvPqIegFmF+C8gVy0OfAaWQPMR7gF1OQKqGoBjq90HPMP01BUjPOqGFksC4emE48tWQAH0YmvOgF3DST6xieJgHAWxPAHMuNhrImIdvoNOKNWIOcE+UXE0pYAnkX6uhWsgVXDxHdTfCmrEEmMB2zMFimLVOtiiajxiGWrbU52EeCdyOwPEQD8LqyPH9Ti2kgYMf4OhSKB7qYILbBv3CuVTJ11Y80oaseiMWOONc/Y7kJYe0xL2f0BaiFTxknHO5HaMGMublKwxFGzYdWsBF174H/QDknhTHmHHN39iWFnkZx8lPyM8WHfYELmlLKtgWNmFNzQcC1b47gJ4hL19i7o65dhH0Negbca8vONZoP7doIeOC9zXm8RjuL0Gf4d4OYaU5ljo3GYiqzrWQHfJxA6ALhDpVKv9qYeZA8eM3EhfPSCmpuD0AAAAASUVORK5CYII=", + color: { + blue: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAGmklEQVRYw7VXeUyTZxjvNnfELFuyIzOabermMZEeQC/OclkO49CpOHXOLJl/CAURuYbQi3KLgEhbrhZ1aDwmaoGqKII6odATmH/scDFbdC7LvFqOCc+e95s2VG50X/LLm/f4/Z7neY/ne18aANCmAr5E/xZf1uDOkTcGcWR6hl9247tT5U7Y6SNvWsKT63P58qbfeLJG8M5qcgTknrvvrdDbsT7Ml+tv82X6vVxJE33aRmgSyYtcWVMqX97Yv2JvW39UhRE2HuyBL+t+gK1116ly06EeWFNlAmHxlQE0OMiV6mQCScusKRlhS3QLeVJdl1+23h5dY4FNB3thrbYboqptEFlphTC1hSpJnbRvxP4NWgsE5Jyz86QNNi/5qSUTGuFk1gu54tN9wuK2wc3o+Wc13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oXbYuW8rhqSfUkkduvCSymsdkRzUUmsvLWWp2o9OYqTsWhRb6pcP+ujyzHi5OTVH/8rXJNkLU9EhOrUCxdNzVw1NUN6ILlmsv2MhxhHcy4KgRPr5awr8Z3ghC7r5Uru3oif8YgWNMAb135ys7I+yYbx4O24aiZt5Ej2JjsvGSkPBKJ5rRHGNlLfuuESESqTP7IiLW+UrxBLG0E+aFW3cOrakZuzG5JsHC4BOKUrpuRM64ojTlB+AhGhOa8tMLpZHanN1FOZ/GEIvBlXYvweBSIk+wJ0q7r/8PejN6c3JdnSCevkZLSgtdhWLsSBLmtYdRD+H+ESKlOHZ8XJqbgaExQC4iWD0+58Zerwra2RbM7B8qX8hK7EiBN0WSPC6OoOun5O2NpbnT78kdXunKlbbOQuVqcPX5YtsqgH636M6bIGYbTj/rN5Trb+VKdHLtqme6s6PfLug9j9D/FCc1g2qf7VAAAAAElFTkSuQmCC" + } + }, + /** + * constructor + * (extend to L.Icon.Default) + * + * @param {String} color - blue, green or red, blue by default. + * @param {Object} options - options of L.Icon + */ + initialize: function initialize(color, options) { + // on merge les options avec celles par defaut + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(this.options, options); + var _color = null; + var _images = /* (L.Browser.retina) ? this.images.retina : */this.images; + switch (color) { + case "red": + _color = _images.color.red; + break; + case "green": + _color = _images.color.green; + break; + case "orange": + _color = _images.color.orange; + break; + case "blue": + _color = _images.color.blue; + break; + default: + _color = _images.color.blue; + } + + // icones classiques + this.options.iconUrl = _color; + this.options.shadowUrl = _images.shadow; + + // icones pour écran Retina + if (leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Browser.retina) { + this.options.iconRetinaUrl = _color; + this.options.shadowRetinaUrl = _images.shadow; + } + }, + /** + * Overload function to ensure compatibility between versions 0.7.X and 1.0.X + * (extend to L.Icon._getIconUrl) + * + * @param {String} name - name + * + * @returns {String} url + * + */ + _getIconUrl: function _getIconUrl(name) { + logger.trace("OVERWRITTEN L.Icon.Default._getIconUrl(" + name + ")"); + return leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Icon.prototype._getIconUrl.call(this, name); + } +}); +/* harmony default export */ __webpack_exports__["default"] = (IconDefault); + +/***/ }), +/* 103 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var IsoDOM = { + /** + * Add uuid to the tag ID + * @param {String} id - id selector + * @returns {String} uid - id selector with an unique id + */ + _addUID: function _addUID(id) { + var uid = this._uid ? id + "-" + this._uid : id; + return uid; + }, + /** + * Main container (DOM) + * + * @returns {DOMElement} DOM element + */ + _createMainContainerElement: function _createMainContainerElement() { + var container = document.createElement("div"); + container.id = this._addUID("GPisochron"); + container.className = "GPwidget"; + return container; + }, + // ################################################################### // + // ################# Methods to display Main Panel ################### // + // ################################################################### // + + /** + * Hidden checkbox for minimizing/maximizing panel + * + * @returns {DOMElement} DOM element + */ + _createShowIsoElement: function _createShowIsoElement() { + var input = document.createElement("input"); + input.id = this._addUID("GPshowIsochron"); + input.type = "checkbox"; + return input; + }, + /** + * Show iso control + * see event ! + * + * @returns {DOMElement} DOM element + */ + _createShowIsoPictoElement: function _createShowIsoPictoElement() { + // contexte d'execution + var context = this; + var label = document.createElement("label"); + label.id = this._addUID("GPshowIsochronPicto"); + label.className = "GPshowAdvancedToolPicto"; + label.htmlFor = this._addUID("GPshowIsochron"); + label.title = "Calculer une isochrone"; + + // gestionnaire d'evenement : + // on ouvre le menu de saisie du calcul d'isochrone + // L'ouverture/Fermeture permet de faire le menage + // (reinitialisation) + if (label.addEventListener) { + label.addEventListener("click", function (e) { + context.onShowIsoPanelClick(e); + }); + } else if (label.attachEvent) { + label.attachEvent("onclick", function (e) { + context.onShowIsoPanelClick(e); + }); + } + var spanOpen = document.createElement("span"); + spanOpen.id = this._addUID("GPshowIsochronOpen"); + spanOpen.className = "GPshowAdvancedToolOpen"; + label.appendChild(spanOpen); + return label; + }, + // ################################################################### // + // ################## Methods to display Inputs Panel ################ // + // ################################################################### // + + /** + * Create Container Panel + * + * FIXME + * don't call this._createIsoPanelHeaderElement + * don't call this._createIsoPanelFormElement + * + * @returns {DOMElement} DOM element + */ + _createIsoPanelElement: function _createIsoPanelElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPisochronPanel"); + div.className = "GPpanel"; + + // div.appendChild(this._createIsoPanelHeaderElement()); + // div.appendChild(this._createIsoPanelFormElement()); + + return div; + }, + /** + * Create Header Panel + * + * @returns {DOMElement} DOM element + */ + _createIsoPanelHeaderElement: function _createIsoPanelHeaderElement() { + var self = this; + var container = document.createElement("div"); + container.className = "GPpanelHeader"; + var div = document.createElement("div"); + div.className = "GPpanelTitle"; + div.innerHTML = "Calcul d'isochrone"; + container.appendChild(div); + + // on desactive l'impl. reduction de la fenetre + // var divReduce = document.createElement("div"); + // divReduce.id = this._addUID("GPisochronPanelReduce"); + // divReduce.className = "GPpanelReduce"; + // divReduce.title = "Masquer le panneau"; + // + // if (divReduce.addEventListener) { + // divReduce.addEventListener("click", function () { + // if ( typeof self.onReduceIsoPanelClick === "function") { + // document.getElementById(self._addUID("GPshowIsochron")).checked = false; + // self.onReduceIsoPanelClick(); + // } + // }, false); + // } else if (divReduce.attachEvent) { + // divReduce.attachEvent("onclick", function () { + // if ( typeof self.onReduceIsoPanelClick === "function") { + // document.getElementById(self._addUID("GPshowIsochron")).checked = false; + // self.onReduceIsoPanelClick(); + // } + // }); + // } + // container.appendChild(divReduce); + + var divClose = document.createElement("div"); + divClose.id = this._addUID("GPisochronPanelClose"); + divClose.className = "GPpanelClose"; + divClose.title = "Fermer le panneau"; + + // Link panel close / visibility checkbox + if (divClose.addEventListener) { + divClose.addEventListener("click", function () { + document.getElementById(self._addUID("GPshowIsochronPicto")).click(); + }, false); + } else if (divClose.attachEvent) { + divClose.attachEvent("onclick", function () { + document.getElementById(self._addUID("GPshowIsochronPicto")).click(); + }); + } + container.appendChild(divClose); + return container; + }, + /** + * Create Form + * see evenement ! + * + * @returns {DOMElement} DOM element + */ + _createIsoPanelFormElement: function _createIsoPanelFormElement() { + // contexte d'execution + var self = this; + var form = document.createElement("form"); + form.id = this._addUID("GPisochronForm"); + form.addEventListener("submit", function (e) { + e.preventDefault(); + self.onIsoComputationSubmit(e); + return false; + }); + return form; + }, + /** + * Create Waiting Panel + * + * @returns {DOMElement} DOM element + */ + _createIsoWaitingElement: function _createIsoWaitingElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPisochronCalcWaitingContainer"); + div.className = "GPisochronCalcWaitingContainerHidden"; + var p = document.createElement("p"); + p.className = "GPisochronCalcWaiting"; + p.innerHTML = "Calcul en cours..."; + div.appendChild(p); + return div; + }, + // ################################################################### // + // ############# Methods to the type choice into form ################ // + // ################################################################### // + + /** + * Create Container to type choice + * + * FIXME + * don't call this._createIsoPanelFormTypeChoiceChronElement + * don't call this._createIsoPanelFormTypeChoiceDistElement + * + * @returns {DOMElement} DOM element + */ + _createIsoPanelFormTypeChoiceElement: function _createIsoPanelFormTypeChoiceElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPisochronChoice"); + + // div.appendChild(this._createIsoPanelFormTypeChoiceChronElement()); + // div.appendChild(this._createIsoPanelFormTypeChoiceDistElement()); + + return div; + }, + /** + * Create Type choice Chron + * see event ! + * FIXME event not useful + * @param {Boolean} checked - checked + * @returns {DOMElement} DOM element + */ + _createIsoPanelFormTypeChoiceChronElement: function _createIsoPanelFormTypeChoiceChronElement(checked) { + var self = this; + var div = document.createElement("div"); + div.className = "GPisochronChoiceAlt"; + var input = document.createElement("input"); + input.id = this._addUID("GPisochronChoiceAltChron"); + input.name = "GPisochronChoiceMode"; + input.type = "radio"; + input.checked = !!checked; + if (input.addEventListener) { + input.addEventListener("change", function (e) { + document.getElementById(self._addUID("GPisochronValueChron")).className = "GPflexInput"; + document.getElementById(self._addUID("GPisochronValueDist")).className = "GPisochronValueHidden"; + self.onIsoTypeChoiceChange(e); + }, false); + } else if (input.attachEvent) { + input.attachEvent("onchange", function () { + document.getElementById(self._addUID("GPisochronValueChron")).className = "GPflexInput"; + document.getElementById(self._addUID("GPisochronValueDist")).className = "GPisochronValueHidden"; + self.onIsoTypeChoiceChange(); + }); + } + // info: Internet explorer support + input.value = "isochron"; + div.appendChild(input); + var label = document.createElement("label"); + label.className = "GPisochronChoiceAltImg"; + label.htmlFor = this._addUID("GPisochronChoiceAltChron"); + div.appendChild(label); + var span = document.createElement("span"); + span.id = this._addUID("GPisochronChoiceAltChronTxt"); + span.innerHTML = "isochrone"; + if (span.addEventListener) { + span.addEventListener("click", function () { + document.getElementById(self._addUID("GPisochronChoiceAltChron")).click(); + }, false); + } else if (span.attachEvent) { + span.attachEvent("onclick", function () { + document.getElementById(self._addUID("GPisochronChoiceAltChron")).click(); + }); + } + div.appendChild(span); + return div; + }, + /** + * Create Type choice Dist + * see event ! + * FIXME event not useful + * @param {Boolean} checked - checked + * @returns {DOMElement} DOM element + */ + _createIsoPanelFormTypeChoiceDistElement: function _createIsoPanelFormTypeChoiceDistElement(checked) { + var self = this; + var div = document.createElement("div"); + div.className = "GPisochronChoiceAlt"; + var input = document.createElement("input"); + input.id = this._addUID("GPisochronChoiceAltDist"); + input.name = "GPisochronChoiceMode"; + input.type = "radio"; + input.checked = !!checked; + if (input.addEventListener) { + input.addEventListener("change", function (e) { + document.getElementById(self._addUID("GPisochronValueDist")).className = "GPflexInput"; + document.getElementById(self._addUID("GPisochronValueChron")).className = "GPisochronValueHidden"; + self.onIsoTypeChoiceChange(e); + }, false); + } else if (input.attachEvent) { + input.attachEvent("onchange", function () { + document.getElementById(self._addUID("GPisochronValueDist")).className = "GPflexInput"; + document.getElementById(self._addUID("GPisochronValueChron")).className = "GPisochronValueHidden"; + self.onIsoTypeChoiceChange(); + }); + } + // info: Internet explorer support + input.value = "isodistance"; + div.appendChild(input); + var label = document.createElement("label"); + label.className = "GPisochronChoiceAltImg"; + label.htmlFor = this._addUID("GPisochronChoiceAltDist"); + div.appendChild(label); + var span = document.createElement("span"); + span.id = this._addUID("GPisochronChoiceAltDistTxt"); + span.innerHTML = "isodistance"; + if (span.addEventListener) { + span.addEventListener("click", function () { + document.getElementById(self._addUID("GPisochronChoiceAltDist")).click(); + }, false); + } else if (span.attachEvent) { + span.attachEvent("onclick", function () { + document.getElementById(self._addUID("GPisochronChoiceAltDist")).click(); + }); + } + div.appendChild(span); + return div; + }, + // ################################################################### // + // ############### Methods to the value iso into form ################ // + // ################################################################### // + + /** + * Create isochron inputs values + * see event ! + * @param {Boolean} checked - checked + * @returns {DOMElement} DOM element + */ + _createIsoPanelFormValueIsochronElement: function _createIsoPanelFormValueIsochronElement(checked) { + // contexte + var context = this; + var div = document.createElement("div"); + div.id = this._addUID("GPisochronValueChron"); + div.className = checked ? "GPflexInput" : "GPisochronValueHidden"; + var label = document.createElement("label"); + label.id = this._addUID("GPisochronValueChronLabel"); + label.htmlFor = this._addUID("GPisochronValueChronInput"); + label.innerHTML = "Temps"; + div.appendChild(label); + var input1 = document.createElement("input"); + input1.id = this._addUID("GPisochronValueChronInput1"); + input1.min = "0"; + input1.step = "1"; + input1.value = "0"; + input1.type = "number"; + if (input1.addEventListener) { + input1.addEventListener("change", function (e) { + if (typeof context.onIsoValueChronTimeMinuteChange === "function") { + context.onIsoValueChronTimeHourChange(e); + } + }); + } else if (input1.attachEvent) { + input1.attachEvent("onchange", function (e) { + if (typeof context.onIsoValueChronTimeMinuteChange === "function") { + context.onIsoValueChronTimeHourChange(e); + } + }); + } + div.appendChild(input1); + var label1 = document.createElement("label"); + label1.innerHTML = "h"; + div.appendChild(label1); + var input2 = document.createElement("input"); + input2.id = this._addUID("GPisochronValueChronInput2"); + input2.min = "0"; + input2.max = "59"; + input2.step = "1"; + input2.value = "0"; + input2.type = "number"; + if (input2.addEventListener) { + input2.addEventListener("change", function (e) { + if (typeof context.onIsoValueChronTimeMinuteChange === "function") { + context.onIsoValueChronTimeMinuteChange(e); + } + }); + } else if (input2.attachEvent) { + input2.attachEvent("onchange", function (e) { + if (typeof context.onIsoValueChronTimeMinuteChange === "function") { + context.onIsoValueChronTimeMinuteChange(e); + } + }); + } + div.appendChild(input2); + var label2 = document.createElement("label"); + label2.innerHTML = "min"; + div.appendChild(label2); + return div; + }, + /** + * Create isodistance inputs values + * see event ! + * @param {Boolean} checked - checked + * @returns {DOMElement} DOM element + */ + _createIsoPanelFormValueIsodistanceElement: function _createIsoPanelFormValueIsodistanceElement(checked) { + // contexte + var context = this; + var div = document.createElement("div"); + div.id = this._addUID("GPisochronValueDist"); + div.className = checked ? "GPflexInput" : "GPisochronValueHidden"; + var label = document.createElement("label"); + label.id = this._addUID("GPisochronValueDistLabel"); + label.htmlFor = this._addUID("GPisochronValueDistInput"); + label.innerHTML = "Distance"; + div.appendChild(label); + var input1 = document.createElement("input"); + input1.id = this._addUID("GPisochronValueDistInput"); + input1.min = "0"; + input1.step = "any"; + input1.value = "0"; + input1.type = "number"; + if (input1.addEventListener) { + input1.addEventListener("change", function (e) { + if (typeof context.onIsoValueDistChange === "function") { + context.onIsoValueDistChange(e); + } + }); + } else if (input1.attachEvent) { + input1.attachEvent("onchange", function (e) { + if (typeof context.onIsoValueDistChange === "function") { + context.onIsoValueDistChange(e); + } + }); + } + div.appendChild(input1); + var label1 = document.createElement("label"); + label1.innerHTML = "km"; + div.appendChild(label1); + return div; + }, + // ################################################################### // + // ############ Methods to the mode choice into form ################# // + // ################################################################### // + + /** + * Create Container to Mode choice + * + * FIXME + * don't call this._createIsoPanelFormModeChoiceTransportElement + * don't call this._createIsoPanelFormModeChoiceDirectionElement + * + * @returns {DOMElement} DOM element + */ + _createIsoPanelFormModeChoiceElement: function _createIsoPanelFormModeChoiceElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPisochronModeChoice"); + + // div.appendChild(this._createIsoPanelFormModeChoiceTransportElement()); + // div.appendChild(this._createIsoPanelFormModeChoiceDirectionElement()); + + return div; + }, + /** + * Create Mode choice transport + * see event ! + * FIXME event not useful + * @param {Array} transports - transports in a list + * @returns {DOMElement} DOM element + */ + _createIsoPanelFormModeChoiceTransportElement: function _createIsoPanelFormModeChoiceTransportElement(transports) { + // contexte d'execution + var context = this; + var div = document.createElement("div"); + div.id = this._addUID("GPisochronTransportChoice"); + var span = document.createElement("span"); + span.className = "GPisochronModeLabel"; + span.innerHTML = "Mode de transport"; + div.appendChild(span); + + /* jshint -W083 */ + for (var i = 0; i < transports.length; i++) { + var transport = transports[i]; + if (transport === "Voiture") { + var inputCar = document.createElement("input"); + inputCar.id = this._addUID("GPisochronTransportCar"); + inputCar.type = "radio"; + inputCar.name = "GPisochronTransport"; + if (i === 0) { + inputCar.checked = true; + } + // gestionnaire d'evenement : + // on stocke le mode de transport, + // utilisation pour la requête sur le service de calcul d'itiniraire + if (inputCar.addEventListener) { + inputCar.addEventListener("change", function (e) { + context.onIsoModeTransportChange(e); + }); + } else if (inputCar.attachEvent) { + inputCar.attachEvent("onchange", function (e) { + context.onIsoModeTransportChange(e); + }); + } + // info : internet explorer support + inputCar.value = "Voiture"; + div.appendChild(inputCar); + var labelCar = document.createElement("label"); + labelCar.className = "GPisochronTransportImg"; + labelCar.htmlFor = this._addUID("GPisochronTransportCar"); + labelCar.title = "Voiture"; + div.appendChild(labelCar); + } + if (transport === "Pieton") { + var inputPedestrian = document.createElement("input"); + inputPedestrian.id = this._addUID("GPisochronTransportPedestrian"); + inputPedestrian.type = "radio"; + inputPedestrian.name = "GPisochronTransport"; + if (i === 0) { + inputPedestrian.checked = true; + } + // gestionnaire d'evenement : + // on stocke le mode de transport, + // utilisation pour la requête sur le service de calcul d'itiniraire + if (inputPedestrian.addEventListener) { + inputPedestrian.addEventListener("change", function (e) { + context.onIsoModeTransportChange(e); + }); + } else if (inputPedestrian.attachEvent) { + inputPedestrian.attachEvent("onchange", function (e) { + context.onIsoModeTransportChange(e); + }); + } + // info : internet explorer support + inputPedestrian.value = "Pieton"; + div.appendChild(inputPedestrian); + var labelPedestrian = document.createElement("label"); + labelPedestrian.className = "GPisochronTransportImg"; + labelPedestrian.htmlFor = this._addUID("GPisochronTransportPedestrian"); + labelPedestrian.title = "Piéton"; + div.appendChild(labelPedestrian); + } + } + return div; + }, + /** + * Create Mode choice direction + * see event! + * + * @param {Array} directions - directions to display in list ("Departure", "Arrival"). First element will be selected by default + * @returns {DOMElement} DOM element + */ + _createIsoPanelFormModeChoiceDirectionElement: function _createIsoPanelFormModeChoiceDirectionElement(directions) { + // contexte d'execution + var self = this; + var div = document.createElement("div"); + div.id = this._addUID("GPisochronDirectionChoice"); + var span = document.createElement("span"); + span.className = "GPisochronModeLabel"; + span.innerHTML = "Sens de parcours"; + div.appendChild(span); + var select = document.createElement("select"); + select.id = this._addUID("GPisochronDirectionSelect"); + select.className = "GPinputSelect"; + // gestionnaire d'evenement : + // on stocke la valeur du mode de calcul, + // utilisation pour la requête sur le service de calcul d'iso + select.addEventListener("change", function (e) { + self.onIsoModeDirectionChange(e); + }); + for (var i = 0; i < directions.length; i++) { + var direction = directions[i]; + if (direction.toLowerCase() === "departure") { + var departureOption = document.createElement("option"); + if (i === 0) { + departureOption.selected = "selected"; + } + departureOption.value = "departure"; + departureOption.text = "Départ"; + select.appendChild(departureOption); + } + if (direction.toLowerCase() === "arrival") { + var arrivalOption = document.createElement("option"); + if (i === 0) { + arrivalOption.selected = "selected"; + } + arrivalOption.value = "arrival"; + arrivalOption.text = "Arrivée"; + select.appendChild(arrivalOption); + } + } + div.appendChild(select); + return div; + }, + // ################################################################### // + // ################# Methods to the choice exclusions ################ // + // ################################################################### // + + /** + * Hidden checkbox for minimizing/maximizing Exclusions Options + * + * @returns {DOMElement} DOM element + */ + _createShowIsoExclusionsElement: function _createShowIsoExclusionsElement() { + var input = document.createElement("input"); + input.id = this._addUID("GPshowIsoExclusions"); + input.type = "checkbox"; + return input; + }, + /** + * Label to Exclusions Options + * + * @returns {DOMElement} DOM element + */ + _createShowIsoExclusionsPictoElement: function _createShowIsoExclusionsPictoElement() { + var label = document.createElement("label"); + label.id = this._addUID("GPshowIsoExclusionsPicto"); + label.className = "GPshowMoreOptionsImage GPshowMoreOptions GPshowIsoExclusionsPicto"; + label.htmlFor = this._addUID("GPshowIsoExclusions"); + label.title = "Exclusions"; + label.style.top = "240px"; + return label; + }, + /** + * Create Container to Exclusions + * + * @returns {DOMElement} DOM element + */ + _createIsoPanelFormExclusionsElement: function _createIsoPanelFormExclusionsElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPisoExclusions"); + var span = document.createElement("span"); + span.className = "GPisoExclusionsLabel"; + span.innerHTML = "Passages autorisés"; + div.appendChild(span); + + // div.appendChild(this._createIsoPanelFormExclusionOptionsElement()); + + return div; + }, + /** + * Create Exclusions Options + * see event ! + * FIXME event not useful + * @param {Array} exclusions - exclusions to display in list + * @returns {DOMElement} DOM element + */ + _createIsoPanelFormExclusionOptionsElement: function _createIsoPanelFormExclusionOptionsElement(exclusions) { + // contexte d'execution + var context = this; + var div = document.createElement("div"); + div.className = "GPisoExclusionsOptions"; + + /* jshint -W083 */ + for (var value in exclusions) { + if (exclusions.hasOwnProperty(value)) { + var status = exclusions[value]; + switch (value) { + case "toll": + var inputToll = document.createElement("input"); + inputToll.id = this._addUID("GPisoExclusionsToll"); + inputToll.type = "checkbox"; + inputToll.checked = !status; + // gestionnaire d'evenement : + // on stocke l'exclusion, + // utilisation pour la requête sur le service de calcul d'itiniraire + if (inputToll.addEventListener) { + inputToll.addEventListener("change", function (e) { + context.onIsoExclusionsChange(e); + }); + } else if (inputToll.attachEvent) { + inputToll.attachEvent("onchange", function (e) { + context.onIsoExclusionsChange(e); + }); + } + // info : internet explorer support + inputToll.value = "Toll"; + div.appendChild(inputToll); + var labelToll = document.createElement("label"); + labelToll.className = "GPisoExclusionsOption"; + labelToll.htmlFor = this._addUID("GPisoExclusionsToll"); + labelToll.innerHTML = "Péages"; + div.appendChild(labelToll); + break; + case "tunnel": + var inputTunnel = document.createElement("input"); + inputTunnel.id = this._addUID("GPisoExclusionsTunnel"); + inputTunnel.type = "checkbox"; + inputTunnel.checked = !status; + // gestionnaire d'evenement : + // on stocke l'exclusion, + // utilisation pour la requête sur le service de calcul d'itiniraire + if (inputTunnel.addEventListener) { + inputTunnel.addEventListener("change", function (e) { + context.onIsoExclusionsChange(e); + }); + } else if (inputTunnel.attachEvent) { + inputTunnel.attachEvent("onchange", function (e) { + context.onIsoExclusionsChange(e); + }); + } + // info : internet explorer support + inputTunnel.value = "Tunnel"; + div.appendChild(inputTunnel); + var labelTunnel = document.createElement("label"); + labelTunnel.className = "GPisoExclusionsOption"; + labelTunnel.htmlFor = this._addUID("GPisoExclusionsTunnel"); + labelTunnel.innerHTML = "Tunnels"; + div.appendChild(labelTunnel); + break; + case "bridge": + var inputBridge = document.createElement("input"); + inputBridge.id = this._addUID("GPisoExclusionsBridge"); + inputBridge.type = "checkbox"; + inputBridge.checked = !status; + // gestionnaire d'evenement : + // on stocke l'exclusion, + // utilisation pour la requête sur le service de calcul d'itiniraire + if (inputBridge.addEventListener) { + inputBridge.addEventListener("change", function (e) { + context.onIsoExclusionsChange(e); + }); + } else if (inputBridge.attachEvent) { + inputBridge.attachEvent("onchange", function (e) { + context.onIsoExclusionsChange(e); + }); + } + // info : internet explorer support + inputBridge.value = "Bridge"; + div.appendChild(inputBridge); + var labelBridge = document.createElement("label"); + labelBridge.className = "GPisoExclusionsOption"; + labelBridge.htmlFor = this._addUID("GPisoExclusionsBridge"); + labelBridge.innerHTML = "Ponts"; + div.appendChild(labelBridge); + break; + } + } + } + return div; + }, + // ################################################################### // + // ############################### Submit Form ####################### // + // ################################################################### // + + /** + * Create Submit Form Element + * + * @returns {DOMElement} DOM element + */ + _createIsoSubmitFormElement: function _createIsoSubmitFormElement() { + var input = document.createElement("input"); + input.id = this._addUID("GPisochronSubmit"); + input.className = "GPinputSubmit"; + input.type = "submit"; + input.value = "Calculer"; + return input; + }, + // ################################################################### // + // ############################### Reset picto ####################### // + // ################################################################### // + + /** + * Create Reset Picto Element + * + * @returns {DOMElement} DOM element + */ + _createIsoFormResetElement: function _createIsoFormResetElement() { + var self = this; + var divReset = document.createElement("div"); + divReset.id = this._addUID("GPisochronReset"); + divReset.title = "Réinitialiser les paramètres"; + divReset.addEventListener("click", function (e) { + self.onIsoResetClick(e); + }); + return divReset; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (IsoDOM); + +/***/ }), +/* 104 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37); +/* harmony import */ var _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(105); +/* harmony import */ var _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(106); +/* harmony import */ var _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(101); +/* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(107); +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } + + + + + + + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__["default"].getLogger("mouseposition"); + +/** + * @classdesc + * + * Leaflet Control Class to display Mouse position in various CRS and altitude using the altimetric web service of the Geoportal Platform. + * + * Use {@link module:Controls.MousePosition L.geoportalControl.MousePosition()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control native class. + * + * @namespace + * @alias L.geoportalControl.MousePosition + */ +var MousePosition = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends L.geoportalControl.MousePosition.prototype */{ + includes: _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_5__["default"], + /** + * options by default + * + * @private + */ + options: { + position: "bottomleft", + collapsed: true, + units: [], + systems: [], + displayAltitude: true, + displayCoordinates: true, + editCoordinates: false, + altitude: { + triggerDelay: 200, + responseDelay: 500, + noDataValue: -99999, + noDataValueTolerance: 90000, + serviceOptions: {} + } + }, + /** + * @constructor MousePosition + * + * @private + * @alias MousePosition + * @extends {L.Control} + * @param {Object} options - options for function call. + * @param {String} [options.apiKey] - API key. The "calcul" key is used by default. + * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol) + * @param {String} [options.position] - position of component into the map, 'bottomleft' by default + * @param {Boolean} [options.collapsed = true] - collapse mode, false by default + * @param {Array} [options.systems] - list of projection systems, GEOGRAPHIC, MERCATOR, LAMB93 and LAMB2E by default + * Each array element (=system) is an object with following properties : + * @param {String} options.systems.crs - Proj4 crs alias (from proj4 defs). e.g. : "EPSG:4326". Required + * @param {String} [options.systems.label] - CRS label to be displayed in control. Default is crs code (e.g. "EPSG:4326") + * @param {String} [options.systems.type] - CRS units type for coordinates conversion : "Geographical" or "Metric". Default: "Metric" + * @param {Object} [options.systems.geoBBox] - Aera covered by the system (WGS84 coordinates). + * @param {Number} options.systems.geoBBox.right - Right bound. + * @param {Number} options.systems.geoBBox.left - Left bound. + * @param {Number} options.systems.geoBBox.top - Top bound. + * @param {Number} options.systems.geoBBox.bottom - Bottom bound. + * @param {Array} [options.units] - list of units by system, Geographical and Metric by default + * Values may be "DEC" (decimal degrees), "DMS" (sexagecimal), "RAD" (radians) and "GON" (grades) for geographical coordinates, + * and "M" or "KM" for metric coordinates + * @param {Boolean} [options.displayAltitude= true] - active/desactivate the altitude panel, if desactivate, have just the coordinate panel, true by default + * @param {Boolean} [options.displayCoordinates= true] - active/desactivate the coordinate panel, if desactivate, have just the altitude panel, true by default + * @param {Boolean} [options.editCoordinates = false] - add edit coordinates options. False by default. + * @param {Object} [options.altitude] - elevation configuration + * @param {Object} [options.altitude.serviceOptions] - options of elevation service + * @param {Number} [options.altitude.responseDelay] - latency for altitude request, 500 ms by default + * @param {Number} [options.altitude.triggerDelay] - immobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default + * @param {Number} [options.altitude.noDataValue] - value used for altitude service no data (default is -99999). In this case, "---m" will be displayed instead of "-99999m" + * @param {Number} [options.altitude.noDataValueTolerance] - tolerance for no data value : + * values in [noDataValue - noDataValueTolerance ; noDataValue + noDataValueTolerance] interval will not be displayed, but "---m" will be displayed instead. + * Default is 90000 + * @example + * var MousePosition = L.geoportalControl.MousePosition({ + * position : 'bottomleft', + * collapsed : false, + * displayAltitude : true, + * displayCoordinates : true, + * editCoordinates : false, + * altitude : { + * triggerDelay : 100, + * responseDelay : 500, + * noDataValue : -99999, + * noDataValueTolerance : 90000, + * serviceOptions : {} + * }, + * systems : [ + * { + * crs : L.CRS.EPSG4326, + * label : "Lon,Lat", + * type : "Geographical" + * }, + * { + * crs : L.geoportalCRS.EPSG2154, + * label : "Lambert 93", + * type : "Metric" + * } + * ], + * units : ["DEC", "DMS"] + * }); + */ + initialize: function initialize(options) { + // on merge les options avec celles par defaut + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(this.options, options); + + // uuid + this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__["default"].generate(); + + // initialisation des systemes de projections + this._projectionSystems = []; + this._initProjectionSystems(); + + // initialisation des systemes des unités + this._projectionUnits = {}; + this._initProjectionUnits(); + + // detection du support : desktop ou tactile + this._isDesktop = this._detectSupport(); + + // on met en place un seuil sur le timer + if (this.options.altitude.triggerDelay < 100) { + this.options.altitude.triggerDelay = 100; + } + + // timer sur le delai d'immobilisation du mouvement + this._timer = this.options.altitude.triggerDelay; + + // Systeme de projection selectionné (cf. _initProjectionSystems) + this._currentProjectionSystems = this._projectionSystems[0]; + + // Container des systemes + this._projectionSystemsContainer = null; + + /** Type d'unité de projection selectionnés : Geographical ou Metric (cf._initProjectionSystems ) */ + this._currentProjectionType = this._projectionSystems[0].type; + + // Unité de projection selectionnés (cf. _initProjectionUnits) + this._currentProjectionUnits = this._projectionUnits[this._currentProjectionType][0].code; + + // Container des unités + this._projectionUnitsContainer = null; + + /** Container de visualisation du panneau du composant */ + this._showContainer = null; + this._pictoContainer = null; + this._panelContainer = null; + this._panelHeaderContainer = null; + + // gestion de l'affichage du panneau de l'altitude / coordonnées + if (!this.options.displayAltitude && !this.options.displayCoordinates) { + // on reactive cette option ! + this.options.displayCoordinates = true; + } + if (!this.options.displayCoordinates) { + // si les coordonnées ne sont pas affichées : pas besoin de les éditer... + this.options.editCoordinates = false; + } + + /** Edition des coordonnées en cours ou non */ + this._isEditing = false; + + // on transmet les options au controle + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.setOptions(this, this.options); + }, + /** + * this method is called by this.addTo(map) when the control is added on the map + * and fills variable 'this._container = this.onAdd(map)', + * and create events on map. + * @param {Object} map - the map + * + * @returns {DOMElement} DOM element + * @private + */ + onAdd: function onAdd(map) { + // initialisation du DOM du composant + var container = this._container = this._initLayout(); + + // on met en place l'evenement sur la carte pour recuperer les coordonnées, + // on l'active à l'ouverture du panneau uniquement ! + if (!this.options.collapsed) { + // this.onShowMousePositionClick(); + // evenement valable pour le mode desktop ! + if (this._isDesktop) { + map.on("mousemove", this.onMouseMove, this); + } else { + map.on("move", this.onMapMove, this); + } + } + + // deactivate of events that may interfere with the map + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container); + + // on stoppe la propagation de l'événement mousemove sur le container + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.addListener(container, "mousemove", leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.stopPropagation).addListener(container, "mousemove", leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.preventDefault); + return container; + }, + /** + * this method is called when the control is removed from the map + * and removes events on map. + * @param {Object} map - the map + * + * @private + */ + onRemove: function onRemove(map) { + map.off("mousemove", this.onMouseMove); + }, + /** + * this method is called by the constructor and initialize the projection + * systems. + * getting coordinates in the requested projection : + * see this.onMousePositionProjectionSystemChange() + * + * @private + */ + _initProjectionSystems: function _initProjectionSystems() { + // on donne la possibilité à l'utilisateur de modifier + // la liste des systèmes à afficher + // Ex. this.options.systems + + // systemes de projection disponible par defaut + var projectionSystemsByDefault = [{ + label: "G\xE9ographique", + crs: leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.Simple, + // L.Projection.LonLat ! + type: "Geographical" + }, { + label: "Web Mercator", + crs: leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.EPSG3395, + // L.Projection.SphericalMercator ! + type: "Metric" + }, { + label: "Lambert 93", + crs: _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__["default"].EPSG2154, + type: "Metric", + geoBBox: { + left: -9.86, + bottom: 41.15, + right: 10.38, + top: 51.56 + } + }, { + label: "Lambert II \xE9tendu", + crs: _CRS_CRS__WEBPACK_IMPORTED_MODULE_7__["default"].EPSG27572, + type: "Metric", + geoBBox: { + left: -4.87, + bottom: 42.33, + right: 8.23, + top: 51.14 + } + }]; + var systems = this.options.systems; + for (var i = 0; i < systems.length; i++) { + // definition d'un systeme de reference + var sys = systems[i]; + if (!sys.label) { + logger.error("not defined !"); + continue; + } + if (!sys.crs) { + logger.error("crs not defined !"); + continue; + } + if (!sys.type) { + logger.warn("type srs not defined, use 'Metric' by default !"); + sys.type = "Metric"; + } + this._projectionSystems.push(systems[i]); + + // it's a just a test ... + var found = false; + for (var j = 0; j < projectionSystemsByDefault.length; j++) { + var obj = projectionSystemsByDefault[j]; + if (sys.crs === obj.crs) { + found = true; + logger.info("crs '{}' already configured by default", obj.code); + } + } + if (!found) { + logger.info("crs '{}' not found, it's a new projection", sys.code || sys.label); + } + } + + // au cas où... + if (this._projectionSystems.length === 0) { + this._projectionSystems = projectionSystemsByDefault; + } + + // re-initilisation des codes pour gerer le lien entre _projectionSystems et select du mouse position (lien code/value) + for (var k = 0; k < this._projectionSystems.length; ++k) { + this._projectionSystems[k].code = k; + } + }, + /** + * this method is called by the constructor and initialize the units. + * getting coordinates in the requested units : + * see this.onMousePositionProjectionUnitsChange() + * + * @private + */ + _initProjectionUnits: function _initProjectionUnits() { + // on donne la possibilité à l'utilisateur de modifier + // la liste des unités à afficher + // Ex. + // this.options.units : ["DEC", "DMS"] + + // unités disponible par defaut + var projectionUnitsByDefault = { + Geographical: [{ + code: "DEC", + label: "degrés décimaux", + format: this._displayDEC + }, { + code: "DMS", + label: "degrés sexagésimaux", + format: this._displayDMS + }, { + code: "RAD", + label: "radians", + format: this._displayRAD + }, { + code: "GON", + label: "grades", + format: this._displayGON + }], + Metric: [{ + code: "M", + label: "mètres", + format: this._displayMeter + }, { + code: "KM", + label: "kilomètres", + format: this._displayKMeter + }] + }; + var units = this.options.units; + for (var type in projectionUnitsByDefault) { + if (projectionUnitsByDefault.hasOwnProperty(type)) { + var found = false; + for (var j = 0; j < projectionUnitsByDefault[type].length; j++) { + var obj = projectionUnitsByDefault[type][j]; + for (var i = 0; i < units.length; i++) { + var unit = units[i]; + if (obj.code === unit) { + found = true; + if (!this._projectionUnits[type]) { + this._projectionUnits[type] = []; + } + this._projectionUnits[type].push(obj); + } + } + } + if (!found) { + this._projectionUnits[type] = projectionUnitsByDefault[type]; + } + } + } + + // au cas où... + if (Object.keys(this._projectionUnits).length === 0) { + this._projectionUnits = projectionUnitsByDefault; + } + }, + /** + * this method is called by the constructor. + * this information is useful to switch to touch mode. + * Detection : test for desktop or tactile + * + * @returns {Boolean} is desktop + * @private + */ + _detectSupport: function _detectSupport() { + // TODO + // Choix de gérer la détection dans le code du composant au lieu du DOM car : + // Utilisation de l'implémentation Leaflet + // http://leafletjs.com/reference.html#browser + + var isDesktop = true; + var userAgent = window.navigator.userAgent.toLowerCase(); + if (userAgent.indexOf("iphone") !== -1 || userAgent.indexOf("ipod") !== -1 || userAgent.indexOf("ipad") !== -1 || userAgent.indexOf("android") !== -1 || userAgent.indexOf("mobile") !== -1 || userAgent.indexOf("blackberry") !== -1 || userAgent.indexOf("tablet") !== -1 || userAgent.indexOf("phone") !== -1 || userAgent.indexOf("touch") !== -1) { + isDesktop = false; + } + if (userAgent.indexOf("msie") !== -1 || userAgent.indexOf("trident") !== -1) { + isDesktop = true; + } + return isDesktop; + }, + // ################################################################### // + // ######################## methods handle dom ####################### // + // ################################################################### // + + /** + * this method is called by this.onAdd(map) + * and initialize the container HTMLElement + * + * @returns {DOMElement} DOM element + * @private + */ + _initLayout: function _initLayout() { + // create main container + var container = this._createMainContainerElement(); + var inputShow = this._showContainer = this._createShowMousePositionElement(); + container.appendChild(inputShow); + + // mode "collapsed" + if (!this.options.collapsed) { + inputShow.checked = true; + } + var picto = this._pictoContainer = this._createShowMousePositionPictoElement(this._isDesktop); + container.appendChild(picto); + var panel = this._panelContainer = this._createMousePositionPanelElement(); + var header = this._panelHeaderContainer = this._createMousePositionPanelHeaderElement(); + panel.appendChild(header); + var basic = this._createMousePositionPanelBasicElement(this.options.displayAltitude, this.options.displayCoordinates, this.options.editCoordinates); + panel.appendChild(basic); + var arraySettings = this._createShowMousePositionSettingsElement(this.options.displayCoordinates); + for (var j = 0; j < arraySettings.length; j++) { + panel.appendChild(arraySettings[j]); + } + var settings = this._createMousePositionSettingsElement(); + var systems = this._projectionSystemsContainer = this._createMousePositionSettingsSystemsElement(this._projectionSystems); + var units = this._projectionUnitsContainer = this._createMousePositionSettingsUnitsElement(this._projectionUnits[this._currentProjectionType]); + settings.appendChild(systems); + settings.appendChild(units); + panel.appendChild(settings); + container.appendChild(panel); + + // ce tag n'est pas à placer dans le container du controle, + // mais dans celui de la map ! + var center = this._createMapCenter(); + var map = this._map; + map.getContainer().appendChild(center); + return container; + }, + /** + * this method is called by this.() + * and it changes the elevation view panel into the dom. + * FIXME call by ID ! + * + * @param {Boolean} active - true:active, false:disable + * + * @private + */ + _setElevationPanel: function _setElevationPanel(active) { + var div = null; + if (!active) { + div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID("GPmousePositionAltitude")); + div.style.display = "none"; + } + }, + /** + * this method is called by this.() + * and it changes the coordinate view panel into the dom. + * FIXME call by ID ! + * + * @param {Boolean} active - true:active, false:disable + * + * @private + */ + _setCoordinatePanel: function _setCoordinatePanel(active) { + if (!active) { + var div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID("GPmousePositionCoordinate")); + div.style.display = "none"; + } + }, + /** + * this method is called by this.() + * and it changes the settings view panel into the dom. + * FIXME call by ID ! + * + * @param {Boolean} active - true:active, false:disable + * + * @private + */ + _setSettingsPanel: function _setSettingsPanel(active) { + if (!active) { + var divPicto = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GPshowMousePositionSettingsPicto"); + var divPanel = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID("GPmousePositionSettings")); + divPicto.style.display = "none"; + divPanel.style.display = "none"; + } + }, + /** + * this method is called by this.onMousePositionProjectionSystemChange() + * when changes to a metric or a geographical units. + * + * @param {String} type - Geographical or Metric + * + * @private + */ + _setTypeUnitsPanel: function _setTypeUnitsPanel(type) { + var container = this._projectionUnitsContainer; + + // on supprime les enfants... + while (container.firstChild) { + container.removeChild(container.firstChild); + } + var units = this._projectionUnits[type]; + for (var j = 0; j < units.length; j++) { + var obj = units[j]; + var option = document.createElement("option"); + option.value = obj.code ? obj.code : j; + option.text = obj.label || j; + // option.label = obj.label; + container.appendChild(option); + } + var projectionUnits = this._projectionUnits[type][0].code; + if (this._currentProjectionUnits === "DMS" || projectionUnits === "DMS") { + this._resetCoordinateElements(this.options.editCoordinates, type, projectionUnits); + this._setEditMode(this._isEditing); + } + + // le nouveau type de system ... + this._currentProjectionType = type; + + // Mise a jour des elements labels et unites + this._resetLabelElements(type); + this._resetUnitElements(projectionUnits); + + // et comme on a changé de type de systeme, + // il faut changer aussi d'unité ! + this._currentProjectionUnits = this._projectionUnits[type][0].code; + }, + // ################################################################### // + // ######################## method units format ###################### // + // ################################################################### // + + /** + * degreedecimal + * @param {Object} oLatLng - coordinates + * + * @returns {Object} coordinates in decimal + * @private + */ + _displayDEC: function _displayDEC(oLatLng) { + var coordinate = {}; + coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__["default"].roundToDecimal(oLatLng.lat, 6); + coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__["default"].roundToDecimal(oLatLng.lng, 6); + coordinate.unit = "°"; + return coordinate; + }, + /** + * degreedecimal2sexagecimal + * @param {Object} oLatLng - coordinates + * + * @returns {Object} coordinates in DMS + * @private + */ + _displayDMS: function _displayDMS(oLatLng) { + var coordinate = {}; + coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__["default"].decimalLatToDMS(oLatLng.lat, true); + coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__["default"].decimalLonToDMS(oLatLng.lng, true); + return coordinate; + }, + /** + * degreedecimal2radian + * @param {Object} oLatLng - coordinates + * + * @returns {Object} coordinates in radian + * @private + */ + _displayRAD: function _displayRAD(oLatLng) { + var coordinate = {}; + coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__["default"].decimalToRadian(oLatLng.lat); + coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__["default"].decimalToRadian(oLatLng.lng); + coordinate.unit = "rad"; + return coordinate; + }, + /** + * degreedecimal2grade + * @param {Object} oLatLng - coordinates + * + * @returns {Object} coordinates in gon + * @private + */ + _displayGON: function _displayGON(oLatLng) { + var coordinate = {}; + coordinate.lat = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__["default"].decimalToGrade(oLatLng.lat); + coordinate.lng = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_6__["default"].decimalToGrade(oLatLng.lng); + coordinate.unit = "gon"; + return coordinate; + }, + /** + * meter + * @param {Object} oXY - coordinates + * + * @returns {Object} coordinates in meters + * @private + */ + _displayMeter: function _displayMeter(oXY) { + // on recoit toujours des coordonnées metriques + var coordinate = {}; + coordinate.x = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.x, 2); + coordinate.y = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.y, 2); + coordinate.unit = "m"; + return coordinate; + }, + /** + * kilometer + * @param {Object} oXY - coordinates + * + * @returns {Object} coordinates in km + * @private + */ + _displayKMeter: function _displayKMeter(oXY) { + var coordinate = {}; + coordinate.x = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.x / 1000, 2); + coordinate.y = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.formatNum(oXY.y / 1000, 2); + coordinate.unit = "km"; + return coordinate; + }, + // ################################################################### // + // ####################### method system project ##################### // + // ################################################################### // + + /** + * this method projects a coordinate to a specific projection. + * FIXME + * + * @param {Object} oLatLng - geographic coordinate (L.LatLng) + * @param {Object} crs - projection system (ex. GEOGRAPHIC, LAMB93, LAMB2E, MERCATOR, ...) + * @returns {Object} oXY - coordinate + * @private + */ + _project: function _project(oLatLng, crs) { + // cf. http://leafletjs.com/reference.html#iprojection + // notre carte est dans la projection par defaut : + // Spherical Mercator projection (EPSG:3857) + // - GEOGRAPHIC : conversion native, L.CRS.Simple ou L.Projection.LngLat.project(latlng) + // - LAMB93 : L.GeoportalCRS.EPSG2154 ou projection.project(latlng) + // - LAMB2E : L.GeoportalCRS.EPSG27572 ou projection.project(latlng) + // - MERCATOR ou EPSG:3395 : L.CRS.EPSG3395 ou L.Projection.Mercator.project(latlng) + + if (typeof crs === "function") { + // "crs is an function !"... en mode AMD ! + crs = crs(); + } + if (_typeof(crs) !== "object") { + logger.log("crs is not an object !"); + return; + } + + // pas de reprojection pour le systeme de projection natif ! + if (crs === leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.Simple) { + return oLatLng; + } + if (!crs.projection || _typeof(crs.projection) !== "object") { + logger.error("projection is not an object !"); + return; + } + var oPoint = crs.projection.project(oLatLng); + + // FIXME reprojeter du geographique en geographique cause qq problemes + // Ex. LatLng en EPSG4326 ! + // FIXME probleme d'inversion d'axe sur les projections geographiques + // Ex. EPSG:4326 -> lat/lon + // IGNF:RGF93G -> lon/lat + if (this._currentProjectionType === "Geographical") { + oPoint.lat = oPoint.y; + oPoint.lng = oPoint.x; + } + if (!oPoint || Object.keys(oPoint).length === 0) { + logger.error("Failed to project with crs code : " + crs.code); + } + return oPoint; + }, + /** + * this method unprojects a coordinate to a geographic projection. + * + * @param {Object} oXY - coordinate + * @returns {Object} oLatLng - geographic coordinate (L.LatLng) + * @private + */ + _unproject: function _unproject(oXY) { + // cf. http://leafletjs.com/reference.html#iprojection + // notre carte est dans la projection par defaut : + // Spherical Mercator projection (EPSG:3857) + // - GEOGRAPHIC : conversion native, L.CRS.Simple ou L.Projection.LngLat.project(latlng) + // - LAMB93 : L.GeoportalCRS.EPSG2154 ou projection.project(latlng) + // - LAMB2E : L.GeoportalCRS.EPSG27572 ou projection.project(latlng) + // - MERCATOR ou EPSG:3395 : L.CRS.EPSG3395 ou L.Projection.Mercator.project(latlng) + + var oSrs = this._currentProjectionSystems.crs; + if (!oSrs) { + logger.log("system crs not found"); + return; + } + if (typeof oSrs === "function") { + // "crs is an function !"... en mode AMD ! + oSrs = oSrs(); + } + if (_typeof(oSrs) !== "object") { + logger.log("crs is not an object !"); + return; + } + + // pas de reprojection pour le systeme de projection natif ! + if (oSrs === leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.CRS.Simple) { + return { + lat: oXY.y, + lng: oXY.x + }; + } + if (this._currentProjectionType === "Geographical") { + return { + lat: oXY.y, + lng: oXY.x + }; + } + if (!oSrs.projection || _typeof(oSrs.projection) !== "object") { + logger.error("projection is not an object !"); + return; + } + var oLatLng = oSrs.projection.unproject(oXY); + if (!oLatLng || Object.keys(oLatLng).length === 0) { + logger.error("Failed to unproject coordinate"); + } + return oLatLng; + }, + // ################################################################### // + // ##################### handlers events to control ################## // + // ################################################################### // + + /** + * this sends the coordinates to the panel. + * (cf. this.GPdisplayCoords() into the DOM functions) + * + * @param {Object} oLatLng - geographic coordinate (L.LatLng) + * + * @private + */ + _setCoordinate: function _setCoordinate(oLatLng) { + // structure + // L.LatLng + // lat: 4.07249425916745 + // lng: 2.4609375 + + // type de systeme : Geographical ou Metric + var type = this._currentProjectionSystems.type; + + // on recherche la fonction de formatage dans l'unitée demandée + var format = null; + var units = this._projectionUnits[type]; + for (var i = 0; i < units.length; i++) { + if (units[i].code === this._currentProjectionUnits) { + format = units[i].format; + break; + } + } + + // structure pour les coordonnées en fonctin du type demandé : + // {x:, y:, unit:} ou {lng:, lat:} ou {lon:, lat:} ou {e:, n:, unit:}... + var coordinate = {}; + // on projete le point dans le systeme demandé + var oSrs = this._currentProjectionSystems.crs; + if (!oSrs) { + logger.error("crs not found !"); + return; + } + coordinate = format(this._project(oLatLng, oSrs)); + if (!coordinate || Object.keys(coordinate).length === 0) { + return; + } + this.GPdisplayCoords(coordinate); + }, + /** + * this sends the coordinates to the panel. + * (cf. this.GPdisplayElevation() into the DOM functions) + * + * @param {Object} oLatLng - geographic coordinate (L.LatLng) + * + * @private + */ + _setElevation: function _setElevation(oLatLng) { + // gestion du timer de la requete du service d'altitude + var delay = this.options.altitude.responseDelay; + var noDataValue = this.options.altitude.noDataValue; + var noDataValueTolerance = this.options.altitude.noDataValueTolerance; + this.GPdisplayElevation(oLatLng, delay, noDataValue, noDataValueTolerance); + }, + /** + * this method is triggered when the mouse or the map is stopped. + * (cf. onMouseMove and onMapMove) + * + * @param {Object} oLatLng - geographic coordinate (L.LatLng) + * + * @private + */ + onMoveStopped: function onMoveStopped(oLatLng) { + this._setElevation(oLatLng); + }, + /** + * this method is an handler event to control. The event is 'mousemove' on + * the map. The handler sends the coordinates to the panel. + * (cf. this.GPdisplayCoords() into the DOM functions) + * + * @param {Object} e - HTMLElement + * + * @private + */ + onMouseMove: function onMouseMove(e) { + var self = this; + var oLatLng = e.latlng; + this._setCoordinate(oLatLng); + clearTimeout(this._timer); + this._timer = setTimeout(function () { + self.onMoveStopped(oLatLng); + }, this.options.altitude.triggerDelay); + }, + /** + * this method is an handler event to control. The event is 'moveend' on + * the map. The handler sends the coordinates to the panel. + * (cf. this.GPdisplayCoords() into the DOM functions) + * + * @private + */ + onMapMove: function onMapMove() { + var self = this; + var map = this._map; + var oLatLng = map.getCenter(); + this._setCoordinate(oLatLng); + clearTimeout(this._timer); + this._timer = setTimeout(function () { + self.onMoveStopped(oLatLng); + }, this.options.altitude.triggerDelay); + }, + // ################################################################### // + // ####################### handlers events to dom #################### // + // ################################################################### // + + /** + * this method is called by this.GPdisplayCoords() in the dom, and + * it executes a request to the elevation service. + * + * @param {Object} coordinate - {lat:..., lng:...} + * @param {Function} callback - callback + * + * @private + */ + onRequestAltitude: function onRequestAltitude(coordinate, callback) { + logger.log("onRequestAltitude"); + + // INFORMATION + // on effectue la requête au service d'altitude... + // on met en place des callbacks afin de recuperer les resultats ou + // les messages d'erreurs du service. + // le resultat est affiché dans une balise du dom. + // les messages d'erreurs sont affichés sur la console (?) + + if (!coordinate || Object.keys(coordinate).length === 0) { + return; + } + + // si on ne veut pas de calcul d'altitude, on ne continue pas ! + if (!this.options.displayAltitude) { + return; + } + logger.log(coordinate); + var options = {}; + // on recupere les options du service + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.altitude.serviceOptions); + + // ainsi que les coordonnées + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + zonly: true, + positions: [{ + lon: coordinate.lon || coordinate.lng, + lat: coordinate.lat + }] + }); + + // et les callbacks + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + scope: this, + // callback onSuccess + onSuccess: function onSuccess(results) { + logger.log(results); + if (results && Object.keys(results).length) { + // var context = this.options.scope; + // context._setAltidude(results.elevations[0].z); + callback.call(this, results.elevations[0].z); + } + }, + // callback onFailure + onFailure: function onFailure(error) { + logger.error(error.message); + } + }); + + // cas où la clef API n'est pas renseignée dans les options du service, + // on utilise celle renseignée au niveau du controle ou la clé "calcul" par défaut + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + apiKey: options.apiKey || this.options.apiKey + }); + + // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert + // true par défaut (https) + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + ssl: this.options.ssl + }); + logger.log(options); + geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__["default"].Services.getAltitude(options); + }, + /** + * this method is called by event 'click' on 'GPshowMousePositionPicto' tag label + * (cf. this._createShowMousePositionPictoElement), + * and toggles event 'mousemove' on map. + * FIXME + * + * @param {Object} e - HTMLElement + * + * @private + */ + onShowMousePositionClick: function onShowMousePositionClick(e) { + logger.log(e); + + // checked : true - panel close + // checked : false - panel open + var map = this._map; + + // evenement declenché à l'ouverture/fermeture du panneau, + // et en fonction du mode : desktop ou tactile ! + if (this._showContainer.checked) { + this._isDesktop ? map.off("mousemove", this.onMouseMove, this) : map.off("move", this.onMapMove, this); + } else { + this._isDesktop ? map.on("mousemove", this.onMouseMove, this) : map.on("move", this.onMapMove, this); + } + + // on gère l'affichage des panneaux ici..., + // même si ce n'est pas l'endroit adequate... + this._setElevationPanel(this.options.displayAltitude); + this._setCoordinatePanel(this.options.displayCoordinates); + if (!this.options.displayCoordinates) { + this._setSettingsPanel(false); + } + }, + /** + * this method is called by event 'click' on input coordinate + * + * @param {Boolean} editing - editing mode + * @private + */ + onMousePositionEditModeClick: function onMousePositionEditModeClick(editing) { + if (!this.options.editCoordinates) { + return; + } + if (this._isEditing === editing) { + return; + } + this._isEditing = editing; + + // Affichage des outils, input en ecriture + this._setEditMode(this._isEditing); + var map = this._map; + if (this._isDesktop) { + this._isEditing ? map.off("mousemove", this.onMouseMove, this) : map.on("mousemove", this.onMouseMove, this); + } else { + this._isEditing ? map.off("move", this.onMapMove, this) : map.on("move", this.onMapMove, this); + } + }, + /** + * Convert Coordinate value : km to meters, radians, grades to decimal degrees + * @param {Number} value - value to convert + * @param {String} unit - unit + * + * @returns {Number} converted value + * @private + */ + _convertCoordinate: function _convertCoordinate(value, unit) { + var result; + if (unit === "DEC" || unit === "DMS") { + // DMS est converti en DEC ! + result = value; + } else if (unit === "M") { + result = value; + } else if (unit === "KM") { + result = value * 1000; + } else if (unit === "RAD") { + var rd = (180 / Math.PI).toFixed(20); + result = (value * rd).toFixed(20); + } else if (unit === "GON") { + var d = (9 / 10).toFixed(20); + result = (value * d).toFixed(20); + } + return result; + }, + /** + * Validate Extend coordinate + * + * @param {String} coordType - Lat or Lon + * @param {String} value - coordinate + * @param {Event} e - event + * @returns {Boolean} value is within extent + */ + validateExtentCoordinate: function validateExtentCoordinate(coordType, value, e) { + // FIXME pas de validation... + if (e !== undefined) { + return true; + } + if (["Lon", "Lat"].indexOf(coordType) === -1) { + return false; + } + var geoBBox = this._currentProjectionSystems.geoBBox; + if (geoBBox === undefined) { + return true; + } + if (geoBBox) { + // check if coordinates are in the extent + + var extent = [geoBBox.left, geoBBox.bottom, geoBBox.right, geoBBox.top]; + var unit = this._currentProjectionUnits; + + // on convertit un point..., mais on n'a pas de fonction + // de conversion comme pour openlayers... + var oLatLon = this._unproject({ + x: coordType === "Lon" ? this._convertCoordinate(value, unit) : 0, + y: coordType === "Lat" ? this._convertCoordinate(value, unit) : 0 + }); + if (coordType === "Lon" && (oLatLon.lng < extent[0] || oLatLon.lng > extent[2])) { + logger.warn("coordinates (lon) out of extent !?"); + return false; + } + if (coordType === "Lat" && (oLatLon.lat < extent[1] || oLatLon.lat > extent[3])) { + logger.warn("coordinates (lat) out of extent !?"); + return false; + } + } + return true; + }, + /** + * Get coordinate from inputs and select in decimal degrees + * + * @param {String} coordType - "Lon" or "Lat" + * @returns {String} coordinate + * @private + */ + _getCoordinate: function _getCoordinate(coordType) { + var inputDegrees = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID("GPmousePosition" + coordType + "Degrees")); + var degrees = inputDegrees.value; + if (!degrees) { + return null; + } + degrees = degrees.replace(",", "."); + if (!_Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__["default"].isInteger(degrees)) { + return null; + } + var result = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__["default"].toInteger(degrees); + if (result < Number(inputDegrees.dataset.min) || result > Number(inputDegrees.dataset.max)) { + return null; + } + var direction = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID("GPmousePosition" + coordType + "Direction")).value; + var inputMinutes = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID("GPmousePosition" + coordType + "Minutes")); + var minutes = inputMinutes.value; + if (minutes) { + minutes = minutes.replace(",", "."); + if (_Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__["default"].isInteger(minutes)) { + var mins = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__["default"].toInteger(minutes); + if (mins >= Number(inputMinutes.dataset.min) && mins <= Number(inputMinutes.dataset.max)) { + result += mins / 60; + } + } + } + var inputSeconds = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID("GPmousePosition" + coordType + "Seconds")); + var seconds = inputSeconds.value; + if (seconds) { + seconds = seconds.replace(",", "."); + var secs = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_4__["default"].toFloat(seconds); + if (secs && secs >= Number(inputSeconds.dataset.min) && secs <= Number(inputSeconds.dataset.max)) { + result += secs / 3600; + } + } + if (direction === "O" || direction === "S") { + result = -result; + } + return result; + }, + /** + * locate DMS coordinates on map + * + * @private + */ + _locateDMSCoordinates: function _locateDMSCoordinates() { + // on est toujours en coordonnées geographiques... + var oLatLon = { + lat: this._getCoordinate("Lat"), + lng: this._getCoordinate("Lon") + }; + if (!this.validateExtentCoordinate("Lon", oLatLon.lng)) { + return; + } + if (!this.validateExtentCoordinate("Lat", oLatLon.lat)) { + return; + } + + // FIXME https://github.com/Leaflet/Leaflet/issues/922 + var map = this._map; + map.panTo(oLatLon); + }, + /** + * locate coordinates on map (not DMS) + * + * @private + */ + _locateCoordinates: function _locateCoordinates() { + // soit longitude ou soit y + var lonYDom = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID("GPmousePositionLon")).value; + lonYDom = lonYDom.replace(",", "."); + lonYDom = parseFloat(lonYDom); + if (isNaN(lonYDom)) { + return; + } + + // soit lattitude ou soit x + var latXDom = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID("GPmousePositionLat")).value; + latXDom = latXDom.replace(",", "."); + latXDom = parseFloat(latXDom); + if (isNaN(latXDom)) { + return; + } + var lon = null; + var lat = null; + var x = null; + var y = null; + if (this._currentProjectionType === "Geographical") { + lon = lonYDom; + lat = latXDom; + } else { + x = latXDom; + y = lonYDom; + } + if (!this.validateExtentCoordinate("Lon", lon || x)) { + return; + } + if (!this.validateExtentCoordinate("Lat", lat || y)) { + return; + } + var unit = this._currentProjectionUnits; + var oLatLon = this._unproject({ + x: this._convertCoordinate(lon !== null ? lon : x, unit), + y: this._convertCoordinate(lat !== null ? lat : y, unit) + }); + + // FIXME https://github.com/Leaflet/Leaflet/issues/922 + var map = this._map; + map.panTo(oLatLon); + }, + /** + * locate coordinates on map + * + * @method locate + * @private + */ + onMousePositionEditModeLocateClick: function onMousePositionEditModeLocateClick() { + if (!this.options.editCoordinates) { + return; + } + if (!this._isEditing) { + this.onMousePositionEditModeClick(true); + return; + } + this._currentProjectionUnits === "DMS" ? this._locateDMSCoordinates() : this._locateCoordinates(); + }, + /** + * this method is called by event 'change' on 'GPmousePositionProjectionSystem' + * tag select (cf. this._createMousePositionSettingsElement), + * and selects the system projection. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onMousePositionProjectionSystemChange: function onMousePositionProjectionSystemChange(e) { + logger.log("onMousePositionProjectionSystemChange", e); + var idx = e.target.selectedIndex; // index + var value = e.target.options[idx].value; // crs, ex. MERCATOR (optionnel) + var label = e.target.options[idx].label; // etiquette, ex Géographiques + + logger.log(idx, value, label); + this._setCurrentSystem(value); + }, + /** + * this method selects the current system projection. + * + * @param {Object} systemCode - inner code (rank in array _projectionSystems) + * + * @private + */ + _setCurrentSystem: function _setCurrentSystem(systemCode) { + // si on change de type de systeme, on doit aussi changer le type d'unités ! + var type = null; + for (var i = 0; i < this._projectionSystems.length; ++i) { + if (this._projectionSystems[i].code === Number(systemCode)) { + type = this._projectionSystems[i].type; + break; + } + } + if (!type) { + logger.log("system not found in projection systems container"); + return; + } + if (type !== this._currentProjectionType) { + this._setTypeUnitsPanel(type); + } + + // on enregistre le systeme courrant + this._currentProjectionSystems = this._projectionSystems[Number(systemCode)]; + + // on simule un deplacement en mode tactile pour mettre à jour les + // resultats + if (!this._isDesktop) { + this.onMapMove(); + } + }, + /** + * this method is called by event 'mouseover' on 'GPmousePositionProjectionSystem' + * tag select (cf. this._createMousePositionSettingsElement), + * and selects the system projection. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onMousePositionProjectionSystemMouseOver: function onMousePositionProjectionSystemMouseOver(e) { + logger.log("onMousePositionProjectionSystemMouseOver", e); + var map = this._map; + if (!map) { + return; + } + + // clear select + var systemList = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get(this._addUID("GPmousePositionProjectionSystem")); + systemList.innerHTML = ""; + + // add systems whose extent intersects the map extent + for (var j = 0; j < this._projectionSystems.length; j++) { + var proj = this._projectionSystems[j]; + var option = null; + if (proj.geoBBox) { + // bboxes intersection test + if (map.getBounds()._southWest.lng > proj.geoBBox.right || map.getBounds()._southWest.lat > proj.geoBBox.top || map.getBounds()._northEast.lng < proj.geoBBox.left || map.getBounds()._northEast.lat < proj.geoBBox.bottom) { + if (proj === this._currentProjectionSystems) { + option = document.createElement("option"); + option.value = proj.code; + option.text = proj.label || j; + option.setAttribute("selected", "selected"); + option.setAttribute("disabled", "disabled"); + systemList.appendChild(option); + } + continue; // do not intersect + } + } + + option = document.createElement("option"); + option.value = proj.code; + option.text = proj.label || j; + if (proj === this._currentProjectionSystems) { + option.setAttribute("selected", "selected"); + } + systemList.appendChild(option); + } + }, + /** + * this method is called by event 'change' on 'GPmousePositionProjectionUnits' + * tag select (cf. this._createMousePositionSettingsElement), + * and selects the units projection. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onMousePositionProjectionUnitsChange: function onMousePositionProjectionUnitsChange(e) { + logger.log("onMousePositionProjectionUnitsChange", e); + var idx = e.target.selectedIndex; + var value = e.target.options[idx].value; + var label = e.target.options[idx].label; + logger.log(idx, value, label); + var oldProjectionUnits = this._currentProjectionUnits; + var newProjectionUnits = this._currentProjectionUnits = value; + var newProjectionType = this._currentProjectionType; + + // Mise a jour des elements lebels et unites + this._resetLabelElements(newProjectionType); + this._resetUnitElements(newProjectionUnits); + + // mise a jour des inputs pour les coordonnees + if (oldProjectionUnits === "DMS" || newProjectionUnits === "DMS") { + this._resetCoordinateElements(this.options.editCoordinates, newProjectionType, newProjectionUnits); + this._setEditMode(this._isEditing); + } + + // on simule un deplacement en mode tactile pour mettre à jour les + // resultats + if (!this._isDesktop) { + this.onMapMove(); + } + }, + // ################################################################### // + // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ // + // ################################################################### // + + /** + * This method is public. + * It allows to control the execution of a movement. + * + * @param {Object} position - position = {lon: , lat: } + * @param {Number} zoom - zoom + * @param {Object} options - Zoom/pan options + */ + moveTo: function moveTo(position, zoom, options) { + if (!this._showContainer.checked) { + this._pictoContainer.click(); + } + var map = this._map; + if (!map) { + return; + } + this.onMouseMove({ + latlng: position + }); + map.flyTo(position, zoom || 10, options || {}); + } +}); +/* harmony default export */ __webpack_exports__["default"] = (MousePosition); + +/***/ }), +/* 105 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** +* @module MathUtils +* @alias Gp.MathUtils +* @description +* ... +* +* @example +* modulo(); +* decimalToDMS(); +* toInteger(); +* isInteger(); +* toFloat(); +*/ +var MathUtils = { + /** + * Reste de la division euclidienne + * @function modulo + * @param {Number} a - divisor + * @param {Number} b - quotient + * @returns {Number} Modulo + */ + modulo: function modulo(a, b) { + var r = a % b; + return r * b < 0 ? r + b : r; + }, + /** + * Transform degrees, minutes, seconds form decimal degrees - + * Largely inspired by the private function degreesToStringHDMS from ol/coordinate.js + * + * @function decimalToDMS + * @param {Number} degrees - decimal degrees + * @param {Array} hemispheres - "NS" ou "EO" + * @param {Number} numDigits - number of digits for seconds + * @returns {Object} DMS coordinate + */ + decimalToDMS: function decimalToDMS(degrees, hemispheres, numDigits) { + var normalizedDegrees = this.modulo(degrees + 180, 360) - 180; + var x = Math.abs(3600 * normalizedDegrees); + var dflPrecision = numDigits || 0; + var precision = Math.pow(10, dflPrecision); + var deg = Math.floor(x / 3600); + var min = Math.floor((x - deg * 3600) / 60); + var sec = x - deg * 3600 - min * 60; + sec = Math.ceil(sec * precision) / precision; + if (sec >= 60) { + sec = 0; + min += 1; + } + if (min >= 60) { + min = 0; + deg += 1; + } + var direction = hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0); + return { + d: deg, + m: min, + s: sec, + direction: direction + }; + }, + /** + * Converts string to Integer + * + * @function toInteger + * @param {String} s - string number + * @param {Numeric} base - between 2 and 36 + * @returns {null|Numeric} result + */ + toInteger: function toInteger(s, base) { + var _base = base || 10; + var n = parseInt(s, _base); + if (!isNaN(n) && isFinite(n)) { + return n; + } + return null; + }, + /** + * check if s represents an integer + * + * @function isInteger + * @param {String} s - string number + * @returns {Boolean} is integer + */ + isInteger: function isInteger(s) { + if (isNaN(s)) { + return false; + } + var v = parseFloat(s); + return (v | 0) === v; + }, + /** + * Converts s to float + * + * @function toFloat + * @param {String} s - string number + * @returns {null|Numeric} result + */ + toFloat: function toFloat(s) { + var n = parseFloat(s); + if (!isNaN(n) && isFinite(n)) { + return n; + } + return null; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (MathUtils); + +/***/ }), +/* 106 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +var MousePositionDOM = { + /** + * Add uuid to the tag ID + * @param {String} id - id selector + * @returns {String} uid - id selector with an unique id + */ + _addUID: function _addUID(id) { + var uid = this._uid ? id + "-" + this._uid : id; + return uid; + }, + /** + * Main container (DOM) + * + * @returns {DOMElement} DOM element + */ + _createMainContainerElement: function _createMainContainerElement() { + var container = document.createElement("div"); + container.id = this._addUID("GPmousePosition"); + container.className = "GPwidget"; + return container; + }, + // ################################################################### // + // ################### Methods of main container ##################### // + // ################################################################### // + + /** + * Hidden checkbox for minimizing/maximizing + * + * @returns {DOMElement} DOM element + */ + _createShowMousePositionElement: function _createShowMousePositionElement() { + var input = document.createElement("input"); + input.id = this._addUID("GPshowMousePosition"); + input.type = "checkbox"; + return input; + }, + /** + * Show mouse position control + * @param {Boolean} isDesktop - specifies if the support is desktop or tactile + * + * @returns {DOMElement} DOM element + */ + _createShowMousePositionPictoElement: function _createShowMousePositionPictoElement(isDesktop) { + // contexte d'execution + var self = this; + var label = document.createElement("label"); + label.id = this._addUID("GPshowMousePositionPicto"); + label.className = "GPshowAdvancedToolPicto"; + label.htmlFor = this._addUID("GPshowMousePosition"); + label.title = "Afficher les coordonnées du curseur"; + + // FIXME detection disponible dans le JS ! + // Detection : test for desktop or tactile + // var isDesktop = true; + // var userAgent = window.navigator.userAgent.toLowerCase(); + // if (userAgent.indexOf("iphone") !== -1 || + // userAgent.indexOf("ipod") !== -1 || + // userAgent.indexOf("ipad") !== -1 || + // userAgent.indexOf("android") !== -1 || + // userAgent.indexOf("mobile") !== -1 || + // userAgent.indexOf("blackberry") !== -1 || + // userAgent.indexOf("tablet") !== -1 || + // userAgent.indexOf("phone") !== -1 || + // userAgent.indexOf("touch") !== -1 ) { + // isDesktop = false; + // } + // if (userAgent.indexOf("msie") !== -1 || + // userAgent.indexOf("trident") !== -1) { + // isDesktop = true; + // } + + // Show map center localisation if panel opened and tactile support + label.addEventListener("click", function (e) { + var mapCenterClass = ""; + if (!document.getElementById(self._addUID("GPshowMousePosition")).checked && !isDesktop) { + mapCenterClass = "GPmapCenterVisible"; + } + document.getElementById("GPmapCenter").className = mapCenterClass; + self.onShowMousePositionClick(e); + }); + var spanOpen = document.createElement("span"); + spanOpen.id = this._addUID("GPshowMousePositionOpen"); + spanOpen.className = "GPshowAdvancedToolOpen"; + label.appendChild(spanOpen); + return label; + }, + /** + * mouse position panel + * + * @returns {DOMElement} DOM element + */ + _createMousePositionPanelElement: function _createMousePositionPanelElement() { + var panel = document.createElement("div"); + panel.id = this._addUID("GPmousePositionPanel"); + panel.className = "GPpanel"; + + // FIXME on decompose la fonction pour les besoins du controle, + // on ajoutera ces childs à la main... + // div.appendChild(this._createMousePositionPanelHeaderElement()); + // div.appendChild(this._createMousePositionPanelBasicElement()); + // div.appendChild(this._createShowMousePositionSettingsElement()); + // div.appendChild(this._createMousePositionSettingsElement()); + + return panel; + }, + /** + * Map center localisation (tactile use) + * + * @returns {DOMElement} container + */ + _createMapCenter: function _createMapCenter() { + var div = document.createElement("div"); + div.id = "GPmapCenter"; + div.className = ""; + return div; + }, + // ################################################################### // + // ####################### Panel container ########################### // + // ################################################################### // + + /** + * @returns {DOMElement} container + */ + _createMousePositionPanelHeaderElement: function _createMousePositionPanelHeaderElement() { + var container = document.createElement("div"); + container.className = "GPpanelHeader"; + var divTitle = document.createElement("div"); + divTitle.className = "GPpanelTitle"; + divTitle.innerHTML = "Coordonnées"; + container.appendChild(divTitle); + var divClose = document.createElement("div"); + divClose.id = "GPmousePositionPanelClose"; + divClose.className = "GPpanelClose"; + divClose.title = "Fermer le panneau"; + + // Link panel close / visibility checkbox + var self = this; + if (divClose.addEventListener) { + divClose.addEventListener("click", function () { + document.getElementById(self._addUID("GPshowMousePositionPicto")).click(); + }, false); + } else if (divClose.attachEvent) { + divClose.attachEvent("onclick", function () { + document.getElementById(self._addUID("GPshowMousePositionPicto")).click(); + }); + } + container.appendChild(divClose); + return container; + }, + /** + * coordinate panel + * @param {Boolean} [displayAltitude] - specifies if the altitude panel must be displayed + * @param {Boolean} [displayCoordinates] - specifies if the coordinates panel must be displayed + * @param {Boolean} [editCoordinates] - specifies if the coordinates edition is allowed + * @param {Boolean} [currentProjectionUnits] - specifies if the current projection units + * + * FIXME + * call this._createMousePositionPanelBasicCoordinateElement + * call this._createMousePositionPanelBasicAltitudeElement + * + * @returns {DOMElement} DOM element + */ + _createMousePositionPanelBasicElement: function _createMousePositionPanelBasicElement(displayAltitude, displayCoordinates, editCoordinates, currentProjectionUnits) { + // default Values + displayAltitude = typeof displayAltitude === "undefined" ? true : displayAltitude; + displayCoordinates = typeof displayCoordinates === "undefined" ? true : displayCoordinates; + editCoordinates = typeof editCoordinates === "undefined" ? false : editCoordinates; + var container = document.createElement("div"); + container.id = this._addUID("GPmousePositionBasicPanel"); + + // FIXME on devrait decomposer la fonction pour les besoins du controle, + // on ajoutera ces childs à la main... + container.appendChild(this._createMousePositionPanelBasicCoordinateElement(displayCoordinates, editCoordinates, currentProjectionUnits)); + container.appendChild(this._createMousePositionPanelEditToolsElement(editCoordinates)); + container.appendChild(this._createMousePositionPanelBasicAltitudeElement(displayAltitude)); + return container; + }, + /** + * create coordinate elements + * + * @param {String} coordType - ("Lon" ou "Lat") + * @param {Boolean} [editCoordinates=false] - specifies if the coordinates edition is allowed + * + * @returns {Array} list of DOM elements + */ + _createCoordinateElement: function _createCoordinateElement(coordType, editCoordinates) { + var context = this; + if (["Lon", "Lat"].indexOf(coordType) === -1) { + return []; + } + var list = []; + var input = document.createElement("input"); + input.id = this._addUID("GPmousePosition" + coordType); + input.title = editCoordinates === true ? "Cliquer pour saisir des coordonnées" : ""; + input.readOnly = true; + if (editCoordinates) { + input.addEventListener("click", function () { + context.onMousePositionEditModeClick(true); + }); + input.addEventListener("change", function (e) { + this.classList.remove("error"); + var valid = context.validateExtentCoordinate(coordType, this.value, e); + valid ? this.classList.remove("error") : this.classList.add("error"); + }); + } + list.push(input); + var span = document.createElement("span"); + span.className = "GPmousePositionUnits"; + list.push(span); + return list; + }, + /** + * + * @param {String} coordType - ("Lon" ou "Lat") + * @param {Boolean} [editCoordinates=false] - specifies if the coordinates edition is allowed + * + * @returns {Array} list of DOM elements + */ + _createDMSCoordinateElement: function _createDMSCoordinateElement(coordType, editCoordinates) { + if (["Lon", "Lat"].indexOf(coordType) === -1) { + return []; + } + var context = this; + var list = []; + var input = document.createElement("input"); + input.id = this._addUID("GPmousePosition" + coordType + "Degrees"); + input.className = "GPSexagesimal"; + input.setAttribute("name", "degrees"); + input.title = editCoordinates === true ? "Cliquer pour saisir des coordonnées" : ""; + input.readOnly = true; + input.dataset.min = 0; + input.dataset.max = coordType === "Lon" ? 180 : 90; + if (editCoordinates) { + input.addEventListener("click", function () { + context.onMousePositionEditModeClick(true); + }); + input.addEventListener("change", function () { + this.classList.remove("error"); + var valid = context._checkDMSDegrees(coordType, this); + valid ? this.classList.remove("error") : this.classList.add("error"); + }); + } + list.push(input); + var span = document.createElement("span"); + span.className = "GPmousePositionSexagesimalLabel"; + span.innerHTML = "°"; + list.push(span); + var input1 = document.createElement("input"); + input1.id = this._addUID("GPmousePosition" + coordType + "Minutes"); + input1.className = "GPSexagesimal"; + input1.setAttribute("name", "minutes"); + input1.title = editCoordinates === true ? "Cliquer pour saisir des coordonnées" : ""; + input1.readOnly = true; + input1.dataset.min = 0; + input1.dataset.max = 59; + if (editCoordinates) { + input1.addEventListener("click", function () { + context.onMousePositionEditModeClick(true); + }); + input1.addEventListener("change", function () { + this.classList.remove("error"); + var valid = context._checkDMSElement(this); + valid ? this.classList.remove("error") : this.classList.add("error"); + }); + } + list.push(input1); + var span1 = document.createElement("span"); + span1.className = "GPmousePositionSexagesimalLabel"; + span1.innerHTML = "'"; + list.push(span1); + var input2 = document.createElement("input"); + input2.id = this._addUID("GPmousePosition" + coordType + "Seconds"); + input2.className = "GPSexagesimalsec"; + input2.setAttribute("name", "seconds"); + input2.title = editCoordinates === true ? "Cliquer pour saisir des coordonnées" : ""; + input2.readOnly = true; + input2.dataset.min = 0; + input2.dataset.max = 59; + if (editCoordinates) { + input2.addEventListener("click", function () { + context.onMousePositionEditModeClick(true); + }); + input2.addEventListener("change", function () { + this.classList.remove("error"); + var valid = context._checkDMSElement(this, true); + valid ? this.classList.remove("error") : this.classList.add("error"); + }); + } + list.push(input2); + var span2 = document.createElement("span"); + span2.className = "GPmousePositionSexagesimalLabel"; + span2.innerHTML = "''"; + list.push(span2); + var select = document.createElement("select"); + select.id = this._addUID("GPmousePosition" + coordType + "Direction"); + select.className = "GPmousePositionDirection"; + select.setAttribute("name", "direction"); + select.disabled = true; + var option = document.createElement("option"); + option.value = coordType === "Lon" ? "E" : "N"; + option.innerHTML = coordType === "Lon" ? "E" : "N"; + select.appendChild(option); + var option1 = document.createElement("option"); + option1.value = coordType === "Lon" ? "O" : "S"; + option1.innerHTML = coordType === "Lon" ? "O" : "S"; + select.appendChild(option1); + list.push(select); + return list; + }, + /** + * @param {Boolean} [display=false] - specifies if the coordinates panel must be displayed + * @param {Boolean} [editCoordinates] - specifies if the coordinates edition is allowed + * @param {Boolean} [currentProjectionUnits] - specifies if the current projection units + * + * @returns {DOMElement} container + */ + _createMousePositionPanelBasicCoordinateElement: function _createMousePositionPanelBasicCoordinateElement(display, editCoordinates, currentProjectionUnits) { + var div = document.createElement("div"); + div.id = this._addUID("GPmousePositionCoordinate"); + div.style.display = display ? "block" : "none"; + + // latitude + var divLat = document.createElement("div"); + var spanLat = document.createElement("span"); + spanLat.className = "GPmousePositionLabel"; + spanLat.id = this._addUID("GPmousePositionLatLabel"); + spanLat.innerHTML = "Latitude : "; + divLat.appendChild(spanLat); + var span = document.createElement("span"); + span.id = this._addUID("GPmousePositionLatCoordinate"); + var arrayCoords; + if (currentProjectionUnits === "DMS") { + arrayCoords = this._createDMSCoordinateElement("Lat", editCoordinates); + } else { + arrayCoords = this._createCoordinateElement("Lat", editCoordinates); + } + for (var i = 0; i < arrayCoords.length; i++) { + span.appendChild(arrayCoords[i]); + } + divLat.appendChild(span); + div.appendChild(divLat); + + // longitude + var divLon = document.createElement("div"); + var spanLon = document.createElement("span"); + spanLon.className = "GPmousePositionLabel"; + spanLon.id = this._addUID("GPmousePositionLonLabel"); + spanLon.innerHTML = "Longitude : "; + divLon.appendChild(spanLon); + var span1 = document.createElement("span"); + span1.id = this._addUID("GPmousePositionLonCoordinate"); + var arrayCoords1; + if (currentProjectionUnits === "DMS") { + arrayCoords1 = this._createDMSCoordinateElement("Lon", editCoordinates); + } else { + arrayCoords1 = this._createCoordinateElement("Lon", editCoordinates); + } + for (var j = 0; j < arrayCoords1.length; j++) { + span1.appendChild(arrayCoords1[j]); + } + divLon.appendChild(span1); + div.appendChild(divLon); + return div; + }, + /** + * @param {Boolean} [display=false] - specifies if the altitude panel must be displayed + * + * @returns {DOMElement} container + */ + _createMousePositionPanelBasicAltitudeElement: function _createMousePositionPanelBasicAltitudeElement(display) { + var div = document.createElement("div"); + div.id = this._addUID("GPmousePositionAltitude"); + div.style.display = display ? "block" : "none"; + var spanLabel = document.createElement("span"); + spanLabel.className = "GPmousePositionLabel"; + spanLabel.innerHTML = "Altitude : "; + div.appendChild(spanLabel); + var spanAlt = document.createElement("span"); + spanAlt.className = "GPmousePositionCoords"; + spanAlt.id = this._addUID("GPmousePositionAlt"); + spanAlt.innerHTML = "..."; + div.appendChild(spanAlt); + var spanUnits = document.createElement("span"); + spanUnits.className = "GPmousePositionAltitudeUnits"; + spanUnits.innerHTML = "m"; + div.appendChild(spanUnits); + return div; + }, + /** + * @param {Boolean} [editCoordinates=false] - specifies if the coordinates edition is allowed + * + * @returns {DOMElement} container + */ + _createMousePositionPanelEditToolsElement: function _createMousePositionPanelEditToolsElement(editCoordinates) { + var context = this; + var div = document.createElement("div"); + div.className = "GPmousePositionPanelEditTools"; + div.id = this._addUID("GPmousePositionPanelEditTools"); + if (!editCoordinates) { + div.style.display = "none"; + } + var span1 = document.createElement("span"); + span1.className = "GPmousePositionEditTool"; + span1.id = this._addUID("GPmousePositionLocate"); + span1.title = editCoordinates === true ? "Cliquer pour saisir des coordonnées" : ""; + if (editCoordinates) { + span1.addEventListener("click", function () { + context.onMousePositionEditModeLocateClick(); + }); + } + div.appendChild(span1); + var span2 = document.createElement("span"); + span2.className = "GPmousePositionEditTool"; + span2.id = this._addUID("GPmousePositionCloseEdit"); + span2.title = "Quitter la saisie des coordonnées"; + span2.style.display = "none"; + if (editCoordinates) { + span2.addEventListener("click", function () { + context.onMousePositionEditModeClick(false); + }); + } + div.appendChild(span2); + return div; + }, + // ################################################################### // + // #################### Settings container ########################### // + // ################################################################### // + + /** + * @param {Boolean} [display=false] - specifies if the settings panel must be displayed + * + * @returns {DOMElement[]} array containing input and label elements + */ + _createShowMousePositionSettingsElement: function _createShowMousePositionSettingsElement(display) { + var list = []; + var context = this; + var input = document.createElement("input"); + input.type = "checkbox"; + input.id = this._addUID("GPshowMousePositionSettings"); + var label = document.createElement("label"); + label.id = this._addUID("GPshowMousePositionSettingsPicto"); + label.htmlFor = this._addUID("GPshowMousePositionSettings"); + label.title = "Réglages"; + label.className = "GPshowMoreOptionsImage GPshowMoreOptions GPshowMousePositionSettingsPicto"; // FIXME classname and id ? + label.style.display = display ? "block" : "none"; + if (label.addEventListener) { + label.addEventListener("click", function (e) { + if (typeof context.onShowMousePositionSettingsClick === "function") { + context.onShowMousePositionSettingsClick(e); + } + }, false); + } else if (label.attachEvent) { + label.attachEvent("onclick", function (e) { + if (typeof context.onShowMousePositionSettingsClick === "function") { + context.onShowMousePositionSettingsClick(e); + } + }); + } + list.push(input); + list.push(label); + return list; + }, + /** + * settings panel + * @param {Boolean} [display=true] - specifies if the settings panel must be displayed + * + * FIXME + * don't call this._createMousePositionSettingsSystemsElement + * don't call this._createMousePositionSettingsUnitsElement + * + * @returns {DOMElement} DOM element + */ + _createMousePositionSettingsElement: function _createMousePositionSettingsElement(display) { + var container = document.createElement("div"); + container.id = this._addUID("GPmousePositionSettings"); + container.style.display = display === undefined || display ? "block" : "none"; + var span = document.createElement("span"); + span.className = "GPmousePositionSettingsLabel"; + span.innerHTML = "Système de référence"; + container.appendChild(span); + + // FIXME on decompose la fonction pour les besoins du controle, + // on ajoutera ces childs à la main... + // FIXME tableau statique ! + // var systems = [ + // { + // code : "GEOGRAPHIC", + // label : "Géographique" + // }, + // { + // code : "MERCATOR", + // label : "Mercator" + // }, + // { + // code : "LAMB93", + // label : "Lambert 93" + // }, + // { + // code : "LAMB2E", + // label : "Lambert II étendu" + // } + // ]; + // + // var selectSystem = this._createMousePositionSettingsSystemsElement(systems); + // + // container.appendChild(selectSystem); + + // FIXME on decompose la fonction pour les besoins du controle, + // on ajoutera ces childs à la main... + // FIXME tableau statique ! + // var units = [ + // { + // code : "DEC", + // label : "degrés décimaux", + // }, + // { + // code : "DMS", + // label : "degrés sexagésimaux", + // }, + // { + // code : "RAD", + // label : "radians", + // }, + // { + // code : "GON", + // label : "grades" + // } + // ]; + // + // var selectUnits = this._createMousePositionSettingsUnitsElement(units); + // + // container.appendChild(selectUnits); + + return container; + }, + /** + * @param {Object[]} systems - list of systems + * + * @returns {DOMElement} DOM element select + */ + _createMousePositionSettingsSystemsElement: function _createMousePositionSettingsSystemsElement(systems) { + // contexte d'execution + var context = this; + var selectSystem = document.createElement("select"); + selectSystem.id = this._addUID("GPmousePositionProjectionSystem"); + selectSystem.className = "GPinputSelect GPmousePositionSettingsSelect"; + selectSystem.addEventListener("change", function (e) { + context.onMousePositionProjectionSystemChange(e); + }); + selectSystem.addEventListener("mouseover", function (e) { + // FIXME mettre une condition si target === option + if (e.target.nodeName !== "OPTION") { + context.onMousePositionProjectionSystemMouseOver(e); + } + }); + for (var i = 0; i < systems.length; i++) { + var obj = systems[i]; + var option = document.createElement("option"); + option.value = obj.code; + option.text = obj.label || i; + // option.label = obj.label; + selectSystem.appendChild(option); + } + return selectSystem; + }, + /** + * @param {Object[]} units - list of units + * + * @returns {DOMElement} DOM element select + */ + _createMousePositionSettingsUnitsElement: function _createMousePositionSettingsUnitsElement(units) { + // contexte d'execution + var context = this; + var selectUnits = document.createElement("select"); + selectUnits.id = this._addUID("GPmousePositionProjectionUnits"); + selectUnits.className = "GPinputSelect GPmousePositionSettingsSelect"; + selectUnits.addEventListener("change", function (e) { + context.onMousePositionProjectionUnitsChange(e); + }); + for (var j = 0; j < units.length; j++) { + var obj = units[j]; + var option = document.createElement("option"); + option.value = obj.code ? obj.code : j; + option.text = obj.label || j; + // option.label = obj.label; + selectUnits.appendChild(option); + } + return selectUnits; + }, + /** + * @param {String} [currentProjectionType="Metric"] - "Geographical" or "Metric" + */ + _resetLabelElements: function _resetLabelElements(currentProjectionType) { + // Changement des labels dans le formulaire de saisie + var spanLat = document.getElementById(this._addUID("GPmousePositionLatLabel")); + spanLat.innerHTML = currentProjectionType === "Geographical" ? "Latitude :" : "X :"; + var spanLon = document.getElementById(this._addUID("GPmousePositionLonLabel")); + spanLon.innerHTML = currentProjectionType === "Geographical" ? "Longitude :" : "Y :"; + }, + /** + * @param {String} currentProjectionUnits - projection units + */ + _resetUnitElements: function _resetUnitElements(currentProjectionUnits) { + var value = ""; + if (currentProjectionUnits === "M" || currentProjectionUnits === "KM") { + value = currentProjectionUnits.toLowerCase(); + } + var elts = document.getElementsByClassName("GPmousePositionUnits"); + for (var e = 0; e < elts.length; e++) { + elts[e].innerHTML = value; + } + }, + /** + * @param {Boolean} editCoordinates - edit coordinates option + * @param {String} currentProjectionType - current projection type + * @param {String} currentProjectionUnits - current projection unit + */ + _resetCoordinateElements: function _resetCoordinateElements(editCoordinates, currentProjectionType, currentProjectionUnits) { + // Suppression de tous les enfants de GPmousePositionLatCoordinate + var latElt = document.getElementById(this._addUID("GPmousePositionLatCoordinate")); + while (latElt.firstChild) { + latElt.removeChild(latElt.firstChild); + } + var arrayCoords; + if (currentProjectionUnits === "DMS") { + arrayCoords = this._createDMSCoordinateElement("Lat", editCoordinates); + } else { + arrayCoords = this._createCoordinateElement("Lat", editCoordinates); + } + for (var i = 0; i < arrayCoords.length; i++) { + latElt.appendChild(arrayCoords[i]); + } + + // Suppression de tous les enfants de GPmousePositionLonCoordinate + var lonElt = document.getElementById(this._addUID("GPmousePositionLonCoordinate")); + while (lonElt.firstChild) { + lonElt.removeChild(lonElt.firstChild); + } + var arrayCoords1; + if (currentProjectionUnits === "DMS") { + arrayCoords1 = this._createDMSCoordinateElement("Lon", editCoordinates); + } else { + arrayCoords1 = this._createCoordinateElement("Lon", editCoordinates); + } + for (var j = 0; j < arrayCoords1.length; j++) { + lonElt.appendChild(arrayCoords1[j]); + } + + // FIXME on simule un deplacement ? + // this.onMapMove(); + }, + + /** + * Set/unset editing mode + * + * @param {Boolean} editing - active edit coordinates mode + */ + _setEditMode: function _setEditMode(editing) { + var locateElt = document.getElementById(this._addUID("GPmousePositionLocate")); + locateElt.title = editing ? "Aller à la position ..." : "Cliquer pour saisir des coordonnées"; + var closeEditElt = document.getElementById(this._addUID("GPmousePositionCloseEdit")); + closeEditElt.style.display = editing ? "inline-block" : "none"; + var selector = "div[id^=" + this._addUID("GPmousePositionCoordinate") + "]"; + var inputs = document.querySelectorAll(selector + " input"); + for (var i = 0; i < inputs.length; i++) { + inputs[i].readOnly = !editing; + if (editing) { + inputs[i].value = ""; + inputs[i].classList.remove("error"); + } + } + var selects = document.querySelectorAll(selector + " select"); + for (var j = 0; j < selects.length; j++) { + selects[j].disabled = !editing; + } + }, + /** + * + * @param {DOMElement} input - input element + * @param {Boolean} isFloat - check for float value + * + * @returns {Boolean} true if input value is within bounds + */ + _checkDMSElement: function _checkDMSElement(input, isFloat) { + var b = isFloat !== undefined; + var value = input.value; + if (b) { + value = value.replace(",", "."); + } + if (isNaN(value)) { + return false; + } + var v = parseFloat(value); + if (!b && (v | 0) !== v) { + // is it an integer + return false; + } + var min = Number(input.dataset.min); + var max = Number(input.dataset.max); + return v >= min && v <= max; + }, + /** + * @param {String} coordType - "Lon" or "Lat" + * @param {DOMElement} input - input element + * + * @returns {Boolean} true if input value is within bounds + */ + _checkDMSDegrees: function _checkDMSDegrees(coordType, input) { + if (isNaN(input.value)) { + return false; + } + var v = parseFloat(input.value); + if ((v | 0) !== v) { + // is it an integer + return false; + } + var min = Number(input.dataset.min); + var max = Number(input.dataset.max); + if (v < min || v > max) { + return false; + } + var inputMinutes = document.getElementById(this._addUID("GPmousePosition" + coordType + "Minutes")); + var inputSeconds = document.getElementById(this._addUID("GPmousePosition" + coordType + "Seconds")); + if (v >= max) { + inputMinutes.dataset.max = 0; + inputSeconds.dataset.max = 0; + } else { + inputMinutes.dataset.max = 59; + inputSeconds.dataset.max = 59.9999; + } + return true; + }, + // ################################################################### // + // ####################### handlers Event ############################ // + // ################################################################### // + + /** + * Function displaying coordinates from cursor position (desktop) + * or map center (tactile) + * @param {Object} coordinate - coordinates + */ + GPdisplayCoords: function GPdisplayCoords(coordinate) { + // Compute coords in case of cursor position (desktop) + if (coordinate) { + var labelLon = document.getElementById(this._addUID("GPmousePositionLonLabel")); + var labelLat = document.getElementById(this._addUID("GPmousePositionLatLabel")); + if (coordinate.x || coordinate.y) { + labelLat.innerHTML = "X : "; + labelLon.innerHTML = "Y : "; + } else if (coordinate.e || coordinate.n) { + labelLat.innerHTML = "E : "; + labelLon.innerHTML = "N : "; + } else { + labelLat.innerHTML = "Latitude : "; + labelLon.innerHTML = "Longitude : "; + } + if (_typeof(coordinate.lat) === "object" && _typeof(coordinate.lng) === "object") { + var parts = { + lng: "Lon", + lat: "Lat" + }; + var units = ["Degrees", "Minutes", "Seconds"]; + for (var p in parts) { + for (var u = 0; u < units.length; ++u) { + var selector = "GPmousePosition" + parts[p] + units[u]; + var elt = document.getElementById(this._addUID(selector)); + var key = units[u].charAt(0).toLowerCase(); + elt.value = coordinate[p][key]; + } + } + // directions + document.getElementById(this._addUID("GPmousePositionLonDirection")).value = coordinate.lng.direction; + document.getElementById(this._addUID("GPmousePositionLatDirection")).value = coordinate.lat.direction; + } else { + var elLat = document.getElementById(this._addUID("GPmousePositionLat")); + var elLon = document.getElementById(this._addUID("GPmousePositionLon")); + elLat.value = coordinate.x || coordinate.lat || coordinate.e || "0"; + elLon.value = coordinate.y || coordinate.lng || coordinate.lon || coordinate.n || "0"; + + // les unites + var unit = coordinate.unit === undefined ? "" : coordinate.unit; + var elements = document.getElementsByClassName("GPmousePositionUnits"); + for (var n = 0; n < elements.length; ++n) { + elements[n].innerHTML = unit; + } + } + } + }, + /** + * Function displaying altitude from cursor position (desktop) + * or map center (tactile) + * @param {Object} coordinate - coordinates + * @param {Number} altitudeTimeoutDelay - when the mouse stop moving, delay before the altitude request is launched + * @param {Number} noDataValue - the no data value + * @param {Number} noDataValueTolerance - the no data value tolerance + */ + GPdisplayElevation: function GPdisplayElevation(coordinate, altitudeTimeoutDelay, noDataValue, noDataValueTolerance) { + // contexte d'execution + var self = this; + + // Latency for altitude request + var altitudeTimeout; + if (!altitudeTimeoutDelay) { + altitudeTimeoutDelay = 500; + } + clearTimeout(altitudeTimeout); + document.getElementById(this._addUID("GPmousePositionAlt")).innerHTML = "..."; + if (noDataValue == null) { + noDataValue = -99999; + } + if (noDataValueTolerance == null) { + noDataValueTolerance = 99980; + } + var maxThreshold = noDataValue + noDataValueTolerance; + var minThreshold = noDataValue - noDataValueTolerance; + + // Compute coords in case of cursor position (desktop) + if (coordinate) { + // If no altitude panel, don't call altitude request + if (document.getElementById(this._addUID("GPmousePositionAltitude"))) { + altitudeTimeout = setTimeout(function () { + self.onRequestAltitude(coordinate, function (z) { + if (minThreshold < z && z < maxThreshold) { + self.GPresetElevation(); + } else { + document.getElementById(self._addUID("GPmousePositionAlt")).innerHTML = z; + } + }); + }, altitudeTimeoutDelay); + } + } + }, + /** + * Function reseting altitude value + */ + GPresetElevation: function GPresetElevation() { + if (document.getElementById(this._addUID("GPmousePositionAltitude"))) { + document.getElementById(this._addUID("GPmousePositionAlt")).innerHTML = "---"; + } + } +}; +/* harmony default export */ __webpack_exports__["default"] = (MousePositionDOM); + +/***/ }), +/* 107 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var proj4__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(108); +/* harmony import */ var proj4__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(proj4__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var proj4leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(110); +/* harmony import */ var proj4leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(proj4leaflet__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(111); +/* harmony import */ var _EPSG2154__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(112); +/* harmony import */ var _EPSG27572__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(114); +/* harmony import */ var _EPSG4326__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(115); + + + + + + + +/** autoload function */ +(function () { + // load all defs into proj4 + _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__["default"].load(proj4__WEBPACK_IMPORTED_MODULE_0___default.a); +})(); + +/** + * CRS (Coordinate Reference Systems) Factory to create L.Proj.CRS instances. + * + * @module CRS + * @alias L.geoportalCRS + * @abstract + * @example + * var map = L.Map('divmap', { + * crs : L.geoportalCRS.EPSG2154 + * }).setView(); + * + * var lyr = L.geoportalLayer.WMTS( + * { + * layer : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93" + * }, + * { + * opacity : 1, + * transparent : true, + * minZoom : 1, + * maxZoom : 21 + * ... + * }); + * + * lyr.addTo(map); // ou map.addLayer(lyr); + */ +/** @type {L.geoportalCRS} */ +var CRS = { + /** + * Lambert 93 ("EPSG:2154") CRS definition to be used with Leaflet. + * + * @method EPSG2154 + * @static + * @alias L.geoportalCRS.EPSG2154 + * @returns {EPSG2154} epsg code + */ + EPSG2154: function EPSG2154() { + return _EPSG2154__WEBPACK_IMPORTED_MODULE_3__["default"].build(); + }, + /** + * CRS : Lambert 2 extened + * + * @method EPSG27572 + * @static + * @alias L.geoportalCRS.EPSG27572 + * @returns {EPSG27572} epsg code + */ + EPSG27572: function EPSG27572() { + return _EPSG27572__WEBPACK_IMPORTED_MODULE_4__["default"].build(); + }, + /** + * CRS : EPSG4326 + * + * @ignore + * @method EPSG4326 + * @static + * @alias L.geoportalCRS.EPSG4326 + * @returns {EPSG4326} epsg code + */ + EPSG4326: function EPSG4326() { + return _EPSG4326__WEBPACK_IMPORTED_MODULE_5__["default"].build(); + } +}; +/* harmony default export */ __webpack_exports__["default"] = (CRS); + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["proj4"] = __webpack_require__(109); +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(52))) + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +(function (global, factory) { + true ? module.exports = factory() : + undefined; +}(this, (function () { 'use strict'; + + var globals = function(defs) { + defs('EPSG:4326', "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"); + defs('EPSG:4269', "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"); + defs('EPSG:3857', "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"); + + defs.WGS84 = defs['EPSG:4326']; + defs['EPSG:3785'] = defs['EPSG:3857']; // maintain backward compat, official code is 3857 + defs.GOOGLE = defs['EPSG:3857']; + defs['EPSG:900913'] = defs['EPSG:3857']; + defs['EPSG:102113'] = defs['EPSG:3857']; + }; + + var PJD_3PARAM = 1; + var PJD_7PARAM = 2; + var PJD_GRIDSHIFT = 3; + var PJD_WGS84 = 4; // WGS84 or equivalent + var PJD_NODATUM = 5; // WGS84 or equivalent + var SRS_WGS84_SEMIMAJOR = 6378137.0; // only used in grid shift transforms + var SRS_WGS84_SEMIMINOR = 6356752.314; // only used in grid shift transforms + var SRS_WGS84_ESQUARED = 0.0066943799901413165; // only used in grid shift transforms + var SEC_TO_RAD = 4.84813681109535993589914102357e-6; + var HALF_PI = Math.PI/2; + // ellipoid pj_set_ell.c + var SIXTH = 0.1666666666666666667; + /* 1/6 */ + var RA4 = 0.04722222222222222222; + /* 17/360 */ + var RA6 = 0.02215608465608465608; + var EPSLN = 1.0e-10; + // you'd think you could use Number.EPSILON above but that makes + // Mollweide get into an infinate loop. + + var D2R = 0.01745329251994329577; + var R2D = 57.29577951308232088; + var FORTPI = Math.PI/4; + var TWO_PI = Math.PI * 2; + // SPI is slightly greater than Math.PI, so values that exceed the -180..180 + // degree range by a tiny amount don't get wrapped. This prevents points that + // have drifted from their original location along the 180th meridian (due to + // floating point error) from changing their sign. + var SPI = 3.14159265359; + + var exports$1 = {}; + exports$1.greenwich = 0.0; //"0dE", + exports$1.lisbon = -9.131906111111; //"9d07'54.862\"W", + exports$1.paris = 2.337229166667; //"2d20'14.025\"E", + exports$1.bogota = -74.080916666667; //"74d04'51.3\"W", + exports$1.madrid = -3.687938888889; //"3d41'16.58\"W", + exports$1.rome = 12.452333333333; //"12d27'8.4\"E", + exports$1.bern = 7.439583333333; //"7d26'22.5\"E", + exports$1.jakarta = 106.807719444444; //"106d48'27.79\"E", + exports$1.ferro = -17.666666666667; //"17d40'W", + exports$1.brussels = 4.367975; //"4d22'4.71\"E", + exports$1.stockholm = 18.058277777778; //"18d3'29.8\"E", + exports$1.athens = 23.7163375; //"23d42'58.815\"E", + exports$1.oslo = 10.722916666667; //"10d43'22.5\"E" + + var units = { + ft: {to_meter: 0.3048}, + 'us-ft': {to_meter: 1200 / 3937} + }; + + var ignoredChar = /[\s_\-\/\(\)]/g; + function match(obj, key) { + if (obj[key]) { + return obj[key]; + } + var keys = Object.keys(obj); + var lkey = key.toLowerCase().replace(ignoredChar, ''); + var i = -1; + var testkey, processedKey; + while (++i < keys.length) { + testkey = keys[i]; + processedKey = testkey.toLowerCase().replace(ignoredChar, ''); + if (processedKey === lkey) { + return obj[testkey]; + } + } + } + + var parseProj = function(defData) { + var self = {}; + var paramObj = defData.split('+').map(function(v) { + return v.trim(); + }).filter(function(a) { + return a; + }).reduce(function(p, a) { + var split = a.split('='); + split.push(true); + p[split[0].toLowerCase()] = split[1]; + return p; + }, {}); + var paramName, paramVal, paramOutname; + var params = { + proj: 'projName', + datum: 'datumCode', + rf: function(v) { + self.rf = parseFloat(v); + }, + lat_0: function(v) { + self.lat0 = v * D2R; + }, + lat_1: function(v) { + self.lat1 = v * D2R; + }, + lat_2: function(v) { + self.lat2 = v * D2R; + }, + lat_ts: function(v) { + self.lat_ts = v * D2R; + }, + lon_0: function(v) { + self.long0 = v * D2R; + }, + lon_1: function(v) { + self.long1 = v * D2R; + }, + lon_2: function(v) { + self.long2 = v * D2R; + }, + alpha: function(v) { + self.alpha = parseFloat(v) * D2R; + }, + gamma: function(v) { + self.rectified_grid_angle = parseFloat(v); + }, + lonc: function(v) { + self.longc = v * D2R; + }, + x_0: function(v) { + self.x0 = parseFloat(v); + }, + y_0: function(v) { + self.y0 = parseFloat(v); + }, + k_0: function(v) { + self.k0 = parseFloat(v); + }, + k: function(v) { + self.k0 = parseFloat(v); + }, + a: function(v) { + self.a = parseFloat(v); + }, + b: function(v) { + self.b = parseFloat(v); + }, + r_a: function() { + self.R_A = true; + }, + zone: function(v) { + self.zone = parseInt(v, 10); + }, + south: function() { + self.utmSouth = true; + }, + towgs84: function(v) { + self.datum_params = v.split(",").map(function(a) { + return parseFloat(a); + }); + }, + to_meter: function(v) { + self.to_meter = parseFloat(v); + }, + units: function(v) { + self.units = v; + var unit = match(units, v); + if (unit) { + self.to_meter = unit.to_meter; + } + }, + from_greenwich: function(v) { + self.from_greenwich = v * D2R; + }, + pm: function(v) { + var pm = match(exports$1, v); + self.from_greenwich = (pm ? pm : parseFloat(v)) * D2R; + }, + nadgrids: function(v) { + if (v === '@null') { + self.datumCode = 'none'; + } + else { + self.nadgrids = v; + } + }, + axis: function(v) { + var legalAxis = "ewnsud"; + if (v.length === 3 && legalAxis.indexOf(v.substr(0, 1)) !== -1 && legalAxis.indexOf(v.substr(1, 1)) !== -1 && legalAxis.indexOf(v.substr(2, 1)) !== -1) { + self.axis = v; + } + }, + approx: function() { + self.approx = true; + } + }; + for (paramName in paramObj) { + paramVal = paramObj[paramName]; + if (paramName in params) { + paramOutname = params[paramName]; + if (typeof paramOutname === 'function') { + paramOutname(paramVal); + } + else { + self[paramOutname] = paramVal; + } + } + else { + self[paramName] = paramVal; + } + } + if(typeof self.datumCode === 'string' && self.datumCode !== "WGS84"){ + self.datumCode = self.datumCode.toLowerCase(); + } + return self; + }; + + var NEUTRAL = 1; + var KEYWORD = 2; + var NUMBER = 3; + var QUOTED = 4; + var AFTERQUOTE = 5; + var ENDED = -1; + var whitespace = /\s/; + var latin = /[A-Za-z]/; + var keyword = /[A-Za-z84]/; + var endThings = /[,\]]/; + var digets = /[\d\.E\-\+]/; + // const ignoredChar = /[\s_\-\/\(\)]/g; + function Parser(text) { + if (typeof text !== 'string') { + throw new Error('not a string'); + } + this.text = text.trim(); + this.level = 0; + this.place = 0; + this.root = null; + this.stack = []; + this.currentObject = null; + this.state = NEUTRAL; + } + Parser.prototype.readCharicter = function() { + var char = this.text[this.place++]; + if (this.state !== QUOTED) { + while (whitespace.test(char)) { + if (this.place >= this.text.length) { + return; + } + char = this.text[this.place++]; + } + } + switch (this.state) { + case NEUTRAL: + return this.neutral(char); + case KEYWORD: + return this.keyword(char) + case QUOTED: + return this.quoted(char); + case AFTERQUOTE: + return this.afterquote(char); + case NUMBER: + return this.number(char); + case ENDED: + return; + } + }; + Parser.prototype.afterquote = function(char) { + if (char === '"') { + this.word += '"'; + this.state = QUOTED; + return; + } + if (endThings.test(char)) { + this.word = this.word.trim(); + this.afterItem(char); + return; + } + throw new Error('havn\'t handled "' +char + '" in afterquote yet, index ' + this.place); + }; + Parser.prototype.afterItem = function(char) { + if (char === ',') { + if (this.word !== null) { + this.currentObject.push(this.word); + } + this.word = null; + this.state = NEUTRAL; + return; + } + if (char === ']') { + this.level--; + if (this.word !== null) { + this.currentObject.push(this.word); + this.word = null; + } + this.state = NEUTRAL; + this.currentObject = this.stack.pop(); + if (!this.currentObject) { + this.state = ENDED; + } + + return; + } + }; + Parser.prototype.number = function(char) { + if (digets.test(char)) { + this.word += char; + return; + } + if (endThings.test(char)) { + this.word = parseFloat(this.word); + this.afterItem(char); + return; + } + throw new Error('havn\'t handled "' +char + '" in number yet, index ' + this.place); + }; + Parser.prototype.quoted = function(char) { + if (char === '"') { + this.state = AFTERQUOTE; + return; + } + this.word += char; + return; + }; + Parser.prototype.keyword = function(char) { + if (keyword.test(char)) { + this.word += char; + return; + } + if (char === '[') { + var newObjects = []; + newObjects.push(this.word); + this.level++; + if (this.root === null) { + this.root = newObjects; + } else { + this.currentObject.push(newObjects); + } + this.stack.push(this.currentObject); + this.currentObject = newObjects; + this.state = NEUTRAL; + return; + } + if (endThings.test(char)) { + this.afterItem(char); + return; + } + throw new Error('havn\'t handled "' +char + '" in keyword yet, index ' + this.place); + }; + Parser.prototype.neutral = function(char) { + if (latin.test(char)) { + this.word = char; + this.state = KEYWORD; + return; + } + if (char === '"') { + this.word = ''; + this.state = QUOTED; + return; + } + if (digets.test(char)) { + this.word = char; + this.state = NUMBER; + return; + } + if (endThings.test(char)) { + this.afterItem(char); + return; + } + throw new Error('havn\'t handled "' +char + '" in neutral yet, index ' + this.place); + }; + Parser.prototype.output = function() { + while (this.place < this.text.length) { + this.readCharicter(); + } + if (this.state === ENDED) { + return this.root; + } + throw new Error('unable to parse string "' +this.text + '". State is ' + this.state); + }; + + function parseString(txt) { + var parser = new Parser(txt); + return parser.output(); + } + + function mapit(obj, key, value) { + if (Array.isArray(key)) { + value.unshift(key); + key = null; + } + var thing = key ? {} : obj; + + var out = value.reduce(function(newObj, item) { + sExpr(item, newObj); + return newObj + }, thing); + if (key) { + obj[key] = out; + } + } + + function sExpr(v, obj) { + if (!Array.isArray(v)) { + obj[v] = true; + return; + } + var key = v.shift(); + if (key === 'PARAMETER') { + key = v.shift(); + } + if (v.length === 1) { + if (Array.isArray(v[0])) { + obj[key] = {}; + sExpr(v[0], obj[key]); + return; + } + obj[key] = v[0]; + return; + } + if (!v.length) { + obj[key] = true; + return; + } + if (key === 'TOWGS84') { + obj[key] = v; + return; + } + if (key === 'AXIS') { + if (!(key in obj)) { + obj[key] = []; + } + obj[key].push(v); + return; + } + if (!Array.isArray(key)) { + obj[key] = {}; + } + + var i; + switch (key) { + case 'UNIT': + case 'PRIMEM': + case 'VERT_DATUM': + obj[key] = { + name: v[0].toLowerCase(), + convert: v[1] + }; + if (v.length === 3) { + sExpr(v[2], obj[key]); + } + return; + case 'SPHEROID': + case 'ELLIPSOID': + obj[key] = { + name: v[0], + a: v[1], + rf: v[2] + }; + if (v.length === 4) { + sExpr(v[3], obj[key]); + } + return; + case 'PROJECTEDCRS': + case 'PROJCRS': + case 'GEOGCS': + case 'GEOCCS': + case 'PROJCS': + case 'LOCAL_CS': + case 'GEODCRS': + case 'GEODETICCRS': + case 'GEODETICDATUM': + case 'EDATUM': + case 'ENGINEERINGDATUM': + case 'VERT_CS': + case 'VERTCRS': + case 'VERTICALCRS': + case 'COMPD_CS': + case 'COMPOUNDCRS': + case 'ENGINEERINGCRS': + case 'ENGCRS': + case 'FITTED_CS': + case 'LOCAL_DATUM': + case 'DATUM': + v[0] = ['name', v[0]]; + mapit(obj, key, v); + return; + default: + i = -1; + while (++i < v.length) { + if (!Array.isArray(v[i])) { + return sExpr(v, obj[key]); + } + } + return mapit(obj, key, v); + } + } + + var D2R$1 = 0.01745329251994329577; + function rename(obj, params) { + var outName = params[0]; + var inName = params[1]; + if (!(outName in obj) && (inName in obj)) { + obj[outName] = obj[inName]; + if (params.length === 3) { + obj[outName] = params[2](obj[outName]); + } + } + } + + function d2r(input) { + return input * D2R$1; + } + + function cleanWKT(wkt) { + if (wkt.type === 'GEOGCS') { + wkt.projName = 'longlat'; + } else if (wkt.type === 'LOCAL_CS') { + wkt.projName = 'identity'; + wkt.local = true; + } else { + if (typeof wkt.PROJECTION === 'object') { + wkt.projName = Object.keys(wkt.PROJECTION)[0]; + } else { + wkt.projName = wkt.PROJECTION; + } + } + if (wkt.AXIS) { + var axisOrder = ''; + for (var i = 0, ii = wkt.AXIS.length; i < ii; ++i) { + var axis = [wkt.AXIS[i][0].toLowerCase(), wkt.AXIS[i][1].toLowerCase()]; + if (axis[0].indexOf('north') !== -1 || ((axis[0] === 'y' || axis[0] === 'lat') && axis[1] === 'north')) { + axisOrder += 'n'; + } else if (axis[0].indexOf('south') !== -1 || ((axis[0] === 'y' || axis[0] === 'lat') && axis[1] === 'south')) { + axisOrder += 's'; + } else if (axis[0].indexOf('east') !== -1 || ((axis[0] === 'x' || axis[0] === 'lon') && axis[1] === 'east')) { + axisOrder += 'e'; + } else if (axis[0].indexOf('west') !== -1 || ((axis[0] === 'x' || axis[0] === 'lon') && axis[1] === 'west')) { + axisOrder += 'w'; + } + } + if (axisOrder.length === 2) { + axisOrder += 'u'; + } + if (axisOrder.length === 3) { + wkt.axis = axisOrder; + } + } + if (wkt.UNIT) { + wkt.units = wkt.UNIT.name.toLowerCase(); + if (wkt.units === 'metre') { + wkt.units = 'meter'; + } + if (wkt.UNIT.convert) { + if (wkt.type === 'GEOGCS') { + if (wkt.DATUM && wkt.DATUM.SPHEROID) { + wkt.to_meter = wkt.UNIT.convert*wkt.DATUM.SPHEROID.a; + } + } else { + wkt.to_meter = wkt.UNIT.convert; + } + } + } + var geogcs = wkt.GEOGCS; + if (wkt.type === 'GEOGCS') { + geogcs = wkt; + } + if (geogcs) { + //if(wkt.GEOGCS.PRIMEM&&wkt.GEOGCS.PRIMEM.convert){ + // wkt.from_greenwich=wkt.GEOGCS.PRIMEM.convert*D2R; + //} + if (geogcs.DATUM) { + wkt.datumCode = geogcs.DATUM.name.toLowerCase(); + } else { + wkt.datumCode = geogcs.name.toLowerCase(); + } + if (wkt.datumCode.slice(0, 2) === 'd_') { + wkt.datumCode = wkt.datumCode.slice(2); + } + if (wkt.datumCode === 'new_zealand_geodetic_datum_1949' || wkt.datumCode === 'new_zealand_1949') { + wkt.datumCode = 'nzgd49'; + } + if (wkt.datumCode === 'wgs_1984' || wkt.datumCode === 'world_geodetic_system_1984') { + if (wkt.PROJECTION === 'Mercator_Auxiliary_Sphere') { + wkt.sphere = true; + } + wkt.datumCode = 'wgs84'; + } + if (wkt.datumCode.slice(-6) === '_ferro') { + wkt.datumCode = wkt.datumCode.slice(0, - 6); + } + if (wkt.datumCode.slice(-8) === '_jakarta') { + wkt.datumCode = wkt.datumCode.slice(0, - 8); + } + if (~wkt.datumCode.indexOf('belge')) { + wkt.datumCode = 'rnb72'; + } + if (geogcs.DATUM && geogcs.DATUM.SPHEROID) { + wkt.ellps = geogcs.DATUM.SPHEROID.name.replace('_19', '').replace(/[Cc]larke\_18/, 'clrk'); + if (wkt.ellps.toLowerCase().slice(0, 13) === 'international') { + wkt.ellps = 'intl'; + } + + wkt.a = geogcs.DATUM.SPHEROID.a; + wkt.rf = parseFloat(geogcs.DATUM.SPHEROID.rf, 10); + } + + if (geogcs.DATUM && geogcs.DATUM.TOWGS84) { + wkt.datum_params = geogcs.DATUM.TOWGS84; + } + if (~wkt.datumCode.indexOf('osgb_1936')) { + wkt.datumCode = 'osgb36'; + } + if (~wkt.datumCode.indexOf('osni_1952')) { + wkt.datumCode = 'osni52'; + } + if (~wkt.datumCode.indexOf('tm65') + || ~wkt.datumCode.indexOf('geodetic_datum_of_1965')) { + wkt.datumCode = 'ire65'; + } + if (wkt.datumCode === 'ch1903+') { + wkt.datumCode = 'ch1903'; + } + if (~wkt.datumCode.indexOf('israel')) { + wkt.datumCode = 'isr93'; + } + } + if (wkt.b && !isFinite(wkt.b)) { + wkt.b = wkt.a; + } + + function toMeter(input) { + var ratio = wkt.to_meter || 1; + return input * ratio; + } + var renamer = function(a) { + return rename(wkt, a); + }; + var list = [ + ['standard_parallel_1', 'Standard_Parallel_1'], + ['standard_parallel_1', 'Latitude of 1st standard parallel'], + ['standard_parallel_2', 'Standard_Parallel_2'], + ['standard_parallel_2', 'Latitude of 2nd standard parallel'], + ['false_easting', 'False_Easting'], + ['false_easting', 'False easting'], + ['false-easting', 'Easting at false origin'], + ['false_northing', 'False_Northing'], + ['false_northing', 'False northing'], + ['false_northing', 'Northing at false origin'], + ['central_meridian', 'Central_Meridian'], + ['central_meridian', 'Longitude of natural origin'], + ['central_meridian', 'Longitude of false origin'], + ['latitude_of_origin', 'Latitude_Of_Origin'], + ['latitude_of_origin', 'Central_Parallel'], + ['latitude_of_origin', 'Latitude of natural origin'], + ['latitude_of_origin', 'Latitude of false origin'], + ['scale_factor', 'Scale_Factor'], + ['k0', 'scale_factor'], + ['latitude_of_center', 'Latitude_Of_Center'], + ['latitude_of_center', 'Latitude_of_center'], + ['lat0', 'latitude_of_center', d2r], + ['longitude_of_center', 'Longitude_Of_Center'], + ['longitude_of_center', 'Longitude_of_center'], + ['longc', 'longitude_of_center', d2r], + ['x0', 'false_easting', toMeter], + ['y0', 'false_northing', toMeter], + ['long0', 'central_meridian', d2r], + ['lat0', 'latitude_of_origin', d2r], + ['lat0', 'standard_parallel_1', d2r], + ['lat1', 'standard_parallel_1', d2r], + ['lat2', 'standard_parallel_2', d2r], + ['azimuth', 'Azimuth'], + ['alpha', 'azimuth', d2r], + ['srsCode', 'name'] + ]; + list.forEach(renamer); + if (!wkt.long0 && wkt.longc && (wkt.projName === 'Albers_Conic_Equal_Area' || wkt.projName === 'Lambert_Azimuthal_Equal_Area')) { + wkt.long0 = wkt.longc; + } + if (!wkt.lat_ts && wkt.lat1 && (wkt.projName === 'Stereographic_South_Pole' || wkt.projName === 'Polar Stereographic (variant B)')) { + wkt.lat0 = d2r(wkt.lat1 > 0 ? 90 : -90); + wkt.lat_ts = wkt.lat1; + } + } + var wkt = function(wkt) { + var lisp = parseString(wkt); + var type = lisp.shift(); + var name = lisp.shift(); + lisp.unshift(['name', name]); + lisp.unshift(['type', type]); + var obj = {}; + sExpr(lisp, obj); + cleanWKT(obj); + return obj; + }; + + function defs(name) { + /*global console*/ + var that = this; + if (arguments.length === 2) { + var def = arguments[1]; + if (typeof def === 'string') { + if (def.charAt(0) === '+') { + defs[name] = parseProj(arguments[1]); + } + else { + defs[name] = wkt(arguments[1]); + } + } else { + defs[name] = def; + } + } + else if (arguments.length === 1) { + if (Array.isArray(name)) { + return name.map(function(v) { + if (Array.isArray(v)) { + defs.apply(that, v); + } + else { + defs(v); + } + }); + } + else if (typeof name === 'string') { + if (name in defs) { + return defs[name]; + } + } + else if ('EPSG' in name) { + defs['EPSG:' + name.EPSG] = name; + } + else if ('ESRI' in name) { + defs['ESRI:' + name.ESRI] = name; + } + else if ('IAU2000' in name) { + defs['IAU2000:' + name.IAU2000] = name; + } + else { + console.log(name); + } + return; + } + + + } + globals(defs); + + function testObj(code){ + return typeof code === 'string'; + } + function testDef(code){ + return code in defs; + } + var codeWords = ['PROJECTEDCRS', 'PROJCRS', 'GEOGCS','GEOCCS','PROJCS','LOCAL_CS', 'GEODCRS', 'GEODETICCRS', 'GEODETICDATUM', 'ENGCRS', 'ENGINEERINGCRS']; + function testWKT(code){ + return codeWords.some(function (word) { + return code.indexOf(word) > -1; + }); + } + var codes = ['3857', '900913', '3785', '102113']; + function checkMercator(item) { + var auth = match(item, 'authority'); + if (!auth) { + return; + } + var code = match(auth, 'epsg'); + return code && codes.indexOf(code) > -1; + } + function checkProjStr(item) { + var ext = match(item, 'extension'); + if (!ext) { + return; + } + return match(ext, 'proj4'); + } + function testProj(code){ + return code[0] === '+'; + } + function parse(code){ + if (testObj(code)) { + //check to see if this is a WKT string + if (testDef(code)) { + return defs[code]; + } + if (testWKT(code)) { + var out = wkt(code); + // test of spetial case, due to this being a very common and often malformed + if (checkMercator(out)) { + return defs['EPSG:3857']; + } + var maybeProjStr = checkProjStr(out); + if (maybeProjStr) { + return parseProj(maybeProjStr); + } + return out; + } + if (testProj(code)) { + return parseProj(code); + } + }else{ + return code; + } + } + + var extend = function(destination, source) { + destination = destination || {}; + var value, property; + if (!source) { + return destination; + } + for (property in source) { + value = source[property]; + if (value !== undefined) { + destination[property] = value; + } + } + return destination; + }; + + var msfnz = function(eccent, sinphi, cosphi) { + var con = eccent * sinphi; + return cosphi / (Math.sqrt(1 - con * con)); + }; + + var sign = function(x) { + return x<0 ? -1 : 1; + }; + + var adjust_lon = function(x) { + return (Math.abs(x) <= SPI) ? x : (x - (sign(x) * TWO_PI)); + }; + + var tsfnz = function(eccent, phi, sinphi) { + var con = eccent * sinphi; + var com = 0.5 * eccent; + con = Math.pow(((1 - con) / (1 + con)), com); + return (Math.tan(0.5 * (HALF_PI - phi)) / con); + }; + + var phi2z = function(eccent, ts) { + var eccnth = 0.5 * eccent; + var con, dphi; + var phi = HALF_PI - 2 * Math.atan(ts); + for (var i = 0; i <= 15; i++) { + con = eccent * Math.sin(phi); + dphi = HALF_PI - 2 * Math.atan(ts * (Math.pow(((1 - con) / (1 + con)), eccnth))) - phi; + phi += dphi; + if (Math.abs(dphi) <= 0.0000000001) { + return phi; + } + } + //console.log("phi2z has NoConvergence"); + return -9999; + }; + + function init() { + var con = this.b / this.a; + this.es = 1 - con * con; + if(!('x0' in this)){ + this.x0 = 0; + } + if(!('y0' in this)){ + this.y0 = 0; + } + this.e = Math.sqrt(this.es); + if (this.lat_ts) { + if (this.sphere) { + this.k0 = Math.cos(this.lat_ts); + } + else { + this.k0 = msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)); + } + } + else { + if (!this.k0) { + if (this.k) { + this.k0 = this.k; + } + else { + this.k0 = 1; + } + } + } + } + + /* Mercator forward equations--mapping lat,long to x,y + --------------------------------------------------*/ + + function forward(p) { + var lon = p.x; + var lat = p.y; + // convert to radians + if (lat * R2D > 90 && lat * R2D < -90 && lon * R2D > 180 && lon * R2D < -180) { + return null; + } + + var x, y; + if (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN) { + return null; + } + else { + if (this.sphere) { + x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0); + y = this.y0 + this.a * this.k0 * Math.log(Math.tan(FORTPI + 0.5 * lat)); + } + else { + var sinphi = Math.sin(lat); + var ts = tsfnz(this.e, lat, sinphi); + x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0); + y = this.y0 - this.a * this.k0 * Math.log(ts); + } + p.x = x; + p.y = y; + return p; + } + } + + /* Mercator inverse equations--mapping x,y to lat/long + --------------------------------------------------*/ + function inverse(p) { + + var x = p.x - this.x0; + var y = p.y - this.y0; + var lon, lat; + + if (this.sphere) { + lat = HALF_PI - 2 * Math.atan(Math.exp(-y / (this.a * this.k0))); + } + else { + var ts = Math.exp(-y / (this.a * this.k0)); + lat = phi2z(this.e, ts); + if (lat === -9999) { + return null; + } + } + lon = adjust_lon(this.long0 + x / (this.a * this.k0)); + + p.x = lon; + p.y = lat; + return p; + } + + var names$1 = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"]; + var merc = { + init: init, + forward: forward, + inverse: inverse, + names: names$1 + }; + + function init$1() { + //no-op for longlat + } + + function identity(pt) { + return pt; + } + var names$2 = ["longlat", "identity"]; + var longlat = { + init: init$1, + forward: identity, + inverse: identity, + names: names$2 + }; + + var projs = [merc, longlat]; + var names = {}; + var projStore = []; + + function add(proj, i) { + var len = projStore.length; + if (!proj.names) { + console.log(i); + return true; + } + projStore[len] = proj; + proj.names.forEach(function(n) { + names[n.toLowerCase()] = len; + }); + return this; + } + + function get(name) { + if (!name) { + return false; + } + var n = name.toLowerCase(); + if (typeof names[n] !== 'undefined' && projStore[names[n]]) { + return projStore[names[n]]; + } + } + + function start() { + projs.forEach(add); + } + var projections = { + start: start, + add: add, + get: get + }; + + var exports$2 = {}; + exports$2.MERIT = { + a: 6378137.0, + rf: 298.257, + ellipseName: "MERIT 1983" + }; + + exports$2.SGS85 = { + a: 6378136.0, + rf: 298.257, + ellipseName: "Soviet Geodetic System 85" + }; + + exports$2.GRS80 = { + a: 6378137.0, + rf: 298.257222101, + ellipseName: "GRS 1980(IUGG, 1980)" + }; + + exports$2.IAU76 = { + a: 6378140.0, + rf: 298.257, + ellipseName: "IAU 1976" + }; + + exports$2.airy = { + a: 6377563.396, + b: 6356256.910, + ellipseName: "Airy 1830" + }; + + exports$2.APL4 = { + a: 6378137, + rf: 298.25, + ellipseName: "Appl. Physics. 1965" + }; + + exports$2.NWL9D = { + a: 6378145.0, + rf: 298.25, + ellipseName: "Naval Weapons Lab., 1965" + }; + + exports$2.mod_airy = { + a: 6377340.189, + b: 6356034.446, + ellipseName: "Modified Airy" + }; + + exports$2.andrae = { + a: 6377104.43, + rf: 300.0, + ellipseName: "Andrae 1876 (Den., Iclnd.)" + }; + + exports$2.aust_SA = { + a: 6378160.0, + rf: 298.25, + ellipseName: "Australian Natl & S. Amer. 1969" + }; + + exports$2.GRS67 = { + a: 6378160.0, + rf: 298.2471674270, + ellipseName: "GRS 67(IUGG 1967)" + }; + + exports$2.bessel = { + a: 6377397.155, + rf: 299.1528128, + ellipseName: "Bessel 1841" + }; + + exports$2.bess_nam = { + a: 6377483.865, + rf: 299.1528128, + ellipseName: "Bessel 1841 (Namibia)" + }; + + exports$2.clrk66 = { + a: 6378206.4, + b: 6356583.8, + ellipseName: "Clarke 1866" + }; + + exports$2.clrk80 = { + a: 6378249.145, + rf: 293.4663, + ellipseName: "Clarke 1880 mod." + }; + + exports$2.clrk58 = { + a: 6378293.645208759, + rf: 294.2606763692654, + ellipseName: "Clarke 1858" + }; + + exports$2.CPM = { + a: 6375738.7, + rf: 334.29, + ellipseName: "Comm. des Poids et Mesures 1799" + }; + + exports$2.delmbr = { + a: 6376428.0, + rf: 311.5, + ellipseName: "Delambre 1810 (Belgium)" + }; + + exports$2.engelis = { + a: 6378136.05, + rf: 298.2566, + ellipseName: "Engelis 1985" + }; + + exports$2.evrst30 = { + a: 6377276.345, + rf: 300.8017, + ellipseName: "Everest 1830" + }; + + exports$2.evrst48 = { + a: 6377304.063, + rf: 300.8017, + ellipseName: "Everest 1948" + }; + + exports$2.evrst56 = { + a: 6377301.243, + rf: 300.8017, + ellipseName: "Everest 1956" + }; + + exports$2.evrst69 = { + a: 6377295.664, + rf: 300.8017, + ellipseName: "Everest 1969" + }; + + exports$2.evrstSS = { + a: 6377298.556, + rf: 300.8017, + ellipseName: "Everest (Sabah & Sarawak)" + }; + + exports$2.fschr60 = { + a: 6378166.0, + rf: 298.3, + ellipseName: "Fischer (Mercury Datum) 1960" + }; + + exports$2.fschr60m = { + a: 6378155.0, + rf: 298.3, + ellipseName: "Fischer 1960" + }; + + exports$2.fschr68 = { + a: 6378150.0, + rf: 298.3, + ellipseName: "Fischer 1968" + }; + + exports$2.helmert = { + a: 6378200.0, + rf: 298.3, + ellipseName: "Helmert 1906" + }; + + exports$2.hough = { + a: 6378270.0, + rf: 297.0, + ellipseName: "Hough" + }; + + exports$2.intl = { + a: 6378388.0, + rf: 297.0, + ellipseName: "International 1909 (Hayford)" + }; + + exports$2.kaula = { + a: 6378163.0, + rf: 298.24, + ellipseName: "Kaula 1961" + }; + + exports$2.lerch = { + a: 6378139.0, + rf: 298.257, + ellipseName: "Lerch 1979" + }; + + exports$2.mprts = { + a: 6397300.0, + rf: 191.0, + ellipseName: "Maupertius 1738" + }; + + exports$2.new_intl = { + a: 6378157.5, + b: 6356772.2, + ellipseName: "New International 1967" + }; + + exports$2.plessis = { + a: 6376523.0, + rf: 6355863.0, + ellipseName: "Plessis 1817 (France)" + }; + + exports$2.krass = { + a: 6378245.0, + rf: 298.3, + ellipseName: "Krassovsky, 1942" + }; + + exports$2.SEasia = { + a: 6378155.0, + b: 6356773.3205, + ellipseName: "Southeast Asia" + }; + + exports$2.walbeck = { + a: 6376896.0, + b: 6355834.8467, + ellipseName: "Walbeck" + }; + + exports$2.WGS60 = { + a: 6378165.0, + rf: 298.3, + ellipseName: "WGS 60" + }; + + exports$2.WGS66 = { + a: 6378145.0, + rf: 298.25, + ellipseName: "WGS 66" + }; + + exports$2.WGS7 = { + a: 6378135.0, + rf: 298.26, + ellipseName: "WGS 72" + }; + + var WGS84 = exports$2.WGS84 = { + a: 6378137.0, + rf: 298.257223563, + ellipseName: "WGS 84" + }; + + exports$2.sphere = { + a: 6370997.0, + b: 6370997.0, + ellipseName: "Normal Sphere (r=6370997)" + }; + + function eccentricity(a, b, rf, R_A) { + var a2 = a * a; // used in geocentric + var b2 = b * b; // used in geocentric + var es = (a2 - b2) / a2; // e ^ 2 + var e = 0; + if (R_A) { + a *= 1 - es * (SIXTH + es * (RA4 + es * RA6)); + a2 = a * a; + es = 0; + } else { + e = Math.sqrt(es); // eccentricity + } + var ep2 = (a2 - b2) / b2; // used in geocentric + return { + es: es, + e: e, + ep2: ep2 + }; + } + function sphere(a, b, rf, ellps, sphere) { + if (!a) { // do we have an ellipsoid? + var ellipse = match(exports$2, ellps); + if (!ellipse) { + ellipse = WGS84; + } + a = ellipse.a; + b = ellipse.b; + rf = ellipse.rf; + } + + if (rf && !b) { + b = (1.0 - 1.0 / rf) * a; + } + if (rf === 0 || Math.abs(a - b) < EPSLN) { + sphere = true; + b = a; + } + return { + a: a, + b: b, + rf: rf, + sphere: sphere + }; + } + + var exports$3 = {}; + exports$3.wgs84 = { + towgs84: "0,0,0", + ellipse: "WGS84", + datumName: "WGS84" + }; + + exports$3.ch1903 = { + towgs84: "674.374,15.056,405.346", + ellipse: "bessel", + datumName: "swiss" + }; + + exports$3.ggrs87 = { + towgs84: "-199.87,74.79,246.62", + ellipse: "GRS80", + datumName: "Greek_Geodetic_Reference_System_1987" + }; + + exports$3.nad83 = { + towgs84: "0,0,0", + ellipse: "GRS80", + datumName: "North_American_Datum_1983" + }; + + exports$3.nad27 = { + nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat", + ellipse: "clrk66", + datumName: "North_American_Datum_1927" + }; + + exports$3.potsdam = { + towgs84: "598.1,73.7,418.2,0.202,0.045,-2.455,6.7", + ellipse: "bessel", + datumName: "Potsdam Rauenberg 1950 DHDN" + }; + + exports$3.carthage = { + towgs84: "-263.0,6.0,431.0", + ellipse: "clark80", + datumName: "Carthage 1934 Tunisia" + }; + + exports$3.hermannskogel = { + towgs84: "577.326,90.129,463.919,5.137,1.474,5.297,2.4232", + ellipse: "bessel", + datumName: "Hermannskogel" + }; + + exports$3.osni52 = { + towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15", + ellipse: "airy", + datumName: "Irish National" + }; + + exports$3.ire65 = { + towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15", + ellipse: "mod_airy", + datumName: "Ireland 1965" + }; + + exports$3.rassadiran = { + towgs84: "-133.63,-157.5,-158.62", + ellipse: "intl", + datumName: "Rassadiran" + }; + + exports$3.nzgd49 = { + towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993", + ellipse: "intl", + datumName: "New Zealand Geodetic Datum 1949" + }; + + exports$3.osgb36 = { + towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894", + ellipse: "airy", + datumName: "Airy 1830" + }; + + exports$3.s_jtsk = { + towgs84: "589,76,480", + ellipse: 'bessel', + datumName: 'S-JTSK (Ferro)' + }; + + exports$3.beduaram = { + towgs84: '-106,-87,188', + ellipse: 'clrk80', + datumName: 'Beduaram' + }; + + exports$3.gunung_segara = { + towgs84: '-403,684,41', + ellipse: 'bessel', + datumName: 'Gunung Segara Jakarta' + }; + + exports$3.rnb72 = { + towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1", + ellipse: "intl", + datumName: "Reseau National Belge 1972" + }; + + function datum(datumCode, datum_params, a, b, es, ep2, nadgrids) { + var out = {}; + + if (datumCode === undefined || datumCode === 'none') { + out.datum_type = PJD_NODATUM; + } else { + out.datum_type = PJD_WGS84; + } + + if (datum_params) { + out.datum_params = datum_params.map(parseFloat); + if (out.datum_params[0] !== 0 || out.datum_params[1] !== 0 || out.datum_params[2] !== 0) { + out.datum_type = PJD_3PARAM; + } + if (out.datum_params.length > 3) { + if (out.datum_params[3] !== 0 || out.datum_params[4] !== 0 || out.datum_params[5] !== 0 || out.datum_params[6] !== 0) { + out.datum_type = PJD_7PARAM; + out.datum_params[3] *= SEC_TO_RAD; + out.datum_params[4] *= SEC_TO_RAD; + out.datum_params[5] *= SEC_TO_RAD; + out.datum_params[6] = (out.datum_params[6] / 1000000.0) + 1.0; + } + } + } + + if (nadgrids) { + out.datum_type = PJD_GRIDSHIFT; + out.grids = nadgrids; + } + out.a = a; //datum object also uses these values + out.b = b; + out.es = es; + out.ep2 = ep2; + return out; + } + + /** + * Resources for details of NTv2 file formats: + * - https://web.archive.org/web/20140127204822if_/http://www.mgs.gov.on.ca:80/stdprodconsume/groups/content/@mgs/@iandit/documents/resourcelist/stel02_047447.pdf + * - http://mimaka.com/help/gs/html/004_NTV2%20Data%20Format.htm + */ + + var loadedNadgrids = {}; + + /** + * Load a binary NTv2 file (.gsb) to a key that can be used in a proj string like +nadgrids=. Pass the NTv2 file + * as an ArrayBuffer. + */ + function nadgrid(key, data) { + var view = new DataView(data); + var isLittleEndian = detectLittleEndian(view); + var header = readHeader(view, isLittleEndian); + if (header.nSubgrids > 1) { + console.log('Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored'); + } + var subgrids = readSubgrids(view, header, isLittleEndian); + var nadgrid = {header: header, subgrids: subgrids}; + loadedNadgrids[key] = nadgrid; + return nadgrid; + } + + /** + * Given a proj4 value for nadgrids, return an array of loaded grids + */ + function getNadgrids(nadgrids) { + // Format details: http://proj.maptools.org/gen_parms.html + if (nadgrids === undefined) { return null; } + var grids = nadgrids.split(','); + return grids.map(parseNadgridString); + } + + function parseNadgridString(value) { + if (value.length === 0) { + return null; + } + var optional = value[0] === '@'; + if (optional) { + value = value.slice(1); + } + if (value === 'null') { + return {name: 'null', mandatory: !optional, grid: null, isNull: true}; + } + return { + name: value, + mandatory: !optional, + grid: loadedNadgrids[value] || null, + isNull: false + }; + } + + function secondsToRadians(seconds) { + return (seconds / 3600) * Math.PI / 180; + } + + function detectLittleEndian(view) { + var nFields = view.getInt32(8, false); + if (nFields === 11) { + return false; + } + nFields = view.getInt32(8, true); + if (nFields !== 11) { + console.warn('Failed to detect nadgrid endian-ness, defaulting to little-endian'); + } + return true; + } + + function readHeader(view, isLittleEndian) { + return { + nFields: view.getInt32(8, isLittleEndian), + nSubgridFields: view.getInt32(24, isLittleEndian), + nSubgrids: view.getInt32(40, isLittleEndian), + shiftType: decodeString(view, 56, 56 + 8).trim(), + fromSemiMajorAxis: view.getFloat64(120, isLittleEndian), + fromSemiMinorAxis: view.getFloat64(136, isLittleEndian), + toSemiMajorAxis: view.getFloat64(152, isLittleEndian), + toSemiMinorAxis: view.getFloat64(168, isLittleEndian), + }; + } + + function decodeString(view, start, end) { + return String.fromCharCode.apply(null, new Uint8Array(view.buffer.slice(start, end))); + } + + function readSubgrids(view, header, isLittleEndian) { + var gridOffset = 176; + var grids = []; + for (var i = 0; i < header.nSubgrids; i++) { + var subHeader = readGridHeader(view, gridOffset, isLittleEndian); + var nodes = readGridNodes(view, gridOffset, subHeader, isLittleEndian); + var lngColumnCount = Math.round( + 1 + (subHeader.upperLongitude - subHeader.lowerLongitude) / subHeader.longitudeInterval); + var latColumnCount = Math.round( + 1 + (subHeader.upperLatitude - subHeader.lowerLatitude) / subHeader.latitudeInterval); + // Proj4 operates on radians whereas the coordinates are in seconds in the grid + grids.push({ + ll: [secondsToRadians(subHeader.lowerLongitude), secondsToRadians(subHeader.lowerLatitude)], + del: [secondsToRadians(subHeader.longitudeInterval), secondsToRadians(subHeader.latitudeInterval)], + lim: [lngColumnCount, latColumnCount], + count: subHeader.gridNodeCount, + cvs: mapNodes(nodes) + }); + } + return grids; + } + + function mapNodes(nodes) { + return nodes.map(function (r) {return [secondsToRadians(r.longitudeShift), secondsToRadians(r.latitudeShift)];}); + } + + function readGridHeader(view, offset, isLittleEndian) { + return { + name: decodeString(view, offset + 8, offset + 16).trim(), + parent: decodeString(view, offset + 24, offset + 24 + 8).trim(), + lowerLatitude: view.getFloat64(offset + 72, isLittleEndian), + upperLatitude: view.getFloat64(offset + 88, isLittleEndian), + lowerLongitude: view.getFloat64(offset + 104, isLittleEndian), + upperLongitude: view.getFloat64(offset + 120, isLittleEndian), + latitudeInterval: view.getFloat64(offset + 136, isLittleEndian), + longitudeInterval: view.getFloat64(offset + 152, isLittleEndian), + gridNodeCount: view.getInt32(offset + 168, isLittleEndian) + }; + } + + function readGridNodes(view, offset, gridHeader, isLittleEndian) { + var nodesOffset = offset + 176; + var gridRecordLength = 16; + var gridShiftRecords = []; + for (var i = 0; i < gridHeader.gridNodeCount; i++) { + var record = { + latitudeShift: view.getFloat32(nodesOffset + i * gridRecordLength, isLittleEndian), + longitudeShift: view.getFloat32(nodesOffset + i * gridRecordLength + 4, isLittleEndian), + latitudeAccuracy: view.getFloat32(nodesOffset + i * gridRecordLength + 8, isLittleEndian), + longitudeAccuracy: view.getFloat32(nodesOffset + i * gridRecordLength + 12, isLittleEndian), + }; + gridShiftRecords.push(record); + } + return gridShiftRecords; + } + + function Projection(srsCode,callback) { + if (!(this instanceof Projection)) { + return new Projection(srsCode); + } + callback = callback || function(error){ + if(error){ + throw error; + } + }; + var json = parse(srsCode); + if(typeof json !== 'object'){ + callback(srsCode); + return; + } + var ourProj = Projection.projections.get(json.projName); + if(!ourProj){ + callback(srsCode); + return; + } + if (json.datumCode && json.datumCode !== 'none') { + var datumDef = match(exports$3, json.datumCode); + if (datumDef) { + json.datum_params = json.datum_params || (datumDef.towgs84 ? datumDef.towgs84.split(',') : null); + json.ellps = datumDef.ellipse; + json.datumName = datumDef.datumName ? datumDef.datumName : json.datumCode; + } + } + json.k0 = json.k0 || 1.0; + json.axis = json.axis || 'enu'; + json.ellps = json.ellps || 'wgs84'; + json.lat1 = json.lat1 || json.lat0; // Lambert_Conformal_Conic_1SP, for example, needs this + + var sphere_ = sphere(json.a, json.b, json.rf, json.ellps, json.sphere); + var ecc = eccentricity(sphere_.a, sphere_.b, sphere_.rf, json.R_A); + var nadgrids = getNadgrids(json.nadgrids); + var datumObj = json.datum || datum(json.datumCode, json.datum_params, sphere_.a, sphere_.b, ecc.es, ecc.ep2, + nadgrids); + + extend(this, json); // transfer everything over from the projection because we don't know what we'll need + extend(this, ourProj); // transfer all the methods from the projection + + // copy the 4 things over we calulated in deriveConstants.sphere + this.a = sphere_.a; + this.b = sphere_.b; + this.rf = sphere_.rf; + this.sphere = sphere_.sphere; + + // copy the 3 things we calculated in deriveConstants.eccentricity + this.es = ecc.es; + this.e = ecc.e; + this.ep2 = ecc.ep2; + + // add in the datum object + this.datum = datumObj; + + // init the projection + this.init(); + + // legecy callback from back in the day when it went to spatialreference.org + callback(null, this); + + } + Projection.projections = projections; + Projection.projections.start(); + + 'use strict'; + function compareDatums(source, dest) { + if (source.datum_type !== dest.datum_type) { + return false; // false, datums are not equal + } else if (source.a !== dest.a || Math.abs(source.es - dest.es) > 0.000000000050) { + // the tolerance for es is to ensure that GRS80 and WGS84 + // are considered identical + return false; + } else if (source.datum_type === PJD_3PARAM) { + return (source.datum_params[0] === dest.datum_params[0] && source.datum_params[1] === dest.datum_params[1] && source.datum_params[2] === dest.datum_params[2]); + } else if (source.datum_type === PJD_7PARAM) { + return (source.datum_params[0] === dest.datum_params[0] && source.datum_params[1] === dest.datum_params[1] && source.datum_params[2] === dest.datum_params[2] && source.datum_params[3] === dest.datum_params[3] && source.datum_params[4] === dest.datum_params[4] && source.datum_params[5] === dest.datum_params[5] && source.datum_params[6] === dest.datum_params[6]); + } else { + return true; // datums are equal + } + } // cs_compare_datums() + + /* + * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates + * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z), + * according to the current ellipsoid parameters. + * + * Latitude : Geodetic latitude in radians (input) + * Longitude : Geodetic longitude in radians (input) + * Height : Geodetic height, in meters (input) + * X : Calculated Geocentric X coordinate, in meters (output) + * Y : Calculated Geocentric Y coordinate, in meters (output) + * Z : Calculated Geocentric Z coordinate, in meters (output) + * + */ + function geodeticToGeocentric(p, es, a) { + var Longitude = p.x; + var Latitude = p.y; + var Height = p.z ? p.z : 0; //Z value not always supplied + + var Rn; /* Earth radius at location */ + var Sin_Lat; /* Math.sin(Latitude) */ + var Sin2_Lat; /* Square of Math.sin(Latitude) */ + var Cos_Lat; /* Math.cos(Latitude) */ + + /* + ** Don't blow up if Latitude is just a little out of the value + ** range as it may just be a rounding issue. Also removed longitude + ** test, it should be wrapped by Math.cos() and Math.sin(). NFW for PROJ.4, Sep/2001. + */ + if (Latitude < -HALF_PI && Latitude > -1.001 * HALF_PI) { + Latitude = -HALF_PI; + } else if (Latitude > HALF_PI && Latitude < 1.001 * HALF_PI) { + Latitude = HALF_PI; + } else if (Latitude < -HALF_PI) { + /* Latitude out of range */ + //..reportError('geocent:lat out of range:' + Latitude); + return { x: -Infinity, y: -Infinity, z: p.z }; + } else if (Latitude > HALF_PI) { + /* Latitude out of range */ + return { x: Infinity, y: Infinity, z: p.z }; + } + + if (Longitude > Math.PI) { + Longitude -= (2 * Math.PI); + } + Sin_Lat = Math.sin(Latitude); + Cos_Lat = Math.cos(Latitude); + Sin2_Lat = Sin_Lat * Sin_Lat; + Rn = a / (Math.sqrt(1.0e0 - es * Sin2_Lat)); + return { + x: (Rn + Height) * Cos_Lat * Math.cos(Longitude), + y: (Rn + Height) * Cos_Lat * Math.sin(Longitude), + z: ((Rn * (1 - es)) + Height) * Sin_Lat + }; + } // cs_geodetic_to_geocentric() + + function geocentricToGeodetic(p, es, a, b) { + /* local defintions and variables */ + /* end-criterium of loop, accuracy of sin(Latitude) */ + var genau = 1e-12; + var genau2 = (genau * genau); + var maxiter = 30; + + var P; /* distance between semi-minor axis and location */ + var RR; /* distance between center and location */ + var CT; /* sin of geocentric latitude */ + var ST; /* cos of geocentric latitude */ + var RX; + var RK; + var RN; /* Earth radius at location */ + var CPHI0; /* cos of start or old geodetic latitude in iterations */ + var SPHI0; /* sin of start or old geodetic latitude in iterations */ + var CPHI; /* cos of searched geodetic latitude */ + var SPHI; /* sin of searched geodetic latitude */ + var SDPHI; /* end-criterium: addition-theorem of sin(Latitude(iter)-Latitude(iter-1)) */ + var iter; /* # of continous iteration, max. 30 is always enough (s.a.) */ + + var X = p.x; + var Y = p.y; + var Z = p.z ? p.z : 0.0; //Z value not always supplied + var Longitude; + var Latitude; + var Height; + + P = Math.sqrt(X * X + Y * Y); + RR = Math.sqrt(X * X + Y * Y + Z * Z); + + /* special cases for latitude and longitude */ + if (P / a < genau) { + + /* special case, if P=0. (X=0., Y=0.) */ + Longitude = 0.0; + + /* if (X,Y,Z)=(0.,0.,0.) then Height becomes semi-minor axis + * of ellipsoid (=center of mass), Latitude becomes PI/2 */ + if (RR / a < genau) { + Latitude = HALF_PI; + Height = -b; + return { + x: p.x, + y: p.y, + z: p.z + }; + } + } else { + /* ellipsoidal (geodetic) longitude + * interval: -PI < Longitude <= +PI */ + Longitude = Math.atan2(Y, X); + } + + /* -------------------------------------------------------------- + * Following iterative algorithm was developped by + * "Institut for Erdmessung", University of Hannover, July 1988. + * Internet: www.ife.uni-hannover.de + * Iterative computation of CPHI,SPHI and Height. + * Iteration of CPHI and SPHI to 10**-12 radian resp. + * 2*10**-7 arcsec. + * -------------------------------------------------------------- + */ + CT = Z / RR; + ST = P / RR; + RX = 1.0 / Math.sqrt(1.0 - es * (2.0 - es) * ST * ST); + CPHI0 = ST * (1.0 - es) * RX; + SPHI0 = CT * RX; + iter = 0; + + /* loop to find sin(Latitude) resp. Latitude + * until |sin(Latitude(iter)-Latitude(iter-1))| < genau */ + do { + iter++; + RN = a / Math.sqrt(1.0 - es * SPHI0 * SPHI0); + + /* ellipsoidal (geodetic) height */ + Height = P * CPHI0 + Z * SPHI0 - RN * (1.0 - es * SPHI0 * SPHI0); + + RK = es * RN / (RN + Height); + RX = 1.0 / Math.sqrt(1.0 - RK * (2.0 - RK) * ST * ST); + CPHI = ST * (1.0 - RK) * RX; + SPHI = CT * RX; + SDPHI = SPHI * CPHI0 - CPHI * SPHI0; + CPHI0 = CPHI; + SPHI0 = SPHI; + } + while (SDPHI * SDPHI > genau2 && iter < maxiter); + + /* ellipsoidal (geodetic) latitude */ + Latitude = Math.atan(SPHI / Math.abs(CPHI)); + return { + x: Longitude, + y: Latitude, + z: Height + }; + } // cs_geocentric_to_geodetic() + + /****************************************************************/ + // pj_geocentic_to_wgs84( p ) + // p = point to transform in geocentric coordinates (x,y,z) + + + /** point object, nothing fancy, just allows values to be + passed back and forth by reference rather than by value. + Other point classes may be used as long as they have + x and y properties, which will get modified in the transform method. + */ + function geocentricToWgs84(p, datum_type, datum_params) { + + if (datum_type === PJD_3PARAM) { + // if( x[io] === HUGE_VAL ) + // continue; + return { + x: p.x + datum_params[0], + y: p.y + datum_params[1], + z: p.z + datum_params[2], + }; + } else if (datum_type === PJD_7PARAM) { + var Dx_BF = datum_params[0]; + var Dy_BF = datum_params[1]; + var Dz_BF = datum_params[2]; + var Rx_BF = datum_params[3]; + var Ry_BF = datum_params[4]; + var Rz_BF = datum_params[5]; + var M_BF = datum_params[6]; + // if( x[io] === HUGE_VAL ) + // continue; + return { + x: M_BF * (p.x - Rz_BF * p.y + Ry_BF * p.z) + Dx_BF, + y: M_BF * (Rz_BF * p.x + p.y - Rx_BF * p.z) + Dy_BF, + z: M_BF * (-Ry_BF * p.x + Rx_BF * p.y + p.z) + Dz_BF + }; + } + } // cs_geocentric_to_wgs84 + + /****************************************************************/ + // pj_geocentic_from_wgs84() + // coordinate system definition, + // point to transform in geocentric coordinates (x,y,z) + function geocentricFromWgs84(p, datum_type, datum_params) { + + if (datum_type === PJD_3PARAM) { + //if( x[io] === HUGE_VAL ) + // continue; + return { + x: p.x - datum_params[0], + y: p.y - datum_params[1], + z: p.z - datum_params[2], + }; + + } else if (datum_type === PJD_7PARAM) { + var Dx_BF = datum_params[0]; + var Dy_BF = datum_params[1]; + var Dz_BF = datum_params[2]; + var Rx_BF = datum_params[3]; + var Ry_BF = datum_params[4]; + var Rz_BF = datum_params[5]; + var M_BF = datum_params[6]; + var x_tmp = (p.x - Dx_BF) / M_BF; + var y_tmp = (p.y - Dy_BF) / M_BF; + var z_tmp = (p.z - Dz_BF) / M_BF; + //if( x[io] === HUGE_VAL ) + // continue; + + return { + x: x_tmp + Rz_BF * y_tmp - Ry_BF * z_tmp, + y: -Rz_BF * x_tmp + y_tmp + Rx_BF * z_tmp, + z: Ry_BF * x_tmp - Rx_BF * y_tmp + z_tmp + }; + } //cs_geocentric_from_wgs84() + } + + function checkParams(type) { + return (type === PJD_3PARAM || type === PJD_7PARAM); + } + + var datum_transform = function(source, dest, point) { + // Short cut if the datums are identical. + if (compareDatums(source, dest)) { + return point; // in this case, zero is sucess, + // whereas cs_compare_datums returns 1 to indicate TRUE + // confusing, should fix this + } + + // Explicitly skip datum transform by setting 'datum=none' as parameter for either source or dest + if (source.datum_type === PJD_NODATUM || dest.datum_type === PJD_NODATUM) { + return point; + } + + // If this datum requires grid shifts, then apply it to geodetic coordinates. + var source_a = source.a; + var source_es = source.es; + if (source.datum_type === PJD_GRIDSHIFT) { + var gridShiftCode = applyGridShift(source, false, point); + if (gridShiftCode !== 0) { + return undefined; + } + source_a = SRS_WGS84_SEMIMAJOR; + source_es = SRS_WGS84_ESQUARED; + } + + var dest_a = dest.a; + var dest_b = dest.b; + var dest_es = dest.es; + if (dest.datum_type === PJD_GRIDSHIFT) { + dest_a = SRS_WGS84_SEMIMAJOR; + dest_b = SRS_WGS84_SEMIMINOR; + dest_es = SRS_WGS84_ESQUARED; + } + + // Do we need to go through geocentric coordinates? + if (source_es === dest_es && source_a === dest_a && !checkParams(source.datum_type) && !checkParams(dest.datum_type)) { + return point; + } + + // Convert to geocentric coordinates. + point = geodeticToGeocentric(point, source_es, source_a); + // Convert between datums + if (checkParams(source.datum_type)) { + point = geocentricToWgs84(point, source.datum_type, source.datum_params); + } + if (checkParams(dest.datum_type)) { + point = geocentricFromWgs84(point, dest.datum_type, dest.datum_params); + } + point = geocentricToGeodetic(point, dest_es, dest_a, dest_b); + + if (dest.datum_type === PJD_GRIDSHIFT) { + var destGridShiftResult = applyGridShift(dest, true, point); + if (destGridShiftResult !== 0) { + return undefined; + } + } + + return point; + }; + + function applyGridShift(source, inverse, point) { + if (source.grids === null || source.grids.length === 0) { + console.log('Grid shift grids not found'); + return -1; + } + var input = {x: -point.x, y: point.y}; + var output = {x: Number.NaN, y: Number.NaN}; + var attemptedGrids = []; + for (var i = 0; i < source.grids.length; i++) { + var grid = source.grids[i]; + attemptedGrids.push(grid.name); + if (grid.isNull) { + output = input; + break; + } + if (grid.grid === null) { + if (grid.mandatory) { + console.log("Unable to find mandatory grid '" + grid.name + "'"); + return -1; + } + continue; + } + var subgrid = grid.grid.subgrids[0]; + // skip tables that don't match our point at all + var epsilon = (Math.abs(subgrid.del[1]) + Math.abs(subgrid.del[0])) / 10000.0; + var minX = subgrid.ll[0] - epsilon; + var minY = subgrid.ll[1] - epsilon; + var maxX = subgrid.ll[0] + (subgrid.lim[0] - 1) * subgrid.del[0] + epsilon; + var maxY = subgrid.ll[1] + (subgrid.lim[1] - 1) * subgrid.del[1] + epsilon; + if (minY > input.y || minX > input.x || maxY < input.y || maxX < input.x ) { + continue; + } + output = applySubgridShift(input, inverse, subgrid); + if (!isNaN(output.x)) { + break; + } + } + if (isNaN(output.x)) { + console.log("Failed to find a grid shift table for location '"+ + -input.x * R2D + " " + input.y * R2D + " tried: '" + attemptedGrids + "'"); + return -1; + } + point.x = -output.x; + point.y = output.y; + return 0; + } + + function applySubgridShift(pin, inverse, ct) { + var val = {x: Number.NaN, y: Number.NaN}; + if (isNaN(pin.x)) { return val; } + var tb = {x: pin.x, y: pin.y}; + tb.x -= ct.ll[0]; + tb.y -= ct.ll[1]; + tb.x = adjust_lon(tb.x - Math.PI) + Math.PI; + var t = nadInterpolate(tb, ct); + if (inverse) { + if (isNaN(t.x)) { + return val; + } + t.x = tb.x - t.x; + t.y = tb.y - t.y; + var i = 9, tol = 1e-12; + var dif, del; + do { + del = nadInterpolate(t, ct); + if (isNaN(del.x)) { + console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation."); + break; + } + dif = {x: tb.x - (del.x + t.x), y: tb.y - (del.y + t.y)}; + t.x += dif.x; + t.y += dif.y; + } while (i-- && Math.abs(dif.x) > tol && Math.abs(dif.y) > tol); + if (i < 0) { + console.log("Inverse grid shift iterator failed to converge."); + return val; + } + val.x = adjust_lon(t.x + ct.ll[0]); + val.y = t.y + ct.ll[1]; + } else { + if (!isNaN(t.x)) { + val.x = pin.x + t.x; + val.y = pin.y + t.y; + } + } + return val; + } + + function nadInterpolate(pin, ct) { + var t = {x: pin.x / ct.del[0], y: pin.y / ct.del[1]}; + var indx = {x: Math.floor(t.x), y: Math.floor(t.y)}; + var frct = {x: t.x - 1.0 * indx.x, y: t.y - 1.0 * indx.y}; + var val= {x: Number.NaN, y: Number.NaN}; + var inx; + if (indx.x < 0 || indx.x >= ct.lim[0]) { + return val; + } + if (indx.y < 0 || indx.y >= ct.lim[1]) { + return val; + } + inx = (indx.y * ct.lim[0]) + indx.x; + var f00 = {x: ct.cvs[inx][0], y: ct.cvs[inx][1]}; + inx++; + var f10= {x: ct.cvs[inx][0], y: ct.cvs[inx][1]}; + inx += ct.lim[0]; + var f11 = {x: ct.cvs[inx][0], y: ct.cvs[inx][1]}; + inx--; + var f01 = {x: ct.cvs[inx][0], y: ct.cvs[inx][1]}; + var m11 = frct.x * frct.y, m10 = frct.x * (1.0 - frct.y), + m00 = (1.0 - frct.x) * (1.0 - frct.y), m01 = (1.0 - frct.x) * frct.y; + val.x = (m00 * f00.x + m10 * f10.x + m01 * f01.x + m11 * f11.x); + val.y = (m00 * f00.y + m10 * f10.y + m01 * f01.y + m11 * f11.y); + return val; + } + + var adjust_axis = function(crs, denorm, point) { + var xin = point.x, + yin = point.y, + zin = point.z || 0.0; + var v, t, i; + var out = {}; + for (i = 0; i < 3; i++) { + if (denorm && i === 2 && point.z === undefined) { + continue; + } + if (i === 0) { + v = xin; + if ("ew".indexOf(crs.axis[i]) !== -1) { + t = 'x'; + } else { + t = 'y'; + } + + } + else if (i === 1) { + v = yin; + if ("ns".indexOf(crs.axis[i]) !== -1) { + t = 'y'; + } else { + t = 'x'; + } + } + else { + v = zin; + t = 'z'; + } + switch (crs.axis[i]) { + case 'e': + out[t] = v; + break; + case 'w': + out[t] = -v; + break; + case 'n': + out[t] = v; + break; + case 's': + out[t] = -v; + break; + case 'u': + if (point[t] !== undefined) { + out.z = v; + } + break; + case 'd': + if (point[t] !== undefined) { + out.z = -v; + } + break; + default: + //console.log("ERROR: unknow axis ("+crs.axis[i]+") - check definition of "+crs.projName); + return null; + } + } + return out; + }; + + var toPoint = function (array){ + var out = { + x: array[0], + y: array[1] + }; + if (array.length>2) { + out.z = array[2]; + } + if (array.length>3) { + out.m = array[3]; + } + return out; + }; + + var checkSanity = function (point) { + checkCoord(point.x); + checkCoord(point.y); + }; + function checkCoord(num) { + if (typeof Number.isFinite === 'function') { + if (Number.isFinite(num)) { + return; + } + throw new TypeError('coordinates must be finite numbers'); + } + if (typeof num !== 'number' || num !== num || !isFinite(num)) { + throw new TypeError('coordinates must be finite numbers'); + } + } + + function checkNotWGS(source, dest) { + return ((source.datum.datum_type === PJD_3PARAM || source.datum.datum_type === PJD_7PARAM) && dest.datumCode !== 'WGS84') || ((dest.datum.datum_type === PJD_3PARAM || dest.datum.datum_type === PJD_7PARAM) && source.datumCode !== 'WGS84'); + } + + function transform(source, dest, point, enforceAxis) { + var wgs84; + if (Array.isArray(point)) { + point = toPoint(point); + } + checkSanity(point); + // Workaround for datum shifts towgs84, if either source or destination projection is not wgs84 + if (source.datum && dest.datum && checkNotWGS(source, dest)) { + wgs84 = new Projection('WGS84'); + point = transform(source, wgs84, point, enforceAxis); + source = wgs84; + } + // DGR, 2010/11/12 + if (enforceAxis && source.axis !== 'enu') { + point = adjust_axis(source, false, point); + } + // Transform source points to long/lat, if they aren't already. + if (source.projName === 'longlat') { + point = { + x: point.x * D2R, + y: point.y * D2R, + z: point.z || 0 + }; + } else { + if (source.to_meter) { + point = { + x: point.x * source.to_meter, + y: point.y * source.to_meter, + z: point.z || 0 + }; + } + point = source.inverse(point); // Convert Cartesian to longlat + if (!point) { + return; + } + } + // Adjust for the prime meridian if necessary + if (source.from_greenwich) { + point.x += source.from_greenwich; + } + + // Convert datums if needed, and if possible. + point = datum_transform(source.datum, dest.datum, point); + if (!point) { + return; + } + + // Adjust for the prime meridian if necessary + if (dest.from_greenwich) { + point = { + x: point.x - dest.from_greenwich, + y: point.y, + z: point.z || 0 + }; + } + + if (dest.projName === 'longlat') { + // convert radians to decimal degrees + point = { + x: point.x * R2D, + y: point.y * R2D, + z: point.z || 0 + }; + } else { // else project + point = dest.forward(point); + if (dest.to_meter) { + point = { + x: point.x / dest.to_meter, + y: point.y / dest.to_meter, + z: point.z || 0 + }; + } + } + + // DGR, 2010/11/12 + if (enforceAxis && dest.axis !== 'enu') { + return adjust_axis(dest, true, point); + } + + return point; + } + + var wgs84 = Projection('WGS84'); + + function transformer(from, to, coords, enforceAxis) { + var transformedArray, out, keys; + if (Array.isArray(coords)) { + transformedArray = transform(from, to, coords, enforceAxis) || {x: NaN, y: NaN}; + if (coords.length > 2) { + if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) { + if (typeof transformedArray.z === 'number') { + return [transformedArray.x, transformedArray.y, transformedArray.z].concat(coords.splice(3)); + } else { + return [transformedArray.x, transformedArray.y, coords[2]].concat(coords.splice(3)); + } + } else { + return [transformedArray.x, transformedArray.y].concat(coords.splice(2)); + } + } else { + return [transformedArray.x, transformedArray.y]; + } + } else { + out = transform(from, to, coords, enforceAxis); + keys = Object.keys(coords); + if (keys.length === 2) { + return out; + } + keys.forEach(function (key) { + if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) { + if (key === 'x' || key === 'y' || key === 'z') { + return; + } + } else { + if (key === 'x' || key === 'y') { + return; + } + } + out[key] = coords[key]; + }); + return out; + } + } + + function checkProj(item) { + if (item instanceof Projection) { + return item; + } + if (item.oProj) { + return item.oProj; + } + return Projection(item); + } + + function proj4$1(fromProj, toProj, coord) { + fromProj = checkProj(fromProj); + var single = false; + var obj; + if (typeof toProj === 'undefined') { + toProj = fromProj; + fromProj = wgs84; + single = true; + } else if (typeof toProj.x !== 'undefined' || Array.isArray(toProj)) { + coord = toProj; + toProj = fromProj; + fromProj = wgs84; + single = true; + } + toProj = checkProj(toProj); + if (coord) { + return transformer(fromProj, toProj, coord); + } else { + obj = { + forward: function (coords, enforceAxis) { + return transformer(fromProj, toProj, coords, enforceAxis); + }, + inverse: function (coords, enforceAxis) { + return transformer(toProj, fromProj, coords, enforceAxis); + } + }; + if (single) { + obj.oProj = toProj; + } + return obj; + } + } + + /** + * UTM zones are grouped, and assigned to one of a group of 6 + * sets. + * + * {int} @private + */ + var NUM_100K_SETS = 6; + + /** + * The column letters (for easting) of the lower left value, per + * set. + * + * {string} @private + */ + var SET_ORIGIN_COLUMN_LETTERS = 'AJSAJS'; + + /** + * The row letters (for northing) of the lower left value, per + * set. + * + * {string} @private + */ + var SET_ORIGIN_ROW_LETTERS = 'AFAFAF'; + + var A = 65; // A + var I = 73; // I + var O = 79; // O + var V = 86; // V + var Z = 90; // Z + var mgrs = { + forward: forward$1, + inverse: inverse$1, + toPoint: toPoint$1 + }; + /** + * Conversion of lat/lon to MGRS. + * + * @param {object} ll Object literal with lat and lon properties on a + * WGS84 ellipsoid. + * @param {int} accuracy Accuracy in digits (5 for 1 m, 4 for 10 m, 3 for + * 100 m, 2 for 1000 m or 1 for 10000 m). Optional, default is 5. + * @return {string} the MGRS string for the given location and accuracy. + */ + function forward$1(ll, accuracy) { + accuracy = accuracy || 5; // default accuracy 1m + return encode(LLtoUTM({ + lat: ll[1], + lon: ll[0] + }), accuracy); + } + + /** + * Conversion of MGRS to lat/lon. + * + * @param {string} mgrs MGRS string. + * @return {array} An array with left (longitude), bottom (latitude), right + * (longitude) and top (latitude) values in WGS84, representing the + * bounding box for the provided MGRS reference. + */ + function inverse$1(mgrs) { + var bbox = UTMtoLL(decode(mgrs.toUpperCase())); + if (bbox.lat && bbox.lon) { + return [bbox.lon, bbox.lat, bbox.lon, bbox.lat]; + } + return [bbox.left, bbox.bottom, bbox.right, bbox.top]; + } + + function toPoint$1(mgrs) { + var bbox = UTMtoLL(decode(mgrs.toUpperCase())); + if (bbox.lat && bbox.lon) { + return [bbox.lon, bbox.lat]; + } + return [(bbox.left + bbox.right) / 2, (bbox.top + bbox.bottom) / 2]; + } + /** + * Conversion from degrees to radians. + * + * @private + * @param {number} deg the angle in degrees. + * @return {number} the angle in radians. + */ + function degToRad(deg) { + return (deg * (Math.PI / 180.0)); + } + + /** + * Conversion from radians to degrees. + * + * @private + * @param {number} rad the angle in radians. + * @return {number} the angle in degrees. + */ + function radToDeg(rad) { + return (180.0 * (rad / Math.PI)); + } + + /** + * Converts a set of Longitude and Latitude co-ordinates to UTM + * using the WGS84 ellipsoid. + * + * @private + * @param {object} ll Object literal with lat and lon properties + * representing the WGS84 coordinate to be converted. + * @return {object} Object literal containing the UTM value with easting, + * northing, zoneNumber and zoneLetter properties, and an optional + * accuracy property in digits. Returns null if the conversion failed. + */ + function LLtoUTM(ll) { + var Lat = ll.lat; + var Long = ll.lon; + var a = 6378137.0; //ellip.radius; + var eccSquared = 0.00669438; //ellip.eccsq; + var k0 = 0.9996; + var LongOrigin; + var eccPrimeSquared; + var N, T, C, A, M; + var LatRad = degToRad(Lat); + var LongRad = degToRad(Long); + var LongOriginRad; + var ZoneNumber; + // (int) + ZoneNumber = Math.floor((Long + 180) / 6) + 1; + + //Make sure the longitude 180.00 is in Zone 60 + if (Long === 180) { + ZoneNumber = 60; + } + + // Special zone for Norway + if (Lat >= 56.0 && Lat < 64.0 && Long >= 3.0 && Long < 12.0) { + ZoneNumber = 32; + } + + // Special zones for Svalbard + if (Lat >= 72.0 && Lat < 84.0) { + if (Long >= 0.0 && Long < 9.0) { + ZoneNumber = 31; + } + else if (Long >= 9.0 && Long < 21.0) { + ZoneNumber = 33; + } + else if (Long >= 21.0 && Long < 33.0) { + ZoneNumber = 35; + } + else if (Long >= 33.0 && Long < 42.0) { + ZoneNumber = 37; + } + } + + LongOrigin = (ZoneNumber - 1) * 6 - 180 + 3; //+3 puts origin + // in middle of + // zone + LongOriginRad = degToRad(LongOrigin); + + eccPrimeSquared = (eccSquared) / (1 - eccSquared); + + N = a / Math.sqrt(1 - eccSquared * Math.sin(LatRad) * Math.sin(LatRad)); + T = Math.tan(LatRad) * Math.tan(LatRad); + C = eccPrimeSquared * Math.cos(LatRad) * Math.cos(LatRad); + A = Math.cos(LatRad) * (LongRad - LongOriginRad); + + M = a * ((1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256) * LatRad - (3 * eccSquared / 8 + 3 * eccSquared * eccSquared / 32 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(2 * LatRad) + (15 * eccSquared * eccSquared / 256 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(4 * LatRad) - (35 * eccSquared * eccSquared * eccSquared / 3072) * Math.sin(6 * LatRad)); + + var UTMEasting = (k0 * N * (A + (1 - T + C) * A * A * A / 6.0 + (5 - 18 * T + T * T + 72 * C - 58 * eccPrimeSquared) * A * A * A * A * A / 120.0) + 500000.0); + + var UTMNorthing = (k0 * (M + N * Math.tan(LatRad) * (A * A / 2 + (5 - T + 9 * C + 4 * C * C) * A * A * A * A / 24.0 + (61 - 58 * T + T * T + 600 * C - 330 * eccPrimeSquared) * A * A * A * A * A * A / 720.0))); + if (Lat < 0.0) { + UTMNorthing += 10000000.0; //10000000 meter offset for + // southern hemisphere + } + + return { + northing: Math.round(UTMNorthing), + easting: Math.round(UTMEasting), + zoneNumber: ZoneNumber, + zoneLetter: getLetterDesignator(Lat) + }; + } + + /** + * Converts UTM coords to lat/long, using the WGS84 ellipsoid. This is a convenience + * class where the Zone can be specified as a single string eg."60N" which + * is then broken down into the ZoneNumber and ZoneLetter. + * + * @private + * @param {object} utm An object literal with northing, easting, zoneNumber + * and zoneLetter properties. If an optional accuracy property is + * provided (in meters), a bounding box will be returned instead of + * latitude and longitude. + * @return {object} An object literal containing either lat and lon values + * (if no accuracy was provided), or top, right, bottom and left values + * for the bounding box calculated according to the provided accuracy. + * Returns null if the conversion failed. + */ + function UTMtoLL(utm) { + + var UTMNorthing = utm.northing; + var UTMEasting = utm.easting; + var zoneLetter = utm.zoneLetter; + var zoneNumber = utm.zoneNumber; + // check the ZoneNummber is valid + if (zoneNumber < 0 || zoneNumber > 60) { + return null; + } + + var k0 = 0.9996; + var a = 6378137.0; //ellip.radius; + var eccSquared = 0.00669438; //ellip.eccsq; + var eccPrimeSquared; + var e1 = (1 - Math.sqrt(1 - eccSquared)) / (1 + Math.sqrt(1 - eccSquared)); + var N1, T1, C1, R1, D, M; + var LongOrigin; + var mu, phi1Rad; + + // remove 500,000 meter offset for longitude + var x = UTMEasting - 500000.0; + var y = UTMNorthing; + + // We must know somehow if we are in the Northern or Southern + // hemisphere, this is the only time we use the letter So even + // if the Zone letter isn't exactly correct it should indicate + // the hemisphere correctly + if (zoneLetter < 'N') { + y -= 10000000.0; // remove 10,000,000 meter offset used + // for southern hemisphere + } + + // There are 60 zones with zone 1 being at West -180 to -174 + LongOrigin = (zoneNumber - 1) * 6 - 180 + 3; // +3 puts origin + // in middle of + // zone + + eccPrimeSquared = (eccSquared) / (1 - eccSquared); + + M = y / k0; + mu = M / (a * (1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256)); + + phi1Rad = mu + (3 * e1 / 2 - 27 * e1 * e1 * e1 / 32) * Math.sin(2 * mu) + (21 * e1 * e1 / 16 - 55 * e1 * e1 * e1 * e1 / 32) * Math.sin(4 * mu) + (151 * e1 * e1 * e1 / 96) * Math.sin(6 * mu); + // double phi1 = ProjMath.radToDeg(phi1Rad); + + N1 = a / Math.sqrt(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad)); + T1 = Math.tan(phi1Rad) * Math.tan(phi1Rad); + C1 = eccPrimeSquared * Math.cos(phi1Rad) * Math.cos(phi1Rad); + R1 = a * (1 - eccSquared) / Math.pow(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad), 1.5); + D = x / (N1 * k0); + + var lat = phi1Rad - (N1 * Math.tan(phi1Rad) / R1) * (D * D / 2 - (5 + 3 * T1 + 10 * C1 - 4 * C1 * C1 - 9 * eccPrimeSquared) * D * D * D * D / 24 + (61 + 90 * T1 + 298 * C1 + 45 * T1 * T1 - 252 * eccPrimeSquared - 3 * C1 * C1) * D * D * D * D * D * D / 720); + lat = radToDeg(lat); + + var lon = (D - (1 + 2 * T1 + C1) * D * D * D / 6 + (5 - 2 * C1 + 28 * T1 - 3 * C1 * C1 + 8 * eccPrimeSquared + 24 * T1 * T1) * D * D * D * D * D / 120) / Math.cos(phi1Rad); + lon = LongOrigin + radToDeg(lon); + + var result; + if (utm.accuracy) { + var topRight = UTMtoLL({ + northing: utm.northing + utm.accuracy, + easting: utm.easting + utm.accuracy, + zoneLetter: utm.zoneLetter, + zoneNumber: utm.zoneNumber + }); + result = { + top: topRight.lat, + right: topRight.lon, + bottom: lat, + left: lon + }; + } + else { + result = { + lat: lat, + lon: lon + }; + } + return result; + } + + /** + * Calculates the MGRS letter designator for the given latitude. + * + * @private + * @param {number} lat The latitude in WGS84 to get the letter designator + * for. + * @return {char} The letter designator. + */ + function getLetterDesignator(lat) { + //This is here as an error flag to show that the Latitude is + //outside MGRS limits + var LetterDesignator = 'Z'; + + if ((84 >= lat) && (lat >= 72)) { + LetterDesignator = 'X'; + } + else if ((72 > lat) && (lat >= 64)) { + LetterDesignator = 'W'; + } + else if ((64 > lat) && (lat >= 56)) { + LetterDesignator = 'V'; + } + else if ((56 > lat) && (lat >= 48)) { + LetterDesignator = 'U'; + } + else if ((48 > lat) && (lat >= 40)) { + LetterDesignator = 'T'; + } + else if ((40 > lat) && (lat >= 32)) { + LetterDesignator = 'S'; + } + else if ((32 > lat) && (lat >= 24)) { + LetterDesignator = 'R'; + } + else if ((24 > lat) && (lat >= 16)) { + LetterDesignator = 'Q'; + } + else if ((16 > lat) && (lat >= 8)) { + LetterDesignator = 'P'; + } + else if ((8 > lat) && (lat >= 0)) { + LetterDesignator = 'N'; + } + else if ((0 > lat) && (lat >= -8)) { + LetterDesignator = 'M'; + } + else if ((-8 > lat) && (lat >= -16)) { + LetterDesignator = 'L'; + } + else if ((-16 > lat) && (lat >= -24)) { + LetterDesignator = 'K'; + } + else if ((-24 > lat) && (lat >= -32)) { + LetterDesignator = 'J'; + } + else if ((-32 > lat) && (lat >= -40)) { + LetterDesignator = 'H'; + } + else if ((-40 > lat) && (lat >= -48)) { + LetterDesignator = 'G'; + } + else if ((-48 > lat) && (lat >= -56)) { + LetterDesignator = 'F'; + } + else if ((-56 > lat) && (lat >= -64)) { + LetterDesignator = 'E'; + } + else if ((-64 > lat) && (lat >= -72)) { + LetterDesignator = 'D'; + } + else if ((-72 > lat) && (lat >= -80)) { + LetterDesignator = 'C'; + } + return LetterDesignator; + } + + /** + * Encodes a UTM location as MGRS string. + * + * @private + * @param {object} utm An object literal with easting, northing, + * zoneLetter, zoneNumber + * @param {number} accuracy Accuracy in digits (1-5). + * @return {string} MGRS string for the given UTM location. + */ + function encode(utm, accuracy) { + // prepend with leading zeroes + var seasting = "00000" + utm.easting, + snorthing = "00000" + utm.northing; + + return utm.zoneNumber + utm.zoneLetter + get100kID(utm.easting, utm.northing, utm.zoneNumber) + seasting.substr(seasting.length - 5, accuracy) + snorthing.substr(snorthing.length - 5, accuracy); + } + + /** + * Get the two letter 100k designator for a given UTM easting, + * northing and zone number value. + * + * @private + * @param {number} easting + * @param {number} northing + * @param {number} zoneNumber + * @return the two letter 100k designator for the given UTM location. + */ + function get100kID(easting, northing, zoneNumber) { + var setParm = get100kSetForZone(zoneNumber); + var setColumn = Math.floor(easting / 100000); + var setRow = Math.floor(northing / 100000) % 20; + return getLetter100kID(setColumn, setRow, setParm); + } + + /** + * Given a UTM zone number, figure out the MGRS 100K set it is in. + * + * @private + * @param {number} i An UTM zone number. + * @return {number} the 100k set the UTM zone is in. + */ + function get100kSetForZone(i) { + var setParm = i % NUM_100K_SETS; + if (setParm === 0) { + setParm = NUM_100K_SETS; + } + + return setParm; + } + + /** + * Get the two-letter MGRS 100k designator given information + * translated from the UTM northing, easting and zone number. + * + * @private + * @param {number} column the column index as it relates to the MGRS + * 100k set spreadsheet, created from the UTM easting. + * Values are 1-8. + * @param {number} row the row index as it relates to the MGRS 100k set + * spreadsheet, created from the UTM northing value. Values + * are from 0-19. + * @param {number} parm the set block, as it relates to the MGRS 100k set + * spreadsheet, created from the UTM zone. Values are from + * 1-60. + * @return two letter MGRS 100k code. + */ + function getLetter100kID(column, row, parm) { + // colOrigin and rowOrigin are the letters at the origin of the set + var index = parm - 1; + var colOrigin = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(index); + var rowOrigin = SET_ORIGIN_ROW_LETTERS.charCodeAt(index); + + // colInt and rowInt are the letters to build to return + var colInt = colOrigin + column - 1; + var rowInt = rowOrigin + row; + var rollover = false; + + if (colInt > Z) { + colInt = colInt - Z + A - 1; + rollover = true; + } + + if (colInt === I || (colOrigin < I && colInt > I) || ((colInt > I || colOrigin < I) && rollover)) { + colInt++; + } + + if (colInt === O || (colOrigin < O && colInt > O) || ((colInt > O || colOrigin < O) && rollover)) { + colInt++; + + if (colInt === I) { + colInt++; + } + } + + if (colInt > Z) { + colInt = colInt - Z + A - 1; + } + + if (rowInt > V) { + rowInt = rowInt - V + A - 1; + rollover = true; + } + else { + rollover = false; + } + + if (((rowInt === I) || ((rowOrigin < I) && (rowInt > I))) || (((rowInt > I) || (rowOrigin < I)) && rollover)) { + rowInt++; + } + + if (((rowInt === O) || ((rowOrigin < O) && (rowInt > O))) || (((rowInt > O) || (rowOrigin < O)) && rollover)) { + rowInt++; + + if (rowInt === I) { + rowInt++; + } + } + + if (rowInt > V) { + rowInt = rowInt - V + A - 1; + } + + var twoLetter = String.fromCharCode(colInt) + String.fromCharCode(rowInt); + return twoLetter; + } + + /** + * Decode the UTM parameters from a MGRS string. + * + * @private + * @param {string} mgrsString an UPPERCASE coordinate string is expected. + * @return {object} An object literal with easting, northing, zoneLetter, + * zoneNumber and accuracy (in meters) properties. + */ + function decode(mgrsString) { + + if (mgrsString && mgrsString.length === 0) { + throw ("MGRSPoint coverting from nothing"); + } + + var length = mgrsString.length; + + var hunK = null; + var sb = ""; + var testChar; + var i = 0; + + // get Zone number + while (!(/[A-Z]/).test(testChar = mgrsString.charAt(i))) { + if (i >= 2) { + throw ("MGRSPoint bad conversion from: " + mgrsString); + } + sb += testChar; + i++; + } + + var zoneNumber = parseInt(sb, 10); + + if (i === 0 || i + 3 > length) { + // A good MGRS string has to be 4-5 digits long, + // ##AAA/#AAA at least. + throw ("MGRSPoint bad conversion from: " + mgrsString); + } + + var zoneLetter = mgrsString.charAt(i++); + + // Should we check the zone letter here? Why not. + if (zoneLetter <= 'A' || zoneLetter === 'B' || zoneLetter === 'Y' || zoneLetter >= 'Z' || zoneLetter === 'I' || zoneLetter === 'O') { + throw ("MGRSPoint zone letter " + zoneLetter + " not handled: " + mgrsString); + } + + hunK = mgrsString.substring(i, i += 2); + + var set = get100kSetForZone(zoneNumber); + + var east100k = getEastingFromChar(hunK.charAt(0), set); + var north100k = getNorthingFromChar(hunK.charAt(1), set); + + // We have a bug where the northing may be 2000000 too low. + // How + // do we know when to roll over? + + while (north100k < getMinNorthing(zoneLetter)) { + north100k += 2000000; + } + + // calculate the char index for easting/northing separator + var remainder = length - i; + + if (remainder % 2 !== 0) { + throw ("MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters" + mgrsString); + } + + var sep = remainder / 2; + + var sepEasting = 0.0; + var sepNorthing = 0.0; + var accuracyBonus, sepEastingString, sepNorthingString, easting, northing; + if (sep > 0) { + accuracyBonus = 100000.0 / Math.pow(10, sep); + sepEastingString = mgrsString.substring(i, i + sep); + sepEasting = parseFloat(sepEastingString) * accuracyBonus; + sepNorthingString = mgrsString.substring(i + sep); + sepNorthing = parseFloat(sepNorthingString) * accuracyBonus; + } + + easting = sepEasting + east100k; + northing = sepNorthing + north100k; + + return { + easting: easting, + northing: northing, + zoneLetter: zoneLetter, + zoneNumber: zoneNumber, + accuracy: accuracyBonus + }; + } + + /** + * Given the first letter from a two-letter MGRS 100k zone, and given the + * MGRS table set for the zone number, figure out the easting value that + * should be added to the other, secondary easting value. + * + * @private + * @param {char} e The first letter from a two-letter MGRS 100´k zone. + * @param {number} set The MGRS table set for the zone number. + * @return {number} The easting value for the given letter and set. + */ + function getEastingFromChar(e, set) { + // colOrigin is the letter at the origin of the set for the + // column + var curCol = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(set - 1); + var eastingValue = 100000.0; + var rewindMarker = false; + + while (curCol !== e.charCodeAt(0)) { + curCol++; + if (curCol === I) { + curCol++; + } + if (curCol === O) { + curCol++; + } + if (curCol > Z) { + if (rewindMarker) { + throw ("Bad character: " + e); + } + curCol = A; + rewindMarker = true; + } + eastingValue += 100000.0; + } + + return eastingValue; + } + + /** + * Given the second letter from a two-letter MGRS 100k zone, and given the + * MGRS table set for the zone number, figure out the northing value that + * should be added to the other, secondary northing value. You have to + * remember that Northings are determined from the equator, and the vertical + * cycle of letters mean a 2000000 additional northing meters. This happens + * approx. every 18 degrees of latitude. This method does *NOT* count any + * additional northings. You have to figure out how many 2000000 meters need + * to be added for the zone letter of the MGRS coordinate. + * + * @private + * @param {char} n Second letter of the MGRS 100k zone + * @param {number} set The MGRS table set number, which is dependent on the + * UTM zone number. + * @return {number} The northing value for the given letter and set. + */ + function getNorthingFromChar(n, set) { + + if (n > 'V') { + throw ("MGRSPoint given invalid Northing " + n); + } + + // rowOrigin is the letter at the origin of the set for the + // column + var curRow = SET_ORIGIN_ROW_LETTERS.charCodeAt(set - 1); + var northingValue = 0.0; + var rewindMarker = false; + + while (curRow !== n.charCodeAt(0)) { + curRow++; + if (curRow === I) { + curRow++; + } + if (curRow === O) { + curRow++; + } + // fixing a bug making whole application hang in this loop + // when 'n' is a wrong character + if (curRow > V) { + if (rewindMarker) { // making sure that this loop ends + throw ("Bad character: " + n); + } + curRow = A; + rewindMarker = true; + } + northingValue += 100000.0; + } + + return northingValue; + } + + /** + * The function getMinNorthing returns the minimum northing value of a MGRS + * zone. + * + * Ported from Geotrans' c Lattitude_Band_Value structure table. + * + * @private + * @param {char} zoneLetter The MGRS zone to get the min northing for. + * @return {number} + */ + function getMinNorthing(zoneLetter) { + var northing; + switch (zoneLetter) { + case 'C': + northing = 1100000.0; + break; + case 'D': + northing = 2000000.0; + break; + case 'E': + northing = 2800000.0; + break; + case 'F': + northing = 3700000.0; + break; + case 'G': + northing = 4600000.0; + break; + case 'H': + northing = 5500000.0; + break; + case 'J': + northing = 6400000.0; + break; + case 'K': + northing = 7300000.0; + break; + case 'L': + northing = 8200000.0; + break; + case 'M': + northing = 9100000.0; + break; + case 'N': + northing = 0.0; + break; + case 'P': + northing = 800000.0; + break; + case 'Q': + northing = 1700000.0; + break; + case 'R': + northing = 2600000.0; + break; + case 'S': + northing = 3500000.0; + break; + case 'T': + northing = 4400000.0; + break; + case 'U': + northing = 5300000.0; + break; + case 'V': + northing = 6200000.0; + break; + case 'W': + northing = 7000000.0; + break; + case 'X': + northing = 7900000.0; + break; + default: + northing = -1.0; + } + if (northing >= 0.0) { + return northing; + } + else { + throw ("Invalid zone letter: " + zoneLetter); + } + + } + + function Point(x, y, z) { + if (!(this instanceof Point)) { + return new Point(x, y, z); + } + if (Array.isArray(x)) { + this.x = x[0]; + this.y = x[1]; + this.z = x[2] || 0.0; + } else if(typeof x === 'object') { + this.x = x.x; + this.y = x.y; + this.z = x.z || 0.0; + } else if (typeof x === 'string' && typeof y === 'undefined') { + var coords = x.split(','); + this.x = parseFloat(coords[0], 10); + this.y = parseFloat(coords[1], 10); + this.z = parseFloat(coords[2], 10) || 0.0; + } else { + this.x = x; + this.y = y; + this.z = z || 0.0; + } + console.warn('proj4.Point will be removed in version 3, use proj4.toPoint'); + } + + Point.fromMGRS = function(mgrsStr) { + return new Point(toPoint$1(mgrsStr)); + }; + Point.prototype.toMGRS = function(accuracy) { + return forward$1([this.x, this.y], accuracy); + }; + + var C00 = 1; + var C02 = 0.25; + var C04 = 0.046875; + var C06 = 0.01953125; + var C08 = 0.01068115234375; + var C22 = 0.75; + var C44 = 0.46875; + var C46 = 0.01302083333333333333; + var C48 = 0.00712076822916666666; + var C66 = 0.36458333333333333333; + var C68 = 0.00569661458333333333; + var C88 = 0.3076171875; + + var pj_enfn = function(es) { + var en = []; + en[0] = C00 - es * (C02 + es * (C04 + es * (C06 + es * C08))); + en[1] = es * (C22 - es * (C04 + es * (C06 + es * C08))); + var t = es * es; + en[2] = t * (C44 - es * (C46 + es * C48)); + t *= es; + en[3] = t * (C66 - es * C68); + en[4] = t * es * C88; + return en; + }; + + var pj_mlfn = function(phi, sphi, cphi, en) { + cphi *= sphi; + sphi *= sphi; + return (en[0] * phi - cphi * (en[1] + sphi * (en[2] + sphi * (en[3] + sphi * en[4])))); + }; + + var MAX_ITER = 20; + + var pj_inv_mlfn = function(arg, es, en) { + var k = 1 / (1 - es); + var phi = arg; + for (var i = MAX_ITER; i; --i) { /* rarely goes over 2 iterations */ + var s = Math.sin(phi); + var t = 1 - es * s * s; + //t = this.pj_mlfn(phi, s, Math.cos(phi), en) - arg; + //phi -= t * (t * Math.sqrt(t)) * k; + t = (pj_mlfn(phi, s, Math.cos(phi), en) - arg) * (t * Math.sqrt(t)) * k; + phi -= t; + if (Math.abs(t) < EPSLN) { + return phi; + } + } + //..reportError("cass:pj_inv_mlfn: Convergence error"); + return phi; + }; + + // Heavily based on this tmerc projection implementation + // https://github.com/mbloch/mapshaper-proj/blob/master/src/projections/tmerc.js + + function init$2() { + this.x0 = this.x0 !== undefined ? this.x0 : 0; + this.y0 = this.y0 !== undefined ? this.y0 : 0; + this.long0 = this.long0 !== undefined ? this.long0 : 0; + this.lat0 = this.lat0 !== undefined ? this.lat0 : 0; + + if (this.es) { + this.en = pj_enfn(this.es); + this.ml0 = pj_mlfn(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en); + } + } + + /** + Transverse Mercator Forward - long/lat to x/y + long/lat in radians + */ + function forward$2(p) { + var lon = p.x; + var lat = p.y; + + var delta_lon = adjust_lon(lon - this.long0); + var con; + var x, y; + var sin_phi = Math.sin(lat); + var cos_phi = Math.cos(lat); + + if (!this.es) { + var b = cos_phi * Math.sin(delta_lon); + + if ((Math.abs(Math.abs(b) - 1)) < EPSLN) { + return (93); + } + else { + x = 0.5 * this.a * this.k0 * Math.log((1 + b) / (1 - b)) + this.x0; + y = cos_phi * Math.cos(delta_lon) / Math.sqrt(1 - Math.pow(b, 2)); + b = Math.abs(y); + + if (b >= 1) { + if ((b - 1) > EPSLN) { + return (93); + } + else { + y = 0; + } + } + else { + y = Math.acos(y); + } + + if (lat < 0) { + y = -y; + } + + y = this.a * this.k0 * (y - this.lat0) + this.y0; + } + } + else { + var al = cos_phi * delta_lon; + var als = Math.pow(al, 2); + var c = this.ep2 * Math.pow(cos_phi, 2); + var cs = Math.pow(c, 2); + var tq = Math.abs(cos_phi) > EPSLN ? Math.tan(lat) : 0; + var t = Math.pow(tq, 2); + var ts = Math.pow(t, 2); + con = 1 - this.es * Math.pow(sin_phi, 2); + al = al / Math.sqrt(con); + var ml = pj_mlfn(lat, sin_phi, cos_phi, this.en); + + x = this.a * (this.k0 * al * (1 + + als / 6 * (1 - t + c + + als / 20 * (5 - 18 * t + ts + 14 * c - 58 * t * c + + als / 42 * (61 + 179 * ts - ts * t - 479 * t))))) + + this.x0; + + y = this.a * (this.k0 * (ml - this.ml0 + + sin_phi * delta_lon * al / 2 * (1 + + als / 12 * (5 - t + 9 * c + 4 * cs + + als / 30 * (61 + ts - 58 * t + 270 * c - 330 * t * c + + als / 56 * (1385 + 543 * ts - ts * t - 3111 * t)))))) + + this.y0; + } + + p.x = x; + p.y = y; + + return p; + } + + /** + Transverse Mercator Inverse - x/y to long/lat + */ + function inverse$2(p) { + var con, phi; + var lat, lon; + var x = (p.x - this.x0) * (1 / this.a); + var y = (p.y - this.y0) * (1 / this.a); + + if (!this.es) { + var f = Math.exp(x / this.k0); + var g = 0.5 * (f - 1 / f); + var temp = this.lat0 + y / this.k0; + var h = Math.cos(temp); + con = Math.sqrt((1 - Math.pow(h, 2)) / (1 + Math.pow(g, 2))); + lat = Math.asin(con); + + if (y < 0) { + lat = -lat; + } + + if ((g === 0) && (h === 0)) { + lon = 0; + } + else { + lon = adjust_lon(Math.atan2(g, h) + this.long0); + } + } + else { // ellipsoidal form + con = this.ml0 + y / this.k0; + phi = pj_inv_mlfn(con, this.es, this.en); + + if (Math.abs(phi) < HALF_PI) { + var sin_phi = Math.sin(phi); + var cos_phi = Math.cos(phi); + var tan_phi = Math.abs(cos_phi) > EPSLN ? Math.tan(phi) : 0; + var c = this.ep2 * Math.pow(cos_phi, 2); + var cs = Math.pow(c, 2); + var t = Math.pow(tan_phi, 2); + var ts = Math.pow(t, 2); + con = 1 - this.es * Math.pow(sin_phi, 2); + var d = x * Math.sqrt(con) / this.k0; + var ds = Math.pow(d, 2); + con = con * tan_phi; + + lat = phi - (con * ds / (1 - this.es)) * 0.5 * (1 - + ds / 12 * (5 + 3 * t - 9 * c * t + c - 4 * cs - + ds / 30 * (61 + 90 * t - 252 * c * t + 45 * ts + 46 * c - + ds / 56 * (1385 + 3633 * t + 4095 * ts + 1574 * ts * t)))); + + lon = adjust_lon(this.long0 + (d * (1 - + ds / 6 * (1 + 2 * t + c - + ds / 20 * (5 + 28 * t + 24 * ts + 8 * c * t + 6 * c - + ds / 42 * (61 + 662 * t + 1320 * ts + 720 * ts * t)))) / cos_phi)); + } + else { + lat = HALF_PI * sign(y); + lon = 0; + } + } + + p.x = lon; + p.y = lat; + + return p; + } + + var names$3 = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"]; + var tmerc = { + init: init$2, + forward: forward$2, + inverse: inverse$2, + names: names$3 + }; + + var sinh = function(x) { + var r = Math.exp(x); + r = (r - 1 / r) / 2; + return r; + }; + + var hypot = function(x, y) { + x = Math.abs(x); + y = Math.abs(y); + var a = Math.max(x, y); + var b = Math.min(x, y) / (a ? a : 1); + + return a * Math.sqrt(1 + Math.pow(b, 2)); + }; + + var log1py = function(x) { + var y = 1 + x; + var z = y - 1; + + return z === 0 ? x : x * Math.log(y) / z; + }; + + var asinhy = function(x) { + var y = Math.abs(x); + y = log1py(y * (1 + y / (hypot(1, y) + 1))); + + return x < 0 ? -y : y; + }; + + var gatg = function(pp, B) { + var cos_2B = 2 * Math.cos(2 * B); + var i = pp.length - 1; + var h1 = pp[i]; + var h2 = 0; + var h; + + while (--i >= 0) { + h = -h2 + cos_2B * h1 + pp[i]; + h2 = h1; + h1 = h; + } + + return (B + h * Math.sin(2 * B)); + }; + + var clens = function(pp, arg_r) { + var r = 2 * Math.cos(arg_r); + var i = pp.length - 1; + var hr1 = pp[i]; + var hr2 = 0; + var hr; + + while (--i >= 0) { + hr = -hr2 + r * hr1 + pp[i]; + hr2 = hr1; + hr1 = hr; + } + + return Math.sin(arg_r) * hr; + }; + + var cosh = function(x) { + var r = Math.exp(x); + r = (r + 1 / r) / 2; + return r; + }; + + var clens_cmplx = function(pp, arg_r, arg_i) { + var sin_arg_r = Math.sin(arg_r); + var cos_arg_r = Math.cos(arg_r); + var sinh_arg_i = sinh(arg_i); + var cosh_arg_i = cosh(arg_i); + var r = 2 * cos_arg_r * cosh_arg_i; + var i = -2 * sin_arg_r * sinh_arg_i; + var j = pp.length - 1; + var hr = pp[j]; + var hi1 = 0; + var hr1 = 0; + var hi = 0; + var hr2; + var hi2; + + while (--j >= 0) { + hr2 = hr1; + hi2 = hi1; + hr1 = hr; + hi1 = hi; + hr = -hr2 + r * hr1 - i * hi1 + pp[j]; + hi = -hi2 + i * hr1 + r * hi1; + } + + r = sin_arg_r * cosh_arg_i; + i = cos_arg_r * sinh_arg_i; + + return [r * hr - i * hi, r * hi + i * hr]; + }; + + // Heavily based on this etmerc projection implementation + // https://github.com/mbloch/mapshaper-proj/blob/master/src/projections/etmerc.js + + function init$3() { + if (!this.approx && (isNaN(this.es) || this.es <= 0)) { + throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.'); + } + if (this.approx) { + // When '+approx' is set, use tmerc instead + tmerc.init.apply(this); + this.forward = tmerc.forward; + this.inverse = tmerc.inverse; + } + + this.x0 = this.x0 !== undefined ? this.x0 : 0; + this.y0 = this.y0 !== undefined ? this.y0 : 0; + this.long0 = this.long0 !== undefined ? this.long0 : 0; + this.lat0 = this.lat0 !== undefined ? this.lat0 : 0; + + this.cgb = []; + this.cbg = []; + this.utg = []; + this.gtu = []; + + var f = this.es / (1 + Math.sqrt(1 - this.es)); + var n = f / (2 - f); + var np = n; + + this.cgb[0] = n * (2 + n * (-2 / 3 + n * (-2 + n * (116 / 45 + n * (26 / 45 + n * (-2854 / 675 )))))); + this.cbg[0] = n * (-2 + n * ( 2 / 3 + n * ( 4 / 3 + n * (-82 / 45 + n * (32 / 45 + n * (4642 / 4725)))))); + + np = np * n; + this.cgb[1] = np * (7 / 3 + n * (-8 / 5 + n * (-227 / 45 + n * (2704 / 315 + n * (2323 / 945))))); + this.cbg[1] = np * (5 / 3 + n * (-16 / 15 + n * ( -13 / 9 + n * (904 / 315 + n * (-1522 / 945))))); + + np = np * n; + this.cgb[2] = np * (56 / 15 + n * (-136 / 35 + n * (-1262 / 105 + n * (73814 / 2835)))); + this.cbg[2] = np * (-26 / 15 + n * (34 / 21 + n * (8 / 5 + n * (-12686 / 2835)))); + + np = np * n; + this.cgb[3] = np * (4279 / 630 + n * (-332 / 35 + n * (-399572 / 14175))); + this.cbg[3] = np * (1237 / 630 + n * (-12 / 5 + n * ( -24832 / 14175))); + + np = np * n; + this.cgb[4] = np * (4174 / 315 + n * (-144838 / 6237)); + this.cbg[4] = np * (-734 / 315 + n * (109598 / 31185)); + + np = np * n; + this.cgb[5] = np * (601676 / 22275); + this.cbg[5] = np * (444337 / 155925); + + np = Math.pow(n, 2); + this.Qn = this.k0 / (1 + n) * (1 + np * (1 / 4 + np * (1 / 64 + np / 256))); + + this.utg[0] = n * (-0.5 + n * ( 2 / 3 + n * (-37 / 96 + n * ( 1 / 360 + n * (81 / 512 + n * (-96199 / 604800)))))); + this.gtu[0] = n * (0.5 + n * (-2 / 3 + n * (5 / 16 + n * (41 / 180 + n * (-127 / 288 + n * (7891 / 37800)))))); + + this.utg[1] = np * (-1 / 48 + n * (-1 / 15 + n * (437 / 1440 + n * (-46 / 105 + n * (1118711 / 3870720))))); + this.gtu[1] = np * (13 / 48 + n * (-3 / 5 + n * (557 / 1440 + n * (281 / 630 + n * (-1983433 / 1935360))))); + + np = np * n; + this.utg[2] = np * (-17 / 480 + n * (37 / 840 + n * (209 / 4480 + n * (-5569 / 90720 )))); + this.gtu[2] = np * (61 / 240 + n * (-103 / 140 + n * (15061 / 26880 + n * (167603 / 181440)))); + + np = np * n; + this.utg[3] = np * (-4397 / 161280 + n * (11 / 504 + n * (830251 / 7257600))); + this.gtu[3] = np * (49561 / 161280 + n * (-179 / 168 + n * (6601661 / 7257600))); + + np = np * n; + this.utg[4] = np * (-4583 / 161280 + n * (108847 / 3991680)); + this.gtu[4] = np * (34729 / 80640 + n * (-3418889 / 1995840)); + + np = np * n; + this.utg[5] = np * (-20648693 / 638668800); + this.gtu[5] = np * (212378941 / 319334400); + + var Z = gatg(this.cbg, this.lat0); + this.Zb = -this.Qn * (Z + clens(this.gtu, 2 * Z)); + } + + function forward$3(p) { + var Ce = adjust_lon(p.x - this.long0); + var Cn = p.y; + + Cn = gatg(this.cbg, Cn); + var sin_Cn = Math.sin(Cn); + var cos_Cn = Math.cos(Cn); + var sin_Ce = Math.sin(Ce); + var cos_Ce = Math.cos(Ce); + + Cn = Math.atan2(sin_Cn, cos_Ce * cos_Cn); + Ce = Math.atan2(sin_Ce * cos_Cn, hypot(sin_Cn, cos_Cn * cos_Ce)); + Ce = asinhy(Math.tan(Ce)); + + var tmp = clens_cmplx(this.gtu, 2 * Cn, 2 * Ce); + + Cn = Cn + tmp[0]; + Ce = Ce + tmp[1]; + + var x; + var y; + + if (Math.abs(Ce) <= 2.623395162778) { + x = this.a * (this.Qn * Ce) + this.x0; + y = this.a * (this.Qn * Cn + this.Zb) + this.y0; + } + else { + x = Infinity; + y = Infinity; + } + + p.x = x; + p.y = y; + + return p; + } + + function inverse$3(p) { + var Ce = (p.x - this.x0) * (1 / this.a); + var Cn = (p.y - this.y0) * (1 / this.a); + + Cn = (Cn - this.Zb) / this.Qn; + Ce = Ce / this.Qn; + + var lon; + var lat; + + if (Math.abs(Ce) <= 2.623395162778) { + var tmp = clens_cmplx(this.utg, 2 * Cn, 2 * Ce); + + Cn = Cn + tmp[0]; + Ce = Ce + tmp[1]; + Ce = Math.atan(sinh(Ce)); + + var sin_Cn = Math.sin(Cn); + var cos_Cn = Math.cos(Cn); + var sin_Ce = Math.sin(Ce); + var cos_Ce = Math.cos(Ce); + + Cn = Math.atan2(sin_Cn * cos_Ce, hypot(sin_Ce, cos_Ce * cos_Cn)); + Ce = Math.atan2(sin_Ce, cos_Ce * cos_Cn); + + lon = adjust_lon(Ce + this.long0); + lat = gatg(this.cgb, Cn); + } + else { + lon = Infinity; + lat = Infinity; + } + + p.x = lon; + p.y = lat; + + return p; + } + + var names$4 = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc", "Transverse_Mercator", "Transverse Mercator", "tmerc"]; + var etmerc = { + init: init$3, + forward: forward$3, + inverse: inverse$3, + names: names$4 + }; + + var adjust_zone = function(zone, lon) { + if (zone === undefined) { + zone = Math.floor((adjust_lon(lon) + Math.PI) * 30 / Math.PI) + 1; + + if (zone < 0) { + return 0; + } else if (zone > 60) { + return 60; + } + } + return zone; + }; + + var dependsOn = 'etmerc'; + function init$4() { + var zone = adjust_zone(this.zone, this.long0); + if (zone === undefined) { + throw new Error('unknown utm zone'); + } + this.lat0 = 0; + this.long0 = ((6 * Math.abs(zone)) - 183) * D2R; + this.x0 = 500000; + this.y0 = this.utmSouth ? 10000000 : 0; + this.k0 = 0.9996; + + etmerc.init.apply(this); + this.forward = etmerc.forward; + this.inverse = etmerc.inverse; + } + + var names$5 = ["Universal Transverse Mercator System", "utm"]; + var utm = { + init: init$4, + names: names$5, + dependsOn: dependsOn + }; + + var srat = function(esinp, exp) { + return (Math.pow((1 - esinp) / (1 + esinp), exp)); + }; + + var MAX_ITER$1 = 20; + function init$6() { + var sphi = Math.sin(this.lat0); + var cphi = Math.cos(this.lat0); + cphi *= cphi; + this.rc = Math.sqrt(1 - this.es) / (1 - this.es * sphi * sphi); + this.C = Math.sqrt(1 + this.es * cphi * cphi / (1 - this.es)); + this.phic0 = Math.asin(sphi / this.C); + this.ratexp = 0.5 * this.C * this.e; + this.K = Math.tan(0.5 * this.phic0 + FORTPI) / (Math.pow(Math.tan(0.5 * this.lat0 + FORTPI), this.C) * srat(this.e * sphi, this.ratexp)); + } + + function forward$5(p) { + var lon = p.x; + var lat = p.y; + + p.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * lat + FORTPI), this.C) * srat(this.e * Math.sin(lat), this.ratexp)) - HALF_PI; + p.x = this.C * lon; + return p; + } + + function inverse$5(p) { + var DEL_TOL = 1e-14; + var lon = p.x / this.C; + var lat = p.y; + var num = Math.pow(Math.tan(0.5 * lat + FORTPI) / this.K, 1 / this.C); + for (var i = MAX_ITER$1; i > 0; --i) { + lat = 2 * Math.atan(num * srat(this.e * Math.sin(p.y), - 0.5 * this.e)) - HALF_PI; + if (Math.abs(lat - p.y) < DEL_TOL) { + break; + } + p.y = lat; + } + /* convergence failed */ + if (!i) { + return null; + } + p.x = lon; + p.y = lat; + return p; + } + + var names$7 = ["gauss"]; + var gauss = { + init: init$6, + forward: forward$5, + inverse: inverse$5, + names: names$7 + }; + + function init$5() { + gauss.init.apply(this); + if (!this.rc) { + return; + } + this.sinc0 = Math.sin(this.phic0); + this.cosc0 = Math.cos(this.phic0); + this.R2 = 2 * this.rc; + if (!this.title) { + this.title = "Oblique Stereographic Alternative"; + } + } + + function forward$4(p) { + var sinc, cosc, cosl, k; + p.x = adjust_lon(p.x - this.long0); + gauss.forward.apply(this, [p]); + sinc = Math.sin(p.y); + cosc = Math.cos(p.y); + cosl = Math.cos(p.x); + k = this.k0 * this.R2 / (1 + this.sinc0 * sinc + this.cosc0 * cosc * cosl); + p.x = k * cosc * Math.sin(p.x); + p.y = k * (this.cosc0 * sinc - this.sinc0 * cosc * cosl); + p.x = this.a * p.x + this.x0; + p.y = this.a * p.y + this.y0; + return p; + } + + function inverse$4(p) { + var sinc, cosc, lon, lat, rho; + p.x = (p.x - this.x0) / this.a; + p.y = (p.y - this.y0) / this.a; + + p.x /= this.k0; + p.y /= this.k0; + if ((rho = Math.sqrt(p.x * p.x + p.y * p.y))) { + var c = 2 * Math.atan2(rho, this.R2); + sinc = Math.sin(c); + cosc = Math.cos(c); + lat = Math.asin(cosc * this.sinc0 + p.y * sinc * this.cosc0 / rho); + lon = Math.atan2(p.x * sinc, rho * this.cosc0 * cosc - p.y * this.sinc0 * sinc); + } + else { + lat = this.phic0; + lon = 0; + } + + p.x = lon; + p.y = lat; + gauss.inverse.apply(this, [p]); + p.x = adjust_lon(p.x + this.long0); + return p; + } + + var names$6 = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea","Oblique Stereographic Alternative","Double_Stereographic"]; + var sterea = { + init: init$5, + forward: forward$4, + inverse: inverse$4, + names: names$6 + }; + + function ssfn_(phit, sinphi, eccen) { + sinphi *= eccen; + return (Math.tan(0.5 * (HALF_PI + phit)) * Math.pow((1 - sinphi) / (1 + sinphi), 0.5 * eccen)); + } + + function init$7() { + this.coslat0 = Math.cos(this.lat0); + this.sinlat0 = Math.sin(this.lat0); + if (this.sphere) { + if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) { + this.k0 = 0.5 * (1 + sign(this.lat0) * Math.sin(this.lat_ts)); + } + } + else { + if (Math.abs(this.coslat0) <= EPSLN) { + if (this.lat0 > 0) { + //North pole + //trace('stere:north pole'); + this.con = 1; + } + else { + //South pole + //trace('stere:south pole'); + this.con = -1; + } + } + this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e)); + if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) { + this.k0 = 0.5 * this.cons * msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / tsfnz(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts)); + } + this.ms1 = msfnz(this.e, this.sinlat0, this.coslat0); + this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - HALF_PI; + this.cosX0 = Math.cos(this.X0); + this.sinX0 = Math.sin(this.X0); + } + } + + // Stereographic forward equations--mapping lat,long to x,y + function forward$6(p) { + var lon = p.x; + var lat = p.y; + var sinlat = Math.sin(lat); + var coslat = Math.cos(lat); + var A, X, sinX, cosX, ts, rh; + var dlon = adjust_lon(lon - this.long0); + + if (Math.abs(Math.abs(lon - this.long0) - Math.PI) <= EPSLN && Math.abs(lat + this.lat0) <= EPSLN) { + //case of the origine point + //trace('stere:this is the origin point'); + p.x = NaN; + p.y = NaN; + return p; + } + if (this.sphere) { + //trace('stere:sphere case'); + A = 2 * this.k0 / (1 + this.sinlat0 * sinlat + this.coslat0 * coslat * Math.cos(dlon)); + p.x = this.a * A * coslat * Math.sin(dlon) + this.x0; + p.y = this.a * A * (this.coslat0 * sinlat - this.sinlat0 * coslat * Math.cos(dlon)) + this.y0; + return p; + } + else { + X = 2 * Math.atan(this.ssfn_(lat, sinlat, this.e)) - HALF_PI; + cosX = Math.cos(X); + sinX = Math.sin(X); + if (Math.abs(this.coslat0) <= EPSLN) { + ts = tsfnz(this.e, lat * this.con, this.con * sinlat); + rh = 2 * this.a * this.k0 * ts / this.cons; + p.x = this.x0 + rh * Math.sin(lon - this.long0); + p.y = this.y0 - this.con * rh * Math.cos(lon - this.long0); + //trace(p.toString()); + return p; + } + else if (Math.abs(this.sinlat0) < EPSLN) { + //Eq + //trace('stere:equateur'); + A = 2 * this.a * this.k0 / (1 + cosX * Math.cos(dlon)); + p.y = A * sinX; + } + else { + //other case + //trace('stere:normal case'); + A = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * sinX + this.cosX0 * cosX * Math.cos(dlon))); + p.y = A * (this.cosX0 * sinX - this.sinX0 * cosX * Math.cos(dlon)) + this.y0; + } + p.x = A * cosX * Math.sin(dlon) + this.x0; + } + //trace(p.toString()); + return p; + } + + //* Stereographic inverse equations--mapping x,y to lat/long + function inverse$6(p) { + p.x -= this.x0; + p.y -= this.y0; + var lon, lat, ts, ce, Chi; + var rh = Math.sqrt(p.x * p.x + p.y * p.y); + if (this.sphere) { + var c = 2 * Math.atan(rh / (2 * this.a * this.k0)); + lon = this.long0; + lat = this.lat0; + if (rh <= EPSLN) { + p.x = lon; + p.y = lat; + return p; + } + lat = Math.asin(Math.cos(c) * this.sinlat0 + p.y * Math.sin(c) * this.coslat0 / rh); + if (Math.abs(this.coslat0) < EPSLN) { + if (this.lat0 > 0) { + lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y)); + } + else { + lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y)); + } + } + else { + lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(c), rh * this.coslat0 * Math.cos(c) - p.y * this.sinlat0 * Math.sin(c))); + } + p.x = lon; + p.y = lat; + return p; + } + else { + if (Math.abs(this.coslat0) <= EPSLN) { + if (rh <= EPSLN) { + lat = this.lat0; + lon = this.long0; + p.x = lon; + p.y = lat; + //trace(p.toString()); + return p; + } + p.x *= this.con; + p.y *= this.con; + ts = rh * this.cons / (2 * this.a * this.k0); + lat = this.con * phi2z(this.e, ts); + lon = this.con * adjust_lon(this.con * this.long0 + Math.atan2(p.x, - 1 * p.y)); + } + else { + ce = 2 * Math.atan(rh * this.cosX0 / (2 * this.a * this.k0 * this.ms1)); + lon = this.long0; + if (rh <= EPSLN) { + Chi = this.X0; + } + else { + Chi = Math.asin(Math.cos(ce) * this.sinX0 + p.y * Math.sin(ce) * this.cosX0 / rh); + lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(ce), rh * this.cosX0 * Math.cos(ce) - p.y * this.sinX0 * Math.sin(ce))); + } + lat = -1 * phi2z(this.e, Math.tan(0.5 * (HALF_PI + Chi))); + } + } + p.x = lon; + p.y = lat; + + //trace(p.toString()); + return p; + + } + + var names$8 = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"]; + var stere = { + init: init$7, + forward: forward$6, + inverse: inverse$6, + names: names$8, + ssfn_: ssfn_ + }; + + /* + references: + Formules et constantes pour le Calcul pour la + projection cylindrique conforme à axe oblique et pour la transformation entre + des systèmes de référence. + http://www.swisstopo.admin.ch/internet/swisstopo/fr/home/topics/survey/sys/refsys/switzerland.parsysrelated1.31216.downloadList.77004.DownloadFile.tmp/swissprojectionfr.pdf + */ + + function init$8() { + var phy0 = this.lat0; + this.lambda0 = this.long0; + var sinPhy0 = Math.sin(phy0); + var semiMajorAxis = this.a; + var invF = this.rf; + var flattening = 1 / invF; + var e2 = 2 * flattening - Math.pow(flattening, 2); + var e = this.e = Math.sqrt(e2); + this.R = this.k0 * semiMajorAxis * Math.sqrt(1 - e2) / (1 - e2 * Math.pow(sinPhy0, 2)); + this.alpha = Math.sqrt(1 + e2 / (1 - e2) * Math.pow(Math.cos(phy0), 4)); + this.b0 = Math.asin(sinPhy0 / this.alpha); + var k1 = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2)); + var k2 = Math.log(Math.tan(Math.PI / 4 + phy0 / 2)); + var k3 = Math.log((1 + e * sinPhy0) / (1 - e * sinPhy0)); + this.K = k1 - this.alpha * k2 + this.alpha * e / 2 * k3; + } + + function forward$7(p) { + var Sa1 = Math.log(Math.tan(Math.PI / 4 - p.y / 2)); + var Sa2 = this.e / 2 * Math.log((1 + this.e * Math.sin(p.y)) / (1 - this.e * Math.sin(p.y))); + var S = -this.alpha * (Sa1 + Sa2) + this.K; + + // spheric latitude + var b = 2 * (Math.atan(Math.exp(S)) - Math.PI / 4); + + // spheric longitude + var I = this.alpha * (p.x - this.lambda0); + + // psoeudo equatorial rotation + var rotI = Math.atan(Math.sin(I) / (Math.sin(this.b0) * Math.tan(b) + Math.cos(this.b0) * Math.cos(I))); + + var rotB = Math.asin(Math.cos(this.b0) * Math.sin(b) - Math.sin(this.b0) * Math.cos(b) * Math.cos(I)); + + p.y = this.R / 2 * Math.log((1 + Math.sin(rotB)) / (1 - Math.sin(rotB))) + this.y0; + p.x = this.R * rotI + this.x0; + return p; + } + + function inverse$7(p) { + var Y = p.x - this.x0; + var X = p.y - this.y0; + + var rotI = Y / this.R; + var rotB = 2 * (Math.atan(Math.exp(X / this.R)) - Math.PI / 4); + + var b = Math.asin(Math.cos(this.b0) * Math.sin(rotB) + Math.sin(this.b0) * Math.cos(rotB) * Math.cos(rotI)); + var I = Math.atan(Math.sin(rotI) / (Math.cos(this.b0) * Math.cos(rotI) - Math.sin(this.b0) * Math.tan(rotB))); + + var lambda = this.lambda0 + I / this.alpha; + + var S = 0; + var phy = b; + var prevPhy = -1000; + var iteration = 0; + while (Math.abs(phy - prevPhy) > 0.0000001) { + if (++iteration > 20) { + //...reportError("omercFwdInfinity"); + return; + } + //S = Math.log(Math.tan(Math.PI / 4 + phy / 2)); + S = 1 / this.alpha * (Math.log(Math.tan(Math.PI / 4 + b / 2)) - this.K) + this.e * Math.log(Math.tan(Math.PI / 4 + Math.asin(this.e * Math.sin(phy)) / 2)); + prevPhy = phy; + phy = 2 * Math.atan(Math.exp(S)) - Math.PI / 2; + } + + p.x = lambda; + p.y = phy; + return p; + } + + var names$9 = ["somerc"]; + var somerc = { + init: init$8, + forward: forward$7, + inverse: inverse$7, + names: names$9 + }; + + var TOL = 1e-7; + + function isTypeA(P) { + var typeAProjections = ['Hotine_Oblique_Mercator','Hotine_Oblique_Mercator_Azimuth_Natural_Origin']; + var projectionName = typeof P.PROJECTION === "object" ? Object.keys(P.PROJECTION)[0] : P.PROJECTION; + + return 'no_uoff' in P || 'no_off' in P || typeAProjections.indexOf(projectionName) !== -1; + } + + + /* Initialize the Oblique Mercator projection + ------------------------------------------*/ + function init$9() { + var con, com, cosph0, D, F, H, L, sinph0, p, J, gamma = 0, + gamma0, lamc = 0, lam1 = 0, lam2 = 0, phi1 = 0, phi2 = 0, alpha_c = 0; + + // only Type A uses the no_off or no_uoff property + // https://github.com/OSGeo/proj.4/issues/104 + this.no_off = isTypeA(this); + this.no_rot = 'no_rot' in this; + + var alp = false; + if ("alpha" in this) { + alp = true; + } + + var gam = false; + if ("rectified_grid_angle" in this) { + gam = true; + } + + if (alp) { + alpha_c = this.alpha; + } + + if (gam) { + gamma = (this.rectified_grid_angle * D2R); + } + + if (alp || gam) { + lamc = this.longc; + } else { + lam1 = this.long1; + phi1 = this.lat1; + lam2 = this.long2; + phi2 = this.lat2; + + if (Math.abs(phi1 - phi2) <= TOL || (con = Math.abs(phi1)) <= TOL || + Math.abs(con - HALF_PI) <= TOL || Math.abs(Math.abs(this.lat0) - HALF_PI) <= TOL || + Math.abs(Math.abs(phi2) - HALF_PI) <= TOL) { + throw new Error(); + } + } + + var one_es = 1.0 - this.es; + com = Math.sqrt(one_es); + + if (Math.abs(this.lat0) > EPSLN) { + sinph0 = Math.sin(this.lat0); + cosph0 = Math.cos(this.lat0); + con = 1 - this.es * sinph0 * sinph0; + this.B = cosph0 * cosph0; + this.B = Math.sqrt(1 + this.es * this.B * this.B / one_es); + this.A = this.B * this.k0 * com / con; + D = this.B * com / (cosph0 * Math.sqrt(con)); + F = D * D -1; + + if (F <= 0) { + F = 0; + } else { + F = Math.sqrt(F); + if (this.lat0 < 0) { + F = -F; + } + } + + this.E = F += D; + this.E *= Math.pow(tsfnz(this.e, this.lat0, sinph0), this.B); + } else { + this.B = 1 / com; + this.A = this.k0; + this.E = D = F = 1; + } + + if (alp || gam) { + if (alp) { + gamma0 = Math.asin(Math.sin(alpha_c) / D); + if (!gam) { + gamma = alpha_c; + } + } else { + gamma0 = gamma; + alpha_c = Math.asin(D * Math.sin(gamma0)); + } + this.lam0 = lamc - Math.asin(0.5 * (F - 1 / F) * Math.tan(gamma0)) / this.B; + } else { + H = Math.pow(tsfnz(this.e, phi1, Math.sin(phi1)), this.B); + L = Math.pow(tsfnz(this.e, phi2, Math.sin(phi2)), this.B); + F = this.E / H; + p = (L - H) / (L + H); + J = this.E * this.E; + J = (J - L * H) / (J + L * H); + con = lam1 - lam2; + + if (con < -Math.pi) { + lam2 -=TWO_PI; + } else if (con > Math.pi) { + lam2 += TWO_PI; + } + + this.lam0 = adjust_lon(0.5 * (lam1 + lam2) - Math.atan(J * Math.tan(0.5 * this.B * (lam1 - lam2)) / p) / this.B); + gamma0 = Math.atan(2 * Math.sin(this.B * adjust_lon(lam1 - this.lam0)) / (F - 1 / F)); + gamma = alpha_c = Math.asin(D * Math.sin(gamma0)); + } + + this.singam = Math.sin(gamma0); + this.cosgam = Math.cos(gamma0); + this.sinrot = Math.sin(gamma); + this.cosrot = Math.cos(gamma); + + this.rB = 1 / this.B; + this.ArB = this.A * this.rB; + this.BrA = 1 / this.ArB; + if (this.no_off) { + this.u_0 = 0; + } else { + this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(D * D - 1) / Math.cos(alpha_c))); + + if (this.lat0 < 0) { + this.u_0 = - this.u_0; + } + } + + F = 0.5 * gamma0; + this.v_pole_n = this.ArB * Math.log(Math.tan(FORTPI - F)); + this.v_pole_s = this.ArB * Math.log(Math.tan(FORTPI + F)); + } + + + /* Oblique Mercator forward equations--mapping lat,long to x,y + ----------------------------------------------------------*/ + function forward$8(p) { + var coords = {}; + var S, T, U, V, W, temp, u, v; + p.x = p.x - this.lam0; + + if (Math.abs(Math.abs(p.y) - HALF_PI) > EPSLN) { + W = this.E / Math.pow(tsfnz(this.e, p.y, Math.sin(p.y)), this.B); + + temp = 1 / W; + S = 0.5 * (W - temp); + T = 0.5 * (W + temp); + V = Math.sin(this.B * p.x); + U = (S * this.singam - V * this.cosgam) / T; + + if (Math.abs(Math.abs(U) - 1.0) < EPSLN) { + throw new Error(); + } + + v = 0.5 * this.ArB * Math.log((1 - U)/(1 + U)); + temp = Math.cos(this.B * p.x); + + if (Math.abs(temp) < TOL) { + u = this.A * p.x; + } else { + u = this.ArB * Math.atan2((S * this.cosgam + V * this.singam), temp); + } + } else { + v = p.y > 0 ? this.v_pole_n : this.v_pole_s; + u = this.ArB * p.y; + } + + if (this.no_rot) { + coords.x = u; + coords.y = v; + } else { + u -= this.u_0; + coords.x = v * this.cosrot + u * this.sinrot; + coords.y = u * this.cosrot - v * this.sinrot; + } + + coords.x = (this.a * coords.x + this.x0); + coords.y = (this.a * coords.y + this.y0); + + return coords; + } + + function inverse$8(p) { + var u, v, Qp, Sp, Tp, Vp, Up; + var coords = {}; + + p.x = (p.x - this.x0) * (1.0 / this.a); + p.y = (p.y - this.y0) * (1.0 / this.a); + + if (this.no_rot) { + v = p.y; + u = p.x; + } else { + v = p.x * this.cosrot - p.y * this.sinrot; + u = p.y * this.cosrot + p.x * this.sinrot + this.u_0; + } + + Qp = Math.exp(-this.BrA * v); + Sp = 0.5 * (Qp - 1 / Qp); + Tp = 0.5 * (Qp + 1 / Qp); + Vp = Math.sin(this.BrA * u); + Up = (Vp * this.cosgam + Sp * this.singam) / Tp; + + if (Math.abs(Math.abs(Up) - 1) < EPSLN) { + coords.x = 0; + coords.y = Up < 0 ? -HALF_PI : HALF_PI; + } else { + coords.y = this.E / Math.sqrt((1 + Up) / (1 - Up)); + coords.y = phi2z(this.e, Math.pow(coords.y, 1 / this.B)); + + if (coords.y === Infinity) { + throw new Error(); + } + + coords.x = -this.rB * Math.atan2((Sp * this.cosgam - Vp * this.singam), Math.cos(this.BrA * u)); + } + + coords.x += this.lam0; + + return coords; + } + + var names$10 = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Two_Point_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "Oblique_Mercator", "omerc"]; + var omerc = { + init: init$9, + forward: forward$8, + inverse: inverse$8, + names: names$10 + }; + + function init$10() { + + //double lat0; /* the reference latitude */ + //double long0; /* the reference longitude */ + //double lat1; /* first standard parallel */ + //double lat2; /* second standard parallel */ + //double r_maj; /* major axis */ + //double r_min; /* minor axis */ + //double false_east; /* x offset in meters */ + //double false_north; /* y offset in meters */ + + //the above value can be set with proj4.defs + //example: proj4.defs("EPSG:2154","+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"); + + if (!this.lat2) { + this.lat2 = this.lat1; + } //if lat2 is not defined + if (!this.k0) { + this.k0 = 1; + } + this.x0 = this.x0 || 0; + this.y0 = this.y0 || 0; + // Standard Parallels cannot be equal and on opposite sides of the equator + if (Math.abs(this.lat1 + this.lat2) < EPSLN) { + return; + } + + var temp = this.b / this.a; + this.e = Math.sqrt(1 - temp * temp); + + var sin1 = Math.sin(this.lat1); + var cos1 = Math.cos(this.lat1); + var ms1 = msfnz(this.e, sin1, cos1); + var ts1 = tsfnz(this.e, this.lat1, sin1); + + var sin2 = Math.sin(this.lat2); + var cos2 = Math.cos(this.lat2); + var ms2 = msfnz(this.e, sin2, cos2); + var ts2 = tsfnz(this.e, this.lat2, sin2); + + var ts0 = tsfnz(this.e, this.lat0, Math.sin(this.lat0)); + + if (Math.abs(this.lat1 - this.lat2) > EPSLN) { + this.ns = Math.log(ms1 / ms2) / Math.log(ts1 / ts2); + } + else { + this.ns = sin1; + } + if (isNaN(this.ns)) { + this.ns = sin1; + } + this.f0 = ms1 / (this.ns * Math.pow(ts1, this.ns)); + this.rh = this.a * this.f0 * Math.pow(ts0, this.ns); + if (!this.title) { + this.title = "Lambert Conformal Conic"; + } + } + + // Lambert Conformal conic forward equations--mapping lat,long to x,y + // ----------------------------------------------------------------- + function forward$9(p) { + + var lon = p.x; + var lat = p.y; + + // singular cases : + if (Math.abs(2 * Math.abs(lat) - Math.PI) <= EPSLN) { + lat = sign(lat) * (HALF_PI - 2 * EPSLN); + } + + var con = Math.abs(Math.abs(lat) - HALF_PI); + var ts, rh1; + if (con > EPSLN) { + ts = tsfnz(this.e, lat, Math.sin(lat)); + rh1 = this.a * this.f0 * Math.pow(ts, this.ns); + } + else { + con = lat * this.ns; + if (con <= 0) { + return null; + } + rh1 = 0; + } + var theta = this.ns * adjust_lon(lon - this.long0); + p.x = this.k0 * (rh1 * Math.sin(theta)) + this.x0; + p.y = this.k0 * (this.rh - rh1 * Math.cos(theta)) + this.y0; + + return p; + } + + // Lambert Conformal Conic inverse equations--mapping x,y to lat/long + // ----------------------------------------------------------------- + function inverse$9(p) { + + var rh1, con, ts; + var lat, lon; + var x = (p.x - this.x0) / this.k0; + var y = (this.rh - (p.y - this.y0) / this.k0); + if (this.ns > 0) { + rh1 = Math.sqrt(x * x + y * y); + con = 1; + } + else { + rh1 = -Math.sqrt(x * x + y * y); + con = -1; + } + var theta = 0; + if (rh1 !== 0) { + theta = Math.atan2((con * x), (con * y)); + } + if ((rh1 !== 0) || (this.ns > 0)) { + con = 1 / this.ns; + ts = Math.pow((rh1 / (this.a * this.f0)), con); + lat = phi2z(this.e, ts); + if (lat === -9999) { + return null; + } + } + else { + lat = -HALF_PI; + } + lon = adjust_lon(theta / this.ns + this.long0); + + p.x = lon; + p.y = lat; + return p; + } + + var names$11 = [ + "Lambert Tangential Conformal Conic Projection", + "Lambert_Conformal_Conic", + "Lambert_Conformal_Conic_1SP", + "Lambert_Conformal_Conic_2SP", + "lcc" + ]; + + var lcc = { + init: init$10, + forward: forward$9, + inverse: inverse$9, + names: names$11 + }; + + function init$11() { + this.a = 6377397.155; + this.es = 0.006674372230614; + this.e = Math.sqrt(this.es); + if (!this.lat0) { + this.lat0 = 0.863937979737193; + } + if (!this.long0) { + this.long0 = 0.7417649320975901 - 0.308341501185665; + } + /* if scale not set default to 0.9999 */ + if (!this.k0) { + this.k0 = 0.9999; + } + this.s45 = 0.785398163397448; /* 45 */ + this.s90 = 2 * this.s45; + this.fi0 = this.lat0; + this.e2 = this.es; + this.e = Math.sqrt(this.e2); + this.alfa = Math.sqrt(1 + (this.e2 * Math.pow(Math.cos(this.fi0), 4)) / (1 - this.e2)); + this.uq = 1.04216856380474; + this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa); + this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2); + this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g; + this.k1 = this.k0; + this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2)); + this.s0 = 1.37008346281555; + this.n = Math.sin(this.s0); + this.ro0 = this.k1 * this.n0 / Math.tan(this.s0); + this.ad = this.s90 - this.uq; + } + + /* ellipsoid */ + /* calculate xy from lat/lon */ + /* Constants, identical to inverse transform function */ + function forward$10(p) { + var gfi, u, deltav, s, d, eps, ro; + var lon = p.x; + var lat = p.y; + var delta_lon = adjust_lon(lon - this.long0); + /* Transformation */ + gfi = Math.pow(((1 + this.e * Math.sin(lat)) / (1 - this.e * Math.sin(lat))), (this.alfa * this.e / 2)); + u = 2 * (Math.atan(this.k * Math.pow(Math.tan(lat / 2 + this.s45), this.alfa) / gfi) - this.s45); + deltav = -delta_lon * this.alfa; + s = Math.asin(Math.cos(this.ad) * Math.sin(u) + Math.sin(this.ad) * Math.cos(u) * Math.cos(deltav)); + d = Math.asin(Math.cos(u) * Math.sin(deltav) / Math.cos(s)); + eps = this.n * d; + ro = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n); + p.y = ro * Math.cos(eps) / 1; + p.x = ro * Math.sin(eps) / 1; + + if (!this.czech) { + p.y *= -1; + p.x *= -1; + } + return (p); + } + + /* calculate lat/lon from xy */ + function inverse$10(p) { + var u, deltav, s, d, eps, ro, fi1; + var ok; + + /* Transformation */ + /* revert y, x*/ + var tmp = p.x; + p.x = p.y; + p.y = tmp; + if (!this.czech) { + p.y *= -1; + p.x *= -1; + } + ro = Math.sqrt(p.x * p.x + p.y * p.y); + eps = Math.atan2(p.y, p.x); + d = eps / Math.sin(this.s0); + s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45); + u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d)); + deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u)); + p.x = this.long0 - deltav / this.alfa; + fi1 = u; + ok = 0; + var iter = 0; + do { + p.y = 2 * (Math.atan(Math.pow(this.k, - 1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45); + if (Math.abs(fi1 - p.y) < 0.0000000001) { + ok = 1; + } + fi1 = p.y; + iter += 1; + } while (ok === 0 && iter < 15); + if (iter >= 15) { + return null; + } + + return (p); + } + + var names$12 = ["Krovak", "krovak"]; + var krovak = { + init: init$11, + forward: forward$10, + inverse: inverse$10, + names: names$12 + }; + + var mlfn = function(e0, e1, e2, e3, phi) { + return (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi)); + }; + + var e0fn = function(x) { + return (1 - 0.25 * x * (1 + x / 16 * (3 + 1.25 * x))); + }; + + var e1fn = function(x) { + return (0.375 * x * (1 + 0.25 * x * (1 + 0.46875 * x))); + }; + + var e2fn = function(x) { + return (0.05859375 * x * x * (1 + 0.75 * x)); + }; + + var e3fn = function(x) { + return (x * x * x * (35 / 3072)); + }; + + var gN = function(a, e, sinphi) { + var temp = e * sinphi; + return a / Math.sqrt(1 - temp * temp); + }; + + var adjust_lat = function(x) { + return (Math.abs(x) < HALF_PI) ? x : (x - (sign(x) * Math.PI)); + }; + + var imlfn = function(ml, e0, e1, e2, e3) { + var phi; + var dphi; + + phi = ml / e0; + for (var i = 0; i < 15; i++) { + dphi = (ml - (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi))) / (e0 - 2 * e1 * Math.cos(2 * phi) + 4 * e2 * Math.cos(4 * phi) - 6 * e3 * Math.cos(6 * phi)); + phi += dphi; + if (Math.abs(dphi) <= 0.0000000001) { + return phi; + } + } + + //..reportError("IMLFN-CONV:Latitude failed to converge after 15 iterations"); + return NaN; + }; + + function init$12() { + if (!this.sphere) { + this.e0 = e0fn(this.es); + this.e1 = e1fn(this.es); + this.e2 = e2fn(this.es); + this.e3 = e3fn(this.es); + this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0); + } + } + + /* Cassini forward equations--mapping lat,long to x,y + -----------------------------------------------------------------------*/ + function forward$11(p) { + + /* Forward equations + -----------------*/ + var x, y; + var lam = p.x; + var phi = p.y; + lam = adjust_lon(lam - this.long0); + + if (this.sphere) { + x = this.a * Math.asin(Math.cos(phi) * Math.sin(lam)); + y = this.a * (Math.atan2(Math.tan(phi), Math.cos(lam)) - this.lat0); + } + else { + //ellipsoid + var sinphi = Math.sin(phi); + var cosphi = Math.cos(phi); + var nl = gN(this.a, this.e, sinphi); + var tl = Math.tan(phi) * Math.tan(phi); + var al = lam * Math.cos(phi); + var asq = al * al; + var cl = this.es * cosphi * cosphi / (1 - this.es); + var ml = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, phi); + + x = nl * al * (1 - asq * tl * (1 / 6 - (8 - tl + 8 * cl) * asq / 120)); + y = ml - this.ml0 + nl * sinphi / cosphi * asq * (0.5 + (5 - tl + 6 * cl) * asq / 24); + + + } + + p.x = x + this.x0; + p.y = y + this.y0; + return p; + } + + /* Inverse equations + -----------------*/ + function inverse$11(p) { + p.x -= this.x0; + p.y -= this.y0; + var x = p.x / this.a; + var y = p.y / this.a; + var phi, lam; + + if (this.sphere) { + var dd = y + this.lat0; + phi = Math.asin(Math.sin(dd) * Math.cos(x)); + lam = Math.atan2(Math.tan(x), Math.cos(dd)); + } + else { + /* ellipsoid */ + var ml1 = this.ml0 / this.a + y; + var phi1 = imlfn(ml1, this.e0, this.e1, this.e2, this.e3); + if (Math.abs(Math.abs(phi1) - HALF_PI) <= EPSLN) { + p.x = this.long0; + p.y = HALF_PI; + if (y < 0) { + p.y *= -1; + } + return p; + } + var nl1 = gN(this.a, this.e, Math.sin(phi1)); + + var rl1 = nl1 * nl1 * nl1 / this.a / this.a * (1 - this.es); + var tl1 = Math.pow(Math.tan(phi1), 2); + var dl = x * this.a / nl1; + var dsq = dl * dl; + phi = phi1 - nl1 * Math.tan(phi1) / rl1 * dl * dl * (0.5 - (1 + 3 * tl1) * dl * dl / 24); + lam = dl * (1 - dsq * (tl1 / 3 + (1 + 3 * tl1) * tl1 * dsq / 15)) / Math.cos(phi1); + + } + + p.x = adjust_lon(lam + this.long0); + p.y = adjust_lat(phi); + return p; + + } + + var names$13 = ["Cassini", "Cassini_Soldner", "cass"]; + var cass = { + init: init$12, + forward: forward$11, + inverse: inverse$11, + names: names$13 + }; + + var qsfnz = function(eccent, sinphi) { + var con; + if (eccent > 1.0e-7) { + con = eccent * sinphi; + return ((1 - eccent * eccent) * (sinphi / (1 - con * con) - (0.5 / eccent) * Math.log((1 - con) / (1 + con)))); + } + else { + return (2 * sinphi); + } + }; + + /* + reference + "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, + The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. + */ + + var S_POLE = 1; + + var N_POLE = 2; + var EQUIT = 3; + var OBLIQ = 4; + + /* Initialize the Lambert Azimuthal Equal Area projection + ------------------------------------------------------*/ + function init$13() { + var t = Math.abs(this.lat0); + if (Math.abs(t - HALF_PI) < EPSLN) { + this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE; + } + else if (Math.abs(t) < EPSLN) { + this.mode = this.EQUIT; + } + else { + this.mode = this.OBLIQ; + } + if (this.es > 0) { + var sinphi; + + this.qp = qsfnz(this.e, 1); + this.mmf = 0.5 / (1 - this.es); + this.apa = authset(this.es); + switch (this.mode) { + case this.N_POLE: + this.dd = 1; + break; + case this.S_POLE: + this.dd = 1; + break; + case this.EQUIT: + this.rq = Math.sqrt(0.5 * this.qp); + this.dd = 1 / this.rq; + this.xmf = 1; + this.ymf = 0.5 * this.qp; + break; + case this.OBLIQ: + this.rq = Math.sqrt(0.5 * this.qp); + sinphi = Math.sin(this.lat0); + this.sinb1 = qsfnz(this.e, sinphi) / this.qp; + this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1); + this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * sinphi * sinphi) * this.rq * this.cosb1); + this.ymf = (this.xmf = this.rq) / this.dd; + this.xmf *= this.dd; + break; + } + } + else { + if (this.mode === this.OBLIQ) { + this.sinph0 = Math.sin(this.lat0); + this.cosph0 = Math.cos(this.lat0); + } + } + } + + /* Lambert Azimuthal Equal Area forward equations--mapping lat,long to x,y + -----------------------------------------------------------------------*/ + function forward$12(p) { + + /* Forward equations + -----------------*/ + var x, y, coslam, sinlam, sinphi, q, sinb, cosb, b, cosphi; + var lam = p.x; + var phi = p.y; + + lam = adjust_lon(lam - this.long0); + if (this.sphere) { + sinphi = Math.sin(phi); + cosphi = Math.cos(phi); + coslam = Math.cos(lam); + if (this.mode === this.OBLIQ || this.mode === this.EQUIT) { + y = (this.mode === this.EQUIT) ? 1 + cosphi * coslam : 1 + this.sinph0 * sinphi + this.cosph0 * cosphi * coslam; + if (y <= EPSLN) { + return null; + } + y = Math.sqrt(2 / y); + x = y * cosphi * Math.sin(lam); + y *= (this.mode === this.EQUIT) ? sinphi : this.cosph0 * sinphi - this.sinph0 * cosphi * coslam; + } + else if (this.mode === this.N_POLE || this.mode === this.S_POLE) { + if (this.mode === this.N_POLE) { + coslam = -coslam; + } + if (Math.abs(phi + this.lat0) < EPSLN) { + return null; + } + y = FORTPI - phi * 0.5; + y = 2 * ((this.mode === this.S_POLE) ? Math.cos(y) : Math.sin(y)); + x = y * Math.sin(lam); + y *= coslam; + } + } + else { + sinb = 0; + cosb = 0; + b = 0; + coslam = Math.cos(lam); + sinlam = Math.sin(lam); + sinphi = Math.sin(phi); + q = qsfnz(this.e, sinphi); + if (this.mode === this.OBLIQ || this.mode === this.EQUIT) { + sinb = q / this.qp; + cosb = Math.sqrt(1 - sinb * sinb); + } + switch (this.mode) { + case this.OBLIQ: + b = 1 + this.sinb1 * sinb + this.cosb1 * cosb * coslam; + break; + case this.EQUIT: + b = 1 + cosb * coslam; + break; + case this.N_POLE: + b = HALF_PI + phi; + q = this.qp - q; + break; + case this.S_POLE: + b = phi - HALF_PI; + q = this.qp + q; + break; + } + if (Math.abs(b) < EPSLN) { + return null; + } + switch (this.mode) { + case this.OBLIQ: + case this.EQUIT: + b = Math.sqrt(2 / b); + if (this.mode === this.OBLIQ) { + y = this.ymf * b * (this.cosb1 * sinb - this.sinb1 * cosb * coslam); + } + else { + y = (b = Math.sqrt(2 / (1 + cosb * coslam))) * sinb * this.ymf; + } + x = this.xmf * b * cosb * sinlam; + break; + case this.N_POLE: + case this.S_POLE: + if (q >= 0) { + x = (b = Math.sqrt(q)) * sinlam; + y = coslam * ((this.mode === this.S_POLE) ? b : -b); + } + else { + x = y = 0; + } + break; + } + } + + p.x = this.a * x + this.x0; + p.y = this.a * y + this.y0; + return p; + } + + /* Inverse equations + -----------------*/ + function inverse$12(p) { + p.x -= this.x0; + p.y -= this.y0; + var x = p.x / this.a; + var y = p.y / this.a; + var lam, phi, cCe, sCe, q, rho, ab; + if (this.sphere) { + var cosz = 0, + rh, sinz = 0; + + rh = Math.sqrt(x * x + y * y); + phi = rh * 0.5; + if (phi > 1) { + return null; + } + phi = 2 * Math.asin(phi); + if (this.mode === this.OBLIQ || this.mode === this.EQUIT) { + sinz = Math.sin(phi); + cosz = Math.cos(phi); + } + switch (this.mode) { + case this.EQUIT: + phi = (Math.abs(rh) <= EPSLN) ? 0 : Math.asin(y * sinz / rh); + x *= sinz; + y = cosz * rh; + break; + case this.OBLIQ: + phi = (Math.abs(rh) <= EPSLN) ? this.lat0 : Math.asin(cosz * this.sinph0 + y * sinz * this.cosph0 / rh); + x *= sinz * this.cosph0; + y = (cosz - Math.sin(phi) * this.sinph0) * rh; + break; + case this.N_POLE: + y = -y; + phi = HALF_PI - phi; + break; + case this.S_POLE: + phi -= HALF_PI; + break; + } + lam = (y === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ)) ? 0 : Math.atan2(x, y); + } + else { + ab = 0; + if (this.mode === this.OBLIQ || this.mode === this.EQUIT) { + x /= this.dd; + y *= this.dd; + rho = Math.sqrt(x * x + y * y); + if (rho < EPSLN) { + p.x = this.long0; + p.y = this.lat0; + return p; + } + sCe = 2 * Math.asin(0.5 * rho / this.rq); + cCe = Math.cos(sCe); + x *= (sCe = Math.sin(sCe)); + if (this.mode === this.OBLIQ) { + ab = cCe * this.sinb1 + y * sCe * this.cosb1 / rho; + q = this.qp * ab; + y = rho * this.cosb1 * cCe - y * this.sinb1 * sCe; + } + else { + ab = y * sCe / rho; + q = this.qp * ab; + y = rho * cCe; + } + } + else if (this.mode === this.N_POLE || this.mode === this.S_POLE) { + if (this.mode === this.N_POLE) { + y = -y; + } + q = (x * x + y * y); + if (!q) { + p.x = this.long0; + p.y = this.lat0; + return p; + } + ab = 1 - q / this.qp; + if (this.mode === this.S_POLE) { + ab = -ab; + } + } + lam = Math.atan2(x, y); + phi = authlat(Math.asin(ab), this.apa); + } + + p.x = adjust_lon(this.long0 + lam); + p.y = phi; + return p; + } + + /* determine latitude from authalic latitude */ + var P00 = 0.33333333333333333333; + + var P01 = 0.17222222222222222222; + var P02 = 0.10257936507936507936; + var P10 = 0.06388888888888888888; + var P11 = 0.06640211640211640211; + var P20 = 0.01641501294219154443; + + function authset(es) { + var t; + var APA = []; + APA[0] = es * P00; + t = es * es; + APA[0] += t * P01; + APA[1] = t * P10; + t *= es; + APA[0] += t * P02; + APA[1] += t * P11; + APA[2] = t * P20; + return APA; + } + + function authlat(beta, APA) { + var t = beta + beta; + return (beta + APA[0] * Math.sin(t) + APA[1] * Math.sin(t + t) + APA[2] * Math.sin(t + t + t)); + } + + var names$14 = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"]; + var laea = { + init: init$13, + forward: forward$12, + inverse: inverse$12, + names: names$14, + S_POLE: S_POLE, + N_POLE: N_POLE, + EQUIT: EQUIT, + OBLIQ: OBLIQ + }; + + var asinz = function(x) { + if (Math.abs(x) > 1) { + x = (x > 1) ? 1 : -1; + } + return Math.asin(x); + }; + + function init$14() { + + if (Math.abs(this.lat1 + this.lat2) < EPSLN) { + return; + } + this.temp = this.b / this.a; + this.es = 1 - Math.pow(this.temp, 2); + this.e3 = Math.sqrt(this.es); + + this.sin_po = Math.sin(this.lat1); + this.cos_po = Math.cos(this.lat1); + this.t1 = this.sin_po; + this.con = this.sin_po; + this.ms1 = msfnz(this.e3, this.sin_po, this.cos_po); + this.qs1 = qsfnz(this.e3, this.sin_po, this.cos_po); + + this.sin_po = Math.sin(this.lat2); + this.cos_po = Math.cos(this.lat2); + this.t2 = this.sin_po; + this.ms2 = msfnz(this.e3, this.sin_po, this.cos_po); + this.qs2 = qsfnz(this.e3, this.sin_po, this.cos_po); + + this.sin_po = Math.sin(this.lat0); + this.cos_po = Math.cos(this.lat0); + this.t3 = this.sin_po; + this.qs0 = qsfnz(this.e3, this.sin_po, this.cos_po); + + if (Math.abs(this.lat1 - this.lat2) > EPSLN) { + this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1); + } + else { + this.ns0 = this.con; + } + this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1; + this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0; + } + + /* Albers Conical Equal Area forward equations--mapping lat,long to x,y + -------------------------------------------------------------------*/ + function forward$13(p) { + + var lon = p.x; + var lat = p.y; + + this.sin_phi = Math.sin(lat); + this.cos_phi = Math.cos(lat); + + var qs = qsfnz(this.e3, this.sin_phi, this.cos_phi); + var rh1 = this.a * Math.sqrt(this.c - this.ns0 * qs) / this.ns0; + var theta = this.ns0 * adjust_lon(lon - this.long0); + var x = rh1 * Math.sin(theta) + this.x0; + var y = this.rh - rh1 * Math.cos(theta) + this.y0; + + p.x = x; + p.y = y; + return p; + } + + function inverse$13(p) { + var rh1, qs, con, theta, lon, lat; + + p.x -= this.x0; + p.y = this.rh - p.y + this.y0; + if (this.ns0 >= 0) { + rh1 = Math.sqrt(p.x * p.x + p.y * p.y); + con = 1; + } + else { + rh1 = -Math.sqrt(p.x * p.x + p.y * p.y); + con = -1; + } + theta = 0; + if (rh1 !== 0) { + theta = Math.atan2(con * p.x, con * p.y); + } + con = rh1 * this.ns0 / this.a; + if (this.sphere) { + lat = Math.asin((this.c - con * con) / (2 * this.ns0)); + } + else { + qs = (this.c - con * con) / this.ns0; + lat = this.phi1z(this.e3, qs); + } + + lon = adjust_lon(theta / this.ns0 + this.long0); + p.x = lon; + p.y = lat; + return p; + } + + /* Function to compute phi1, the latitude for the inverse of the + Albers Conical Equal-Area projection. + -------------------------------------------*/ + function phi1z(eccent, qs) { + var sinphi, cosphi, con, com, dphi; + var phi = asinz(0.5 * qs); + if (eccent < EPSLN) { + return phi; + } + + var eccnts = eccent * eccent; + for (var i = 1; i <= 25; i++) { + sinphi = Math.sin(phi); + cosphi = Math.cos(phi); + con = eccent * sinphi; + com = 1 - con * con; + dphi = 0.5 * com * com / cosphi * (qs / (1 - eccnts) - sinphi / com + 0.5 / eccent * Math.log((1 - con) / (1 + con))); + phi = phi + dphi; + if (Math.abs(dphi) <= 1e-7) { + return phi; + } + } + return null; + } + + var names$15 = ["Albers_Conic_Equal_Area", "Albers", "aea"]; + var aea = { + init: init$14, + forward: forward$13, + inverse: inverse$13, + names: names$15, + phi1z: phi1z + }; + + /* + reference: + Wolfram Mathworld "Gnomonic Projection" + http://mathworld.wolfram.com/GnomonicProjection.html + Accessed: 12th November 2009 + */ + function init$15() { + + /* Place parameters in static storage for common use + -------------------------------------------------*/ + this.sin_p14 = Math.sin(this.lat0); + this.cos_p14 = Math.cos(this.lat0); + // Approximation for projecting points to the horizon (infinity) + this.infinity_dist = 1000 * this.a; + this.rc = 1; + } + + /* Gnomonic forward equations--mapping lat,long to x,y + ---------------------------------------------------*/ + function forward$14(p) { + var sinphi, cosphi; /* sin and cos value */ + var dlon; /* delta longitude value */ + var coslon; /* cos of longitude */ + var ksp; /* scale factor */ + var g; + var x, y; + var lon = p.x; + var lat = p.y; + /* Forward equations + -----------------*/ + dlon = adjust_lon(lon - this.long0); + + sinphi = Math.sin(lat); + cosphi = Math.cos(lat); + + coslon = Math.cos(dlon); + g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon; + ksp = 1; + if ((g > 0) || (Math.abs(g) <= EPSLN)) { + x = this.x0 + this.a * ksp * cosphi * Math.sin(dlon) / g; + y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon) / g; + } + else { + + // Point is in the opposing hemisphere and is unprojectable + // We still need to return a reasonable point, so we project + // to infinity, on a bearing + // equivalent to the northern hemisphere equivalent + // This is a reasonable approximation for short shapes and lines that + // straddle the horizon. + + x = this.x0 + this.infinity_dist * cosphi * Math.sin(dlon); + y = this.y0 + this.infinity_dist * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon); + + } + p.x = x; + p.y = y; + return p; + } + + function inverse$14(p) { + var rh; /* Rho */ + var sinc, cosc; + var c; + var lon, lat; + + /* Inverse equations + -----------------*/ + p.x = (p.x - this.x0) / this.a; + p.y = (p.y - this.y0) / this.a; + + p.x /= this.k0; + p.y /= this.k0; + + if ((rh = Math.sqrt(p.x * p.x + p.y * p.y))) { + c = Math.atan2(rh, this.rc); + sinc = Math.sin(c); + cosc = Math.cos(c); + + lat = asinz(cosc * this.sin_p14 + (p.y * sinc * this.cos_p14) / rh); + lon = Math.atan2(p.x * sinc, rh * this.cos_p14 * cosc - p.y * this.sin_p14 * sinc); + lon = adjust_lon(this.long0 + lon); + } + else { + lat = this.phic0; + lon = 0; + } + + p.x = lon; + p.y = lat; + return p; + } + + var names$16 = ["gnom"]; + var gnom = { + init: init$15, + forward: forward$14, + inverse: inverse$14, + names: names$16 + }; + + var iqsfnz = function(eccent, q) { + var temp = 1 - (1 - eccent * eccent) / (2 * eccent) * Math.log((1 - eccent) / (1 + eccent)); + if (Math.abs(Math.abs(q) - temp) < 1.0E-6) { + if (q < 0) { + return (-1 * HALF_PI); + } + else { + return HALF_PI; + } + } + //var phi = 0.5* q/(1-eccent*eccent); + var phi = Math.asin(0.5 * q); + var dphi; + var sin_phi; + var cos_phi; + var con; + for (var i = 0; i < 30; i++) { + sin_phi = Math.sin(phi); + cos_phi = Math.cos(phi); + con = eccent * sin_phi; + dphi = Math.pow(1 - con * con, 2) / (2 * cos_phi) * (q / (1 - eccent * eccent) - sin_phi / (1 - con * con) + 0.5 / eccent * Math.log((1 - con) / (1 + con))); + phi += dphi; + if (Math.abs(dphi) <= 0.0000000001) { + return phi; + } + } + + //console.log("IQSFN-CONV:Latitude failed to converge after 30 iterations"); + return NaN; + }; + + /* + reference: + "Cartographic Projection Procedures for the UNIX Environment- + A User's Manual" by Gerald I. Evenden, + USGS Open File Report 90-284and Release 4 Interim Reports (2003) + */ + function init$16() { + //no-op + if (!this.sphere) { + this.k0 = msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)); + } + } + + /* Cylindrical Equal Area forward equations--mapping lat,long to x,y + ------------------------------------------------------------*/ + function forward$15(p) { + var lon = p.x; + var lat = p.y; + var x, y; + /* Forward equations + -----------------*/ + var dlon = adjust_lon(lon - this.long0); + if (this.sphere) { + x = this.x0 + this.a * dlon * Math.cos(this.lat_ts); + y = this.y0 + this.a * Math.sin(lat) / Math.cos(this.lat_ts); + } + else { + var qs = qsfnz(this.e, Math.sin(lat)); + x = this.x0 + this.a * this.k0 * dlon; + y = this.y0 + this.a * qs * 0.5 / this.k0; + } + + p.x = x; + p.y = y; + return p; + } + + /* Cylindrical Equal Area inverse equations--mapping x,y to lat/long + ------------------------------------------------------------*/ + function inverse$15(p) { + p.x -= this.x0; + p.y -= this.y0; + var lon, lat; + + if (this.sphere) { + lon = adjust_lon(this.long0 + (p.x / this.a) / Math.cos(this.lat_ts)); + lat = Math.asin((p.y / this.a) * Math.cos(this.lat_ts)); + } + else { + lat = iqsfnz(this.e, 2 * p.y * this.k0 / this.a); + lon = adjust_lon(this.long0 + p.x / (this.a * this.k0)); + } + + p.x = lon; + p.y = lat; + return p; + } + + var names$17 = ["cea"]; + var cea = { + init: init$16, + forward: forward$15, + inverse: inverse$15, + names: names$17 + }; + + function init$17() { + + this.x0 = this.x0 || 0; + this.y0 = this.y0 || 0; + this.lat0 = this.lat0 || 0; + this.long0 = this.long0 || 0; + this.lat_ts = this.lat_ts || 0; + this.title = this.title || "Equidistant Cylindrical (Plate Carre)"; + + this.rc = Math.cos(this.lat_ts); + } + + // forward equations--mapping lat,long to x,y + // ----------------------------------------------------------------- + function forward$16(p) { + + var lon = p.x; + var lat = p.y; + + var dlon = adjust_lon(lon - this.long0); + var dlat = adjust_lat(lat - this.lat0); + p.x = this.x0 + (this.a * dlon * this.rc); + p.y = this.y0 + (this.a * dlat); + return p; + } + + // inverse equations--mapping x,y to lat/long + // ----------------------------------------------------------------- + function inverse$16(p) { + + var x = p.x; + var y = p.y; + + p.x = adjust_lon(this.long0 + ((x - this.x0) / (this.a * this.rc))); + p.y = adjust_lat(this.lat0 + ((y - this.y0) / (this.a))); + return p; + } + + var names$18 = ["Equirectangular", "Equidistant_Cylindrical", "eqc"]; + var eqc = { + init: init$17, + forward: forward$16, + inverse: inverse$16, + names: names$18 + }; + + var MAX_ITER$2 = 20; + + function init$18() { + /* Place parameters in static storage for common use + -------------------------------------------------*/ + this.temp = this.b / this.a; + this.es = 1 - Math.pow(this.temp, 2); // devait etre dans tmerc.js mais n y est pas donc je commente sinon retour de valeurs nulles + this.e = Math.sqrt(this.es); + this.e0 = e0fn(this.es); + this.e1 = e1fn(this.es); + this.e2 = e2fn(this.es); + this.e3 = e3fn(this.es); + this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0); //si que des zeros le calcul ne se fait pas + } + + /* Polyconic forward equations--mapping lat,long to x,y + ---------------------------------------------------*/ + function forward$17(p) { + var lon = p.x; + var lat = p.y; + var x, y, el; + var dlon = adjust_lon(lon - this.long0); + el = dlon * Math.sin(lat); + if (this.sphere) { + if (Math.abs(lat) <= EPSLN) { + x = this.a * dlon; + y = -1 * this.a * this.lat0; + } + else { + x = this.a * Math.sin(el) / Math.tan(lat); + y = this.a * (adjust_lat(lat - this.lat0) + (1 - Math.cos(el)) / Math.tan(lat)); + } + } + else { + if (Math.abs(lat) <= EPSLN) { + x = this.a * dlon; + y = -1 * this.ml0; + } + else { + var nl = gN(this.a, this.e, Math.sin(lat)) / Math.tan(lat); + x = nl * Math.sin(el); + y = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, lat) - this.ml0 + nl * (1 - Math.cos(el)); + } + + } + p.x = x + this.x0; + p.y = y + this.y0; + return p; + } + + /* Inverse equations + -----------------*/ + function inverse$17(p) { + var lon, lat, x, y, i; + var al, bl; + var phi, dphi; + x = p.x - this.x0; + y = p.y - this.y0; + + if (this.sphere) { + if (Math.abs(y + this.a * this.lat0) <= EPSLN) { + lon = adjust_lon(x / this.a + this.long0); + lat = 0; + } + else { + al = this.lat0 + y / this.a; + bl = x * x / this.a / this.a + al * al; + phi = al; + var tanphi; + for (i = MAX_ITER$2; i; --i) { + tanphi = Math.tan(phi); + dphi = -1 * (al * (phi * tanphi + 1) - phi - 0.5 * (phi * phi + bl) * tanphi) / ((phi - al) / tanphi - 1); + phi += dphi; + if (Math.abs(dphi) <= EPSLN) { + lat = phi; + break; + } + } + lon = adjust_lon(this.long0 + (Math.asin(x * Math.tan(phi) / this.a)) / Math.sin(lat)); + } + } + else { + if (Math.abs(y + this.ml0) <= EPSLN) { + lat = 0; + lon = adjust_lon(this.long0 + x / this.a); + } + else { + + al = (this.ml0 + y) / this.a; + bl = x * x / this.a / this.a + al * al; + phi = al; + var cl, mln, mlnp, ma; + var con; + for (i = MAX_ITER$2; i; --i) { + con = this.e * Math.sin(phi); + cl = Math.sqrt(1 - con * con) * Math.tan(phi); + mln = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, phi); + mlnp = this.e0 - 2 * this.e1 * Math.cos(2 * phi) + 4 * this.e2 * Math.cos(4 * phi) - 6 * this.e3 * Math.cos(6 * phi); + ma = mln / this.a; + dphi = (al * (cl * ma + 1) - ma - 0.5 * cl * (ma * ma + bl)) / (this.es * Math.sin(2 * phi) * (ma * ma + bl - 2 * al * ma) / (4 * cl) + (al - ma) * (cl * mlnp - 2 / Math.sin(2 * phi)) - mlnp); + phi -= dphi; + if (Math.abs(dphi) <= EPSLN) { + lat = phi; + break; + } + } + + //lat=phi4z(this.e,this.e0,this.e1,this.e2,this.e3,al,bl,0,0); + cl = Math.sqrt(1 - this.es * Math.pow(Math.sin(lat), 2)) * Math.tan(lat); + lon = adjust_lon(this.long0 + Math.asin(x * cl / this.a) / Math.sin(lat)); + } + } + + p.x = lon; + p.y = lat; + return p; + } + + var names$19 = ["Polyconic", "poly"]; + var poly = { + init: init$18, + forward: forward$17, + inverse: inverse$17, + names: names$19 + }; + + /* + reference + Department of Land and Survey Technical Circular 1973/32 + http://www.linz.govt.nz/docs/miscellaneous/nz-map-definition.pdf + OSG Technical Report 4.1 + http://www.linz.govt.nz/docs/miscellaneous/nzmg.pdf + */ + + /** + * iterations: Number of iterations to refine inverse transform. + * 0 -> km accuracy + * 1 -> m accuracy -- suitable for most mapping applications + * 2 -> mm accuracy + */ + + + function init$19() { + this.A = []; + this.A[1] = 0.6399175073; + this.A[2] = -0.1358797613; + this.A[3] = 0.063294409; + this.A[4] = -0.02526853; + this.A[5] = 0.0117879; + this.A[6] = -0.0055161; + this.A[7] = 0.0026906; + this.A[8] = -0.001333; + this.A[9] = 0.00067; + this.A[10] = -0.00034; + + this.B_re = []; + this.B_im = []; + this.B_re[1] = 0.7557853228; + this.B_im[1] = 0; + this.B_re[2] = 0.249204646; + this.B_im[2] = 0.003371507; + this.B_re[3] = -0.001541739; + this.B_im[3] = 0.041058560; + this.B_re[4] = -0.10162907; + this.B_im[4] = 0.01727609; + this.B_re[5] = -0.26623489; + this.B_im[5] = -0.36249218; + this.B_re[6] = -0.6870983; + this.B_im[6] = -1.1651967; + + this.C_re = []; + this.C_im = []; + this.C_re[1] = 1.3231270439; + this.C_im[1] = 0; + this.C_re[2] = -0.577245789; + this.C_im[2] = -0.007809598; + this.C_re[3] = 0.508307513; + this.C_im[3] = -0.112208952; + this.C_re[4] = -0.15094762; + this.C_im[4] = 0.18200602; + this.C_re[5] = 1.01418179; + this.C_im[5] = 1.64497696; + this.C_re[6] = 1.9660549; + this.C_im[6] = 2.5127645; + + this.D = []; + this.D[1] = 1.5627014243; + this.D[2] = 0.5185406398; + this.D[3] = -0.03333098; + this.D[4] = -0.1052906; + this.D[5] = -0.0368594; + this.D[6] = 0.007317; + this.D[7] = 0.01220; + this.D[8] = 0.00394; + this.D[9] = -0.0013; + } + + /** + New Zealand Map Grid Forward - long/lat to x/y + long/lat in radians + */ + function forward$18(p) { + var n; + var lon = p.x; + var lat = p.y; + + var delta_lat = lat - this.lat0; + var delta_lon = lon - this.long0; + + // 1. Calculate d_phi and d_psi ... // and d_lambda + // For this algorithm, delta_latitude is in seconds of arc x 10-5, so we need to scale to those units. Longitude is radians. + var d_phi = delta_lat / SEC_TO_RAD * 1E-5; + var d_lambda = delta_lon; + var d_phi_n = 1; // d_phi^0 + + var d_psi = 0; + for (n = 1; n <= 10; n++) { + d_phi_n = d_phi_n * d_phi; + d_psi = d_psi + this.A[n] * d_phi_n; + } + + // 2. Calculate theta + var th_re = d_psi; + var th_im = d_lambda; + + // 3. Calculate z + var th_n_re = 1; + var th_n_im = 0; // theta^0 + var th_n_re1; + var th_n_im1; + + var z_re = 0; + var z_im = 0; + for (n = 1; n <= 6; n++) { + th_n_re1 = th_n_re * th_re - th_n_im * th_im; + th_n_im1 = th_n_im * th_re + th_n_re * th_im; + th_n_re = th_n_re1; + th_n_im = th_n_im1; + z_re = z_re + this.B_re[n] * th_n_re - this.B_im[n] * th_n_im; + z_im = z_im + this.B_im[n] * th_n_re + this.B_re[n] * th_n_im; + } + + // 4. Calculate easting and northing + p.x = (z_im * this.a) + this.x0; + p.y = (z_re * this.a) + this.y0; + + return p; + } + + /** + New Zealand Map Grid Inverse - x/y to long/lat + */ + function inverse$18(p) { + var n; + var x = p.x; + var y = p.y; + + var delta_x = x - this.x0; + var delta_y = y - this.y0; + + // 1. Calculate z + var z_re = delta_y / this.a; + var z_im = delta_x / this.a; + + // 2a. Calculate theta - first approximation gives km accuracy + var z_n_re = 1; + var z_n_im = 0; // z^0 + var z_n_re1; + var z_n_im1; + + var th_re = 0; + var th_im = 0; + for (n = 1; n <= 6; n++) { + z_n_re1 = z_n_re * z_re - z_n_im * z_im; + z_n_im1 = z_n_im * z_re + z_n_re * z_im; + z_n_re = z_n_re1; + z_n_im = z_n_im1; + th_re = th_re + this.C_re[n] * z_n_re - this.C_im[n] * z_n_im; + th_im = th_im + this.C_im[n] * z_n_re + this.C_re[n] * z_n_im; + } + + // 2b. Iterate to refine the accuracy of the calculation + // 0 iterations gives km accuracy + // 1 iteration gives m accuracy -- good enough for most mapping applications + // 2 iterations bives mm accuracy + for (var i = 0; i < this.iterations; i++) { + var th_n_re = th_re; + var th_n_im = th_im; + var th_n_re1; + var th_n_im1; + + var num_re = z_re; + var num_im = z_im; + for (n = 2; n <= 6; n++) { + th_n_re1 = th_n_re * th_re - th_n_im * th_im; + th_n_im1 = th_n_im * th_re + th_n_re * th_im; + th_n_re = th_n_re1; + th_n_im = th_n_im1; + num_re = num_re + (n - 1) * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im); + num_im = num_im + (n - 1) * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im); + } + + th_n_re = 1; + th_n_im = 0; + var den_re = this.B_re[1]; + var den_im = this.B_im[1]; + for (n = 2; n <= 6; n++) { + th_n_re1 = th_n_re * th_re - th_n_im * th_im; + th_n_im1 = th_n_im * th_re + th_n_re * th_im; + th_n_re = th_n_re1; + th_n_im = th_n_im1; + den_re = den_re + n * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im); + den_im = den_im + n * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im); + } + + // Complex division + var den2 = den_re * den_re + den_im * den_im; + th_re = (num_re * den_re + num_im * den_im) / den2; + th_im = (num_im * den_re - num_re * den_im) / den2; + } + + // 3. Calculate d_phi ... // and d_lambda + var d_psi = th_re; + var d_lambda = th_im; + var d_psi_n = 1; // d_psi^0 + + var d_phi = 0; + for (n = 1; n <= 9; n++) { + d_psi_n = d_psi_n * d_psi; + d_phi = d_phi + this.D[n] * d_psi_n; + } + + // 4. Calculate latitude and longitude + // d_phi is calcuated in second of arc * 10^-5, so we need to scale back to radians. d_lambda is in radians. + var lat = this.lat0 + (d_phi * SEC_TO_RAD * 1E5); + var lon = this.long0 + d_lambda; + + p.x = lon; + p.y = lat; + + return p; + } + + var names$20 = ["New_Zealand_Map_Grid", "nzmg"]; + var nzmg = { + init: init$19, + forward: forward$18, + inverse: inverse$18, + names: names$20 + }; + + /* + reference + "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, + The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. + */ + + + /* Initialize the Miller Cylindrical projection + -------------------------------------------*/ + function init$20() { + //no-op + } + + /* Miller Cylindrical forward equations--mapping lat,long to x,y + ------------------------------------------------------------*/ + function forward$19(p) { + var lon = p.x; + var lat = p.y; + /* Forward equations + -----------------*/ + var dlon = adjust_lon(lon - this.long0); + var x = this.x0 + this.a * dlon; + var y = this.y0 + this.a * Math.log(Math.tan((Math.PI / 4) + (lat / 2.5))) * 1.25; + + p.x = x; + p.y = y; + return p; + } + + /* Miller Cylindrical inverse equations--mapping x,y to lat/long + ------------------------------------------------------------*/ + function inverse$19(p) { + p.x -= this.x0; + p.y -= this.y0; + + var lon = adjust_lon(this.long0 + p.x / this.a); + var lat = 2.5 * (Math.atan(Math.exp(0.8 * p.y / this.a)) - Math.PI / 4); + + p.x = lon; + p.y = lat; + return p; + } + + var names$21 = ["Miller_Cylindrical", "mill"]; + var mill = { + init: init$20, + forward: forward$19, + inverse: inverse$19, + names: names$21 + }; + + var MAX_ITER$3 = 20; + function init$21() { + /* Place parameters in static storage for common use + -------------------------------------------------*/ + + + if (!this.sphere) { + this.en = pj_enfn(this.es); + } + else { + this.n = 1; + this.m = 0; + this.es = 0; + this.C_y = Math.sqrt((this.m + 1) / this.n); + this.C_x = this.C_y / (this.m + 1); + } + + } + + /* Sinusoidal forward equations--mapping lat,long to x,y + -----------------------------------------------------*/ + function forward$20(p) { + var x, y; + var lon = p.x; + var lat = p.y; + /* Forward equations + -----------------*/ + lon = adjust_lon(lon - this.long0); + + if (this.sphere) { + if (!this.m) { + lat = this.n !== 1 ? Math.asin(this.n * Math.sin(lat)) : lat; + } + else { + var k = this.n * Math.sin(lat); + for (var i = MAX_ITER$3; i; --i) { + var V = (this.m * lat + Math.sin(lat) - k) / (this.m + Math.cos(lat)); + lat -= V; + if (Math.abs(V) < EPSLN) { + break; + } + } + } + x = this.a * this.C_x * lon * (this.m + Math.cos(lat)); + y = this.a * this.C_y * lat; + + } + else { + + var s = Math.sin(lat); + var c = Math.cos(lat); + y = this.a * pj_mlfn(lat, s, c, this.en); + x = this.a * lon * c / Math.sqrt(1 - this.es * s * s); + } + + p.x = x; + p.y = y; + return p; + } + + function inverse$20(p) { + var lat, temp, lon, s; + + p.x -= this.x0; + lon = p.x / this.a; + p.y -= this.y0; + lat = p.y / this.a; + + if (this.sphere) { + lat /= this.C_y; + lon = lon / (this.C_x * (this.m + Math.cos(lat))); + if (this.m) { + lat = asinz((this.m * lat + Math.sin(lat)) / this.n); + } + else if (this.n !== 1) { + lat = asinz(Math.sin(lat) / this.n); + } + lon = adjust_lon(lon + this.long0); + lat = adjust_lat(lat); + } + else { + lat = pj_inv_mlfn(p.y / this.a, this.es, this.en); + s = Math.abs(lat); + if (s < HALF_PI) { + s = Math.sin(lat); + temp = this.long0 + p.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(lat)); + //temp = this.long0 + p.x / (this.a * Math.cos(lat)); + lon = adjust_lon(temp); + } + else if ((s - EPSLN) < HALF_PI) { + lon = this.long0; + } + } + p.x = lon; + p.y = lat; + return p; + } + + var names$22 = ["Sinusoidal", "sinu"]; + var sinu = { + init: init$21, + forward: forward$20, + inverse: inverse$20, + names: names$22 + }; + + function init$22() {} + /* Mollweide forward equations--mapping lat,long to x,y + ----------------------------------------------------*/ + function forward$21(p) { + + /* Forward equations + -----------------*/ + var lon = p.x; + var lat = p.y; + + var delta_lon = adjust_lon(lon - this.long0); + var theta = lat; + var con = Math.PI * Math.sin(lat); + + /* Iterate using the Newton-Raphson method to find theta + -----------------------------------------------------*/ + while (true) { + var delta_theta = -(theta + Math.sin(theta) - con) / (1 + Math.cos(theta)); + theta += delta_theta; + if (Math.abs(delta_theta) < EPSLN) { + break; + } + } + theta /= 2; + + /* If the latitude is 90 deg, force the x coordinate to be "0 + false easting" + this is done here because of precision problems with "cos(theta)" + --------------------------------------------------------------------------*/ + if (Math.PI / 2 - Math.abs(lat) < EPSLN) { + delta_lon = 0; + } + var x = 0.900316316158 * this.a * delta_lon * Math.cos(theta) + this.x0; + var y = 1.4142135623731 * this.a * Math.sin(theta) + this.y0; + + p.x = x; + p.y = y; + return p; + } + + function inverse$21(p) { + var theta; + var arg; + + /* Inverse equations + -----------------*/ + p.x -= this.x0; + p.y -= this.y0; + arg = p.y / (1.4142135623731 * this.a); + + /* Because of division by zero problems, 'arg' can not be 1. Therefore + a number very close to one is used instead. + -------------------------------------------------------------------*/ + if (Math.abs(arg) > 0.999999999999) { + arg = 0.999999999999; + } + theta = Math.asin(arg); + var lon = adjust_lon(this.long0 + (p.x / (0.900316316158 * this.a * Math.cos(theta)))); + if (lon < (-Math.PI)) { + lon = -Math.PI; + } + if (lon > Math.PI) { + lon = Math.PI; + } + arg = (2 * theta + Math.sin(2 * theta)) / Math.PI; + if (Math.abs(arg) > 1) { + arg = 1; + } + var lat = Math.asin(arg); + + p.x = lon; + p.y = lat; + return p; + } + + var names$23 = ["Mollweide", "moll"]; + var moll = { + init: init$22, + forward: forward$21, + inverse: inverse$21, + names: names$23 + }; + + function init$23() { + + /* Place parameters in static storage for common use + -------------------------------------------------*/ + // Standard Parallels cannot be equal and on opposite sides of the equator + if (Math.abs(this.lat1 + this.lat2) < EPSLN) { + return; + } + this.lat2 = this.lat2 || this.lat1; + this.temp = this.b / this.a; + this.es = 1 - Math.pow(this.temp, 2); + this.e = Math.sqrt(this.es); + this.e0 = e0fn(this.es); + this.e1 = e1fn(this.es); + this.e2 = e2fn(this.es); + this.e3 = e3fn(this.es); + + this.sinphi = Math.sin(this.lat1); + this.cosphi = Math.cos(this.lat1); + + this.ms1 = msfnz(this.e, this.sinphi, this.cosphi); + this.ml1 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat1); + + if (Math.abs(this.lat1 - this.lat2) < EPSLN) { + this.ns = this.sinphi; + } + else { + this.sinphi = Math.sin(this.lat2); + this.cosphi = Math.cos(this.lat2); + this.ms2 = msfnz(this.e, this.sinphi, this.cosphi); + this.ml2 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat2); + this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1); + } + this.g = this.ml1 + this.ms1 / this.ns; + this.ml0 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0); + this.rh = this.a * (this.g - this.ml0); + } + + /* Equidistant Conic forward equations--mapping lat,long to x,y + -----------------------------------------------------------*/ + function forward$22(p) { + var lon = p.x; + var lat = p.y; + var rh1; + + /* Forward equations + -----------------*/ + if (this.sphere) { + rh1 = this.a * (this.g - lat); + } + else { + var ml = mlfn(this.e0, this.e1, this.e2, this.e3, lat); + rh1 = this.a * (this.g - ml); + } + var theta = this.ns * adjust_lon(lon - this.long0); + var x = this.x0 + rh1 * Math.sin(theta); + var y = this.y0 + this.rh - rh1 * Math.cos(theta); + p.x = x; + p.y = y; + return p; + } + + /* Inverse equations + -----------------*/ + function inverse$22(p) { + p.x -= this.x0; + p.y = this.rh - p.y + this.y0; + var con, rh1, lat, lon; + if (this.ns >= 0) { + rh1 = Math.sqrt(p.x * p.x + p.y * p.y); + con = 1; + } + else { + rh1 = -Math.sqrt(p.x * p.x + p.y * p.y); + con = -1; + } + var theta = 0; + if (rh1 !== 0) { + theta = Math.atan2(con * p.x, con * p.y); + } + + if (this.sphere) { + lon = adjust_lon(this.long0 + theta / this.ns); + lat = adjust_lat(this.g - rh1 / this.a); + p.x = lon; + p.y = lat; + return p; + } + else { + var ml = this.g - rh1 / this.a; + lat = imlfn(ml, this.e0, this.e1, this.e2, this.e3); + lon = adjust_lon(this.long0 + theta / this.ns); + p.x = lon; + p.y = lat; + return p; + } + + } + + var names$24 = ["Equidistant_Conic", "eqdc"]; + var eqdc = { + init: init$23, + forward: forward$22, + inverse: inverse$22, + names: names$24 + }; + + /* Initialize the Van Der Grinten projection + ----------------------------------------*/ + function init$24() { + //this.R = 6370997; //Radius of earth + this.R = this.a; + } + + function forward$23(p) { + + var lon = p.x; + var lat = p.y; + + /* Forward equations + -----------------*/ + var dlon = adjust_lon(lon - this.long0); + var x, y; + + if (Math.abs(lat) <= EPSLN) { + x = this.x0 + this.R * dlon; + y = this.y0; + } + var theta = asinz(2 * Math.abs(lat / Math.PI)); + if ((Math.abs(dlon) <= EPSLN) || (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN)) { + x = this.x0; + if (lat >= 0) { + y = this.y0 + Math.PI * this.R * Math.tan(0.5 * theta); + } + else { + y = this.y0 + Math.PI * this.R * -Math.tan(0.5 * theta); + } + // return(OK); + } + var al = 0.5 * Math.abs((Math.PI / dlon) - (dlon / Math.PI)); + var asq = al * al; + var sinth = Math.sin(theta); + var costh = Math.cos(theta); + + var g = costh / (sinth + costh - 1); + var gsq = g * g; + var m = g * (2 / sinth - 1); + var msq = m * m; + var con = Math.PI * this.R * (al * (g - msq) + Math.sqrt(asq * (g - msq) * (g - msq) - (msq + asq) * (gsq - msq))) / (msq + asq); + if (dlon < 0) { + con = -con; + } + x = this.x0 + con; + //con = Math.abs(con / (Math.PI * this.R)); + var q = asq + g; + con = Math.PI * this.R * (m * q - al * Math.sqrt((msq + asq) * (asq + 1) - q * q)) / (msq + asq); + if (lat >= 0) { + //y = this.y0 + Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con); + y = this.y0 + con; + } + else { + //y = this.y0 - Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con); + y = this.y0 - con; + } + p.x = x; + p.y = y; + return p; + } + + /* Van Der Grinten inverse equations--mapping x,y to lat/long + ---------------------------------------------------------*/ + function inverse$23(p) { + var lon, lat; + var xx, yy, xys, c1, c2, c3; + var a1; + var m1; + var con; + var th1; + var d; + + /* inverse equations + -----------------*/ + p.x -= this.x0; + p.y -= this.y0; + con = Math.PI * this.R; + xx = p.x / con; + yy = p.y / con; + xys = xx * xx + yy * yy; + c1 = -Math.abs(yy) * (1 + xys); + c2 = c1 - 2 * yy * yy + xx * xx; + c3 = -2 * c1 + 1 + 2 * yy * yy + xys * xys; + d = yy * yy / c3 + (2 * c2 * c2 * c2 / c3 / c3 / c3 - 9 * c1 * c2 / c3 / c3) / 27; + a1 = (c1 - c2 * c2 / 3 / c3) / c3; + m1 = 2 * Math.sqrt(-a1 / 3); + con = ((3 * d) / a1) / m1; + if (Math.abs(con) > 1) { + if (con >= 0) { + con = 1; + } + else { + con = -1; + } + } + th1 = Math.acos(con) / 3; + if (p.y >= 0) { + lat = (-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI; + } + else { + lat = -(-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI; + } + + if (Math.abs(xx) < EPSLN) { + lon = this.long0; + } + else { + lon = adjust_lon(this.long0 + Math.PI * (xys - 1 + Math.sqrt(1 + 2 * (xx * xx - yy * yy) + xys * xys)) / 2 / xx); + } + + p.x = lon; + p.y = lat; + return p; + } + + var names$25 = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"]; + var vandg = { + init: init$24, + forward: forward$23, + inverse: inverse$23, + names: names$25 + }; + + function init$25() { + this.sin_p12 = Math.sin(this.lat0); + this.cos_p12 = Math.cos(this.lat0); + } + + function forward$24(p) { + var lon = p.x; + var lat = p.y; + var sinphi = Math.sin(p.y); + var cosphi = Math.cos(p.y); + var dlon = adjust_lon(lon - this.long0); + var e0, e1, e2, e3, Mlp, Ml, tanphi, Nl1, Nl, psi, Az, G, H, GH, Hs, c, kp, cos_c, s, s2, s3, s4, s5; + if (this.sphere) { + if (Math.abs(this.sin_p12 - 1) <= EPSLN) { + //North Pole case + p.x = this.x0 + this.a * (HALF_PI - lat) * Math.sin(dlon); + p.y = this.y0 - this.a * (HALF_PI - lat) * Math.cos(dlon); + return p; + } + else if (Math.abs(this.sin_p12 + 1) <= EPSLN) { + //South Pole case + p.x = this.x0 + this.a * (HALF_PI + lat) * Math.sin(dlon); + p.y = this.y0 + this.a * (HALF_PI + lat) * Math.cos(dlon); + return p; + } + else { + //default case + cos_c = this.sin_p12 * sinphi + this.cos_p12 * cosphi * Math.cos(dlon); + c = Math.acos(cos_c); + kp = c ? c / Math.sin(c) : 1; + p.x = this.x0 + this.a * kp * cosphi * Math.sin(dlon); + p.y = this.y0 + this.a * kp * (this.cos_p12 * sinphi - this.sin_p12 * cosphi * Math.cos(dlon)); + return p; + } + } + else { + e0 = e0fn(this.es); + e1 = e1fn(this.es); + e2 = e2fn(this.es); + e3 = e3fn(this.es); + if (Math.abs(this.sin_p12 - 1) <= EPSLN) { + //North Pole case + Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI); + Ml = this.a * mlfn(e0, e1, e2, e3, lat); + p.x = this.x0 + (Mlp - Ml) * Math.sin(dlon); + p.y = this.y0 - (Mlp - Ml) * Math.cos(dlon); + return p; + } + else if (Math.abs(this.sin_p12 + 1) <= EPSLN) { + //South Pole case + Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI); + Ml = this.a * mlfn(e0, e1, e2, e3, lat); + p.x = this.x0 + (Mlp + Ml) * Math.sin(dlon); + p.y = this.y0 + (Mlp + Ml) * Math.cos(dlon); + return p; + } + else { + //Default case + tanphi = sinphi / cosphi; + Nl1 = gN(this.a, this.e, this.sin_p12); + Nl = gN(this.a, this.e, sinphi); + psi = Math.atan((1 - this.es) * tanphi + this.es * Nl1 * this.sin_p12 / (Nl * cosphi)); + Az = Math.atan2(Math.sin(dlon), this.cos_p12 * Math.tan(psi) - this.sin_p12 * Math.cos(dlon)); + if (Az === 0) { + s = Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi)); + } + else if (Math.abs(Math.abs(Az) - Math.PI) <= EPSLN) { + s = -Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi)); + } + else { + s = Math.asin(Math.sin(dlon) * Math.cos(psi) / Math.sin(Az)); + } + G = this.e * this.sin_p12 / Math.sqrt(1 - this.es); + H = this.e * this.cos_p12 * Math.cos(Az) / Math.sqrt(1 - this.es); + GH = G * H; + Hs = H * H; + s2 = s * s; + s3 = s2 * s; + s4 = s3 * s; + s5 = s4 * s; + c = Nl1 * s * (1 - s2 * Hs * (1 - Hs) / 6 + s3 / 8 * GH * (1 - 2 * Hs) + s4 / 120 * (Hs * (4 - 7 * Hs) - 3 * G * G * (1 - 7 * Hs)) - s5 / 48 * GH); + p.x = this.x0 + c * Math.sin(Az); + p.y = this.y0 + c * Math.cos(Az); + return p; + } + } + + + } + + function inverse$24(p) { + p.x -= this.x0; + p.y -= this.y0; + var rh, z, sinz, cosz, lon, lat, con, e0, e1, e2, e3, Mlp, M, N1, psi, Az, cosAz, tmp, A, B, D, Ee, F, sinpsi; + if (this.sphere) { + rh = Math.sqrt(p.x * p.x + p.y * p.y); + if (rh > (2 * HALF_PI * this.a)) { + return; + } + z = rh / this.a; + + sinz = Math.sin(z); + cosz = Math.cos(z); + + lon = this.long0; + if (Math.abs(rh) <= EPSLN) { + lat = this.lat0; + } + else { + lat = asinz(cosz * this.sin_p12 + (p.y * sinz * this.cos_p12) / rh); + con = Math.abs(this.lat0) - HALF_PI; + if (Math.abs(con) <= EPSLN) { + if (this.lat0 >= 0) { + lon = adjust_lon(this.long0 + Math.atan2(p.x, - p.y)); + } + else { + lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y)); + } + } + else { + /*con = cosz - this.sin_p12 * Math.sin(lat); + if ((Math.abs(con) < EPSLN) && (Math.abs(p.x) < EPSLN)) { + //no-op, just keep the lon value as is + } else { + var temp = Math.atan2((p.x * sinz * this.cos_p12), (con * rh)); + lon = adjust_lon(this.long0 + Math.atan2((p.x * sinz * this.cos_p12), (con * rh))); + }*/ + lon = adjust_lon(this.long0 + Math.atan2(p.x * sinz, rh * this.cos_p12 * cosz - p.y * this.sin_p12 * sinz)); + } + } + + p.x = lon; + p.y = lat; + return p; + } + else { + e0 = e0fn(this.es); + e1 = e1fn(this.es); + e2 = e2fn(this.es); + e3 = e3fn(this.es); + if (Math.abs(this.sin_p12 - 1) <= EPSLN) { + //North pole case + Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI); + rh = Math.sqrt(p.x * p.x + p.y * p.y); + M = Mlp - rh; + lat = imlfn(M / this.a, e0, e1, e2, e3); + lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y)); + p.x = lon; + p.y = lat; + return p; + } + else if (Math.abs(this.sin_p12 + 1) <= EPSLN) { + //South pole case + Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI); + rh = Math.sqrt(p.x * p.x + p.y * p.y); + M = rh - Mlp; + + lat = imlfn(M / this.a, e0, e1, e2, e3); + lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y)); + p.x = lon; + p.y = lat; + return p; + } + else { + //default case + rh = Math.sqrt(p.x * p.x + p.y * p.y); + Az = Math.atan2(p.x, p.y); + N1 = gN(this.a, this.e, this.sin_p12); + cosAz = Math.cos(Az); + tmp = this.e * this.cos_p12 * cosAz; + A = -tmp * tmp / (1 - this.es); + B = 3 * this.es * (1 - A) * this.sin_p12 * this.cos_p12 * cosAz / (1 - this.es); + D = rh / N1; + Ee = D - A * (1 + A) * Math.pow(D, 3) / 6 - B * (1 + 3 * A) * Math.pow(D, 4) / 24; + F = 1 - A * Ee * Ee / 2 - D * Ee * Ee * Ee / 6; + psi = Math.asin(this.sin_p12 * Math.cos(Ee) + this.cos_p12 * Math.sin(Ee) * cosAz); + lon = adjust_lon(this.long0 + Math.asin(Math.sin(Az) * Math.sin(Ee) / Math.cos(psi))); + sinpsi = Math.sin(psi); + lat = Math.atan2((sinpsi - this.es * F * this.sin_p12) * Math.tan(psi), sinpsi * (1 - this.es)); + p.x = lon; + p.y = lat; + return p; + } + } + + } + + var names$26 = ["Azimuthal_Equidistant", "aeqd"]; + var aeqd = { + init: init$25, + forward: forward$24, + inverse: inverse$24, + names: names$26 + }; + + function init$26() { + //double temp; /* temporary variable */ + + /* Place parameters in static storage for common use + -------------------------------------------------*/ + this.sin_p14 = Math.sin(this.lat0); + this.cos_p14 = Math.cos(this.lat0); + } + + /* Orthographic forward equations--mapping lat,long to x,y + ---------------------------------------------------*/ + function forward$25(p) { + var sinphi, cosphi; /* sin and cos value */ + var dlon; /* delta longitude value */ + var coslon; /* cos of longitude */ + var ksp; /* scale factor */ + var g, x, y; + var lon = p.x; + var lat = p.y; + /* Forward equations + -----------------*/ + dlon = adjust_lon(lon - this.long0); + + sinphi = Math.sin(lat); + cosphi = Math.cos(lat); + + coslon = Math.cos(dlon); + g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon; + ksp = 1; + if ((g > 0) || (Math.abs(g) <= EPSLN)) { + x = this.a * ksp * cosphi * Math.sin(dlon); + y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon); + } + p.x = x; + p.y = y; + return p; + } + + function inverse$25(p) { + var rh; /* height above ellipsoid */ + var z; /* angle */ + var sinz, cosz; /* sin of z and cos of z */ + var con; + var lon, lat; + /* Inverse equations + -----------------*/ + p.x -= this.x0; + p.y -= this.y0; + rh = Math.sqrt(p.x * p.x + p.y * p.y); + z = asinz(rh / this.a); + + sinz = Math.sin(z); + cosz = Math.cos(z); + + lon = this.long0; + if (Math.abs(rh) <= EPSLN) { + lat = this.lat0; + p.x = lon; + p.y = lat; + return p; + } + lat = asinz(cosz * this.sin_p14 + (p.y * sinz * this.cos_p14) / rh); + con = Math.abs(this.lat0) - HALF_PI; + if (Math.abs(con) <= EPSLN) { + if (this.lat0 >= 0) { + lon = adjust_lon(this.long0 + Math.atan2(p.x, - p.y)); + } + else { + lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y)); + } + p.x = lon; + p.y = lat; + return p; + } + lon = adjust_lon(this.long0 + Math.atan2((p.x * sinz), rh * this.cos_p14 * cosz - p.y * this.sin_p14 * sinz)); + p.x = lon; + p.y = lat; + return p; + } + + var names$27 = ["ortho"]; + var ortho = { + init: init$26, + forward: forward$25, + inverse: inverse$25, + names: names$27 + }; + + // QSC projection rewritten from the original PROJ4 + // https://github.com/OSGeo/proj.4/blob/master/src/PJ_qsc.c + + /* constants */ + var FACE_ENUM = { + FRONT: 1, + RIGHT: 2, + BACK: 3, + LEFT: 4, + TOP: 5, + BOTTOM: 6 + }; + + var AREA_ENUM = { + AREA_0: 1, + AREA_1: 2, + AREA_2: 3, + AREA_3: 4 + }; + + function init$27() { + + this.x0 = this.x0 || 0; + this.y0 = this.y0 || 0; + this.lat0 = this.lat0 || 0; + this.long0 = this.long0 || 0; + this.lat_ts = this.lat_ts || 0; + this.title = this.title || "Quadrilateralized Spherical Cube"; + + /* Determine the cube face from the center of projection. */ + if (this.lat0 >= HALF_PI - FORTPI / 2.0) { + this.face = FACE_ENUM.TOP; + } else if (this.lat0 <= -(HALF_PI - FORTPI / 2.0)) { + this.face = FACE_ENUM.BOTTOM; + } else if (Math.abs(this.long0) <= FORTPI) { + this.face = FACE_ENUM.FRONT; + } else if (Math.abs(this.long0) <= HALF_PI + FORTPI) { + this.face = this.long0 > 0.0 ? FACE_ENUM.RIGHT : FACE_ENUM.LEFT; + } else { + this.face = FACE_ENUM.BACK; + } + + /* Fill in useful values for the ellipsoid <-> sphere shift + * described in [LK12]. */ + if (this.es !== 0) { + this.one_minus_f = 1 - (this.a - this.b) / this.a; + this.one_minus_f_squared = this.one_minus_f * this.one_minus_f; + } + } + + // QSC forward equations--mapping lat,long to x,y + // ----------------------------------------------------------------- + function forward$26(p) { + var xy = {x: 0, y: 0}; + var lat, lon; + var theta, phi; + var t, mu; + /* nu; */ + var area = {value: 0}; + + // move lon according to projection's lon + p.x -= this.long0; + + /* Convert the geodetic latitude to a geocentric latitude. + * This corresponds to the shift from the ellipsoid to the sphere + * described in [LK12]. */ + if (this.es !== 0) {//if (P->es != 0) { + lat = Math.atan(this.one_minus_f_squared * Math.tan(p.y)); + } else { + lat = p.y; + } + + /* Convert the input lat, lon into theta, phi as used by QSC. + * This depends on the cube face and the area on it. + * For the top and bottom face, we can compute theta and phi + * directly from phi, lam. For the other faces, we must use + * unit sphere cartesian coordinates as an intermediate step. */ + lon = p.x; //lon = lp.lam; + if (this.face === FACE_ENUM.TOP) { + phi = HALF_PI - lat; + if (lon >= FORTPI && lon <= HALF_PI + FORTPI) { + area.value = AREA_ENUM.AREA_0; + theta = lon - HALF_PI; + } else if (lon > HALF_PI + FORTPI || lon <= -(HALF_PI + FORTPI)) { + area.value = AREA_ENUM.AREA_1; + theta = (lon > 0.0 ? lon - SPI : lon + SPI); + } else if (lon > -(HALF_PI + FORTPI) && lon <= -FORTPI) { + area.value = AREA_ENUM.AREA_2; + theta = lon + HALF_PI; + } else { + area.value = AREA_ENUM.AREA_3; + theta = lon; + } + } else if (this.face === FACE_ENUM.BOTTOM) { + phi = HALF_PI + lat; + if (lon >= FORTPI && lon <= HALF_PI + FORTPI) { + area.value = AREA_ENUM.AREA_0; + theta = -lon + HALF_PI; + } else if (lon < FORTPI && lon >= -FORTPI) { + area.value = AREA_ENUM.AREA_1; + theta = -lon; + } else if (lon < -FORTPI && lon >= -(HALF_PI + FORTPI)) { + area.value = AREA_ENUM.AREA_2; + theta = -lon - HALF_PI; + } else { + area.value = AREA_ENUM.AREA_3; + theta = (lon > 0.0 ? -lon + SPI : -lon - SPI); + } + } else { + var q, r, s; + var sinlat, coslat; + var sinlon, coslon; + + if (this.face === FACE_ENUM.RIGHT) { + lon = qsc_shift_lon_origin(lon, +HALF_PI); + } else if (this.face === FACE_ENUM.BACK) { + lon = qsc_shift_lon_origin(lon, +SPI); + } else if (this.face === FACE_ENUM.LEFT) { + lon = qsc_shift_lon_origin(lon, -HALF_PI); + } + sinlat = Math.sin(lat); + coslat = Math.cos(lat); + sinlon = Math.sin(lon); + coslon = Math.cos(lon); + q = coslat * coslon; + r = coslat * sinlon; + s = sinlat; + + if (this.face === FACE_ENUM.FRONT) { + phi = Math.acos(q); + theta = qsc_fwd_equat_face_theta(phi, s, r, area); + } else if (this.face === FACE_ENUM.RIGHT) { + phi = Math.acos(r); + theta = qsc_fwd_equat_face_theta(phi, s, -q, area); + } else if (this.face === FACE_ENUM.BACK) { + phi = Math.acos(-q); + theta = qsc_fwd_equat_face_theta(phi, s, -r, area); + } else if (this.face === FACE_ENUM.LEFT) { + phi = Math.acos(-r); + theta = qsc_fwd_equat_face_theta(phi, s, q, area); + } else { + /* Impossible */ + phi = theta = 0; + area.value = AREA_ENUM.AREA_0; + } + } + + /* Compute mu and nu for the area of definition. + * For mu, see Eq. (3-21) in [OL76], but note the typos: + * compare with Eq. (3-14). For nu, see Eq. (3-38). */ + mu = Math.atan((12 / SPI) * (theta + Math.acos(Math.sin(theta) * Math.cos(FORTPI)) - HALF_PI)); + t = Math.sqrt((1 - Math.cos(phi)) / (Math.cos(mu) * Math.cos(mu)) / (1 - Math.cos(Math.atan(1 / Math.cos(theta))))); + + /* Apply the result to the real area. */ + if (area.value === AREA_ENUM.AREA_1) { + mu += HALF_PI; + } else if (area.value === AREA_ENUM.AREA_2) { + mu += SPI; + } else if (area.value === AREA_ENUM.AREA_3) { + mu += 1.5 * SPI; + } + + /* Now compute x, y from mu and nu */ + xy.x = t * Math.cos(mu); + xy.y = t * Math.sin(mu); + xy.x = xy.x * this.a + this.x0; + xy.y = xy.y * this.a + this.y0; + + p.x = xy.x; + p.y = xy.y; + return p; + } + + // QSC inverse equations--mapping x,y to lat/long + // ----------------------------------------------------------------- + function inverse$26(p) { + var lp = {lam: 0, phi: 0}; + var mu, nu, cosmu, tannu; + var tantheta, theta, cosphi, phi; + var t; + var area = {value: 0}; + + /* de-offset */ + p.x = (p.x - this.x0) / this.a; + p.y = (p.y - this.y0) / this.a; + + /* Convert the input x, y to the mu and nu angles as used by QSC. + * This depends on the area of the cube face. */ + nu = Math.atan(Math.sqrt(p.x * p.x + p.y * p.y)); + mu = Math.atan2(p.y, p.x); + if (p.x >= 0.0 && p.x >= Math.abs(p.y)) { + area.value = AREA_ENUM.AREA_0; + } else if (p.y >= 0.0 && p.y >= Math.abs(p.x)) { + area.value = AREA_ENUM.AREA_1; + mu -= HALF_PI; + } else if (p.x < 0.0 && -p.x >= Math.abs(p.y)) { + area.value = AREA_ENUM.AREA_2; + mu = (mu < 0.0 ? mu + SPI : mu - SPI); + } else { + area.value = AREA_ENUM.AREA_3; + mu += HALF_PI; + } + + /* Compute phi and theta for the area of definition. + * The inverse projection is not described in the original paper, but some + * good hints can be found here (as of 2011-12-14): + * http://fits.gsfc.nasa.gov/fitsbits/saf.93/saf.9302 + * (search for "Message-Id: <9302181759.AA25477 at fits.cv.nrao.edu>") */ + t = (SPI / 12) * Math.tan(mu); + tantheta = Math.sin(t) / (Math.cos(t) - (1 / Math.sqrt(2))); + theta = Math.atan(tantheta); + cosmu = Math.cos(mu); + tannu = Math.tan(nu); + cosphi = 1 - cosmu * cosmu * tannu * tannu * (1 - Math.cos(Math.atan(1 / Math.cos(theta)))); + if (cosphi < -1) { + cosphi = -1; + } else if (cosphi > +1) { + cosphi = +1; + } + + /* Apply the result to the real area on the cube face. + * For the top and bottom face, we can compute phi and lam directly. + * For the other faces, we must use unit sphere cartesian coordinates + * as an intermediate step. */ + if (this.face === FACE_ENUM.TOP) { + phi = Math.acos(cosphi); + lp.phi = HALF_PI - phi; + if (area.value === AREA_ENUM.AREA_0) { + lp.lam = theta + HALF_PI; + } else if (area.value === AREA_ENUM.AREA_1) { + lp.lam = (theta < 0.0 ? theta + SPI : theta - SPI); + } else if (area.value === AREA_ENUM.AREA_2) { + lp.lam = theta - HALF_PI; + } else /* area.value == AREA_ENUM.AREA_3 */ { + lp.lam = theta; + } + } else if (this.face === FACE_ENUM.BOTTOM) { + phi = Math.acos(cosphi); + lp.phi = phi - HALF_PI; + if (area.value === AREA_ENUM.AREA_0) { + lp.lam = -theta + HALF_PI; + } else if (area.value === AREA_ENUM.AREA_1) { + lp.lam = -theta; + } else if (area.value === AREA_ENUM.AREA_2) { + lp.lam = -theta - HALF_PI; + } else /* area.value == AREA_ENUM.AREA_3 */ { + lp.lam = (theta < 0.0 ? -theta - SPI : -theta + SPI); + } + } else { + /* Compute phi and lam via cartesian unit sphere coordinates. */ + var q, r, s; + q = cosphi; + t = q * q; + if (t >= 1) { + s = 0; + } else { + s = Math.sqrt(1 - t) * Math.sin(theta); + } + t += s * s; + if (t >= 1) { + r = 0; + } else { + r = Math.sqrt(1 - t); + } + /* Rotate q,r,s into the correct area. */ + if (area.value === AREA_ENUM.AREA_1) { + t = r; + r = -s; + s = t; + } else if (area.value === AREA_ENUM.AREA_2) { + r = -r; + s = -s; + } else if (area.value === AREA_ENUM.AREA_3) { + t = r; + r = s; + s = -t; + } + /* Rotate q,r,s into the correct cube face. */ + if (this.face === FACE_ENUM.RIGHT) { + t = q; + q = -r; + r = t; + } else if (this.face === FACE_ENUM.BACK) { + q = -q; + r = -r; + } else if (this.face === FACE_ENUM.LEFT) { + t = q; + q = r; + r = -t; + } + /* Now compute phi and lam from the unit sphere coordinates. */ + lp.phi = Math.acos(-s) - HALF_PI; + lp.lam = Math.atan2(r, q); + if (this.face === FACE_ENUM.RIGHT) { + lp.lam = qsc_shift_lon_origin(lp.lam, -HALF_PI); + } else if (this.face === FACE_ENUM.BACK) { + lp.lam = qsc_shift_lon_origin(lp.lam, -SPI); + } else if (this.face === FACE_ENUM.LEFT) { + lp.lam = qsc_shift_lon_origin(lp.lam, +HALF_PI); + } + } + + /* Apply the shift from the sphere to the ellipsoid as described + * in [LK12]. */ + if (this.es !== 0) { + var invert_sign; + var tanphi, xa; + invert_sign = (lp.phi < 0 ? 1 : 0); + tanphi = Math.tan(lp.phi); + xa = this.b / Math.sqrt(tanphi * tanphi + this.one_minus_f_squared); + lp.phi = Math.atan(Math.sqrt(this.a * this.a - xa * xa) / (this.one_minus_f * xa)); + if (invert_sign) { + lp.phi = -lp.phi; + } + } + + lp.lam += this.long0; + p.x = lp.lam; + p.y = lp.phi; + return p; + } + + /* Helper function for forward projection: compute the theta angle + * and determine the area number. */ + function qsc_fwd_equat_face_theta(phi, y, x, area) { + var theta; + if (phi < EPSLN) { + area.value = AREA_ENUM.AREA_0; + theta = 0.0; + } else { + theta = Math.atan2(y, x); + if (Math.abs(theta) <= FORTPI) { + area.value = AREA_ENUM.AREA_0; + } else if (theta > FORTPI && theta <= HALF_PI + FORTPI) { + area.value = AREA_ENUM.AREA_1; + theta -= HALF_PI; + } else if (theta > HALF_PI + FORTPI || theta <= -(HALF_PI + FORTPI)) { + area.value = AREA_ENUM.AREA_2; + theta = (theta >= 0.0 ? theta - SPI : theta + SPI); + } else { + area.value = AREA_ENUM.AREA_3; + theta += HALF_PI; + } + } + return theta; + } + + /* Helper function: shift the longitude. */ + function qsc_shift_lon_origin(lon, offset) { + var slon = lon + offset; + if (slon < -SPI) { + slon += TWO_PI; + } else if (slon > +SPI) { + slon -= TWO_PI; + } + return slon; + } + + var names$28 = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"]; + var qsc = { + init: init$27, + forward: forward$26, + inverse: inverse$26, + names: names$28 + }; + + // Robinson projection + // Based on https://github.com/OSGeo/proj.4/blob/master/src/PJ_robin.c + // Polynomial coeficients from http://article.gmane.org/gmane.comp.gis.proj-4.devel/6039 + + var COEFS_X = [ + [1.0000, 2.2199e-17, -7.15515e-05, 3.1103e-06], + [0.9986, -0.000482243, -2.4897e-05, -1.3309e-06], + [0.9954, -0.00083103, -4.48605e-05, -9.86701e-07], + [0.9900, -0.00135364, -5.9661e-05, 3.6777e-06], + [0.9822, -0.00167442, -4.49547e-06, -5.72411e-06], + [0.9730, -0.00214868, -9.03571e-05, 1.8736e-08], + [0.9600, -0.00305085, -9.00761e-05, 1.64917e-06], + [0.9427, -0.00382792, -6.53386e-05, -2.6154e-06], + [0.9216, -0.00467746, -0.00010457, 4.81243e-06], + [0.8962, -0.00536223, -3.23831e-05, -5.43432e-06], + [0.8679, -0.00609363, -0.000113898, 3.32484e-06], + [0.8350, -0.00698325, -6.40253e-05, 9.34959e-07], + [0.7986, -0.00755338, -5.00009e-05, 9.35324e-07], + [0.7597, -0.00798324, -3.5971e-05, -2.27626e-06], + [0.7186, -0.00851367, -7.01149e-05, -8.6303e-06], + [0.6732, -0.00986209, -0.000199569, 1.91974e-05], + [0.6213, -0.010418, 8.83923e-05, 6.24051e-06], + [0.5722, -0.00906601, 0.000182, 6.24051e-06], + [0.5322, -0.00677797, 0.000275608, 6.24051e-06] + ]; + + var COEFS_Y = [ + [-5.20417e-18, 0.0124, 1.21431e-18, -8.45284e-11], + [0.0620, 0.0124, -1.26793e-09, 4.22642e-10], + [0.1240, 0.0124, 5.07171e-09, -1.60604e-09], + [0.1860, 0.0123999, -1.90189e-08, 6.00152e-09], + [0.2480, 0.0124002, 7.10039e-08, -2.24e-08], + [0.3100, 0.0123992, -2.64997e-07, 8.35986e-08], + [0.3720, 0.0124029, 9.88983e-07, -3.11994e-07], + [0.4340, 0.0123893, -3.69093e-06, -4.35621e-07], + [0.4958, 0.0123198, -1.02252e-05, -3.45523e-07], + [0.5571, 0.0121916, -1.54081e-05, -5.82288e-07], + [0.6176, 0.0119938, -2.41424e-05, -5.25327e-07], + [0.6769, 0.011713, -3.20223e-05, -5.16405e-07], + [0.7346, 0.0113541, -3.97684e-05, -6.09052e-07], + [0.7903, 0.0109107, -4.89042e-05, -1.04739e-06], + [0.8435, 0.0103431, -6.4615e-05, -1.40374e-09], + [0.8936, 0.00969686, -6.4636e-05, -8.547e-06], + [0.9394, 0.00840947, -0.000192841, -4.2106e-06], + [0.9761, 0.00616527, -0.000256, -4.2106e-06], + [1.0000, 0.00328947, -0.000319159, -4.2106e-06] + ]; + + var FXC = 0.8487; + var FYC = 1.3523; + var C1 = R2D/5; // rad to 5-degree interval + var RC1 = 1/C1; + var NODES = 18; + + var poly3_val = function(coefs, x) { + return coefs[0] + x * (coefs[1] + x * (coefs[2] + x * coefs[3])); + }; + + var poly3_der = function(coefs, x) { + return coefs[1] + x * (2 * coefs[2] + x * 3 * coefs[3]); + }; + + function newton_rapshon(f_df, start, max_err, iters) { + var x = start; + for (; iters; --iters) { + var upd = f_df(x); + x -= upd; + if (Math.abs(upd) < max_err) { + break; + } + } + return x; + } + + function init$28() { + this.x0 = this.x0 || 0; + this.y0 = this.y0 || 0; + this.long0 = this.long0 || 0; + this.es = 0; + this.title = this.title || "Robinson"; + } + + function forward$27(ll) { + var lon = adjust_lon(ll.x - this.long0); + + var dphi = Math.abs(ll.y); + var i = Math.floor(dphi * C1); + if (i < 0) { + i = 0; + } else if (i >= NODES) { + i = NODES - 1; + } + dphi = R2D * (dphi - RC1 * i); + var xy = { + x: poly3_val(COEFS_X[i], dphi) * lon, + y: poly3_val(COEFS_Y[i], dphi) + }; + if (ll.y < 0) { + xy.y = -xy.y; + } + + xy.x = xy.x * this.a * FXC + this.x0; + xy.y = xy.y * this.a * FYC + this.y0; + return xy; + } + + function inverse$27(xy) { + var ll = { + x: (xy.x - this.x0) / (this.a * FXC), + y: Math.abs(xy.y - this.y0) / (this.a * FYC) + }; + + if (ll.y >= 1) { // pathologic case + ll.x /= COEFS_X[NODES][0]; + ll.y = xy.y < 0 ? -HALF_PI : HALF_PI; + } else { + // find table interval + var i = Math.floor(ll.y * NODES); + if (i < 0) { + i = 0; + } else if (i >= NODES) { + i = NODES - 1; + } + for (;;) { + if (COEFS_Y[i][0] > ll.y) { + --i; + } else if (COEFS_Y[i+1][0] <= ll.y) { + ++i; + } else { + break; + } + } + // linear interpolation in 5 degree interval + var coefs = COEFS_Y[i]; + var t = 5 * (ll.y - coefs[0]) / (COEFS_Y[i+1][0] - coefs[0]); + // find t so that poly3_val(coefs, t) = ll.y + t = newton_rapshon(function(x) { + return (poly3_val(coefs, x) - ll.y) / poly3_der(coefs, x); + }, t, EPSLN, 100); + + ll.x /= poly3_val(COEFS_X[i], t); + ll.y = (5 * i + t) * D2R; + if (xy.y < 0) { + ll.y = -ll.y; + } + } + + ll.x = adjust_lon(ll.x + this.long0); + return ll; + } + + var names$29 = ["Robinson", "robin"]; + var robin = { + init: init$28, + forward: forward$27, + inverse: inverse$27, + names: names$29 + }; + + function init$29() { + this.name = 'geocent'; + + } + + function forward$28(p) { + var point = geodeticToGeocentric(p, this.es, this.a); + return point; + } + + function inverse$28(p) { + var point = geocentricToGeodetic(p, this.es, this.a, this.b); + return point; + } + + var names$30 = ["Geocentric", 'geocentric', "geocent", "Geocent"]; + var geocent = { + init: init$29, + forward: forward$28, + inverse: inverse$28, + names: names$30 + }; + + var mode = { + N_POLE: 0, + S_POLE: 1, + EQUIT: 2, + OBLIQ: 3 + }; + + var params = { + h: { def: 100000, num: true }, // default is Karman line, no default in PROJ.7 + azi: { def: 0, num: true, degrees: true }, // default is North + tilt: { def: 0, num: true, degrees: true }, // default is Nadir + long0: { def: 0, num: true }, // default is Greenwich, conversion to rad is automatic + lat0: { def: 0, num: true } // default is Equator, conversion to rad is automatic + }; + + function init$30() { + Object.keys(params).forEach(function (p) { + if (typeof this[p] === "undefined") { + this[p] = params[p].def; + } else if (params[p].num && isNaN(this[p])) { + throw new Error("Invalid parameter value, must be numeric " + p + " = " + this[p]); + } else if (params[p].num) { + this[p] = parseFloat(this[p]); + } + if (params[p].degrees) { + this[p] = this[p] * D2R; + } + }.bind(this)); + + if (Math.abs((Math.abs(this.lat0) - HALF_PI)) < EPSLN) { + this.mode = this.lat0 < 0 ? mode.S_POLE : mode.N_POLE; + } else if (Math.abs(this.lat0) < EPSLN) { + this.mode = mode.EQUIT; + } else { + this.mode = mode.OBLIQ; + this.sinph0 = Math.sin(this.lat0); + this.cosph0 = Math.cos(this.lat0); + } + + this.pn1 = this.h / this.a; // Normalize relative to the Earth's radius + + if (this.pn1 <= 0 || this.pn1 > 1e10) { + throw new Error("Invalid height"); + } + + this.p = 1 + this.pn1; + this.rp = 1 / this.p; + this.h1 = 1 / this.pn1; + this.pfact = (this.p + 1) * this.h1; + this.es = 0; + + var omega = this.tilt; + var gamma = this.azi; + this.cg = Math.cos(gamma); + this.sg = Math.sin(gamma); + this.cw = Math.cos(omega); + this.sw = Math.sin(omega); + } + + function forward$29(p) { + p.x -= this.long0; + var sinphi = Math.sin(p.y); + var cosphi = Math.cos(p.y); + var coslam = Math.cos(p.x); + var x, y; + switch (this.mode) { + case mode.OBLIQ: + y = this.sinph0 * sinphi + this.cosph0 * cosphi * coslam; + break; + case mode.EQUIT: + y = cosphi * coslam; + break; + case mode.S_POLE: + y = -sinphi; + break; + case mode.N_POLE: + y = sinphi; + break; + } + y = this.pn1 / (this.p - y); + x = y * cosphi * Math.sin(p.x); + + switch (this.mode) { + case mode.OBLIQ: + y *= this.cosph0 * sinphi - this.sinph0 * cosphi * coslam; + break; + case mode.EQUIT: + y *= sinphi; + break; + case mode.N_POLE: + y *= -(cosphi * coslam); + break; + case mode.S_POLE: + y *= cosphi * coslam; + break; + } + + // Tilt + var yt, ba; + yt = y * this.cg + x * this.sg; + ba = 1 / (yt * this.sw * this.h1 + this.cw); + x = (x * this.cg - y * this.sg) * this.cw * ba; + y = yt * ba; + + p.x = x * this.a; + p.y = y * this.a; + return p; + } + + function inverse$29(p) { + p.x /= this.a; + p.y /= this.a; + var r = { x: p.x, y: p.y }; + + // Un-Tilt + var bm, bq, yt; + yt = 1 / (this.pn1 - p.y * this.sw); + bm = this.pn1 * p.x * yt; + bq = this.pn1 * p.y * this.cw * yt; + p.x = bm * this.cg + bq * this.sg; + p.y = bq * this.cg - bm * this.sg; + + var rh = hypot(p.x, p.y); + if (Math.abs(rh) < EPSLN) { + r.x = 0; + r.y = p.y; + } else { + var cosz, sinz; + sinz = 1 - rh * rh * this.pfact; + sinz = (this.p - Math.sqrt(sinz)) / (this.pn1 / rh + rh / this.pn1); + cosz = Math.sqrt(1 - sinz * sinz); + switch (this.mode) { + case mode.OBLIQ: + r.y = Math.asin(cosz * this.sinph0 + p.y * sinz * this.cosph0 / rh); + p.y = (cosz - this.sinph0 * Math.sin(r.y)) * rh; + p.x *= sinz * this.cosph0; + break; + case mode.EQUIT: + r.y = Math.asin(p.y * sinz / rh); + p.y = cosz * rh; + p.x *= sinz; + break; + case mode.N_POLE: + r.y = Math.asin(cosz); + p.y = -p.y; + break; + case mode.S_POLE: + r.y = -Math.asin(cosz); + break; + } + r.x = Math.atan2(p.x, p.y); + } + + p.x = r.x + this.long0; + p.y = r.y; + return p; + } + + var names$31 = ["Tilted_Perspective", "tpers"]; + var tpers = { + init: init$30, + forward: forward$29, + inverse: inverse$29, + names: names$31 + }; + + var includedProjections = function(proj4){ + proj4.Proj.projections.add(tmerc); + proj4.Proj.projections.add(etmerc); + proj4.Proj.projections.add(utm); + proj4.Proj.projections.add(sterea); + proj4.Proj.projections.add(stere); + proj4.Proj.projections.add(somerc); + proj4.Proj.projections.add(omerc); + proj4.Proj.projections.add(lcc); + proj4.Proj.projections.add(krovak); + proj4.Proj.projections.add(cass); + proj4.Proj.projections.add(laea); + proj4.Proj.projections.add(aea); + proj4.Proj.projections.add(gnom); + proj4.Proj.projections.add(cea); + proj4.Proj.projections.add(eqc); + proj4.Proj.projections.add(poly); + proj4.Proj.projections.add(nzmg); + proj4.Proj.projections.add(mill); + proj4.Proj.projections.add(sinu); + proj4.Proj.projections.add(moll); + proj4.Proj.projections.add(eqdc); + proj4.Proj.projections.add(vandg); + proj4.Proj.projections.add(aeqd); + proj4.Proj.projections.add(ortho); + proj4.Proj.projections.add(qsc); + proj4.Proj.projections.add(robin); + proj4.Proj.projections.add(geocent); + proj4.Proj.projections.add(tpers); + }; + + proj4$1.defaultDatum = 'WGS84'; //default datum + proj4$1.Proj = Projection; + proj4$1.WGS84 = new proj4$1.Proj('WGS84'); + proj4$1.Point = Point; + proj4$1.toPoint = toPoint; + proj4$1.defs = defs; + proj4$1.nadgrid = nadgrid; + proj4$1.transform = transform; + proj4$1.mgrs = mgrs; + proj4$1.version = '2.7.5'; + includedProjections(proj4$1); + + return proj4$1; + +}))); + + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (factory) { + var L, proj4; + if (true) { + // AMD + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2), __webpack_require__(108)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}(function (L, proj4) { + if (proj4.__esModule && proj4.default) { + // If proj4 was bundled as an ES6 module, unwrap it to get + // to the actual main proj4 object. + // See discussion in https://github.com/kartena/Proj4Leaflet/pull/147 + proj4 = proj4.default; + } + + L.Proj = {}; + + L.Proj._isProj4Obj = function(a) { + return (typeof a.inverse !== 'undefined' && + typeof a.forward !== 'undefined'); + }; + + L.Proj.Projection = L.Class.extend({ + initialize: function(code, def, bounds) { + var isP4 = L.Proj._isProj4Obj(code); + this._proj = isP4 ? code : this._projFromCodeDef(code, def); + this.bounds = isP4 ? def : bounds; + }, + + project: function (latlng) { + var point = this._proj.forward([latlng.lng, latlng.lat]); + return new L.Point(point[0], point[1]); + }, + + unproject: function (point, unbounded) { + var point2 = this._proj.inverse([point.x, point.y]); + return new L.LatLng(point2[1], point2[0], unbounded); + }, + + _projFromCodeDef: function(code, def) { + if (def) { + proj4.defs(code, def); + } else if (proj4.defs[code] === undefined) { + var urn = code.split(':'); + if (urn.length > 3) { + code = urn[urn.length - 3] + ':' + urn[urn.length - 1]; + } + if (proj4.defs[code] === undefined) { + throw 'No projection definition for code ' + code; + } + } + + return proj4(code); + } + }); + + L.Proj.CRS = L.Class.extend({ + includes: L.CRS, + + options: { + transformation: new L.Transformation(1, 0, -1, 0) + }, + + initialize: function(a, b, c) { + var code, + proj, + def, + options; + + if (L.Proj._isProj4Obj(a)) { + proj = a; + code = proj.srsCode; + options = b || {}; + + this.projection = new L.Proj.Projection(proj, options.bounds); + } else { + code = a; + def = b; + options = c || {}; + this.projection = new L.Proj.Projection(code, def, options.bounds); + } + + L.Util.setOptions(this, options); + this.code = code; + this.transformation = this.options.transformation; + + if (this.options.origin) { + this.transformation = + new L.Transformation(1, -this.options.origin[0], + -1, this.options.origin[1]); + } + + if (this.options.scales) { + this._scales = this.options.scales; + } else if (this.options.resolutions) { + this._scales = []; + for (var i = this.options.resolutions.length - 1; i >= 0; i--) { + if (this.options.resolutions[i]) { + this._scales[i] = 1 / this.options.resolutions[i]; + } + } + } + + this.infinite = !this.options.bounds; + + }, + + scale: function(zoom) { + var iZoom = Math.floor(zoom), + baseScale, + nextScale, + scaleDiff, + zDiff; + if (zoom === iZoom) { + return this._scales[zoom]; + } else { + // Non-integer zoom, interpolate + baseScale = this._scales[iZoom]; + nextScale = this._scales[iZoom + 1]; + scaleDiff = nextScale - baseScale; + zDiff = (zoom - iZoom); + return baseScale + scaleDiff * zDiff; + } + }, + + zoom: function(scale) { + // Find closest number in this._scales, down + var downScale = this._closestElement(this._scales, scale), + downZoom = this._scales.indexOf(downScale), + nextScale, + nextZoom, + scaleDiff; + // Check if scale is downScale => return array index + if (scale === downScale) { + return downZoom; + } + if (downScale === undefined) { + return -Infinity; + } + // Interpolate + nextZoom = downZoom + 1; + nextScale = this._scales[nextZoom]; + if (nextScale === undefined) { + return Infinity; + } + scaleDiff = nextScale - downScale; + return (scale - downScale) / scaleDiff + downZoom; + }, + + distance: L.CRS.Earth.distance, + + R: L.CRS.Earth.R, + + /* Get the closest lowest element in an array */ + _closestElement: function(array, element) { + var low; + for (var i = array.length; i--;) { + if (array[i] <= element && (low === undefined || low < array[i])) { + low = array[i]; + } + } + return low; + } + }); + + L.Proj.GeoJSON = L.GeoJSON.extend({ + initialize: function(geojson, options) { + this._callLevel = 0; + L.GeoJSON.prototype.initialize.call(this, geojson, options); + }, + + addData: function(geojson) { + var crs; + + if (geojson) { + if (geojson.crs && geojson.crs.type === 'name') { + crs = new L.Proj.CRS(geojson.crs.properties.name); + } else if (geojson.crs && geojson.crs.type) { + crs = new L.Proj.CRS(geojson.crs.type + ':' + geojson.crs.properties.code); + } + + if (crs !== undefined) { + this.options.coordsToLatLng = function(coords) { + var point = L.point(coords[0], coords[1]); + return crs.projection.unproject(point); + }; + } + } + + // Base class' addData might call us recursively, but + // CRS shouldn't be cleared in that case, since CRS applies + // to the whole GeoJSON, inluding sub-features. + this._callLevel++; + try { + L.GeoJSON.prototype.addData.call(this, geojson); + } finally { + this._callLevel--; + if (this._callLevel === 0) { + delete this.options.coordsToLatLng; + } + } + } + }); + + L.Proj.geoJson = function(geojson, options) { + return new L.Proj.GeoJSON(geojson, options); + }; + + L.Proj.ImageOverlay = L.ImageOverlay.extend({ + initialize: function (url, bounds, options) { + L.ImageOverlay.prototype.initialize.call(this, url, null, options); + this._projectedBounds = bounds; + }, + + // Danger ahead: Overriding internal methods in Leaflet. + // Decided to do this rather than making a copy of L.ImageOverlay + // and doing very tiny modifications to it. + // Future will tell if this was wise or not. + _animateZoom: function (event) { + var scale = this._map.getZoomScale(event.zoom); + var northWest = L.point(this._projectedBounds.min.x, this._projectedBounds.max.y); + var offset = this._projectedToNewLayerPoint(northWest, event.zoom, event.center); + + L.DomUtil.setTransform(this._image, offset, scale); + }, + + _reset: function () { + var zoom = this._map.getZoom(); + var pixelOrigin = this._map.getPixelOrigin(); + var bounds = L.bounds( + this._transform(this._projectedBounds.min, zoom)._subtract(pixelOrigin), + this._transform(this._projectedBounds.max, zoom)._subtract(pixelOrigin) + ); + var size = bounds.getSize(); + + L.DomUtil.setPosition(this._image, bounds.min); + this._image.style.width = size.x + 'px'; + this._image.style.height = size.y + 'px'; + }, + + _projectedToNewLayerPoint: function (point, zoom, center) { + var viewHalf = this._map.getSize()._divideBy(2); + var newTopLeft = this._map.project(center, zoom)._subtract(viewHalf)._round(); + var topLeft = newTopLeft.add(this._map._getMapPanePos()); + + return this._transform(point, zoom)._subtract(topLeft); + }, + + _transform: function (point, zoom) { + var crs = this._map.options.crs; + var transformation = crs.transformation; + var scale = crs.scale(zoom); + + return transformation.transform(point, scale); + } + }); + + L.Proj.imageOverlay = function (url, bounds, options) { + return new L.Proj.ImageOverlay(url, bounds, options); + }; + + return L.Proj; +})); + + +/***/ }), +/* 111 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module Register + * @alias [private] Register + * @description + * Register definition for IGNF, and EPSG CRS. + * + * @example + * Gp.Register.IGNF.AMST63 + * // return : "+title=Amsterdam 1963 +proj=geocent +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs" + * Gp.Register.get("IGNF:AMST63") + * // same as Gp.Register.IGNF.AMST63 + */ +var Register = { + /** + * instance already loaded into proj4 + */ + isLoaded: false, + /** + * get the definition for a code + * + * @function get + * @param {String} name - ie. EPSG:2154 (Lambert) + * @returns {Object} definition + * @example + * Register.get("EPSG:2154"); + * // "+title=RGF93 / Lambert-93 +proj=lcc +lat_1=49 ..." + */ + get: function get(name) { + if (name === "" || name === null || typeof name === "undefined") { + return; + } + var s = name.split(":"); + if (s.length !== 2) { + return; + } + var _register = s[0]; + var _code = s[1]; + if (!this.hasOwnProperty(_register)) { + return; + } + if (!this[_register].hasOwnProperty(_code)) { + return; + } + return this[_register][_code]; + }, + /** + * does projection code exist ? + * + * @function exist + * @param {String} name - ie. EPSG:2154 (Lambert) + * @returns {Boolean} true/false + * @example + * Register.exist("EPSG:2154"); // true + */ + exist: function exist(name) { + if (name === "" || name === null || typeof name === "undefined") { + return false; + } + var s = name.split(":"); + if (s.length !== 2) { + return false; + } + var _register = s[0]; + var _code = s[1]; + if (!this.hasOwnProperty(_register)) { + return false; + } + if (!this[_register].hasOwnProperty(_code)) { + return false; + } + return true; + }, + /** + * load all defs to proj4 + * @function load + * @param {Object} Proj4 - proj4 instance + */ + load: function load(Proj4) { + // un flag pour savoir si le chargement est déjà realisé + // (car ceci peut être couteux !) + if (!this.isLoaded) { + var registers = ["IGNF", + // exception lors du register IGNF ? + "EPSG", "CRS"]; + for (var i = 0; i < registers.length; i++) { + var _register = registers[i]; + var codes = this[_register]; + for (var _code in codes) { + if (codes.hasOwnProperty(_code)) { + var name = _register + ":" + _code; + Proj4.defs(name, this.get(name)); + // on enlève la dependance à OpenLayers... + // la fonction register est donc à appeller afin d'enregistrer + // les definitions dans OpenLayers : + // import { get } from "ol/proj"; + // import proj4 from "proj4"; + // import { register } from "ol/proj/proj4"; + // Register.load(); + // // Make projections defined in proj4 (with proj4.defs()) available in OpenLayers. + // // see ol/proj/proj4.register (https://openlayers.org/en/latest/apidoc/module-ol_proj_proj4.html) + // register(proj4); + // console.log(get("CRS:84").getCode()); // "CRS:84" + } + } + } + /** ts-syntax */ + this.isLoaded = true; + } + }, + /** + * load defs by default to proj4 + * + * include into proj4 : + * - WGS84 + * - ['EPSG:4326'] + * - ['EPSG:3785'], ['EPSG:3857'], GOOGLE, ['EPSG:900913'], ['EPSG:102113'] + * + + * - ["EPSG:2154"], ["EPSG:27571"], ["EPSG:27572"], ["EPSG:27573"], ["EPSG:2757"], + * - ["CRS:84"], + * - ["IGNF:LAMB93"], + * - ["IGNF:LAMBE"], ["IGNF:LAMB1"], ["IGNF:LAMB2"], ["IGNF:LAMB3"], ["IGNF:LAMB4"], + * - ["IGNF:RGF93G"], + * - ["IGNF:WGS84G"] + * + * @function loadByDefault + * @param {Object} Proj4 - proj4 instance + */ + loadByDefault: function loadByDefault(Proj4) { + // la liste de projections par defaut... + var registers = { + EPSG: { + 2154: Register["EPSG"]["2154"], + 27571: Register["EPSG"]["27571"], + 27572: Register["EPSG"]["27572"], + 27573: Register["EPSG"]["27573"], + 27574: Register["EPSG"]["27574"] + }, + CRS: { + 84: Register["CRS"]["84"] + }, + IGNF: { + LAMB93: Register["IGNF"]["LAMB93"], + LAMBE: Register["IGNF"]["LAMBE"], + LAMB1: Register["IGNF"]["LAMB1"], + LAMB2: Register["IGNF"]["LAMB2"], + LAMB3: Register["IGNF"]["LAMB3"], + LAMB4: Register["IGNF"]["LAMB4"], + RGF93G: Register["IGNF"]["RGF93G"], + WGS84G: Register["IGNF"]["WGS84G"] + } + }; + for (var register in registers) { + if (registers.hasOwnProperty(register)) { + var codes = registers[register]; + for (var code in codes) { + if (codes.hasOwnProperty(code)) { + var name = register + ":" + code; + Proj4.defs(name, codes[code]); + } + } + } + } + }, + /** + * load only a def to proj4 + * + * @function loadByName + * @param {Object} Proj4 - proj4 instance + * @param {String} name - ie. EPSG:2154 (Lambert) + * @returns {Boolean} true/false + */ + loadByName: function loadByName(Proj4, name) { + if (!this.exist(name)) { + return false; + } + try { + Proj4.defs(name, this.get(name)); + } catch (e) { + // FIXME message !? + return false; + } + return true; + }, + /** + * definitions EPSG + * @enum + */ + EPSG: { + 4978: "+proj=geocent +datum=WGS84 +units=m +no_defs ", + 3857: "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs", + 3785: "+title=WGS 84 / Pseudo-Mercator (deprecated) +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs", + 4149: "+title=CH1903 +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs ", + 4150: "+title=CH1903plus +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs ", + 4151: "+title=CHTRF95 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ", + 4171: "+title=RGF93 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ", + 4230: "+title=ED50 +proj=longlat +ellps=intl +no_defs ", + 4235: "+title=Guyane Francaise +proj=longlat +ellps=intl +no_defs ", + 4258: "+title=ETRS89 +proj=longlat +ellps=GRS80 +no_defs ", + 4275: "+title=NTF +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +no_defs ", + 4322: "+title=WGS 72 +proj=longlat +ellps=WGS72 +no_defs ", + 4326: "+title=WGS 84 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ", + 4467: "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 4470: "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ", + 4471: "+proj=utm +zone=38 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 4474: "+proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs ", + 4558: "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ", + 4559: "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 4621: "+title=Fort Marigot +proj=longlat +ellps=intl +towgs84=137,248,-430,0,0,0,0 +no_defs ", + 4622: "+title=Guadeloupe 1948 +proj=longlat +ellps=intl +no_defs ", + 4623: "+title=CSG67 +proj=longlat +ellps=intl +towgs84=-186,230,110,0,0,0,0 +no_defs ", + 4624: "+title=RGFG95 +proj=longlat +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +no_defs ", + 4625: "+title=Martinique 1938 +proj=longlat +ellps=intl +no_defs ", + 4626: "+title=Reunion 1947 +proj=longlat +ellps=intl +no_defs ", + 4627: "+title=RGR92 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ", + 4628: "+title=Tahiti 52 +proj=longlat +ellps=intl +towgs84=162,117,154,0,0,0,0 +no_defs ", + 4629: "+title=Tahaa 54 +proj=longlat +ellps=intl +no_defs ", + 4630: "+title=IGN72 Nuku Hiva +proj=longlat +ellps=intl +no_defs ", + 4632: "+title=Combani 1950 +proj=longlat +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +no_defs ", + 4633: "+title=IGN56 Lifou +proj=longlat +ellps=intl +no_defs ", + 4634: "+title=IGN72 Grand Terre +proj=longlat +ellps=intl +no_defs ", + 4637: "+title=Perroud 1950 +proj=longlat +ellps=intl +towgs84=325,154,172,0,0,0,0 +no_defs ", + 4638: "+title=Saint Pierre et Miquelon 1950 +proj=longlat +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +no_defs ", + 4640: "+title=RRAF 1991 +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs ", + 4641: "+title=IGN53 Mare +proj=longlat +ellps=intl +no_defs ", + 4645: "+title=RGNC 1991 +proj=longlat +ellps=intl +towgs84=0,0,0,0,0,0,0 +no_defs ", + 4687: "+proj=longlat +ellps=GRS80 +no_defs ", + 4662: "+title=IGN72 Grande Terre +proj=longlat +ellps=intl +no_defs ", + 4689: "+title=IGN63 Hiva Oa +proj=longlat +ellps=intl +no_defs ", + 4690: "+title=Tahiti 79 +proj=longlat +ellps=intl +no_defs ", + 4691: "+title=Moorea 87 +proj=longlat +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +no_defs ", + 4692: "+title=Maupiti 83 +proj=longlat +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +no_defs ", + 4698: "+title=IGN 1962 Kerguelen +proj=longlat +ellps=intl +towgs84=145,-187,103,0,0,0,0 +no_defs ", + 4749: "+title=RGNC91-93 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ", + 4750: "+title=ST87 Ouvea +proj=longlat +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +no_defs ", + 4807: "+title=NTF (Paris) +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +no_defs ", + 2056: "+title=CH1903+ / LV95 +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs ", + 2154: "+title=RGF93 / Lambert-93 +proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 2213: "+title=ETRS89 / TM 30 NE +proj=tmerc +lat_0=0 +lon_0=30 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs ", + 2969: "+title=Fort Marigot / UTM zone 20N +proj=utm +zone=20 +ellps=intl +towgs84=137,248,-430,0,0,0,0 +units=m +no_defs ", + 2970: "+title=Guadeloupe 1948 / UTM zone 20N +proj=utm +zone=20 +ellps=intl +units=m +no_defs ", + 2971: "+title=CSG67 / UTM zone 22N +proj=utm +zone=22 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs ", + 2972: "+title=RGFG95 / UTM zone 22N +proj=utm +zone=22 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs ", + 2973: "+title=Martinique 1938 / UTM zone 20N +proj=utm +zone=20 +ellps=intl +units=m +no_defs ", + 2975: "+title=RGR92 / UTM zone 40S +proj=utm +zone=40 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 2976: "+title=Tahiti 52 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +towgs84=162,117,154,0,0,0,0 +units=m +no_defs ", + 2977: "+title=Tahaa 54 / UTM zone 5S +proj=utm +zone=5 +south +ellps=intl +units=m +no_defs ", + 2978: "+title=IGN72 Nuku Hiva / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +units=m +no_defs ", + 2980: "+title=Combani 1950 / UTM zone 38S +proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs ", + 2981: "+title=IGN56 Lifou / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ", + 2982: "+title=IGN72 Grand Terre / UTM zone 58S (deprecated) +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ", + 2984: "+title=RGNC 1991 / Lambert New Caledonia (deprecated) +proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=intl +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 2986: "+title=Terre Adelie 1950 +proj=stere +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +lat_0=-90.000000000 +lon_0=140.000000000 +lat_ts=-67.000000000 +k=0.96027295 +x_0=300000.000 +y_0=-2299363.482 +units=m +no_defs", + 2987: "+title=Saint Pierre et Miquelon 1950 / UTM zone 21N +proj=utm +zone=21 +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +units=m +no_defs ", + 2989: "+title=RRAF 1991 / UTM zone 20N +proj=utm +zone=20 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 2990: "+title=Reunion 1947 / TM Reunion (deprecated) +proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=50000 +y_0=160000 +ellps=intl +units=m +no_defs ", + 2995: "+title=IGN53 Mare / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ", + 3038: "+proj=utm +zone=26 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3039: "+proj=utm +zone=27 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3040: "+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3041: "+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + // 3042 : "+proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + // 3043 : "+proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + // 3044 : "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3045: "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3046: "+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3047: "+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3048: "+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3049: "+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3050: "+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3051: "+proj=utm +zone=39 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3034: "+title=ETRS89 / ETRS-LCC +proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +units=m +no_defs ", + 3035: "+title=ETRS89 / ETRS-LAEA +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs ", + 3042: "+title=ETRS89 / ETRS-TM30 +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs ", + 3043: "+title=ETRS89 / ETRS-TM31 +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs ", + 3044: "+title=ETRS89 / ETRS-TM32 +proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs ", + 25828: "+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 25829: "+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + // 25830 : "+proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + // 25831 : "+proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + // 25832 : "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 25833: "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 25834: "+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 25835: "+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 25836: "+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 25837: "+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 25838: "+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3060: "+title=IGN72 Grande Terre / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ", + 3163: "+title=RGNC91-93 / Lambert New Caledonia +proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3164: "+title=ST87 Ouvea / UTM zone 58S +proj=utm +zone=58 +south +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +units=m +no_defs ", + 3165: "+title=NEA74 Noumea / Noumea Lambert +proj=lcc +lat_1=-22.24469175 +lat_2=-22.29469175 +lat_0=-22.26969175 +lon_0=166.44242575 +x_0=0.66 +y_0=1.02 +ellps=intl +units=m +no_defs ", + 3166: "+title=NEA74 Noumea / Noumea Lambert 2 +proj=lcc +lat_1=-22.24472222222222 +lat_2=-22.29472222222222 +lat_0=-22.26972222222222 +lon_0=166.4425 +x_0=8.313000000000001 +y_0=-2.354 +ellps=intl +units=m +no_defs ", + 3169: "+title=RGNC91-93 / UTM zone 57S +proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3170: "+title=RGNC91-93 / UTM zone 58S +proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3171: "+title=RGNC91-93 / UTM zone 59S +proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ", + 3172: "+title=IGN53 Mare / UTM zone 59S +proj=utm +zone=59 +south +ellps=intl +units=m +no_defs ", + 3296: "+title=RGPF / UTM zone 5S +proj=utm +zone=5 +south +ellps=GRS80 +units=m +no_defs ", + 3297: "+title=RGPF / UTM zone 6S +proj=utm +zone=6 +south +ellps=GRS80 +units=m +no_defs ", + 3298: "+title=RGPF / UTM zone 7S +proj=utm +zone=7 +south +ellps=GRS80 +units=m +no_defs ", + 3299: "+title=RGPF / UTM zone 8S +proj=utm +zone=8 +south +ellps=GRS80 +units=m +no_defs ", + 3302: "+title=IGN63 Hiva Oa / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +units=m +no_defs ", + 3303: "+title=Fatu Iva 72 / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +towgs84=347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074 +units=m +no_defs ", + 3304: "+title=Tahiti 79 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +units=m +no_defs ", + 3305: "+title=Moorea 87 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +units=m +no_defs ", + 3306: "+title=Maupiti 83 / UTM zone 5S +proj=utm +zone=5 +south +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +units=m +no_defs ", + 3312: "+title=CSG67 / UTM zone 21N +proj=utm +zone=21 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs ", + 3313: "+title=RGFG95 / UTM zone 21N +proj=utm +zone=21 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs ", + 3336: "+title=IGN 1962 Kerguelen / UTM zone 42S +proj=utm +zone=42 +south +ellps=intl +towgs84=145,-187,103,0,0,0,0 +units=m +no_defs ", + 3395: "+title=WGS 84 / World Mercator +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 3727: "+title=Reunion 1947 / TM Reunion +proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=160000 +y_0=50000 +ellps=intl +units=m +no_defs ", + 21781: "+title=CH1903 / LV03 +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs ", + 25830: "+title=ETRS89 / UTM zone 30N +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs ", + 25831: "+title=ETRS89 / UTM zone 31N +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs ", + 25832: "+title=ETRS89 / UTM zone 32N +proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs ", + 27561: "+title=NTF (Paris) / Lambert Nord France +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27562: "+title=NTF (Paris) / Lambert Centre France +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27563: "+title=NTF (Paris) / Lambert Sud France +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27564: "+title=NTF (Paris) / Lambert Corse +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27571: "+title=NTF (Paris) / Lambert zone I +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27572: "+title=NTF (Paris) / Lambert zone II +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27573: "+title=NTF (Paris) / Lambert zone III +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27574: "+title=NTF (Paris) / Lambert zone IV +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27581: "+title=NTF (Paris) / France I (deprecated) +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27582: "+title=NTF (Paris) / France II (deprecated) +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27583: "+title=NTF (Paris) / France III (deprecated) +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27584: "+title=NTF (Paris) / France IV (deprecated) +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27591: "+title=NTF (Paris) / Nord France (deprecated) +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27592: "+title=NTF (Paris) / Centre France (deprecated) +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27593: "+title=NTF (Paris) / Sud France (deprecated) +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 27594: "+title=NTF (Paris) / Corse (deprecated) +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ", + 32601: "+proj=utm +zone=1 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32602: "+proj=utm +zone=2 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32603: "+proj=utm +zone=3 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32604: "+proj=utm +zone=4 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32605: "+proj=utm +zone=5 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32606: "+proj=utm +zone=6 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32607: "+proj=utm +zone=7 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32608: "+proj=utm +zone=8 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32609: "+proj=utm +zone=9 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32610: "+proj=utm +zone=10 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32611: "+proj=utm +zone=11 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32612: "+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32613: "+proj=utm +zone=13 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32614: "+proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32615: "+proj=utm +zone=15 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32616: "+proj=utm +zone=16 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32617: "+proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32618: "+proj=utm +zone=18 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32619: "+proj=utm +zone=19 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32620: "+proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32621: "+proj=utm +zone=21 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32622: "+proj=utm +zone=22 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32623: "+proj=utm +zone=23 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32624: "+proj=utm +zone=24 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32625: "+proj=utm +zone=25 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32626: "+proj=utm +zone=26 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32627: "+proj=utm +zone=27 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32628: "+proj=utm +zone=28 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32629: "+proj=utm +zone=29 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32630: "+proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32631: "+proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32632: "+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32633: "+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32634: "+proj=utm +zone=34 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32635: "+proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32636: "+proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32637: "+proj=utm +zone=37 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32638: "+proj=utm +zone=38 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32639: "+proj=utm +zone=39 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32640: "+proj=utm +zone=40 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32641: "+proj=utm +zone=41 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32642: "+proj=utm +zone=42 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32643: "+proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32644: "+proj=utm +zone=44 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32645: "+proj=utm +zone=45 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32646: "+proj=utm +zone=46 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32647: "+proj=utm +zone=47 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32648: "+proj=utm +zone=48 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32649: "+proj=utm +zone=49 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32650: "+proj=utm +zone=50 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32651: "+proj=utm +zone=51 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32652: "+proj=utm +zone=52 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32653: "+proj=utm +zone=53 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32654: "+proj=utm +zone=54 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32655: "+proj=utm +zone=55 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32656: "+proj=utm +zone=56 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32657: "+proj=utm +zone=57 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32658: "+proj=utm +zone=58 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32659: "+proj=utm +zone=59 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32660: "+proj=utm +zone=60 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32661: "+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32662: "+title=WGS 84 / Plate Carree +proj=eqc +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32701: "+proj=utm +zone=1 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32702: "+proj=utm +zone=2 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32703: "+proj=utm +zone=3 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32704: "+proj=utm +zone=4 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32705: "+proj=utm +zone=5 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32706: "+proj=utm +zone=6 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32707: "+proj=utm +zone=7 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32708: "+proj=utm +zone=8 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32709: "+proj=utm +zone=9 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32710: "+proj=utm +zone=10 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32711: "+proj=utm +zone=11 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32712: "+proj=utm +zone=12 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32713: "+proj=utm +zone=13 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32714: "+proj=utm +zone=14 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32715: "+proj=utm +zone=15 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32716: "+proj=utm +zone=16 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32717: "+proj=utm +zone=17 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32718: "+proj=utm +zone=18 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32719: "+proj=utm +zone=19 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32720: "+proj=utm +zone=20 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32721: "+proj=utm +zone=21 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32722: "+proj=utm +zone=22 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32723: "+proj=utm +zone=23 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32724: "+proj=utm +zone=24 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32725: "+proj=utm +zone=25 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32726: "+proj=utm +zone=26 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32727: "+proj=utm +zone=27 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32728: "+proj=utm +zone=28 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32729: "+proj=utm +zone=29 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32730: "+proj=utm +zone=30 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32731: "+proj=utm +zone=31 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32732: "+proj=utm +zone=32 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32733: "+proj=utm +zone=33 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32734: "+proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32735: "+proj=utm +zone=35 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32736: "+proj=utm +zone=36 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32737: "+proj=utm +zone=37 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32738: "+proj=utm +zone=38 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32739: "+proj=utm +zone=39 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32740: "+proj=utm +zone=40 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32741: "+proj=utm +zone=41 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32742: "+proj=utm +zone=42 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32743: "+proj=utm +zone=43 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32744: "+proj=utm +zone=44 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32745: "+proj=utm +zone=45 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32746: "+proj=utm +zone=46 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32747: "+proj=utm +zone=47 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32748: "+proj=utm +zone=48 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32749: "+proj=utm +zone=49 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32750: "+proj=utm +zone=50 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32751: "+proj=utm +zone=51 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32752: "+proj=utm +zone=52 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32753: "+proj=utm +zone=53 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32754: "+proj=utm +zone=54 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32755: "+proj=utm +zone=55 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32756: "+proj=utm +zone=56 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32757: "+proj=utm +zone=57 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32758: "+proj=utm +zone=58 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32759: "+proj=utm +zone=59 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32760: "+proj=utm +zone=60 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 32761: "+proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ", + 310024802: "+title=Geoportail - France metropolitaine +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=46.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 310915814: "+title=Geoportail - Antilles francaises +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 310486805: "+title=Geoportail - Guyane +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=4.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 310700806: "+title=Geoportail - Reunion et dependances +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-21.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 310702807: "+title=Geoportail - Mayotte +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-12.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 310706808: "+title=Geoportail - Saint-Pierre et Miquelon +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=47.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 310547809: "+title=Geoportail - Nouvelle-Caledonie +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-22.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 310642810: "+title=Geoportail - Wallis et Futuna +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-14.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 310032811: "+title=Geoportail - Polynesie francaise +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 310642812: "+title=Geoportail - Kerguelen +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-49.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 310642801: "+title=Geoportail - Crozet +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-46.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 310642813: "+title=Geoportail - Amsterdam et Saint-Paul +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-38.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 310642901: "+title=Geoportail - Monde +proj=mill +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lon_0=0.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + 5489: "+title=RGAF09 geographiques (dms) +proj=longlat +nadgrids=@null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137 +rf=298.257222101 +units=m +no_defs", + 5490: "+title=RGAF09 UTM Nord Fuseau 20 +proj=tmerc +nadgrids=@null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137 +rf=298.257222101 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs" + }, + /** + * definitions CRS + * @enum + */ + CRS: { + 84: "+title=WGS 84 longitude-latitude +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs " + }, + /** + * definitions IGNF + * @enum + */ + IGNF: { + AMST63: "+title=Amsterdam 1963 +proj=geocent +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + CROZ63: "+title=Crozet 1963 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + CSG67: "+title=Guyane CSG67 +proj=geocent +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + ED50: "+title=ED50 +proj=geocent +towgs84=-84.0000,-97.0000,-117.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + ETRS89: "+title=Systeme de reference terrestre Europeen (1989) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + GUAD48: "+title=Guadeloupe Ste Anne +proj=geocent +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + GUADFM49: "+title=Guadeloupe Fort Marigot +proj=geocent +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + IGN63: "+title=IGN 1963 (Hiva Oa, Tahuata, Mohotani) +proj=geocent +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + IGN72: "+title=IGN 1972 Grande-Terre / Ile des Pins +proj=geocent +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + KERG62CAR: "+title=Kerguelen - K0 +proj=geocent +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + MART38: "+title=Martinique Fort-Desaix +proj=geocent +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + MAYO50: "+title=Mayotte Combani +proj=geocent +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + MOOREA87: "+title=Moorea 1987 +proj=geocent +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + NTF: "+title=Nouvelle Triangulation Francaise +proj=geocent +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +units=m +no_defs", + NUKU72: "+title=IGN 1972 Nuku Hiva +proj=geocent +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + REUN47: "+title=Reunion 1947 +proj=geocent +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + RGF93: "+title=Reseau geodesique francais 1993 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGFG95: "+title=Reseau geodesique francais de Guyane 1995 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGM04: "+title=RGM04 (Reseau Geodesique de Mayotte 2004) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGNC: "+title=Reseau Geodesique de Nouvelle-Caledonie +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGPF: "+title=RGPF (Reseau Geodesique de Polynesie Francaise) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGR92: "+title=Reseau geodesique Reunion 1992 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGSPM06: "+title=Reseau Geodesique Saint-Pierre-et-Miquelon (2006) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGTAAF07: "+title=Reseau Geodesique des TAAF (2007) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RRAF91: "+title=RRAF 1991 (Reseau de Reference des Antilles Francaises) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + STPL69: "+title=Saint-Paul 1969 +proj=geocent +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + STPM50: "+title=St Pierre et Miquelon 1950 +proj=geocent +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +units=m +no_defs", + TAHAA: "+title=Raiatea - Tahaa 51-54 (Tahaa, Base Terme Est) +proj=geocent +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + TAHI79: "+title=IGN79 (Tahiti) Iles de la Societe +proj=geocent +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + TERA50: "+title=Pointe Geologie - Perroud 1950 +proj=geocent +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + WALL78: "+title=Wallis-Uvea 1978 (MOP78) +proj=geocent +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + WGS72: "+title=World Geodetic System 1972 +proj=geocent +towgs84=0.0000,12.0000,6.0000 +a=6378135.0000 +rf=298.2600000000000 +units=m +no_defs", + WGS84: "+title=World Geodetic System 1984 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + AMST63GEO: "+title=Amsterdam 1963 +proj=longlat +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + CROZ63GEO: "+title=Crozet 1963 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + CSG67GEO: "+title=Guyane CSG67 +proj=longlat +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + ED50G: "+title=ED50 +proj=longlat +towgs84=-84.0000,-97.0000,-117.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + GUAD48GEO: "+title=Guadeloupe Ste Anne +proj=longlat +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + GUADFM49GEO: "+title=Guadeloupe Fort Marigot +proj=longlat +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + IGN63GEO: "+title=IGN 1963 (Hiva Oa, Tahuata, Mohotani) +proj=longlat +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + IGN72GEO: "+title=IGN 1972 Grande-Terre / Ile des Pins +proj=longlat +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + KERG62GEO: "+title=Kerguelen - K0 +proj=longlat +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + MART38GEO: "+title=Martinique Fort-Desaix +proj=longlat +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + MAYO50GEO: "+title=Mayotte Combani +proj=longlat +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + MOOREA87GEO: "+title=Moorea 1987 +proj=longlat +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + NTFG: "+title=Nouvelle Triangulation Francaise Greenwich degres sexagesimaux +proj=longlat +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +units=m +no_defs", + NTFP: "+title=Nouvelle Triangulation Francaise Paris grades +proj=longlat +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +units=m +no_defs", + NUKU72GEO: "+title=IGN 1972 Nuku Hiva +proj=longlat +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + REUN47GEO: "+title=Reunion 1947 +proj=longlat +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + RGF93G: "+title=Reseau geodesique francais 1993 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGFG95GEO: "+title=Reseau geodesique francais de Guyane 1995 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGM04GEO: "+title=RGM04 (Reseau Geodesique de Mayotte 2004) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGNCGEO: "+title=Reseau Geodesique de Nouvelle-Caledonie +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGPFGEO: "+title=RGPF (Reseau Geodesique de Polynesie Francaise) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGR92GEO: "+title=Reseau geodesique de la Reunion 1992 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGSPM06GEO: "+title=Saint-Pierre-et-Miquelon (2006) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + RGTAAF07G: "+title=Reseau Geodesique des TAAF (2007) (dms) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + STPL69GEO: "+title=Saint-Paul 1969 +proj=longlat +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + STPM50GEO: "+title=St Pierre et Miquelon 1950 +proj=longlat +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +units=m +no_defs", + TAHAAGEO: "+title=Raiatea - Tahaa 51-54 (Tahaa, Base Terme Est) +proj=longlat +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + TAHI79GEO: "+title=IGN79 (Tahiti) Iles de la Societe +proj=longlat +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + TERA50G: "+title=Pointe Geologie - Perroud 1950 +proj=longlat +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + WALL78GEO: "+title=Wallis - Uvea 1978 (MOP78) +proj=longlat +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs", + WGS72G: "+title=WGS72 +proj=longlat +towgs84=0.0000,12.0000,6.0000 +a=6378135.0000 +rf=298.2600000000000 +units=m +no_defs", + WGS84G: "+title=World Geodetic System 1984 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + WGS84RRAFGEO: "+title=Reseau de reference des Antilles francaises (1988-1991) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + XGEO: "+title=Systeme CIO-BIH +proj=longlat +towgs84=0.0000,0.0000,0.5000,0.0000,0.0000,0.0140,-0.100000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + AMST63UTM43S: "+title=Amsterdam 1963 UTM fuseau 43 Sud +proj=tmerc +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + CROZ63UTM39S: "+title=Crozet 1963 +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + CSG67UTM21: "+title=Guyane CSG67 UTM fuseau 21 +proj=tmerc +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + CSG67UTM22: "+title=Guyane CSG67 UTM fuseau 22 +proj=tmerc +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + GEOPORTALANF: "+title=Geoportail - Antilles francaises +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + GEOPORTALASP: "+title=Geoportail - Amsterdam et Saint-Paul +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-38.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + GEOPORTALCRZ: "+title=Geoportail - Crozet +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-46.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + GEOPORTALFXX: "+title=Geoportail - France metropolitaine +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=46.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + GEOPORTALGUF: "+title=Geoportail - Guyane +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=4.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + GEOPORTALKER: "+title=Geoportail - Kerguelen +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-49.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + GEOPORTALMYT: "+title=Geoportail - Mayotte +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-12.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + GEOPORTALNCL: "+title=Geoportail - Nouvelle-Caledonie +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-22.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + GEOPORTALPYF: "+title=Geoportail - Polynesie francaise +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + GEOPORTALREU: "+title=Geoportail - Reunion et dependances +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-21.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + GEOPORTALSPM: "+title=Geoportail - Saint-Pierre et Miquelon +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=47.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + GEOPORTALWLF: "+title=Geoportail - Wallis et Futuna +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-14.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + GUAD48UTM20: "+title=Guadeloupe Ste Anne +proj=tmerc +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + GUADFM49U20: "+title=Guadeloupe Fort Marigot +proj=tmerc +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + IGN63UTM7S: "+title=IGN 1963 - Hiva Oa, Tahuata, Mohotani - UTM fuseau 7 Sud +proj=tmerc +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + IGN72UTM58S: "+title=IGN 1972 - UTM fuseau 58 Sud +proj=tmerc +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=165.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + KERG62UTM42S: "+title=Kerguelen 1962 +proj=tmerc +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=69.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + LAMB1: "+title=Lambert I +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=49.500000000 +lon_0=0.000000000 +k_0=0.99987734 +lat_1=49.500000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs", + LAMB1C: "+title=Lambert I Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=49.500000000 +lon_0=0.000000000 +k_0=0.99987734 +lat_1=49.500000000 +x_0=600000.000 +y_0=1200000.000 +units=m +no_defs", + LAMB2: "+title=Lambert II +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs", + LAMB2C: "+title=Lambert II Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=2200000.000 +units=m +no_defs", + LAMB3: "+title=Lambert III +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=44.100000000 +lon_0=0.000000000 +k_0=0.99987750 +lat_1=44.100000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs", + LAMB3C: "+title=Lambert III Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=44.100000000 +lon_0=0.000000000 +k_0=0.99987750 +lat_1=44.100000000 +x_0=600000.000 +y_0=3200000.000 +units=m +no_defs", + LAMB4: "+title=Lambert IV +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=42.165000000 +lon_0=0.000000000 +k_0=0.99994471 +lat_1=42.165000000 +x_0=234.358 +y_0=185861.369 +units=m +no_defs", + LAMB4C: "+title=Lambert IV Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=42.165000000 +lon_0=0.000000000 +k_0=0.99994471 +lat_1=42.165000000 +x_0=234.358 +y_0=4185861.369 +units=m +no_defs", + LAMB93: "+title=Lambert 93 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=46.500000000 +lon_0=3.000000000 +lat_1=44.000000000 +lat_2=49.000000000 +x_0=700000.000 +y_0=6600000.000 +units=m +no_defs", + RGF93CC42: "+title=Lambert conique conforme Zone 1 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=42.000000000 +lon_0=3.000000000 +lat_1=41.200000000 +lat_2=42.800000000 +x_0=1700000.000 +y_0=1200000.000 +units=m +no_defs", + RGF93CC43: "+title=Lambert conique conforme Zone 2 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=43.000000000 +lon_0=3.000000000 +lat_1=42.200000000 +lat_2=43.800000000 +x_0=1700000.000 +y_0=2200000.000 +units=m +no_defs", + RGF93CC44: "+title=Lambert conique conforme Zone 3 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=44.000000000 +lon_0=3.000000000 +lat_1=43.200000000 +lat_2=44.800000000 +x_0=1700000.000 +y_0=3200000.000 +units=m +no_defs", + RGF93CC45: "+title=Lambert conique conforme Zone 4 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=45.000000000 +lon_0=3.000000000 +lat_1=44.200000000 +lat_2=45.800000000 +x_0=1700000.000 +y_0=4200000.000 +units=m +no_defs", + RGF93CC46: "+title=Lambert conique conforme Zone 5 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=46.000000000 +lon_0=3.000000000 +lat_1=45.200000000 +lat_2=46.800000000 +x_0=1700000.000 +y_0=5200000.000 +units=m +no_defs", + RGF93CC47: "+title=Lambert conique conforme Zone 6 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=47.000000000 +lon_0=3.000000000 +lat_1=46.200000000 +lat_2=47.800000000 +x_0=1700000.000 +y_0=6200000.000 +units=m +no_defs", + RGF93CC48: "+title=Lambert conique conforme Zone 7 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=48.000000000 +lon_0=3.000000000 +lat_1=47.200000000 +lat_2=48.800000000 +x_0=1700000.000 +y_0=7200000.000 +units=m +no_defs", + RGF93CC49: "+title=Lambert conique conforme Zone 8 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=49.000000000 +lon_0=3.000000000 +lat_1=48.200000000 +lat_2=49.800000000 +x_0=1700000.000 +y_0=8200000.000 +units=m +no_defs", + RGF93CC50: "+title=Lambert conique conforme Zone 9 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=50.000000000 +lon_0=3.000000000 +lat_1=49.200000000 +lat_2=50.800000000 +x_0=1700000.000 +y_0=9200000.000 +units=m +no_defs", + LAMBE: "+title=Lambert II etendu +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=2200000.000 +units=m +no_defs", + MART38UTM20: "+title=Martinique Fort-Desaix +proj=tmerc +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + MAYO50UTM38S: "+title=Mayotte Combani +proj=tmerc +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + MILLER: "+title=Geoportail - Monde +proj=mill +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lon_0=0.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs", + MOOREA87U6S: "+title=Moorea 1987 - UTM fuseau 6 Sud +proj=tmerc +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + NUKU72U7S: "+title=IGN 1972 Nuku Hiva - UTM fuseau 7 Sud +proj=tmerc +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + // REUN47GAUSSL : "+title=Reunion Gauss Laborde +proj=gstmerc +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=-21.116666667 +lon_0=55.533333333 +k_0=1.00000000 +x_0=160000.000 +y_0=50000.000 +units=m +no_defs", + RGM04UTM38S: "+title=UTM fuseau 38 Sud (Reseau Geodesique de Mayotte 2004) +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + RGNCUTM57S: "+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 57 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=159.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + RGNCUTM58S: "+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 58 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=165.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + RGNCUTM59S: "+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 59 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=171.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + RGPFUTM5S: "+title=RGPF - UTM fuseau 5 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-153.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + RGPFUTM6S: "+title=RGPF - UTM fuseau 6 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + RGPFUTM7S: "+title=RGPF - UTM fuseau 7 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + RGR92UTM40S: "+title=RGR92 UTM fuseau 40 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + RGSPM06U21: "+title=Saint-Pierre-et-Miquelon (2006) UTM Fuseau 21 Nord +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + STPL69UTM43S: "+title=Saint-Paul 1969 UTM fuseau 43 Sud +proj=tmerc +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + STPM50UTM21: "+title=St Pierre et Miquelon 1950 +proj=tmerc +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + TAHAAUTM05S: "+title=Tahaa 1951 +proj=tmerc +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-153.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + TAHI51UTM06S: "+title=Tahiti-Terme Nord UTM fuseau 6 Sud +proj=tmerc +towgs84=162.0000,117.0000,154.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + TAHI79UTM6S: "+title=Tahiti 1979 +proj=tmerc +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + TERA50STEREO: "+title=Terre Adelie 1950 +proj=stere +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +lat_0=-90.000000000 +lon_0=140.000000000 +lat_ts=-67 +k=0.96027295 +x_0=300000.000 +y_0=-2299363.482 +units=m +no_defs", + UTM01SW84: "+title=World Geodetic System 1984 UTM fuseau 01 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-177.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + UTM20W84GUAD: "+title=World Geodetic System 1984 UTM fuseau 20 Nord-Guadeloupe +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM20W84MART: "+title=World Geodetic System 1984 UTM fuseau 20 Nord-Martinique +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM22RGFG95: "+title=RGFG95 UTM fuseau 22 Nord-Guyane +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM39SW84: "+title=World Geodetic System 1984 UTM fuseau 39 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + UTM42SW84: "+title=World Geodetic System 1984 UTM fuseau 42 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=69.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + UTM43SW84: "+title=World Geodetic System 1984 UTM fuseau 43 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + WALL78UTM1S: "+title=Wallis-Uvea 1978 (MOP78) UTM 1 SUD +proj=tmerc +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-177.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs", + ETRS89GEO: "+title=ETRS89 geographiques (dms) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs", + ETRS89LAEA: "+title=ETRS89 Lambert Azimutal Equal Area +proj=laea +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=52.000000000 +lon_0=10.000000000 +x_0=4321000.000 +y_0=3210000.000 +units=m +no_defs", + ETRS89LCC: "+title=ETRS89 Lambert Conformal Conic +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=52.000000000 +lon_0=9.999999995 +lat_1=35.000000000 +lat_2=65.000000000 +x_0=4000000.000 +y_0=2800000.000 +units=m +no_defs", + UTM26ETRS89: "+title=Europe - de 30d a 24d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-27.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM27ETRS89: "+title=Europe - de 24d a 18d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-21.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM28ETRS89: "+title=Europe - de 18d a 12d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-15.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM29ETRS89: "+title=Europe - de 12d a 6d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-9.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM30ETRS89: "+title=Europe - de -6d a 0d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-3.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM31ETRS89: "+title=Europe - de 0d a 6d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=3.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM32ETRS89: "+title=Europe - de 6d a 12d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=9.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM33ETRS89: "+title=Europe - de 12d a 18d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=15.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM34ETRS89: "+title=Europe - de 18d a 24d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=21.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM35ETRS89: "+title=Europe - de 24d a 30d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=27.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM36ETRS89: "+title=Europe - de 30d a 36d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=33.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM37ETRS89: "+title=Europe - de 36d a 42d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=39.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs", + UTM38ETRS89: "+title=Europe - de 42d a 48d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs" + } +}; +/* harmony default export */ __webpack_exports__["default"] = (Register); + +/***/ }), +/* 112 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(113); +/* harmony import */ var _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(111); + + + + +/** + * @classdesc + * + * Leaflet Lambert 93 (EPSG:2154) ICRS compatible definition. + * + * @module + * @alias L.geoportalCRS.EPSG2154 + * @example + * var map = L.Map('divmap', { + * crs : L.geoportalCRS.EPSG2154 + * }).setView(); + * var lyr = L.geoportalLayer.WMTS( + * { + * layer : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93" + * }); + * + * lyr.addTo(map); // ou map.addLayer(lyr); + */ +/** @type {L.geoportalCRS.EPSG2154} */ +var EPSG2154 = { + /** + * instance + * + * @private + */ + instance: null, + /** + * execution + * + * @returns {Object} instance + * @private + */ + build: function build() { + // singleton + if (!this.instance) { + var crs = new leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Proj.CRS("EPSG:2154", _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__["default"].get("EPSG:2154"), { + resolutions: this._getResolutions(), + origin: this._getOrigin() + }); + this.instance = crs; + } + return this.instance; + }, + /** + * resolutions + * + * @returns {Number[]} resolutions + * @private + */ + _getResolutions: function _getResolutions() { + var resolutions = []; + // resolutions issues de la configuration + if (_Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__["default"].isConfigLoaded()) { + var o = _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__["default"].configuration.getTMSConf("LAMB93"); + resolutions = o.nativeResolutions; + } + if (resolutions.length) { + return resolutions; + } + + // resolution par defaut + return [104579.22454989408, 52277.53235379051, 26135.487078595408, 13066.891381800004, 6533.228604113456, 3266.5595244626675, 1633.2660045974187, 816.6295549860224, 408.31391467683596, 204.15674151090204, 102.07831678324082, 51.0391448966112, 25.519569074269395, 12.759783693647506, 6.379891635966491, 3.18994576530532, 1.5949728694977277, 0.7974864315474559, 0.398743214900604, 0.19937160727567999, 0.099685803696052, 0.049842901818919996]; + }, + /** + * origine + * + * @returns {Number[]} origin + * @private + */ + _getOrigin: function _getOrigin() { + return [0, 12000000]; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (EPSG2154); + +/***/ }), +/* 113 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* WEBPACK VAR INJECTION */(function(global) {/** + * @module Config + * @alias [private] Config + * @description + * ... + * + * @example + * isConfigLoaded(); + */ +var Config = { + /** + * Config + * + * @public + * @type {Object} + */ + configuration: {}, + /** + * Check if the configuration is loaded + * + * @returns {Boolean} True if Config is loaded, false otherwise + */ + isConfigLoaded: function isConfigLoaded() { + // config already loaded ! + if (this.configuration && Object.keys(this.configuration).length !== 0) { + return true; + } + var scope = typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : {}; + if (scope.Gp && scope.Gp.Config && scope.Gp.Config.layers && Object.keys(scope.Gp.Config.layers).length !== 0) { + /** ts-syntax */this.configuration = scope.Gp.Config; + return true; + } + return false; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (Config); +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(52))) + +/***/ }), +/* 114 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(113); +/* harmony import */ var _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(111); + + + + +/** + * + * Projection Lambert 2 étendu + * + * @module + * @alias L.geoportalCRS.EPSG27572 + * @example + * var map = L.Map('divmap', { + * crs : L.geoportalCRS.EPSG27572 + * }).setView(); + * var lyr = L.geoportalLayer.WMTS( + * { + * layer : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93", + * apiKey : "wqxljfvklsdhvlfkjqfmlq787645" + * }, + * { + * attribution : "test for layer ORTHOIMAGERY", + * opacity : 1, + * transparent : true, + * minZoom : 1, + * maxZoom : 21 + * ... + * }); + * + * lyr.addTo(map); // ou map.addLayer(lyr); + */ +/** @type {L.geoportalCRS.EPSG27572} */ +var EPSG27572 = { + /** + * instance + * + * @private + */ + instance: null, + /** + * execution + * + * @returns {Object} instance + * @private + */ + build: function build() { + // singleton + if (!this.instance) { + var crs = new leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Proj.CRS("EPSG:27572", _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__["default"].get("EPSG:27572"), { + resolutions: this._getResolutions(), + origin: this._getOrigin() + }); + this.instance = crs; + } + return this.instance; + }, + /** + * resolutions + * + * @returns {Number[]} resolutions + * @private + */ + _getResolutions: function _getResolutions() { + var resolutions = []; + // resolutions issues de la configuration + if (_Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__["default"].isConfigLoaded()) { + var o = _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__["default"].configuration.getTMSConf("LAMB2E"); + if (o && Object.keys(o).length) { + resolutions = o.nativeResolutions; + } + } + if (resolutions.length) { + return resolutions; + } + + // FIXME resolution par defaut ??? + return [104579.22454989408, 52277.53235379051, 26135.487078595408, 13066.891381800004, 6533.228604113456, 3266.5595244626675, 1633.2660045974187, 816.6295549860224, 408.31391467683596, 204.15674151090204, 102.07831678324082, 51.0391448966112, 25.519569074269395, 12.759783693647506, 6.379891635966491, 3.18994576530532, 1.5949728694977277, 0.7974864315474559, 0.398743214900604, 0.19937160727567999, 0.099685803696052, 0.049842901818919996]; + }, + /** + * origine + * + * @returns {Number[]} origin + * @private + */ + _getOrigin: function _getOrigin() { + return [0, 12000000]; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (EPSG27572); + +/***/ }), +/* 115 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(113); +/* harmony import */ var _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(111); + + + + +// FIXME prototype +// il ne fonctionne pas car les bbox ne sont pas bien formatées !? +// > BBOX=xmin,ymin,xmax,ymax --> conversion en EPSG --> BBOX=ymin,xmin,ymax,xmax +// cf. methode L.TileLayer.WMS.getTileUrl() +// > inversion des coordonnées si crs = L.CRS.EPSG4326 +// il faudrait donc surcharger cette methode afin qu'elle prenne en compte la condition suivante : +// > crs.code = "EPSG:4326" + +/** + * Projection Geographic (EPSG:4326) + * (PROTOTYPE) + * + * @ignore + * @module + * @alias L.geoportalCRS.EPSG2154 + * @returns {L.Proj.CRS} + * @example + * var map = L.Map('divmap', { + * crs : L.geoportalCRS.EPSG4326 // ou L.CRS.EPSG4326 + * }).setView(); + * var lyr = L.geoportalLayer.WMTS( + * { + * layer : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO", + * apiKey : "wqxljfvklsdhvlfkjqfmlq787645" + * }, + * { + * attribution : "test for layer ORTHOIMAGERY", + * opacity : 1, + * transparent : true, + * minZoom : 1, + * maxZoom : 21 + * ... + * }); + * + * lyr.addTo(map); // ou map.addLayer(lyr); + */ +/** @type {L.geoportalCRS.EPSG4326} */ +var EPSG4326 = { + /** + * instance + * + * @private + */ + instance: null, + /** + * execution + * + * @returns {Object} instance + * @private + */ + build: function build() { + // singleton + if (!this.instance) { + var crs = new leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Proj.CRS("EPSG:4326", _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_2__["default"].get("EPSG:4326"), { + resolutions: this._getResolutions(), + origin: [-180, 90] // ??? + }); + + this.instance = crs; + } + return this.instance; + }, + /** + * resolutions + * + * @returns {Number[]} resolutions + * @private + */ + _getResolutions: function _getResolutions() { + var resolutions = []; + // resolutions issues de la configuration + if (_Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__["default"].isConfigLoaded()) { + var o = _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__["default"].configuration.getTMSConf("WGS84G"); + resolutions = o.nativeResolutions; + } + if (resolutions.length) { + return resolutions; + } + return [1.40625, 0.703125, 0.3515625, 0.17578125, 0.087890625, 0.0439453125, 0.02197265625, 0.010986328125, 0.0054931640625, 0.00274658203125, 0.001373291015625, 0.0006866455078125, 0.00034332275390625, 0.000171661376953126, 0.0000858306884765628, 0.0000429153442382813, 0.0000214576721191407, 0.0000107288360595703, 0.00000536441802978517, 0.00000268220901489259, 0.0000013411045074463, 0.000000670552253723145, 0.00000033527612686157]; + }, + /** + * origine + * + * @private + */ + _getOrigin: function _getOrigin() {} +}; +/* harmony default export */ __webpack_exports__["default"] = (EPSG4326); + +/***/ }), +/* 116 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var leaflet_draw__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(117); +/* harmony import */ var leaflet_draw__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(leaflet_draw__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(37); +/* harmony import */ var _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(102); +/* harmony import */ var _Common_Controls_ReverseGeocodingDOM__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(118); + + + + + + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__["default"].getLogger("reversegeocoding"); + +/** + * @classdesc + * + * Leaflet Control Class to find locations by clicking on a map using reverse geocoding service of the Geoportal platform. + * + * Use {@link module :Controls.ReverseGeocode L.geoportalControl.ReverseGeocode()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control native class. + * + * @namespace + * @alias L.geoportalControl.ReverseGeocode + */ +var ReverseGeocoding = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends L.geoportalControl.ReverseGeocode.prototype */{ + includes: _Common_Controls_ReverseGeocodingDOM__WEBPACK_IMPORTED_MODULE_6__["default"], + /** + * options by default + * + * @private + */ + options: { + position: "bottomleft", + collapsed: true, + resources: ["StreetAddress", "PositionOfInterest", "CadastralParcel"], + delimitations: ["Point", "Circle", "Extent"], + reverseGeocodeOptions: {} + }, + /** + * @constructor ReverseGeocode + * @param {Object} options - ReverseGeocoding control options + * @param {String} [options.apiKey] - API key for services call (reverse geocode service). The "calcul" key is used by default. + * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol) + * @param {String} [options.position] - position of component into the map, 'topleft' by default + * @param {Boolean} [options.collapsed] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true. + * @param {Array} [options.resources] - resources for geocoding, by default : ["StreetAddress", "PositionOfInterest","CadastralParcel"] + * @param {Array} [options.delimitations] - delimitations for reverse geocoding, by default : ["Point", "Circle", "Extent"] + * @param {Object} [options.reverseGeocodeOptions] - reverse geocode service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~ReverseGeocode Gp.Services.reverseGeocode()} to know all reverse geocode options. + * @example + * var reverse = L.geoportalControl.ReverseGeocode({ + * collapsed : false, + * position : "topright", + * resources : ["StreetAddress", "PositionOfInterest","CadastralParcel"], + * delimitations : ["Point", "Circle"], + * reverseGeocodeOptions : {} + * }); + * reverse.on("reverse:onclickresult", function (e) { + * console.log(e.data): + * }); + * @private + */ + initialize: function initialize(options) { + // on merge les options avec celles par defaut + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(this.options, options); + + // check input options format (resources and delimitations arrays) + this._checkInputOptions(); + + /** uuid */ + this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__["default"].generate(); + + // Type de géocodage sélectionné (StreetAddress, PositionOfInterest, ...) + this._currentGeocodingType = null; + this._initGeocodingType(); + + // Type de délimitation à utiliser pour la requête + pour sélection sur la containerDistance + this._currentGeocodingDelimitation = null; + this._initGeocodingDelimitation(); + + // ################################################################## // + // ################### Elements principaux du DOM ################### // + + // containers principaux + this._showReverseGeocodingContainer = null; + // header panel + this._panelHeaderContainer = null; + this._panelTitleContainer = null; + this._returnPictoContainer = null; + // form + this._formContainer = null; + // results + this._resultsContainer = null; + this._resultsListContainer = null; + // waiting + this._waitingContainer = null; + + // ###################################################################### // + // ################### informations des points saisis ################### // + + // couche vectorielle dans laquelle seront saisis les points (features ci-dessus) + this._inputFeaturesLayer = null; + this._inputResultsLayer = null; + this._lastIdLayer = 0; + this._currentIdLayer = 0; + // interaction avec la carte (de type "Point", "Circle" ou "Polygon") + this._currentFeature = null; + + // #################################################################### // + // ################### informations pour la requête ################### // + + // geometrie de recherche du géocodage inverse qui sera envoyée dans la requête + this._requestGeom = null; + + // pour savoir si un calcul est en cours ou non + this._waiting = false; + // timer pour cacher la patience après un certain temps + this._timer = null; + + // #################################################################### // + // #################### informations des résultats #################### // + + this._reverseGeocodingLocations = []; + }, + /** + * this method is called by this.addTo(map) when the control is added on the map + * and fills variable 'this._container = this.onAdd(map)', + * and create events on map. + * + * @param {Object} map - the map + * + * @returns {DOMElement} DOM element + * + * @private + */ + onAdd: function onAdd(map) { + // initialisation du DOM du composant + var container = this._container = this._initLayout(); + + // deactivate of events that may interfere with the map + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container); + if (map) { + // lors de l'ajout à la map, on active la saisie du point, + // mais seulement si le widget est ouvert + if (!this.options.collapsed) { + this._activateMapInteraction(map); + } + } + return container; + }, + /** + * this method is called when the control is removed from the map + * and removes events on map. + * + * @param {Object} map - the map + * + * @private + */ + onRemove: function onRemove(map) { + this._clearLocations(); + this._clearLocationsFeature(map); + this._clearInputRequest(); + + // on supprime l'éventuelle précédente interaction + this._removeMapInteraction(map); + }, + // ################################################################### // + // ##################### init component ############################## // + // ################################################################### // + + /** + * this method is called by this.initialize() + * and makes sure input options are correctly formated + * + * @private + */ + _checkInputOptions: function _checkInputOptions() { + var i; + // on vérifie le tableau des resources + if (this.options.resources) { + var resources = this.options.resources; + // on vérifie que la liste des ressources de geocodage est bien un tableau + if (Array.isArray(resources)) { + var resourcesList = ["StreetAddress", "PositionOfInterest", "CadastralParcel", "Administratif"]; + for (i = 0; i < resources.length; i++) { + if (resourcesList.indexOf(resources[i]) === -1) { + // si la resource n'est pas référencée, on l'enlève + // resources.splice(i, 1); + logger.log("[ReverseGeocoding] options.resources : " + resources[i] + " is not a resource for reverse geocode"); + } + } + } else { + logger.log("[ReverseGeocoding] 'options.resources' parameter should be an array"); + resources = null; + } + } + // et le tableau des délimitations + if (this.options.delimitations) { + var delimitations = this.options.delimitations; + // on vérifie que la liste des delimitations est bien un tableau + if (Array.isArray(delimitations)) { + var delimitationsList = ["Circle", "Point", "Extent"]; + for (i = 0; i < delimitations.length; i++) { + if (delimitationsList.indexOf(delimitations[i]) === -1) { + // si la delimitations n'est pas référencée, on l'enlève + // resources.splice(i, 1); + logger.log("[ReverseGeocoding] options.delimitations : " + delimitations[i] + " is not a delimitation for reverse geocode"); + } + } + } else { + logger.log("[ReverseGeocoding] 'options.delimitations' parameter should be an array"); + delimitations = null; + } + } + }, + /** + * this method is called by this.initialize() and initialize geocoding type (=resource) + * ("StreetAddress", "PositionOfInterest", "CadastralParcel") + * + * @private + */ + _initGeocodingType: function _initGeocodingType() { + // Type de géocodage selectionné + this._currentGeocodingType = "StreetAddress"; // par defaut + + // par defaut + var resources = this.options.resources; + if (!resources || resources.length === 0) { + this.options.resources = ["StreetAddress", "PositionOfInterest", "CadastralParcel"]; + } + + // options utilisateur + if (Array.isArray(resources) && resources.length) { + // récupération du type par défaut + if (resources[0] === "StreetAddress" || resources[0] === "PositionOfInterest" || resources[0] === "CadastralParcel") { + this._currentGeocodingType = resources[0]; + } + } + + // si l'utilisateur a spécifié au moins une ressource dans le service, on surcharge les options du widget + var serviceOptions = this.options.reverseGeocodeOptions; + if (serviceOptions.filterOptions && Array.isArray(serviceOptions.filterOptions.type) && serviceOptions.filterOptions.type.length !== 0) { + this._currentGeocodingType = serviceOptions.filterOptions.type[0]; + } + }, + /** + * this method is called by this.initialize() and initialize geocoding delimitation + * ("Point", "Circle", "Extent") + * + * @private + */ + _initGeocodingDelimitation: function _initGeocodingDelimitation() { + // Type de délimitation selectionné + this._currentGeocodingDelimitation = "Point"; // par defaut + + // par defaut + var delimitations = this.options.delimitations; + if (!delimitations || delimitations.length === 0) { + this.options.delimitations = ["Point", "Circle", "Extent"]; + } + + // options utilisateur + if (Array.isArray(delimitations) && delimitations.length) { + var d = delimitations[0].toLowerCase(); + if (d === "point" || d === "circle" || d === "extent") { + this._currentGeocodingDelimitation = delimitations[0]; + } + } + }, + // ################################################################### // + // ######################## methods handle dom ####################### // + // ################################################################### // + + /** + * this method is called by this.onAdd(map) + * and initialize the container HTMLElement + * + * @returns {DOMElement} DOM element + * + * @private + */ + _initLayout: function _initLayout() { + // create main container + var container = this._createMainContainerElement(); + + // create show ReverseGeocoding element + var inputShow = this._showReverseGeocodingContainer = this._createShowReverseGeocodingElement(); + container.appendChild(inputShow); + + // mode "collapsed" + if (!this.options.collapsed) { + inputShow.checked = true; + } + + // create ReverseGeocoding picto + var picto = this._createShowReverseGeocodingPictoElement(); + container.appendChild(picto); + + // panel + var reverseGeocodingPanel = this._createReverseGeocodingPanelElement(); + + // header + var panelHeader = this._panelHeaderContainer = this._createReverseGeocodingPanelHeaderElement(); + // return picto (hidden at start) + var returnPicto = this._returnPictoContainer = this._createReverseGeocodingPanelReturnPictoElement(); + panelHeader.appendChild(returnPicto); + // pane title + var panelTitle = this._panelTitleContainer = this._createReverseGeocodingPanelTitleElement(); + panelHeader.appendChild(panelTitle); + // close picto + var closeDiv = this._createReverseGeocodingPanelCloseElement(); + panelHeader.appendChild(closeDiv); + reverseGeocodingPanel.appendChild(panelHeader); + + // form + var reverseGeocodingForm = this._formContainer = this._createReverseGeocodingPanelFormElement(); + // choices element + reverseGeocodingForm.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingTypeElement(this.options.resources)); + reverseGeocodingForm.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingDelimitationElement(this.options.delimitations)); + + // submit (bouton "Chercher") + var submit = this._createReverseGeocodingSubmitFormElement(); + reverseGeocodingForm.appendChild(submit); + reverseGeocodingPanel.appendChild(reverseGeocodingForm); + + // waiting + var waiting = this._waitingContainer = this._createReverseGeocodingWaitingElement(); + reverseGeocodingPanel.appendChild(waiting); + + // results (dans le panel) + var resultsPanel = this._resultsContainer = this._createReverseGeocodingResultsPanelElement(); + var reverseGeocodingResultsList = this._resultsListContainer = this._createReverseGeocodingResultsListElement(); + resultsPanel.appendChild(reverseGeocodingResultsList); + reverseGeocodingPanel.appendChild(resultsPanel); + container.appendChild(reverseGeocodingPanel); + logger.log(container); + return container; + }, + // ################################################################### // + // ################### Map interactions management ################### // + // ################################################################### // + + /** + * this method is called by this.onAdd, + * or by this.onShowReverseGeocodingClick, + * and calls method corresponding to current delimitation, if widget is not collapsed. + * + * @param {Object} map - control map. + * @private + */ + _activateMapInteraction: function _activateMapInteraction(map) { + logger.info("_activateMapInteraction()"); + + // Creation de la couche vectorielle sur laquelle on va dessiner + if (this._inputFeaturesLayer === null) { + this._inputFeaturesLayer = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.FeatureGroup(); + map.addLayer(this._inputFeaturesLayer); + var self = this; + /* evenement sur la carte lors d'une saisie, + on y ajoute le layer, et on y stocke les coordonnées */ + map.on("draw:created", function (e) { + var layer = e.layer; + var type = e.layerType; + logger.trace("draw:created"); + + // TODO + // comment mettre en place un icone dynamiquement ? + // if (type === "marker") {} + + self._setFeaturePosition(layer, type); + self._currentIdLayer = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.stamp(layer); + self._setFeatureLayer(layer); + }); + + /* evenements */ + map.on("draw:drawstart", function () { + logger.trace("draw:drawstart"); + self._removeFeatureLayer(self._lastIdLayer); + self._lastIdLayer = self._currentIdLayer; + }); + + /* evenements */ + map.on("draw:drawstop", function () { + logger.trace("draw:drawstop"); + }); + } + + // Création de l'interaction de dessin, selon le type de délimitation sélectionné + var delimitation = this._currentGeocodingDelimitation.toLowerCase(); + switch (delimitation) { + case "point": + this._activatePointInteraction(map); + break; + case "circle": + this._activateCircleInteraction(map); + break; + case "extent": + this._activateBoxInteraction(map); + break; + default: + break; + } + }, + /** + * remove draw interaction from map (if exists) + * + * @param {Object} map - control map. + * @private + */ + _removeMapInteraction: function _removeMapInteraction(map) { + if (!map) { + return; + } + if (this._inputFeaturesLayer !== null) { + map.off("draw:created"); + map.off("draw:drawstart"); + map.off("draw:drawstop"); + map.removeLayer(this._inputFeaturesLayer); + this._inputFeaturesLayer = null; + } + this._lastIdLayer = this._currentIdLayer = 0; + + // FIXME delete this._currentFeature ? + if (this._currentFeature) { + this._currentFeature.disable(); + } + }, + /** + * TODO this method is called by this._activateMapInteraction, + * and creates map point drawing interaction. + * + * @param {Object} map - control map. + * @private + */ + _activatePointInteraction: function _activatePointInteraction(map) { + logger.info("_activatePointInteraction()"); + if (this._currentFeature) { + this._currentFeature.disable(); + } + + // on modifie le tooltip du marker + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.drawLocal.draw.handlers.marker.tooltip.start = "click map to place search point"; + + // TODO styles des icones + var markerOptions = { + // icon : par defaut... + repeatMode: true + }; + this._currentFeature = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Draw.Marker(map, markerOptions); + this._currentFeature.enable(); + }, + /** + * TODO this method is called by this._activateMapInteraction, + * and creates map circle drawing interaction. + * + * @param {Object} map - control map. + * @private + */ + _activateCircleInteraction: function _activateCircleInteraction(map) { + logger.info("_activateCircleInteraction()"); + if (this._currentFeature) { + this._currentFeature.disable(); + } + var circleOptions = { + repeatMode: true + }; // TODO styles + + this._currentFeature = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Draw.Circle(map, circleOptions); + this._currentFeature.enable(); + }, + /** + * TODO this method is called by this._activateMapInteraction, + * and creates map box drawing interaction. + * + * @param {Object} map - control map. + * @private + */ + _activateBoxInteraction: function _activateBoxInteraction(map) { + logger.info("_activateBoxInteraction()"); + if (this._currentFeature) { + this._currentFeature.disable(); + } + var rectangleOptions = { + repeatMode: true + }; // TODO styles + + this._currentFeature = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Draw.Rectangle(map, rectangleOptions); + this._currentFeature.enable(); + }, + /** + * set current position of feature + * + * @param {Object} layer - layer + * @param {String} type - type + * + * @private + */ + _setFeaturePosition: function _setFeaturePosition(layer, type) { + // on transmet toujours des coordonnées au service en EPSG:4326 + var oLatLng = null; + if (type === "marker") { + oLatLng = layer.getLatLng(); + this._requestGeom = { + type: "Point", + coordinates: [oLatLng.lng, oLatLng.lat] + }; + } else if (type === "circle") { + oLatLng = layer.getLatLng(); + this._requestGeom = { + type: "Circle", + coordinates: [oLatLng.lng, oLatLng.lat], + radius: layer.getRadius() + }; + } else if (type === "rectangle") { + oLatLng = layer.getBounds(); + this._requestGeom = { + type: "Polygon", + coordinates: [[[oLatLng.getNorthWest().lng, oLatLng.getNorthWest().lat], [oLatLng.getNorthEast().lng, oLatLng.getNorthEast().lat], [oLatLng.getSouthEast().lng, oLatLng.getSouthEast().lat], [oLatLng.getSouthWest().lng, oLatLng.getSouthWest().lat], [oLatLng.getNorthWest().lng, oLatLng.getNorthWest().lat]]] + }; + } else { + logger.warn("type geometric not defined !?"); + } + logger.log(oLatLng); + }, + /** + * set current layer of feature + * + * @param {Object} layer - layer + * + * @private + */ + _setFeatureLayer: function _setFeatureLayer(layer) { + if (!this._inputFeaturesLayer) { + return; + } + this._inputFeaturesLayer.addLayer(layer); + }, + /** + * remove layer feature from group + * @param {Integer} id - id + * + * @private + */ + _removeFeatureLayer: function _removeFeatureLayer(id) { + if (!this._inputFeaturesLayer) { + return; + } + if (id === 0) { + return; + } + if (!id) { + this._inputFeaturesLayer.clearLayers(); + } else { + this._inputFeaturesLayer.removeLayer(id); + } + }, + // ################################################################### // + // ##################### Reverse Geocoding request ################### // + // ################################################################### // + + /** + * this methode is called by this.onReverseGeocodingSubmit method, + * it generates and sends reverse geocode request, then displays results + * @param {Object} settings - settings + * + * @private + */ + _reverseGeocodingRequest: function _reverseGeocodingRequest(settings) { + // retrait de l'interaction sur la map pendant l'attente (et l'affichage des résultats) + var map = this._map; + this._removeMapInteraction(map); + + // on construit les options pour la requête + var options = {}; + // on surcharge avec les options utilisateur + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.reverseGeocodeOptions); + // la recherche et les callbacks + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, settings); + // options par defaut + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + apiKey: this.options.apiKey, + // maximumResponses : 25, // on peut la surcharger ! + timeOut: 30000, + protocol: "XHR" + }); + + // on récupère d'éventuels filtres + if (this._requestGeom.type.toLowerCase() === "circle") { + // FIXME : a confirmer ! + if (this._requestGeom.radius > 1000) { + logger.log("INFO : initial circle radius (" + this._requestGeom.radius + ") limited to 1000m."); + this._requestGeom.radius = 1000; + } + options.searchGeometry = this._requestGeom; + } else if (this._requestGeom.type.toLowerCase() === "polygon") { + options.searchGeometry = this._requestGeom; + } else if (this._requestGeom.type.toLowerCase() === "point") { + if (this._currentGeocodingType === "StreetAddress") { + options.searchGeometry = { + type: "Circle", + radius: 50, + coordinates: this._requestGeom.coordinates + }; + options.maximumResponses = 1; + } else { + options.searchGeometry = this._requestGeom; + } + } + logger.log("reverseGeocode request options : ", options); + + // affichage d'une patience pendant l'attente + this._displayWaitingContainer(); + + // envoi de la requête + geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__["default"].Services.reverseGeocode(options); + }, + // ################################################################### // + // ############################# results list ######################## // + // ################################################################### // + + /** + * this method is called by this._reverseGeocodingRequest() (in case of reverse geocode success) + * and display results : in both container list and map + * + * @param {Array} locations - array of geocoded locations (reverse geocode results) + * @private + */ + _displayGeocodedLocations: function _displayGeocodedLocations(locations) { + var map = this._map; + + // 1. on vide les résultats précédents + this._clearLocations(); + this._clearLocationsFeature(map); + this._reverseGeocodingLocations = locations; + if (!locations || locations.length === 0) { + this._clearInputRequest(); // FIXME pas sûr que se soit le bon endroit... + return; + } + + // 2. cache de la patience et du formulaire + this._formContainer.className = "GPreverseGeocodingComponentHidden"; + this._hideWaitingContainer(); + + // affichage de la div des résultats (et changement du titre) + this._panelTitleContainer.innerHTML = "Résultats de la recherche"; + this._returnPictoContainer.className = ""; + this._resultsContainer.className = "GPpanel"; + + // 3. ajout de la liste des résultats dans le container des resultats + this._fillGeocodedLocationListContainer(locations); + + // 4. affichage des résultats sur la carte (+ zoom ?) + this._displayGeocodedLocationsOnMap(locations); + + // on zoom sur l'emprise des markers + map.fitBounds(this._inputResultsLayer.getBounds()); + }, + /** + * this method is called by this._displayGeocodedLocations() + * and fills the container with results list + * + * @param {Array} locations - array of geocoded locations (reverse geocode results) + * @private + */ + _fillGeocodedLocationListContainer: function _fillGeocodedLocationListContainer(locations) { + // ajout de la liste des résultats dans le container des resultats + for (var i = 0; i < locations.length; i++) { + var location = locations[i]; + logger.log(location); + // on récupère la description à afficher dans la liste + var locationDescription = this._fillGeocodedLocationDescription(location); + // on ajoute chaque résutat à la liste + if (locationDescription.length !== 0) { + this._createReverseGeocodingResultElement(locationDescription, i); + } + } + }, + /** + * this method is called by this._fillGeocodedLocationListContainer() + * and fills location description (String), depending on matchType + * + * @param {Object} location - geocoded location (from reverse geocode results) + * @returns {String} locationDescription - geocoded location description to be displayed + * @private + */ + _fillGeocodedLocationDescription: function _fillGeocodedLocationDescription(location) { + if (!location || !location.placeAttributes) { + return; + } + var attr = location.placeAttributes; + var locationDescription = ""; + // on sélectionne les infos à afficher selon le type + switch (location.type) { + case "StreetAddress": + if (attr.street) { + locationDescription += attr.housenumber ? attr.housenumber + " " : ""; + locationDescription += attr.street + ", "; + } + locationDescription += attr.postcode + " " + attr.city; + break; + case "PositionOfInterest": + locationDescription += attr.toponym; + if (attr.postcode.length === 1) { + locationDescription += ", " + attr.postcode[0]; + } + locationDescription += " (" + attr.category.join(",") + ")"; + break; + case "CadastralParcel": + locationDescription += attr.id; + locationDescription += attr.city ? " (" + attr.city + ")" : ""; + break; + default: + locationDescription += attr.city ? attr.city : ""; + break; + } + ; + return locationDescription; + }, + // ################################################################### // + // ######################## map results (markers) #################### // + // ################################################################### // + + /** + * this method is called by this._displayGeocodedLocations() + * and display locations in map (markers) + * + * @param {Object} locations - geocoded locations (reverse geocode result) + * @private + */ + _displayGeocodedLocationsOnMap: function _displayGeocodedLocationsOnMap(locations) { + var map = this._map; + var self = this; + + // function set style Highlight for results + function _setHighLight(e) { + var layer = e.target; + layer.setIcon(new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_5__["default"]("red")); + var div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("ReverseGeocodedLocation_" + layer.options.id + "-" + self._uid); + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.addClass(div, "GPreverseGeocodedLocationHighlight"); + div.scrollIntoView(false); + } + + // function reset style Highlight for results + function _resetHighLight(e) { + var layer = e.target; + layer.setIcon(new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_5__["default"]("green")); + var div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("ReverseGeocodedLocation_" + layer.options.id + "-" + self._uid); + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.removeClass(div, "GPreverseGeocodedLocationHighlight"); + } + + // création de la couche où seront ajoutés les résultats + this._inputResultsLayer = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.FeatureGroup(); + map.addLayer(this._inputResultsLayer); + + // ajout de chaque résultat à la couche (marker) + for (var i = 0; i < locations.length; i++) { + var location = locations[i]; + if (!location) { + continue; + } + var options = { + id: i, + icon: new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_5__["default"]("green"), + riseOnHover: true, + draggable: false, + clickable: true, + zIndexOffset: 1000, + data: location + }; + var _marker = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.marker(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(location.position), options); + + // creation du contenu de la popup + var popupContent = "
      "; + var attributes = location.placeAttributes; + for (var attr in attributes) { + if (attributes.hasOwnProperty(attr)) { + if (attr !== "trueGeometry" && attr !== "extraFields" && attr !== "houseNumberInfos" && attr !== "_count") { + popupContent += "
    • "; + popupContent += "" + attr.toUpperCase() + " : "; + popupContent += attributes[attr]; + popupContent += "
    • "; + } + } + } + popupContent += "
    "; + _marker.bindPopup(popupContent); + + /** evenement mouseover sur le marker */ + _marker.on("mouseover", _setHighLight); + + /** evenement mouseout sur le marker */ + _marker.on("mouseout", _resetHighLight); + _marker.on("click", function (e) { + /** + * event triggered when an element of the results is clicked for geocoding + * + * @event reverse:onclickresult + */ + self.fire("reverse:onclickresult", { + data: e.target.options.data + }); + }); + this._inputResultsLayer.addLayer(_marker); + } + }, + // ################################################################### // + // ####################### handlers events to dom #################### // + // ################################################################### // + + /** + * this method is called by event 'click' on 'GPshowReverseGeocodingPicto' tag label + * (cf. ReverseGeocodingDOM._createShowReverseGeocodingPictoElement), and it cleans the component + * when it's closed. + * + * @private + */ + onShowReverseGeocodingClick: function onShowReverseGeocodingClick() { + var map = this._map; + + // interactions declenchées à l'ouverture/fermeture du panneau + if (this._showReverseGeocodingContainer.checked) { + this._removeMapInteraction(map); + } else { + if (!this._waiting && !this._reverseGeocodingLocations.length) { + this._activateMapInteraction(map); + } + } + }, + /** + * this method is called by event 'change' on 'GPreverseGeocodingCode' tag select + * (cf. ReverseGeocodingDOM._createReverseGeocodingFormModeChoiceGeocodingTypeElement). + * this value is saved as a parameter for reverseGeocode service. + * + * @param {Object} e - HTMLElement + * @private + */ + onReverseGeocodingTypeChange: function onReverseGeocodingTypeChange(e) { + var idx = e.target.selectedIndex; + var value = e.target.options[idx].value; + if (!value) { + return; + } + logger.log(value); + this._currentGeocodingType = value; + }, + /** + * this method is called by event 'change' on 'GPreverseGeocodingCode' tag select + * (cf. ReverseGeocodingDOM._createReverseGeocodingFormModeChoiceGeocodingDelimitationElement). + * this value is saved as a parameter for reverseGeocode service. + * + * @param {Object} e - HTMLElement + * @private + */ + onReverseGeocodingDelimitationChange: function onReverseGeocodingDelimitationChange(e) { + var idx = e.target.selectedIndex; + var value = e.target.options[idx].value; + if (!value) { + return; + } + logger.log(value); + this._currentGeocodingDelimitation = value; + + // on supprime l'interaction précédente, + // ainsi que les géométries et valeurs stockées (filtres, position) + this._clearInputRequest(); + + // on met à jour l'interaction de la map en fonction de la nouvelle délimitation + var map = this._map; + + // on supprime l'éventuelle précédente interaction + this._removeMapInteraction(map); + // on crée une nouvelle interaction + this._activateMapInteraction(map); + }, + /** + * TODO this method is called by event 'click' on 'GPreverseGeocodingReturnPicto' div + * (cf. ReverseGeocodingDOM._createReverseGeocodingPanelReturnPictoElement), + * and clear geocoded location (from both list container and map) + * + * @private + */ + onGPreverseGeocodingReturnPictoClick: function onGPreverseGeocodingReturnPictoClick() { + var map = this._map; + + // suppression des résultats précédents + this._clearLocations(); + this._clearLocationsFeature(map); + + // on efface les points qui ont pu être saisis précédemment + this._clearInputRequest(); + + // et on réactive l'interaction sur la map + this._activateMapInteraction(map); + }, + /** + * TODO this methode is called by event 'submit' on reverseGeocoding form ('GPreverseGeocodingForm') + * (cf. ReverseGeocodingDOM._createReverseGeocodingPanelFormElement), + * it checks reverse geocode mandatory parameters, + * then call this._reverseGeocodingRequest() to generate and send request + * + * @private + */ + onReverseGeocodingSubmit: function onReverseGeocodingSubmit() { + // le paramètre position est obligatoire + if (!this._requestGeom) { + logger.log("missing search geometry"); + return; + } + var map = this._map; + var self = this; + this._reverseGeocodingRequest({ + index: self._currentGeocodingType, + // callback onSuccess + onSuccess: function onSuccess(results) { + logger.log(results); + if (results) { + var locations = results.locations; + self._displayGeocodedLocations(locations); + self._hideWaitingContainer(); + + // et on réactive l'interaction sur la map + if (locations.length === 0) self._activateMapInteraction(map); + } + }, + // callback onFailure + onFailure: function onFailure(error) { + self._hideWaitingContainer(); + + // suppression d'éventuels résultats précédents + self._clearLocations(); + self._clearLocationsFeature(map); + + // on efface les points qui ont été saisis précédemment + self._clearInputRequest(); + + // et on réactive l'interaction sur la map + self._activateMapInteraction(map); + logger.log(error.message); + } + }); + }, + /** + * TODO this method is called by event 'click' on 'ReverseGeocodedLocation_' div + * (cf. ReverseGeocodingDOM._createReverseGeocodingResultElement), + * and zoom to location ? + * TODO + * + * @param {Object} e - HTMLElement + * @private + */ + onReverseGeocodingResultClick: function onReverseGeocodingResultClick(e) { + // récupération de l'id du résultat survolé + var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__["default"].index(e.target.id); + if (!this._inputResultsLayer) { + return; + } + this._inputResultsLayer.eachLayer(function (layer) { + if (layer.options.id === parseInt(idx, 10)) { + layer.fire("click"); + } + }); + }, + /** + * TODO this method is called by event 'mouseover' on 'ReverseGeocodedLocation_' div + * (cf. ReverseGeocodingDOM._createReverseGeocodingResultElement), + * and changes style of matching marker on map (selected) + * + * @param {Object} e - HTMLElement + * @private + */ + onReverseGeocodingResultMouseOver: function onReverseGeocodingResultMouseOver(e) { + // récupération de l'id du résultat survolé + var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__["default"].index(e.target.id); + + // on passe le texte en gras + if (e.target.classList) { + e.target.classList.add("GPreverseGeocodedLocationHighlight"); + } + if (!this._inputResultsLayer) { + return; + } + this._inputResultsLayer.eachLayer(function (layer) { + if (layer.options.id === parseInt(idx, 10)) { + layer.fire("mouseover"); + } + }); + }, + /** + * TODO this method is called by event 'mouseout' on 'ReverseGeocodedLocation_' div + * (cf. ReverseGeocodingDOM._createReverseGeocodingResultElement), + * and changes style of matching marker on map (default) + * + * @param {Object} e - HTMLElement + * @private + */ + onReverseGeocodingResultMouseOut: function onReverseGeocodingResultMouseOut(e) { + // récupération de l'id du résultat survolé + var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__["default"].index(e.target.id); + + // on repasse le texte en style normal + if (e.target.classList) { + e.target.classList.remove("GPreverseGeocodedLocationHighlight"); + } + if (!this._inputResultsLayer) { + return; + } + this._inputResultsLayer.eachLayer(function (layer) { + if (layer.options.id === parseInt(idx, 10)) { + layer.fire("mouseout"); + } + }); + }, + // ################################################################### // + // ################################ clean ############################ // + // ################################################################### // + + /** + * TODO this method clears previous location results + * + * @private + */ + _clearLocations: function _clearLocations() { + this._reverseGeocodingLocations = []; + // on vide le container avec la liste des résultats + if (this._resultsListContainer) { + while (this._resultsListContainer.firstChild) { + this._resultsListContainer.removeChild(this._resultsListContainer.firstChild); + } + } + }, + /** + * TODO this method clears previous location results marker + * @param {Object} map - the map + * + * @private + */ + _clearLocationsFeature: function _clearLocationsFeature(map) { + // suppression des anciens resultats + if (this._inputResultsLayer !== null) { + map.removeLayer(this._inputResultsLayer); + this._inputResultsLayer = null; + } + }, + /** + * TODO this method clears previous input features (features, position and filters) + * + * @private + */ + _clearInputRequest: function _clearInputRequest() { + // on supprime les valeurs stockées (filtres, position) + this._requestPosition = null; + this._requestCircleFilter = null; + this._requestBboxFilter = null; + }, + // ################################################################### // + // ############################ Patience ############################# // + // ################################################################### // + + /** + * this method displays waiting container and sets a timeout + * + * @private + */ + _displayWaitingContainer: function _displayWaitingContainer() { + this._waitingContainer.className = "GPreverseGeocodingCalcWaitingContainerVisible"; + this._waiting = true; + + // mise en place d'un timeout pour réinitialiser le panel (cacher la patience) + // si on est toujours en attente (si la requête est bloquée par exemple) + if (this._timer) { + clearTimeout(this._timer); + this._timer = null; + } + var context = this; + this._timer = setTimeout(function () { + if (context._waiting === true) { + context._hideWaitingContainer(); + } else { + if (context._timer) { + clearTimeout(context._timer); + } + } + }, 16000); + }, + /** + * this method hides waiting container and clears timeout + * + * @private + */ + _hideWaitingContainer: function _hideWaitingContainer() { + if (this._waiting) { + this._waitingContainer.className = "GPreverseGeocodingCalcWaitingContainerHidden"; + this._waiting = false; + clearTimeout(this._timer); + this._timer = null; + } + } +}); + +/** mix in L.Evented into control */ +leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.extend(ReverseGeocoding.prototype, leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Evented.prototype); +/* harmony default export */ __webpack_exports__["default"] = (ReverseGeocoding); + +/***/ }), +/* 117 */ +/***/ (function(module, exports) { + +/* + Leaflet.draw 1.0.4, a plugin that adds drawing and editing tools to Leaflet powered maps. + (c) 2012-2017, Jacob Toye, Jon West, Smartrak, Leaflet + + https://github.com/Leaflet/Leaflet.draw + http://leafletjs.com + */ +(function (window, document, undefined) {/** + * Leaflet.draw assumes that you have already included the Leaflet library. + */ +L.drawVersion = "1.0.4"; +/** + * @class L.Draw + * @aka Draw + * + * + * To add the draw toolbar set the option drawControl: true in the map options. + * + * @example + * ```js + * var map = L.map('map', {drawControl: true}).setView([51.505, -0.09], 13); + * + * L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { + * attribution: '© OpenStreetMap contributors' + * }).addTo(map); + * ``` + * + * ### Adding the edit toolbar + * To use the edit toolbar you must initialise the Leaflet.draw control and manually add it to the map. + * + * ```js + * var map = L.map('map').setView([51.505, -0.09], 13); + * + * L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { + * attribution: '© OpenStreetMap contributors' + * }).addTo(map); + * + * // FeatureGroup is to store editable layers + * var drawnItems = new L.FeatureGroup(); + * map.addLayer(drawnItems); + * + * var drawControl = new L.Control.Draw({ + * edit: { + * featureGroup: drawnItems + * } + * }); + * map.addControl(drawControl); + * ``` + * + * The key here is the featureGroup option. This tells the plugin which FeatureGroup contains the layers that + * should be editable. The featureGroup can contain 0 or more features with geometry types Point, LineString, and Polygon. + * Leaflet.draw does not work with multigeometry features such as MultiPoint, MultiLineString, MultiPolygon, + * or GeometryCollection. If you need to add multigeometry features to the draw plugin, convert them to a + * FeatureCollection of non-multigeometries (Points, LineStrings, or Polygons). + */ +L.Draw = {}; + +/** + * @class L.drawLocal + * @aka L.drawLocal + * + * The core toolbar class of the API — it is used to create the toolbar ui + * + * @example + * ```js + * var modifiedDraw = L.drawLocal.extend({ + * draw: { + * toolbar: { + * buttons: { + * polygon: 'Draw an awesome polygon' + * } + * } + * } + * }); + * ``` + * + * The default state for the control is the draw toolbar just below the zoom control. + * This will allow map users to draw vectors and markers. + * **Please note the edit toolbar is not enabled by default.** + */ +L.drawLocal = { + // format: { + // numeric: { + // delimiters: { + // thousands: ',', + // decimal: '.' + // } + // } + // }, + draw: { + toolbar: { + // #TODO: this should be reorganized where actions are nested in actions + // ex: actions.undo or actions.cancel + actions: { + title: 'Cancel drawing', + text: 'Cancel' + }, + finish: { + title: 'Finish drawing', + text: 'Finish' + }, + undo: { + title: 'Delete last point drawn', + text: 'Delete last point' + }, + buttons: { + polyline: 'Draw a polyline', + polygon: 'Draw a polygon', + rectangle: 'Draw a rectangle', + circle: 'Draw a circle', + marker: 'Draw a marker', + circlemarker: 'Draw a circlemarker' + } + }, + handlers: { + circle: { + tooltip: { + start: 'Click and drag to draw circle.' + }, + radius: 'Radius' + }, + circlemarker: { + tooltip: { + start: 'Click map to place circle marker.' + } + }, + marker: { + tooltip: { + start: 'Click map to place marker.' + } + }, + polygon: { + tooltip: { + start: 'Click to start drawing shape.', + cont: 'Click to continue drawing shape.', + end: 'Click first point to close this shape.' + } + }, + polyline: { + error: 'Error: shape edges cannot cross!', + tooltip: { + start: 'Click to start drawing line.', + cont: 'Click to continue drawing line.', + end: 'Click last point to finish line.' + } + }, + rectangle: { + tooltip: { + start: 'Click and drag to draw rectangle.' + } + }, + simpleshape: { + tooltip: { + end: 'Release mouse to finish drawing.' + } + } + } + }, + edit: { + toolbar: { + actions: { + save: { + title: 'Save changes', + text: 'Save' + }, + cancel: { + title: 'Cancel editing, discards all changes', + text: 'Cancel' + }, + clearAll: { + title: 'Clear all layers', + text: 'Clear All' + } + }, + buttons: { + edit: 'Edit layers', + editDisabled: 'No layers to edit', + remove: 'Delete layers', + removeDisabled: 'No layers to delete' + } + }, + handlers: { + edit: { + tooltip: { + text: 'Drag handles or markers to edit features.', + subtext: 'Click cancel to undo changes.' + } + }, + remove: { + tooltip: { + text: 'Click on a feature to remove.' + } + } + } + } +}; + + + +/** + * ### Events + * Once you have successfully added the Leaflet.draw plugin to your map you will want to respond to the different + * actions users can initiate. The following events will be triggered on the map: + * + * @class L.Draw.Event + * @aka Draw.Event + * + * Use `L.Draw.Event.EVENTNAME` constants to ensure events are correct. + * + * @example + * ```js + * map.on(L.Draw.Event.CREATED; function (e) { + * var type = e.layerType, + * layer = e.layer; + * + * if (type === 'marker') { + * // Do marker specific actions + * } + * + * // Do whatever else you need to. (save to db; add to map etc) + * map.addLayer(layer); + *}); + * ``` + */ +L.Draw.Event = {}; +/** + * @event draw:created: PolyLine; Polygon; Rectangle; Circle; Marker | String + * + * Layer that was just created. + * The type of layer this is. One of: `polyline`; `polygon`; `rectangle`; `circle`; `marker` + * Triggered when a new vector or marker has been created. + * + */ +L.Draw.Event.CREATED = 'draw:created'; + +/** + * @event draw:edited: LayerGroup + * + * List of all layers just edited on the map. + * + * + * Triggered when layers in the FeatureGroup; initialised with the plugin; have been edited and saved. + * + * @example + * ```js + * map.on('draw:edited', function (e) { + * var layers = e.layers; + * layers.eachLayer(function (layer) { + * //do whatever you want; most likely save back to db + * }); + * }); + * ``` + */ +L.Draw.Event.EDITED = 'draw:edited'; + +/** + * @event draw:deleted: LayerGroup + * + * List of all layers just removed from the map. + * + * Triggered when layers have been removed (and saved) from the FeatureGroup. + */ +L.Draw.Event.DELETED = 'draw:deleted'; + +/** + * @event draw:drawstart: String + * + * The type of layer this is. One of:`polyline`; `polygon`; `rectangle`; `circle`; `marker` + * + * Triggered when the user has chosen to draw a particular vector or marker. + */ +L.Draw.Event.DRAWSTART = 'draw:drawstart'; + +/** + * @event draw:drawstop: String + * + * The type of layer this is. One of: `polyline`; `polygon`; `rectangle`; `circle`; `marker` + * + * Triggered when the user has finished a particular vector or marker. + */ + +L.Draw.Event.DRAWSTOP = 'draw:drawstop'; + +/** + * @event draw:drawvertex: LayerGroup + * + * List of all layers just being added from the map. + * + * Triggered when a vertex is created on a polyline or polygon. + */ +L.Draw.Event.DRAWVERTEX = 'draw:drawvertex'; + +/** + * @event draw:editstart: String + * + * The type of edit this is. One of: `edit` + * + * Triggered when the user starts edit mode by clicking the edit tool button. + */ + +L.Draw.Event.EDITSTART = 'draw:editstart'; + +/** + * @event draw:editmove: ILayer + * + * Layer that was just moved. + * + * Triggered as the user moves a rectangle; circle or marker. + */ +L.Draw.Event.EDITMOVE = 'draw:editmove'; + +/** + * @event draw:editresize: ILayer + * + * Layer that was just moved. + * + * Triggered as the user resizes a rectangle or circle. + */ +L.Draw.Event.EDITRESIZE = 'draw:editresize'; + +/** + * @event draw:editvertex: LayerGroup + * + * List of all layers just being edited from the map. + * + * Triggered when a vertex is edited on a polyline or polygon. + */ +L.Draw.Event.EDITVERTEX = 'draw:editvertex'; + +/** + * @event draw:editstop: String + * + * The type of edit this is. One of: `edit` + * + * Triggered when the user has finshed editing (edit mode) and saves edits. + */ +L.Draw.Event.EDITSTOP = 'draw:editstop'; + +/** + * @event draw:deletestart: String + * + * The type of edit this is. One of: `remove` + * + * Triggered when the user starts remove mode by clicking the remove tool button. + */ +L.Draw.Event.DELETESTART = 'draw:deletestart'; + +/** + * @event draw:deletestop: String + * + * The type of edit this is. One of: `remove` + * + * Triggered when the user has finished removing shapes (remove mode) and saves. + */ +L.Draw.Event.DELETESTOP = 'draw:deletestop'; + +/** + * @event draw:toolbaropened: String + * + * Triggered when a toolbar is opened. + */ +L.Draw.Event.TOOLBAROPENED = 'draw:toolbaropened'; + +/** + * @event draw:toolbarclosed: String + * + * Triggered when a toolbar is closed. + */ +L.Draw.Event.TOOLBARCLOSED = 'draw:toolbarclosed'; + +/** + * @event draw:markercontext: String + * + * Triggered when a marker is right clicked. + */ +L.Draw.Event.MARKERCONTEXT = 'draw:markercontext'; + + +L.Draw = L.Draw || {}; + +/** + * @class L.Draw.Feature + * @aka Draw.Feature + */ +L.Draw.Feature = L.Handler.extend({ + + // @method initialize(): void + initialize: function (map, options) { + this._map = map; + this._container = map._container; + this._overlayPane = map._panes.overlayPane; + this._popupPane = map._panes.popupPane; + + // Merge default shapeOptions options with custom shapeOptions + if (options && options.shapeOptions) { + options.shapeOptions = L.Util.extend({}, this.options.shapeOptions, options.shapeOptions); + } + L.setOptions(this, options); + + var version = L.version.split('.'); + //If Version is >= 1.2.0 + if (parseInt(version[0], 10) === 1 && parseInt(version[1], 10) >= 2) { + L.Draw.Feature.include(L.Evented.prototype); + } else { + L.Draw.Feature.include(L.Mixin.Events); + } + }, + + // @method enable(): void + // Enables this handler + enable: function () { + if (this._enabled) { + return; + } + + L.Handler.prototype.enable.call(this); + + this.fire('enabled', {handler: this.type}); + + this._map.fire(L.Draw.Event.DRAWSTART, {layerType: this.type}); + }, + + // @method disable(): void + disable: function () { + if (!this._enabled) { + return; + } + + L.Handler.prototype.disable.call(this); + + this._map.fire(L.Draw.Event.DRAWSTOP, {layerType: this.type}); + + this.fire('disabled', {handler: this.type}); + }, + + // @method addHooks(): void + // Add's event listeners to this handler + addHooks: function () { + var map = this._map; + + if (map) { + L.DomUtil.disableTextSelection(); + + map.getContainer().focus(); + + this._tooltip = new L.Draw.Tooltip(this._map); + + L.DomEvent.on(this._container, 'keyup', this._cancelDrawing, this); + } + }, + + // @method removeHooks(): void + // Removes event listeners from this handler + removeHooks: function () { + if (this._map) { + L.DomUtil.enableTextSelection(); + + this._tooltip.dispose(); + this._tooltip = null; + + L.DomEvent.off(this._container, 'keyup', this._cancelDrawing, this); + } + }, + + // @method setOptions(object): void + // Sets new options to this handler + setOptions: function (options) { + L.setOptions(this, options); + }, + + _fireCreatedEvent: function (layer) { + this._map.fire(L.Draw.Event.CREATED, {layer: layer, layerType: this.type}); + }, + + // Cancel drawing when the escape key is pressed + _cancelDrawing: function (e) { + if (e.keyCode === 27) { + this._map.fire('draw:canceled', {layerType: this.type}); + this.disable(); + } + } +}); + + + +/** + * @class L.Draw.Polyline + * @aka Draw.Polyline + * @inherits L.Draw.Feature + */ +L.Draw.Polyline = L.Draw.Feature.extend({ + statics: { + TYPE: 'polyline' + }, + + Poly: L.Polyline, + + options: { + allowIntersection: true, + repeatMode: false, + drawError: { + color: '#b00b00', + timeout: 2500 + }, + icon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon' + }), + touchIcon: new L.DivIcon({ + iconSize: new L.Point(20, 20), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-touch-icon' + }), + guidelineDistance: 20, + maxGuideLineLength: 4000, + shapeOptions: { + stroke: true, + color: '#3388ff', + weight: 4, + opacity: 0.5, + fill: false, + clickable: true + }, + metric: true, // Whether to use the metric measurement system or imperial + feet: true, // When not metric, to use feet instead of yards for display. + nautic: false, // When not metric, not feet use nautic mile for display + showLength: true, // Whether to display distance in the tooltip + zIndexOffset: 2000, // This should be > than the highest z-index any map layers + factor: 1, // To change distance calculation + maxPoints: 0 // Once this number of points are placed, finish shape + }, + + // @method initialize(): void + initialize: function (map, options) { + // if touch, switch to touch icon + if (L.Browser.touch) { + this.options.icon = this.options.touchIcon; + } + + // Need to set this here to ensure the correct message is used. + this.options.drawError.message = L.drawLocal.draw.handlers.polyline.error; + + // Merge default drawError options with custom options + if (options && options.drawError) { + options.drawError = L.Util.extend({}, this.options.drawError, options.drawError); + } + + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Polyline.TYPE; + + L.Draw.Feature.prototype.initialize.call(this, map, options); + }, + + // @method addHooks(): void + // Add listener hooks to this handler + addHooks: function () { + L.Draw.Feature.prototype.addHooks.call(this); + if (this._map) { + this._markers = []; + + this._markerGroup = new L.LayerGroup(); + this._map.addLayer(this._markerGroup); + + this._poly = new L.Polyline([], this.options.shapeOptions); + + this._tooltip.updateContent(this._getTooltipText()); + + // Make a transparent marker that will used to catch click events. These click + // events will create the vertices. We need to do this so we can ensure that + // we can create vertices over other map layers (markers, vector layers). We + // also do not want to trigger any click handlers of objects we are clicking on + // while drawing. + if (!this._mouseMarker) { + this._mouseMarker = L.marker(this._map.getCenter(), { + icon: L.divIcon({ + className: 'leaflet-mouse-marker', + iconAnchor: [20, 20], + iconSize: [40, 40] + }), + opacity: 0, + zIndexOffset: this.options.zIndexOffset + }); + } + + this._mouseMarker + .on('mouseout', this._onMouseOut, this) + .on('mousemove', this._onMouseMove, this) // Necessary to prevent 0.8 stutter + .on('mousedown', this._onMouseDown, this) + .on('mouseup', this._onMouseUp, this) // Necessary for 0.8 compatibility + .addTo(this._map); + + this._map + .on('mouseup', this._onMouseUp, this) // Necessary for 0.7 compatibility + .on('mousemove', this._onMouseMove, this) + .on('zoomlevelschange', this._onZoomEnd, this) + .on('touchstart', this._onTouch, this) + .on('zoomend', this._onZoomEnd, this); + + } + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler. + removeHooks: function () { + L.Draw.Feature.prototype.removeHooks.call(this); + + this._clearHideErrorTimeout(); + + this._cleanUpShape(); + + // remove markers from map + this._map.removeLayer(this._markerGroup); + delete this._markerGroup; + delete this._markers; + + this._map.removeLayer(this._poly); + delete this._poly; + + this._mouseMarker + .off('mousedown', this._onMouseDown, this) + .off('mouseout', this._onMouseOut, this) + .off('mouseup', this._onMouseUp, this) + .off('mousemove', this._onMouseMove, this); + this._map.removeLayer(this._mouseMarker); + delete this._mouseMarker; + + // clean up DOM + this._clearGuides(); + + this._map + .off('mouseup', this._onMouseUp, this) + .off('mousemove', this._onMouseMove, this) + .off('zoomlevelschange', this._onZoomEnd, this) + .off('zoomend', this._onZoomEnd, this) + .off('touchstart', this._onTouch, this) + .off('click', this._onTouch, this); + }, + + // @method deleteLastVertex(): void + // Remove the last vertex from the polyline, removes polyline from map if only one point exists. + deleteLastVertex: function () { + if (this._markers.length <= 1) { + return; + } + + var lastMarker = this._markers.pop(), + poly = this._poly, + // Replaces .spliceLatLngs() + latlngs = poly.getLatLngs(), + latlng = latlngs.splice(-1, 1)[0]; + this._poly.setLatLngs(latlngs); + + this._markerGroup.removeLayer(lastMarker); + + if (poly.getLatLngs().length < 2) { + this._map.removeLayer(poly); + } + + this._vertexChanged(latlng, false); + }, + + // @method addVertex(): void + // Add a vertex to the end of the polyline + addVertex: function (latlng) { + var markersLength = this._markers.length; + // markersLength must be greater than or equal to 2 before intersections can occur + if (markersLength >= 2 && !this.options.allowIntersection && this._poly.newLatLngIntersects(latlng)) { + this._showErrorTooltip(); + return; + } + else if (this._errorShown) { + this._hideErrorTooltip(); + } + + this._markers.push(this._createMarker(latlng)); + + this._poly.addLatLng(latlng); + + if (this._poly.getLatLngs().length === 2) { + this._map.addLayer(this._poly); + } + + this._vertexChanged(latlng, true); + }, + + // @method completeShape(): void + // Closes the polyline between the first and last points + completeShape: function () { + if (this._markers.length <= 1 || !this._shapeIsValid()) { + return; + } + + this._fireCreatedEvent(); + this.disable(); + + if (this.options.repeatMode) { + this.enable(); + } + }, + + _finishShape: function () { + var latlngs = this._poly._defaultShape ? this._poly._defaultShape() : this._poly.getLatLngs(); + var intersects = this._poly.newLatLngIntersects(latlngs[latlngs.length - 1]); + + if ((!this.options.allowIntersection && intersects) || !this._shapeIsValid()) { + this._showErrorTooltip(); + return; + } + + this._fireCreatedEvent(); + this.disable(); + if (this.options.repeatMode) { + this.enable(); + } + }, + + // Called to verify the shape is valid when the user tries to finish it + // Return false if the shape is not valid + _shapeIsValid: function () { + return true; + }, + + _onZoomEnd: function () { + if (this._markers !== null) { + this._updateGuide(); + } + }, + + _onMouseMove: function (e) { + var newPos = this._map.mouseEventToLayerPoint(e.originalEvent); + var latlng = this._map.layerPointToLatLng(newPos); + + // Save latlng + // should this be moved to _updateGuide() ? + this._currentLatLng = latlng; + + this._updateTooltip(latlng); + + // Update the guide line + this._updateGuide(newPos); + + // Update the mouse marker position + this._mouseMarker.setLatLng(latlng); + + L.DomEvent.preventDefault(e.originalEvent); + }, + + _vertexChanged: function (latlng, added) { + this._map.fire(L.Draw.Event.DRAWVERTEX, {layers: this._markerGroup}); + this._updateFinishHandler(); + + this._updateRunningMeasure(latlng, added); + + this._clearGuides(); + + this._updateTooltip(); + }, + + _onMouseDown: function (e) { + if (!this._clickHandled && !this._touchHandled && !this._disableMarkers) { + this._onMouseMove(e); + this._clickHandled = true; + this._disableNewMarkers(); + var originalEvent = e.originalEvent; + var clientX = originalEvent.clientX; + var clientY = originalEvent.clientY; + this._startPoint.call(this, clientX, clientY); + } + }, + + _startPoint: function (clientX, clientY) { + this._mouseDownOrigin = L.point(clientX, clientY); + }, + + _onMouseUp: function (e) { + var originalEvent = e.originalEvent; + var clientX = originalEvent.clientX; + var clientY = originalEvent.clientY; + this._endPoint.call(this, clientX, clientY, e); + this._clickHandled = null; + }, + + _endPoint: function (clientX, clientY, e) { + if (this._mouseDownOrigin) { + var dragCheckDistance = L.point(clientX, clientY) + .distanceTo(this._mouseDownOrigin); + var lastPtDistance = this._calculateFinishDistance(e.latlng); + if (this.options.maxPoints > 1 && this.options.maxPoints == this._markers.length + 1) { + this.addVertex(e.latlng); + this._finishShape(); + } else if (lastPtDistance < 10 && L.Browser.touch) { + this._finishShape(); + } else if (Math.abs(dragCheckDistance) < 9 * (window.devicePixelRatio || 1)) { + this.addVertex(e.latlng); + } + this._enableNewMarkers(); // after a short pause, enable new markers + } + this._mouseDownOrigin = null; + }, + + // ontouch prevented by clickHandled flag because some browsers fire both click/touch events, + // causing unwanted behavior + _onTouch: function (e) { + var originalEvent = e.originalEvent; + var clientX; + var clientY; + if (originalEvent.touches && originalEvent.touches[0] && !this._clickHandled && !this._touchHandled && !this._disableMarkers) { + clientX = originalEvent.touches[0].clientX; + clientY = originalEvent.touches[0].clientY; + this._disableNewMarkers(); + this._touchHandled = true; + this._startPoint.call(this, clientX, clientY); + this._endPoint.call(this, clientX, clientY, e); + this._touchHandled = null; + } + this._clickHandled = null; + }, + + _onMouseOut: function () { + if (this._tooltip) { + this._tooltip._onMouseOut.call(this._tooltip); + } + }, + + // calculate if we are currently within close enough distance + // of the closing point (first point for shapes, last point for lines) + // this is semi-ugly code but the only reliable way i found to get the job done + // note: calculating point.distanceTo between mouseDownOrigin and last marker did NOT work + _calculateFinishDistance: function (potentialLatLng) { + var lastPtDistance; + if (this._markers.length > 0) { + var finishMarker; + if (this.type === L.Draw.Polyline.TYPE) { + finishMarker = this._markers[this._markers.length - 1]; + } else if (this.type === L.Draw.Polygon.TYPE) { + finishMarker = this._markers[0]; + } else { + return Infinity; + } + var lastMarkerPoint = this._map.latLngToContainerPoint(finishMarker.getLatLng()), + potentialMarker = new L.Marker(potentialLatLng, { + icon: this.options.icon, + zIndexOffset: this.options.zIndexOffset * 2 + }); + var potentialMarkerPint = this._map.latLngToContainerPoint(potentialMarker.getLatLng()); + lastPtDistance = lastMarkerPoint.distanceTo(potentialMarkerPint); + } else { + lastPtDistance = Infinity; + } + return lastPtDistance; + }, + + _updateFinishHandler: function () { + var markerCount = this._markers.length; + // The last marker should have a click handler to close the polyline + if (markerCount > 1) { + this._markers[markerCount - 1].on('click', this._finishShape, this); + } + + // Remove the old marker click handler (as only the last point should close the polyline) + if (markerCount > 2) { + this._markers[markerCount - 2].off('click', this._finishShape, this); + } + }, + + _createMarker: function (latlng) { + var marker = new L.Marker(latlng, { + icon: this.options.icon, + zIndexOffset: this.options.zIndexOffset * 2 + }); + + this._markerGroup.addLayer(marker); + + return marker; + }, + + _updateGuide: function (newPos) { + var markerCount = this._markers ? this._markers.length : 0; + + if (markerCount > 0) { + newPos = newPos || this._map.latLngToLayerPoint(this._currentLatLng); + + // draw the guide line + this._clearGuides(); + this._drawGuide( + this._map.latLngToLayerPoint(this._markers[markerCount - 1].getLatLng()), + newPos + ); + } + }, + + _updateTooltip: function (latLng) { + var text = this._getTooltipText(); + + if (latLng) { + this._tooltip.updatePosition(latLng); + } + + if (!this._errorShown) { + this._tooltip.updateContent(text); + } + }, + + _drawGuide: function (pointA, pointB) { + var length = Math.floor(Math.sqrt(Math.pow((pointB.x - pointA.x), 2) + Math.pow((pointB.y - pointA.y), 2))), + guidelineDistance = this.options.guidelineDistance, + maxGuideLineLength = this.options.maxGuideLineLength, + // Only draw a guideline with a max length + i = length > maxGuideLineLength ? length - maxGuideLineLength : guidelineDistance, + fraction, + dashPoint, + dash; + + //create the guides container if we haven't yet + if (!this._guidesContainer) { + this._guidesContainer = L.DomUtil.create('div', 'leaflet-draw-guides', this._overlayPane); + } + + //draw a dash every GuildeLineDistance + for (; i < length; i += this.options.guidelineDistance) { + //work out fraction along line we are + fraction = i / length; + + //calculate new x,y point + dashPoint = { + x: Math.floor((pointA.x * (1 - fraction)) + (fraction * pointB.x)), + y: Math.floor((pointA.y * (1 - fraction)) + (fraction * pointB.y)) + }; + + //add guide dash to guide container + dash = L.DomUtil.create('div', 'leaflet-draw-guide-dash', this._guidesContainer); + dash.style.backgroundColor = + !this._errorShown ? this.options.shapeOptions.color : this.options.drawError.color; + + L.DomUtil.setPosition(dash, dashPoint); + } + }, + + _updateGuideColor: function (color) { + if (this._guidesContainer) { + for (var i = 0, l = this._guidesContainer.childNodes.length; i < l; i++) { + this._guidesContainer.childNodes[i].style.backgroundColor = color; + } + } + }, + + // removes all child elements (guide dashes) from the guides container + _clearGuides: function () { + if (this._guidesContainer) { + while (this._guidesContainer.firstChild) { + this._guidesContainer.removeChild(this._guidesContainer.firstChild); + } + } + }, + + _getTooltipText: function () { + var showLength = this.options.showLength, + labelText, distanceStr; + if (this._markers.length === 0) { + labelText = { + text: L.drawLocal.draw.handlers.polyline.tooltip.start + }; + } else { + distanceStr = showLength ? this._getMeasurementString() : ''; + + if (this._markers.length === 1) { + labelText = { + text: L.drawLocal.draw.handlers.polyline.tooltip.cont, + subtext: distanceStr + }; + } else { + labelText = { + text: L.drawLocal.draw.handlers.polyline.tooltip.end, + subtext: distanceStr + }; + } + } + return labelText; + }, + + _updateRunningMeasure: function (latlng, added) { + var markersLength = this._markers.length, + previousMarkerIndex, distance; + + if (this._markers.length === 1) { + this._measurementRunningTotal = 0; + } else { + previousMarkerIndex = markersLength - (added ? 2 : 1); + + // Calculate the distance based on the version + if (L.GeometryUtil.isVersion07x()) { + distance = latlng.distanceTo(this._markers[previousMarkerIndex].getLatLng()) * (this.options.factor || 1); + } else { + distance = this._map.distance(latlng, this._markers[previousMarkerIndex].getLatLng()) * (this.options.factor || 1); + } + + this._measurementRunningTotal += distance * (added ? 1 : -1); + } + }, + + _getMeasurementString: function () { + var currentLatLng = this._currentLatLng, + previousLatLng = this._markers[this._markers.length - 1].getLatLng(), + distance; + + // Calculate the distance from the last fixed point to the mouse position based on the version + if (L.GeometryUtil.isVersion07x()) { + distance = previousLatLng && currentLatLng && currentLatLng.distanceTo ? this._measurementRunningTotal + currentLatLng.distanceTo(previousLatLng) * (this.options.factor || 1) : this._measurementRunningTotal || 0; + } else { + distance = previousLatLng && currentLatLng ? this._measurementRunningTotal + this._map.distance(currentLatLng, previousLatLng) * (this.options.factor || 1) : this._measurementRunningTotal || 0; + } + + return L.GeometryUtil.readableDistance(distance, this.options.metric, this.options.feet, this.options.nautic, this.options.precision); + }, + + _showErrorTooltip: function () { + this._errorShown = true; + + // Update tooltip + this._tooltip + .showAsError() + .updateContent({text: this.options.drawError.message}); + + // Update shape + this._updateGuideColor(this.options.drawError.color); + this._poly.setStyle({color: this.options.drawError.color}); + + // Hide the error after 2 seconds + this._clearHideErrorTimeout(); + this._hideErrorTimeout = setTimeout(L.Util.bind(this._hideErrorTooltip, this), this.options.drawError.timeout); + }, + + _hideErrorTooltip: function () { + this._errorShown = false; + + this._clearHideErrorTimeout(); + + // Revert tooltip + this._tooltip + .removeError() + .updateContent(this._getTooltipText()); + + // Revert shape + this._updateGuideColor(this.options.shapeOptions.color); + this._poly.setStyle({color: this.options.shapeOptions.color}); + }, + + _clearHideErrorTimeout: function () { + if (this._hideErrorTimeout) { + clearTimeout(this._hideErrorTimeout); + this._hideErrorTimeout = null; + } + }, + + // disable new markers temporarily; + // this is to prevent duplicated touch/click events in some browsers + _disableNewMarkers: function () { + this._disableMarkers = true; + }, + + // see _disableNewMarkers + _enableNewMarkers: function () { + setTimeout(function () { + this._disableMarkers = false; + }.bind(this), 50); + }, + + _cleanUpShape: function () { + if (this._markers.length > 1) { + this._markers[this._markers.length - 1].off('click', this._finishShape, this); + } + }, + + _fireCreatedEvent: function () { + var poly = new this.Poly(this._poly.getLatLngs(), this.options.shapeOptions); + L.Draw.Feature.prototype._fireCreatedEvent.call(this, poly); + } +}); + + + +/** + * @class L.Draw.Polygon + * @aka Draw.Polygon + * @inherits L.Draw.Polyline + */ +L.Draw.Polygon = L.Draw.Polyline.extend({ + statics: { + TYPE: 'polygon' + }, + + Poly: L.Polygon, + + options: { + showArea: false, + showLength: false, + shapeOptions: { + stroke: true, + color: '#3388ff', + weight: 4, + opacity: 0.5, + fill: true, + fillColor: null, //same as color by default + fillOpacity: 0.2, + clickable: true + }, + // Whether to use the metric measurement system (truthy) or not (falsy). + // Also defines the units to use for the metric system as an array of + // strings (e.g. `['ha', 'm']`). + metric: true, + feet: true, // When not metric, to use feet instead of yards for display. + nautic: false, // When not metric, not feet use nautic mile for display + // Defines the precision for each type of unit (e.g. {km: 2, ft: 0} + precision: {} + }, + + // @method initialize(): void + initialize: function (map, options) { + L.Draw.Polyline.prototype.initialize.call(this, map, options); + + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Polygon.TYPE; + }, + + _updateFinishHandler: function () { + var markerCount = this._markers.length; + + // The first marker should have a click handler to close the polygon + if (markerCount === 1) { + this._markers[0].on('click', this._finishShape, this); + } + + // Add and update the double click handler + if (markerCount > 2) { + this._markers[markerCount - 1].on('dblclick', this._finishShape, this); + // Only need to remove handler if has been added before + if (markerCount > 3) { + this._markers[markerCount - 2].off('dblclick', this._finishShape, this); + } + } + }, + + _getTooltipText: function () { + var text, subtext; + + if (this._markers.length === 0) { + text = L.drawLocal.draw.handlers.polygon.tooltip.start; + } else if (this._markers.length < 3) { + text = L.drawLocal.draw.handlers.polygon.tooltip.cont; + subtext = this._getMeasurementString(); + } else { + text = L.drawLocal.draw.handlers.polygon.tooltip.end; + subtext = this._getMeasurementString(); + } + + return { + text: text, + subtext: subtext + }; + }, + + _getMeasurementString: function () { + var area = this._area, + measurementString = ''; + + + if (!area && !this.options.showLength) { + return null; + } + + if (this.options.showLength) { + measurementString = L.Draw.Polyline.prototype._getMeasurementString.call(this); + } + + if (area) { + measurementString += '
    ' + L.GeometryUtil.readableArea(area, this.options.metric, this.options.precision); + } + + return measurementString; + }, + + _shapeIsValid: function () { + return this._markers.length >= 3; + }, + + _vertexChanged: function (latlng, added) { + var latLngs; + + // Check to see if we should show the area + if (!this.options.allowIntersection && this.options.showArea) { + latLngs = this._poly.getLatLngs(); + + this._area = L.GeometryUtil.geodesicArea(latLngs); + } + + L.Draw.Polyline.prototype._vertexChanged.call(this, latlng, added); + }, + + _cleanUpShape: function () { + var markerCount = this._markers.length; + + if (markerCount > 0) { + this._markers[0].off('click', this._finishShape, this); + + if (markerCount > 2) { + this._markers[markerCount - 1].off('dblclick', this._finishShape, this); + } + } + } +}); + + + +L.SimpleShape = {}; +/** + * @class L.Draw.SimpleShape + * @aka Draw.SimpleShape + * @inherits L.Draw.Feature + */ +L.Draw.SimpleShape = L.Draw.Feature.extend({ + options: { + repeatMode: false + }, + + // @method initialize(): void + initialize: function (map, options) { + this._endLabelText = L.drawLocal.draw.handlers.simpleshape.tooltip.end; + + L.Draw.Feature.prototype.initialize.call(this, map, options); + }, + + // @method addHooks(): void + // Add listener hooks to this handler. + addHooks: function () { + L.Draw.Feature.prototype.addHooks.call(this); + if (this._map) { + this._mapDraggable = this._map.dragging.enabled(); + + if (this._mapDraggable) { + this._map.dragging.disable(); + } + + //TODO refactor: move cursor to styles + this._container.style.cursor = 'crosshair'; + + this._tooltip.updateContent({text: this._initialLabelText}); + + this._map + .on('mousedown', this._onMouseDown, this) + .on('mousemove', this._onMouseMove, this) + .on('touchstart', this._onMouseDown, this) + .on('touchmove', this._onMouseMove, this); + + // we should prevent default, otherwise default behavior (scrolling) will fire, + // and that will cause document.touchend to fire and will stop the drawing + // (circle, rectangle) in touch mode. + // (update): we have to send passive now to prevent scroll, because by default it is {passive: true} now, which means, + // handler can't event.preventDefault + // check the news https://developers.google.com/web/updates/2016/06/passive-event-listeners + document.addEventListener('touchstart', L.DomEvent.preventDefault, {passive: false}); + } + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler. + removeHooks: function () { + L.Draw.Feature.prototype.removeHooks.call(this); + if (this._map) { + if (this._mapDraggable) { + this._map.dragging.enable(); + } + + //TODO refactor: move cursor to styles + this._container.style.cursor = ''; + + this._map + .off('mousedown', this._onMouseDown, this) + .off('mousemove', this._onMouseMove, this) + .off('touchstart', this._onMouseDown, this) + .off('touchmove', this._onMouseMove, this); + + L.DomEvent.off(document, 'mouseup', this._onMouseUp, this); + L.DomEvent.off(document, 'touchend', this._onMouseUp, this); + + document.removeEventListener('touchstart', L.DomEvent.preventDefault); + + // If the box element doesn't exist they must not have moved the mouse, so don't need to destroy/return + if (this._shape) { + this._map.removeLayer(this._shape); + delete this._shape; + } + } + this._isDrawing = false; + }, + + _getTooltipText: function () { + return { + text: this._endLabelText + }; + }, + + _onMouseDown: function (e) { + this._isDrawing = true; + this._startLatLng = e.latlng; + + L.DomEvent + .on(document, 'mouseup', this._onMouseUp, this) + .on(document, 'touchend', this._onMouseUp, this) + .preventDefault(e.originalEvent); + }, + + _onMouseMove: function (e) { + var latlng = e.latlng; + + this._tooltip.updatePosition(latlng); + if (this._isDrawing) { + this._tooltip.updateContent(this._getTooltipText()); + this._drawShape(latlng); + } + }, + + _onMouseUp: function () { + if (this._shape) { + this._fireCreatedEvent(); + } + + this.disable(); + if (this.options.repeatMode) { + this.enable(); + } + } +}); + + + +/** + * @class L.Draw.Rectangle + * @aka Draw.Rectangle + * @inherits L.Draw.SimpleShape + */ +L.Draw.Rectangle = L.Draw.SimpleShape.extend({ + statics: { + TYPE: 'rectangle' + }, + + options: { + shapeOptions: { + stroke: true, + color: '#3388ff', + weight: 4, + opacity: 0.5, + fill: true, + fillColor: null, //same as color by default + fillOpacity: 0.2, + clickable: true + }, + showArea: true, //Whether to show the area in the tooltip + metric: true // Whether to use the metric measurement system or imperial + }, + + // @method initialize(): void + initialize: function (map, options) { + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Rectangle.TYPE; + + this._initialLabelText = L.drawLocal.draw.handlers.rectangle.tooltip.start; + + L.Draw.SimpleShape.prototype.initialize.call(this, map, options); + }, + + // @method disable(): void + disable: function () { + if (!this._enabled) { + return; + } + + this._isCurrentlyTwoClickDrawing = false; + L.Draw.SimpleShape.prototype.disable.call(this); + }, + + _onMouseUp: function (e) { + if (!this._shape && !this._isCurrentlyTwoClickDrawing) { + this._isCurrentlyTwoClickDrawing = true; + return; + } + + // Make sure closing click is on map + if (this._isCurrentlyTwoClickDrawing && !_hasAncestor(e.target, 'leaflet-pane')) { + return; + } + + L.Draw.SimpleShape.prototype._onMouseUp.call(this); + }, + + _drawShape: function (latlng) { + if (!this._shape) { + this._shape = new L.Rectangle(new L.LatLngBounds(this._startLatLng, latlng), this.options.shapeOptions); + this._map.addLayer(this._shape); + } else { + this._shape.setBounds(new L.LatLngBounds(this._startLatLng, latlng)); + } + }, + + _fireCreatedEvent: function () { + var rectangle = new L.Rectangle(this._shape.getBounds(), this.options.shapeOptions); + L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this, rectangle); + }, + + _getTooltipText: function () { + var tooltipText = L.Draw.SimpleShape.prototype._getTooltipText.call(this), + shape = this._shape, + showArea = this.options.showArea, + latLngs, area, subtext; + + if (shape) { + latLngs = this._shape._defaultShape ? this._shape._defaultShape() : this._shape.getLatLngs(); + area = L.GeometryUtil.geodesicArea(latLngs); + subtext = showArea ? L.GeometryUtil.readableArea(area, this.options.metric) : ''; + } + + return { + text: tooltipText.text, + subtext: subtext + }; + } +}); + +function _hasAncestor(el, cls) { + while ((el = el.parentElement) && !el.classList.contains(cls)) { + ; + } + return el; +} + + + +/** + * @class L.Draw.Marker + * @aka Draw.Marker + * @inherits L.Draw.Feature + */ +L.Draw.Marker = L.Draw.Feature.extend({ + statics: { + TYPE: 'marker' + }, + + options: { + icon: new L.Icon.Default(), + repeatMode: false, + zIndexOffset: 2000 // This should be > than the highest z-index any markers + }, + + // @method initialize(): void + initialize: function (map, options) { + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Marker.TYPE; + + this._initialLabelText = L.drawLocal.draw.handlers.marker.tooltip.start; + + L.Draw.Feature.prototype.initialize.call(this, map, options); + }, + + // @method addHooks(): void + // Add listener hooks to this handler. + addHooks: function () { + L.Draw.Feature.prototype.addHooks.call(this); + + if (this._map) { + this._tooltip.updateContent({text: this._initialLabelText}); + + // Same mouseMarker as in Draw.Polyline + if (!this._mouseMarker) { + this._mouseMarker = L.marker(this._map.getCenter(), { + icon: L.divIcon({ + className: 'leaflet-mouse-marker', + iconAnchor: [20, 20], + iconSize: [40, 40] + }), + opacity: 0, + zIndexOffset: this.options.zIndexOffset + }); + } + + this._mouseMarker + .on('click', this._onClick, this) + .addTo(this._map); + + this._map.on('mousemove', this._onMouseMove, this); + this._map.on('click', this._onTouch, this); + } + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler. + removeHooks: function () { + L.Draw.Feature.prototype.removeHooks.call(this); + + if (this._map) { + this._map + .off('click', this._onClick, this) + .off('click', this._onTouch, this); + if (this._marker) { + this._marker.off('click', this._onClick, this); + this._map + .removeLayer(this._marker); + delete this._marker; + } + + this._mouseMarker.off('click', this._onClick, this); + this._map.removeLayer(this._mouseMarker); + delete this._mouseMarker; + + this._map.off('mousemove', this._onMouseMove, this); + } + }, + + _onMouseMove: function (e) { + var latlng = e.latlng; + + this._tooltip.updatePosition(latlng); + this._mouseMarker.setLatLng(latlng); + + if (!this._marker) { + this._marker = this._createMarker(latlng); + // Bind to both marker and map to make sure we get the click event. + this._marker.on('click', this._onClick, this); + this._map + .on('click', this._onClick, this) + .addLayer(this._marker); + } + else { + latlng = this._mouseMarker.getLatLng(); + this._marker.setLatLng(latlng); + } + }, + + _createMarker: function (latlng) { + return new L.Marker(latlng, { + icon: this.options.icon, + zIndexOffset: this.options.zIndexOffset + }); + }, + + _onClick: function () { + this._fireCreatedEvent(); + + this.disable(); + if (this.options.repeatMode) { + this.enable(); + } + }, + + _onTouch: function (e) { + // called on click & tap, only really does any thing on tap + this._onMouseMove(e); // creates & places marker + this._onClick(); // permanently places marker & ends interaction + }, + + _fireCreatedEvent: function () { + var marker = new L.Marker.Touch(this._marker.getLatLng(), {icon: this.options.icon}); + L.Draw.Feature.prototype._fireCreatedEvent.call(this, marker); + } +}); + + + +/** + * @class L.Draw.CircleMarker + * @aka Draw.CircleMarker + * @inherits L.Draw.Marker + */ +L.Draw.CircleMarker = L.Draw.Marker.extend({ + statics: { + TYPE: 'circlemarker' + }, + + options: { + stroke: true, + color: '#3388ff', + weight: 4, + opacity: 0.5, + fill: true, + fillColor: null, //same as color by default + fillOpacity: 0.2, + clickable: true, + zIndexOffset: 2000 // This should be > than the highest z-index any markers + }, + + // @method initialize(): void + initialize: function (map, options) { + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.CircleMarker.TYPE; + + this._initialLabelText = L.drawLocal.draw.handlers.circlemarker.tooltip.start; + + L.Draw.Feature.prototype.initialize.call(this, map, options); + }, + + + _fireCreatedEvent: function () { + var circleMarker = new L.CircleMarker(this._marker.getLatLng(), this.options); + L.Draw.Feature.prototype._fireCreatedEvent.call(this, circleMarker); + }, + + _createMarker: function (latlng) { + return new L.CircleMarker(latlng, this.options); + } +}); + + + +/** + * @class L.Draw.Circle + * @aka Draw.Circle + * @inherits L.Draw.SimpleShape + */ +L.Draw.Circle = L.Draw.SimpleShape.extend({ + statics: { + TYPE: 'circle' + }, + + options: { + shapeOptions: { + stroke: true, + color: '#3388ff', + weight: 4, + opacity: 0.5, + fill: true, + fillColor: null, //same as color by default + fillOpacity: 0.2, + clickable: true + }, + showRadius: true, + metric: true, // Whether to use the metric measurement system or imperial + feet: true, // When not metric, use feet instead of yards for display + nautic: false // When not metric, not feet use nautic mile for display + }, + + // @method initialize(): void + initialize: function (map, options) { + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Circle.TYPE; + + this._initialLabelText = L.drawLocal.draw.handlers.circle.tooltip.start; + + L.Draw.SimpleShape.prototype.initialize.call(this, map, options); + }, + + _drawShape: function (latlng) { + // Calculate the distance based on the version + if (L.GeometryUtil.isVersion07x()) { + var distance = this._startLatLng.distanceTo(latlng); + } else { + var distance = this._map.distance(this._startLatLng, latlng); + } + + if (!this._shape) { + this._shape = new L.Circle(this._startLatLng, distance, this.options.shapeOptions); + this._map.addLayer(this._shape); + } else { + this._shape.setRadius(distance); + } + }, + + _fireCreatedEvent: function () { + var circle = new L.Circle(this._startLatLng, this._shape.getRadius(), this.options.shapeOptions); + L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this, circle); + }, + + _onMouseMove: function (e) { + var latlng = e.latlng, + showRadius = this.options.showRadius, + useMetric = this.options.metric, + radius; + + this._tooltip.updatePosition(latlng); + if (this._isDrawing) { + this._drawShape(latlng); + + // Get the new radius (rounded to 1 dp) + radius = this._shape.getRadius().toFixed(1); + + var subtext = ''; + if (showRadius) { + subtext = L.drawLocal.draw.handlers.circle.radius + ': ' + + L.GeometryUtil.readableDistance(radius, useMetric, this.options.feet, this.options.nautic); + } + this._tooltip.updateContent({ + text: this._endLabelText, + subtext: subtext + }); + } + } +}); + + + +L.Edit = L.Edit || {}; + +/** + * @class L.Edit.Marker + * @aka Edit.Marker + */ +L.Edit.Marker = L.Handler.extend({ + // @method initialize(): void + initialize: function (marker, options) { + this._marker = marker; + L.setOptions(this, options); + }, + + // @method addHooks(): void + // Add listener hooks to this handler + addHooks: function () { + var marker = this._marker; + + marker.dragging.enable(); + marker.on('dragend', this._onDragEnd, marker); + this._toggleMarkerHighlight(); + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler + removeHooks: function () { + var marker = this._marker; + + marker.dragging.disable(); + marker.off('dragend', this._onDragEnd, marker); + this._toggleMarkerHighlight(); + }, + + _onDragEnd: function (e) { + var layer = e.target; + layer.edited = true; + this._map.fire(L.Draw.Event.EDITMOVE, {layer: layer}); + }, + + _toggleMarkerHighlight: function () { + var icon = this._marker._icon; + + // Don't do anything if this layer is a marker but doesn't have an icon. Markers + // should usually have icons. If using Leaflet.draw with Leaflet.markercluster there + // is a chance that a marker doesn't. + if (!icon) { + return; + } + + // This is quite naughty, but I don't see another way of doing it. (short of setting a new icon) + icon.style.display = 'none'; + + if (L.DomUtil.hasClass(icon, 'leaflet-edit-marker-selected')) { + L.DomUtil.removeClass(icon, 'leaflet-edit-marker-selected'); + // Offset as the border will make the icon move. + this._offsetMarker(icon, -4); + + } else { + L.DomUtil.addClass(icon, 'leaflet-edit-marker-selected'); + // Offset as the border will make the icon move. + this._offsetMarker(icon, 4); + } + + icon.style.display = ''; + }, + + _offsetMarker: function (icon, offset) { + var iconMarginTop = parseInt(icon.style.marginTop, 10) - offset, + iconMarginLeft = parseInt(icon.style.marginLeft, 10) - offset; + + icon.style.marginTop = iconMarginTop + 'px'; + icon.style.marginLeft = iconMarginLeft + 'px'; + } +}); + +L.Marker.addInitHook(function () { + if (L.Edit.Marker) { + this.editing = new L.Edit.Marker(this); + + if (this.options.editable) { + this.editing.enable(); + } + } +}); + + + +L.Edit = L.Edit || {}; + +/** + * @class L.Edit.Polyline + * @aka L.Edit.Poly + * @aka Edit.Poly + */ +L.Edit.Poly = L.Handler.extend({ + // @method initialize(): void + initialize: function (poly) { + + this.latlngs = [poly._latlngs]; + if (poly._holes) { + this.latlngs = this.latlngs.concat(poly._holes); + } + + this._poly = poly; + + this._poly.on('revert-edited', this._updateLatLngs, this); + }, + + // Compatibility method to normalize Poly* objects + // between 0.7.x and 1.0+ + _defaultShape: function () { + if (!L.Polyline._flat) { + return this._poly._latlngs; + } + return L.Polyline._flat(this._poly._latlngs) ? this._poly._latlngs : this._poly._latlngs[0]; + }, + + _eachVertexHandler: function (callback) { + for (var i = 0; i < this._verticesHandlers.length; i++) { + callback(this._verticesHandlers[i]); + } + }, + + // @method addHooks(): void + // Add listener hooks to this handler + addHooks: function () { + this._initHandlers(); + this._eachVertexHandler(function (handler) { + handler.addHooks(); + }); + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler + removeHooks: function () { + this._eachVertexHandler(function (handler) { + handler.removeHooks(); + }); + }, + + // @method updateMarkers(): void + // Fire an update for each vertex handler + updateMarkers: function () { + this._eachVertexHandler(function (handler) { + handler.updateMarkers(); + }); + }, + + _initHandlers: function () { + this._verticesHandlers = []; + for (var i = 0; i < this.latlngs.length; i++) { + this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly, this.latlngs[i], this._poly.options.poly)); + } + }, + + _updateLatLngs: function (e) { + this.latlngs = [e.layer._latlngs]; + if (e.layer._holes) { + this.latlngs = this.latlngs.concat(e.layer._holes); + } + } + +}); + +/** + * @class L.Edit.PolyVerticesEdit + * @aka Edit.PolyVerticesEdit + */ +L.Edit.PolyVerticesEdit = L.Handler.extend({ + options: { + icon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon' + }), + touchIcon: new L.DivIcon({ + iconSize: new L.Point(20, 20), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-touch-icon' + }), + drawError: { + color: '#b00b00', + timeout: 1000 + } + + + }, + + // @method intialize(): void + initialize: function (poly, latlngs, options) { + // if touch, switch to touch icon + if (L.Browser.touch) { + this.options.icon = this.options.touchIcon; + } + this._poly = poly; + + if (options && options.drawError) { + options.drawError = L.Util.extend({}, this.options.drawError, options.drawError); + } + + this._latlngs = latlngs; + + L.setOptions(this, options); + }, + + // Compatibility method to normalize Poly* objects + // between 0.7.x and 1.0+ + _defaultShape: function () { + if (!L.Polyline._flat) { + return this._latlngs; + } + return L.Polyline._flat(this._latlngs) ? this._latlngs : this._latlngs[0]; + }, + + // @method addHooks(): void + // Add listener hooks to this handler. + addHooks: function () { + var poly = this._poly; + var path = poly._path; + + if (!(poly instanceof L.Polygon)) { + poly.options.fill = false; + if (poly.options.editing) { + poly.options.editing.fill = false; + } + } + + if (path) { + if (poly.options.editing && poly.options.editing.className) { + if (poly.options.original.className) { + poly.options.original.className.split(' ').forEach(function (className) { + L.DomUtil.removeClass(path, className); + }); + } + poly.options.editing.className.split(' ').forEach(function (className) { + L.DomUtil.addClass(path, className); + }); + } + } + + poly.setStyle(poly.options.editing); + + if (this._poly._map) { + + this._map = this._poly._map; // Set map + + if (!this._markerGroup) { + this._initMarkers(); + } + this._poly._map.addLayer(this._markerGroup); + } + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler. + removeHooks: function () { + var poly = this._poly; + var path = poly._path; + + if (path) { + if (poly.options.editing && poly.options.editing.className) { + poly.options.editing.className.split(' ').forEach(function (className) { + L.DomUtil.removeClass(path, className); + }); + if (poly.options.original.className) { + poly.options.original.className.split(' ').forEach(function (className) { + L.DomUtil.addClass(path, className); + }); + } + } + } + + poly.setStyle(poly.options.original); + + if (poly._map) { + poly._map.removeLayer(this._markerGroup); + delete this._markerGroup; + delete this._markers; + } + }, + + // @method updateMarkers(): void + // Clear markers and update their location + updateMarkers: function () { + this._markerGroup.clearLayers(); + this._initMarkers(); + }, + + _initMarkers: function () { + if (!this._markerGroup) { + this._markerGroup = new L.LayerGroup(); + } + this._markers = []; + + var latlngs = this._defaultShape(), + i, j, len, marker; + + for (i = 0, len = latlngs.length; i < len; i++) { + + marker = this._createMarker(latlngs[i], i); + marker.on('click', this._onMarkerClick, this); + marker.on('contextmenu', this._onContextMenu, this); + this._markers.push(marker); + } + + var markerLeft, markerRight; + + for (i = 0, j = len - 1; i < len; j = i++) { + if (i === 0 && !(L.Polygon && (this._poly instanceof L.Polygon))) { + continue; + } + + markerLeft = this._markers[j]; + markerRight = this._markers[i]; + + this._createMiddleMarker(markerLeft, markerRight); + this._updatePrevNext(markerLeft, markerRight); + } + }, + + _createMarker: function (latlng, index) { + // Extending L.Marker in TouchEvents.js to include touch. + var marker = new L.Marker.Touch(latlng, { + draggable: true, + icon: this.options.icon, + }); + + marker._origLatLng = latlng; + marker._index = index; + + marker + .on('dragstart', this._onMarkerDragStart, this) + .on('drag', this._onMarkerDrag, this) + .on('dragend', this._fireEdit, this) + .on('touchmove', this._onTouchMove, this) + .on('touchend', this._fireEdit, this) + .on('MSPointerMove', this._onTouchMove, this) + .on('MSPointerUp', this._fireEdit, this); + + this._markerGroup.addLayer(marker); + + return marker; + }, + + _onMarkerDragStart: function () { + this._poly.fire('editstart'); + }, + + _spliceLatLngs: function () { + var latlngs = this._defaultShape(); + var removed = [].splice.apply(latlngs, arguments); + this._poly._convertLatLngs(latlngs, true); + this._poly.redraw(); + return removed; + }, + + _removeMarker: function (marker) { + var i = marker._index; + + this._markerGroup.removeLayer(marker); + this._markers.splice(i, 1); + this._spliceLatLngs(i, 1); + this._updateIndexes(i, -1); + + marker + .off('dragstart', this._onMarkerDragStart, this) + .off('drag', this._onMarkerDrag, this) + .off('dragend', this._fireEdit, this) + .off('touchmove', this._onMarkerDrag, this) + .off('touchend', this._fireEdit, this) + .off('click', this._onMarkerClick, this) + .off('MSPointerMove', this._onTouchMove, this) + .off('MSPointerUp', this._fireEdit, this); + }, + + _fireEdit: function () { + this._poly.edited = true; + this._poly.fire('edit'); + this._poly._map.fire(L.Draw.Event.EDITVERTEX, {layers: this._markerGroup, poly: this._poly}); + }, + + _onMarkerDrag: function (e) { + var marker = e.target; + var poly = this._poly; + + var oldOrigLatLng = L.LatLngUtil.cloneLatLng(marker._origLatLng); + L.extend(marker._origLatLng, marker._latlng); + if (poly.options.poly) { + var tooltip = poly._map._editTooltip; // Access the tooltip + + // If we don't allow intersections and the polygon intersects + if (!poly.options.poly.allowIntersection && poly.intersects()) { + L.extend(marker._origLatLng, oldOrigLatLng); + marker.setLatLng(oldOrigLatLng); + var originalColor = poly.options.color; + poly.setStyle({color: this.options.drawError.color}); + if (tooltip) { + tooltip.updateContent({ + text: L.drawLocal.draw.handlers.polyline.error + }); + } + + // Reset everything back to normal after a second + setTimeout(function () { + poly.setStyle({color: originalColor}); + if (tooltip) { + tooltip.updateContent({ + text: L.drawLocal.edit.handlers.edit.tooltip.text, + subtext: L.drawLocal.edit.handlers.edit.tooltip.subtext + }); + } + }, 1000); + } + } + + if (marker._middleLeft) { + marker._middleLeft.setLatLng(this._getMiddleLatLng(marker._prev, marker)); + } + if (marker._middleRight) { + marker._middleRight.setLatLng(this._getMiddleLatLng(marker, marker._next)); + } + + //refresh the bounds when draging + this._poly._bounds._southWest = L.latLng(Infinity, Infinity); + this._poly._bounds._northEast = L.latLng(-Infinity, -Infinity); + var latlngs = this._poly.getLatLngs(); + this._poly._convertLatLngs(latlngs, true); + this._poly.redraw(); + this._poly.fire('editdrag'); + }, + + _onMarkerClick: function (e) { + + var minPoints = L.Polygon && (this._poly instanceof L.Polygon) ? 4 : 3, + marker = e.target; + + // If removing this point would create an invalid polyline/polygon don't remove + if (this._defaultShape().length < minPoints) { + return; + } + + // remove the marker + this._removeMarker(marker); + + // update prev/next links of adjacent markers + this._updatePrevNext(marker._prev, marker._next); + + // remove ghost markers near the removed marker + if (marker._middleLeft) { + this._markerGroup.removeLayer(marker._middleLeft); + } + if (marker._middleRight) { + this._markerGroup.removeLayer(marker._middleRight); + } + + // create a ghost marker in place of the removed one + if (marker._prev && marker._next) { + this._createMiddleMarker(marker._prev, marker._next); + + } else if (!marker._prev) { + marker._next._middleLeft = null; + + } else if (!marker._next) { + marker._prev._middleRight = null; + } + + this._fireEdit(); + }, + + _onContextMenu: function (e) { + var marker = e.target; + var poly = this._poly; + this._poly._map.fire(L.Draw.Event.MARKERCONTEXT, {marker: marker, layers: this._markerGroup, poly: this._poly}); + L.DomEvent.stopPropagation; + }, + + _onTouchMove: function (e) { + + var layerPoint = this._map.mouseEventToLayerPoint(e.originalEvent.touches[0]), + latlng = this._map.layerPointToLatLng(layerPoint), + marker = e.target; + + L.extend(marker._origLatLng, latlng); + + if (marker._middleLeft) { + marker._middleLeft.setLatLng(this._getMiddleLatLng(marker._prev, marker)); + } + if (marker._middleRight) { + marker._middleRight.setLatLng(this._getMiddleLatLng(marker, marker._next)); + } + + this._poly.redraw(); + this.updateMarkers(); + }, + + _updateIndexes: function (index, delta) { + this._markerGroup.eachLayer(function (marker) { + if (marker._index > index) { + marker._index += delta; + } + }); + }, + + _createMiddleMarker: function (marker1, marker2) { + var latlng = this._getMiddleLatLng(marker1, marker2), + marker = this._createMarker(latlng), + onClick, + onDragStart, + onDragEnd; + + marker.setOpacity(0.6); + + marker1._middleRight = marker2._middleLeft = marker; + + onDragStart = function () { + marker.off('touchmove', onDragStart, this); + var i = marker2._index; + + marker._index = i; + + marker + .off('click', onClick, this) + .on('click', this._onMarkerClick, this); + + latlng.lat = marker.getLatLng().lat; + latlng.lng = marker.getLatLng().lng; + this._spliceLatLngs(i, 0, latlng); + this._markers.splice(i, 0, marker); + + marker.setOpacity(1); + + this._updateIndexes(i, 1); + marker2._index++; + this._updatePrevNext(marker1, marker); + this._updatePrevNext(marker, marker2); + + this._poly.fire('editstart'); + }; + + onDragEnd = function () { + marker.off('dragstart', onDragStart, this); + marker.off('dragend', onDragEnd, this); + marker.off('touchmove', onDragStart, this); + + this._createMiddleMarker(marker1, marker); + this._createMiddleMarker(marker, marker2); + }; + + onClick = function () { + onDragStart.call(this); + onDragEnd.call(this); + this._fireEdit(); + }; + + marker + .on('click', onClick, this) + .on('dragstart', onDragStart, this) + .on('dragend', onDragEnd, this) + .on('touchmove', onDragStart, this); + + this._markerGroup.addLayer(marker); + }, + + _updatePrevNext: function (marker1, marker2) { + if (marker1) { + marker1._next = marker2; + } + if (marker2) { + marker2._prev = marker1; + } + }, + + _getMiddleLatLng: function (marker1, marker2) { + var map = this._poly._map, + p1 = map.project(marker1.getLatLng()), + p2 = map.project(marker2.getLatLng()); + + return map.unproject(p1._add(p2)._divideBy(2)); + } +}); + +L.Polyline.addInitHook(function () { + + // Check to see if handler has already been initialized. This is to support versions of Leaflet that still have L.Handler.PolyEdit + if (this.editing) { + return; + } + + if (L.Edit.Poly) { + + this.editing = new L.Edit.Poly(this); + + if (this.options.editable) { + this.editing.enable(); + } + } + + this.on('add', function () { + if (this.editing && this.editing.enabled()) { + this.editing.addHooks(); + } + }); + + this.on('remove', function () { + if (this.editing && this.editing.enabled()) { + this.editing.removeHooks(); + } + }); +}); + + + +L.Edit = L.Edit || {}; +/** + * @class L.Edit.SimpleShape + * @aka Edit.SimpleShape + */ +L.Edit.SimpleShape = L.Handler.extend({ + options: { + moveIcon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-move' + }), + resizeIcon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-resize' + }), + touchMoveIcon: new L.DivIcon({ + iconSize: new L.Point(20, 20), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon' + }), + touchResizeIcon: new L.DivIcon({ + iconSize: new L.Point(20, 20), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon' + }), + }, + + // @method intialize(): void + initialize: function (shape, options) { + // if touch, switch to touch icon + if (L.Browser.touch) { + this.options.moveIcon = this.options.touchMoveIcon; + this.options.resizeIcon = this.options.touchResizeIcon; + } + + this._shape = shape; + L.Util.setOptions(this, options); + }, + + // @method addHooks(): void + // Add listener hooks to this handler + addHooks: function () { + var shape = this._shape; + if (this._shape._map) { + this._map = this._shape._map; + shape.setStyle(shape.options.editing); + + if (shape._map) { + this._map = shape._map; + if (!this._markerGroup) { + this._initMarkers(); + } + this._map.addLayer(this._markerGroup); + } + } + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler + removeHooks: function () { + var shape = this._shape; + + shape.setStyle(shape.options.original); + + if (shape._map) { + this._unbindMarker(this._moveMarker); + + for (var i = 0, l = this._resizeMarkers.length; i < l; i++) { + this._unbindMarker(this._resizeMarkers[i]); + } + this._resizeMarkers = null; + + this._map.removeLayer(this._markerGroup); + delete this._markerGroup; + } + + this._map = null; + }, + + // @method updateMarkers(): void + // Remove the edit markers from this layer + updateMarkers: function () { + this._markerGroup.clearLayers(); + this._initMarkers(); + }, + + _initMarkers: function () { + if (!this._markerGroup) { + this._markerGroup = new L.LayerGroup(); + } + + // Create center marker + this._createMoveMarker(); + + // Create edge marker + this._createResizeMarker(); + }, + + _createMoveMarker: function () { + // Children override + }, + + _createResizeMarker: function () { + // Children override + }, + + _createMarker: function (latlng, icon) { + // Extending L.Marker in TouchEvents.js to include touch. + var marker = new L.Marker.Touch(latlng, { + draggable: true, + icon: icon, + zIndexOffset: 10 + }); + + this._bindMarker(marker); + + this._markerGroup.addLayer(marker); + + return marker; + }, + + _bindMarker: function (marker) { + marker + .on('dragstart', this._onMarkerDragStart, this) + .on('drag', this._onMarkerDrag, this) + .on('dragend', this._onMarkerDragEnd, this) + .on('touchstart', this._onTouchStart, this) + .on('touchmove', this._onTouchMove, this) + .on('MSPointerMove', this._onTouchMove, this) + .on('touchend', this._onTouchEnd, this) + .on('MSPointerUp', this._onTouchEnd, this); + }, + + _unbindMarker: function (marker) { + marker + .off('dragstart', this._onMarkerDragStart, this) + .off('drag', this._onMarkerDrag, this) + .off('dragend', this._onMarkerDragEnd, this) + .off('touchstart', this._onTouchStart, this) + .off('touchmove', this._onTouchMove, this) + .off('MSPointerMove', this._onTouchMove, this) + .off('touchend', this._onTouchEnd, this) + .off('MSPointerUp', this._onTouchEnd, this); + }, + + _onMarkerDragStart: function (e) { + var marker = e.target; + marker.setOpacity(0); + + this._shape.fire('editstart'); + }, + + _fireEdit: function () { + this._shape.edited = true; + this._shape.fire('edit'); + }, + + _onMarkerDrag: function (e) { + var marker = e.target, + latlng = marker.getLatLng(); + + if (marker === this._moveMarker) { + this._move(latlng); + } else { + this._resize(latlng); + } + + this._shape.redraw(); + this._shape.fire('editdrag'); + }, + + _onMarkerDragEnd: function (e) { + var marker = e.target; + marker.setOpacity(1); + + this._fireEdit(); + }, + + _onTouchStart: function (e) { + L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this, e); + + if (typeof(this._getCorners) === 'function') { + // Save a reference to the opposite point + var corners = this._getCorners(), + marker = e.target, + currentCornerIndex = marker._cornerIndex; + + marker.setOpacity(0); + + // Copyed from Edit.Rectangle.js line 23 _onMarkerDragStart() + // Latlng is null otherwise. + this._oppositeCorner = corners[(currentCornerIndex + 2) % 4]; + this._toggleCornerMarkers(0, currentCornerIndex); + } + + this._shape.fire('editstart'); + }, + + _onTouchMove: function (e) { + var layerPoint = this._map.mouseEventToLayerPoint(e.originalEvent.touches[0]), + latlng = this._map.layerPointToLatLng(layerPoint), + marker = e.target; + + if (marker === this._moveMarker) { + this._move(latlng); + } else { + this._resize(latlng); + } + + this._shape.redraw(); + + // prevent touchcancel in IOS + // e.preventDefault(); + return false; + }, + + _onTouchEnd: function (e) { + var marker = e.target; + marker.setOpacity(1); + this.updateMarkers(); + this._fireEdit(); + }, + + _move: function () { + // Children override + }, + + _resize: function () { + // Children override + } +}); + + + +L.Edit = L.Edit || {}; +/** + * @class L.Edit.Rectangle + * @aka Edit.Rectangle + * @inherits L.Edit.SimpleShape + */ +L.Edit.Rectangle = L.Edit.SimpleShape.extend({ + _createMoveMarker: function () { + var bounds = this._shape.getBounds(), + center = bounds.getCenter(); + + this._moveMarker = this._createMarker(center, this.options.moveIcon); + }, + + _createResizeMarker: function () { + var corners = this._getCorners(); + + this._resizeMarkers = []; + + for (var i = 0, l = corners.length; i < l; i++) { + this._resizeMarkers.push(this._createMarker(corners[i], this.options.resizeIcon)); + // Monkey in the corner index as we will need to know this for dragging + this._resizeMarkers[i]._cornerIndex = i; + } + }, + + _onMarkerDragStart: function (e) { + L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this, e); + + // Save a reference to the opposite point + var corners = this._getCorners(), + marker = e.target, + currentCornerIndex = marker._cornerIndex; + + this._oppositeCorner = corners[(currentCornerIndex + 2) % 4]; + + this._toggleCornerMarkers(0, currentCornerIndex); + }, + + _onMarkerDragEnd: function (e) { + var marker = e.target, + bounds, center; + + // Reset move marker position to the center + if (marker === this._moveMarker) { + bounds = this._shape.getBounds(); + center = bounds.getCenter(); + + marker.setLatLng(center); + } + + this._toggleCornerMarkers(1); + + this._repositionCornerMarkers(); + + L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this, e); + }, + + _move: function (newCenter) { + var latlngs = this._shape._defaultShape ? this._shape._defaultShape() : this._shape.getLatLngs(), + bounds = this._shape.getBounds(), + center = bounds.getCenter(), + offset, newLatLngs = []; + + // Offset the latlngs to the new center + for (var i = 0, l = latlngs.length; i < l; i++) { + offset = [latlngs[i].lat - center.lat, latlngs[i].lng - center.lng]; + newLatLngs.push([newCenter.lat + offset[0], newCenter.lng + offset[1]]); + } + + this._shape.setLatLngs(newLatLngs); + + // Reposition the resize markers + this._repositionCornerMarkers(); + + this._map.fire(L.Draw.Event.EDITMOVE, {layer: this._shape}); + }, + + _resize: function (latlng) { + var bounds; + + // Update the shape based on the current position of this corner and the opposite point + this._shape.setBounds(L.latLngBounds(latlng, this._oppositeCorner)); + + // Reposition the move marker + bounds = this._shape.getBounds(); + this._moveMarker.setLatLng(bounds.getCenter()); + + this._map.fire(L.Draw.Event.EDITRESIZE, {layer: this._shape}); + }, + + _getCorners: function () { + var bounds = this._shape.getBounds(), + nw = bounds.getNorthWest(), + ne = bounds.getNorthEast(), + se = bounds.getSouthEast(), + sw = bounds.getSouthWest(); + + return [nw, ne, se, sw]; + }, + + _toggleCornerMarkers: function (opacity) { + for (var i = 0, l = this._resizeMarkers.length; i < l; i++) { + this._resizeMarkers[i].setOpacity(opacity); + } + }, + + _repositionCornerMarkers: function () { + var corners = this._getCorners(); + + for (var i = 0, l = this._resizeMarkers.length; i < l; i++) { + this._resizeMarkers[i].setLatLng(corners[i]); + } + } +}); + +L.Rectangle.addInitHook(function () { + if (L.Edit.Rectangle) { + this.editing = new L.Edit.Rectangle(this); + + if (this.options.editable) { + this.editing.enable(); + } + } +}); + + + +L.Edit = L.Edit || {}; +/** + * @class L.Edit.CircleMarker + * @aka Edit.Circle + * @inherits L.Edit.SimpleShape + */ +L.Edit.CircleMarker = L.Edit.SimpleShape.extend({ + _createMoveMarker: function () { + var center = this._shape.getLatLng(); + + this._moveMarker = this._createMarker(center, this.options.moveIcon); + }, + + _createResizeMarker: function () { + // To avoid an undefined check in L.Edit.SimpleShape.removeHooks + this._resizeMarkers = []; + }, + + _move: function (latlng) { + if (this._resizeMarkers.length) { + var resizemarkerPoint = this._getResizeMarkerPoint(latlng); + // Move the resize marker + this._resizeMarkers[0].setLatLng(resizemarkerPoint); + } + + // Move the circle + this._shape.setLatLng(latlng); + + this._map.fire(L.Draw.Event.EDITMOVE, {layer: this._shape}); + }, +}); + +L.CircleMarker.addInitHook(function () { + if (L.Edit.CircleMarker) { + this.editing = new L.Edit.CircleMarker(this); + + if (this.options.editable) { + this.editing.enable(); + } + } + + this.on('add', function () { + if (this.editing && this.editing.enabled()) { + this.editing.addHooks(); + } + }); + + this.on('remove', function () { + if (this.editing && this.editing.enabled()) { + this.editing.removeHooks(); + } + }); +}); + + + +L.Edit = L.Edit || {}; +/** + * @class L.Edit.Circle + * @aka Edit.Circle + * @inherits L.Edit.CircleMarker + */ +L.Edit.Circle = L.Edit.CircleMarker.extend({ + + _createResizeMarker: function () { + var center = this._shape.getLatLng(), + resizemarkerPoint = this._getResizeMarkerPoint(center); + + this._resizeMarkers = []; + this._resizeMarkers.push(this._createMarker(resizemarkerPoint, this.options.resizeIcon)); + }, + + _getResizeMarkerPoint: function (latlng) { + // From L.shape.getBounds() + var delta = this._shape._radius * Math.cos(Math.PI / 4), + point = this._map.project(latlng); + return this._map.unproject([point.x + delta, point.y - delta]); + }, + + _resize: function (latlng) { + var moveLatLng = this._moveMarker.getLatLng(); + + // Calculate the radius based on the version + if (L.GeometryUtil.isVersion07x()) { + radius = moveLatLng.distanceTo(latlng); + } else { + radius = this._map.distance(moveLatLng, latlng); + } + this._shape.setRadius(radius); + + if (this._map.editTooltip) { + this._map._editTooltip.updateContent({ + text: L.drawLocal.edit.handlers.edit.tooltip.subtext + '
    ' + L.drawLocal.edit.handlers.edit.tooltip.text, + subtext: L.drawLocal.draw.handlers.circle.radius + ': ' + + L.GeometryUtil.readableDistance(radius, true, this.options.feet, this.options.nautic) + }); + } + + this._shape.setRadius(radius); + + this._map.fire(L.Draw.Event.EDITRESIZE, {layer: this._shape}); + } +}); + +L.Circle.addInitHook(function () { + if (L.Edit.Circle) { + this.editing = new L.Edit.Circle(this); + + if (this.options.editable) { + this.editing.enable(); + } + } +}); + + + +L.Map.mergeOptions({ + touchExtend: true +}); + +/** + * @class L.Map.TouchExtend + * @aka TouchExtend + */ +L.Map.TouchExtend = L.Handler.extend({ + + // @method initialize(): void + // Sets TouchExtend private accessor variables + initialize: function (map) { + this._map = map; + this._container = map._container; + this._pane = map._panes.overlayPane; + }, + + // @method addHooks(): void + // Adds dom listener events to the map container + addHooks: function () { + L.DomEvent.on(this._container, 'touchstart', this._onTouchStart, this); + L.DomEvent.on(this._container, 'touchend', this._onTouchEnd, this); + L.DomEvent.on(this._container, 'touchmove', this._onTouchMove, this); + if (this._detectIE()) { + L.DomEvent.on(this._container, 'MSPointerDown', this._onTouchStart, this); + L.DomEvent.on(this._container, 'MSPointerUp', this._onTouchEnd, this); + L.DomEvent.on(this._container, 'MSPointerMove', this._onTouchMove, this); + L.DomEvent.on(this._container, 'MSPointerCancel', this._onTouchCancel, this); + + } else { + L.DomEvent.on(this._container, 'touchcancel', this._onTouchCancel, this); + L.DomEvent.on(this._container, 'touchleave', this._onTouchLeave, this); + } + }, + + // @method removeHooks(): void + // Removes dom listener events from the map container + removeHooks: function () { + L.DomEvent.off(this._container, 'touchstart', this._onTouchStart, this); + L.DomEvent.off(this._container, 'touchend', this._onTouchEnd, this); + L.DomEvent.off(this._container, 'touchmove', this._onTouchMove, this); + if (this._detectIE()) { + L.DomEvent.off(this._container, 'MSPointerDown', this._onTouchStart, this); + L.DomEvent.off(this._container, 'MSPointerUp', this._onTouchEnd, this); + L.DomEvent.off(this._container, 'MSPointerMove', this._onTouchMove, this); + L.DomEvent.off(this._container, 'MSPointerCancel', this._onTouchCancel, this); + } else { + L.DomEvent.off(this._container, 'touchcancel', this._onTouchCancel, this); + L.DomEvent.off(this._container, 'touchleave', this._onTouchLeave, this); + } + }, + + _touchEvent: function (e, type) { + // #TODO: fix the pageX error that is do a bug in Android where a single touch triggers two click events + // _filterClick is what leaflet uses as a workaround. + // This is a problem with more things than just android. Another problem is touchEnd has no touches in + // its touch list. + var touchEvent = {}; + if (typeof e.touches !== 'undefined') { + if (!e.touches.length) { + return; + } + touchEvent = e.touches[0]; + } else if (e.pointerType === 'touch') { + touchEvent = e; + if (!this._filterClick(e)) { + return; + } + } else { + return; + } + + var containerPoint = this._map.mouseEventToContainerPoint(touchEvent), + layerPoint = this._map.mouseEventToLayerPoint(touchEvent), + latlng = this._map.layerPointToLatLng(layerPoint); + + this._map.fire(type, { + latlng: latlng, + layerPoint: layerPoint, + containerPoint: containerPoint, + pageX: touchEvent.pageX, + pageY: touchEvent.pageY, + originalEvent: e + }); + }, + + /** Borrowed from Leaflet and modified for bool ops **/ + _filterClick: function (e) { + var timeStamp = (e.timeStamp || e.originalEvent.timeStamp), + elapsed = L.DomEvent._lastClick && (timeStamp - L.DomEvent._lastClick); + + // are they closer together than 500ms yet more than 100ms? + // Android typically triggers them ~300ms apart while multiple listeners + // on the same event should be triggered far faster; + // or check if click is simulated on the element, and if it is, reject any non-simulated events + if ((elapsed && elapsed > 100 && elapsed < 500) || (e.target._simulatedClick && !e._simulated)) { + L.DomEvent.stop(e); + return false; + } + L.DomEvent._lastClick = timeStamp; + return true; + }, + + _onTouchStart: function (e) { + if (!this._map._loaded) { + return; + } + + var type = 'touchstart'; + this._touchEvent(e, type); + + }, + + _onTouchEnd: function (e) { + if (!this._map._loaded) { + return; + } + + var type = 'touchend'; + this._touchEvent(e, type); + }, + + _onTouchCancel: function (e) { + if (!this._map._loaded) { + return; + } + + var type = 'touchcancel'; + if (this._detectIE()) { + type = 'pointercancel'; + } + this._touchEvent(e, type); + }, + + _onTouchLeave: function (e) { + if (!this._map._loaded) { + return; + } + + var type = 'touchleave'; + this._touchEvent(e, type); + }, + + _onTouchMove: function (e) { + if (!this._map._loaded) { + return; + } + + var type = 'touchmove'; + this._touchEvent(e, type); + }, + + _detectIE: function () { + var ua = window.navigator.userAgent; + + var msie = ua.indexOf('MSIE '); + if (msie > 0) { + // IE 10 or older => return version number + return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); + } + + var trident = ua.indexOf('Trident/'); + if (trident > 0) { + // IE 11 => return version number + var rv = ua.indexOf('rv:'); + return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); + } + + var edge = ua.indexOf('Edge/'); + if (edge > 0) { + // IE 12 => return version number + return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); + } + + // other browser + return false; + } +}); + +L.Map.addInitHook('addHandler', 'touchExtend', L.Map.TouchExtend); + + +/** + * @class L.Marker.Touch + * @aka Marker.Touch + * + * This isn't full Touch support. This is just to get markers to also support dom touch events after creation + * #TODO: find a better way of getting markers to support touch. + */ +L.Marker.Touch = L.Marker.extend({ + + _initInteraction: function () { + if (!this.addInteractiveTarget) { + // 0.7.x support + return this._initInteractionLegacy(); + } + // TODO this may need be updated to re-add touch events for 1.0+ + return L.Marker.prototype._initInteraction.apply(this); + }, + + // This is an exact copy of https://github.com/Leaflet/Leaflet/blob/v0.7/src/layer/marker/Marker.js + // with the addition of the touch events + _initInteractionLegacy: function () { + + if (!this.options.clickable) { + return; + } + + // TODO refactor into something shared with Map/Path/etc. to DRY it up + + var icon = this._icon, + events = ['dblclick', + 'mousedown', + 'mouseover', + 'mouseout', + 'contextmenu', + 'touchstart', + 'touchend', + 'touchmove']; + if (this._detectIE) { + events.concat(['MSPointerDown', + 'MSPointerUp', + 'MSPointerMove', + 'MSPointerCancel']); + } else { + events.concat(['touchcancel']); + } + + L.DomUtil.addClass(icon, 'leaflet-clickable'); + L.DomEvent.on(icon, 'click', this._onMouseClick, this); + L.DomEvent.on(icon, 'keypress', this._onKeyPress, this); + + for (var i = 0; i < events.length; i++) { + L.DomEvent.on(icon, events[i], this._fireMouseEvent, this); + } + + if (L.Handler.MarkerDrag) { + this.dragging = new L.Handler.MarkerDrag(this); + + if (this.options.draggable) { + this.dragging.enable(); + } + } + }, + + _detectIE: function () { + var ua = window.navigator.userAgent; + + var msie = ua.indexOf('MSIE '); + if (msie > 0) { + // IE 10 or older => return version number + return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); + } + + var trident = ua.indexOf('Trident/'); + if (trident > 0) { + // IE 11 => return version number + var rv = ua.indexOf('rv:'); + return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); + } + + var edge = ua.indexOf('Edge/'); + if (edge > 0) { + // IE 12 => return version number + return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); + } + + // other browser + return false; + } +}); + + + +/** + * @class L.LatLngUtil + * @aka LatLngUtil + */ +L.LatLngUtil = { + // Clones a LatLngs[], returns [][] + + // @method cloneLatLngs(LatLngs[]): L.LatLngs[] + // Clone the latLng point or points or nested points and return an array with those points + cloneLatLngs: function (latlngs) { + var clone = []; + for (var i = 0, l = latlngs.length; i < l; i++) { + // Check for nested array (Polyline/Polygon) + if (Array.isArray(latlngs[i])) { + clone.push(L.LatLngUtil.cloneLatLngs(latlngs[i])); + } else { + clone.push(this.cloneLatLng(latlngs[i])); + } + } + return clone; + }, + + // @method cloneLatLng(LatLng): L.LatLng + // Clone the latLng and return a new LatLng object. + cloneLatLng: function (latlng) { + return L.latLng(latlng.lat, latlng.lng); + } +}; + + + +(function () { + + var defaultPrecision = { + km: 2, + ha: 2, + m: 0, + mi: 2, + ac: 2, + yd: 0, + ft: 0, + nm: 2 + }; + + + /** + * @class L.GeometryUtil + * @aka GeometryUtil + */ + L.GeometryUtil = L.extend(L.GeometryUtil || {}, { + // Ported from the OpenLayers implementation. See https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Geometry/LinearRing.js#L270 + + // @method geodesicArea(): number + geodesicArea: function (latLngs) { + var pointsCount = latLngs.length, + area = 0.0, + d2r = Math.PI / 180, + p1, p2; + + if (pointsCount > 2) { + for (var i = 0; i < pointsCount; i++) { + p1 = latLngs[i]; + p2 = latLngs[(i + 1) % pointsCount]; + area += ((p2.lng - p1.lng) * d2r) * + (2 + Math.sin(p1.lat * d2r) + Math.sin(p2.lat * d2r)); + } + area = area * 6378137.0 * 6378137.0 / 2.0; + } + + return Math.abs(area); + }, + + // @method formattedNumber(n, precision): string + // Returns n in specified number format (if defined) and precision + formattedNumber: function (n, precision) { + var formatted = parseFloat(n).toFixed(precision), + format = L.drawLocal.format && L.drawLocal.format.numeric, + delimiters = format && format.delimiters, + thousands = delimiters && delimiters.thousands, + decimal = delimiters && delimiters.decimal; + + if (thousands || decimal) { + var splitValue = formatted.split('.'); + formatted = thousands ? splitValue[0].replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1' + thousands) : splitValue[0]; + decimal = decimal || '.'; + if (splitValue.length > 1) { + formatted = formatted + decimal + splitValue[1]; + } + } + + return formatted; + }, + + // @method readableArea(area, isMetric, precision): string + // Returns a readable area string in yards or metric. + // The value will be rounded as defined by the precision option object. + readableArea: function (area, isMetric, precision) { + var areaStr, + units, + precision = L.Util.extend({}, defaultPrecision, precision); + + if (isMetric) { + units = ['ha', 'm']; + type = typeof isMetric; + if (type === 'string') { + units = [isMetric]; + } else if (type !== 'boolean') { + units = isMetric; + } + + if (area >= 1000000 && units.indexOf('km') !== -1) { + areaStr = L.GeometryUtil.formattedNumber(area * 0.000001, precision['km']) + ' km²'; + } else if (area >= 10000 && units.indexOf('ha') !== -1) { + areaStr = L.GeometryUtil.formattedNumber(area * 0.0001, precision['ha']) + ' ha'; + } else { + areaStr = L.GeometryUtil.formattedNumber(area, precision['m']) + ' m²'; + } + } else { + area /= 0.836127; // Square yards in 1 meter + + if (area >= 3097600) { //3097600 square yards in 1 square mile + areaStr = L.GeometryUtil.formattedNumber(area / 3097600, precision['mi']) + ' mi²'; + } else if (area >= 4840) { //4840 square yards in 1 acre + areaStr = L.GeometryUtil.formattedNumber(area / 4840, precision['ac']) + ' acres'; + } else { + areaStr = L.GeometryUtil.formattedNumber(area, precision['yd']) + ' yd²'; + } + } + + return areaStr; + }, + + // @method readableDistance(distance, units): string + // Converts a metric distance to one of [ feet, nauticalMile, metric or yards ] string + // + // @alternative + // @method readableDistance(distance, isMetric, useFeet, isNauticalMile, precision): string + // Converts metric distance to distance string. + // The value will be rounded as defined by the precision option object. + readableDistance: function (distance, isMetric, isFeet, isNauticalMile, precision) { + var distanceStr, + units, + precision = L.Util.extend({}, defaultPrecision, precision); + + if (isMetric) { + units = typeof isMetric == 'string' ? isMetric : 'metric'; + } else if (isFeet) { + units = 'feet'; + } else if (isNauticalMile) { + units = 'nauticalMile'; + } else { + units = 'yards'; + } + + switch (units) { + case 'metric': + // show metres when distance is < 1km, then show km + if (distance > 1000) { + distanceStr = L.GeometryUtil.formattedNumber(distance / 1000, precision['km']) + ' km'; + } else { + distanceStr = L.GeometryUtil.formattedNumber(distance, precision['m']) + ' m'; + } + break; + case 'feet': + distance *= 1.09361 * 3; + distanceStr = L.GeometryUtil.formattedNumber(distance, precision['ft']) + ' ft'; + + break; + case 'nauticalMile': + distance *= 0.53996; + distanceStr = L.GeometryUtil.formattedNumber(distance / 1000, precision['nm']) + ' nm'; + break; + case 'yards': + default: + distance *= 1.09361; + + if (distance > 1760) { + distanceStr = L.GeometryUtil.formattedNumber(distance / 1760, precision['mi']) + ' miles'; + } else { + distanceStr = L.GeometryUtil.formattedNumber(distance, precision['yd']) + ' yd'; + } + break; + } + return distanceStr; + }, + + // @method isVersion07x(): boolean + // Returns true if the Leaflet version is 0.7.x, false otherwise. + isVersion07x: function () { + var version = L.version.split('.'); + //If Version is == 0.7.* + return parseInt(version[0], 10) === 0 && parseInt(version[1], 10) === 7; + }, + }); + +})(); + + + +/** + * @class L.LineUtil + * @aka Util + * @aka L.Utils + */ +L.Util.extend(L.LineUtil, { + + // @method segmentsIntersect(): boolean + // Checks to see if two line segments intersect. Does not handle degenerate cases. + // http://compgeom.cs.uiuc.edu/~jeffe/teaching/373/notes/x06-sweepline.pdf + segmentsIntersect: function (/*Point*/ p, /*Point*/ p1, /*Point*/ p2, /*Point*/ p3) { + return this._checkCounterclockwise(p, p2, p3) !== + this._checkCounterclockwise(p1, p2, p3) && + this._checkCounterclockwise(p, p1, p2) !== + this._checkCounterclockwise(p, p1, p3); + }, + + // check to see if points are in counterclockwise order + _checkCounterclockwise: function (/*Point*/ p, /*Point*/ p1, /*Point*/ p2) { + return (p2.y - p.y) * (p1.x - p.x) > (p1.y - p.y) * (p2.x - p.x); + } +}); + + + +/** + * @class L.Polyline + * @aka Polyline + */ +L.Polyline.include({ + + // @method intersects(): boolean + // Check to see if this polyline has any linesegments that intersect. + // NOTE: does not support detecting intersection for degenerate cases. + intersects: function () { + var points = this._getProjectedPoints(), + len = points ? points.length : 0, + i, p, p1; + + if (this._tooFewPointsForIntersection()) { + return false; + } + + for (i = len - 1; i >= 3; i--) { + p = points[i - 1]; + p1 = points[i]; + + + if (this._lineSegmentsIntersectsRange(p, p1, i - 2)) { + return true; + } + } + + return false; + }, + + // @method newLatLngIntersects(): boolean + // Check for intersection if new latlng was added to this polyline. + // NOTE: does not support detecting intersection for degenerate cases. + newLatLngIntersects: function (latlng, skipFirst) { + // Cannot check a polyline for intersecting lats/lngs when not added to the map + if (!this._map) { + return false; + } + + return this.newPointIntersects(this._map.latLngToLayerPoint(latlng), skipFirst); + }, + + // @method newPointIntersects(): boolean + // Check for intersection if new point was added to this polyline. + // newPoint must be a layer point. + // NOTE: does not support detecting intersection for degenerate cases. + newPointIntersects: function (newPoint, skipFirst) { + var points = this._getProjectedPoints(), + len = points ? points.length : 0, + lastPoint = points ? points[len - 1] : null, + // The previous previous line segment. Previous line segment doesn't need testing. + maxIndex = len - 2; + + if (this._tooFewPointsForIntersection(1)) { + return false; + } + + return this._lineSegmentsIntersectsRange(lastPoint, newPoint, maxIndex, skipFirst ? 1 : 0); + }, + + // Polylines with 2 sides can only intersect in cases where points are collinear (we don't support detecting these). + // Cannot have intersection when < 3 line segments (< 4 points) + _tooFewPointsForIntersection: function (extraPoints) { + var points = this._getProjectedPoints(), + len = points ? points.length : 0; + // Increment length by extraPoints if present + len += extraPoints || 0; + + return !points || len <= 3; + }, + + // Checks a line segment intersections with any line segments before its predecessor. + // Don't need to check the predecessor as will never intersect. + _lineSegmentsIntersectsRange: function (p, p1, maxIndex, minIndex) { + var points = this._getProjectedPoints(), + p2, p3; + + minIndex = minIndex || 0; + + // Check all previous line segments (beside the immediately previous) for intersections + for (var j = maxIndex; j > minIndex; j--) { + p2 = points[j - 1]; + p3 = points[j]; + + if (L.LineUtil.segmentsIntersect(p, p1, p2, p3)) { + return true; + } + } + + return false; + }, + + _getProjectedPoints: function () { + if (!this._defaultShape) { + return this._originalPoints; + } + var points = [], + _shape = this._defaultShape(); + + for (var i = 0; i < _shape.length; i++) { + points.push(this._map.latLngToLayerPoint(_shape[i])); + } + return points; + } +}); + + + +/** + * @class L.Polygon + * @aka Polygon + */ +L.Polygon.include({ + + // @method intersects(): boolean + // Checks a polygon for any intersecting line segments. Ignores holes. + intersects: function () { + var polylineIntersects, + points = this._getProjectedPoints(), + len, firstPoint, lastPoint, maxIndex; + + if (this._tooFewPointsForIntersection()) { + return false; + } + + polylineIntersects = L.Polyline.prototype.intersects.call(this); + + // If already found an intersection don't need to check for any more. + if (polylineIntersects) { + return true; + } + + len = points.length; + firstPoint = points[0]; + lastPoint = points[len - 1]; + maxIndex = len - 2; + + // Check the line segment between last and first point. Don't need to check the first line segment (minIndex = 1) + return this._lineSegmentsIntersectsRange(lastPoint, firstPoint, maxIndex, 1); + } +}); + + + +/** + * @class L.Control.Draw + * @aka L.Draw + */ +L.Control.Draw = L.Control.extend({ + + // Options + options: { + position: 'topleft', + draw: {}, + edit: false + }, + + // @method initialize(): void + // Initializes draw control, toolbars from the options + initialize: function (options) { + if (L.version < '0.7') { + throw new Error('Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/'); + } + + L.Control.prototype.initialize.call(this, options); + + var toolbar; + + this._toolbars = {}; + + // Initialize toolbars + if (L.DrawToolbar && this.options.draw) { + toolbar = new L.DrawToolbar(this.options.draw); + + this._toolbars[L.DrawToolbar.TYPE] = toolbar; + + // Listen for when toolbar is enabled + this._toolbars[L.DrawToolbar.TYPE].on('enable', this._toolbarEnabled, this); + } + + if (L.EditToolbar && this.options.edit) { + toolbar = new L.EditToolbar(this.options.edit); + + this._toolbars[L.EditToolbar.TYPE] = toolbar; + + // Listen for when toolbar is enabled + this._toolbars[L.EditToolbar.TYPE].on('enable', this._toolbarEnabled, this); + } + L.toolbar = this; //set global var for editing the toolbar + }, + + // @method onAdd(): container + // Adds the toolbar container to the map + onAdd: function (map) { + var container = L.DomUtil.create('div', 'leaflet-draw'), + addedTopClass = false, + topClassName = 'leaflet-draw-toolbar-top', + toolbarContainer; + + for (var toolbarId in this._toolbars) { + if (this._toolbars.hasOwnProperty(toolbarId)) { + toolbarContainer = this._toolbars[toolbarId].addToolbar(map); + + if (toolbarContainer) { + // Add class to the first toolbar to remove the margin + if (!addedTopClass) { + if (!L.DomUtil.hasClass(toolbarContainer, topClassName)) { + L.DomUtil.addClass(toolbarContainer.childNodes[0], topClassName); + } + addedTopClass = true; + } + + container.appendChild(toolbarContainer); + } + } + } + + return container; + }, + + // @method onRemove(): void + // Removes the toolbars from the map toolbar container + onRemove: function () { + for (var toolbarId in this._toolbars) { + if (this._toolbars.hasOwnProperty(toolbarId)) { + this._toolbars[toolbarId].removeToolbar(); + } + } + }, + + // @method setDrawingOptions(options): void + // Sets options to all toolbar instances + setDrawingOptions: function (options) { + for (var toolbarId in this._toolbars) { + if (this._toolbars[toolbarId] instanceof L.DrawToolbar) { + this._toolbars[toolbarId].setOptions(options); + } + } + }, + + _toolbarEnabled: function (e) { + var enabledToolbar = e.target; + + for (var toolbarId in this._toolbars) { + if (this._toolbars[toolbarId] !== enabledToolbar) { + this._toolbars[toolbarId].disable(); + } + } + } +}); + +L.Map.mergeOptions({ + drawControlTooltips: true, + drawControl: false +}); + +L.Map.addInitHook(function () { + if (this.options.drawControl) { + this.drawControl = new L.Control.Draw(); + this.addControl(this.drawControl); + } +}); + + + +/** + * @class L.Draw.Toolbar + * @aka Toolbar + * + * The toolbar class of the API — it is used to create the ui + * This will be depreciated + * + * @example + * + * ```js + * var toolbar = L.Toolbar(); + * toolbar.addToolbar(map); + * ``` + * + * ### Disabling a toolbar + * + * If you do not want a particular toolbar in your app you can turn it off by setting the toolbar to false. + * + * ```js + * var drawControl = new L.Control.Draw({ + * draw: false, + * edit: { + * featureGroup: editableLayers + * } + * }); + * ``` + * + * ### Disabling a toolbar item + * + * If you want to turn off a particular toolbar item, set it to false. The following disables drawing polygons and + * markers. It also turns off the ability to edit layers. + * + * ```js + * var drawControl = new L.Control.Draw({ + * draw: { + * polygon: false, + * marker: false + * }, + * edit: { + * featureGroup: editableLayers, + * edit: false + * } + * }); + * ``` + */ +L.Toolbar = L.Class.extend({ + // @section Methods for modifying the toolbar + + // @method initialize(options): void + // Toolbar constructor + initialize: function (options) { + L.setOptions(this, options); + + this._modes = {}; + this._actionButtons = []; + this._activeMode = null; + + var version = L.version.split('.'); + //If Version is >= 1.2.0 + if (parseInt(version[0], 10) === 1 && parseInt(version[1], 10) >= 2) { + L.Toolbar.include(L.Evented.prototype); + } else { + L.Toolbar.include(L.Mixin.Events); + } + }, + + // @method enabled(): boolean + // Gets a true/false of whether the toolbar is enabled + enabled: function () { + return this._activeMode !== null; + }, + + // @method disable(): void + // Disables the toolbar + disable: function () { + if (!this.enabled()) { + return; + } + + this._activeMode.handler.disable(); + }, + + // @method addToolbar(map): L.DomUtil + // Adds the toolbar to the map and returns the toolbar dom element + addToolbar: function (map) { + var container = L.DomUtil.create('div', 'leaflet-draw-section'), + buttonIndex = 0, + buttonClassPrefix = this._toolbarClass || '', + modeHandlers = this.getModeHandlers(map), + i; + + this._toolbarContainer = L.DomUtil.create('div', 'leaflet-draw-toolbar leaflet-bar'); + this._map = map; + + for (i = 0; i < modeHandlers.length; i++) { + if (modeHandlers[i].enabled) { + this._initModeHandler( + modeHandlers[i].handler, + this._toolbarContainer, + buttonIndex++, + buttonClassPrefix, + modeHandlers[i].title + ); + } + } + + // if no buttons were added, do not add the toolbar + if (!buttonIndex) { + return; + } + + // Save button index of the last button, -1 as we would have ++ after the last button + this._lastButtonIndex = --buttonIndex; + + // Create empty actions part of the toolbar + this._actionsContainer = L.DomUtil.create('ul', 'leaflet-draw-actions'); + + // Add draw and cancel containers to the control container + container.appendChild(this._toolbarContainer); + container.appendChild(this._actionsContainer); + + return container; + }, + + // @method removeToolbar(): void + // Removes the toolbar and drops the handler event listeners + removeToolbar: function () { + // Dispose each handler + for (var handlerId in this._modes) { + if (this._modes.hasOwnProperty(handlerId)) { + // Unbind handler button + this._disposeButton( + this._modes[handlerId].button, + this._modes[handlerId].handler.enable, + this._modes[handlerId].handler + ); + + // Make sure is disabled + this._modes[handlerId].handler.disable(); + + // Unbind handler + this._modes[handlerId].handler + .off('enabled', this._handlerActivated, this) + .off('disabled', this._handlerDeactivated, this); + } + } + this._modes = {}; + + // Dispose the actions toolbar + for (var i = 0, l = this._actionButtons.length; i < l; i++) { + this._disposeButton( + this._actionButtons[i].button, + this._actionButtons[i].callback, + this + ); + } + this._actionButtons = []; + this._actionsContainer = null; + }, + + _initModeHandler: function (handler, container, buttonIndex, classNamePredix, buttonTitle) { + var type = handler.type; + + this._modes[type] = {}; + + this._modes[type].handler = handler; + + this._modes[type].button = this._createButton({ + type: type, + title: buttonTitle, + className: classNamePredix + '-' + type, + container: container, + callback: this._modes[type].handler.enable, + context: this._modes[type].handler + }); + + this._modes[type].buttonIndex = buttonIndex; + + this._modes[type].handler + .on('enabled', this._handlerActivated, this) + .on('disabled', this._handlerDeactivated, this); + }, + + /* Detect iOS based on browser User Agent, based on: + * http://stackoverflow.com/a/9039885 */ + _detectIOS: function () { + var iOS = (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream); + return iOS; + }, + + _createButton: function (options) { + + var link = L.DomUtil.create('a', options.className || '', options.container); + // Screen reader tag + var sr = L.DomUtil.create('span', 'sr-only', options.container); + + link.href = '#'; + link.appendChild(sr); + + if (options.title) { + link.title = options.title; + sr.innerHTML = options.title; + } + + if (options.text) { + link.innerHTML = options.text; + sr.innerHTML = options.text; + } + + /* iOS does not use click events */ + var buttonEvent = this._detectIOS() ? 'touchstart' : 'click'; + + L.DomEvent + .on(link, 'click', L.DomEvent.stopPropagation) + .on(link, 'mousedown', L.DomEvent.stopPropagation) + .on(link, 'dblclick', L.DomEvent.stopPropagation) + .on(link, 'touchstart', L.DomEvent.stopPropagation) + .on(link, 'click', L.DomEvent.preventDefault) + .on(link, buttonEvent, options.callback, options.context); + + return link; + }, + + _disposeButton: function (button, callback) { + /* iOS does not use click events */ + var buttonEvent = this._detectIOS() ? 'touchstart' : 'click'; + + L.DomEvent + .off(button, 'click', L.DomEvent.stopPropagation) + .off(button, 'mousedown', L.DomEvent.stopPropagation) + .off(button, 'dblclick', L.DomEvent.stopPropagation) + .off(button, 'touchstart', L.DomEvent.stopPropagation) + .off(button, 'click', L.DomEvent.preventDefault) + .off(button, buttonEvent, callback); + }, + + _handlerActivated: function (e) { + // Disable active mode (if present) + this.disable(); + + // Cache new active feature + this._activeMode = this._modes[e.handler]; + + L.DomUtil.addClass(this._activeMode.button, 'leaflet-draw-toolbar-button-enabled'); + + this._showActionsToolbar(); + + this.fire('enable'); + }, + + _handlerDeactivated: function () { + this._hideActionsToolbar(); + + L.DomUtil.removeClass(this._activeMode.button, 'leaflet-draw-toolbar-button-enabled'); + + this._activeMode = null; + + this.fire('disable'); + }, + + _createActions: function (handler) { + var container = this._actionsContainer, + buttons = this.getActions(handler), + l = buttons.length, + li, di, dl, button; + + // Dispose the actions toolbar (todo: dispose only not used buttons) + for (di = 0, dl = this._actionButtons.length; di < dl; di++) { + this._disposeButton(this._actionButtons[di].button, this._actionButtons[di].callback); + } + this._actionButtons = []; + + // Remove all old buttons + while (container.firstChild) { + container.removeChild(container.firstChild); + } + + for (var i = 0; i < l; i++) { + if ('enabled' in buttons[i] && !buttons[i].enabled) { + continue; + } + + li = L.DomUtil.create('li', '', container); + + button = this._createButton({ + title: buttons[i].title, + text: buttons[i].text, + container: li, + callback: buttons[i].callback, + context: buttons[i].context + }); + + this._actionButtons.push({ + button: button, + callback: buttons[i].callback + }); + } + }, + + _showActionsToolbar: function () { + var buttonIndex = this._activeMode.buttonIndex, + lastButtonIndex = this._lastButtonIndex, + toolbarPosition = this._activeMode.button.offsetTop - 1; + + // Recreate action buttons on every click + this._createActions(this._activeMode.handler); + + // Correctly position the cancel button + this._actionsContainer.style.top = toolbarPosition + 'px'; + + if (buttonIndex === 0) { + L.DomUtil.addClass(this._toolbarContainer, 'leaflet-draw-toolbar-notop'); + L.DomUtil.addClass(this._actionsContainer, 'leaflet-draw-actions-top'); + } + + if (buttonIndex === lastButtonIndex) { + L.DomUtil.addClass(this._toolbarContainer, 'leaflet-draw-toolbar-nobottom'); + L.DomUtil.addClass(this._actionsContainer, 'leaflet-draw-actions-bottom'); + } + + this._actionsContainer.style.display = 'block'; + this._map.fire(L.Draw.Event.TOOLBAROPENED); + }, + + _hideActionsToolbar: function () { + this._actionsContainer.style.display = 'none'; + + L.DomUtil.removeClass(this._toolbarContainer, 'leaflet-draw-toolbar-notop'); + L.DomUtil.removeClass(this._toolbarContainer, 'leaflet-draw-toolbar-nobottom'); + L.DomUtil.removeClass(this._actionsContainer, 'leaflet-draw-actions-top'); + L.DomUtil.removeClass(this._actionsContainer, 'leaflet-draw-actions-bottom'); + this._map.fire(L.Draw.Event.TOOLBARCLOSED); + } +}); + + + +L.Draw = L.Draw || {}; +/** + * @class L.Draw.Tooltip + * @aka Tooltip + * + * The tooltip class — it is used to display the tooltip while drawing + * This will be depreciated + * + * @example + * + * ```js + * var tooltip = L.Draw.Tooltip(); + * ``` + * + */ +L.Draw.Tooltip = L.Class.extend({ + + // @section Methods for modifying draw state + + // @method initialize(map): void + // Tooltip constructor + initialize: function (map) { + this._map = map; + this._popupPane = map._panes.popupPane; + this._visible = false; + + this._container = map.options.drawControlTooltips ? + L.DomUtil.create('div', 'leaflet-draw-tooltip', this._popupPane) : null; + this._singleLineLabel = false; + + this._map.on('mouseout', this._onMouseOut, this); + }, + + // @method dispose(): void + // Remove Tooltip DOM and unbind events + dispose: function () { + this._map.off('mouseout', this._onMouseOut, this); + + if (this._container) { + this._popupPane.removeChild(this._container); + this._container = null; + } + }, + + // @method updateContent(labelText): this + // Changes the tooltip text to string in function call + updateContent: function (labelText) { + if (!this._container) { + return this; + } + labelText.subtext = labelText.subtext || ''; + + // update the vertical position (only if changed) + if (labelText.subtext.length === 0 && !this._singleLineLabel) { + L.DomUtil.addClass(this._container, 'leaflet-draw-tooltip-single'); + this._singleLineLabel = true; + } + else if (labelText.subtext.length > 0 && this._singleLineLabel) { + L.DomUtil.removeClass(this._container, 'leaflet-draw-tooltip-single'); + this._singleLineLabel = false; + } + + this._container.innerHTML = + (labelText.subtext.length > 0 ? + '' + labelText.subtext + '' + '
    ' : '') + + '' + labelText.text + ''; + + if (!labelText.text && !labelText.subtext) { + this._visible = false; + this._container.style.visibility = 'hidden'; + } else { + this._visible = true; + this._container.style.visibility = 'inherit'; + } + + return this; + }, + + // @method updatePosition(latlng): this + // Changes the location of the tooltip + updatePosition: function (latlng) { + var pos = this._map.latLngToLayerPoint(latlng), + tooltipContainer = this._container; + + if (this._container) { + if (this._visible) { + tooltipContainer.style.visibility = 'inherit'; + } + L.DomUtil.setPosition(tooltipContainer, pos); + } + + return this; + }, + + // @method showAsError(): this + // Applies error class to tooltip + showAsError: function () { + if (this._container) { + L.DomUtil.addClass(this._container, 'leaflet-error-draw-tooltip'); + } + return this; + }, + + // @method removeError(): this + // Removes the error class from the tooltip + removeError: function () { + if (this._container) { + L.DomUtil.removeClass(this._container, 'leaflet-error-draw-tooltip'); + } + return this; + }, + + _onMouseOut: function () { + if (this._container) { + this._container.style.visibility = 'hidden'; + } + } +}); + + + +/** + * @class L.DrawToolbar + * @aka Toolbar + */ +L.DrawToolbar = L.Toolbar.extend({ + + statics: { + TYPE: 'draw' + }, + + options: { + polyline: {}, + polygon: {}, + rectangle: {}, + circle: {}, + marker: {}, + circlemarker: {} + }, + + // @method initialize(): void + initialize: function (options) { + // Ensure that the options are merged correctly since L.extend is only shallow + for (var type in this.options) { + if (this.options.hasOwnProperty(type)) { + if (options[type]) { + options[type] = L.extend({}, this.options[type], options[type]); + } + } + } + + this._toolbarClass = 'leaflet-draw-draw'; + L.Toolbar.prototype.initialize.call(this, options); + }, + + // @method getModeHandlers(): object + // Get mode handlers information + getModeHandlers: function (map) { + return [ + { + enabled: this.options.polyline, + handler: new L.Draw.Polyline(map, this.options.polyline), + title: L.drawLocal.draw.toolbar.buttons.polyline + }, + { + enabled: this.options.polygon, + handler: new L.Draw.Polygon(map, this.options.polygon), + title: L.drawLocal.draw.toolbar.buttons.polygon + }, + { + enabled: this.options.rectangle, + handler: new L.Draw.Rectangle(map, this.options.rectangle), + title: L.drawLocal.draw.toolbar.buttons.rectangle + }, + { + enabled: this.options.circle, + handler: new L.Draw.Circle(map, this.options.circle), + title: L.drawLocal.draw.toolbar.buttons.circle + }, + { + enabled: this.options.marker, + handler: new L.Draw.Marker(map, this.options.marker), + title: L.drawLocal.draw.toolbar.buttons.marker + }, + { + enabled: this.options.circlemarker, + handler: new L.Draw.CircleMarker(map, this.options.circlemarker), + title: L.drawLocal.draw.toolbar.buttons.circlemarker + } + ]; + }, + + // @method getActions(): object + // Get action information + getActions: function (handler) { + return [ + { + enabled: handler.completeShape, + title: L.drawLocal.draw.toolbar.finish.title, + text: L.drawLocal.draw.toolbar.finish.text, + callback: handler.completeShape, + context: handler + }, + { + enabled: handler.deleteLastVertex, + title: L.drawLocal.draw.toolbar.undo.title, + text: L.drawLocal.draw.toolbar.undo.text, + callback: handler.deleteLastVertex, + context: handler + }, + { + title: L.drawLocal.draw.toolbar.actions.title, + text: L.drawLocal.draw.toolbar.actions.text, + callback: this.disable, + context: this + } + ]; + }, + + // @method setOptions(): void + // Sets the options to the toolbar + setOptions: function (options) { + L.setOptions(this, options); + + for (var type in this._modes) { + if (this._modes.hasOwnProperty(type) && options.hasOwnProperty(type)) { + this._modes[type].handler.setOptions(options[type]); + } + } + } +}); + + + +/*L.Map.mergeOptions({ + editControl: true + });*/ +/** + * @class L.EditToolbar + * @aka EditToolbar + */ +L.EditToolbar = L.Toolbar.extend({ + statics: { + TYPE: 'edit' + }, + + options: { + edit: { + selectedPathOptions: { + dashArray: '10, 10', + + fill: true, + fillColor: '#fe57a1', + fillOpacity: 0.1, + + // Whether to user the existing layers color + maintainColor: false + } + }, + remove: {}, + poly: null, + featureGroup: null /* REQUIRED! TODO: perhaps if not set then all layers on the map are selectable? */ + }, + + // @method intialize(): void + initialize: function (options) { + // Need to set this manually since null is an acceptable value here + if (options.edit) { + if (typeof options.edit.selectedPathOptions === 'undefined') { + options.edit.selectedPathOptions = this.options.edit.selectedPathOptions; + } + options.edit.selectedPathOptions = L.extend({}, this.options.edit.selectedPathOptions, options.edit.selectedPathOptions); + } + + if (options.remove) { + options.remove = L.extend({}, this.options.remove, options.remove); + } + + if (options.poly) { + options.poly = L.extend({}, this.options.poly, options.poly); + } + + this._toolbarClass = 'leaflet-draw-edit'; + L.Toolbar.prototype.initialize.call(this, options); + + this._selectedFeatureCount = 0; + }, + + // @method getModeHandlers(): object + // Get mode handlers information + getModeHandlers: function (map) { + var featureGroup = this.options.featureGroup; + return [ + { + enabled: this.options.edit, + handler: new L.EditToolbar.Edit(map, { + featureGroup: featureGroup, + selectedPathOptions: this.options.edit.selectedPathOptions, + poly: this.options.poly + }), + title: L.drawLocal.edit.toolbar.buttons.edit + }, + { + enabled: this.options.remove, + handler: new L.EditToolbar.Delete(map, { + featureGroup: featureGroup + }), + title: L.drawLocal.edit.toolbar.buttons.remove + } + ]; + }, + + // @method getActions(): object + // Get actions information + getActions: function (handler) { + var actions = [ + { + title: L.drawLocal.edit.toolbar.actions.save.title, + text: L.drawLocal.edit.toolbar.actions.save.text, + callback: this._save, + context: this + }, + { + title: L.drawLocal.edit.toolbar.actions.cancel.title, + text: L.drawLocal.edit.toolbar.actions.cancel.text, + callback: this.disable, + context: this + } + ]; + + if (handler.removeAllLayers) { + actions.push({ + title: L.drawLocal.edit.toolbar.actions.clearAll.title, + text: L.drawLocal.edit.toolbar.actions.clearAll.text, + callback: this._clearAllLayers, + context: this + }); + } + + return actions; + }, + + // @method addToolbar(map): L.DomUtil + // Adds the toolbar to the map + addToolbar: function (map) { + var container = L.Toolbar.prototype.addToolbar.call(this, map); + + this._checkDisabled(); + + this.options.featureGroup.on('layeradd layerremove', this._checkDisabled, this); + + return container; + }, + + // @method removeToolbar(): void + // Removes the toolbar from the map + removeToolbar: function () { + this.options.featureGroup.off('layeradd layerremove', this._checkDisabled, this); + + L.Toolbar.prototype.removeToolbar.call(this); + }, + + // @method disable(): void + // Disables the toolbar + disable: function () { + if (!this.enabled()) { + return; + } + + this._activeMode.handler.revertLayers(); + + L.Toolbar.prototype.disable.call(this); + }, + + _save: function () { + this._activeMode.handler.save(); + if (this._activeMode) { + this._activeMode.handler.disable(); + } + }, + + _clearAllLayers: function () { + this._activeMode.handler.removeAllLayers(); + if (this._activeMode) { + this._activeMode.handler.disable(); + } + }, + + _checkDisabled: function () { + var featureGroup = this.options.featureGroup, + hasLayers = featureGroup.getLayers().length !== 0, + button; + + if (this.options.edit) { + button = this._modes[L.EditToolbar.Edit.TYPE].button; + + if (hasLayers) { + L.DomUtil.removeClass(button, 'leaflet-disabled'); + } else { + L.DomUtil.addClass(button, 'leaflet-disabled'); + } + + button.setAttribute( + 'title', + hasLayers ? + L.drawLocal.edit.toolbar.buttons.edit + : L.drawLocal.edit.toolbar.buttons.editDisabled + ); + } + + if (this.options.remove) { + button = this._modes[L.EditToolbar.Delete.TYPE].button; + + if (hasLayers) { + L.DomUtil.removeClass(button, 'leaflet-disabled'); + } else { + L.DomUtil.addClass(button, 'leaflet-disabled'); + } + + button.setAttribute( + 'title', + hasLayers ? + L.drawLocal.edit.toolbar.buttons.remove + : L.drawLocal.edit.toolbar.buttons.removeDisabled + ); + } + } +}); + + + +/** + * @class L.EditToolbar.Edit + * @aka EditToolbar.Edit + */ +L.EditToolbar.Edit = L.Handler.extend({ + statics: { + TYPE: 'edit' + }, + + // @method intialize(): void + initialize: function (map, options) { + L.Handler.prototype.initialize.call(this, map); + + L.setOptions(this, options); + + // Store the selectable layer group for ease of access + this._featureGroup = options.featureGroup; + + if (!(this._featureGroup instanceof L.FeatureGroup)) { + throw new Error('options.featureGroup must be a L.FeatureGroup'); + } + + this._uneditedLayerProps = {}; + + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.EditToolbar.Edit.TYPE; + + var version = L.version.split('.'); + //If Version is >= 1.2.0 + if (parseInt(version[0], 10) === 1 && parseInt(version[1], 10) >= 2) { + L.EditToolbar.Edit.include(L.Evented.prototype); + } else { + L.EditToolbar.Edit.include(L.Mixin.Events); + } + }, + + // @method enable(): void + // Enable the edit toolbar + enable: function () { + if (this._enabled || !this._hasAvailableLayers()) { + return; + } + this.fire('enabled', {handler: this.type}); + //this disable other handlers + + this._map.fire(L.Draw.Event.EDITSTART, {handler: this.type}); + //allow drawLayer to be updated before beginning edition. + + L.Handler.prototype.enable.call(this); + this._featureGroup + .on('layeradd', this._enableLayerEdit, this) + .on('layerremove', this._disableLayerEdit, this); + }, + + // @method disable(): void + // Disable the edit toolbar + disable: function () { + if (!this._enabled) { + return; + } + this._featureGroup + .off('layeradd', this._enableLayerEdit, this) + .off('layerremove', this._disableLayerEdit, this); + L.Handler.prototype.disable.call(this); + this._map.fire(L.Draw.Event.EDITSTOP, {handler: this.type}); + this.fire('disabled', {handler: this.type}); + }, + + // @method addHooks(): void + // Add listener hooks for this handler + addHooks: function () { + var map = this._map; + + if (map) { + map.getContainer().focus(); + + this._featureGroup.eachLayer(this._enableLayerEdit, this); + + this._tooltip = new L.Draw.Tooltip(this._map); + this._tooltip.updateContent({ + text: L.drawLocal.edit.handlers.edit.tooltip.text, + subtext: L.drawLocal.edit.handlers.edit.tooltip.subtext + }); + + // Quickly access the tooltip to update for intersection checking + map._editTooltip = this._tooltip; + + this._updateTooltip(); + + this._map + .on('mousemove', this._onMouseMove, this) + .on('touchmove', this._onMouseMove, this) + .on('MSPointerMove', this._onMouseMove, this) + .on(L.Draw.Event.EDITVERTEX, this._updateTooltip, this); + } + }, + + // @method removeHooks(): void + // Remove listener hooks for this handler + removeHooks: function () { + if (this._map) { + // Clean up selected layers. + this._featureGroup.eachLayer(this._disableLayerEdit, this); + + // Clear the backups of the original layers + this._uneditedLayerProps = {}; + + this._tooltip.dispose(); + this._tooltip = null; + + this._map + .off('mousemove', this._onMouseMove, this) + .off('touchmove', this._onMouseMove, this) + .off('MSPointerMove', this._onMouseMove, this) + .off(L.Draw.Event.EDITVERTEX, this._updateTooltip, this); + } + }, + + // @method revertLayers(): void + // Revert each layer's geometry changes + revertLayers: function () { + this._featureGroup.eachLayer(function (layer) { + this._revertLayer(layer); + }, this); + }, + + // @method save(): void + // Save the layer geometries + save: function () { + var editedLayers = new L.LayerGroup(); + this._featureGroup.eachLayer(function (layer) { + if (layer.edited) { + editedLayers.addLayer(layer); + layer.edited = false; + } + }); + this._map.fire(L.Draw.Event.EDITED, {layers: editedLayers}); + }, + + _backupLayer: function (layer) { + var id = L.Util.stamp(layer); + + if (!this._uneditedLayerProps[id]) { + // Polyline, Polygon or Rectangle + if (layer instanceof L.Polyline || layer instanceof L.Polygon || layer instanceof L.Rectangle) { + this._uneditedLayerProps[id] = { + latlngs: L.LatLngUtil.cloneLatLngs(layer.getLatLngs()) + }; + } else if (layer instanceof L.Circle) { + this._uneditedLayerProps[id] = { + latlng: L.LatLngUtil.cloneLatLng(layer.getLatLng()), + radius: layer.getRadius() + }; + } else if (layer instanceof L.Marker || layer instanceof L.CircleMarker) { // Marker + this._uneditedLayerProps[id] = { + latlng: L.LatLngUtil.cloneLatLng(layer.getLatLng()) + }; + } + } + }, + + _getTooltipText: function () { + return ({ + text: L.drawLocal.edit.handlers.edit.tooltip.text, + subtext: L.drawLocal.edit.handlers.edit.tooltip.subtext + }); + }, + + _updateTooltip: function () { + this._tooltip.updateContent(this._getTooltipText()); + }, + + _revertLayer: function (layer) { + var id = L.Util.stamp(layer); + layer.edited = false; + if (this._uneditedLayerProps.hasOwnProperty(id)) { + // Polyline, Polygon or Rectangle + if (layer instanceof L.Polyline || layer instanceof L.Polygon || layer instanceof L.Rectangle) { + layer.setLatLngs(this._uneditedLayerProps[id].latlngs); + } else if (layer instanceof L.Circle) { + layer.setLatLng(this._uneditedLayerProps[id].latlng); + layer.setRadius(this._uneditedLayerProps[id].radius); + } else if (layer instanceof L.Marker || layer instanceof L.CircleMarker) { // Marker or CircleMarker + layer.setLatLng(this._uneditedLayerProps[id].latlng); + } + + layer.fire('revert-edited', {layer: layer}); + } + }, + + _enableLayerEdit: function (e) { + var layer = e.layer || e.target || e, + pathOptions, poly; + + // Back up this layer (if haven't before) + this._backupLayer(layer); + + if (this.options.poly) { + poly = L.Util.extend({}, this.options.poly); + layer.options.poly = poly; + } + + // Set different style for editing mode + if (this.options.selectedPathOptions) { + pathOptions = L.Util.extend({}, this.options.selectedPathOptions); + + // Use the existing color of the layer + if (pathOptions.maintainColor) { + pathOptions.color = layer.options.color; + pathOptions.fillColor = layer.options.fillColor; + } + + layer.options.original = L.extend({}, layer.options); + layer.options.editing = pathOptions; + + } + + if (layer instanceof L.Marker) { + if (layer.editing) { + layer.editing.enable(); + } + layer.dragging.enable(); + layer + .on('dragend', this._onMarkerDragEnd) + // #TODO: remove when leaflet finally fixes their draggable so it's touch friendly again. + .on('touchmove', this._onTouchMove, this) + .on('MSPointerMove', this._onTouchMove, this) + .on('touchend', this._onMarkerDragEnd, this) + .on('MSPointerUp', this._onMarkerDragEnd, this); + } else { + layer.editing.enable(); + } + }, + + _disableLayerEdit: function (e) { + var layer = e.layer || e.target || e; + + layer.edited = false; + if (layer.editing) { + layer.editing.disable(); + } + + delete layer.options.editing; + delete layer.options.original; + // Reset layer styles to that of before select + if (this._selectedPathOptions) { + if (layer instanceof L.Marker) { + this._toggleMarkerHighlight(layer); + } else { + // reset the layer style to what is was before being selected + layer.setStyle(layer.options.previousOptions); + // remove the cached options for the layer object + delete layer.options.previousOptions; + } + } + + if (layer instanceof L.Marker) { + layer.dragging.disable(); + layer + .off('dragend', this._onMarkerDragEnd, this) + .off('touchmove', this._onTouchMove, this) + .off('MSPointerMove', this._onTouchMove, this) + .off('touchend', this._onMarkerDragEnd, this) + .off('MSPointerUp', this._onMarkerDragEnd, this); + } else { + layer.editing.disable(); + } + }, + + _onMouseMove: function (e) { + this._tooltip.updatePosition(e.latlng); + }, + + _onMarkerDragEnd: function (e) { + var layer = e.target; + layer.edited = true; + this._map.fire(L.Draw.Event.EDITMOVE, {layer: layer}); + }, + + _onTouchMove: function (e) { + var touchEvent = e.originalEvent.changedTouches[0], + layerPoint = this._map.mouseEventToLayerPoint(touchEvent), + latlng = this._map.layerPointToLatLng(layerPoint); + e.target.setLatLng(latlng); + }, + + _hasAvailableLayers: function () { + return this._featureGroup.getLayers().length !== 0; + } +}); + + + +/** + * @class L.EditToolbar.Delete + * @aka EditToolbar.Delete + */ +L.EditToolbar.Delete = L.Handler.extend({ + statics: { + TYPE: 'remove' // not delete as delete is reserved in js + }, + + // @method intialize(): void + initialize: function (map, options) { + L.Handler.prototype.initialize.call(this, map); + + L.Util.setOptions(this, options); + + // Store the selectable layer group for ease of access + this._deletableLayers = this.options.featureGroup; + + if (!(this._deletableLayers instanceof L.FeatureGroup)) { + throw new Error('options.featureGroup must be a L.FeatureGroup'); + } + + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.EditToolbar.Delete.TYPE; + + var version = L.version.split('.'); + //If Version is >= 1.2.0 + if (parseInt(version[0], 10) === 1 && parseInt(version[1], 10) >= 2) { + L.EditToolbar.Delete.include(L.Evented.prototype); + } else { + L.EditToolbar.Delete.include(L.Mixin.Events); + } + + }, + + // @method enable(): void + // Enable the delete toolbar + enable: function () { + if (this._enabled || !this._hasAvailableLayers()) { + return; + } + this.fire('enabled', {handler: this.type}); + + this._map.fire(L.Draw.Event.DELETESTART, {handler: this.type}); + + L.Handler.prototype.enable.call(this); + + this._deletableLayers + .on('layeradd', this._enableLayerDelete, this) + .on('layerremove', this._disableLayerDelete, this); + }, + + // @method disable(): void + // Disable the delete toolbar + disable: function () { + if (!this._enabled) { + return; + } + + this._deletableLayers + .off('layeradd', this._enableLayerDelete, this) + .off('layerremove', this._disableLayerDelete, this); + + L.Handler.prototype.disable.call(this); + + this._map.fire(L.Draw.Event.DELETESTOP, {handler: this.type}); + + this.fire('disabled', {handler: this.type}); + }, + + // @method addHooks(): void + // Add listener hooks to this handler + addHooks: function () { + var map = this._map; + + if (map) { + map.getContainer().focus(); + + this._deletableLayers.eachLayer(this._enableLayerDelete, this); + this._deletedLayers = new L.LayerGroup(); + + this._tooltip = new L.Draw.Tooltip(this._map); + this._tooltip.updateContent({text: L.drawLocal.edit.handlers.remove.tooltip.text}); + + this._map.on('mousemove', this._onMouseMove, this); + } + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler + removeHooks: function () { + if (this._map) { + this._deletableLayers.eachLayer(this._disableLayerDelete, this); + this._deletedLayers = null; + + this._tooltip.dispose(); + this._tooltip = null; + + this._map.off('mousemove', this._onMouseMove, this); + } + }, + + // @method revertLayers(): void + // Revert the deleted layers back to their prior state. + revertLayers: function () { + // Iterate of the deleted layers and add them back into the featureGroup + this._deletedLayers.eachLayer(function (layer) { + this._deletableLayers.addLayer(layer); + layer.fire('revert-deleted', {layer: layer}); + }, this); + }, + + // @method save(): void + // Save deleted layers + save: function () { + this._map.fire(L.Draw.Event.DELETED, {layers: this._deletedLayers}); + }, + + // @method removeAllLayers(): void + // Remove all delateable layers + removeAllLayers: function () { + // Iterate of the delateable layers and add remove them + this._deletableLayers.eachLayer(function (layer) { + this._removeLayer({layer: layer}); + }, this); + this.save(); + }, + + _enableLayerDelete: function (e) { + var layer = e.layer || e.target || e; + + layer.on('click', this._removeLayer, this); + }, + + _disableLayerDelete: function (e) { + var layer = e.layer || e.target || e; + + layer.off('click', this._removeLayer, this); + + // Remove from the deleted layers so we can't accidentally revert if the user presses cancel + this._deletedLayers.removeLayer(layer); + }, + + _removeLayer: function (e) { + var layer = e.layer || e.target || e; + + this._deletableLayers.removeLayer(layer); + + this._deletedLayers.addLayer(layer); + + layer.fire('deleted'); + }, + + _onMouseMove: function (e) { + this._tooltip.updatePosition(e.latlng); + }, + + _hasAvailableLayers: function () { + return this._deletableLayers.getLayers().length !== 0; + } +}); + + + +}(window, document)); +//# sourceMappingURL=leaflet.draw-src.map + +/***/ }), +/* 118 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var ReverseGeocodingDOM = { + /** + * Add uuid to the tag ID + * @param {String} id - id selector + * @returns {String} uid - id selector with an unique id + */ + _addUID: function _addUID(id) { + var uid = this._uid ? id + "-" + this._uid : id; + return uid; + }, + /** + * Main container (DOM) + * + * @returns {DOMElement} DOM element + */ + _createMainContainerElement: function _createMainContainerElement() { + var container = document.createElement("div"); + container.id = this._addUID("GPreverseGeocoding"); + container.className = "GPwidget"; + return container; + }, + // ################################################################### // + // ################### Methods of main container ##################### // + // ################################################################### // + + /** + * Hidden checkbox for minimizing/maximizing + * + * @returns {DOMElement} DOM element + */ + _createShowReverseGeocodingElement: function _createShowReverseGeocodingElement() { + var input = document.createElement("input"); + input.id = this._addUID("GPshowReverseGeocoding"); + input.type = "checkbox"; + return input; + }, + /** + * Show ReverseGeocoding + * + * @returns {DOMElement} DOM element + */ + _createShowReverseGeocodingPictoElement: function _createShowReverseGeocodingPictoElement() { + // contexte d'execution + var self = this; + var label = document.createElement("label"); + label.id = this._addUID("GPshowReverseGeocodingPicto"); + label.className = "GPshowAdvancedToolPicto"; + label.htmlFor = this._addUID("GPshowReverseGeocoding"); + label.title = "Ouvrir la recherche inverse"; + + // Close all results and panels when minimizing the widget + if (label.addEventListener) { + label.addEventListener("click", function () { + self.onShowReverseGeocodingClick(); + }); + } else if (label.attachEvent) { + label.attachEvent("onclick", function () { + self.onShowReverseGeocodingClick(); + }); + } + var spanOpen = document.createElement("span"); + spanOpen.id = this._addUID("GPshowReverseGeocodingOpen"); + spanOpen.className = "GPshowAdvancedToolOpen"; + label.appendChild(spanOpen); + return label; + }, + /** + * Create Waiting Panel + * + * @returns {DOMElement} DOM element + */ + _createReverseGeocodingWaitingElement: function _createReverseGeocodingWaitingElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPreverseGeocodingCalcWaitingContainer"); + div.className = "GPreverseGeocodingCalcWaitingContainerHidden"; + var p = document.createElement("p"); + p.className = "GPreverseGeocodingCalcWaiting"; + p.innerHTML = "Recherche en cours..."; + div.appendChild(p); + return div; + }, + /** + * Reverse geocoding results panel element. + * + * @returns {DOMElement} DOM element + */ + _createReverseGeocodingResultsPanelElement: function _createReverseGeocodingResultsPanelElement() { + var resultsPanelDiv = document.createElement("div"); + resultsPanelDiv.id = this._addUID("GPreverseGeocodingResultsPanel"); + resultsPanelDiv.className = "GPpanel GPreverseGeocodingComponentHidden"; + return resultsPanelDiv; + }, + /** + * Reverse geocoding results list. + * + * @returns {DOMElement} DOM element + */ + _createReverseGeocodingResultsListElement: function _createReverseGeocodingResultsListElement() { + var container = document.createElement("div"); + container.id = this._addUID("GPreverseGeocodingResultsList"); + // Results are dynamically filled in Javascript by reverse geocoding service + return container; + }, + /** + * Add Result + * (results dynamically generate !) + * + * @param {String} locationDescription - reverse geocoded location results + * @param {Number} id - ID + */ + _createReverseGeocodingResultElement: function _createReverseGeocodingResultElement(locationDescription, id) { + // contexte + var context = this; + var container = document.getElementById(this._addUID("GPreverseGeocodingResultsList")); + var div = document.createElement("div"); + div.id = this._addUID("ReverseGeocodedLocation_" + id); + div.className = "GPautoCompleteProposal"; + div.innerHTML = locationDescription; + div.title = locationDescription; + if (div.addEventListener) { + div.addEventListener("mouseover", function (e) { + context.onReverseGeocodingResultMouseOver(e); + }); + div.addEventListener("mouseout", function (e) { + context.onReverseGeocodingResultMouseOut(e); + }); + div.addEventListener("click", function (e) { + if (typeof context.onReverseGeocodingResultClick === "function") { + context.onReverseGeocodingResultClick(e); + } + }); + } else if (div.attachEvent) { + div.attachEvent("onmouseover", function (e) { + context.onReverseGeocodingResultMouseOver(e); + }); + div.attachEvent("onmouseout", function (e) { + context.onReverseGeocodingResultMouseOut(e); + }); + div.attachEvent("onclick", function (e) { + if (typeof context.onReverseGeocodingResultClick === "function") { + context.onReverseGeocodingResultClick(e); + } + }); + } + container.appendChild(div); + }, + // ################################################################### // + // ######################### Inputs panel ############################ // + // ################################################################### // + + /** + * Create Container Panel + * + * @returns {DOMElement} DOM element + */ + _createReverseGeocodingPanelElement: function _createReverseGeocodingPanelElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPreverseGeocodingPanel"); + div.className = "GPpanel"; + return div; + }, + /** + * Create Header Panel + * + * @returns {DOMElement} DOM element + */ + _createReverseGeocodingPanelHeaderElement: function _createReverseGeocodingPanelHeaderElement() { + var container = document.createElement("div"); + container.className = "GPpanelHeader"; + // info: on sépare les appels pour la création du picto de retour, + // du titre et de la croix de fermeture pour les récupérer dans le composant + return container; + }, + /** + * Create return picto in panel header + * + * @returns {DOMElement} DOM element + */ + _createReverseGeocodingPanelReturnPictoElement: function _createReverseGeocodingPanelReturnPictoElement() { + // contexte + var self = this; + var divNew = document.createElement("div"); + divNew.id = this._addUID("GPreverseGeocodingReturnPicto"); + divNew.title = "Nouvelle recherche"; + divNew.className = "GPreverseGeocodingReturnPictoHidden"; + if (divNew.addEventListener) { + divNew.addEventListener("click", function (e) { + document.getElementById(self._addUID("GPreverseGeocodingResultsPanel")).className = "GProuteComponentHidden"; + document.getElementById(self._addUID("GPreverseGeocodingForm")).className = ""; + document.getElementById(self._addUID("GPreverseGeocodingHeaderTitle")).innerHTML = "Recherche inverse"; + document.getElementById(self._addUID("GPreverseGeocodingReturnPicto")).className = "GPreverseGeocodingReturnPictoHidden"; + self.onGPreverseGeocodingReturnPictoClick(e); + }); + } else if (divNew.attachEvent) { + divNew.attachEvent("onclick", function (e) { + document.getElementById(self._addUID("GPreverseGeocodingResultsPanel")).className = "GProuteComponentHidden"; + document.getElementById(self._addUID("GPreverseGeocodingForm")).className = ""; + document.getElementById(self._addUID("GPreverseGeocodingHeaderTitle")).innerHTML = "Recherche inverse"; + document.getElementById(self._addUID("GPreverseGeocodingReturnPicto")).className = "GPreverseGeocodingReturnPictoHidden"; + self.onGPreverseGeocodingReturnPictoClick(e); + }); + } + return divNew; + }, + /** + * Create Header Title Panel + * + * @returns {DOMElement} DOM element + */ + _createReverseGeocodingPanelTitleElement: function _createReverseGeocodingPanelTitleElement() { + var div = document.createElement("div"); + div.className = "GPpanelTitle"; + div.id = this._addUID("GPreverseGeocodingHeaderTitle"); + div.innerHTML = "Recherche inverse"; + return div; + }, + /** + * Create Header close div + * + * @returns {DOMElement} DOM element + */ + _createReverseGeocodingPanelCloseElement: function _createReverseGeocodingPanelCloseElement() { + // contexte + var self = this; + var divClose = document.createElement("div"); + divClose.id = this._addUID("GPreverseGeocodingPanelClose"); + divClose.className = "GPpanelClose"; + divClose.title = "Fermer le panneau"; + + // Link panel close / visibility checkbox + if (divClose.addEventListener) { + divClose.addEventListener("click", function () { + document.getElementById(self._addUID("GPshowReverseGeocodingPicto")).click(); + }, false); + } else if (divClose.attachEvent) { + divClose.attachEvent("onclick", function () { + document.getElementById(self._addUID("GPshowReverseGeocodingPicto")).click(); + }); + } + return divClose; + }, + /** + * Create Form + * see event ! + * + * @returns {DOMElement} DOM element + */ + _createReverseGeocodingPanelFormElement: function _createReverseGeocodingPanelFormElement() { + // contexte d'execution + var self = this; + var form = document.createElement("form"); + form.id = this._addUID("GPreverseGeocodingForm"); + if (form.addEventListener) { + form.addEventListener("submit", function (e) { + e.preventDefault(); + self.onReverseGeocodingSubmit(); + }); + } else if (form.attachEvent) { + form.attachEvent("onsubmit", function (e) { + e.preventDefault(); + self.onReverseGeocodingSubmit(); + }); + } + return form; + }, + // ################################################################### // + // ####################### Choice mode into form ##################### // + // ################################################################### // + + /** + * Create Container to Mode choice geocoding type + * + * @param {Array} resources - geocoding resources to be displayed (and used) + * @returns {DOMElement} DOM element + */ + _createReverseGeocodingFormModeChoiceGeocodingTypeElement: function _createReverseGeocodingFormModeChoiceGeocodingTypeElement(resources) { + // contexte d'execution + var context = this; + var div = document.createElement("div"); + div.className = "GPflexInput"; + var label = document.createElement("label"); + label.className = "GPreverseGeocodingCodeLabel"; + label.innerHTML = "Recherche par"; + label.title = "Recherche par"; + div.appendChild(label); + var select = document.createElement("select"); + select.className = "GPreverseGeocodingCode"; + // gestionnaire d'evenement : on stocke la valeur du type de geocodage, + // utilisé dans la requête de géocodage inverse + if (select.addEventListener) { + select.addEventListener("change", function (e) { + context.onReverseGeocodingTypeChange(e); + }); + } else if (select.attachEvent) { + select.attachEvent("onchange", function (e) { + context.onReverseGeocodingTypeChange(e); + }); + } + + // on prend soit les valeurs passées par l'utilisateur, soit des valeurs par défaut + if (!resources || !Array.isArray(resources)) { + resources = ["StreetAddress", "PositionOfInterest", "CadastralParcel"]; + } + for (var i = 0; i < resources.length; i++) { + switch (resources[i]) { + case "PositionOfInterest": + var POIOption = document.createElement("option"); + POIOption.value = "PositionOfInterest"; + POIOption.text = "Lieux/toponymes"; + select.appendChild(POIOption); + break; + case "StreetAddress": + var SAOption = document.createElement("option"); + SAOption.value = "StreetAddress"; + SAOption.text = "Adresses"; + select.appendChild(SAOption); + break; + case "CadastralParcel": + var CPOption = document.createElement("option"); + CPOption.value = "CadastralParcel"; + CPOption.text = "Parcelles cadastrales"; + select.appendChild(CPOption); + break; + default: + break; + } + } + div.appendChild(select); + return div; + }, + /** + * Create Container to Mode choice geocoding delimitation + * + * @param {Array} delimitations - geocoding delimitations to be displayed (and used) + * @returns {DOMElement} DOM element + */ + _createReverseGeocodingFormModeChoiceGeocodingDelimitationElement: function _createReverseGeocodingFormModeChoiceGeocodingDelimitationElement(delimitations) { + // contexte d'execution + var context = this; + var div = document.createElement("div"); + div.className = "GPflexInput"; + var label = document.createElement("label"); + label.className = "GPreverseGeocodingCodeLabel"; + label.innerHTML = "Délimitation"; + label.title = "Délimitation"; + div.appendChild(label); + var select = document.createElement("select"); + select.className = "GPreverseGeocodingCode"; + // gestionnaire d'evenement : on stocke la valeur du type de délimitation, + // et on modifie l'événement de pointage sur la carte en fonction + if (select.addEventListener) { + select.addEventListener("change", function (e) { + context.onReverseGeocodingDelimitationChange(e); + }); + } else if (select.attachEvent) { + select.attachEvent("onchange", function (e) { + context.onReverseGeocodingDelimitationChange(e); + }); + } + + // on prend soit les valeurs passées par l'utilisateur, soit des valeurs par défaut + if (!delimitations || !Array.isArray(delimitations)) { + delimitations = ["Point", "Circle", "Extent"]; + } + for (var i = 0; i < delimitations.length; i++) { + switch (delimitations[i].toLowerCase()) { + case "point": + var pointOption = document.createElement("option"); + pointOption.value = "point"; + pointOption.text = "Pointer un lieu"; + select.appendChild(pointOption); + break; + case "circle": + var circleOption = document.createElement("option"); + circleOption.value = "circle"; + circleOption.text = "Dessiner un cercle"; + select.appendChild(circleOption); + break; + case "extent": + var extentOption = document.createElement("option"); + extentOption.value = "extent"; + extentOption.text = "Dessiner une emprise"; + select.appendChild(extentOption); + break; + default: + break; + } + } + div.appendChild(select); + return div; + }, + // ################################################################### // + // ########################### Submit Form ########################### // + // ################################################################### // + + /** + * Create Submit Form Element + * + * @returns {DOMElement} DOM element + */ + _createReverseGeocodingSubmitFormElement: function _createReverseGeocodingSubmitFormElement() { + var input = document.createElement("input"); + input.id = this._addUID("GPreverseGeocodingSubmit"); + input.className = "GPinputSubmit"; + input.type = "submit"; + input.value = "Rechercher"; + return input; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (ReverseGeocodingDOM); + +/***/ }), +/* 119 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37); +/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98); +/* harmony import */ var _Common_Controls_RouteDOM__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(120); + + + + + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__["default"].getLogger("route(plus)"); + +/** + * @classdesc + * + * Leaflet Control Class to compute and display route between start and end points using routing service of the geoportal platform. + * + * Use {@link module:Controls.Route L.geoportalControl.Route()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control native class. + * + * @namespace + * @alias L.geoportalControl.Route + */ +var Route = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends L.geoportalControl.Route.prototype */{ + includes: _Common_Controls_RouteDOM__WEBPACK_IMPORTED_MODULE_5__["default"], + /** + * Options du service + * + * @private + */ + options: { + position: "topleft", + collapsed: true, + // plier ! + graphs: ["Voiture", "Pieton"], + exclusions: { + toll: false, + tunnel: false, + bridge: false + }, + disableReverse: false, + routeOptions: {}, + // FIXME a t on besoin des options de ce service ? + autocompleteOptions: {} + }, + /** + * @constructor Route + * @private + * @param {Object} options - options for function call. + * @param {String} [options.apiKey] - API key. The "calcul" key is used by default. + * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol) + * @param {String} [options.position = "topleft"] - position of component into the map, 'topleft' by default + * @param {Boolean} [options.collapsed = false] - collapse mode, false by default + * @param {Object} [options.exclusions = {"toll" : false, "tunnel" : false, "bridge" : false}] - list of exclusions with status + * @param {Array} [options.graphs = ["Voiture", "Pieton"]] - list of resources, by default : ["Voiture", "Pieton"], and the first element is selected + * @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding + * @param {Object} [options.autocompleteOptions = {}] - options of autocomplete service + * @param {Object} [options.routeOptions = {}] - options of route service + * @example + * var route = L.geoportalControl.Route({ + * position : "topright", + * collapsed : true, + * exclusions : { + * "toll" : true, + * "bridge" : false, + * "tunnel" : true + * }, + * graphs : ['Pieton', 'Voiture'], + * autocompleteOptions : {}, + * routeOptions : {} + * }); + */ + initialize: function initialize(options) { + // on transmet les options au controle + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.setOptions(this, options); + + /** uuid */ + this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__["default"].generate(); + + // initialisation + this._initTransport(); + this._initExclusions(); + this._initComputation(); + + /** container principaux */ + this._showRouteContainer = null; + this._pictoRouteContainer = null; + this._waitingContainer = null; + this._formRouteContainer = null; + this._resultsRouteContainer = null; + + /** detection du support : desktop ou tactile */ + this._isDesktop = this._detectSupport(); + + /** liste de points selectionnée */ + this._currentPoints = []; + + /** Mode de transport selectionné : 'Voiture' ou 'Pieton' */ + this._currentTransport = null; + + /** Mode de calcul selectionné : 'Plus rapide' ou 'plus court' */ + this._currentComputation = null; + + /** Exclusions selectionnées : Tunnel, Toll et Bridge */ + this._currentExclusions = []; + + /** la geometrie du parcours */ + this._geojsonRoute = null; + + /** la geometrie des troncons */ + this._geojsonSections = null; + + /** si un calcul est en cours ou non */ + this._waiting = false; + /** timer pour cacher la patience après un certain temps */ + this._timer = null; + + /** + * reponse du service + * Ex. { + * totalTime, totalDistance, bbox, routeGeometry, + * routeInstructions : [{duration, distance, code, instruction, bbox, geometry}] + * } + */ + this._currentRouteInformations = null; + + /** + * liste des ressources avec droits par service + * Ex. { + * "Route" : { + * key : "ger4g456re45er456t4er5ge5", + * resources : ["Pieton", "Voiture"] + * } + * } + */ + this._resources = {}; + }, + /** + * this method is called by this.addTo(map) when the control is added on the map + * and fills variable 'this._container = this.onAdd(map)', + * and create or disable events on map. + * + * @param {Object} map - the map + * + * @returns {DOMElement} DOM element + * + * @private + */ + onAdd: function onAdd(map) { + // initialisation du DOM du composant + var container = this._container = this._initLayout(map); + + // deactivate of events that may interfere with the map + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container); + return container; + }, + /** + * TODO this method is called when the control is removed from the map + * and removes events on map. + * + * @private + */ + onRemove: function onRemove( /* map */) {}, + // ################################################################### // + // ####################### init application ########################## // + // ################################################################### // + + /** + * this method is called by the constructor and initialize the ... + * + * @private + */ + _initTransport: function _initTransport() { + // Mode de transport selectionné + this._currentTransport = "Voiture"; // par defaut + + // par defaut + var transport = this.options.graphs; + if (!transport || transport.length === 0) { + this.options.graphs = ["Voiture", "Pieton"]; + } + + // option + if (leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.isArray(transport) && transport.length) { + // FIXME pb si le 1er graphe n'est pas une ressource connue ! + if (transport[0] === "Voiture" || transport[0] === "Pieton") { + this._currentTransport = transport[0]; + } + } + + // TODO option sur le service + var serviceOptions = this.options.routeOptions; + if (serviceOptions.graph) { + this._currentTransport = serviceOptions.graph; + } + }, + /** + * this method is called by the constructor and initialize the ... + * + * @private + */ + _initComputation: function _initComputation() { + // Mode de calcul selectionné + this._currentComputation = "fastest"; // par defaut + + // TODO option sur le service + var serviceOptions = this.options.routeOptions; + if (serviceOptions.routePreference) { + this._currentComputation = serviceOptions.routePreference; + } + }, + /** + * this method is called by the constructor and initialize the ... + * + * @private + */ + _initExclusions: function _initExclusions() { + // Exclusions selectionnées : Tunnel, Toll et Bridge + this._currentExclusions = []; // par defaut + + // par defaut + var exclusion = this.options.exclusions; + if (!exclusion || Object.keys(exclusion).length === 0) { + this.options.exclusions = { + toll: false, + tunnel: false, + bridge: false + }; + } + + // option + if (exclusion && Object.keys(exclusion).length) { + for (var k in exclusion) { + if (exclusion.hasOwnProperty(k)) { + if (exclusion.k) { + this._currentExclusions.push(k); + } + } + } + } + + // TODO option sur le service + var serviceOptions = this.options.routeOptions; + if (leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.isArray(serviceOptions.exclusions)) { + this._currentExclusions = serviceOptions.exclusions; + } + }, + // ################################################################### // + // ############################## other init ######################### // + // ################################################################### // + + /** + * TODO this method is called by the constructor. + * this information is useful to switch to touch mode. + * Detection : test for desktop or tactile + * + * @returns {Boolean} is desktop + * + * @private + */ + _detectSupport: function _detectSupport() { + // TODO + // Choix de gérer la détection dans le code du composant au lieu du DOM car : + // Utilisation de l'implémentation Leaflet + // http://leafletjs.com/reference.html#browser + + var isDesktop = true; + var userAgent = window.navigator.userAgent.toLowerCase(); + if (userAgent.indexOf("iphone") !== -1 || userAgent.indexOf("ipod") !== -1 || userAgent.indexOf("ipad") !== -1 || userAgent.indexOf("android") !== -1 || userAgent.indexOf("mobile") !== -1 || userAgent.indexOf("blackberry") !== -1 || userAgent.indexOf("tablet") !== -1 || userAgent.indexOf("phone") !== -1 || userAgent.indexOf("touch") !== -1) { + isDesktop = false; + } + if (userAgent.indexOf("msie") !== -1 || userAgent.indexOf("trident") !== -1) { + isDesktop = true; + } + return isDesktop; + }, + // ################################################################### // + // ########################### init dom ############################## // + // ################################################################### // + + /** + * this method is called by this.onAdd(map) + * and initialize the container HTMLElement + * + * @param {Object} map - the map + * + * @returns {DOMElement} DOM element + * + * @private + */ + _initLayout: function _initLayout(map) { + // create main container + var container = this._createMainContainerElement(); + var inputShow = this._showRouteContainer = this._createShowRouteElement(); + container.appendChild(inputShow); + + // mode "collapsed" + if (!this.options.collapsed) { + inputShow.checked = true; + } + var picto = this._pictoRouteContainer = this._createShowRoutePictoElement(); + container.appendChild(picto); + var routePanel = this._createRoutePanelElement(); + + // header form + var routeHeader = this._createRoutePanelHeaderElement(); + routePanel.appendChild(routeHeader); + + // form + var routeForm = this._formRouteContainer = this._createRoutePanelFormElement(); + + // form: menu des points + var points = this._createRoutePanelFormPointsElement(map); + for (var i = 0; i < points.length; i++) { + routeForm.appendChild(points[i]); + } + + // form: menu des modes + var choice = this._createRoutePanelFormModeChoiceElement(); + choice.appendChild(this._createRoutePanelFormModeChoiceTransportElement(this.options.graphs)); + choice.appendChild(this._createRoutePanelFormModeChoiceComputeElement()); + routeForm.appendChild(choice); + + // form: menu des exclusions + routeForm.appendChild(this._createShowRouteExclusionsElement()); + routeForm.appendChild(this._createShowRouteExclusionsPictoElement()); + var exclusion = this._createRoutePanelFormExclusionsElement(); + exclusion.appendChild(this._createRoutePanelFormExclusionOptionsElement(this.options.exclusions)); + routeForm.appendChild(exclusion); + + // form: bouton du calcul + var submit = this._createRouteSubmitFormElement(); + routeForm.appendChild(submit); + routePanel.appendChild(routeForm); + + // results + var routeResults = this._resultsRouteContainer = this._createRoutePanelResultsElement(); + routePanel.appendChild(routeResults); + + // waiting + var waiting = this._waitingContainer = this._createRouteWaitingElement(); + routePanel.appendChild(waiting); + container.appendChild(routePanel); + return container; + }, + // ################################################################### // + // ############################## DOM ################################ // + // ################################################################### // + + /** + * Create List Points + * FIXME OVERWRITTEN RouteDOM._createRoutePanelFormPointsElement() ! + * + * @param {Object} map - the map + * + * @returns {Array} List DOM element + * + * @private + */ + _createRoutePanelFormPointsElement: function _createRoutePanelFormPointsElement(map) { + var points = []; + var count = 1; + // point de depart + var start = new _LocationSelector__WEBPACK_IMPORTED_MODULE_4__["default"]({ + apiKey: this.options.apiKey || null, + tag: { + id: count, + unique: this._uid, + label: "Départ", + color: "blue", + display: true + }, + disableReverse: this.options.disableReverse, + autocompleteOptions: this.options.autocompleteOptions || null + }); + start.setMap(map); + var opts = this.options.routeOptions; + if (opts.startPoint) { + start._inputAutoCompleteContainer.value = opts.startPoint.x + " , " + opts.startPoint.y; + start.setCoordinate({ + lng: opts.startPoint.x, + lat: opts.startPoint.y + }); + } + points.push(start.getContainer()); + this._currentPoints.push(start); + // points intermediaires + for (count = 2; count < 7; count++) { + var step = new _LocationSelector__WEBPACK_IMPORTED_MODULE_4__["default"]({ + apiKey: this.options.apiKey || null, + tag: { + id: count, + unique: this._uid, + label: "Etape", + color: "green", + display: false, + removeOption: true + }, + disableReverse: this.options.disableReverse, + autocompleteOptions: this.options.autocompleteOptions || null + }); + step.setMap(map); + points.push(step.getContainer()); + this._currentPoints.push(step); + } + // point d'arrivé + var end = new _LocationSelector__WEBPACK_IMPORTED_MODULE_4__["default"]({ + apiKey: this.options.apiKey || null, + tag: { + id: count, + unique: this._uid, + label: "Arrivée", + color: "red", + display: true, + addOption: true, + removeOption: false + }, + disableReverse: this.options.disableReverse, + autocompleteOptions: this.options.autocompleteOptions || null + }); + end.setMap(map); + if (opts.endPoint) { + end._inputAutoCompleteContainer.value = opts.endPoint.x + " , " + opts.endPoint.y; + end.setCoordinate({ + lng: opts.endPoint.x, + lat: opts.endPoint.y + }); + } + points.push(end.getContainer()); + this._currentPoints.push(end); + return points; + }, + // ################################################################### // + // ####################### handlers events to dom #################### // + // ################################################################### // + + /** + * this method is called by event 'click' on '' + * tag label (cf. this._createShowRoutePictoElement), + * and it cleans all value of input. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onShowRoutePanelClick: function onShowRoutePanelClick(e) { + logger.log("onShowRoutePanelClick", e); + // clean ! + if (!this._geojsonSections) { + this._clear(); + } + }, + /** + * this method is called by event 'change' on '' tag select + * (cf. this.). + * this value is saved as a parameter for the service route. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onRouteModeComputationChange: function onRouteModeComputationChange(e) { + logger.log("onRouteModeComputationChange", e); + var idx = e.target.selectedIndex; + var value = e.target.options[idx].value; + if (!value) { + return; + } + logger.log(value); + this._currentComputation = value; + }, + /** + * this method is called by event 'change' on '' tag select + * (cf. this.). + * this value is saved as a parameter for the service route, + * and this launches the route request ! + * + * @param {Object} e - HTMLElement + * + * @private + */ + onRouteModeComputationChangeAndRun: function onRouteModeComputationChangeAndRun(e) { + logger.log("onRouteModeComputationChangeAndRun", e); + + // event choice computation + this.onRouteModeComputationChange(e); + + // clean avant un nouveau calcul ! + this._clearRouteResultsDetails(); + this._clearRouteResultsGeometry(); + this._clearRouteResultsFeatureGeometry(); + + // submit request + this.onRouteComputationSubmit({ + computation: this._currentComputation, + transport: this._currentTransport, + exclusions: this._currentExclusions + }); + }, + /** + * this method is called by event 'change' on '' tag input + * (cf. this.). + * this value is saved as a parameter for the service route. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onRouteModeTransportChange: function onRouteModeTransportChange(e) { + logger.log("onRouteModeTransportChange", e); + var value = e.target.value; + if (!value) { + return; + } + logger.log(value); + this._currentTransport = value; + }, + /** + * this method is called by event 'click' on '' tag input + * (cf. this.), and it displays the panel options of exclusions. + * Not use ! + * + * @param {Object} e - HTMLElement + * + * @private + */ + onShowRouteExclusionsClick: function onShowRouteExclusionsClick(e) { + logger.log("onShowRouteExclusionsClick", e); + // not use ! + }, + + /** + * this method is called by event 'change' on '' tag input + * (cf. this.). + * this value is saved as a parameter for the service route. + * Not use ! + * + * @param {Object} e - HTMLElement + * + * @private + */ + onRouteExclusionsChange: function onRouteExclusionsChange(e) { + logger.log("onRouteExclusionsChange", e); + var value = e.target.value; + var checked = e.target.checked; + if (!value) { + return; + } + logger.log(value, checked); + var bFound = false; + var iFound = null; + for (var i = 0; i < this._currentExclusions.length; i++) { + if (this._currentExclusions[i] === value) { + iFound = i; + bFound = true; + } + } + // on l'ajoute si la valeur n'existe pas et est selectionnée + if (!bFound && checked) { + this._currentExclusions.push(value); + } + // on la retire si la valeur existe et est desselectionnée + if (bFound && !checked) { + this._currentExclusions[iFound] = null; + } + }, + /** + * this method is called by event 'submit' on '' tag form + * (cf. this.), and it displays the results. + * + * @param {Object} options - options + * + * @private + */ + onRouteComputationSubmit: function onRouteComputationSubmit(options) { + logger.log("onRouteComputationSubmit", options); + + // FIXME on lance une requête en EPSG:4326, les coordonnées + // doivent donc être du type cad en lat/lon. + // hors, BUG du service du calcul d'itineraire car les + // coordonnées envoyées doivent être en lon/lat avec une SRS en EPSG:4326 !? + // sinon, ça plante... + + // Liste des points + var points = this._currentPoints; + + // - point de depart + var start; + if (points[0].getCoordinate) { + var startCoordinate = points[0].getCoordinate(); + start = { + x: startCoordinate.lon || startCoordinate.lng, + y: startCoordinate.lat + }; + } + points[0].dragging(false); + logger.log("start", start); + // - point d'arrivée + var end; + if (points[points.length - 1] && points[points.length - 1].getCoordinate) { + var endCoordinate = points[points.length - 1].getCoordinate(); + end = { + x: endCoordinate.lon || endCoordinate.lng, + y: endCoordinate.lat + }; + } + points[points.length - 1].dragging(false); + logger.log("end", end); + // - les étapes + var step = []; + for (var i = 1; i < points.length - 1; i++) { + if (points[i] && points[i].getCoordinate) { + var iCoordinate = points[i].getCoordinate(); + if (iCoordinate) { + var coordinate = { + x: iCoordinate.lon || iCoordinate.lng, + y: iCoordinate.lat + }; + logger.log("step", coordinate); + step.push(coordinate); + } + } + } + + // valeurs selectionnées + this._currentTransport = options.transport; + this._currentComputation = options.computation; + this._currentExclusions = options.exclusions; + if (typeof this.options.routeOptions.geometryInInstructions === "undefined") { + this.options.routeOptions.geometryInInstructions = true; + } + + // mise en place de la patience + this._displayWaitingContainer(); + + // on met en place l'affichage des resultats dans la fenetre de resultats. + var context = this; + this._requestRouting({ + startPoint: start, + endPoint: end, + viaPoints: step, + graph: this._currentTransport, + routePreference: this._currentComputation, + exclusions: this._currentExclusions, + geometryInInstructions: this.options.routeOptions.geometryInInstructions, + distanceUnit: "m", + // surcharge obligatoire ! + // callback onSuccess + onSuccess: function onSuccess(results) { + logger.log(results); + if (results) { + context._fillRouteResultsDetails(results); + if (context.options.routeOptions.onSuccess) { + context.options.routeOptions.onSuccess(results); + } + } + }, + // callback onFailure + onFailure: function onFailure(error) { + // FIXME mise à jour du controle mais le service ne repond pas en 200 !? + context._hideWaitingContainer(); + context._clearRouteResultsDetails(); + logger.log(error.message); + } + }); + }, + /** + * this method is called by event 'click' on '' + * tag label (cf. this.), + * and it cleans the old route geometry. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onShowRouteResultsNewClick: function onShowRouteResultsNewClick(e) { + logger.log("onShowRouteResultsNewClick", e); + + // on reactive le drag&drop + var points = this._currentPoints; + for (var i = 0; i < points.length; i++) { + points[i].dragging(true); + } + + // clean avant un nouveau calcul ! + this._clearRouteResultsDetails(); + this._clearRouteResultsGeometry(); + this._clearRouteResultsFeatureGeometry(); + }, + /** + * this method is called by event 'mouseover' on '' + * tag label (cf. this.), + * and it makes a style on feature route. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onRouteResultsDetailsMouseOver: function onRouteResultsDetailsMouseOver(e) { + logger.log("onRouteResultsDetailsMouseOver", e); + var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__["default"].index(e.target.id); + + // valable uniquement pour le mode desktop ! + if (!this._isDesktop) { + return; + } + if (!this._geojsonSections) { + return; + } + this._geojsonSections.eachLayer(function (layer) { + if (layer.feature.id === parseInt(idx, 10)) { + layer.setStyle({ + weight: 10, + color: "#0F9DE8", + opacity: 0.5 + }); + } + }); + }, + /** + * this method is called by event 'mouseout' on '' + * tag label (cf. this.), + * and it deletes a style on feature route. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onRouteResultsDetailsMouseOut: function onRouteResultsDetailsMouseOut(e) { + logger.log("onRouteResultsDetailsMouseOut", e); + var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__["default"].index(e.target.id); + + // valable uniquement pour le mode desktop ! + if (!this._isDesktop) { + return; + } + if (!this._geojsonSections) { + return; + } + this._geojsonSections.eachLayer(function (layer) { + if (layer.feature.id === parseInt(idx, 10)) { + layer.setStyle({ + color: "#ED7F10", + weight: 5, + opacity: 0.75 + }); + } + }); + }, + /** + * this method is called by event 'click' on '' + * tag label (cf. this.), + * and it deletes a style on feature route. + * Only for mobile ! + * + * @param {Object} e - HTMLElement + * + * @private + */ + onRouteResultsDetailsClick: function onRouteResultsDetailsClick(e) { + logger.log("onRouteResultsDetailsClick", e); + var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__["default"].index(e.target.id); + var self = this; + + // valable uniquement pour le mode mobile ! + if (this._isDesktop) { + return; + } + if (!this._geojsonSections) { + return; + } + + // afficher le detail cumulé du parcours ! + var newInstruction = e.target.title; + var oldInstruction = e.target.innerHTML; + this._geojsonSections.eachLayer(function (layer) { + if (layer.feature.id === parseInt(idx, 10)) { + e.target.innerHTML = newInstruction; + layer.setStyle({ + weight: 10, + color: "#0F9DE8", + opacity: 0.5 + }); + } + }); + clearTimeout(1000); + setTimeout(function () { + self._geojsonSections.eachLayer(function (layer) { + if (layer.feature.id === parseInt(idx, 10)) { + e.target.innerHTML = oldInstruction; + layer.setStyle({ + color: "#ED7F10", + weight: 5, + opacity: 0.75 + }); + } + }); + }, 1000); + }, + // ################################################################### // + // ########################### Routing ############################### // + // ############## (methods to request and results) ################### // + + /** + * this method is called by this.onRouteComputationSubmit() + * and executes a request to the service. + * + * @param {Object} settings - service settings + * @param {Function} settings.onSuccess - callback + * @param {Function} settings.onFailure - callback + * + * @private + */ + _requestRouting: function _requestRouting(settings) { + // on ne fait pas de requête si on n'a pas renseigné de parametres ! + if (!settings || Object.keys(settings).length === 0) { + return; + } + + // on ne fait pas de requête si + // - la parametre 'startPoint' est vide ! + if (!settings.startPoint) { + return; + } + // - la parametre 'endPoint' est vide ! + if (!settings.endPoint) { + return; + } + logger.log(settings); + var options = {}; + // on recupere les options du service + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.routeOptions); + // ainsi que les parametres de saisie et les callbacks + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, settings); + + // cas où la clef API n'est pas renseignée dans les options du service, + // on utilise celle renseignée au niveau du controle ou la clé "calcul" par défaut + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + apiKey: this.options.routeOptions.apiKey || this.options.apiKey + }); + + // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert + // true par défaut (https) + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + ssl: this.options.ssl + }); + logger.log(options); + geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__["default"].Services.route(options); + }, + /** + * this method is called by this.onRouteComputationSubmit() + * and fills the container of the route instructions list, distance and time + * information, aslo, constructs the geometry route. + * + * @param {Object} results - results of the route calculation + * + * @private + */ + _fillRouteResultsDetails: function _fillRouteResultsDetails(results) { + // FIXME + // gestion des temps de traitement avec des callback !? + + // Distance et Durée + var distance = results.totalDistance; + var duration = results.totalTime; + // Détails avec simplifications des troncons + var instructions = this._simplifiedInstructions(results.routeInstructions); + // var instructions = results.routeInstructions; + + if (instructions) { + this._fillRouteResultsDetailsContainer(distance, duration, instructions); + } + + // Geometries simplifiées + var geometry = results.routeGeometry; + if (geometry) { + this._fillRouteResultsDetailsGeometry(geometry); + } + if (this.options.routeOptions.geometryInInstructions) { + // existe t il une geometrie pour chaque troncon de route ? + var bGeometryInstructions = instructions && Array.isArray(instructions) && instructions[0].geometry.length !== 0; + + // Geometries des tronçon + if (instructions && bGeometryInstructions) { + this._fillRouteResultsDetailsFeatureGeometry(instructions); + } + } + + // Emprise + var bbox = results.bbox; + if (bbox) { + var map = this._map; + var bounds = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLngBounds([bbox.bottom, bbox.left], [bbox.top, bbox.right]); + map.fitBounds(bounds, { + padding: [1, 1] + }); + } + + // sauvegarde de l'etat des resultats + this._currentRouteInformations = results; + + // mise à jour du controle ! + this._formRouteContainer.className = "GProuteComponentHidden"; + this._hideWaitingContainer(); + this._resultsRouteContainer.className = ""; + }, + /** + * this method is called by this._fillRouteResultsDetails() + * and fills the container of the route instructions list, distance and time + * information. + * + * @param {Number} distance - distance + * @param {Number} duration - duration + * @param {Object[]} instructions - list of instructions + * + * @private + */ + _fillRouteResultsDetailsContainer: function _fillRouteResultsDetailsContainer(distance, duration, instructions) { + // FIXME callback + + // Distance et Durée + this._resultsRouteValuesContainer = this._addRouteResultsValuesElement(distance, duration, this._convertSecondsToTime); + + // Détails + this._resultsRouteDetailsContainer = this._addRouteResultsDetailsElement(instructions, this._convertSecondsToTime); + }, + /** + * this method is called by this._fillRouteResultsDetails() + * and constructs the simplified geometry route. + * + * @param {Object} geometry - geometry + * + * @private + */ + _fillRouteResultsDetailsGeometry: function _fillRouteResultsDetailsGeometry(geometry) { + // FIXME callback + + this._clearRouteResultsGeometry(); + var map = this._map; + var _style = { + color: "#ED7F10", + weight: 5, + opacity: 0.75 + }; + this._geojsonRoute = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoJson(geometry, { + style: _style + }).addTo(map); + }, + /** + * this method is called by this._fillRouteResultsDetails() + * and constructs the geometries street with informations. + * + * @param {Object[]} instructions - instructions + * + * @private + */ + _fillRouteResultsDetailsFeatureGeometry: function _fillRouteResultsDetailsFeatureGeometry(instructions) { + // FIXME callback + + this._clearRouteResultsFeatureGeometry(); + var map = this._map; + var _style = { + color: "#ED7F10", + weight: 5, + opacity: 0.75 + }; + var _geometry = { + type: "FeatureCollection", + features: [] + }; + for (var i = 0; i < instructions.length; i++) { + var o = instructions[i]; + var id = i + 1; + _geometry.features.push({ + id: id, + type: "Feature", + geometry: o.geometry, + properties: { + popupContent: "(" + id + ") distance : " + this._convertDistance(o.distance) + " / temps : " + this._convertSecondsToTime(o.duration) + } + }); + } + var self = this; + function resetHighlight(e) { + var layer = e.target; + self._geojsonSections.resetStyle(layer); + var div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GProuteResultsDetailsInstruction_" + layer.feature.id + "-" + self._uid); + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.removeClass(div, "GProuteResultsDetailsHighlight"); + } + function highlightFeature(e) { + var layer = e.target; + logger.log(layer); + layer.setStyle({ + weight: 10, + color: "#0F9DE8", + opacity: 0.5 + }); + var div = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GProuteResultsDetailsInstruction_" + layer.feature.id + "-" + self._uid); + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.addClass(div, "GProuteResultsDetailsHighlight"); + } + this._geojsonSections = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.geoJson(_geometry, { + style: _style, + // Function that will be called on each created feature layer. + onEachFeature: function onEachFeature(feature, layer) { + layer.on({ + mouseover: highlightFeature, + mouseout: resetHighlight + }); + layer.bindPopup(feature.properties.popupContent); + } + }).addTo(map); + }, + // ################################################################### // + // ############################# Clean ############################### // + // ################################################################### // + + /** + * this method is called by this.onShowRoutePanelClick() + * and it clears all elements (reinit). + * + * @private + */ + _clear: function _clear() { + this._currentTransport = null; + this._currentExclusions = []; + this._currentComputation = null; + + // les resultats + this._clearRouteResultsDetails(); + // la geometrie + this._clearRouteResultsGeometry(); + this._clearRouteResultsFeatureGeometry(); + // les points + for (var i = 0; i < this._currentPoints.length; i++) { + this._currentPoints[i].clear(); + } + }, + /** + * this method is called by this.onRouteComputationSubmit() + * and it clears all route instructions. + * + * @private + */ + _clearRouteResultsDetails: function _clearRouteResultsDetails() { + this._currentRouteInformations = null; + + // doit on nettoyer le container "GProuteResultsDetails" ? + // il sera de toute façon écrasé par la prochaine requête... + if (this._resultsRouteDetailsContainer) { + var divD = this._resultsRouteDetailsContainer; + if (divD.childElementCount) { + while (divD.firstChild) { + divD.removeChild(divD.firstChild); + } + } + } + if (this._resultsRouteValuesContainer) { + var divV = this._resultsRouteValuesContainer; + if (divV.childElementCount) { + while (divV.firstChild) { + divV.removeChild(divV.firstChild); + } + } + } + }, + /** + * this method is called by this.onRouteComputationSubmit() + * and it clears all route geometries. + * + * @private + */ + _clearRouteResultsGeometry: function _clearRouteResultsGeometry() { + var map = this._map; + if (this._geojsonRoute != null) { + map.removeLayer(this._geojsonRoute); + this._geojsonRoute = null; + } + }, + /** + * this method is called by this.onRouteComputationSubmit() + * and it clears all route geometries. + * + * @private + */ + _clearRouteResultsFeatureGeometry: function _clearRouteResultsFeatureGeometry() { + var map = this._map; + if (this._geojsonSections != null) { + map.removeLayer(this._geojsonSections); + this._geojsonSections = null; + } + }, + // ################################################################### // + // ############################ Patience ############################# // + // ################################################################### // + + /** + * this method displays waiting container and sets a timeout + * + * @private + */ + _displayWaitingContainer: function _displayWaitingContainer() { + this._waitingContainer.className = "GProuteCalcWaitingContainerVisible"; + this._waiting = true; + + // mise en place d'un timeout pour réinitialiser le panel (cacher la patience) + // si on est toujours en attente (si la requête est bloquée par exemple) + if (this._timer) { + clearTimeout(this._timer); + this._timer = null; + } + var context = this; + this._timer = setTimeout(function () { + if (context._waiting === true) { + context._hideWaitingContainer(); + } else { + if (context._timer) { + clearTimeout(context._timer); + } + } + }, 16000); + }, + /** + * this method hides waiting container and clears timeout + * + * @private + */ + _hideWaitingContainer: function _hideWaitingContainer() { + if (this._waiting) { + this._waitingContainer.className = "GProuteCalcWaitingContainerHidden"; + this._waiting = false; + clearTimeout(this._timer); + this._timer = null; + } + }, + // ################################################################### // + // ########################## Geometry ############################### // + // ################################################################### // + + /** + * simplifies instructions + * + * @param {Object[]} instructions - instructions + * + * @returns {Object[]} simplified instructions + * + * @private + */ + _simplifiedInstructions: function _simplifiedInstructions(instructions) { + var newInstructions = []; + var current = instructions[0]; + // cas où... + if (instructions.length === 1) { + newInstructions.push(current); + } + for (var i = 1; i < instructions.length; i++) { + var o = instructions[i]; + if (o.instruction === current.instruction) { + current.distance = (parseFloat(o.distance) + parseFloat(current.distance)).toString(); + current.duration = (parseFloat(o.duration) + parseFloat(current.duration)).toString(); + for (var j = 1; j < o.geometry.coordinates.length; j++) { + current.geometry.coordinates.push(o.geometry.coordinates[j]); + } + // last + if (i === instructions.length - 1) { + newInstructions.push(current); + current = null; + } + } else { + newInstructions.push(current); + current = o; + // last + if (i === instructions.length - 1) { + newInstructions.push(o); + current = null; + } + } + } + logger.log(newInstructions); + return newInstructions; + }, + // ################################################################### // + // ################# Utils for Distance/Duration ##################### // + // ################################################################### // + + /** + * convert seconds to time : HH:MM:SS + * + * @param {Number} duration - duration in seconds + * + * @returns {String} duration in HH:MM:SS + * + * @private + */ + _convertSecondsToTime: function _convertSecondsToTime(duration) { + var time = ""; + duration = Math.round(duration); + var hours = Math.floor(duration / (60 * 60)); + if (!hours) { + hours = "00"; + } + var divisor4minutes = duration % (60 * 60); + var minutes = Math.floor(divisor4minutes / 60); + if (!minutes) { + minutes = "00"; + } + var divisor4seconds = divisor4minutes % 60; + var seconds = Math.ceil(divisor4seconds); + if (!seconds) { + seconds = "00"; + } + time = hours + "h " + minutes + "m " + seconds + "s"; + return time; + }, + /** + * convert distance in meters or kilometers + * + * @param {Number} distance - distance in meters + * + * @returns {String} distance in km + * + * @private + */ + _convertDistance: function _convertDistance(distance) { + var d = ""; + var distanceKm = parseInt(distance / 1000, 10); + if (!distanceKm) { + d = parseInt(distance, 10) + " m"; // arrondi ! + } else { + d = distanceKm + " km"; + } + return d; + }, + // ################################################################### // + // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ // + // ################################################################### // + + /** + * This method is public. + * It allows to control the execution of a traitment. + * + * @param {Object} positions - positions = [{lng: , lat: }] + * @param {Object} options - options = {...} + */ + compute: function compute(positions, options) { + if (!this._showRouteContainer.checked) { + this._pictoRouteContainer.click(); + } + var map = this._map; + if (!map) { + return; + } + + // Les options par defauts + var settings = { + computation: "fastest", + transport: "Voiture", + exclusions: [] + }; + + // On recupere les options + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(settings, options); + + // Liste des points ! + var points = this._currentPoints; + var start = 0; + points[start].setCoordinate(positions[start]); + var startInput = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GPlocationOrigin_" + 1 + "-" + this._uid); + startInput.value = positions[start].lng + " , " + positions[start].lat; + var end = positions.length - 1; + points[6].setCoordinate(positions[end]); + var endInput = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GPlocationOrigin_" + 7 + "-" + this._uid); + endInput.value = positions[end].lng + " , " + positions[end].lat; + for (var i = 1; i < positions.length - 1; i++) { + points[i].setCoordinate(positions[i]); + var stepInput = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GPlocationOrigin_" + i + "-" + this._uid); + stepInput.value = positions[i].lng + " , " + positions[i].lat; + } + settings.transport === "Voiture" ? leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GProuteTransportCar-" + this._uid).checked = true : leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GProuteTransportPedestrian-" + this._uid).checked = true; + settings.computation === "fastest" ? leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GProuteComputationSelect-" + this._uid).selectedIndex = 0 : leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GProuteComputationSelect-" + this._uid).selectedIndex = 1; + + // TODO exclusion ! + + // Calcul + this.onRouteComputationSubmit(settings); + } +}); +/* harmony default export */ __webpack_exports__["default"] = (Route); + +/***/ }), +/* 120 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35); +/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(100); + + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__["default"].getLogger("RouteDOM"); +var RouteDOM = { + /** + * Add uuid to the tag ID + * @param {String} id - id selector + * @returns {String} uid - id selector with an unique id + */ + _addUID: function _addUID(id) { + var uid = this._uid ? id + "-" + this._uid : id; + return uid; + }, + /** + * Main container (DOM) + * + * @returns {DOMElement} DOM element + */ + _createMainContainerElement: function _createMainContainerElement() { + var container = document.createElement("div"); + container.id = this._addUID("GProute"); + container.className = "GPwidget"; + return container; + }, + // ################################################################### // + // ################# Methods to display Main Panel ################### // + // ################################################################### // + + /** + * Hidden checkbox for minimizing/maximizing panel + * + * @returns {DOMElement} DOM element + */ + _createShowRouteElement: function _createShowRouteElement() { + var input = document.createElement("input"); + input.id = this._addUID("GPshowRoute"); + input.type = "checkbox"; + return input; + }, + /** + * Show route control + * see event ! + * + * @returns {DOMElement} DOM element + */ + _createShowRoutePictoElement: function _createShowRoutePictoElement() { + // contexte d'execution + var context = this; + var label = document.createElement("label"); + label.id = this._addUID("GPshowRoutePicto"); + label.className = "GPshowAdvancedToolPicto"; + label.htmlFor = this._addUID("GPshowRoute"); + label.title = "Ouvrir le calcul d'itinéraire"; + + // gestionnaire d'evenement : + // on ouvre le menu de saisie du calcul d'itiniraire + // L'ouverture/Fermeture permet de faire le menage + // (reinitialisation) + if (label.addEventListener) { + label.addEventListener("click", function (e) { + context.onShowRoutePanelClick(e); + }); + } else if (label.attachEvent) { + label.attachEvent("onclick", function (e) { + context.onShowRoutePanelClick(e); + }); + } + var spanOpen = document.createElement("span"); + spanOpen.id = this._addUID("GPshowRouteOpen"); + spanOpen.className = "GPshowAdvancedToolOpen"; + label.appendChild(spanOpen); + return label; + }, + // ################################################################### // + // ################## Methods to display Inputs Panel ################ // + // ################################################################### // + + /** + * Create Container Panel + * + * FIXME + * don't call this._createRoutePanelHeaderElement + * don't call this._createRoutePanelFormElement + * don't call this._createRoutePanelResultsElement + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelElement: function _createRoutePanelElement() { + var div = document.createElement("div"); + div.id = this._addUID("GProutePanel"); + div.className = "GPpanel"; + + // div.appendChild(this._createRoutePanelHeaderElement()); + // div.appendChild(this._createRoutePanelFormElement()); + // div.appendChild(this._createRoutePanelResultsElement()); + + return div; + }, + /** + * Create Header Panel + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelHeaderElement: function _createRoutePanelHeaderElement() { + // contexte d'execution + var self = this; + var container = document.createElement("div"); + container.className = "GPpanelHeader"; + var div = document.createElement("div"); + div.className = "GPpanelTitle"; + div.innerHTML = "Calcul d'itinéraire"; + container.appendChild(div); + var divClose = document.createElement("div"); + divClose.id = this._addUID("GProutePanelClose"); + divClose.className = "GPpanelClose"; + divClose.title = "Masquer le panneau"; + + // Link panel close / visibility checkbox + if (divClose.addEventListener) { + divClose.addEventListener("click", function () { + document.getElementById(self._addUID("GPshowRoutePicto")).click(); + }, false); + } else if (divClose.attachEvent) { + divClose.attachEvent("onclick", function () { + document.getElementById(self._addUID("GPshowRoutePicto")).click(); + }); + } + container.appendChild(divClose); + return container; + }, + /** + * Create Form + * see evenement ! + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelFormElement: function _createRoutePanelFormElement() { + // contexte d'execution + var self = this; + var form = document.createElement("form"); + form.id = this._addUID("GProuteForm"); + form.setAttribute("onkeypress", "return event.keyCode != 13;"); // FIXME hack pour desactiver l'execution via 'enter' au clavier ! + + form.addEventListener("submit", function (e) { + logger.log(e); + e.preventDefault(); + + // points + var points = document.getElementsByClassName(self._addUID("GPlocationPoint")); + + // Must have at least two origin points + var start = points[0].childNodes[0].id; + var end = points[points.length - 1].childNodes[0].id; + var startID = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(start); + var endID = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(end); + if (document.getElementById(self._addUID("GPlocationOrigin_" + startID)).value === "" && document.getElementById(self._addUID("GPlocationOriginCoords_" + startID)).value === "" || document.getElementById(self._addUID("GPlocationOrigin_" + endID)).value === "" && document.getElementById(self._addUID("GPlocationOriginCoords_" + endID)).value === "") { + return false; + } + + // Send stages to results panel + self._addRouteResultsStagesValuesElement(points); + + // on peut récuperer les valeurs utiles pour les transmettre au service d'iti... + // - le mode de calcul + // - le mode de transport + // - les exclusions + // Les points sont déjà stockés dans l'application. + + // computation mode params + var modeComputation = null; + if (document.getElementById(self._addUID("GProuteComputationSelect"))) { + var select = document.getElementById(self._addUID("GProuteResultsComputationSelect")); + select.selectedIndex = document.getElementById(self._addUID("GProuteComputationSelect")).selectedIndex; + modeComputation = select.options[select.selectedIndex].value; + } + + // transport mode params + var modeTransport = null; + // voiture ? + if (document.getElementById(self._addUID("GProuteTransportCar"))) { + if (document.getElementById(self._addUID("GProuteTransportCar")).checked) { + modeTransport = document.getElementById(self._addUID("GProuteTransportCar")).value; + } + } + // pieton ? + if (document.getElementById(self._addUID("GProuteTransportPedestrian"))) { + if (document.getElementById(self._addUID("GProuteTransportPedestrian")).checked) { + modeTransport = document.getElementById(self._addUID("GProuteTransportPedestrian")).value; + } + } + + // exclusions params + var exclusions = []; + var exclusionsElement = document.getElementsByClassName("GProuteExclusionsOption"); + for (var j = 0; j < exclusionsElement.length; j++) { + var id = exclusionsElement[j].htmlFor; + var el = document.getElementById(id); + if (!el.checked) { + exclusions.push(el.value); + } + } + self.onRouteComputationSubmit({ + computation: modeComputation, + transport: modeTransport, + exclusions: exclusions + }); + + // FIXME mise à jour du controle dans le composant JS ! + // document.getElementById(self._addUID("GProuteForm")).className = "GProuteComponentHidden"; + // document.getElementById(self._addUID("GProuteResultsPanel")).className = ""; + + return false; + }); + return form; + }, + /** + * Create Results Panel + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelResultsElement: function _createRoutePanelResultsElement() { + var container = document.createElement("div"); + container.id = this._addUID("GProuteResultsPanel"); + container.className = "GProuteComponentHidden"; + container.appendChild(this._createRouteResultsStagesElement()); + container.appendChild(this._createRouteResultsElement()); + var divBorderUp = document.createElement("div"); + divBorderUp.className = "GPfakeBorder GPfakeBorderLeft"; + container.appendChild(divBorderUp); + container.appendChild(this._createRouteShowResultsDetailsElement()); + var labelShow = document.createElement("label"); + labelShow.htmlFor = this._addUID("GProuteResultsShowDetails"); + labelShow.innerHTML = "Afficher le détail"; + container.appendChild(labelShow); + var labelHide = document.createElement("label"); + labelHide.htmlFor = this._addUID("GProuteResultsShowDetails"); + labelHide.innerHTML = "Masquer le détail"; + container.appendChild(labelHide); + var divBorderDown = document.createElement("div"); + divBorderDown.className = "GPfakeBorder"; + container.appendChild(divBorderDown); + container.appendChild(this._createRouteResultsDetailsElement()); + return container; + }, + /** + * Create Waiting Panel + * + * @returns {DOMElement} DOM element + */ + _createRouteWaitingElement: function _createRouteWaitingElement() { + var div = document.createElement("div"); + div.id = this._addUID("GProuteCalcWaitingContainer"); + div.className = "GProuteCalcWaitingContainerHidden"; + var p = document.createElement("p"); + p.className = "GProuteCalcWaiting"; + p.innerHTML = "Calcul en cours..."; + div.appendChild(p); + return div; + }, + // ################################################################### // + // ############### Methods to the window results ##################### // + // ################################################################### // + + /** + * Create Results Stages + * (results dynamically generate !) + * + * @returns {DOMElement} DOM element + */ + _createRouteResultsStagesElement: function _createRouteResultsStagesElement() { + var div = document.createElement("div"); + div.id = this._addUID("GProuteResultsStages"); + return div; + }, + /** + * Add Stages Results + * + * @param {DOMElement} points - list of points + */ + _addRouteResultsStagesValuesElement: function _addRouteResultsStagesValuesElement(points) { + document.getElementById(this._addUID("GProuteResultsStages")).innerHTML = ""; + for (var i = 0; i < points.length; i++) { + var tag = points[i].childNodes[0].id; + var id = _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(tag); + if (document.getElementById(this._addUID("GPlocationPoint_" + id)).className === "GPflexInput GPlocationStageFlexInput") { + var resultStage = document.createElement("div"); + resultStage.className = "GProuteResultsStages"; + var resultStageLabel = document.createElement("div"); + resultStageLabel.className = "GProuteResultStageLabel"; + resultStageLabel.innerHTML = document.getElementById(this._addUID("GPlocationOriginLabel_" + id)).innerHTML + " :"; + resultStage.appendChild(resultStageLabel); + var resultStageValue = document.createElement("div"); + resultStageValue.className = "GProuteResultStageValue"; + var elementCoords = document.getElementById(this._addUID("GPlocationOriginCoords_" + id)); + var stageCoords = elementCoords.value; + var visible = elementCoords.className === "GPlocationOriginVisible"; + if (stageCoords !== null && stageCoords !== "" && visible) { + resultStageValue.innerHTML = stageCoords; + } else { + resultStageValue.innerHTML = document.getElementById(this._addUID("GPlocationOrigin_" + id)).value; + } + resultStage.appendChild(resultStageValue); + if (resultStageValue.innerHTML !== "") { + document.getElementById(this._addUID("GProuteResultsStages")).appendChild(resultStage); + } + } + } + }, + /** + * Create Show Results + * see event! + * + * @returns {DOMElement} DOM element + */ + _createRouteResultsElement: function _createRouteResultsElement() { + // contexte + var self = this; + var container = document.createElement("div"); + container.id = this._addUID("GProuteResults"); + + // FIXME Route results are dynamically filled in Javascript by route service + var divValue = document.createElement("div"); + divValue.id = this._addUID("GProuteResultsValues"); + container.appendChild(divValue); + var divMode = document.createElement("div"); + divMode.id = this._addUID("GProuteResultsMode"); + var select = document.createElement("select"); + select.id = this._addUID("GProuteResultsComputationSelect"); + select.className = "GPinputSelect"; + // gestionnaire d'evenement : + // on stocke la valeur du mode de calcul, et on relance le calcul d'itiniraire + select.addEventListener("change", function (e) { + self.onRouteModeComputationChangeAndRun(e); + }); + var computes = [{ + code: "fastest", + label: "Plus rapide" + }, { + code: "shortest", + label: "Plus court" + }]; + for (var i = 0; i < computes.length; i++) { + var option = document.createElement("option"); + option.value = computes[i].code; + option.text = computes[i].label; + select.appendChild(option); + } + divMode.appendChild(select); + container.appendChild(divMode); + var divNew = document.createElement("div"); + divNew.id = this._addUID("GProuteResultsNew"); + divNew.title = "Modifier le calcul"; + divNew.addEventListener("click", function (e) { + document.getElementById(self._addUID("GProuteResultsPanel")).className = "GProuteComponentHidden"; + document.getElementById(self._addUID("GProuteForm")).className = ""; + self.onShowRouteResultsNewClick(e); + }); + container.appendChild(divNew); + return container; + }, + /** + * Add Results Duration and Distance + * (results dynamically generate !) + * see event! + * @param {Number} distance - distance + * @param {Number} duration - duration + * @param {Function} fconvert - fconvert + * + * @returns {DOMElement} DOM element + */ + _addRouteResultsValuesElement: function _addRouteResultsValuesElement(distance, duration, fconvert) { + var div = document.getElementById(this._addUID("GProuteResultsValues")); + + // clean ! + if (div.childElementCount) { + while (div.firstChild) { + div.removeChild(div.firstChild); + } + } + var containerDistance = document.createElement("div"); + containerDistance.className = "GProuteResultsValue"; + var labelDistance = document.createElement("label"); + labelDistance.className = "GProuteResultsValueLabel"; + labelDistance.innerHTML = "Distance :"; + containerDistance.appendChild(labelDistance); + var distanceLabel = 0; + var isKm = parseInt(distance / 1000, 10); + if (!isKm) { + distanceLabel = Math.round(distance) + " m"; + } else { + var distanceArrondi = Math.round(distance); + distanceArrondi = distanceArrondi / 1000; + distanceLabel = distanceArrondi + " km"; + } + var divDistance = document.createElement("div"); + divDistance.id = this._addUID("GProuteResultsValueDist"); + divDistance.innerHTML = distanceLabel; + containerDistance.appendChild(divDistance); + div.appendChild(containerDistance); + var containerDuration = document.createElement("div"); + containerDuration.className = "GProuteResultsValue"; + var labelDuration = document.createElement("label"); + labelDuration.className = "GProuteResultsValueLabel"; + labelDuration.innerHTML = "Durée :"; + containerDuration.appendChild(labelDuration); + var divDuration = document.createElement("div"); + divDuration.id = this._addUID("GProuteResultsValueDist"); + divDuration.innerHTML = fconvert(duration); + containerDuration.appendChild(divDuration); + div.appendChild(containerDuration); + return div; + }, + /** + * Create Show Results Details + * + * @returns {DOMElement} DOM element + */ + _createRouteShowResultsDetailsElement: function _createRouteShowResultsDetailsElement() { + var input = document.createElement("input"); + input.id = this._addUID("GProuteResultsShowDetails"); + input.type = "checkbox"; + return input; + }, + /** + * Create Results Details + * + * @returns {DOMElement} DOM element + */ + _createRouteResultsDetailsElement: function _createRouteResultsDetailsElement() { + // + var div = document.createElement("div"); + div.id = this._addUID("GProuteResultsDetails"); + return div; + }, + /** + * Add Results Details + * (results dynamically generate !) + * @param {Object[]} instructions - instructions + * @param {Function} fconvert - fconvert + * + * @returns {DOMElement} DOM element + */ + _addRouteResultsDetailsElement: function _addRouteResultsDetailsElement(instructions, fconvert) { + // contexte + var context = this; + var div = document.getElementById(this._addUID("GProuteResultsDetails")); + + // clean ! + if (div.childElementCount) { + while (div.firstChild) { + div.removeChild(div.firstChild); + } + } + + // calcul des valeurs cumulé ! + var distanceCumul = 0; + var durationCumul = 0; + + /* jshint -W083 */ + for (var i = 0; i < instructions.length; i++) { + var id = i + 1; + var o = instructions[i]; + var divNum = document.createElement("div"); + divNum.className = "GProuteResultsDetailsNumber"; + divNum.innerHTML = id + "."; + div.appendChild(divNum); + durationCumul += parseFloat(o.duration); + distanceCumul += parseFloat(o.distance); + var distance = 0; + var isCumulKm = parseInt(distanceCumul / 1000, 10); + if (!isCumulKm) { + distance = Math.round(distanceCumul) + " m"; + } else { + var distanceArrondi = Math.round(distanceCumul); + distanceArrondi = distanceArrondi / 1000; + distance = distanceArrondi + " km"; + } + var divIns = document.createElement("div"); + divIns.className = "GProuteResultsDetailsInstruction"; + divIns.id = this._addUID("GProuteResultsDetailsInstruction_" + id); + divIns.title = "distance : " + distance + " / " + "temps : " + fconvert(durationCumul); + divIns.innerHTML = o.instruction; + divIns.addEventListener("mouseover", function (e) { + context.onRouteResultsDetailsMouseOver(e); + }); + divIns.addEventListener("mouseout", function (e) { + context.onRouteResultsDetailsMouseOut(e); + }); + divIns.addEventListener("click", function (e) { + // mode mobile ! + if (typeof context.onRouteResultsDetailsClick === "function") { + context.onRouteResultsDetailsClick(e); + } + }); + div.appendChild(divIns); + } + return div; + }, + // ################################################################### // + // ################### Methods to the form points #################### // + // ################# OVERWRITTEN BY LOCATIONSELECTOR ! ################# // + + /** + * Create Point + * see event ! + * OVERWRITTEN BY LOCATIONSELECTOR ! + * (version initial without LOCATIONSELECTOR PLUGIN) + * @param {Integer} n - n + * @param {String} text - text + * @param {Boolean} visibility - visibility + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelFormPointElement: function _createRoutePanelFormPointElement(n, text, visibility) { + // contexte d'execution + var context = this; + var div = document.createElement("div"); + div.id = "GProutePoint" + n; + div.className = visibility ? "GPflexInput GProuteStageFlexInput" : "GPflexInput GProuteStageFlexInputHidden"; + var labelOrigin = document.createElement("label"); + labelOrigin.id = "GProuteOriginLabel" + n; + labelOrigin.htmlFor = "GProuteOrigin" + n; + labelOrigin.innerHTML = text; + labelOrigin.addEventListener("click", function () { + var i = this.id.charAt(this.id.length - 1); + document.getElementById("GProuteOriginCoords" + i).value = ""; + for (var j = 1; j < 8; j++) { + document.getElementById("GProutePoint" + j).style.display = "flex"; + } + document.getElementById("GProuteForm").className = ""; + document.getElementById("GProuteOriginPointer" + i).checked = false; + document.getElementById("GProuteOrigin" + i).className = "GProuteOriginVisible"; + document.getElementById("GProuteOriginCoords" + i).className = "GProuteOriginHidden"; + }); + div.appendChild(labelOrigin); + var inputOrigin = document.createElement("input"); + inputOrigin.id = "GProuteOrigin" + n; + inputOrigin.className = "GProuteOriginVisible"; + inputOrigin.type = "text"; + inputOrigin.placeholder = "Saisir une adresse"; + inputOrigin.addEventListener("keyup", function (e) { + var charCode = e.which || e.keyCode; + if (charCode === 13 || charCode === 10) { + return; + } + var i = this.id.charAt(this.id.length - 1); + if (document.getElementById("GProuteOrigin" + i).value.length > 2) { + document.getElementById("GProuteAutoCompleteList" + i).style.display = "block"; + } else { + document.getElementById("GProuteAutoCompleteList" + i).style.display = "none"; + } + // gestionnaire d'evenement : + // on récupère la valeur de saisie pour une requête sur le service d'autocompletion. + // le resultat de la requête nous permet de recuperer les coordonnées du point... + context.onAutoCompleteSearchText(e); + }); + inputOrigin.addEventListener("blur", function () { + var i = this.id.charAt(this.id.length - 1); + document.getElementById("GProuteAutoCompleteList" + i).style.display = "none"; + }); + div.appendChild(inputOrigin); + var inputOriginCoord = document.createElement("input"); + inputOriginCoord.id = "GProuteOriginCoords" + n; + inputOriginCoord.className = "GProuteOriginHidden"; + inputOriginCoord.type = "text"; + inputOriginCoord.disabled = true; + div.appendChild(inputOriginCoord); + var inputOriginPointer = document.createElement("input"); + inputOriginPointer.id = "GProuteOriginPointer" + n; + inputOriginPointer.type = "checkbox"; + div.appendChild(inputOriginPointer); + var labelOriginPointer = document.createElement("label"); + labelOriginPointer.id = "GProuteOriginPointerImg" + n; + labelOriginPointer.htmlFor = "GProuteOriginPointer" + n; + labelOriginPointer.className = "GProuteOriginPointerImg"; + labelOriginPointer.title = "Pointer un lieu sur la carte"; + labelOriginPointer.addEventListener("click", function (evt) { + evt.preventDefault(); + evt.stopPropagation(); + var i = this.id.charAt(this.id.length - 1); + var j; + for (j = 1; j < 8; j++) { + if (i !== j) { + document.getElementById("GProuteOriginPointer" + j).checked = false; + if (document.getElementById("GProuteOriginCoords" + j).value === "Pointer un lieu sur la carte") { + document.getElementById("GProuteOriginCoords" + j).value = ""; + document.getElementById("GProuteOrigin" + j).className = "GProuteOriginVisible"; + document.getElementById("GProuteOriginCoords" + j).className = "GProuteOriginHidden"; + } + } + } + if (document.getElementById("GProuteOriginPointer" + i).checked) { + document.getElementById("GProuteOriginCoords" + i).value = ""; + for (j = 1; j < 8; j++) { + document.getElementById("GProutePoint" + j).style.display = "flex"; + } + document.getElementById("GProuteForm").className = ""; + document.getElementById("GProuteOriginPointer" + i).checked = false; + document.getElementById("GProuteOrigin" + i).className = "GProuteOriginVisible"; + document.getElementById("GProuteOriginCoords" + i).className = "GProuteOriginHidden"; + } else { + document.getElementById("GProuteOriginCoords" + i).value = "Pointer un lieu sur la carte"; + for (j = 1; j < 8; j++) { + if (i === j) { + document.getElementById("GProutePoint" + j).style.display = "flex"; + } else { + document.getElementById("GProutePoint" + j).style.display = "none"; + } + } + document.getElementById("GProuteForm").className = "GProuteFormMini"; + document.getElementById("GProuteOriginPointer" + i).checked = true; + document.getElementById("GProuteOrigin" + i).className = "GProuteOriginHidden"; + document.getElementById("GProuteOriginCoords" + i).className = "GProuteOriginVisible"; + } + // gestionnaire d'evenement : + // on stocke la valeur du point, utilisée pour la requête sur le service de calcul d'itiniraire + context.onRouteMapPointClick(evt); + }); + div.appendChild(labelOriginPointer); + return div; + }, + /** + * Create Remove Point tag + * see event ! + * OVERWRITTEN BY LOCATIONSELECTOR ! + * (version initial without LOCATIONSELECTOR PLUGIN) + * @param {Integer} n - n + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelFormRemoveStageElement: function _createRoutePanelFormRemoveStageElement(n) { + // contexte d'execution + var context = this; + var divRm = document.createElement("div"); + divRm.id = "GProuteStageRemove" + n; + divRm.className = "GProuteStageRemove"; + divRm.title = "Supprimer l'étape"; + if (n !== 1 && n !== 7) { + divRm.addEventListener("click", function (e) { + var i = this.id.charAt(this.id.length - 1); + document.getElementById("GProutePoint" + i).className = "GPflexInput GProuteStageFlexInputHidden"; + document.getElementById("GProuteOrigin" + i).value = ""; + document.getElementById("GProuteOrigin" + i).className = "GProuteOriginVisible"; + document.getElementById("GProuteOriginCoords" + i).value = ""; + document.getElementById("GProuteOriginCoords" + i).className = "GProuteOriginHidden"; + document.getElementById("GProuteStageAdd").style.display = ""; + // Moving up exclusions picto + // var exclusionsPictoTop = document.getElementById("GPshowRouteExclusionsPicto").style.top; + // document.getElementById("GPshowRouteExclusionsPicto").style.top = (parseInt(exclusionsPictoTop, 10) - 33).toString() + "px"; + // gestionnaire d'evenement : + // on supprime le point, utilisé pour la requête sur le service d'itiniraire + context.onRouteRemovePointClick(e); + }); + } + return divRm; + }, + /** + * Create Add Point tag + * see event ! + * OVERWRITTEN BY LOCATIONSELECTOR ! + * (version initial without LOCATIONSELECTOR PLUGIN) + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelFormAddStageElement: function _createRoutePanelFormAddStageElement() { + // contexte d'execution + var context = this; + var divAdd = document.createElement("div"); + divAdd.id = "GProuteStageAdd"; + divAdd.title = "Ajouter une étape"; + divAdd.addEventListener("click", function (e) { + var lastStage = 1; + var nbStages = 0; + for (var i = 2; i < 7; i++) { + if (document.getElementById("GProutePoint" + i).className === "GPflexInput GProuteStageFlexInputHidden") { + if (lastStage === 1) { + lastStage = i; + } + } else { + nbStages++; + } + } + if (lastStage < 7) { + document.getElementById("GProutePoint" + lastStage).className = "GPflexInput GProuteStageFlexInput"; + // Moving down exclusions picto + // var exclusionsPictoTop = document.getElementById("GPshowRouteExclusionsPicto").style.top; + // document.getElementById("GPshowRouteExclusionsPicto").style.top = (parseInt(exclusionsPictoTop, 10) + 33).toString() + "px"; + } + + if (nbStages === 4) { + document.getElementById("GProuteStageAdd").style.display = "none"; + } + // gestionnaire d'evenement : + // on ajoute le point, utilisé pour la requête sur le service d'itiniraire + context.onRouteAddPointClick(e); + }); + return divAdd; + }, + /** + * Create Results autocompletion to the point + * see event! + * OVERWRITTEN BY LOCATIONSELECTOR ! + * (version initial without LOCATIONSELECTOR PLUGIN) + * @param {Integer} n - n + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelFormAutoCompleteListElement: function _createRoutePanelFormAutoCompleteListElement(n) { + // contexte d'execution + var context = this; + var div = document.createElement("div"); + div.id = "GProuteAutoCompleteList" + n; + div.className = "GPadvancedAutoCompleteList"; + if (div.addEventListener) { + div.addEventListener("click", function (e) { + context.onAutoCompletedResultsItemClick(e); + document.getElementById("GProuteAutoCompleteList" + n).style.display = "none"; + }, false); + } else if (div.attachEvent) { + div.attachEvent("onclick", function (e) { + context.onAutoCompletedResultsItemClick(e); + document.getElementById("GProuteAutoCompleteList" + n).style.display = "none"; + }); + } + + // Proposals are dynamically filled in Javascript by autocomplete service + //
    ...
    + + return div; + }, + /** + * Autocompletion result to a point. + * Proposals are dynamically filled in Javascript by autocomplete service + * OVERWRITTEN BY LOCATIONSELECTOR ! + * (version initial without LOCATIONSELECTOR PLUGIN) + * + * + * @param {Object} location - suggested location results + * @param {Number} n - number of the point + * @param {Number} id - ID + */ + _createRouteAutoCompletedLocationElement: function _createRouteAutoCompletedLocationElement(location, n, id) { + var container = document.getElementById("GProuteAutoCompleteList" + n); + var div = document.createElement("div"); + div.id = "AutoCompletedLocation" + id; + div.className = "GPautoCompleteProposal"; + div.innerHTML = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_2__["default"].getSuggestedLocationFreeform(location); + container.appendChild(div); + }, + // ################################################################### // + // ############## Methods to the choice mode into form ############### // + // ################################################################### // + + /** + * Create Container to Mode choice transport + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelFormModeChoiceElement: function _createRoutePanelFormModeChoiceElement() { + var div = document.createElement("div"); + div.id = this._addUID("GProuteModeChoice"); + + // div.appendChild(this._createRoutePanelFormModeChoiceTransportElement()); + // div.appendChild(this._createRoutePanelFormModeChoiceComputeElement()); + + return div; + }, + /** + * Create Mode choice transport + * see event ! + * FIXME event not useful + * @param {String[]} transports - transports + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelFormModeChoiceTransportElement: function _createRoutePanelFormModeChoiceTransportElement(transports) { + // contexte d'execution + var context = this; + var div = document.createElement("div"); + div.id = this._addUID("GProuteTransportChoice"); + var span = document.createElement("span"); + span.className = "GProuteModeLabel"; + span.innerHTML = "Mode de transport"; + div.appendChild(span); + + /* jshint -W083 */ + for (var i = 0; i < transports.length; i++) { + var transport = transports[i]; + if (transport === "Voiture") { + var inputCar = document.createElement("input"); + inputCar.id = this._addUID("GProuteTransportCar"); + inputCar.type = "radio"; + inputCar.name = "GProuteTransport"; + inputCar.value = "Voiture"; + if (i === 0) { + inputCar.checked = true; + } + // gestionnaire d'evenement : + // on stocke le mode de transport, + // utilisation pour la requête sur le service de calcul d'itiniraire + if (inputCar.addEventListener) { + inputCar.addEventListener("change", function (e) { + context.onRouteModeTransportChange(e); + }); + } else if (inputCar.attachEvent) { + inputCar.attachEvent("onchange", function (e) { + context.onRouteModeTransportChange(e); + }); + } + div.appendChild(inputCar); + var labelCar = document.createElement("label"); + labelCar.className = "GProuteTransportImg"; + labelCar.htmlFor = this._addUID("GProuteTransportCar"); + labelCar.title = "Voiture"; + div.appendChild(labelCar); + } + if (transport === "Pieton") { + var inputPedestrian = document.createElement("input"); + inputPedestrian.id = this._addUID("GProuteTransportPedestrian"); + inputPedestrian.type = "radio"; + inputPedestrian.name = "GProuteTransport"; + inputPedestrian.value = "Pieton"; + if (i === 0) { + inputPedestrian.checked = true; + } + // gestionnaire d'evenement : + // on stocke le mode de transport, + // utilisation pour la requête sur le service de calcul d'itiniraire + if (inputPedestrian.addEventListener) { + inputPedestrian.addEventListener("change", function (e) { + context.onRouteModeTransportChange(e); + }); + } else if (inputPedestrian.attachEvent) { + inputPedestrian.attachEvent("onchange", function (e) { + context.onRouteModeTransportChange(e); + }); + } + div.appendChild(inputPedestrian); + var labelPedestrian = document.createElement("label"); + labelPedestrian.className = "GProuteTransportImg"; + labelPedestrian.htmlFor = this._addUID("GProuteTransportPedestrian"); + labelPedestrian.title = "Piéton"; + div.appendChild(labelPedestrian); + } + } + return div; + }, + /** + * Create Mode choice computation + * see event! + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelFormModeChoiceComputeElement: function _createRoutePanelFormModeChoiceComputeElement() { + // contexte d'execution + var context = this; + var div = document.createElement("div"); + div.id = this._addUID("GProuteComputationChoice"); + var label = document.createElement("label"); + label.htmlFor = this._addUID("GProuteComputationSelect"); + label.innerHTML = "Mode de calcul"; + var span = document.createElement("span"); + span.className = "GProuteModeLabel"; + span.appendChild(label); + div.appendChild(span); + var select = document.createElement("select"); + select.id = this._addUID("GProuteComputationSelect"); + select.className = "GPinputSelect"; + // gestionnaire d'evenement : + // on stocke la valeur du mode de calcul, + // utilisation pour la requête sur le service de calcul d'itiniraire + select.addEventListener("change", function (e) { + context.onRouteModeComputationChange(e); + }); + var computes = [{ + code: "fastest", + label: "Plus rapide" + }, { + code: "shortest", + label: "Plus court" + }]; + for (var i = 0; i < computes.length; i++) { + var option = document.createElement("option"); + option.value = computes[i].code; + option.text = computes[i].label; + select.appendChild(option); + } + div.appendChild(select); + return div; + }, + // ################################################################### // + // ################# Methods to the choice exclusions ################ // + // ################################################################### // + + /** + * Hidden checkbox for minimizing/maximizing Exclusions Options + * + * @returns {DOMElement} DOM element + */ + _createShowRouteExclusionsElement: function _createShowRouteExclusionsElement() { + var input = document.createElement("input"); + input.id = this._addUID("GPshowRouteExclusions"); + input.type = "checkbox"; + return input; + }, + /** + * Label to Exclusions Options + * see event ! + * FIXME event not useful + * + * @returns {DOMElement} DOM element + */ + _createShowRouteExclusionsPictoElement: function _createShowRouteExclusionsPictoElement() { + // contexte d'execution + var context = this; + var label = document.createElement("label"); + label.id = this._addUID("GPshowRouteExclusionsPicto"); + label.className = "GPshowMoreOptionsImage GPshowMoreOptions GPshowRouteExclusionsPicto"; + label.htmlFor = this._addUID("GPshowRouteExclusions"); + label.title = "Exclusions"; + // label.style.top = "185px"; + + // gestionnaire d'evenement : + // on ouvre le menu des options des exclusions + if (label.addEventListener) { + label.addEventListener("click", function (e) { + context.onShowRouteExclusionsClick(e); + }); + } else if (label.attachEvent) { + label.attachEvent("onclick", function (e) { + context.onShowRouteExclusionsClick(e); + }); + } + return label; + }, + /** + * Create Container to Exclusions + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelFormExclusionsElement: function _createRoutePanelFormExclusionsElement() { + var div = document.createElement("div"); + div.id = this._addUID("GProuteExclusions"); + var span = document.createElement("span"); + span.className = "GProuteExclusionsLabel"; + span.innerHTML = "Passages autorisés"; + div.appendChild(span); + + // div.appendChild(this._createRoutePanelFormExclusionOptionsElement()); + + return div; + }, + /** + * Create Exclusions Options + * see event ! + * FIXME event not useful + * @param {Object[]} exclusions - exclusions + * + * @returns {DOMElement} DOM element + */ + _createRoutePanelFormExclusionOptionsElement: function _createRoutePanelFormExclusionOptionsElement(exclusions) { + // contexte d'execution + var context = this; + var div = document.createElement("div"); + div.className = "GProuteExclusionsOptions"; + + /* jshint -W083 */ + for (var value in exclusions) { + if (exclusions.hasOwnProperty(value)) { + var status = exclusions[value]; + switch (value) { + case "toll": + var inputToll = document.createElement("input"); + inputToll.id = this._addUID("GProuteExclusionsToll"); + inputToll.type = "checkbox"; + inputToll.value = "Toll"; + inputToll.checked = !status; + // gestionnaire d'evenement : + // on stocke l'exclusion, + // utilisation pour la requête sur le service de calcul d'itiniraire + if (inputToll.addEventListener) { + inputToll.addEventListener("change", function (e) { + context.onRouteExclusionsChange(e); + }); + } else if (inputToll.attachEvent) { + inputToll.attachEvent("onchange", function (e) { + context.onRouteExclusionsChange(e); + }); + } + div.appendChild(inputToll); + var labelToll = document.createElement("label"); + labelToll.className = "GProuteExclusionsOption"; + labelToll.htmlFor = this._addUID("GProuteExclusionsToll"); + labelToll.innerHTML = "Péages"; + div.appendChild(labelToll); + break; + case "tunnel": + var inputTunnel = document.createElement("input"); + inputTunnel.id = this._addUID("GProuteExclusionsTunnel"); + inputTunnel.type = "checkbox"; + inputTunnel.value = "Tunnel"; + inputTunnel.checked = !status; + // gestionnaire d'evenement : + // on stocke l'exclusion, + // utilisation pour la requête sur le service de calcul d'itiniraire + if (inputTunnel.addEventListener) { + inputTunnel.addEventListener("change", function (e) { + context.onRouteExclusionsChange(e); + }); + } else if (inputTunnel.attachEvent) { + inputTunnel.attachEvent("onchange", function (e) { + context.onRouteExclusionsChange(e); + }); + } + div.appendChild(inputTunnel); + var labelTunnel = document.createElement("label"); + labelTunnel.className = "GProuteExclusionsOption"; + labelTunnel.htmlFor = this._addUID("GProuteExclusionsTunnel"); + labelTunnel.innerHTML = "Tunnels"; + div.appendChild(labelTunnel); + break; + case "bridge": + var inputBridge = document.createElement("input"); + inputBridge.id = this._addUID("GProuteExclusionsBridge"); + inputBridge.type = "checkbox"; + inputBridge.value = "Bridge"; + inputBridge.checked = !status; + // gestionnaire d'evenement : + // on stocke l'exclusion, + // utilisation pour la requête sur le service de calcul d'itiniraire + if (inputBridge.addEventListener) { + inputBridge.addEventListener("change", function (e) { + context.onRouteExclusionsChange(e); + }); + } else if (inputBridge.attachEvent) { + inputBridge.attachEvent("onchange", function (e) { + context.onRouteExclusionsChange(e); + }); + } + div.appendChild(inputBridge); + var labelBridge = document.createElement("label"); + labelBridge.className = "GProuteExclusionsOption"; + labelBridge.htmlFor = this._addUID("GProuteExclusionsBridge"); + labelBridge.innerHTML = "Ponts"; + div.appendChild(labelBridge); + break; + } + } + } + return div; + }, + // ################################################################### // + // ############################### Submit Form ####################### // + // ################################################################### // + + /** + * Create Submit Form Element + * + * @returns {DOMElement} DOM element + */ + _createRouteSubmitFormElement: function _createRouteSubmitFormElement() { + var input = document.createElement("input"); + input.id = this._addUID("GProuteSubmit"); + input.className = "GPinputSubmit"; + input.type = "submit"; + input.value = "Calculer"; + return input; + }, + // ################################################################### // + // ############################### Reset picto ####################### // + // ################################################################### // + + /** + * Create Reset Picto Element + * + * @returns {DOMElement} DOM element + */ + _createRouteFormResetElement: function _createRouteFormResetElement() { + var self = this; + var divReset = document.createElement("div"); + divReset.id = this._addUID("GProuteReset"); + divReset.title = "Réinitialiser les paramètres"; + divReset.addEventListener("click", function (e) { + self.onRouteResetClick(e); + }); + return divReset; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (RouteDOM); + +/***/ }), +/* 121 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37); +/* harmony import */ var _Common_Utils_SearchEngineUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(122); +/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(100); +/* harmony import */ var _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(102); +/* harmony import */ var _Common_Controls_SearchEngineDOM__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(123); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(124); +/* global KeyboardEvent */ + + + + + + + + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__["default"].getLogger("searchengine"); + +/** + * @classdesc + * + * Leaflet Control Class to search positons of geographic identifiers (places names, address, cadastral parcel) using : + * + * - the [geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage.html}. + * - the [autocompletion service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/autocompletion.html} + *
    + * + * Use {@link module :Controls.SearchEngine L.geoportalControl.SearchEngine()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control native class. + * + * @namespace + * @alias L.geoportalControl.SearchEngine + */ +var SearchEngine = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends L.geoportalControl.SearchEngine.prototype */{ + includes: _Common_Controls_SearchEngineDOM__WEBPACK_IMPORTED_MODULE_7__["default"], + /** + * options by default + * + * @private + */ + options: { + position: "topleft", + collapsed: true, + displayInfo: true, + zoomTo: "", + resources: [], + placeholder: "Rechercher un lieu, une adresse", + displayMarker: true, + markerStyle: "blue", + displayAdvancedSearch: true, + advancedSearch: {}, + geocodeOptions: {}, + autocompleteOptions: { + serviceOptions: {}, + triggerGeocode: false, + triggerDelay: 1000 + } + }, + /** + * @constructor SearchEngine + * + * @private + * @alias SearchEngine + * @extends {L.Control} + * @param {Object} options - control options + * @param {String} [options.apiKey] - API key. The "calcul" key is used by default. + * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol) + * @param {Boolean} [options.collapsed] - collapse mode, false by default + * @param {String} [options.position] - position of component into the map, 'topleft' by default + * @param {Boolean} [options.displayInfo] - get informations on popup marker + * @param {String|Numeric|Function} [options.zoomTo] - zoom to results, by default, current zoom. + * Value possible : auto or zoom level. + * Possible to overload it with a function : + * zoomTo : function (info) { + * // do some stuff... + * return zoom; + * } + * @param {String} [options.placeholder] - set placeholder in search bar. Default is "Rechercher un lieu, une adresse". + * @param {Boolean} [options.displayMarker] - set a marker on search result, defaults to true. + * @param {String|Object} [options.markerStyle] - set a marker style. Currently possible values are "blue" (default value), "orange", "red" and "green". But you can use an L.Icon object (see {@link http://leafletjs.com/reference-1.2.0.html#icon L.Icon }). + * @param {Sting} [options.apiKey] - API key. The "calcul" key is used by default. + * @param {String} [options.resources.geocode] - resources geocoding, by default : "location" + * @param {Object} [options.resources.autocomplete] - resources to be used by autocompletion service, by default : ["StreetAddress", "PositionOfInterest"] + * @param {Boolean} [options.displayAdvancedSearch] - False to disable advanced search tools (it will not be displayed). Default is true (displayed) + * @param {Object} [options.advancedSearch] - advanced search for geocoding (filters) + * @param {Object} [options.geocodeOptions] - options of geocode service + * @param {Object} [options.autocompleteOptions] - options of autocomplete service + * @param {Object} [options.autocompleteOptions.serviceOptions] - options of autocomplete service + * @param {Boolean} [options.autocompleteOptions.triggerGeocode] - trigger a geocoding request if the autocompletion does not return any suggestions, false by default + * @param {Number} [options.autocompleteOptions.triggerDelay] - waiting time before sending the geocoding request, 1000ms by default + * @example + * var SearchEngine = L.geoportalControl.SearchEngine({ + * position : "topright", + * collapsed : true, + * displayInfo : true, + * displayAdvancedSearch : true, + * placeholder : "Rechercher un lieu, une adresse", + * displayMarker : true, + * markerStyle : L.icon(iconUrl : 'https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png'); + * zoomTo : 15, + * resources : ["PositionOfInterest", "StreetAddress"], + * advancedSearch : { + * PositionOfInterest : [{name : "municipality", title : "Ville"}], + * StreetAddress : [{...}], + * CadastralParcel : null, + * }, + * apiKey : "zfgzrgffg57rfg8ar7gr4g5r4", + * geocodeOptions : {}, + * autocompleteOptions : {} + * }); + * + */ + initialize: function initialize(options) { + // on transmet les options au controle + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.setOptions(this, options); + if (typeof this.options.resources === "undefined") { + this.options.resources = {}; + } + if (typeof this.options.resources.geocode === "undefined" || this.options.resources.geocode === "") { + this.options.resources.geocode = "location"; + } + if (typeof this.options.resources.autocomplete === "undefined" || this.options.resources.autocomplete.length === 0) { + this.options.resources.autocomplete = ["PositionOfInterest", "StreetAddress"]; + } + + /** uuid */ + this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__["default"].generate(); + + /** affichage du container de saisie */ + this._showContainer = null; + this._pictoContainer = null; + + /** container de la saisie du la recherche */ + this._inputContainer = null; + + /** container des reponses de l'autocompletion */ + this._suggestedContainer = null; + + /** listes des reponses de l'autocompletion */ + this._suggestedLocations = []; + + /** container des reponses du geocodage */ + this._geocodedContainer = null; + + /** liste des reponses du geocodage */ + this._geocodedLocations = []; + + /** container des filtres du geocodage */ + this._filterContainer = null; + + /** ressource de geocodage selectionnée pour le geocodage avancé */ + this._currentGeocodingCode = null; + + /** localisant */ + this._currentGeocodingLocation = null; + + /** liste des filtres du geocodage pour le geocodage avancé */ + this._advancedSearchFilters = {}; + + /** liste des ressources du geocodage pour le geocodage avancé */ + this._advancedSearchCodes = []; + + /** marker */ + this._marker = null; + + // trigger geocode + this._triggerHandler = null; + }, + /** + * this method is called by this.addTo(map) + * and fills variable : this._container = this.onAdd(map) + * + * @returns {DOMElement} DOM element + * @private + */ + onAdd: function onAdd( /* map */ + ) { + // TODO initialisation des ressources du geocodage avancé + this._initAdvancedSearchCodes(); + + // initialisation des filtres du geocodage avancé + this._initAdvancedSearchFilters(); + + // initialisation du DOM du composant + var container = this._initLayout(); + + // deactivate of events that may interfere with the map + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container); + return container; + }, + /** + * this method is called when the control is removed from the map + * and removes events on map. + * + * @param {Object} map - the map + * + * @private + */ + onRemove: function onRemove(map) { + this._clearSuggestedLocation(); + this._clearGeocodedLocation(); + if (this._marker != null) { + map.removeLayer(this._marker); + this._marker = null; + } + }, + // ################################################################### // + // ########################## methods DOM ############################ // + // ################################################################### // + + /** + * this method is called by this.onAdd(map) + * and initialize the container HTMLElement + * + * @returns {DOMElement} DOM element + * + * @private + */ + _initLayout: function _initLayout() { + // create main container + var container = this._createMainContainerElement(); + + // create show search engine element + var inputShow = this._showContainer = this._createShowSearchEngineElement(); + container.appendChild(inputShow); + + // mode "collapsed" + if (!this.options.collapsed) { + inputShow.checked = "true"; + } + + // create search engine picto + var picto = this._pictoContainer = this._createShowSearchEnginePictoElement(); + container.appendChild(picto); + var search = this._createSearchInputElement(this.options.placeholder); + container.appendChild(search); + if (this.options.displayAdvancedSearch) { + var advancedShow = this._createShowAdvancedSearchElement(); + container.appendChild(advancedShow); + + // INFO je decompose les appels car j'ai besoin de recuperer le container + // des filtres + var advancedPanel = this._createAdvancedSearchPanelElement(); + var advancedHeader = this._createAdvancedSearchPanelHeaderElement(); + var advancedForm = this._createAdvancedSearchPanelFormElement(this._advancedSearchCodes); + var advancedFormFilters = this._filterContainer = this._createAdvancedSearchFormFiltersElement(); + this._setFilter(this._advancedSearchCodes[0].id); // ex "PositionOfInterest" + var advancedFormInput = this._createAdvancedSearchFormInputElement(); + advancedForm.appendChild(advancedFormFilters); + advancedForm.appendChild(advancedFormInput); + advancedPanel.appendChild(advancedHeader); + advancedPanel.appendChild(advancedForm); + container.appendChild(advancedPanel); + } + + // INFO je decompose les appels car j'ai besoin de recuperer le container + // des resultats de l'autocompletion + var autocomplete = this._createAutoCompleteElement(); + var autocompleteList = this._suggestedContainer = this._createAutoCompleteListElement(); + autocomplete.appendChild(autocompleteList); + container.appendChild(autocomplete); + + // INFO je decompose les appels car j'ai besoin de recuperer le container + // des resultats du geocodage + var geocode = this._createGeocodeResultsElement(); + var geocodeList = this._geocodedContainer = this._createGeocodeResultsListElement(); + geocode.appendChild(geocodeList); + container.appendChild(geocode); + return container; + }, + // ################################################################### // + // ################# methods Filters Geocode Advanced ################ // + // ################################################################### // + + /** + * this method is called by this.onAdd() + * and initialize the geocoding resources. + * TODO + * + * @private + */ + _initAdvancedSearchCodes: function _initAdvancedSearchCodes() { + // INFORMATION + // on y ajoute les filtres attributaires pour une table de ressources + // selectionnée via un evenement (onchange) de la liste deroulante du + // menu avancé du geocodage. + // cf. onGeocodingAdvancedSearchCodeChange() pour la selection de la + // ressource de geocodage à afficher + + var geocodeResources = this.options.resources.geocode; + if (geocodeResources === "location") { + geocodeResources = ["PositionOfInterest", "StreetAddress", "CadastralParcel"]; + } + if (!Array.isArray(geocodeResources)) { + geocodeResources = [geocodeResources]; + } + for (var i = 0; i < geocodeResources.length; i++) { + switch (geocodeResources[i]) { + case "PositionOfInterest": + this._advancedSearchCodes.push({ + id: "PositionOfInterest", + title: "Lieux/toponymes" + }); + break; + case "StreetAddress": + this._advancedSearchCodes.push({ + id: "StreetAddress", + title: "Adresses" + }); + break; + case "CadastralParcel": + this._advancedSearchCodes.push({ + id: "CadastralParcel", + title: "Parcelles cadastrales" + }); + break; + default: + break; + } + } + // par défaut, au cas où aucune ressource passée en option ne correspond à celles attendues + if (this._advancedSearchCodes.length === 0) { + this._advancedSearchCodes = [{ + id: "StreetAddress", + title: "Adresses" + }, { + id: "PositionOfInterest", + title: "Lieux/toponymes" + }, { + id: "CadastralParcel", + title: "Cadastre" + }]; + } + logger.log("advancedSearchCodes", this._advancedSearchCodes); + }, + /** + * this method is called by this.onAdd() + * and initialize the advanced geocoding filters. + * FIXME + * + * @private + */ + _initAdvancedSearchFilters: function _initAdvancedSearchFilters() { + // FIXME la liste des filtres attributaires doit elle être recuperée + // de l'objet geocode ? doit on tous les mettre ou doit on faire un choix ? + + // liste des filtres par defauts pour toutes les ressources + this._advancedSearchFilters = _Common_Utils_SearchEngineUtils__WEBPACK_IMPORTED_MODULE_4__["default"].advancedSearchFiltersByDefault; + + // on merge les options avancées avec celles par defaut + var advancedSearchFiltersCustom = this.options.advancedSearch; + _Common_Utils__WEBPACK_IMPORTED_MODULE_8__["default"].assign(this._advancedSearchFilters, advancedSearchFiltersCustom); + logger.log("advancedSearchFilters", this._advancedSearchFilters); + }, + /** + * this method is called by : + * - this._initLayout() : ... + * - this.onGeocodingAdvancedSearchCodeChoice() : ... + * and initialize or create the filters container HTMLElement + * to the geocoding advanced menu. + * + * @param {String} code - resource geocoding name + * + * @returns {DOMElement} DOM element + * + * @private + */ + _setFilter: function _setFilter(code) { + // INFORMATION + // Nous avons 2 solutions possibles pour la mise en place des filtres. + // 1. Soit on decide de creer tous les filtres pour chaque ressource + // de geocodage à l'initialisation du composant, et on joue sur le + // mode 'hidden' pour n'afficher que la ressource selectionnée. + // 2. Soit on decide de creer à chaque fois les filtres pour la + // ressource selectionnée. + // Chaque solution a ses inconvenients/avantages. + // Implementation du choix 2 car elle offre plus de souplesse pour + // recuperer les 'form-data'... + + var container = this._filterContainer; + var codeFound = false; + for (var i = 0; i < this._advancedSearchCodes.length; i++) { + if (this._advancedSearchCodes[i].id === code) { + codeFound = true; + break; + } + } + if (!codeFound) { + // cette ressource n'est pas disponible, + // on supprime les anciens enfants... + while (container.firstChild) { + container.removeChild(container.firstChild); + } + return; + } + + // on sauvegarde la ressource de geocodage sélectionnée + this._currentGeocodingCode = code; + + // on supprime les enfants... + while (container.firstChild) { + container.removeChild(container.firstChild); + } + var lstAttributs = this._advancedSearchFilters[code]; + if (!lstAttributs || lstAttributs.length === 0) { + // cette ressource n'est pas parametrable + return; + } + var divTable = this._createAdvancedSearchFiltersTableElement(code, true); + for (var j = 0; j < lstAttributs.length; j++) { + var divFilter = this._createAdvancedSearchFiltersAttributElement(lstAttributs[j]); + divTable.appendChild(divFilter); + } + container.appendChild(divTable); + return container; + }, + // ################################################################### // + // ################ methods to request and results ################### // + // ################################################################### // + + /** + * this method is called by this.onAutoCompleteSearch() + * and executes a request to the service. + * + * @param {Object} settings - service settings + * @param {String} settings.text - text + * @param {Function} settings.onSuccess - callback + * @param {Function} settings.onFailure - callback + * + * @private + */ + _requestAutoComplete: function _requestAutoComplete(settings) { + // on ne fait pas de requête si on n'a pas renseigné de parametres ! + if (!settings || Object.keys(settings).length === 0) { + return; + } + + // on ne fait pas de requête si la parametre 'text' est vide ! + if (!settings.text) { + return; + } + logger.log(settings); + var options = {}; + // on recupere les options du service + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.autocompleteOptions.serviceOptions); + // ainsi que la recherche et les callbacks + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, settings); + + // cas où la clef API n'est pas renseignée dans les options du service, + // on utilise celle renseignée au niveau du controle ou la clé "calcul" par défaut. + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + apiKey: options.apiKey || this.options.apiKey + }); + + // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert + // true par défaut (https) + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + ssl: this.options.ssl + }); + logger.log(options); + geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__["default"].Services.autoComplete(options); + }, + /** + * this method is called by this.onGeocodingSearch() + * and fills the container of the location list. + * it creates a HTML Element per location + * (cf. this. ...) + * + * @param {Array} locations - Array of Gp.Services.AutoComplete.SuggestedLocation corresponding to autocomplete results list + * @private + */ + _fillAutoCompletedLocationListContainer: function _fillAutoCompletedLocationListContainer(locations) { + if (!locations || locations.length === 0) { + return; + } + + // on vide la liste avant de la construire + var element = this._suggestedContainer; + if (element.childElementCount) { + while (element.firstChild) { + element.removeChild(element.firstChild); + } + } + for (var i = 0; i < locations.length; i++) { + // Proposals are dynamically filled in Javascript by autocomplete service + this._createAutoCompletedLocationElement(locations[i], i); + } + }, + /** + * this method is called by this.onAutoCompleteSearch() + * and executes a request to the service. + * + * @param {Object} settings - service settings + * @param {String} settings.location - text + * @param {Function} settings.onSuccess - callback + * @param {Function} settings.onFailure - callback + * + * @private + */ + _requestGeocoding: function _requestGeocoding(settings) { + // on ne fait pas de requête si on n'a pas renseigné de parametres ! + if (!settings || Object.keys(settings).length === 0) { + return; + } + + // on ne fait pas de requête si la parametre 'text' est vide ! + if (!settings.query) { + return; + } + logger.log(settings); + var options = {}; + // on recupere les options du service + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.geocodeOptions); + // ainsi que la recherche, les filtres du geocodage avancé et les callbacks + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, settings); + + // on ajoute le paramètre index spécifiant les ressources. + var resources = this.options.resources.geocode; + if (resources) { + // il se peut que l'utilisateur ait surchargé ce paramètre dans geocodeOptions, + // ou qu'il ait déjà été rempli (cas de la recherche avancée) + if (!options.index) { + options.index = resources; + } + } + + // cas où la clef API n'est pas renseignée dans les options du service, + // on utilise celle renseignée au niveau du controle ou la clé "calcul" par défaut. + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + apiKey: options.apiKey || this.options.apiKey + }); + + // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert + // true par défaut (https) + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + ssl: this.options.ssl + }); + logger.log(options); + geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__["default"].Services.geocode(options); + }, + /** + * this method is called by this.onGeocodingSearch() + * and fills the container of the location results. + * it creates a HTML Element per location + * (cf. this. ...) + * + * @param {Object[]} locations - locations + * + * @private + */ + _fillGeocodedLocationListContainer: function _fillGeocodedLocationListContainer(locations) { + if (!locations || locations.length === 0) { + this._clearGeocodedLocation(); + return; + } + + // on vide la liste avant de la construire + var element = this._geocodedContainer; + if (element.childElementCount) { + while (element.firstChild) { + element.removeChild(element.firstChild); + } + } + for (var i = 0; i < locations.length; i++) { + logger.log(locations[i]); + // Proposals are dynamically filled in Javascript by autocomplete service + this._createGeocodedLocationElement(locations[i], i); + } + + // sauvegarde de l'etat des locations + this._geocodedLocations = locations; + }, + /** + * this method is called by Gp.Services.autoComplete callback in case of success + * (cf. this.onAutoCompleteSearchText), for suggested locations with null coordinates + * (case of postalCode research for instance). + * Send a geocode request with suggested location 'fullText' attribute, to get its coordinates and display it in autocomplete results list container. + * + * @param {Gp.Services.AutoCompleteResponse.SuggestedLocation} suggestedLocation - autocompletion result (with null coordinates) to be geocoded + * @param {Number} i - suggestedLocation position in Gp.Services.AutoCompleteResponse.suggestedLocations autocomplete results list + * @private + */ + _getGeocodeCoordinatesFromFullText: function _getGeocodeCoordinatesFromFullText(suggestedLocation, i) { + var _location = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_5__["default"].getSuggestedLocationFreeform(suggestedLocation); + var context = this; + this._requestGeocoding({ + query: _location, + // callback onSuccess + onSuccess: function onSuccess(response) { + logger.log("request from Geocoding (coordinates null)", response); + if (response.locations && response.locations.length !== 0 && response.locations[0].position) { + // on modifie les coordonnées du résultat en EPSG:4326 donc lat,lon + if (context._suggestedLocations && context._suggestedLocations[i]) { + context._suggestedLocations[i].position = { + lat: response.locations[0].position.y, + lon: response.locations[0].position.x + }; + // et on l'affiche dans la liste + context._locationsToBeDisplayed.unshift(context._suggestedLocations[i]); + context._fillAutoCompletedLocationListContainer(context._locationsToBeDisplayed); + } + } + }, + // callback onFailure + onFailure: function onFailure() { + // si on n'a pas réussi à récupérer les coordonnées, on affiche quand même le résultat + if (context._suggestedLocations && context._suggestedLocations[i]) { + context._createAutoCompletedLocationElement(context._suggestedLocations[i], i); + } + } + }); + }, + // ################################################################### // + // ######################### other methods ########################### // + // ################################################################### // + + /** + * this sends the label to the input panel. + * + * FIXME appel en dur d'un identifiant CSS ! + * + * @param {String} label - label suggested location + * + * @private + */ + _setLabel: function _setLabel(label) { + var element = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GPsearchInputText-" + this._uid); + element.value = label || ""; + }, + /** + * this method is called by this.on*ResultsItemClick() + * and move/zoom on a position. + * + * @param {Object} position - {x : ..., y : ...} + * @param {Number} zoom - zoom level + * + * @private + */ + _setPosition: function _setPosition(position, zoom) { + var map = this._map; + map.setZoomAround(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(position), zoom, true); + map.panTo(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(position)); + }, + /** + * this method is called by this.on*ResultsItemClick() + * and get zoom. + * + * @param {Object} info - info + * + * @returns {Integer} zoom level + * + * @private + */ + _getZoom: function _getZoom(info) { + var map = this._map; + var key = this.options.zoomTo; + var zoom = null; + + // les valeurs du zooms sont determinées + // soit par les mots clefs suivants : max, min ou auto + // soit par un niveau de zoom + // soit defini par l'utilisateur via une fonction + + if (typeof key === "function") { + logger.trace("zoom function"); + zoom = key.call(this, info); + } + if (typeof key === "number") { + logger.trace("zoom level"); + zoom = key; + } + if (typeof key === "string") { + // if (key === "max") { + // zoom = map.getMaxZoom(); + // } else if (key === "min") { + // zoom = map.getMinZoom(); + // } else + + if (key === "auto") { + logger.trace("zoom auto"); + zoom = _Common_Utils_SearchEngineUtils__WEBPACK_IMPORTED_MODULE_4__["default"].zoomToResultsByDefault(info); + } else { + logger.trace("zoom level parsing"); + var value = parseInt(key, 10); + if (!isNaN(value)) { + logger.trace("zoom parsing"); + zoom = value; + } + } + } + + // polyfill IE + Number.isInteger = Number.isInteger || function (value) { + return typeof value === "number" && isFinite(value) && Math.floor(value) === value; + }; + + // test de validité du zoom, + // on prend le zoom courant par defaut ... + if (!zoom || zoom === "" || !Number.isInteger(zoom)) { + logger.trace("zoom not found, current zoom..."); + zoom = map.getZoom(); + } + + // test si le zoom est dans l'espace de la carte + var min = map.getMinZoom(); + var max = map.getMaxZoom(); + if (zoom < min) { + logger.trace("zoom level min..."); + zoom = min; + } + if (zoom > max) { + logger.trace("zoom level max..."); + zoom = max; + } + logger.trace("zoom", zoom); + return zoom; + }, + /** + * this method is called by this.on*ResultsItemClick() + * and displays a marker. + * FIXME + * + * @param {Object} position - position {x : ..., y : ...} + * @param {Object} information - suggested or geocoded information + * @param {Boolean} display - display a popup information + * @param {String} marker - style style + * + * @private + */ + _setMarker: function _setMarker(position, information, display, marker) { + var map = this._map; + if (this._marker != null) { + map.removeLayer(this._marker); + this._marker = null; + } + if (position) { + var _icon = null; + if (typeof marker === "string") { + _icon = new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__["default"](marker); + } else if (marker instanceof leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Icon) { + _icon = marker; + } else { + _icon = new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__["default"]("blue"); + logger.log("Utilisation du marker par défaut !"); + } + + // cf. http://leafletjs.com/reference.html#marker-options + var options = { + clickable: true, + zIndexOffset: 1000, + icon: _icon + }; + this._marker = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.marker(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(position), options); + this._marker.addTo(map); + + // FIXME + // doit on mettre une information + // - correctement construite ? + // - uniquement informatif ? + // - RIEN ? + if (display) { + var popupContent = null; + if (typeof information !== "string") { + if (information.service === "GeocodedLocation") { + popupContent = "
      "; + var attributes = information.location.placeAttributes; + for (var attr in attributes) { + if (attributes.hasOwnProperty(attr)) { + if (attr !== "trueGeometry" && attr !== "extraFields" && attr !== "houseNumberInfos" && attr !== "_count") { + popupContent += "
    • "; + popupContent += "" + attr.toUpperCase() + " : "; + popupContent += attributes[attr]; + popupContent += "
    • "; + } + } + } + popupContent += "
    "; + } else if (information.service === "SuggestedLocation") { + popupContent = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_5__["default"].getSuggestedLocationFreeform(information.location); + } else { + popupContent = "sans informations."; + } + } else { + popupContent = information; + } + this._marker.bindPopup(popupContent); + } + } + }, + /** + * this method is called by this.onSearchReset() + * and it clears all results and the marker. + * + * @private + */ + _clearResults: function _clearResults() { + this._currentGeocodingLocation = null; + this._clearSuggestedLocation(); + this._clearGeocodedLocation(); + this._setMarker(); + }, + /** + * this method is called by this.onAutoCompleteSearchText() + * and it clears all suggested location. + * + * @private + */ + _clearSuggestedLocation: function _clearSuggestedLocation() { + this._suggestedLocations = []; + if (this._suggestedContainer) { + while (this._suggestedContainer.firstChild) { + this._suggestedContainer.removeChild(this._suggestedContainer.firstChild); + } + } + }, + /** + * this method is called by this.onGeocodingAdvancedSearchSubmit() + * and it clears all geocoded location. + * + * @private + */ + _clearGeocodedLocation: function _clearGeocodedLocation() { + this._geocodedLocations = []; + if (this._geocodedContainer) { + while (this._geocodedContainer.firstChild) { + this._geocodedContainer.removeChild(this._geocodedContainer.firstChild); + } + } + }, + // ################################################################### // + // ###################### other handlers events ###################### // + // ################################################################### // + + /** + * this method is called by event 'click' on 'GPshowSearchEnginePicto' tag label + * (cf. this._createShowSearchEnginePictoElement), and it cleans the component + * when it's closed. + * FIXME + * + * @private + */ + onShowSearchEngineClick: function onShowSearchEngineClick() { + // FIXME on nettoie ou pas ? + // this._clearResults(); + }, + /** + * this method is called by event 'click' on 'GPsearchInputReset' tag div + * (cf. this._createSearchInputElement), and it cleans the value of input. + * + * @private + */ + onSearchResetClick: function onSearchResetClick() { + this._clearResults(); + }, + // ################################################################### // + // ################## handlers events AutoComplete ################### // + // ################################################################### // + + /** + * this method is called by event 'keyup' on 'GPsearchInputText' tag input + * (cf. this._createSearchInputElement), and it gets the value of input. + * this value is passed as a parameter for the service autocomplete (text). + * the results of the request are displayed into a drop down menu. + * FIXME + * + * @param {Object} e - HTMLElement + * + * @private + */ + onAutoCompleteSearchText: function onAutoCompleteSearchText(e) { + var value = e.target.value; + if (!value) { + return; + } + + // on sauvegarde le localisant + this._currentGeocodingLocation = value; + + // on limite les requêtes à partir de 3 car. saisie ! + if (value.length < 3) { + return; + } + var _triggerGeocode = this.options.autocompleteOptions.triggerGeocode; + var _triggerDelay = this.options.autocompleteOptions.triggerDelay; + + // INFORMATION + // on effectue la requête au service d'autocompletion. + // on met en place des callbacks afin de recuperer les resultats ou + // les messages d'erreurs du service. + // les resultats sont affichés dans une liste deroulante. + // les messages d'erreurs sont affichés sur la console (?) + + var context = this; + this._requestAutoComplete({ + text: value, + // callback onSuccess + onSuccess: function onSuccess(results) { + logger.log("request from AutoComplete", results); + if (results) { + // on sauvegarde l'etat des résultats + context._suggestedLocations = results.suggestedLocations; + context._locationsToBeDisplayed = []; + + // on vérifie qu'on n'a pas récupéré des coordonnées nulles (par ex recherche par code postal) + for (var i = 0; i < context._suggestedLocations.length; i++) { + var ilocation = context._suggestedLocations[i]; + if (ilocation.position && ilocation.position.x === 0 && ilocation.position.y === 0 && ilocation.fullText) { + // si les coordonnées sont nulles, il faut relancer une requête de géocodage avec l'attribut "fullText" récupéré + context._getGeocodeCoordinatesFromFullText(ilocation, i); + } else { + // sinon on peut afficher normalement le résultat dans la liste + context._locationsToBeDisplayed.push(ilocation); + } + } + ; + + // on affiche les résultats qui n'ont pas des coordonnées nulles + context._fillAutoCompletedLocationListContainer(context._locationsToBeDisplayed); + // on annule eventuellement une requete de geocodage en cours car on obtient des + // de nouveau des resultats d'autocompletion... + if (context._triggerHandler) { + clearTimeout(context._triggerHandler); + context._triggerHandler = null; + logger.warn("Cancel a geocode request !"); + } + } + }, + // callback onFailure + onFailure: function onFailure(error) { + // FIXME + // où affiche t on les messages : ex. 'No suggestion matching the search' ? + context._clearSuggestedLocation(); + logger.log(error.message); + // on envoie une requete de geocodage si aucun resultat d'autocompletion + // n'a été trouvé ! Et on n'oublie pas d'annuler celle qui est en cours ! + if (error.message === "No suggestion matching the search" && _triggerGeocode) { + if (context._triggerHandler) { + clearTimeout(context._triggerHandler); + logger.warn("Cancel the last geocode request !"); + } + context._triggerHandler = setTimeout(function () { + logger.warn("Launch a geocode request (code postal) !"); + context._requestGeocoding({ + query: value, + // callback onSuccess + onSuccess: function onSuccess(results) { + logger.log("request from Geocoding", results); + if (results) { + context._locationsToBeDisplayed = []; + // on modifie la structure des reponses pour être + // compatible avec l'autocompletion ! + var locations = results.locations; + for (var i = 0; i < locations.length; i++) { + var location = locations[i]; + location.fullText = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_5__["default"].getGeocodedLocationFreeform(location); + location.position = { + x: location.position.lon, + y: location.position.lat + }; + context._locationsToBeDisplayed.push(location); + } + context._fillAutoCompletedLocationListContainer(locations); + } + }, + // callback onFailure + onFailure: function onFailure(error) { + logger.log(error.message); + } + }); + }, _triggerDelay); + } + } + }); + }, + /** + * this method is called by event 'click' on 'GPautoCompleteResultsList' tag div + * (cf. this._createAutoCompleteListElement), and it selects the location. + * this location displays a marker on the map. + * FIXME + * + * @param {Object} e - HTMLElement + * + * @private + */ + onAutoCompletedResultsItemClick: function onAutoCompletedResultsItemClick(e) { + var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__["default"].index(e.target.id); + var label = e.target.innerHTML; + logger.log(idx, label); + logger.log(this._locationsToBeDisplayed[idx]); + if (!idx) { + return; + } + + // FIXME + // les coordonnées sont inversées entre les 2 services !? + // AutoCompletion : lon/lat + // Geocoding : lat/lon + var position = { + lat: this._locationsToBeDisplayed[idx].position.y, + lon: this._locationsToBeDisplayed[idx].position.x + }; + var info = { + service: "SuggestedLocation", + location: this._locationsToBeDisplayed[idx] + }; + var zoom = this._getZoom(info); + this._setLabel(label); + this._setPosition(position, zoom); + if (this.options.displayMarker) { + this._setMarker(position, info, this.options.displayInfo, this.options.markerStyle); + } + + /** + * event triggered when an element of the results is clicked for autocompletion + * + * @event searchengine:autocomplete:click + */ + this.fire("searchengine:autocomplete:click", { + data: this._locationsToBeDisplayed[idx] + }); + }, + // ################################################################### // + // ################### handlers events Geocode ####################### // + // ################################################################### // + + /** + * this method is called by event 'submit' on 'GPsearchInput' tag form + * (cf. this._createSearchInputElement), and it gets the value of input. + * this value is passed as a parameter for the service geocoding. + * the results of the request are displayed into a window. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onGeocodingSearchSubmit: function onGeocodingSearchSubmit(e) { + logger.log(e); + var value = e.target[0].value; + if (!value) { + return; + } + + // on sauvegarde le localisant + this._currentGeocodingLocation = value; + + // on met en place l'affichage des resultats dans une fenetre de recherche. + var context = this; + this._requestGeocoding({ + query: value, + // callback onSuccess + onSuccess: function onSuccess(results) { + logger.log("request from Geocoding", results); + if (results) { + var locations = results.locations; + context._fillGeocodedLocationListContainer(locations); + } + }, + // callback onFailure + onFailure: function onFailure(error) { + // FIXME cf. this.onAutoCompleteSearch() + context._clearGeocodedLocation(); + logger.log(error.message); + } + }); + }, + /** + * this method is called by event 'submit' on 'GPgeocodeResultsList' tag div + * (cf. this._createGeocodeResultsListElement), and it selects the location. + * this location displays a marker on the map. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onGeocodedResultsItemClick: function onGeocodedResultsItemClick(e) { + var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__["default"].index(e.target.id); + var label = e.target.innerHTML; + logger.log(idx, label); + logger.log(this._geocodedLocations[idx]); + if (!idx) { + return; + } + var position = this._geocodedLocations[idx].position; + var info = { + service: "GeocodedLocation", + location: this._geocodedLocations[idx] + }; + var zoom = this._getZoom(info); + this._setLabel(label); + this._setPosition(position, zoom); + if (this.options.displayMarker) { + this._setMarker(position, info, this.options.displayInfo, this.options.markerStyle); + } + + /** + * event triggered when an element of the results is clicked for geocoding + * + * @event searchengine:geocode:click + */ + this.fire("searchengine:geocode:click", { + data: this._geocodedLocations[idx] + }); + }, + // ################################################################### // + // ############## handlers events Geocode Advanced ################### // + // ################################################################### // + + /** + * this method is called by event 'change' on 'GPadvancedSearchCode' tag select + * (cf. this._createAdvancedSearchFormCodeElement), and it gets the value of + * option selected. + * this value is passed as a parameter to create the attributs container. + * + * @param {Object} e - HTMLElement + * + * @private + */ + onGeocodingAdvancedSearchCodeChange: function onGeocodingAdvancedSearchCodeChange(e) { + logger.log(e); + var idx = e.target.selectedIndex; + var value = e.target.options[idx].value; + if (!value) { + return; + } + + // INFORMATION + // le declenchement de l'evenement va creer un container de filtre à la volée... + // l'insertion des containers d'attributs dans le DOM sont : + // - soit GPadvancedSearchFilters > PositionOfInterest + // - soit GPadvancedSearchFilters > StreetAddress + // - soit GPadvancedSearchFilters > CadastralParcel + // cf. _setFilter() pour la creation du container + + this._setFilter(value); + }, + /** + * this method is called by event 'submit' on 'GPadvancedSearchForm' tag form + * (cf. this._createAdvancedSearchPanelFormElement), and it gets the value of all input. + * this value is passed as a parameter for the service geocoding. + * the results of the request are displayed into a window. + * TODO + * + * @param {Object} e - HTMLElement + * @param {Array} data - [{key : ..., value : ...}] + * + * @private + */ + onGeocodingAdvancedSearchSubmit: function onGeocodingAdvancedSearchSubmit(e, data) { + logger.log(data); + if (!data || data.length === 0) { + return; + } + + // recuperation des parametres des filtres pour les transmettre + // à la requête, ainsi que le type de table de ressources de geocodage, + // et le localisant + var _index = this._currentGeocodingCode; + var inputSearchTextContainer = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GPsearchInputText-" + this._uid); + var _location = inputSearchTextContainer.value; + var _filterOptions = {}; + for (var i = 0; i < data.length; i++) { + var filter = data[i]; + if (filter.value) { + _filterOptions[filter.key] = filter.value; + } + } + + // on met en place l'affichage des resultats dans une fenetre de recherche. + var context = this; + this._requestGeocoding({ + query: _location, + index: _index, + filters: _filterOptions, + // callback onSuccess + onSuccess: function onSuccess(results) { + logger.log(results); + if (results) { + var locations = results.locations; + context._fillGeocodedLocationListContainer(locations); + } + }, + // callback onFailure + onFailure: function onFailure(error) { + // FIXME cf. this.onAutoCompleteSearch() + context._clearGeocodedLocation(); + logger.log(error.message); + } + }); + }, + // ################################################################### // + // ###### METHODES PUBLIQUES (INTERFACE AVEC LE CONTROLE) ############ // + // ################################################################### // + + /** + * This method is public. + * It allows to control the execution of a geocoding or an autocompletion. + * + * @param {String} text - location + * @param {Boolean} type - true (geocoding) / false (autocompletion) + * @param {Object} options - options + */ + setText: function setText(text, type, options) { + if (!this._showContainer.checked) { + this._pictoContainer.click(); + } + + // on récupere les options des services + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(this.options, options); + var element = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GPsearchInputText-" + this._uid); + element.value = text; + if (type) { + var form = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GPsearchInput-" + this._uid); + form.dispatchEvent(new Event("submit", { + bubbles: true, + cancelable: true + })); + } else { + element.dispatchEvent(new KeyboardEvent("keyup")); + } + } +}); + +/** mix in L.Evented into control */ +leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.extend(SearchEngine.prototype, leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Evented.prototype); +/* harmony default export */ __webpack_exports__["default"] = (SearchEngine); + +/***/ }), +/* 122 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module SearchEngineUtils + * @alias [private] SearchEngineUtils + * @description + * ... + * + * @example + * advancedSearchFiltersByDefault(); + * zoomToResultsByDefault(); + */ +var SearchEngineUtils = { + /** + * Advanced Search Filters by default + * @function advancedSearchFiltersByDefault + */ + advancedSearchFiltersByDefault: { + PositionOfInterest: [{ + name: "category", + title: "Type", + value: ["cimetière", "aérodrome", "réservoir", "administratif", "construction linéaire", "construction ponctuelle", "construction surfacique", "cours d'eau", "détail hydrographique", "détail orographique", "équipement de transport", "plan d'eau", "poste de transformation", "terrain de sport", "transport par câble", "zone d'activité ou d'intérêt", "zone d'habitation", "lieu-dit non habité"] + }, { + name: "postcode", + title: "Code postal" + }, { + name: "citycode", + title: "Code INSEE" + }], + StreetAddress: [{ + name: "city", + title: "Ville" + }, { + name: "postcode", + title: "Code postal" + }, { + name: "citycode", + title: "Code INSEE" + }], + CadastralParcel: [{ + name: "departmentcode", + title: "Code département (INSEE)", + description: "Code INSEE du département (ex: 01, 94)" + }, { + name: "municipalitycode", + title: "Code commune (INSEE)", + description: "Code INSEE de la commune : 3 chiffres (ex: 067)" + }, { + name: "city", + title: "Nom commune", + description: "Nom de la commune" + }, { + name: "oldmunicipalitycode", + title: "Commune absorbée", + description: "Commune absorbée : 3 chiffres (ex: 000, 001)" + }, { + name: "districtcode", + title: "Arrondissement", + description: "Arrondissement : 3 chiffres (ex: 004, 012)" + }, { + name: "section", + title: "Section", + description: "Section Cadastrale : 2 caractères (chiffre et/ou lettre)" + }, { + name: "number", + title: "Numéro", + description: "Numéro de la parcelle : 4 chiffres (ex: 0041, 0250)" + }, { + name: "sheet", + title: "Feuille", + description: "Numéro de la feuille cadastrale" + }] + }, + /** + * Provides default zoom based on results. + * + * @function zoomToResultsByDefault + * @param {Object} info - location information + * @returns {Integer} zoom level + */ + zoomToResultsByDefault: function zoomToResultsByDefault(info) { + // FIXME + // la classification du geocodage est differente de l'importance de l'autocompletion ! + + var zoom = 15; + var service = info.service; + var fields = info.fields; + var type = info.type; + var importance = { + 1: 11, + 2: 12, + 3: 13, + 4: 14, + 5: 15, + 6: 16, + 7: 17, + 8: 17 + }; + + // AutoCompletion POI + if (service === "SuggestedLocation") { + if (type === "PositionOfInterest") { + zoom = importance[fields.classification]; + } + } + + // Geocodage POI + if (service === "GeocodedLocation") { + if (type === "PositionOfInterest") { + zoom = importance[fields.importance] || 14; // au cas où la recherche est en freeform ! + } + } + + if (type === "StreetAddress") { + zoom = 17; + } + if (type === "CadastralParcel") { + zoom = 17; + } + return zoom; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (SearchEngineUtils); + +/***/ }), +/* 123 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37); +/* harmony import */ var _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(100); + + +var SearchEngineDOM = { + /** + * Add uuid to the tag ID + * @param {String} id - id selector + * @returns {String} uid - id selector with an unique id + */ + _addUID: function _addUID(id) { + var uid = this._uid ? id + "-" + this._uid : id; + return uid; + }, + /** + * Main container (DOM) + * + * @returns {DOMElement} DOM element + */ + _createMainContainerElement: function _createMainContainerElement() { + var container = document.createElement("div"); + container.id = this._addUID("GPsearchEngine"); + container.className = "GPwidget"; + return container; + }, + // ################################################################### // + // ################### Methods of main container ##################### // + // ################################################################### // + + /** + * Hidden checkbox for minimizing/maximizing + * + * @returns {DOMElement} DOM element + */ + _createShowSearchEngineElement: function _createShowSearchEngineElement() { + var input = document.createElement("input"); + input.id = this._addUID("GPshowSearchEngine"); + input.type = "checkbox"; + return input; + }, + /** + * Show search engine + * + * @returns {DOMElement} DOM element + */ + _createShowSearchEnginePictoElement: function _createShowSearchEnginePictoElement() { + // contexte d'execution + var self = this; + var label = document.createElement("label"); + label.id = this._addUID("GPshowSearchEnginePicto"); + label.className = "GPshowAdvancedToolPicto"; + label.htmlFor = this._addUID("GPshowSearchEngine"); + label.title = "Afficher/masquer la recherche par lieux"; + + // Close all results and panels when minimizing the widget + label.addEventListener("click", function () { + document.getElementById(self._addUID("GPautoCompleteList")).style.display = "none"; + document.getElementById(self._addUID("GPgeocodeResultsList")).style.display = "none"; + var showAdvancedSearch = document.getElementById(self._addUID("GPshowAdvancedSearch")); + if (showAdvancedSearch) { + showAdvancedSearch.style.display = null; + document.getElementById(self._addUID("GPadvancedSearchPanel")).style.display = "none"; + } + var id = "#GPsearchInput-" + self._uid; + document.querySelector(id + " input").disabled = false; // FIXME form[id^=GPsearchInput] = #GPsearchInput ? + self.onShowSearchEngineClick(); + }); + var spanOpen = document.createElement("span"); + spanOpen.id = this._addUID("GPshowSearchEngineOpen"); + spanOpen.className = "GPshowAdvancedToolOpen"; + label.appendChild(spanOpen); + return label; + }, + /** + * Simple search input + * @param {String} placeholder - placeholder + * + * @returns {DOMElement} DOM element + */ + _createSearchInputElement: function _createSearchInputElement(placeholder) { + // contexte d'execution + var self = this; + var form = document.createElement("form"); + form.id = this._addUID("GPsearchInput"); + // Open geocode results panel when submitting the input + form.addEventListener("submit", function (e) { + e.preventDefault(); + document.getElementById(self._addUID("GPgeocodeResultsList")).style.display = "block"; + document.getElementById(self._addUID("GPautoCompleteList")).style.display = "none"; + // cf. FIXME + // document.querySelector("#GPsearchInput input").blur (); + + // gestionnaire d'evenement : + // on récupère la valeur de saisie pour requête sur le service de geocodage + self.onGeocodingSearchSubmit(e); + return false; + }); + var input = document.createElement("input"); + input.id = this._addUID("GPsearchInputText"); + input.type = "text"; + input.placeholder = placeholder; + input.autocomplete = "off"; + // Manage autocomplete list appearance when filling the address input + input.addEventListener("keyup", function (e) { + var charCode = e.which || e.keyCode; + if (charCode === 13 || charCode === 10 || charCode === 38 || charCode === 40) { + return; + } + document.getElementById(self._addUID("GPgeocodeResultsList")).style.display = "none"; + if (input.value.length > 2) { + document.getElementById(self._addUID("GPautoCompleteList")).style.display = "block"; + } else { + document.getElementById(self._addUID("GPautoCompleteList")).style.display = "none"; + } + // gestionnaire d'evenement : + // on récupère la valeur de saisie pour requête sur le service d'autocompletion + self.onAutoCompleteSearchText(e); + }); + + // FIXME ce code interfere avec le click sur la liste des suggested locations ! + // input.addEventListener("blur", function(e) { + // document.getElementById(self._addUID("GPautoCompleteList")).style.display = "none"; + // }); + + input.addEventListener("keydown", function (e) { + // FIXME + // l'action clavier 'enter (13)' lance le submit de la form ! + // Ce comportement n'est pas souhaité car le submit execute un geocodage ! + // Il faut donc trouver le moyen d'eviter le submit sur un return venant + // seulement d'une selection de suggestion... + + var charCode = e.which || e.keyCode; + var container = document.getElementById(self._addUID("GPautocompleteResults")); + + // si aucun container !? + if (!container) { + return; + } + var curr = container.getElementsByClassName("GPautoCompleteProposal current"); + var list = container.getElementsByClassName("GPautoCompleteProposal"); + + // si aucune suggestion, on ne va pas plus loin ! + var length = list.length; + if (!length) { + return; + } + var current = null; + + // si aucun item courant, on prend le 1er ! + if (!curr.length) { + current = list[0]; + current.className = "GPautoCompleteProposal current"; + current.style.color = "#000000"; + current.style["background-color"] = "#CEDBEF"; + return; + } else { + current = curr[0]; + } + var index = parseInt(_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__["default"].index(current.id), 10); + var next = index === length - 1 ? list[0] : list[index + 1]; + var prev = index === 0 ? list[length - 1] : list[index - 1]; + current.style["background-color"] = ""; + current.style.color = ""; + prev.style["background-color"] = ""; + prev.style.color = ""; + next.style["background-color"] = ""; + next.style.color = ""; + switch (charCode) { + case 38: + // arrow up + current.className = "GPautoCompleteProposal"; + prev.className = "GPautoCompleteProposal current"; + prev.style.color = "#000000"; + prev.style["background-color"] = "#CEDBEF"; + break; + case 40: + // arrow down + current.className = "GPautoCompleteProposal"; + next.className = "GPautoCompleteProposal current"; + next.style.color = "#000000"; + next.style["background-color"] = "#CEDBEF"; + break; + case 13: + // enter + // cf. FIXME + e.preventDefault(); + current.click(e); + break; + } + current.focus(); + }); + form.appendChild(input); + var div = document.createElement("div"); + div.id = this._addUID("GPsearchInputReset"); + // Reset input + div.addEventListener("click", function () { + document.getElementById(self._addUID("GPsearchInputText")).value = ""; + document.getElementById(self._addUID("GPautoCompleteList")).style.display = "none"; + document.getElementById(self._addUID("GPgeocodeResultsList")).style.display = "none"; + self.onSearchResetClick(); + }); + form.appendChild(div); + return form; + }, + /** + * Show advanced search panel + * + * @returns {DOMElement} DOM element + */ + _createShowAdvancedSearchElement: function _createShowAdvancedSearchElement() { + // contexte d'execution + var self = this; + var div = document.createElement("div"); + div.id = this._addUID("GPshowAdvancedSearch"); + div.className = "GPshowAdvancedToolPicto"; + div.title = "Ouvrir la recherche avancée"; + + // Open advanced search + div.addEventListener("click", function () { + var id = "#GPsearchInput-" + self._uid; + document.querySelector(id + " input").disabled = true; + document.getElementById(self._addUID("GPautoCompleteList")).style.display = "none"; + document.getElementById(self._addUID("GPgeocodeResultsList")).style.display = "none"; + document.getElementById(self._addUID("GPshowAdvancedSearch")).style.display = "none"; + document.getElementById(self._addUID("GPadvancedSearchPanel")).style.display = "inline-block"; + }); + var span = document.createElement("span"); + span.id = this._addUID("GPshowAdvancedSearchOpen"); + span.className = "GPshowAdvancedToolOpen"; + div.appendChild(span); + return div; + }, + /** + * Advanced search panel + * + * FIXME + * don't call this._createAdvancedSearchPanelHeaderElement + * don't call this._createAdvancedSearchPanelFormElement + * + * @returns {DOMElement} DOM element + */ + _createAdvancedSearchPanelElement: function _createAdvancedSearchPanelElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPadvancedSearchPanel"); + div.className = "GPpanel"; + div.style.display = "none"; + + // FIXME on decompose la fonction pour les besoins du controle, + // on ajoutera ces childs à la main... + // div.appendChild(this._createAdvancedSearchPanelHeaderElement ()); + // div.appendChild(this._createAdvancedSearchPanelFormElement ()); + + return div; + }, + /** + * Geocoding results + * + * FIXME + * don't call this._createGeocodeResultsListElement + * + * @returns {DOMElement} DOM element + */ + _createGeocodeResultsElement: function _createGeocodeResultsElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPgeocodeResultsList"); + div.className = "GPpanel"; + div.style.display = "none"; + div.appendChild(this._createGeocodeResultsHeaderElement()); + + // FIXME on decompose la fonction pour les besoins du controle, + // on ajoutera ces childs à la main... + // div.appendChild(this._createGeocodeResultsListElement ()); + + return div; + }, + /** + * Autocompletion results + * + * FIXME + * don't call this._createAutoCompleteListElement + * + * @returns {DOMElement} DOM element + */ + _createAutoCompleteElement: function _createAutoCompleteElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPautoCompleteList"); + div.className = "GPautoCompleteList"; // GPpanel ? + div.style.display = "none"; + + // FIXME on decompose la fonction pour les besoins du controle, + // on ajoutera ces childs à la main... + // div.appendChild(this._createAutoCompleteListElement ()); + + return div; + }, + // ################################################################### // + // ################### Autocompletion container ###################### // + // ################################################################### // + + /** + * Autocompletion results list. + * + * @returns {DOMElement} DOM element + */ + _createAutoCompleteListElement: function _createAutoCompleteListElement() { + // contexte d'execution + var self = this; + var container = document.createElement("div"); + container.id = this._addUID("GPautocompleteResults"); + if (container.addEventListener) { + container.addEventListener("click", function (e) { + self.onAutoCompletedResultsItemClick(e); + document.getElementById(self._addUID("GPautoCompleteList")).style.display = "none"; + }, false); + } else if (container.attachEvent) { + container.attachEvent("onclick", function (e) { + self.onAutoCompletedResultsItemClick(e); + document.getElementById(self._addUID("GPautoCompleteList")).style.display = "none"; + }); + } + + // Proposals are dynamically filled in Javascript by autocomplete service + //
    ...
    + + return container; + }, + /** + * Autocompletion result. + * Proposals are dynamically filled in Javascript by autocomplete service + * + * TODO formaliser le contenu des reponse + * + * @param {Object} location - suggested or geocoded location results + * @param {Number} id - ID + */ + _createAutoCompletedLocationElement: function _createAutoCompletedLocationElement(location, id) { + var container = document.getElementById(this._addUID("GPautocompleteResults")); + var div = document.createElement("div"); + div.id = this._addUID("AutoCompletedLocation_" + id); + div.className = "GPautoCompleteProposal"; + div.innerHTML = _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_1__["default"].getSuggestedLocationFreeform(location); + if (div.addEventListener) { + div.addEventListener("click", function (e) { + container.click(e); + }, false); + } else if (div.attachEvent) { + div.attachEvent("onclick", function (e) { + container.click(e); + }); + } + container.appendChild(div); + }, + // ################################################################### // + // ############### Geocoding with advanced container ################# // + // ################################################################### // + + /** + * @returns {DOMElement} DOM element + */ + _createAdvancedSearchPanelHeaderElement: function _createAdvancedSearchPanelHeaderElement() { + // contexte d'execution + var self = this; + var container = document.createElement("div"); + container.className = "GPpanelHeader"; + var divTitle = document.createElement("div"); + divTitle.className = "GPpanelTitle"; + divTitle.innerHTML = "Recherche avancée"; + container.appendChild(divTitle); + var divClose = document.createElement("div"); + divClose.id = this._addUID("GPadvancedSearchClose"); + divClose.className = "GPpanelClose"; + divClose.title = "Fermer la recherche avancée"; + if (divClose.addEventListener) { + divClose.addEventListener("click", function () { + var id = "#GPsearchInput-" + self._uid; + document.querySelector(id + " input").disabled = false; + document.getElementById(self._addUID("GPgeocodeResultsList")).style.display = "none"; + document.getElementById(self._addUID("GPshowAdvancedSearch")).style.display = "inline-block"; + document.getElementById(self._addUID("GPadvancedSearchPanel")).style.display = "none"; + }, false); + } else if (divClose.attachEvent) { + divClose.attachEvent("onclick", function () { + var id = "#GPsearchInput-" + self._uid; + document.querySelector(id + " input").disabled = false; + document.getElementById(self._addUID("GPgeocodeResultsList")).style.display = "none"; + document.getElementById(self._addUID("GPshowAdvancedSearch")).style.display = "inline-block"; + document.getElementById(self._addUID("GPadvancedSearchPanel")).style.display = "none"; + }); + } + container.appendChild(divClose); + return container; + }, + /** + * @param {Object[]} advancedSearchCodes - codes + * + * @returns {DOMElement} DOM element + */ + _createAdvancedSearchPanelFormElement: function _createAdvancedSearchPanelFormElement(advancedSearchCodes) { + // contexte d'execution + var self = this; + var form = document.createElement("form"); + form.id = this._addUID("GPadvancedSearchForm"); + form.addEventListener("submit", function (e) { + e.preventDefault(); + // data + var data = []; + // liste des attributs de la ressource de geocodage + var id = "#GPadvancedSearchFilters-" + self._uid; + var matchesFilters = document.querySelectorAll(id + " > div > div > input"); + for (var i = 0; i < matchesFilters.length; i++) { + var element = matchesFilters[i]; + data.push({ + key: element.name, + value: element.value + }); + } + + // gestionnaire d'evenement : + // on récupère les valeurs de saisies pour requête sur le service de geocodage + self.onGeocodingAdvancedSearchSubmit(e, data); + document.getElementById(self._addUID("GPgeocodeResultsList")).style.display = "block"; + return false; + }); + var div = document.createElement("div"); + div.className = "GPflexInput"; + var label = document.createElement("label"); + label.className = "GPadvancedSearchCodeLabel"; + label.innerHTML = "Recherche par"; + div.appendChild(label); + var select = this._createAdvancedSearchFormCodeElement(advancedSearchCodes); + div.appendChild(select); + + // FIXME on decompose la fonction pour les besoins du controle, + // on ajoutera ces childs à la main... + + // var filters = this._createAdvancedSearchFormFiltersElement (); + // form.appendChild(filters); + + // var input = this._createAdvancedSearchFormInputElement (); + // form.appendChild(input); + + form.appendChild(div); + return form; + }, + /** + * @param {Object[]} codes - codes + * @returns {DOMElement} DOM element + */ + _createAdvancedSearchFormCodeElement: function _createAdvancedSearchFormCodeElement(codes) { + // contexte d'execution + var self = this; + var select = document.createElement("select"); + select.id = this._addUID("GPadvancedSearchCode"); + select.className = "GPadvancedSearchCode"; + select.addEventListener("change", function (e) { + // var idx = e.target.selectedIndex; + // var value = e.target.options[idx].value; + // gestionnaire d'evenement : + // permet de recuperer des informations diverses... + self.onGeocodingAdvancedSearchCodeChange(e); + }, false); + + // liste statique au cas où des codes n'ont pas été passés en entrée + if (!codes) { + codes = [{ + id: "PositionOfInterest", + title: "Lieux/toponymes" + }, { + id: "StreetAddress", + title: "Adresses" + }, { + id: "CadastralParcel", + title: "Parcelles cadastrales" + }]; + } + for (var i = 0; i < codes.length; i++) { + var option = document.createElement("option"); + option.value = codes[i].id; + option.text = codes[i].title; + select.appendChild(option); + } + return select; + }, + /** + * @returns {DOMElement} DOM element + */ + _createAdvancedSearchFormInputElement: function _createAdvancedSearchFormInputElement() { + var input = document.createElement("input"); + input.type = "submit"; + input.id = this._addUID("GPadvancedSearchSubmit"); + input.className = "GPinputSubmit"; + input.value = "Chercher"; + return input; + }, + /** + * Filters geocoding. + * + * @returns {DOMElement} DOM element + */ + _createAdvancedSearchFormFiltersElement: function _createAdvancedSearchFormFiltersElement() { + var container = document.createElement("div"); + container.id = this._addUID("GPadvancedSearchFilters"); + return container; + }, + /** + * Create filter container for resources : + * "PositionOfInterest", "StreetAddress", ... + * + * @param {String} code - code of geocoding resource + * @param {Boolean} display - display + * + * @returns {DOMElement} DOM element + */ + _createAdvancedSearchFiltersTableElement: function _createAdvancedSearchFiltersTableElement(code, display) { + var container = document.createElement("div"); + container.id = this._addUID(code); + if (!display) { + container.style.display = "none"; + } + return container; + }, + /** + * Create filter attribut for a resource : + * "PositionOfInterest", "StreetAddress", ... + * Research filters are filled in Javascript depending on developer choice + * + * @param {Object} filterAttributes - filter attributes : + * @param {String} filterAttributes.code - code of geocoding resource + * @param {String} filterAttributes.name - ID + * @param {String} filterAttributes.title - label + * @param {String} filterAttributes.description - description + * @param {String} filterAttributes.value - value + * + * @returns {DOMElement} DOM element + */ + _createAdvancedSearchFiltersAttributElement: function _createAdvancedSearchFiltersAttributElement(filterAttributes) { + // INFORMATION + // cette methode peut être appelée si le document n'existe pas, elle + // permet ainsi de creer une div sans insertion dans le container... + + var container = null; + var name = filterAttributes.name; + var title = filterAttributes.title; + var description = filterAttributes.description; + var code = filterAttributes.code; + var value = filterAttributes.value; + var div = document.createElement("div"); + div.className = "GPflexInput"; + var label = document.createElement("label"); + label.className = "GPadvancedSearchFilterLabel"; + label.htmlFor = name; + label.title = description || title; + label.innerHTML = title; + div.appendChild(label); + var input = document.createElement("input"); + input.id = name; + input.className = "GPadvancedSearchFilterInput"; + input.type = "text"; + input.name = name; + if (value) { + if (Array.isArray(value)) { + var listId = name + "_list"; + input.setAttribute("list", listId); + var dl = document.createElement("datalist"); + dl.id = listId; + for (var i = 0; i < value.length; ++i) { + var option = document.createElement("option"); + option.value = value[i]; + dl.appendChild(option); + } + div.appendChild(dl); + } else { + input.value = value; + } + } + div.appendChild(input); + container = document.getElementById(this._addUID(code)); + if (container) { + container.appendChild(div); + } else { + // le container, c'est la div ! + container = div; + } + return container; + }, + // ################################################################### // + // ################## Geocoding results container #################### // + // ################################################################### // + + /** + * @returns {DOMElement} DOM element + */ + _createGeocodeResultsHeaderElement: function _createGeocodeResultsHeaderElement() { + var self = this; + var container = document.createElement("div"); + container.className = "GPpanelHeader"; + var divTitle = document.createElement("div"); + divTitle.className = "GPpanelTitle"; + divTitle.innerHTML = "Résultats de la recherche"; + container.appendChild(divTitle); + var divClose = document.createElement("div"); + divClose.id = this._addUID("GPgeocodeResultsClose"); + divClose.className = "GPpanelClose"; + divClose.title = "Fermer la fenêtre de résultats"; + if (divClose.addEventListener) { + divClose.addEventListener("click", function () { + document.getElementById(self._addUID("GPgeocodeResultsList")).style.display = "none"; + }, false); + } else if (divClose.attachEvent) { + divClose.attachEvent("onclick", function () { + document.getElementById(self._addUID("GPgeocodeResultsList")).style.display = "none"; + }); + } + container.appendChild(divClose); + return container; + }, + /** + * Geocoding results list. + * + * @returns {DOMElement} DOM element + */ + _createGeocodeResultsListElement: function _createGeocodeResultsListElement() { + // contexte d'execution + var self = this; + var container = document.createElement("div"); + container.id = this._addUID("GPgeocodeResults"); + if (container.addEventListener) { + container.addEventListener("click", function (e) { + if (!e.ctrlKey) { + document.getElementById(self._addUID("GPgeocodeResultsList")).style.display = "none"; + } + self.onGeocodedResultsItemClick(e); + }, false); + } else if (container.attachEvent) { + container.attachEvent("onclick", function (e) { + if (!e.ctrlKey) { + document.getElementById(self._addUID("GPgeocodeResultsList")).style.display = "none"; + } + self.onGeocodedResultsItemClick(e); + }); + } + // Results are dynamically filled in Javascript by geocoding service + //
    ...
    + + return container; + }, + /** + * Geocoding result. + * Results are dynamically filled in Javascript by geocoding service + * + * TODO formaliser le contenu des reponses + * FIXME formater la reponse en amont ! + * + * @param {Object} location - suggested or geocoded location results + * @param {Number} id - ID + */ + _createGeocodedLocationElement: function _createGeocodedLocationElement(location, id) { + var container = document.getElementById(this._addUID("GPgeocodeResults")); + var div = document.createElement("div"); + div.id = this._addUID("GeocodedLocation_" + id); + div.className = "GPautoCompleteProposal"; + if (typeof location === "string") { + div.innerHTML = location; + } else { + div.innerHTML = _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_1__["default"].getGeocodedLocationFreeform(location); + } + container.appendChild(div); + } +}; +/* harmony default export */ __webpack_exports__["default"] = (SearchEngineDOM); + +/***/ }), +/* 124 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +/** +* @module Utils +* @alias Gp.olUtils +* @description +* ... +* +* @example +* detectSupport(); +* assign(); +* mergeParams(); +*/ +var Utils = { + /** + * this method is called by the constructor. + * this information is useful to switch to touch mode. + * Detection : test for desktop or tactile + * + * @function detectSupport + * @returns {Boolean} isDesktop - true for desktop userAgent, false for mobile + */ + detectSupport: function detectSupport() { + var isDesktop = true; + var userAgent = window.navigator.userAgent.toLowerCase(); + if (userAgent.indexOf("iphone") !== -1 || userAgent.indexOf("ipod") !== -1 || userAgent.indexOf("ipad") !== -1 || userAgent.indexOf("android") !== -1 || userAgent.indexOf("mobile") !== -1 || userAgent.indexOf("blackberry") !== -1 || userAgent.indexOf("tablet") !== -1 || userAgent.indexOf("phone") !== -1 || userAgent.indexOf("touch") !== -1) { + isDesktop = false; + } + if (userAgent.indexOf("msie") !== -1 || userAgent.indexOf("trident") !== -1) { + isDesktop = true; + } + return isDesktop; + }, + /** + * Copies all source object members to dest + * + * @function assign + * @param {Object} dest - destination object where properties and method will be copied + * @param {Object} source - source object from which properties and method will be copied + * @returns {Object} dest + */ + assign: function assign(dest, source) { + dest = dest || {}; + for (var prop in source) { + if (source.hasOwnProperty(prop)) { + dest[prop] = source[prop]; + } + } + return dest; + }, + /** + * Merge two objects parameters (deeper than assign) + * + * @function mergeParams + * @param {Object} dest - destination object where properties and method will be merge + * @param {Object} source - source object from which properties and method will be merge + * @param {Boolean} replace - replace destination value by source if exists or not (true by default) + */ + mergeParams: function mergeParams(dest, source, replace) { + if (!dest || !source) { + return; + } + if (typeof replace === "undefined") { + replace = true; + } + for (var param in source) { + if (source.hasOwnProperty(param)) { + if (_typeof(source[param]) === "object") { + if (dest.hasOwnProperty(param)) { + this.mergeParams(dest[param], source[param], replace); + } else { + dest[param] = source[param]; + } + } else { + if (dest.hasOwnProperty(param)) { + if (replace) { + dest[param] = source[param]; + } + } else { + dest[param] = source[param]; + } + } + } + } + } +}; +/* harmony default export */ __webpack_exports__["default"] = (Utils); + +/***/ }), +/* 125 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var leaflet_draw__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(117); +/* harmony import */ var leaflet_draw__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(leaflet_draw__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(37); +/* harmony import */ var _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(101); +/* harmony import */ var _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(102); +/* harmony import */ var _Common_Controls_ElevationPathDOM__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(126); +/* harmony import */ var _Common_Controls_ProfileElevationPathDOM__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(127); +/* globals AmCharts, d3 */ + + + + + + + + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__["default"].getLogger("ElevationPath"); + +/** + * @classdesc + * + * Leaflet Control Class to compute and display Profil Elevation. + * + * Use {@link module:Controls.ElevationPath L.geoportalControl.ElevationPath()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control native class. + * + * @namespace + * @alias L.geoportalControl.ElevationPath + */ +var ElevationPath = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Control.extend( /** @lends L.geoportalControl.ElevationPath.prototype */{ + includes: _Common_Controls_ElevationPathDOM__WEBPACK_IMPORTED_MODULE_7__["default"], + /** + * Options du service + * + * @private + */ + options: { + position: "topleft", + active: false, + elevationPathOptions: {}, + stylesOptions: {}, + displayProfileOptions: { + greaterSlope: true, + meanSlope: true, + ascendingElevation: true, + descendingElevation: true, + currentSlope: true, + apply: null, + target: null + } + }, + /** + * @constructor ElevationPath + * + * @private + * @param {Object} options - ElevationPath control options + * @param {String} [options.apiKey] - API key for services call (isocurve and autocomplete services). The "calcul" key is used by default. + * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol) + * @param {Boolean} [options.active] - Specify if widget has to be actived to drawing (true) or not (false) on map loading. Default is false. + * @param {Object} [options.elevationPathOptions = {}] - elevation service options. See {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~getAltitude Gp.Services.getAltitude()} to know all elevation options + * @param {Object} [options.displayProfileOptions = {}] - profile options. + * @param {Function} [options.displayProfileOptions.apply] - function to display profil panel. + * @param {Object} [options.displayProfileOptions.target] - container DOM for the profil panel. + * @param {Boolean} [options.displayProfileOptions.greaterSlope = true] - display the greater slope into the graph + * @param {Boolean} [options.displayProfileOptions.meanSlope = true] - display the mean slope into the graph + * @param {Boolean} [options.displayProfileOptions.ascendingElevation = true] - display the ascending elevation into the graph + * @param {Boolean} [options.displayProfileOptions.descendingElevation = true] - display the descending elevation into the graph + * @param {Boolean} [options.displayProfileOptions.currentSlope = true] - display current slope value on profile mouseover + * + * @example + * var e = L.geoportalControl.ElevationPath({ + * active : false, + * stylesOptions : {}, + * elevationPathOptions : {}, + * displayProfileOptions : { + * apply : null, + * target : null + * } + * }); + * Exemples : + * - displayProfileOptions.apply : null + * - displayProfileOptions.apply : function (elevations, container, context) { // do some stuff... } + * - displayProfileOptions.apply : ol.control.ElevationPath.DISPLAY_PROFILE_{LIB_AMCHARTS | LIB_D3 | RAW} + * (detect auto lib. : d3 / AmCharts) + */ + initialize: function initialize(options) { + // on transmet les options au controle + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.setOptions(this, options); + + // uuid + this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_4__["default"].generate(); + + // initialisation + this._initDisplayProfileOptions(); + + // les container + this._showContainer = null; + this._pictoContainer = null; + this._panelContainer = null; + this._profilContainer = null; + this._waitingContainer = null; + this._infoContainer = null; + + // timer sur la fenetre d'informations des données + this._timerHdlr = null; + + // detection si le panneau est reduit + this._reducePanel = false; + + // couche vectorielle dans laquelle seront saisis les points (features ci-dessus) + this._featuresLayer = null; + this._lastIdLayer = 0; + this._currentIdLayer = 0; + this._currentFeature = null; + + // graph + this._profile = null; + this._marker = null; + + // geometry à transmettre au service : { lon : [], lat : []} + this._geometry = null; + + // distance du segment + this._distance = 0; + + // data elevations + this._data = {}; + }, + /** + * this method is called by this.addTo(map) when the control is added on the map + * and fills variable 'this._container = this.onAdd(map)', + * and create or disable events on map. + * + * @param {Object} map - the map + * + * @returns {DOMElement} DOM element + * @private + */ + onAdd: function onAdd(map) { + // initialisation du DOM du composant + var container = this._container = this._initLayout(); + if (map) { + // lors de l'ajout à la map, on active la saisie du point, + // mais seulement si le widget est ouvert + if (this.options.active) { + if (this._profile === null) { + this._panelContainer.style.display = "none"; + // this._panelContainer.style.visibility = "hidden"; + } + + this._activateMapInteraction(map); + } + } + + // deactivate of events that may interfere with the map + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomEvent.disableClickPropagation(container).disableScrollPropagation(container); + return container; + }, + /** + * TODO this method is called when the control is removed from the map + * and removes events on map. + * + * @private + */ + onRemove: function onRemove( /* map */) {}, + // ################################################################### // + // ####################### init application ########################## // + // ################################################################### // + + /** + * this method is called by the constructor and initialize the ... + * + * @private + */ + _initDisplayProfileOptions: function _initDisplayProfileOptions() { + // gestion de l'affichage du profil + var _profileOpts = this.options.displayProfileOptions; + + // gestion de la fonction du profil + var displayFunction = _profileOpts.apply; + _profileOpts.apply = typeof displayFunction === "function" ? displayFunction : ElevationPath.DISPLAY_PROFILE_BY_DEFAULT; + + // gestion du container du profil + var displayContainer = _profileOpts.target; + _profileOpts.target = typeof displayContainer !== "undefined" ? displayContainer : null; + + // les autres options + var _protoOpts = Object.getPrototypeOf(this.options); + if (typeof _profileOpts.meanSlope === "undefined") { + _profileOpts.meanSlope = _protoOpts.displayProfileOptions.meanSlope; + } + if (typeof _profileOpts.greaterSlope === "undefined") { + _profileOpts.greaterSlope = _protoOpts.displayProfileOptions.greaterSlope; + } + if (typeof _profileOpts.ascendingElevation === "undefined") { + _profileOpts.ascendingElevation = _protoOpts.displayProfileOptions.ascendingElevation; + } + if (typeof _profileOpts.descendingElevation === "undefined") { + _profileOpts.descendingElevation = _protoOpts.displayProfileOptions.descendingElevation; + } + if (typeof _profileOpts.currentSlope === "undefined") { + _profileOpts.currentSlope = _protoOpts.displayProfileOptions.currentSlope; + } + }, + // ################################################################### // + // ########################### init dom ############################## // + // ################################################################### // + + /** + * this method is called by this.onAdd(map) + * and initialize the container HTMLElement + * + * @returns {DOMElement} DOM element + * @private + */ + _initLayout: function _initLayout() { + // create main container + var container = this._createMainContainerElement(); + var inputShow = this._showContainer = this._createShowElevationPathElement(); + container.appendChild(inputShow); + + // mode "collapsed" + if (this.options.active) { + this._showContainer.checked = true; + } + var picto = this._pictoContainer = this._createShowElevationPathPictoElement(); + container.appendChild(picto); + + // panneau + var panel = this._panelContainer = this._createElevationPathPanelElement(); + + // header + var header = this._createElevationPathPanelHeaderElement(); + panel.appendChild(header); + + // profil + var profil = this._profilContainer = this._createElevationPathPanelProfilElement(); + panel.appendChild(profil); + + // waiting + var waiting = this._waitingContainer = this._createElevationPathWaitingElement(); + panel.appendChild(waiting); + + // info + var info = this._infoContainer = this._createElevationPathInformationsElement(); + panel.appendChild(info); + container.appendChild(panel); + return container; + }, + // ################################################################### // + // ####################### handlers events to dom #################### // + // ################################################################### // + + /** + * this method is called by event 'click' on '' picto + * and ... + * + * @param {Object} e - HTMLElement + * + * @private + */ + onShowElevationPathClick: function onShowElevationPathClick(e) { + logger.trace(e); + var map = this._map; + + // interactions avec la carte + if (!this._reducePanel) { + if (this._showContainer.checked) { + this._pictoContainer.style.display = "block"; + this._panelContainer.style.display = "none"; + this._removeMapInteraction(map); + this._clear(); + } else { + if (this._profile === null) { + this._panelContainer.style.display = "none"; + } + this._activateMapInteraction(map); + } + } else { + if (this._profile !== null) { + if (this.options.displayProfileOptions.target === null) { + this._pictoContainer.style.display = "none"; + } + this._panelContainer.style.display = "block"; + } + } + this._reducePanel = false; + }, + /** + * this method is called by event 'click' on '' picto + * (cf. this.), + * and reduce the panel + * + * @private + */ + onReduceElevationPathPanelClick: function onReduceElevationPathPanelClick() { + this._reducePanel = true; + this._pictoContainer.style.display = "block"; + this._panelContainer.style.display = "none"; + }, + /** + * this method is called by event 'click' on '' picto + * (cf. this.), + * and display the panel info + * TODO + * + * @private + */ + onOpenElevationPathInfoClick: function onOpenElevationPathInfoClick() { + // options d'affichage + var meanSlope = this.options.displayProfileOptions.meanSlope; + var greaterSlope = this.options.displayProfileOptions.greaterSlope; + var ascendingElevation = this.options.displayProfileOptions.ascendingElevation; + var descendingElevation = this.options.displayProfileOptions.descendingElevation; + + // clean + var div = this._infoContainer; + if (div.childElementCount) { + while (div.firstChild) { + div.removeChild(div.firstChild); + } + } + + // creation des infomations + + if (ascendingElevation) { + this._addElevationPathInformationsItem("Dénivelé positif : " + this._data.ascendingElevation.toLocaleString() + " m"); + } + if (descendingElevation) { + this._addElevationPathInformationsItem("Dénivelé négatif : " + this._data.descendingElevation.toLocaleString() + " m"); + } + if (meanSlope) { + this._addElevationPathInformationsItem("Pente moyenne : " + this._data.meanSlope.toLocaleString() + " %"); + } + if (greaterSlope) { + this._addElevationPathInformationsItem("Plus forte pente : " + this._data.greaterSlope.toLocaleString() + " %"); + } + + // show des informations ! + if (div.className === "GPelevationPathInformationsContainerVisible") { + clearTimeout(this._timerHdlr); + div.className = "GPelevationPathInformationsContainerHidden"; + } else { + div.className = "GPelevationPathInformationsContainerVisible"; + } + + // hidden des informations ! + this._timerHdlr = setTimeout(function () { + div.className = "GPelevationPathInformationsContainerHidden"; + }, 4000); + }, + // ################################################################### // + // ################### Map interactions management ################### // + // ################################################################### // + + /** + * this method is called by this.onShowElevationPathClick, + * and calls method corresponding to current delimitation, if widget is not collapsed. + * + * @param {Object} map - control map. + * @private + */ + _activateMapInteraction: function _activateMapInteraction(map) { + logger.info("_activateMapInteraction()"); + + // Creation de la couche vectorielle sur laquelle on va dessiner + if (this._featuresLayer === null) { + this._featuresLayer = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.FeatureGroup(); + map.addLayer(this._featuresLayer); + var self = this; + /* evenements : on desactive le menu systeme pour la saisie */ + map.on("contextmenu", function () {}); + + /* evenement sur la carte lors d'une saisie, + on y ajoute le layer, et on y stocke les coordonnées */ + map.on("draw:created", function (e) { + logger.trace("draw:created"); + self._currentIdLayer = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.stamp(e.layer); + self._getFeatureGeometry(e.layer); + self._addFeatureLayer(e.layer); + }); + + /* evenements */ + map.on("draw:drawstart", function () { + logger.trace("draw:drawstart"); + self._removeFeatureLayer(self._lastIdLayer); + self._lastIdLayer = self._currentIdLayer; + }); + + /* evenements */ + map.on("draw:drawstop", function () { + logger.trace("draw:drawstop"); + if (typeof self.options.elevationPathOptions.onSuccess === "undefined" && self.options.displayProfileOptions.target === null) { + self._pictoContainer.style.display = "none"; + self._panelContainer.style.display = "block"; + } + self._altiRequest(); + }); + } + this._activatePolyLineInteraction(map); + }, + /** + * remove draw interaction from map (if exists) + * + * @param {Object} map - control map. + * @private + */ + _removeMapInteraction: function _removeMapInteraction(map) { + if (!map) { + return; + } + if (this._featuresLayer !== null) { + map.off("draw:created"); + map.off("draw:drawstart"); + map.off("draw:drawstop"); + map.removeLayer(this._featuresLayer); + this._featuresLayer = null; + } + this._lastIdLayer = this._currentIdLayer = 0; + + // FIXME delete this._currentFeature ? + if (this._currentFeature) { + this._currentFeature.disable(); + } + }, + /** + * this method is called by this._activateMapInteraction, + * and creates map polyline drawing interaction. + * + * @param {Object} map - control map. + * @private + */ + _activatePolyLineInteraction: function _activatePolyLineInteraction(map) { + if (this._currentFeature) { + this._currentFeature.disable(); + } + + // liste des options par defaut + // cf. https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html + // var polylineOptions = { + // allowIntersection : true, + // repeatMode : false, + // drawError : { + // color : "#b00b00", + // timeout : 2500 + // }, + // icon : new L.DivIcon({ + // iconSize : new L.Point(8, 8), + // className : 'leaflet-div-icon leaflet-editing-icon' + // }), + // touchIcon : new L.DivIcon({ + // iconSize : new L.Point(20, 20), + // className : 'leaflet-div-icon leaflet-editing-icon leaflet-touch-icon' + // }), + // guidelineDistance : 20, + // maxGuideLineLength : 4000, + // shapeOptions : { + // stroke : true, + // color : '#f06eaa', + // weight : 4, + // opacity : 0.5, + // fill : false, + // clickable : true + // }, + // metric : true, // Whether to use the metric measurement system or imperial + // feet : true, // When not metric, to use feet instead of yards for display. + // nautic : false, // When not metric, not feet use nautic mile for display + // showLength : true, // Whether to display distance in the tooltip + // zIndexOffset : 2000 // This should be > than the highest z-index any map layersallowIntersection : true, + // }; + + var styles = this.options.stylesOptions || {}; + var _shapeOptions = Object.keys(styles).length !== 0 ? styles : { + stroke: true, + color: "#C77A04", + weight: 4, + opacity: 0.5, + fill: false + }; + this._currentFeature = new leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Draw.Polyline(map, { + shapeOptions: _shapeOptions + }); + this._currentFeature.enable(); + }, + /** + * set current position of feature + * + * @param {Object} layer - layer + * @private + */ + _getFeatureGeometry: function _getFeatureGeometry(layer) { + // on transmet toujours des coordonnées au service en EPSG:4326 + logger.log(layer.getLatLngs()); + if (this._geometry !== null) { + this._geometry = null; + } + this._geometry = []; + this._distance = 0; + var geometry = layer.getLatLngs(); + for (var i = 0; i < geometry.length; i++) { + // on transmet au service des coordonnées en EPSG:4326 + var LatLngI = geometry[i]; + var LatLngJ = geometry[i + 1]; + this._geometry.push({ + lon: LatLngI.lng, + lat: LatLngI.lat + }); + // on calcul la distance du segment + if (LatLngJ) { + this._distance += LatLngI.distanceTo(LatLngJ); + } + } + logger.log("Geometry", this._geometry); + logger.log("Distance", this._distance); + }, + /** + * set current layer of feature + * + * @param {Object} layer - layer + * @private + */ + _addFeatureLayer: function _addFeatureLayer(layer) { + if (!this._featuresLayer) { + return; + } + this._featuresLayer.addLayer(layer); + }, + /** + * remove layer feature from group + * + * @param {Integer} id - id + * @private + */ + _removeFeatureLayer: function _removeFeatureLayer(id) { + if (!this._featuresLayer) { + return; + } + if (id === 0) { + return; + } + if (!id) { + this._featuresLayer.clearLayers(); + } else { + this._featuresLayer.removeLayer(id); + } + }, + // ################################################################### // + // ############################ Alti request ######################### // + // ################################################################### // + + /** + * this methode is called by this. method, + * it generates and sends alti request, then displays results + * + * @private + */ + _altiRequest: function _altiRequest() { + logger.log("_altiRequest"); + + // les coordonnées sont obligatoires + if (!this._geometry) { + logger.log("missing position"); + return; + } + + // on construit les options pour la requête + var options = {}; + + // on surcharge avec les options de l'utilisateur + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, this.options.elevationPathOptions); + + // au cas où la clef API n'est pas renseignée dans les options du service, + // on utilise celle renseignée au niveau du controle, sinon la clé "calcul" est utilisée par défaut. + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + apiKey: options.apiKey || this.options.apiKey + }); + + // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert + // true par défaut (https) + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + ssl: this.options.ssl + }); + + // le sampling est soit defini par l'utilisateur (opts), + // ou soit calculé dynamiquement... + var _sampling = options.sampling; + if (!_sampling) { + // computing sampling + var _computeSampling; + var _length = this._currentFeature._measurementRunningTotal; // FIXME !!! + logger.trace("length", _length); + var p = Math.floor(_length) / 5; // en mètre sur un pas moyen de 5m ! + if (p >= 200) { + _computeSampling = 200; + } else { + _computeSampling = Math.floor(p); + } + _sampling = _computeSampling; + } + + // on y ajoute les callbacks ainsi que les options par defaut + var self = this; + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + // sampling à 200 (iso portail) + sampling: _sampling, + // callback onSuccess + onSuccess: this.options.elevationPathOptions.onSuccess || function (result) { + logger.log(result); + if (result) { + if (self.options.displayProfileOptions.target !== null) { + self._pictoContainer.style.display = "block"; + self._panelContainer.style.display = "block"; + } + self._displayProfil(result.elevations); + self._waitingContainer.className = "GPelevationPathCalcWaitingContainerHidden"; + self._waiting = false; + } + }, + // callback onFailure + onFailure: this.options.elevationPathOptions.onFailure || function (error) { + logger.log(error.message); + self._pictoContainer.style.display = "block"; + self._panelContainer.style.display = "none"; + self._waitingContainer.className = "GPelevationPathCalcWaitingContainerHidden"; + self._waiting = false; + self._clear(); + } + }); + + // et enfin, la geometrie + var positions = this._geometry; + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(options, { + positions: positions + }); + logger.log(options); + + // mise en place de la patience + this._waitingContainer.className = "GPelevationPathCalcWaitingContainerVisible"; + + // Request altitude service + geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__["default"].Services.getAltitude(options); + }, + // ################################################################### // + // ########################## Profil display ######################### // + // ################################################################### // + + /** + * this method computes results elevations (Z and distance) + * + * @param {Array} elevations - array of elevation + * @return {Array} elevations + * @private + */ + _computeElevationMeasure: function _computeElevationMeasure(elevations) { + // Returns the distance from c1 to c2 using the haversine formula + var _haversineDistance = function _haversineDistance(c1, c2) { + var lat1 = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__["default"].decimalToRadian(c1[1]); + var lat2 = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__["default"].decimalToRadian(c2[1]); + var deltaLatBy2 = (lat2 - lat1) / 2; + var deltaLonBy2 = _Utils_PositionFormater__WEBPACK_IMPORTED_MODULE_5__["default"].decimalToRadian(c2[0] - c1[0]) / 2; + var a = Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) + Math.sin(deltaLonBy2) * Math.sin(deltaLonBy2) * Math.cos(lat1) * Math.cos(lat2); + return 2 * 6378137 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); + }; + var _data = elevations; + var _unit = "m"; + var _sketchPoints = this._geometry; + // section actuelle du sketch sur laquelle on est + var _currentSection = 0; + // longueur cumulée des sections précédentes + var _previousSectionsLength = 0; + var _nextSectionBegining = _sketchPoints[1]; + + // Calcul de la distance au départ pour chaque point + arrondi des lat/lon + _data[0].dist = 0; + _data[0].slope = 0; + _data[0].lat = Math.round(_data[0].lat * 10000) / 10000; + _data[0].lon = Math.round(_data[0].lon * 10000) / 10000; + var _distanceMinus = 0; + var _distancePlus = 0; + var _ascendingElevation = 0; + var _descendingElevation = 0; + var _distance = 0; + var _slopes = 0; + var distances = []; + for (var i = 1; i < _data.length; i++) { + var a = [_data[i].lon, _data[i].lat]; + var distanceToStart = _previousSectionsLength + _haversineDistance(a, [_sketchPoints[_currentSection].lon, _sketchPoints[_currentSection].lat]); + var dist = distanceToStart - _distance; + + // Changement de section + if (a[0].toFixed(8) === _nextSectionBegining.lon.toFixed(8) && a[1].toFixed(8) === _nextSectionBegining.lat.toFixed(8)) { + _currentSection++; + _previousSectionsLength = distanceToStart; + // Pas de next section si on est sur le dernier point + if (i !== _data.length - 1) { + _nextSectionBegining = _sketchPoints[_currentSection + 1]; + } + } + var za = _data[i].z; + var zb = _data[i - 1].z; + if (za < 0) { + za = 0; + } + if (zb < 0) { + zb = 0; + } + var slope = za - zb; + if (slope < 0) { + _distanceMinus += dist; + _descendingElevation += slope; + } else if (slope > 0) { + _distancePlus += dist; + _ascendingElevation += slope; + } + _distance = distanceToStart; + _data[i].dist = distanceToStart; + distances.push(distanceToStart); + _slopes += slope ? Math.abs(Math.round(slope / dist * 100)) : 0; + _data[i].slope = slope ? Math.abs(Math.round(slope / dist * 100)) : 0; + + // EVOL ? + // cf. gradiant + // http://www.color-hex.com/color/00b798 + var value = _data[i].slope; + if (value > 15 && value < 30) { + _data[i].color = "#005b4c"; + } else if (value > 30 && value < 45) { + _data[i].color = "#00362d"; + } else if (value > 45) { + _data[i].color = "#00120f"; + } else { + _data[i].color = "#00B798"; + } + _data[i].lat = Math.round(_data[i].lat * 10000) / 10000; + _data[i].lon = Math.round(_data[i].lon * 10000) / 10000; + } + + // check distance totale + logger.trace("List Distances", distances); + + // Correction des altitudes aberrantes + arrondi des calculs de distance + ... + var _altMin = _data[0].z; + var _altMax = _data[0].z; + var _greaterSlope = _data[0].slope; + for (var ji = 0; ji < _data.length; ji++) { + var d = _data[ji]; + if (d.z < -100) { + d.z = 0; + } + if (d.z > _altMax) { + _altMax = d.z; + } + if (d.z < _altMin) { + _altMin = d.z; + } + if (d.slope > _greaterSlope) { + _greaterSlope = d.slope; + } + } + return { + greaterSlope: _greaterSlope, + // pente max + meanSlope: Math.round(_slopes / _data.length), + // pente moyenne + distancePlus: _distancePlus, + // distance cumulée positive + distanceMinus: _distanceMinus, + // distance cumulée négative + ascendingElevation: _ascendingElevation, + // dénivelé cumulée positive + descendingElevation: _descendingElevation, + // dénivelé cumulée négative + altMin: _altMin.toLocaleString(), + // altitude min TODO: inutile ? + altMax: _altMax.toLocaleString(), + // altitude max TODO: inutile ? + distance: this._distance, + // distance totale + unit: _unit, + // unité des mesures de distance + points: _data + }; + }, + /** + * this method is called by this. (in case of success) + * and display results + * + * @param {Array} elevations - array of elevation + * @private + */ + _displayProfil: function _displayProfil(elevations) { + // on reactive le menu systeme en fin de saisie ! + var map = this._map; + map.off("contextmenu"); + + // data + if (this._data) { + this._data = {}; + } + + // sauvegarde des données + var data = this._data = this._computeElevationMeasure(elevations); + + // container + var container = this.options.displayProfileOptions.target; + if (container) { + container.appendChild(this._panelContainer); + } + container = this._profilContainer; + + // TODO contexte ? + var context = this; + var _profileOpts = this.options.displayProfileOptions; + + // fonction + var displayFunction = _profileOpts.apply; + + // Calcul du profil + if (typeof AmCharts !== "undefined" && typeof d3 !== "undefined") { + logger.trace("Aucune lib. n'est presente !"); + } + + // execution... + displayFunction.call(this, data, container, context); + + // affichage des informations du profil ? + var element = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.DomUtil.get("GPelevationPathPanelInfo-" + this._uid); + if (_profileOpts.greaterSlope || _profileOpts.meanSlope || _profileOpts.ascendingElevation || _profileOpts.descendingElevation) { + // on affiche les informations + element.style.display = "block"; + } + }, + // ################################################################### // + // ################################ clean ############################ // + // ################################################################### // + + /** + * this method clears all data + * + * @private + */ + _clear: function _clear() { + this._geometry = null; + this._profile = null; + + // on vide le container + if (this._profilContainer) { + while (this._profilContainer.firstChild) { + this._profilContainer.removeChild(this._profilContainer.firstChild); + } + } + + // on supprime le marker + var map = this._map; + if (this._marker) { + map.removeLayer(this._marker); + this._marker = null; + } + } +}); + +/** + * create Profile Marker + * + * @param {Object} context - context + * @param {Object} data - data + */ +ElevationPath.__createProfileMarker = function (context, data) { + logger.log("__createProfileMarker"); + var self = context; + var map = self._map; + + // var _srs = L.CRS.EPSG4326; + // var _pointA = _srs.latLngToPoint(L.latLng(self._geometry[0].lat, self._geometry[0].lon)); + // var _pointB = _srs.latLngToPoint(L.latLng(self._geometry[self._geometry.length - 1].lat, self._geometry[self._geometry.length - 1].lon)); + // var _point = L.LineUtil.closestPointOnSegment(_srs.latLngToPoint(L.latLng(data.lat, data.lon)), _pointA, _pointB ); + + // creation d"un marker + self._marker = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.marker(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(data), { + icon: new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__["default"]("orange"), + draggable: false, + clickable: false, + zIndexOffset: 1000 + }); + self._marker.addTo(map); +}; + +/** + * update Profile Marker + * + * @param {Object} context - context + * @param {Object} data - data + */ +ElevationPath.__updateProfileMarker = function (context, data) { + logger.log("__updateProfileMarker"); + var self = context; + var map = self._map; + + // var _srs = L.CRS.EPSG4326; + // var _pointA = _srs.latLngToPoint(L.latLng(self._geometry[0].lat, self._geometry[0].lon)); + // var _pointB = _srs.latLngToPoint(L.latLng(self._geometry[self._geometry.length - 1].lat, self._geometry[self._geometry.length - 1].lon)); + // var _point = L.LineUtil.closestPointOnSegment( _srs.latLngToPoint(L.latLng(data.lat, data.lon)), _pointA, _pointB ); + + if (self._marker) { + self._marker.setLatLng(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(data)); + self._marker.update(); + } else { + // creation d"un marker + self._marker = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.marker(leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.latLng(data), { + icon: new _Utils_IconDefault__WEBPACK_IMPORTED_MODULE_6__["default"]("orange"), + draggable: false, + clickable: false, + zIndexOffset: 1000 + }); + self._marker.addTo(map); + } +}; + +/** + * remove Profile Marker + * + * @param {Object} context - context + */ +ElevationPath.__removeProfileMarker = function (context) { + logger.log("__removeProfileMarker"); + var self = context; + var map = self._map; + if (self._marker) { + map.removeLayer(self._marker); + self._marker = null; + } +}; + +/** + * custom operation into raw profil... + * TODO + */ +ElevationPath.__customRawProfileOperation = function () { + logger.log("__customRawProfileOperation"); +}; + +/** + * custom operation into raw profil... + * TODO + * + * @param {Object} context - context + * @param {Object} e - event + */ +ElevationPath.__customRawProfileMouseOverEvent = function (context, e) { + logger.log("__customRawProfileMouseOverEvent", context, e); +}; + +/** + * Display Profile function used by default : no additonal framework needed. + * + * @static + * @param {Object} data - elevations values for profile + * @param {HTMLElement} container - html container where to display profile + * @param {Object} context - this control object + */ +ElevationPath.DISPLAY_PROFILE_BY_DEFAULT = function (data, container, context) { + logger.trace("ElevationPath.DISPLAY_PROFILE_BY_DEFAULT"); + var profile = _Common_Controls_ProfileElevationPathDOM__WEBPACK_IMPORTED_MODULE_8__["default"].displayProfileByDefault(data, container, context, ElevationPath); + // on sauvegarde le profil du container dans l'objet + if (profile) { + this._profile = profile; + } +}; + +/** + * Display Profile without graphical rendering (raw service response) + * + * @static + * @param {Object} data - elevations values for profile + * @param {HTMLElement} container - html container where to display profile + * @param {Object} context - this control object + */ +ElevationPath.DISPLAY_PROFILE_RAW = function (data, container, context) { + logger.trace("ElevationPath.DISPLAY_PROFILE_RAW"); + var profile = _Common_Controls_ProfileElevationPathDOM__WEBPACK_IMPORTED_MODULE_8__["default"].displayProfileRaw(data, container, context, ElevationPath); + // on sauvegarde le profil du container dans l'objet + if (profile) { + this._profile = profile; + } +}; + +/** + * Display Profile using D3 javascript framework. This method needs D3 libraries to be loaded. + * + * @static + * @param {Object} data - elevations values for profile + * @param {HTMLElement} container - html container where to display profile + * @param {Object} context - this control object + */ +ElevationPath.DISPLAY_PROFILE_LIB_D3 = function (data, container, context) { + logger.trace("ElevationPath.DISPLAY_PROFILE_LIB_D3"); + if (typeof d3 === "undefined") { + logger.log("Lib. D3 is not loaded !"); + return; + } + var profile = _Common_Controls_ProfileElevationPathDOM__WEBPACK_IMPORTED_MODULE_8__["default"].displayProfileLibD3(data, container, context, ElevationPath); + // on sauvegarde le profil du container dans l'objet + if (profile) { + this._profile = profile; + } +}; + +/** + * Display Profile using Amcharts framework. This method needs AmCharts libraries to be loaded. + * + * @static + * @param {Object} data - elevations values for profile + * @param {HTMLElement} container - html container where to display profile + * @param {Object} context - this control object + */ +ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS = function (data, container, context) { + logger.trace("ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS"); + + // Calcul du profile + if (typeof AmCharts === "undefined") { + logger.log("Lib. AmCharts is not loaded !"); + return; + } + var profile = _Common_Controls_ProfileElevationPathDOM__WEBPACK_IMPORTED_MODULE_8__["default"].displayProfileLibAmCharts(data, container, context, ElevationPath); + // on sauvegarde le profil du container dans l'objet + if (profile) { + this._profile = profile; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (ElevationPath); + +/***/ }), +/* 126 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var ElevationPathDOM = { + /** + * Add uuid to the tag ID + * @param {String} id - id selector + * @returns {String} uid - id selector with an unique id + */ + _addUID: function _addUID(id) { + var uid = this._uid ? id + "-" + this._uid : id; + return uid; + }, + /** + * Main container (DOM) + * + * @returns {DOMElement} DOM element + */ + _createMainContainerElement: function _createMainContainerElement() { + var container = document.createElement("div"); + container.id = this._addUID("GPelevationPath"); + container.className = "GPwidget"; + return container; + }, + // ################################################################### // + // ################# Methods to display Main Panel ################### // + // ################################################################### // + + /** + * Hidden checkbox for minimizing/maximizing panel + * + * @returns {DOMElement} DOM element + */ + _createShowElevationPathElement: function _createShowElevationPathElement() { + var input = document.createElement("input"); + input.id = this._addUID("GPshowElevationPath"); + input.type = "checkbox"; + return input; + }, + /** + * Show control + * see event ! + * + * @returns {DOMElement} DOM element + */ + _createShowElevationPathPictoElement: function _createShowElevationPathPictoElement() { + // contexte d'execution + var context = this; + var label = document.createElement("label"); + label.id = this._addUID("GPshowElevationPathPicto"); + label.className = "GPshowAdvancedToolPicto"; + label.htmlFor = this._addUID("GPshowElevationPath"); + label.title = "Calculer un profil"; + + // gestionnaire d'evenement : + // on ouvre le menu de saisie de saisie + // L'ouverture/Fermeture permet de faire le menage + // (reinitialisation) + if (label.addEventListener) { + label.addEventListener("click", function (e) { + context.onShowElevationPathClick(e); + }); + } else if (label.attachEvent) { + label.attachEvent("onclick", function (e) { + context.onShowElevationPathClick(e); + }); + } + var spanOpen = document.createElement("span"); + spanOpen.id = this._addUID("GPshowElevationPathOpen"); + spanOpen.className = "GPshowAdvancedToolOpen"; + label.appendChild(spanOpen); + return label; + }, + // ################################################################### // + // ######################### Methods to Panel ######################## // + // ################################################################### // + + /** + * Create Container Panel + * + * FIXME + * don't call this._createElevationPathPanelHeaderElement + * don't call this._createElevationPathPanelProfilElement + * + * @returns {DOMElement} DOM element + */ + _createElevationPathPanelElement: function _createElevationPathPanelElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPelevationPathPanel"); + div.className = "GPpanel"; + + // div.appendChild(this._createElevationPathPanelHeaderElement()); + // div.appendChild(this._createElevationPathPanelProfilElement()); + + return div; + }, + /** + * Create Header Panel + * + * @returns {DOMElement} DOM element + */ + _createElevationPathPanelHeaderElement: function _createElevationPathPanelHeaderElement() { + var self = this; + var container = document.createElement("div"); + container.className = "GPpanelHeader"; + var divInfo = document.createElement("div"); + divInfo.id = this._addUID("GPelevationPathPanelInfo"); + divInfo.className = "GPpanelInfo"; + divInfo.title = "Informations"; + // add event on click + if (divInfo.addEventListener) { + divInfo.addEventListener("click", function () { + self.onOpenElevationPathInfoClick(); + }); + } else if (divInfo.attachEvent) { + // internet explorer + divInfo.attachEvent("onclick", function () { + self.onOpenElevationPathInfoClick(); + }); + } + container.appendChild(divInfo); + var divTitle = document.createElement("div"); + divTitle.className = "GPpanelTitle"; + divTitle.innerHTML = "Profil Altimétrique"; + container.appendChild(divTitle); + var divReduce = document.createElement("div"); + divReduce.id = this._addUID("GPelevationPathPanelReduce"); + divReduce.className = "GPpanelReduce"; + divReduce.title = "Masquer le panneau"; + if (divReduce.addEventListener) { + divReduce.addEventListener("click", function () { + if (typeof self.onReduceElevationPathPanelClick === "function") { + document.getElementById(self._addUID("GPshowElevationPath")).checked = false; + self.onReduceElevationPathPanelClick(); + } + }, false); + } else if (divReduce.attachEvent) { + divReduce.attachEvent("onclick", function () { + if (typeof self.onReduceElevationPathPanelClick === "function") { + document.getElementById(self._addUID("GPshowElevationPath")).checked = false; + self.onReduceElevationPathPanelClick(); + } + }); + } + container.appendChild(divReduce); + var divClose = document.createElement("div"); + divClose.id = this._addUID("GPelevationPathPanelClose"); + divClose.className = "GPpanelClose"; + divClose.title = "Fermer le panneau"; + + // Link panel close / visibility checkbox + if (divClose.addEventListener) { + divClose.addEventListener("click", function () { + document.getElementById(self._addUID("GPshowElevationPathPicto")).click(); + }, false); + } else if (divClose.attachEvent) { + divClose.attachEvent("onclick", function () { + document.getElementById(self._addUID("GPshowElevationPathPicto")).click(); + }); + } + container.appendChild(divClose); + return container; + }, + /** + * Create Form + * see evenement ! + * + * @returns {DOMElement} DOM element + */ + _createElevationPathPanelProfilElement: function _createElevationPathPanelProfilElement() { + var div = document.createElement("div"); + div.id = "GPelevationPathProfil"; + return div; + }, + /** + * Create Waiting Panel + * + * @returns {DOMElement} DOM element + */ + _createElevationPathWaitingElement: function _createElevationPathWaitingElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPelevationPathCalcWaitingContainer"); + div.className = "GPelevationPathCalcWaitingContainerHidden"; + var p = document.createElement("p"); + p.className = "GPelevationPathCalcWaiting"; + p.innerHTML = "Calcul en cours..."; + div.appendChild(p); + return div; + }, + /** + * Create information Panel + * + * @returns {DOMElement} DOM element + */ + _createElevationPathInformationsElement: function _createElevationPathInformationsElement() { + var div = document.createElement("div"); + div.id = this._addUID("GPelevationPathInformationsContainer"); + div.className = "GPelevationPathInformationsContainerHidden"; + var p = document.createElement("p"); + p.className = "GPelevationPathInformations"; + p.innerHTML = "Aucune information..."; + div.appendChild(p); + return div; + }, + /** + * Add a information into Panel + * + * @param {String} value - value of item + * @returns {DOMElement} DOM element + */ + _addElevationPathInformationsItem: function _addElevationPathInformationsItem(value) { + var div = document.getElementById(this._addUID("GPelevationPathInformationsContainer")); + if (div) { + var p = document.createElement("p"); + p.className = "GPelevationPathInformations"; + p.innerHTML = value; + div.appendChild(p); + } + return div; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (ElevationPathDOM); + +/***/ }), +/* 127 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* globals AmCharts, d3 */ + +/** + * @module ProfileElevationPathDOM + * @alias [private] ProfileElevationPathDOM + * @description + * create DOM element + */ +var ProfileElevationPathDOM = { + /** + * Gets a css property from an element + * + * @private + * @param {HTMLElement} element The element to get the property from + * @param {String} property The css property + * @returns {String} The value of the property + * + * @see https://stackoverflow.com/questions/7444451/how-to-get-the-actual-rendered-font-when-its-not-defined-in-css + */ + _getCssProperty: function _getCssProperty(element, property) { + return window.getComputedStyle(element, null).getPropertyValue(property); + }, + /** + * Uses canvas.measureText to compute and return the width of the given text of given font in pixels. + * + * @private + * @param {String} text The text to be rendered. + * @param {HTMLElement} container The container of the text + * @param {String} font The font of the container if known, format: 'weight size familiy' + * @returns {Number} The width of the text + * + * @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393 + */ + _getTextWidth: function _getTextWidth(text, container) { + var font = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + // re-use canvas object for better performance + var canvas = /** ts-syntax */this.canvas || (this.canvas = document.createElement("canvas")); + var context = canvas.getContext("2d"); + if (font === null) { + context.font = "".concat(this._getCssProperty(container, "font-weight"), " ").concat(this._getCssProperty(container, "font-size"), " ").concat(this._getCssProperty(container, "font-family")); + } else { + context.font = font; + } + var metrics = context.measureText(text); + return metrics.width; + }, + /** + * Converts a data point z to svg y coord + * + * @private + * @param {Object} z The z to convert. + * @param {Number} pathHeight The height of the path in the svg container in px + * @param {Number} minGraphZ Min z of the graph + * @param {Number} pxPerMZ Number of pixels per meter for the z (y) axis + * @returns {Number} The y svg coordinate of the point + * + */ + _dataZToSvgY: function _dataZToSvgY(z, pathHeight, minGraphZ, pxPerMZ) { + return pathHeight - (z - minGraphZ) * pxPerMZ - 0.5; + }, + /** + * Converts a data point dist value to svg x coord + * + * @private + * @param {Number} dist The dist to convert + * @param {Number} svgWidth The witdth of the svg container in px + * @param {Number} pathWidth The witdth of the path in the svg container in px + * @param {Number} pxPerMX Number of pixels per meter for the x axis + * @returns {Array} The x svg coordinate of the point + * + */ + _dataDistToSvgX: function _dataDistToSvgX(dist, svgWidth, pathWidth, pxPerMX) { + return svgWidth - pathWidth + dist * pxPerMX; + }, + /** + * Converts a svg x coord to dist value + * + * @private + * @param {Number} svgX The dist to convert + * @param {Number} svgWidth The witdth of the svg container in px + * @param {Number} pathWidth The witdth of the path in the svg container in px + * @param {Number} pxPerMX Number of pixels per meter for the x axis + * @returns {Array} The dist value + * + */ + _svgXToDataDist: function _svgXToDataDist(svgX, svgWidth, pathWidth, pxPerMX) { + return (svgX + pathWidth - svgWidth) / pxPerMX; + }, + /** + * Returns the index of value if it were inserted in sorted (by dist) array of data points. + * + * @private + * @param {Array} array Sorted array of data points (with dist property) + * @param {Number} value Value to test the index of. + * @returns {Number} The index the value would have. + * + */ + _arrayBisect: function _arrayBisect(array, value) { + var idx; + if (array.length === 0) { + return 0; + } + for (idx = 0; idx < array.length; idx++) { + if (value < array[idx].dist) { + return idx; + } + } + return idx - 1; + }, + /** + * Display Profile function used by default : no additonal framework needed. + * + * @public + * @param {Object} data - elevations values for profile + * @param {HTMLElement} container - html container where to display profile + * @param {Object} context - this control object + * @param {Object} className - calling class (ie ElevationPath) + * @returns {DOMElement} profil container + */ + displayProfileByDefault: function displayProfileByDefault(data, container, context, className) { + var self = context; + if (!container) { + return; + } + if (!data) { + return; + } + + // on nettoie toujours... + while (container.firstChild) { + container.removeChild(container.firstChild); + } + var margin = { + top: 25, + right: 15, + bottom: 10, + left: 10 + }; + var _displayProfileOptions = self.options.displayProfileOptions; + var _points = data.points; + var sortedElev = JSON.parse(JSON.stringify(_points)); + sortedElev.sort(function (e1, e2) { + return e1.z - e2.z; + }); + var minZ = sortedElev[0].z; + var maxZ = sortedElev[sortedElev.length - 1].z; + var dist = data.distance; + var distUnit = "m"; + var widgetDiv = document.createElement("div"); + widgetDiv.id = "profileElevationByDefault"; + container.appendChild(widgetDiv); + + // Détermination des tailles en pixels des éléments du widget + var clientWidth = window.getComputedStyle(container).getPropertyValue("width").replace(/px/, ""); + var clientHeight = window.getComputedStyle(container).getPropertyValue("height").replace(/px/, ""); + var widgetHeigth = clientHeight - margin.top - margin.bottom; + var widgetWidth = clientWidth - margin.left - margin.right; + // const widgetHeigth = container.clientHeight - margin.top - margin.bottom; + // const widgetWidth = container.clientWidth - margin.left - margin.right; + + var zLabelWidth = 17; + var zGradWidth = this._getTextWidth(Math.round(maxZ).toLocaleString() + ",88", container, "400 10 Verdana"); + var xLabelHeight = 17; + var xGradHeight = 15; + var minZguideHeigth = 15; + var minXguideWidth = this._getTextWidth(Math.round(dist).toLocaleString() + ",5", container); + var minNumXGuides = 1; + var pathHeight = widgetHeigth - xLabelHeight - xGradHeight; + var pathWidth = widgetWidth - zLabelWidth - zGradWidth; + var elevationSvg = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + elevationSvg.id = "profileElevationByDefaultSvg"; + elevationSvg.setAttribute("style", "display: block; margin: auto; overflow: visible; position: absolute; left: 10px;"); + elevationSvg.setAttribute("viewBox", "0 0 ".concat(clientWidth, " ").concat(clientHeight)); + elevationSvg.setAttribute("width", "100%"); + elevationSvg.setAttribute("height", "100%"); + + // Détermination des guides en ordonnée : + var maxNumZguides = Math.floor(pathHeight / minZguideHeigth); + var gradZ; + // Traitement du cas altitude max = altitude min + if (maxZ === minZ) { + gradZ = 0.1; + } else { + gradZ = Math.pow(10, Math.ceil(Math.log((maxZ - minZ) / maxNumZguides) / Math.log(10))) / 2; + } + var minGraphZ = Math.floor(minZ / gradZ) * gradZ; + var maxGraphZ = Math.ceil(maxZ / gradZ) * gradZ; + // cas où le path atteint pile les graduations extremes : ajout d'une gradiation + if (maxGraphZ === maxZ) { + maxGraphZ += gradZ; + } + // cas où gradZ < 1 : nombres flottants capricieux... + minGraphZ = Math.round(minGraphZ * 100) / 100; + maxGraphZ = Math.round(maxGraphZ * 100) / 100; + var numZguides = Math.round((maxGraphZ - minGraphZ) / gradZ); + + // Si plus de guides que le max, on passe à une graduation de 10**x en 10**x (et non 10**x / 2) + if (numZguides + 1 > maxNumZguides) { + gradZ = Math.pow(10, Math.ceil(Math.log((maxZ - minZ) / maxNumZguides) / Math.log(10))); + minGraphZ = Math.floor(minZ / gradZ) * gradZ; + maxGraphZ = Math.ceil(maxZ / gradZ) * gradZ; + // cas où le path atteint pile les graduations extremes : ajout d'une gradiation + if (maxGraphZ === maxZ) { + maxGraphZ += gradZ; + } + // cas où gradZ < 1 : nombres flottants capricieux... + minGraphZ = Math.round(minGraphZ * 100) / 100; + maxGraphZ = Math.round(maxGraphZ * 100) / 100; + numZguides = Math.floor((maxGraphZ - minGraphZ) / gradZ); + } + numZguides = Math.max(Math.round(numZguides), 1); + var axisZ = document.createElementNS("http://www.w3.org/2000/svg", "g"); + axisZ.setAttribute("class", "profile-z-vertical"); + var guidesZ = document.createElementNS("http://www.w3.org/2000/svg", "g"); + var gradZyOffsetPx = pathHeight / numZguides; + var pxPerMZ; + // Traitement du cas altitude max = altitude min + if (maxZ === minZ) { + pxPerMZ = pathHeight / 0.2; + } else { + pxPerMZ = pathHeight / (maxGraphZ - minGraphZ); + } + var gradZtext; + var yTextTranslation; + var yStrokeTranslation; + var gradZstroke; + var gradZpath; + var gradZgrad; + // Ajout des graduations au graphique + for (var i = 0; i <= numZguides; i++) { + gradZtext = document.createElementNS("http://www.w3.org/2000/svg", "text"); + gradZtext.setAttribute("class", "profile-z-graduation"); + gradZtext.setAttribute("font-family", "Verdana"); + gradZtext.setAttribute("font-size", "10px"); + gradZtext.setAttribute("fill", "#5E5E5E"); + // Cas où gradZ < 1 : nombres flottants capricieux... + // Le Math.round est pour éviter des ennuis du genre 3 * 0.1 = 0.300000000000004 + gradZtext.textContent = (Math.round(100 * (minGraphZ + i * gradZ)) / 100).toLocaleString(); + yTextTranslation = pathHeight - i * gradZyOffsetPx; + gradZtext.setAttribute("transform", "translate(".concat(zLabelWidth + zGradWidth - 8, ", ").concat(yTextTranslation + 5, ")")); + gradZtext.setAttribute("text-anchor", "end"); + axisZ.appendChild(gradZtext); + yStrokeTranslation = Math.round(yTextTranslation) - 0.5; + gradZstroke = document.createElementNS("http://www.w3.org/2000/svg", "g"); + gradZpath = document.createElementNS("http://www.w3.org/2000/svg", "path"); + gradZpath.setAttribute("cs", "100,100"); + gradZpath.setAttribute("stroke-width", "1"); + if (i !== 0) { + gradZpath.setAttribute("stroke-opacity", "0.2"); + } else { + gradZpath.setAttribute("stroke-opacity", "1"); + } + gradZpath.setAttribute("stroke", "#000000"); + gradZpath.setAttribute("fill", "none"); + gradZpath.setAttribute("d", "M".concat(zLabelWidth + zGradWidth, ",").concat(yStrokeTranslation, " L").concat(pathWidth + zLabelWidth + zGradWidth, ",").concat(yStrokeTranslation)); + gradZgrad = document.createElementNS("http://www.w3.org/2000/svg", "path"); + gradZgrad.setAttribute("cs", "100,100"); + gradZgrad.setAttribute("stroke-width", "1"); + gradZgrad.setAttribute("stroke-opacity", "1"); + gradZgrad.setAttribute("stroke", "#000000"); + gradZgrad.setAttribute("fill", "none"); + gradZgrad.setAttribute("d", "M".concat(zLabelWidth + zGradWidth, ",").concat(yStrokeTranslation, " L").concat(zLabelWidth + zGradWidth + 5, ",").concat(yStrokeTranslation)); + gradZgrad.setAttribute("transform", "translate(-5, 0)"); + gradZstroke.appendChild(gradZgrad); + gradZstroke.appendChild(gradZpath); + guidesZ.appendChild(gradZstroke); + } + var axisZLegend = document.createElementNS("http://www.w3.org/2000/svg", "text"); + axisZLegend.setAttribute("class", "profile-z-legend"); + axisZLegend.setAttribute("font-family", "Verdana"); + axisZLegend.setAttribute("font-size", "11px"); + axisZLegend.setAttribute("fill", "#5E5E5E"); + axisZLegend.textContent = "Altitude (m)"; + axisZLegend.setAttribute("transform", "translate(".concat(zLabelWidth - 8, ", ").concat(Math.round(pathHeight / 2), ") rotate(-90)")); + axisZLegend.setAttribute("text-anchor", "middle"); + axisZ.appendChild(axisZLegend); + elevationSvg.appendChild(axisZ); + elevationSvg.appendChild(guidesZ); + + // Détermination des guides en abscisse : + // Passage éventuel en km + if (dist > 2000) { + dist /= 1000; + distUnit = "km"; + } + var maxNumXguides = Math.floor(pathWidth / minXguideWidth); + var gradX = Math.pow(10, Math.ceil(Math.log(dist / maxNumXguides) / Math.log(10))) / 2; + var maxGraphX = dist; + + // Si plus de guides que le max, on passe à une graduation de 10**x en 10**x (et non 10**x / 2) + var numXguides = Math.floor(maxGraphX / gradX); + if (numXguides > maxNumXguides) { + gradX = Math.pow(10, Math.ceil(Math.log(dist / maxNumXguides) / Math.log(10))); + numXguides = Math.floor(maxGraphX / gradX); + } else if (numXguides < minNumXGuides) { + gradX = Math.pow(10, Math.ceil(Math.log(dist / maxNumXguides) / Math.log(10)) - 1); + numXguides = Math.floor(maxGraphX / gradX); + } + numXguides = Math.max(numXguides, 1); + var lastGradX = gradX * numXguides; + var axisX = document.createElementNS("http://www.w3.org/2000/svg", "g"); + axisX.setAttribute("class", "profile-x-vertical"); + var guidesX = document.createElementNS("http://www.w3.org/2000/svg", "g"); + + // Décalage des graduations pour que la dernière corresponde à la distance max + var pxPerMX = pathWidth / maxGraphX; + var xOffset = (maxGraphX - lastGradX) * pxPerMX; + var gradXxOffsetPx = Math.round((pathWidth - xOffset) / numXguides); + var gradXtext; + var xTextTranslation; + var xStrokeTranslation; + var gradXstroke; + var gradXpath; + var gradXgrad; + // Ajout des graduations au graphique + for (var _i = 0; _i <= numXguides + 1; _i++) { + gradXtext = document.createElementNS("http://www.w3.org/2000/svg", "text"); + gradXtext.setAttribute("class", "profile-x-graduation"); + gradXtext.setAttribute("font-family", "Verdana"); + gradXtext.setAttribute("font-size", "10px"); + gradXtext.setAttribute("fill", "#5E5E5E"); + + // Exclusion du cas de la dernière graduation : correspond à la distance max : pas de texte + if (_i !== numXguides + 1) { + // Cas où gradX < 1 : nombres flottants capricieux... + gradXtext.textContent = (Math.round(100 * _i * gradX) / 100).toLocaleString(); + } + xTextTranslation = zLabelWidth + zGradWidth + _i * gradXxOffsetPx; + // Cas de la dernière graduation : correspond à la distance max + if (_i === numXguides + 1) { + xTextTranslation = zLabelWidth + zGradWidth + pathWidth; + } + gradXtext.setAttribute("transform", "translate(".concat(xTextTranslation, ", ").concat(pathHeight + xGradHeight + 5, ")")); + gradXtext.setAttribute("text-anchor", "middle"); + axisX.appendChild(gradXtext); + xStrokeTranslation = xTextTranslation - 0.5; + gradXstroke = document.createElementNS("http://www.w3.org/2000/svg", "g"); + gradXpath = document.createElementNS("http://www.w3.org/2000/svg", "path"); + gradXpath.setAttribute("cs", "100,100"); + gradXpath.setAttribute("stroke-width", "1"); + if (_i !== 0) { + gradXpath.setAttribute("stroke-opacity", "0.2"); + } else { + gradXpath.setAttribute("stroke-opacity", "1"); + } + gradXpath.setAttribute("stroke", "#000000"); + gradXpath.setAttribute("fill", "none"); + gradXpath.setAttribute("d", "M".concat(xStrokeTranslation, ",").concat(pathHeight, " L").concat(xStrokeTranslation, ",0")); + gradXgrad = document.createElementNS("http://www.w3.org/2000/svg", "path"); + gradXgrad.setAttribute("cs", "100,100"); + gradXgrad.setAttribute("stroke-width", "1"); + gradXgrad.setAttribute("stroke-opacity", "1"); + gradXgrad.setAttribute("stroke", "#000000"); + gradXgrad.setAttribute("fill", "none"); + gradXgrad.setAttribute("d", "M".concat(xStrokeTranslation, ",").concat(pathHeight, " L").concat(xStrokeTranslation, ",").concat(pathHeight - 5)); + gradXgrad.setAttribute("transform", "translate(0, 5)"); + gradXstroke.appendChild(gradXgrad); + gradXstroke.appendChild(gradXpath); + guidesX.appendChild(gradXstroke); + } + var axisXLegend = document.createElementNS("http://www.w3.org/2000/svg", "text"); + axisXLegend.setAttribute("class", "profile-x-legend"); + axisXLegend.setAttribute("font-family", "Verdana"); + axisXLegend.setAttribute("font-size", "11px"); + axisXLegend.setAttribute("fill", "#5E5E5E"); + axisXLegend.textContent = "Distance (".concat(distUnit, ")"); + axisXLegend.setAttribute("transform", "translate(".concat(zLabelWidth + zGradWidth + pathWidth / 2, ", ").concat(pathHeight + xGradHeight + xLabelHeight + 3, ")")); + axisXLegend.setAttribute("text-anchor", "middle"); + axisX.appendChild(axisXLegend); + elevationSvg.appendChild(axisX); + elevationSvg.appendChild(guidesX); + var elevationPathG = document.createElementNS("http://www.w3.org/2000/svg", "g"); + var factor = 1; + if (distUnit === "km") { + factor = 1000; + } + var pointX = this._dataDistToSvgX(_points[0].dist / factor, widgetWidth, pathWidth, pxPerMX); + var pointY = this._dataZToSvgY(_points[0].z, pathHeight, minGraphZ, pxPerMZ); + var pathD = "M".concat(pointX, ",").concat(pointY); + for (var _i2 = 1; _i2 < _points.length; _i2++) { + pointX = this._dataDistToSvgX(_points[_i2].dist / factor, widgetWidth, pathWidth, pxPerMX); + pointY = this._dataZToSvgY(_points[_i2].z, pathHeight, minGraphZ, pxPerMZ); + pathD += " L".concat(pointX, ",").concat(pointY); + } + var pathPath = document.createElementNS("http://www.w3.org/2000/svg", "path"); + pathPath.setAttribute("cs", "100,100"); + pathPath.setAttribute("stroke-width", "1"); + pathPath.setAttribute("stroke-opacity", "1"); + pathPath.setAttribute("stroke", "#0B6BA7"); + pathPath.setAttribute("fill", "none"); + pathPath.setAttribute("d", pathD); + + // Fermeture du path pour le fill + pathD += " L".concat(pointX, ",").concat(pathHeight); + pathD += " L".concat(widgetWidth - pathWidth, ",").concat(pathHeight); + var pathFill = document.createElementNS("http://www.w3.org/2000/svg", "path"); + pathFill.setAttribute("cs", "100,100"); + pathFill.setAttribute("stroke-width", "1"); + pathFill.setAttribute("stroke-opacity", "0"); + pathFill.setAttribute("stroke", "#000000"); + pathFill.setAttribute("fill", "#00B798"); + pathFill.setAttribute("fill-opacity", "0.4"); + pathFill.setAttribute("d", pathD); + elevationPathG.appendChild(pathPath); + elevationPathG.appendChild(pathFill); + elevationSvg.appendChild(elevationPathG); + + // Mise en place de l'écouteur d'évènement : pour l'affichage dynamique + var dynamicsG = document.createElementNS("http://www.w3.org/2000/svg", "g"); + // Pour écouter la position de la souris + var pathRectangle = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + pathRectangle.setAttribute("width", pathWidth); + pathRectangle.setAttribute("height", pathHeight); + pathRectangle.setAttribute("transform", "translate(".concat(widgetWidth - pathWidth, ",0)")); + pathRectangle.setAttribute("visibility", "hidden"); + pathRectangle.setAttribute("pointer-events", "all"); + var sortedDist = JSON.parse(JSON.stringify(_points)); + sortedDist.sort(function (e1, e2) { + return e1.dist - e2.dist; + }); + var focusLineX = document.createElementNS("http://www.w3.org/2000/svg", "line"); + focusLineX.setAttribute("id", "focusLineX"); + focusLineX.setAttribute("class", "focusLine-default"); + focusLineX.setAttribute("fill", "none"); + focusLineX.setAttribute("stroke", "#F90"); + focusLineX.setAttribute("stroke-width", "0.5px"); + focusLineX.setAttribute("visibility", "hidden"); + var focusLineY = document.createElementNS("http://www.w3.org/2000/svg", "line"); + focusLineY.setAttribute("id", "focusLineY"); + focusLineY.setAttribute("class", "focusLine-default"); + focusLineY.setAttribute("fill", "none"); + focusLineY.setAttribute("stroke", "#F90"); + focusLineY.setAttribute("stroke-width", "0.5px"); + focusLineY.setAttribute("visibility", "hidden"); + var focusCircle = document.createElementNS("http://www.w3.org/2000/svg", "circle"); + focusCircle.setAttribute("id", "focusCircle"); + focusCircle.setAttribute("r", 4); + focusCircle.setAttribute("class", "circle-default focusCircle-default"); + focusCircle.setAttribute("fill", "#F90"); + focusCircle.setAttribute("visibility", "hidden"); + dynamicsG.appendChild(focusCircle); + dynamicsG.appendChild(focusLineX); + dynamicsG.appendChild(focusLineY); + + // Tooltip + var tooltipDiv = document.createElementNS("http://www.w3.org/2000/svg", "text"); + var altiSpan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + var slopeSpan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + var coordsSpan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tooltipDiv.setAttribute("style", "text-align:center; max-width:220px; font-size:10px; color:#000000; font-family:Verdana; z-index:50;"); + tooltipDiv.style.pointerEvents = "none"; + tooltipDiv.style.position = "fixed"; + // tooltipDiv.classList.add("tooltipInit"); + // IE... + tooltipDiv.setAttribute("class", "tooltipInit"); + tooltipDiv.setAttribute("text-anchor", "middle"); + widgetDiv.appendChild(tooltipDiv); + altiSpan.setAttribute("class", "altiPathValue"); + altiSpan.setAttribute("x", "0"); + altiSpan.setAttribute("dy", "-.7em"); + slopeSpan.setAttribute("class", "altiPathValue"); + slopeSpan.setAttribute("x", "0"); + slopeSpan.setAttribute("dy", "1em"); + coordsSpan.setAttribute("class", "altiPathCoords"); + coordsSpan.setAttribute("x", "0"); + coordsSpan.setAttribute("dy", "1em"); + tooltipDiv.appendChild(altiSpan); + if (_displayProfileOptions.currentSlope) { + tooltipDiv.appendChild(slopeSpan); + } + tooltipDiv.appendChild(coordsSpan); + var tooltipG = document.createElementNS("http://www.w3.org/2000/svg", "g"); + dynamicsG.appendChild(tooltipG); + var tooltipBubble = document.createElementNS("http://www.w3.org/2000/svg", "path"); + tooltipBubble.setAttribute("cs", "100,100"); + tooltipBubble.setAttribute("fill", "#FFFFFF"); + tooltipBubble.setAttribute("stroke", "#CCCCCC"); + tooltipBubble.setAttribute("fill-opacity", "0.8"); + tooltipBubble.setAttribute("stroke-width", "1"); + tooltipBubble.setAttribute("stroke-opacity", "1"); + var tooltipBubbleShadow = document.createElementNS("http://www.w3.org/2000/svg", "path"); + tooltipBubbleShadow.setAttribute("cs", "100,100"); + tooltipBubbleShadow.setAttribute("fill", "#FFFFFF"); + tooltipBubbleShadow.setAttribute("stroke", "#000000"); + tooltipBubbleShadow.setAttribute("fill-opacity", "0"); + tooltipBubbleShadow.setAttribute("stroke-width", "1"); + tooltipBubbleShadow.setAttribute("stroke-opacity", "0.4"); + tooltipBubbleShadow.setAttribute("transform", "translate(1,1)"); + tooltipG.appendChild(tooltipBubbleShadow); + tooltipG.appendChild(tooltipBubble); + tooltipG.appendChild(tooltipDiv); + + // tooltipG.classList.add("tooltipInit"); + // IE... deprecated + tooltipG.setAttribute("class", "tooltipInit"); + tooltipG.style.pointerEvents = "none"; + function onMouseOver() { + focusLineX.setAttribute("visibility", "visible"); + focusLineY.setAttribute("visibility", "visible"); + focusCircle.setAttribute("visibility", "visible"); + className.__createProfileMarker(self, _points[0]); + + // tooltips + // tooltipDiv.classList.remove("tooltipInit"); + // tooltipG.classList.remove("tooltipInit"); + // tooltipDiv.classList.remove("tooltipFadeOut"); + // tooltipG.classList.remove("tooltipFadeOut"); + // tooltipDiv.classList.add("tooltipFadeIn"); + // tooltipG.classList.add("tooltipFadeIn"); + // IE... deprecated + tooltipDiv.setAttribute("class", "tooltipFadeIn"); + tooltipG.setAttribute("class", "tooltipFadeIn"); + } + function onMouseOut() { + focusLineX.setAttribute("visibility", "hidden"); + focusLineY.setAttribute("visibility", "hidden"); + focusCircle.setAttribute("visibility", "hidden"); + className.__removeProfileMarker(self); + // tooltips + // tooltipDiv.classList.remove("tooltipFadeIn"); + // tooltipG.classList.remove("tooltipFadeIn"); + // tooltipDiv.classList.add("tooltipFadeOut"); + // tooltipG.classList.add("tooltipFadeOut"); + // IE... deprecated + tooltipDiv.setAttribute("class", "tooltipFadeOut"); + tooltipG.setAttribute("class", "tooltipFadeOut"); + } + function onMouseMove(e) { + var mousePoint = elevationSvg.createSVGPoint(); + mousePoint.x = e.clientX; + mousePoint.y = e.clientY; + var svgMousePoint = mousePoint.matrixTransform(elevationSvg.getScreenCTM().inverse()); + var mouseDist = this._svgXToDataDist(svgMousePoint.x, widgetWidth, pathWidth, pxPerMX) * factor; + + // Math.max pour éviter de sortir de l'array + var distIndex = Math.max(1, this._arrayBisect(sortedDist, mouseDist)); + var d0 = _points[distIndex - 1]; + var d1 = _points[distIndex]; + var d = d0; + if (mouseDist - d0.dist > d1.dist - mouseDist) { + d = d1; + } + var focusX = this._dataDistToSvgX(d.dist / factor, widgetWidth, pathWidth, pxPerMX); + var focusY = this._dataZToSvgY(d.z, pathHeight, minGraphZ, pxPerMZ); + + // Mise à jour des éléments graphiques + focusCircle.setAttribute("cx", focusX); + focusCircle.setAttribute("cy", focusY); + focusLineX.setAttribute("x1", focusX); + focusLineX.setAttribute("y1", pathHeight); + focusLineX.setAttribute("x2", focusX); + focusLineX.setAttribute("y2", 0); + focusLineY.setAttribute("x1", zLabelWidth + zGradWidth); + focusLineY.setAttribute("y1", focusY); + focusLineY.setAttribute("x2", pathWidth + zLabelWidth + zGradWidth); + focusLineY.setAttribute("y2", focusY); + className.__updateProfileMarker(self, d); + + // Mise à jour du tooltip + var altiSpanTxt = "Altitude : ".concat(d.z.toLocaleString(), " m"); + var slopeSpanTxt = "Pente : ".concat(d.slope, " %"); + var coordsSpanTxt = "(lat : ".concat(d.lat.toLocaleString(), " / lon : ").concat(d.lon.toLocaleString(), ")"); + altiSpan.innerHTML = altiSpanTxt; + slopeSpan.innerHTML = slopeSpanTxt; + coordsSpan.innerHTML = coordsSpanTxt; + var tooltipTextWidth = Math.max(this._getTextWidth(coordsSpanTxt, coordsSpan), this._getTextWidth(altiSpanTxt, altiSpan)); + var toolTipBubbleD; + if (d.dist > dist * factor / 2) { + toolTipBubbleD = "M -0.5 -0.5 l -6 6 l 0 16 l -".concat(tooltipTextWidth + 10, " 0 l 0 -44 l ").concat(tooltipTextWidth + 10, " 0 l 0 16 l 6 6"); + tooltipDiv.setAttribute("transform", "translate(".concat(-(tooltipTextWidth / 2 + 12), ",0)")); // IE11 ! + } else if (d.dist <= dist * factor / 2) { + toolTipBubbleD = "M -0.5 -0.5 l 6 6 l 0 16 l ".concat(tooltipTextWidth + 10, " 0 l 0 -44 l -").concat(tooltipTextWidth + 10, " 0 l 0 16 l -6 6"); + // Largeur de la fleche de la bulle du tooltip + tooltipDiv.setAttribute("transform", "translate(".concat(tooltipTextWidth / 2 + 12, ",0)")); // IE11 ! + } + + tooltipBubble.setAttribute("d", toolTipBubbleD); + tooltipBubbleShadow.setAttribute("d", toolTipBubbleD); + tooltipG.setAttribute("transform", "translate(".concat(focusX, ",").concat(focusY, ")")); // IE11 ! + tooltipG.style.transform = "translate(".concat(focusX, "px,").concat(focusY, "px)"); + } + pathRectangle.addEventListener("pointerover", onMouseOver); + pathRectangle.addEventListener("pointerout", onMouseOut); + pathRectangle.addEventListener("pointermove", onMouseMove.bind(this)); + dynamicsG.appendChild(pathRectangle); + elevationSvg.appendChild(dynamicsG); + widgetDiv.appendChild(elevationSvg); + return container; + }, + /** + * Display Profile without graphical rendering (raw service response) + * + * @public + * @param {Object} data - elevations values for profile + * @param {HTMLElement} container - html container where to display profile + * @param {Object} context - this control object + * @param {Object} className - calling class (ie ElevationPath) + * @returns {DOMElement} profil container + */ + displayProfileRaw: function displayProfileRaw(data, container, context, className) { + if (!container) { + return; + } + + // on nettoie toujours... + while (container.firstChild) { + container.removeChild(container.firstChild); + } + var _points = data && data.points ? data.points : {}; + var div = document.createElement("textarea"); + div.id = "profilElevationResults"; + div.rows = 10; + div.cols = 50; + div.style.width = "100%"; + div.innerHTML = JSON.stringify(_points, undefined, 4); + div.addEventListener("mouseover", function (e) { + className.__customRawProfileMouseOverEvent(context, e); + }); + + // TODO + // for (var i = 0; i < _points.length; i++) { + // var point = _points[i]; + // var divC = document.createElement("code"); + // divC.id = "point_" + i; + // divC.innerHTML = JSON.stringify(point, undefined, 4); + // div.appendChild(divC); + // divC.addEventListener("mouseover", function (e) { + // className.__customRawProfileMouseOverEvent(context, e); + // }); + // } + + container.appendChild(div); + return container; + }, + /** + * Display Profile using D3 javascript framework. This method needs D3 libraries to be loaded. + * + * @public + * @param {Object} data - elevations values for profile + * @param {HTMLElement} container - html container where to display profile + * @param {Object} context - this control object + * @param {Object} className - calling class (ie ElevationPath) + * @returns {DOMElement} profil container + */ + displayProfileLibD3: function displayProfileLibD3(data, container, context, className) { + var self = context; + if (!container) { + return; + } + if (!data) { + return; + } + + // on nettoie toujours... + while (container.firstChild) { + container.removeChild(container.firstChild); + } + var _points = data.points; + if (data.distance > 2000) { + data.unit = "km"; + for (var i = 0; i < _points.length; i++) { + _points[i].dist /= 1000; + } + } + var _displayProfileOptions = self.options.displayProfileOptions; + var margin = { + top: 20, + right: 20, + bottom: 30, + left: 40 + }; + var widgetWidth = window.getComputedStyle(container).getPropertyValue("width"); + var widgetHeigth = window.getComputedStyle(container).getPropertyValue("height"); + var width = widgetWidth.replace(/px/, "") - margin.left - margin.right; + var height = widgetHeigth.replace(/px/, "") - margin.top - margin.bottom; + var x = d3.scale.linear().range([0, width]); + var y = d3.scale.linear().range([height, 0]); + var xAxis = d3.svg.axis().scale(x).orient("bottom").ticks(5); + var yAxis = d3.svg.axis().scale(y).orient("left").ticks(5); + var line = d3.svg.line().interpolate("basis").x(function (d) { + return x(d.dist); + }).y(function (d) { + return y(d.z); + }); + var area = d3.svg.area().interpolate("basis").x(function (d) { + return x(d.dist); + }).y0(height).y1(function (d) { + return y(d.z); + }); + var svg = d3.select(container).append("svg").attr("width", width + margin.left + margin.right).attr("height", height + margin.top + margin.bottom).append("g").attr("transform", "translate(" + margin.left + "," + margin.top + ")"); + var xDomain = d3.extent(_points, function (d) { + return d.dist; + }); + x.domain(xDomain); + var yDomain = [0, d3.max(_points, function (d) { + return d.z; + })]; + y.domain(yDomain); + svg.append("path").datum(_points).attr("class", "area-d3").attr("d", area); + svg.append("g").attr("class", "x axis-d3").attr("transform", "translate(0," + height + ")").call(xAxis).append("text").attr("y", -15).attr("dy", ".71em").attr("x", width).text("Distance (" + data.unit + ")"); + svg.append("g").attr("class", "y axis-d3").call(yAxis).append("text").attr("transform", "rotate(-90)").attr("y", 6).attr("dy", ".71em").text("Altitude (m)"); + svg.append("g").attr("class", "grid-d3 vertical").attr("transform", "translate(0," + height + ")").call(xAxis.orient("bottom").tickSize(-height, 0, 0).tickFormat("")); + svg.append("g").attr("class", "grid-d3 horizontal").call(yAxis.orient("left").tickSize(-width, 0, 0).tickFormat("")); + svg.append("path").datum(_points).attr("class", "line-d3").attr("d", line); + svg.selectAll("circle").data(_points).enter().append("circle").attr("cx", function (d) { + return x(d.dist); + }).attr("cy", function (d) { + return y(d.z); + }).attr("r", 0).attr("class", "circle-d3"); + var focus = svg.append("g").style("display", "none"); + focus.append("line").attr("id", "focusLineX").attr("class", "focusLine-d3"); + focus.append("line").attr("id", "focusLineY").attr("class", "focusLine-d3"); + focus.append("circle").attr("id", "focusCircle").attr("r", 4).attr("class", "circle-d3 focusCircle-d3"); + var div = d3.select(container).append("div").attr("class", "tooltip-d3").style("opacity", 0); + var bisectDist = d3.bisector(function (d) { + return d.dist; + }).left; + svg.append("rect").attr("class", "overlay-d3").attr("width", width).attr("height", height).on("mouseover", function () { + focus.style("display", null); + className.__createProfileMarker(self, _points[0]); + }).on("mouseout", function () { + focus.style("display", "none"); + className.__removeProfileMarker(self); + + // tooltips + div.transition().duration(500).style("opacity", 0); + }).on("mousemove", function () { + var m = d3.mouse(this); + var distance = x.invert(m[0]); + // Math.max pour éviter de sortir de l'array + var i = Math.max(1, bisectDist(_points, distance)); + var d0 = _points[i - 1]; + var d1 = _points[i]; + var d = distance - d0[0] > d1[0] - distance ? d1 : d0; + var xc = x(d.dist); + var yc = y(d.z); + focus.select("#focusCircle").attr("cx", xc).attr("cy", yc); + focus.select("#focusLineX").attr("x1", xc).attr("y1", y(yDomain[0])).attr("x2", xc).attr("y2", y(yDomain[1])); + focus.select("#focusLineY").attr("x1", x(xDomain[0])).attr("y1", yc).attr("x2", x(xDomain[1])).attr("y2", yc); + className.__updateProfileMarker(self, d); + + // tooltips + div.transition().duration(200).style("opacity", 0.9); + var _message = ""; + _message += " Altitude : " + d.z + " m"; + if (_displayProfileOptions.currentSlope) { + _message += "
    Pente : " + d.slope + " %"; + } + _message += "
    (Lat : " + d.lat + "/ Lon : " + d.lon + ")"; + div.html(_message).style("left", d3.event.pageX + "px").style("top", d3.event.pageY - 28 + "px"); + }); + + // return d3.selectAll("rect.overlay")[0][0]; + return svg; + }, + /** + * Display Profile using Amcharts framework. This method needs AmCharts libraries to be loaded. + * + * @public + * @param {Object} data - elevations values for profile + * @param {HTMLElement} container - html container where to display profile + * @param {Object} context - this control object + * @param {Object} className - calling class (ie ElevationPath) + * @returns {DOMElement} profil container + */ + displayProfileLibAmCharts: function displayProfileLibAmCharts(data, container, context, className) { + var self = context; + if (!container) { + return; + } + if (!data) { + return; + } + var _points = data.points; + var ballonText = "[[title]] : [[value]]m
    "; + var currentSlope = self.options.displayProfileOptions.currentSlope; + if (currentSlope) { + ballonText += "Pente : [[slope]] %
    "; + } + ballonText += "(Lat: [[lat]] / Lon:[[lon]])"; + AmCharts.addInitHandler(function () {}); + if (data.distance > 2000) { + data.unit = "km"; + for (var i = 0; i < _points.length; i++) { + _points[i].dist /= 1000; + } + } + for (var _i3 = 0; _i3 < _points.length; _i3++) { + var dist = _points[_i3].dist; + var coeffArrond = 100; + if (dist > 100) { + coeffArrond = 1; + } else if (dist > 10) { + coeffArrond = 10; + } + + // Correction arrondi distance totale + dist = Math.round(dist * coeffArrond) / coeffArrond; + _points[_i3].dist = dist; + } + var settings = { + type: "serial", + pathToImages: "http://cdn.amcharts.com/lib/3/images/", + categoryField: "dist", + autoMarginOffset: 0, + marginRight: 10, + marginTop: 10, + startDuration: 0, + color: "#5E5E5E", + fontSize: 8, + theme: "light", + thousandsSeparator: "", + numberFormatter: { + precision: -1, + decimalSeparator: ",", + thousandsSeparator: " " + }, + categoryAxis: { + color: "#5E5E5E", + gridPosition: "start", + minHorizontalGap: 40, + tickPosition: "start", + title: "Distance (" + data.unit + ")", + titleColor: "#5E5E5E", + labelOffset: 0, + startOnAxis: true + }, + chartCursor: { + animationDuration: 0, + bulletsEnabled: true, + bulletSize: 10, + categoryBalloonEnabled: false, + cursorColor: "#F90", + graphBulletAlpha: 1, + graphBulletSize: 1, + zoomable: false + }, + trendLines: [], + graphs: [{ + balloonColor: "#CCCCCC", + balloonText: ballonText, + bullet: "round", + bulletAlpha: 0, + bulletBorderColor: "#FFF", + bulletBorderThickness: 2, + bulletColor: "#F90", + bulletSize: 6, + hidden: false, + id: "AmGraph-1", + fillAlphas: 0.4, + fillColors: "#C77A04", + lineAlpha: 1, + lineColor: "#C77A04", + lineThickness: 1, + title: "Altitude", + valueField: "z" + }], + guides: [], + valueAxes: [{ + id: "ValueAxis-1", + minVerticalGap: 20, + title: "Altitude (m)" + }], + balloon: { + borderColor: "#CCCCCC", + borderThickness: 1, + fillColor: "#FFFFFF", + showBullet: true + }, + titles: [], + allLabels: [], + dataProvider: _points + }; + var _containerProfile = AmCharts.makeChart(container, settings); + _containerProfile.addListener("changed", function (e) { + var obj = e.chart.dataProvider[e.index]; + className.__updateProfileMarker(self, obj); + }); + return _containerProfile; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (ProfileElevationPathDOM); + +/***/ }), +/* 128 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__); + + +/** + * @classdesc + * + * Control Logo + * + * @private + * @constructor + * @extends {L.Control} + * @alias Logo + * @param {Object} options - options for function call. + * @param {String} options.position - 'topright' by default + * @param {String} options.url - URL + * @param {String} options.text - text + * @param {String} options.picto - picto + * @example + * var map = L.map('map').setView([48, 2], 4); + * var logo = L.geoportalControl.Logo({ + * position : "topright", + * picto : "http://www.ign.fr/logo-ign.jpg", + * url : "http://www.ign.fr", + * text : "© IGN", + * size : "70px" + * }); + * logo.addTo(map); + */ +var Logo = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Control.extend( /** @lends Logo.prototype */{ + /** + * Options du service + * + * @private + */ + options: { + position: "topright", + picto: null, + url: null, + text: null, + size: "30px" + }, + /** + * constructor + * + * @param {Object} options - options + * @private + */ + initialize: function initialize(options) { + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.setOptions(this, options); + }, + /** + * event + * + * @returns {DOMElement} DOM element + * @private + */ + onAdd: function onAdd( /* map */ + ) { + var container = null; + container = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.create("div", "gp-control-logo", container); + var bLink = !!(this.options.url || this.options.text); + var link = null; + if (bLink) { + link = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.create("a", "", container); + link.target = "_blank"; + if (this.options.url) { + link.href = this.options.url; + if (this.options.text) link.title = this.options.text; + } + } + + // FIXME mise en forme à prévoir ! + if (bLink && this.options.text) { + link.text = this.options.text; + } + var bImage = !!this.options.picto; + var image = null; + if (bImage) { + if (bLink) { + image = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.create("img", "", link); + } else { + image = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.DomUtil.create("img", "", container); + } + image.src = this.options.picto; + if (typeof this.options.size === "string") { + image.style.height = image.style.width = this.options.size; + } else { + image.style.height = this.options.size.height; + image.style.width = this.options.size.width; + } + } + return container; + } +}); +/* harmony default export */ __webpack_exports__["default"] = (Logo); + +/***/ }), +/* 129 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35); +/* harmony import */ var _LayerConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(130); +/* harmony import */ var _WMS__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(132); +/* harmony import */ var _WMTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(134); + + + + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__["default"].getLogger("layers"); + +/** + * Geoportal Layers Factory to be used together with Leaflet Maps. + * + * @module Layers + * @alias L.geoportalLayer + * @example + * var map = L.Map(...) ; + * var layer = L.geoportalLayer.WMTS({ + * layer : "ORTHOIMAGERY.ORTHOPHOTOS", + * }).addTo(map) ; + */ +/** @type {L.geoportalLayer} */ +var Layers = { + options: {}, + params: {}, + protocol: null, + serviceUrl: "http://localhost?no-rights-found-for=[{layer}]", + /** + * initialize options + */ + _initOptions: function _initOptions() { + if (!this.options || Object.keys(this.options).length === 0) { + throw new Error("PARAM_MISSING : options !"); + } + if (!this.options.layer) { + throw new Error("PARAM_MISSING : layer !"); + } + + // FIXME est ce utile de le preciser ? + if (!this.options.apiKey) { + logger.log("PARAM_MISSING : apiKey !"); + } + + // par defaut + if (typeof this.options.ssl === "undefined") { + this.options.ssl = true; + } + }, + /** + * get runtime context + */ + _initContext: function _initContext() { + // si ssl = false on fait du http + // par défaut, ssl = true, on fait du https + this.protocol = this.options.ssl === false ? "http://" : "https://"; + }, + /** + * initialize parameters + * + * @param {String} service - service name, WMS or WMTS + */ + _initParams: function _initParams(service) { + // par defaut... + if (!service) { + service = "WMTS"; + } + + // Récupération de la configuration + this.params = _LayerConfig__WEBPACK_IMPORTED_MODULE_2__["default"].get({ + key: this.options.apiKey, + layer: this.options.layer, + service: service + }); + if (!this.params || Object.keys(this.params).length === 0) { + this.params = {}; + if (!this.options.apiKey) { + // FIXME on retire l'exception... + logger.log("WARNING PARAM_MISSING : parameter 'apiKey' is mandatory if the contract key configuration has not been loaded !"); + } + } + }, + /** + * Factory function for Geoportal or INSPIRE WMS Layers creation. + * + * @method WMS + * @static + * @alias L.geoportalLayer.WMS + * @extends {L.TileLayer.WMS} + * + * @param {Object} options - options for function call. + * @param {String} options.layer - layer name (e.g. "ORTHOIMAGERY.ORTHOPHOTOS") + * @param {Boolean} [options.ssl] - if set true, enforce protocol https (only for nodejs) + * @param {String} [options.apiKey] - access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}. + * @param {Object} [settings] - other options for L.TileLayer.WMS function (see {@link http://leafletjs.com/reference.html#tilelayer-wms-options}) + * @param {Array} [settings.legends] - Overloads the default legends objects associated to the layer + * @param {Array} [settings.metadata] - Overloads the default Metadata objects associated to the layer + * @param {String} [settings.title] - Overloads the default title of the layer + * @param {String} [settings.description] - Overloads the default description of the layer + * @param {String} [settings.quicklookUrl] - Overloads the default quicklookUrl of the layer + * + * @returns {L.geoportalLayer.WMS} WMS layer + * + * @example + * var map = L.Map('divmap').setView(); + * var lyr = L.geoportalLayer.WMS( + * { + * layer : "OI.OrthoimageCoverage" + * }, + * { + * opacity : 1, + * transparent : true, + * minZoom : 1, + * maxZoom : 21 + * ... + * }); + * + * lyr.addTo(map); // ou map.addLayer(lyr); + */ + WMS: function WMS(options, settings) { + // gestion du logger + var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__["default"].getLogger("layers-wms"); + + /** options du plugins */ + this.options = options || {}; + + // gestion des options + this._initOptions(); + + /** options natives de Leaflet */ + this.settings = settings || {}; + + // env d'execution : browser ou non ? + this._initContext(); + + // Récupération de la configuration + this._initParams("WMS"); + logger.log(this.params); + + // url du service + var serviceUrl = null; + if (this.options.apiKey) { + // si une clé Api est fournie, on la prend pour construire l'url + serviceUrl = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.template("https://wxs.ign.fr/{key}/geoportail/r/wms", { + key: this.options.apiKey + }); + } else if (this.params.url) { + // sinon on prend la première clé disponible pour la couche dans la Config + serviceUrl = this.params.url; + } else { + // pas de Config, ni de clef API ! + // on évite l'exception en envoyant les requêtes vers localhost... + serviceUrl = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.template(this.serviceUrl, { + layer: this.options.layer + }); + } + + // params du service WMS (par defaut) + var paramsWms = { + layers: this.options.layer, + styles: this.params.styles || "normal", + format: this.params.format || "image/jpeg", + version: this.params.version || "1.3.0" + }; + + // options natives de leaflet (par defaut) + var paramsNative = { + // zoom level + minZoom: this.params.minZoom || 1, + maxZoom: this.params.maxZoom || 21 + }; + + // merge des options utilisateur pour le service WMS + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(paramsWms, this.settings); + // merge des options utilisateur aux options natives de leaflet + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(paramsNative, this.settings); + return new _WMS__WEBPACK_IMPORTED_MODULE_3__["default"](serviceUrl.replace(/(http|https):\/\//, this.protocol), { + paramsNative: paramsNative, + paramsWms: paramsWms, + originators: this.params.originators || this.settings.originators || [], + legends: this.settings.originators || this.params.legends || [], + metadata: this.settings.metadata || this.params.metadata || [], + title: this.settings.title || this.params.title || "", + description: this.settings.description || this.params.description || "", + quicklookUrl: this.settings.quicklookUrl || this.params.quicklookUrl || "" + }); + }, + /** + * Factory function for Geoportal WMTS Layers creation. + * + * @method WMTS + * @static + * @alias L.geoportalLayer.WMTS + * @extends {L.TileLayer} + * + * @param {Object} options - options for function call. + * @param {String} options.layer - layer name (e.g. "ORTHOIMAGERY.ORTHOPHOTOS") + * @param {Boolean} [options.ssl] - if set true, enforce protocol https (only for nodejs) + * @param {String} [options.apiKey] - free access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}. + * @param {Object} [settings] - other options for L.TileLayer function (see {@link http://leafletjs.com/reference.html#tilelayer-options}) + * + * @returns {L.geoportalLayer.WMTS} WMTS layer + * + * @example + * var map = L.Map('divmap').setView(); + * var lyr = L.geoportalLayer.WMTS( + * { + * layer : "ORTHOIMAGERY.ORTHOPHOTOS" + * }, + * { + * opacity : 1, + * transparent : true, + * minZoom : 1, + * maxZoom : 21 + * ... + * }); + * + * lyr.addTo(map); // ou map.addLayer(lyr); + */ + WMTS: function WMTS(options, settings) { + // gestion du logger + var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__["default"].getLogger("layers-wmts"); + + /** options du plugins */ + this.options = options || {}; + + // gestion des options + this._initOptions(); + + /** options natives de Leaflet */ + this.settings = settings || {}; + + // env d'execution : browser ou non ? + this._initContext(); + + // Récupération de la configuration + this._initParams("WMTS"); + logger.log(this.params); + + // url du service + var serviceUrl = null; + if (this.options.apiKey) { + // si une clé Api est fournie, on la prend pour construire l'url + serviceUrl = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.template("https://wxs.ign.fr/{key}/geoportail/wmts", { + key: this.options.apiKey + }); + } else if (this.params.url) { + // sinon on prend la première clé disponible pour la couche dans la Config + serviceUrl = this.params.url; + } else { + // pas de Config, ni de clef API ! + // on évite l'exception en envoyant les requêtes vers localhost... + serviceUrl = leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.template(this.serviceUrl, { + layer: this.options.layer + }); + } + + // params du service WMTS (par defaut) + var paramsWmts = { + layer: this.options.layer, + style: this.params.styles || "normal", + format: this.params.format || "image/jpeg", + version: this.params.version || "1.0.0", + tilematrixset: this.params.TMSLink || "PM" + }; + + // options natives de leaflet (par defaut) + // minZoom : 0 + // maxZoom : 18 + // tileSize : 256 + // subdomains : 'abc' + // errorTileUrl : '' + // attribution : '' + // zoomOffset : 0 + // opacity : 1 + + var paramsNative = { + // zoom level + minZoom: this.params.minZoom || 1, + maxZoom: this.params.maxZoom || 21 + }; + + // merge des options utilisateur pour le service WMTS + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(paramsWmts, this.settings); + // merge des options utilisateur aux options natives de leaflet + leaflet__WEBPACK_IMPORTED_MODULE_0___default.a.Util.extend(paramsNative, this.settings); + return new _WMTS__WEBPACK_IMPORTED_MODULE_4__["default"](serviceUrl.replace(/(http|https):\/\//, this.protocol), { + paramsNative: paramsNative, + paramsWmts: paramsWmts, + originators: this.params.originators || this.settings.originators || [], + legends: this.settings.originators || this.params.legends || [], + metadata: this.settings.metadata || this.params.metadata || [], + title: this.settings.title || this.params.title || "", + description: this.settings.description || this.params.description || "", + quicklookUrl: this.settings.quicklookUrl || this.params.quicklookUrl || "" + }); + } +}; +/* harmony default export */ __webpack_exports__["default"] = (Layers); + +/***/ }), +/* 130 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35); +/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(113); +/* harmony import */ var _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(131); + + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("layer-config"); + +/** + * @classdesc + * + * Configuration des couches Geoportail via l'appel de la configuration. + * @private + */ +var LayerConfig = { + /** + * options : key, layer, service + * + * @param {Object} options - options + * + * @returns {Object} layer parameters + */ + get: function get(options) { + var params = {}; + if (!_Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__["default"].isConfigLoaded()) { + logger.warn("WARNING CONFIG_FAILED : config not loaded ?!"); + return; + } + + // gestion des parametres + params = _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_1__["default"].configuration.getLayerParams(options.layer, options.service); + if (!params || Object.keys(params).length === 0) { + logger.warn("WARNING CONFIG_FAILED : params not found ?!"); + return; + } + + // gestion des zoom + params.minZoom = _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_2__["default"].getZoomLevelFromScaleDenominator(params.maxScale) || 1; + params.maxZoom = _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_2__["default"].getZoomLevelFromScaleDenominator(params.minScale) || 21; + return params; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (LayerConfig); + +/***/ }), +/* 131 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** +* @module LayerUtils +* @alias Gp.LayerUtils +* @description +* ... +* +* @example +* getZoomLevelFromScaleDenominator(); +* getAttributions(); +* intersects(); +*/ +var LayerUtils = { + /** + * Obtenir le ZoomLevel à partir du ScaleDenominator + * @function getZoomLevelFromScaleDenominator + * @param {Number} scaleDenominator - the scale denominator + * @param {String} crs - the crs + * + * @returns {Integer} zoom level + */ + getZoomLevelFromScaleDenominator: function getZoomLevelFromScaleDenominator(scaleDenominator, crs) { + // ------------------------------------------------- // + // Code issu de l'API Geoportal/Catalogue/Config.js // + // ------------------------------------------------- // + // var configuration = Gp.Config; + // var general = configuration.generalOptions; + // var layers = configuration.layersContext; + // + // for (var tms in general.tileMatrixSets) { + // var tileMatrixSet = general.tileMatrixSets[tms]; + // // IGN's WMTS bug : epsg:nnnn instead of EPSG:nnnn + // var crs = tileMatrixSet.supportedCRS = tileMatrixSet.supportedCRS.replace(/epsg/,"EPSG"); + // + // if (!Geoportal.Catalogue.CRSRESOLUTIONS.hasOwnProperty(crs)) { + // var p= new OpenLayers.Projection(crs); + // Geoportal.Catalogue.CRSRESOLUTIONS[crs]= []; + // var matrixIds= tileMatrixSet.matrixIds; + // for (var i= 0, li= matrixIds.length; i} params.extent - map current geographical extent (EPSG:4326) : [top, left, bottom, right] = [maxy, minx, miny, maxx] + * @param {Number} params.zoom - map current zoom + * @param {String} params.crs - map current projection code (ex "EPSG:2154") + * @param {Boolean} params.visibility - layer visibility + * @param {Gp.Services.Config.Originator} params.originators - resource originators (from Gp.Config.layers[].originators) + * @returns {Object} attributions - associative array, mapping originators url (keys) with their properties : html attributions elements + */ + getAttributions: function getAttributions(params) { + var zoom = params.zoom; + var attributions = []; + if (params.originators != null && params.visibility) { + // drawLogo = boolean, true if attribution should be displayed (zoom, extent), false otherwise + var drawLogo; + for (var j = 0, jl = params.originators.length; j < jl; j++) { + drawLogo = true; + var originator = params.originators[j]; + var constraints = params.originators[j].constraints || []; + for (var k = 0, kl = constraints.length; k < kl; k++) { + var constraint = constraints[k]; + drawLogo = true; + var minZoomLevel = this.getZoomLevelFromScaleDenominator(constraint.maxScaleDenominator, params.crs); + var maxZoomLevel = this.getZoomLevelFromScaleDenominator(constraint.minScaleDenominator, params.crs) || 21; + + // min zoom constraints + if (minZoomLevel && minZoomLevel > zoom) { + drawLogo = false; + } + + // max zoom constraints + if (drawLogo && maxZoomLevel && maxZoomLevel < zoom) { + drawLogo = false; + } + + // bbox constraints + var bbox = constraint.bbox; + if (drawLogo && bbox) { + drawLogo = false; + var viewExtent = params.extent; + if (viewExtent) { + var bounds = [bbox.top, bbox.left, bbox.bottom, bbox.right]; + if (this.intersects(viewExtent, bounds)) { + // at least one constraint matches the map ones + drawLogo = true; + break; + } + } + } + } + if (drawLogo) { + // on a un originator qui correspond au zoom et à l'étendue. + + var logo = originator.logo; + var url = originator.url; + var name = originator.name ? originator.name : ""; + var text = originator.attribution; + var container = document.createElement("div"); + container.className = "gp-control-attribution"; + + // on crée un lien dans tous les cas (même s'il ne pointe pas vers une référence), pour avoir accès à la class CSS (pour surcharge) + var link = null; + link = document.createElement("a"); + link.className = "gp-control-attribution-link"; + link.target = "_blank"; + container.appendChild(link); + if (url) { + link.href = url; + } + var bImage = !!logo; + var image = null; + // si on a un logo, on l'affiche à l'interieur du lien + if (bImage) { + image = document.createElement("img"); + if (link) { + image.className = "gp-control-attribution-image"; + link.appendChild(image); + } else { + image.className = ""; + container.appendChild(image); + } + image.src = logo; + image.title = text || name; + image.style.height = "30px"; + image.style.width = "30px"; + } else { + // sinon, on affiche le nom de l'originator, ou sa description ou l'url. + if (name) { + link.textContent = name; + } else if (text) { + link.textContent = text; + } else if (url) { + link.textContent = url; + } else { + link.textContent = ""; + } + } + attributions.push(container.innerHTML + " "); + } + } + } + return attributions; + }, + /** + * Determines if one extent (extent1) intersects another (extent2) + * + * @function intersects + * @param {Array.} extent1 - First extent : [top, left, bottom, right] = [maxy, minx, miny, maxx] + * @param {Array.} extent2 - Second extent : [top, left, bottom, right] = [maxy, minx, miny, maxx] + * @return {Boolean} intersects - True if the two extents intersect, false otherwise. + */ + intersects: function intersects(extent1, extent2) { + var intersectsX = extent1[1] <= extent2[3] && extent2[1] <= extent1[3]; + var intersectsY = extent1[2] <= extent2[0] && extent2[2] <= extent1[0]; + return intersectsX && intersectsY; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (LayerUtils); + +/***/ }), +/* 132 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35); +/* harmony import */ var _LayerEvent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(133); +/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1); +var _package_json__WEBPACK_IMPORTED_MODULE_4___namespace = /*#__PURE__*/__webpack_require__.t(1, 1); +/** +* desativation JSHINT +* W106 - Identifier '_geoportal_id' is not in camel case +*/ +/* jshint -W106 */ + + + + + +// package.json (extract version) + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__["default"].getLogger("wms"); + +/** + * @namespace + * @alias L.geoportalLayers.WMS + * @classdesc + * + * Leaflet Layer Class for Geoportal or INSPIRE WMS Layers. + * + * Use {@link module:Layers.WMS L.geoportalLayer.WMS()} factory to create instances of that class. + * + * **Extends** Leaflet L.TileLayer.WMS native class. + * + */ +var WMS = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.WMS.extend( /** @lends WMS.prototype */{ + includes: _LayerEvent__WEBPACK_IMPORTED_MODULE_3__["default"], + /** + * + * @constructor + * @param {String} url - url service + * @param {Object} options - options for function call. + * @param {Array} [options.originators] - originators + * @param {Array} [options.legends] - legends + * @param {Array} [options.metadata] - metadata + * @param {String} [options.title] - title + * @param {String} [options.description] - description + * @param {String} [options.quicklookUrl] - quicklookUrl + * @param {Object} options.paramsWms - WMS options + * @param {String} options.paramsWms.layers - eg "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO", + * @param {String} options.paramsWms.styles - "normal", + * @param {String} options.paramsWms.format - "image/jpeg", + * @param {String} options.paramsWms.version - "1.3.0" + * @param {Object} [options.paramsNative] - other options for L.TileLayer.WMS function (see {@link http://leafletjs.com/reference.html#tilelayer-wms-options}) + * @example + * var wms = new WMS("http://wxs.ign.fr/jhyvi0fgmnuxvfv0zjzorvdn/geoportail/r/wms", { + * paramsNative : { + * minZoom : 1, + * maxZoom : 21 + * }, + * paramsWms : { + * layers : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO", + * styles : "normal", + * format : "image/jpeg", + * version : "1.3.0" + * }, + * originators : [], + * legends : [], + * metadata : [], + * title : "", + * description : "", + * quicklookUrl : "" + * }); + * + * @ignore + */ + initialize: function initialize(url, options) { + var settings = {}; + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(settings, options.paramsWms, options.paramsNative); + + // appel du constructeur de la classe étendue + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.WMS.prototype.initialize.call(this, + // tracker extension leaflet + // FIXME : gp-ext version en mode AMD + geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__["default"].Helper.normalyzeUrl(url, { + "gp-leaflet-ext": _package_json__WEBPACK_IMPORTED_MODULE_4__.leafletExtVersion || _package_json__WEBPACK_IMPORTED_MODULE_4__.version + }, false), settings); + + // sauvegarde + this._originators = options.originators; + this._legends = options.legends; + this._metadata = options.metadata; + this._title = options.title; + this._description = options.description; + this._quicklookUrl = options.quicklookUrl; + + // init id du Layer + this._geoportal_id = 0; // FIXME L.stamp(this); + }, + + /** + * event + * (overwritten) + * + * @param {Object} map - map leaflet object + * @private + */ + onAdd: function onAdd(map) { + logger.trace("onAdd layer", this._geoportal_id); + + // recuperation de la map + this._map = map; + + // enregistrement de l'id Geoportal + this._geoportal_id = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.stamp(this); + + // appel de la methode de la classe étendue + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.WMS.prototype.onAdd.call(this, map); + this.setVisible(true); + + // y a t il des attributions/originators pour ce layer ? + this.updateAttributions(map); + + /** + * Evenement sur l'ajout du layer sur la carte avec gestion des deplacements (zoom) + * Les deplacemnts sur la carte permettent de mettre à jour la liste des attributions. + */ + map.on({ + /** + * Permet de desactiver la visibilité des attributions sur le retrait + * d'un layer de type overlay. + * Les attributions ne doivent plus apparaitre si le layer est invisible ! + * @private + */ + overlayremove: this._onRemoveLayer, + /** + * Permet d'activer la visibilité des attributions sur l'ajout + * d'un layer de type overlay. + * Les attributions doivent apparaitre si le layer est visible ! + * @private + */ + overlayadd: this._onAddLayer, + /** + * Permet de desactiver la visibilité des attributions sur le retrait + * d'un layer de type layer. + * Les attributions ne doivent plus apparaitre si le layer est invisible ! + * @private + */ + layerremove: this._onRemoveLayer, + /** + * Permet d'activer la visibilité des attributions sur l'ajout + * d'un layer de type layer. + * Les attributions doivent apparaitre si le layer est visible ! + * @private + */ + layeradd: this._onAddLayer, + /** + * Permet d'ajouter des fonctionnalités lors de la creation du layer + * sur les evenements de fin de mouvemenent (move ou zoom) + * @private + */ + moveend: this._onMoveEndLayer + }, this); + + // if (map.attributionControl) { + // + // // ceci permet de mofifier le prefixe leaflet ! + // // ce dernier etant obligatoire... + // // Ex. map.attributionControl.setPrefix("Plugin © IGN with Leaflet - 2016"); + // // map.attributionControl.setPrefix("Leaflet + Géoportail"); + // map.attributionControl.setPrefix("Plugin © " + + // "IGN" + + // " with " + + // "Leaflet" + + // " - 2016"); + // } + }, + + /** + * event + * (overwritten) + * + * @param {Object} map - map leaflet object + * @private + */ + onRemove: function onRemove(map) { + logger.trace("onRemove layer", this._geoportal_id); + + // recuperation de la map + this._map = map; + + // appel de la methode de la classe étendue + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.prototype.onRemove.call(this, map); + this.setVisible(false); + + // suppression des attributions + this.removeAttributions(map); + + // supprimer les evenements + map.off({ + overlayremove: this._onRemoveLayer, + overlayadd: this._onAddLayer, + layerremove: this._onRemoveLayer, + layeradd: this._onAddLayer, + moveend: this._onMoveEndLayer + }, this); + }, + /** + * event + * (overwritten) + * + * @param {Object} tilePoint - Point object + * + * @returns {String} url + * @private + */ + getTileUrl: function getTileUrl(tilePoint) { + // (Point, Number) -> String + + // FIXME + // on surcharge cette methode à cause d'un BUG Leaflet sur l'inversion de + // coordonnées sur les codes EPSG en geographiques en WMS 1.3.0. + // En attente de resolution du ticket suivant : + // Axis option for crs, Issue 4253 on Leaflet/Leaflet + // https://github.com/Leaflet/Leaflet/issues/4253 + + var lstProjEpsgGeographic = ["EPSG:4326"]; // ex. "EPSG:4641" + + var map = this._map; + var tileSize = this.options.tileSize; + var nwPoint = tilePoint.multiplyBy(tileSize); + var sePoint = nwPoint.add([tileSize, tileSize]); + var nw = this._crs.project(map.unproject(nwPoint, tilePoint.z)); + var se = this._crs.project(map.unproject(sePoint, tilePoint.z)); + var bbox = this._wmsVersion >= 1.3 && lstProjEpsgGeographic.indexOf(this._crs.code) !== -1 ? [se.y, nw.x, nw.y, se.x].join(",") : [nw.x, se.y, se.x, nw.y].join(","); + var url = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.template(this._url, { + s: this._getSubdomain(tilePoint) + }); + return url + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.getParamString(this.wmsParams, url, true) + "&BBOX=" + bbox; + } +}); +/* harmony default export */ __webpack_exports__["default"] = (WMS); + +/***/ }), +/* 133 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35); +/* harmony import */ var _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(131); + + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("layer-event"); + +/** + * @classdesc + * + * Evenement sur les couches Geoportail + * @private + */ +/** @type {LayerEvent} */ +var LayerEvent = { + _id: null, + _attributions: [], + _visibility: true, + _originators: [], + /** + * activation du controle attribution + * + * @param {Object} map - the map + * + * @return {Boolean} attribution controle is enable + */ + isEnable: function isEnable(map) { + if (!map.attributionControl) { + return false; + } + return true; + }, + /** + * visibilité de la couche + * + * @param {Boolean} visibility - true|false + */ + setVisible: function setVisible(visibility) { + logger.log("visibility", visibility); + this._visibility = visibility; + this.fire("visibilitychange"); + }, + /** + * visibilité de la couche + * + * @returns {Boolean} visibility + */ + getVisible: function getVisible() { + return this._visibility; + }, + /** + * fonction de suppresion d'un layer du controle des layers + * + * @param {Object} e - event + */ + _onRemoveLayer: function _onRemoveLayer(e) { + logger.trace("onRemove event", e); + if (e.layer._geoportal_id !== this._geoportal_id) { + return; + } + // attributions non visibles + this.setVisible(false); + }, + /** + * fonction d'ajout d'un layer du controle des layers + * + * @param {Object} e - event + */ + _onAddLayer: function _onAddLayer(e) { + logger.trace("onAdd event", e); + if (e.layer._geoportal_id !== this._geoportal_id) { + return; + } + // attributions visibles + this.setVisible(true); + }, + /** + * fonction de deplacement d'un layer + * + * @param {Object} e - event + */ + _onMoveEndLayer: function _onMoveEndLayer(e) { + logger.trace("moveend event", e); + // mise à jour des attributions + this.updateAttributions(this._map, this); + }, + /** + * updateAttributions + * + * @param {Object} map - the map + */ + updateAttributions: function updateAttributions(map) { + // FIXME on peut realiser une mise à jour plus intelligente que cette manière brutale... + // Ex. mise en place de la notion 'hidden' de l'originators à desactiver + + if (!this.isEnable(map)) { + return; + } + this.removeAttributions(map); + this.addAttributions(map); + this.fire("attributionchange"); + }, + /** + * removeAttributions + * + * @param {Object} map - the map + */ + removeAttributions: function removeAttributions(map) { + logger.trace("removeAttributions...", this._geoportal_id); + // suppression des attributions + // L.Map utilise la methode getAttribution() du layer. + // La construction concerne le layer courant. + // Cet evenement declenche la construction des attributions + + if (!this.isEnable(map)) { + return; + } + for (var i = 0; i < this._attributions.length; i++) { + map.attributionControl.removeAttribution(this._attributions[i]); + } + + // suppression des attributions de liste + this._attributions = []; + }, + /** + * addAttributions + * + * @param {Object} map - the map + */ + addAttributions: function addAttributions(map) { + logger.trace("addAttributions...", this._geoportal_id); + // on interroge les originators en options pour obtenir les infos + // suivantes : + // - echelles + // - contraintes d'emprise + // - information sur le(s) proprietaire(s) du layer + // - ... + // mais on a besoin de qq informations sur la carte tels que : + // - zoom + // - bounds + // - ... + + if (!this.isEnable(map)) { + return; + } + + // ajout des attributions + var topLeft = map.getBounds().getNorthWest(); + var bottomRight = map.getBounds().getSouthEast(); + var arrayBounds = [topLeft.lat, topLeft.lng, bottomRight.lat, bottomRight.lng]; + var params = { + extent: arrayBounds, + // map.getBounds(), + zoom: map.getZoom(), + originators: this._originators, + visibility: this._visibility + }; + logger.log(params); + var attributionsOriginators = _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_1__["default"].getAttributions(params); + logger.log(attributionsOriginators); + if (attributionsOriginators && attributionsOriginators.length !== 0) { + // on les ajoute dans la liste + // et on ajoute les attributions dans le controle Leaflet "L.Control.Attribution" + for (var i = 0; i < attributionsOriginators.length; i++) { + this._attributions.push(attributionsOriginators[i]); + map.attributionControl.addAttribution(attributionsOriginators[i]); + } + } + } +}; +/* harmony default export */ __webpack_exports__["default"] = (LayerEvent); + +/***/ }), +/* 134 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); +/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35); +/* harmony import */ var _LayerEvent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(133); +/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1); +var _package_json__WEBPACK_IMPORTED_MODULE_4___namespace = /*#__PURE__*/__webpack_require__.t(1, 1); +/** +* desativation JSHINT +* W106 - Identifier '_geoportal_id' is not in camel case +*/ + + + + + +// package.json (extract version) + +var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__["default"].getLogger("wmts"); + +/** + * @namespace + * @alias L.geoportalLayers.WMTS + * @classdesc + * + * Leaflet Layer Class for Geoportal WMTS Layers. + * + * Use {@link module:Layers.WMTS L.geoportalLayer.WMTS()} factory to create instances of that class. + * + * **Extends** Leaflet L.TileLayer native class. + * + */ +var WMTS = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.extend( /** @lends WMTS.prototype */{ + includes: _LayerEvent__WEBPACK_IMPORTED_MODULE_3__["default"], + defaultWmtsParams: { + service: "WMTS", + request: "GetTile", + version: "1.0.0", + layer: "", + style: "", + tilematrixset: "PM", + format: "image/jpeg" + }, + /** + * + * @constructor + * @param {String} url - url service + * @param {Object} options - options for function call. + * @param {Array} [options.originators] - originators + * @param {Array} [options.legends] - legends + * @param {Array} [options.metadata] - metadata + * @param {String} [options.title] - title + * @param {String} [options.description] - description + * @param {String} [options.quicklookUrl] - quicklookUrl + * @param {Object} options.paramsWmts - WMTS options + * @param {String} options.paramsWmts.service - "WMTS", + * @param {String} options.paramsWmts.request - "GetTile", + * @param {String} options.paramsWmts.version - "1.0.0", + * @param {String} options.paramsWmts.layer - "", + * @param {String} options.paramsWmts.style - "", + * @param {String} options.paramsWmts.tilematrixset - "PM", + * @param {String} options.paramsWmts.format - "image/jpeg" + * @param {Object} [options.paramsNative] - other options for L.TileLayer function (see {@link http://leafletjs.com/reference.html#tilelayer-options}) + * @example + * var wmts = new WMTS("http://wxs.ign.fr/jhyvi0fgmnuxvfv0zjzorvdn/geoportail/wmts", { + * paramsNative : { + * minZoom : 1, + * maxZoom : 21 + * }, + * paramsWmts : { + * layer : "ORTHOIMAGERY.ORTHOPHOTOS", + * style : "normal", + * format : "image/jpeg", + * version : "1.0.0", + * tilematrixset : "PM" + * }, + * originators : [], + * legends : [], + * metadata : [], + * title : "", + * description : "", + * quicklookUrl : "" + * }); + * + * @ignore + */ + initialize: function initialize(url, options) { + logger.log("initialize"); + + // parametres WMTS + this._wmtsParams = {}; + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.extend(this._wmtsParams, this.defaultWmtsParams, options.paramsWmts); + + // appel du constructeur de la classe étendue + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.prototype.initialize.call(this, + // tracker extension leaflet + // FIXME : gp-ext version en mode AMD + geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__["default"].Helper.normalyzeUrl(url, { + "gp-leaflet-ext": _package_json__WEBPACK_IMPORTED_MODULE_4__.leafletExtVersion || _package_json__WEBPACK_IMPORTED_MODULE_4__.version + }, false), options.paramsNative); + + // sauvegarde des originators + this._originators = options.originators; + this._legends = options.legends; + this._metadata = options.metadata; + this._title = options.title; + this._description = options.description; + this._quicklookUrl = options.quicklookUrl; + + // id du Layer + this._geoportal_id = 0; // FIXME L.stamp(this); + }, + + /** + * event 'onAdd' + * (overwritten) + * + * @param {Object} map - map leaflet object + * @private + */ + onAdd: function onAdd(map) { + logger.trace("onAdd layer", this._geoportal_id); + + // recuperation de la map + this._map = map; + + // enregistrement de l'id Geoportal + this._geoportal_id = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.stamp(this); + + // appel de la methode de la classe étendue + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.prototype.onAdd.call(this, map); + this.setVisible(true); + + // y a t il des attributions/originators pour ce layer ? + this.updateAttributions(map); + + /** + * Evenement sur l'ajout du layer sur la carte avec gestion des deplacements (zoom) + * Les deplacemnts sur la carte permettent de mettre à jour la liste des attributions. + */ + map.on({ + /** + * Permet de desactiver la visibilité des attributions sur le retrait + * d'un layer de type overlay. + * Les attributions ne doivent plus apparaitre si le layer est invisible ! + * @private + */ + overlayremove: this._onRemoveLayer, + /** + * Permet d'activer la visibilité des attributions sur l'ajout + * d'un layer de type overlay. + * Les attributions doivent apparaitre si le layer est visible ! + * @private + */ + overlayadd: this._onAddLayer, + /** + * Permet de desactiver la visibilité des attributions sur le retrait + * d'un layer de type layer. + * Les attributions ne doivent plus apparaitre si le layer est invisible ! + * @private + */ + layerremove: this._onRemoveLayer, + /** + * Permet d'activer la visibilité des attributions sur l'ajout + * d'un layer de type layer. + * Les attributions doivent apparaitre si le layer est visible ! + * @private + */ + layeradd: this._onAddLayer, + /** + * Permet d'ajouter des fonctionnalités lors de la creation du layer + * sur les evenements de fin de mouvemenent (move ou zoom) + * @private + */ + moveend: this._onMoveEndLayer + }, this); + + // if (map.attributionControl) { + // // ceci permet de mofifier le prefixe leaflet ! + // // ce dernier etant obligatoire... + // // Ex. map.attributionControl.setPrefix("Plugin © IGN with Leaflet - 2016"); + // // map.attributionControl.setPrefix("Leaflet + Géoportail"); + // map.attributionControl.setPrefix("Plugin © " + + // "IGN" + + // " with " + + // "Leaflet" + + // " - 2016"); + // } + }, + + /** + * event 'onRemove' + * (overwritten) + * + * @param {Object} map - map leaflet object + * @private + */ + onRemove: function onRemove(map) { + logger.trace("onRemove layer", this._geoportal_id); + + // recuperation de la map + this._map = map; + + // appel de la methode de la classe étendue + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.TileLayer.prototype.onRemove.call(this, map); + this.setVisible(false); + + // suppression des attributions + this.removeAttributions(map); + + // supprimer les evenements + map.off({ + overlayremove: this._onRemoveLayer, + overlayadd: this._onAddLayer, + layerremove: this._onRemoveLayer, + layeradd: this._onAddLayer, + moveend: this._onMoveEndLayer + }, this); + }, + /** + * event 'getTileUrl' + * (overwritten) + * + * @param {Object} tilePoint - Point leaflet object + * + * @returns {String} url + * @private + */ + getTileUrl: function getTileUrl(tilePoint) { + // (Point, Number) -> String + + // ex http://wxs.ign.fr/j5tcdln4ya4xggpdu4j0f0cn/geoportail/wmts? + // SERVICE=WMTS& + // REQUEST=GetTile& + // VERSION=1.0.0& + // LAYER=ORTHOIMAGERY.ORTHOPHOTOS& + // STYLE=normal& + // TILEMATRIXSET=PM& + // TILEMATRIX=2& + // TILEROW=2& + // TILECOL=1& + // FORMAT=image%2Fjpeg + + var zoom = this._getZoomForUrl(); + var url = leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.template(this._url, { + s: this._getSubdomain(tilePoint) + }); + return url + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.Util.getParamString(this._wmtsParams, url) + "&tilematrix=" + zoom + "&tilerow=" + tilePoint.y + "&tilecol=" + tilePoint.x; + }, + /** + * event 'setParams' + * (overwritten) + * + * @param {Object} params - parameters + * @param {Object} noRedraw - no redraw + * + * @returns {Object} this + * @private + */ + setParams: function setParams(params, noRedraw) { + leaflet__WEBPACK_IMPORTED_MODULE_1___default.a.extend(this._wmtsParams, params); + if (!noRedraw) { + this.redraw(); + } + return this; + } +}); +/* harmony default export */ __webpack_exports__["default"] = (WMTS); + +/***/ }), +/* 135 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); + +(function () { + var scripts = document.getElementsByTagName("script"); + var key = scripts[scripts.length - 1].getAttribute("data-key"); + var url = scripts[scripts.length - 1].getAttribute("data-url"); + var timeout = scripts[scripts.length - 1].getAttribute("data-timeout"); + + // callback + var success = function success() { + // Pas de messages en mode prod + // console.log("GetConfig success!"); + }; + + // callback + var error = function error(e) { + throw new Error("Configuration load failed : " + e.message); + }; + if (!key && !url) { + // pas de message d'information ! + // console.log("WARNING : parameters missing 'data-key' and 'data-url', the loading of configuration can not be done !"); + return; + } + var options = { + apiKey: key, + sync: true, + onSuccess: success, + onFailure: error + }; + if (url) { + options.customConfigFile = url; + options.callbackSuffix = ""; + } + if (timeout) { + options.timeOut = timeout; + } + + // test d'existance de la varibale globale Gp.Config + if (!window.Gp) { + // appel du service + geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__["default"].Services.getConfig(options); + } +})(); + +/***/ }), +/* 136 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35); + + +/** +* @module ProxyUtils +* @alias Gp.ProxyUtils +* @description +* ... +* +* @example +* proxifyUrl(); +*/ +var ProxyUtils = { + /** + * Ajoute un proxy aux url des couches vecteurs si besoin. + * + * @function proxifyUrl + * @param {String} url - Url to proxify. + * @param {Object} [proxyOptions] - Object defining proxy options. + * @param {String} proxyOptions.proxyUrl - Proxy URL. + * @param {Array.} [proxyOptions.noProxyDomains] - Proxy will not be used for this list of domain names. + * + * @returns {String} proxy url + */ + proxifyUrl: function proxifyUrl(url, proxyOptions) { + // logger + + var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("proxifyUrl"); + if (!proxyOptions || !proxyOptions.hasOwnProperty("proxyUrl") || proxyOptions.proxyUrl === null || proxyOptions.proxyUrl.trim().length === 0) { + return url; + } + // on regarde si l'url nest pas dans les domaines sans proxy + if (proxyOptions.noProxyDomains && Array.isArray(proxyOptions.noProxyDomains) && proxyOptions.noProxyDomains.length > 0) { + for (var i in proxyOptions.noProxyDomains) { + logger.trace("[ProxyUtils] proxifyUrl : analyzing " + proxyOptions.noProxyDomains[i]); + if (url.indexOf(proxyOptions.noProxyDomains[i]) !== -1) { + logger.info("[ProxyUtils] proxifyUrl : " + url + " found in noProxyDomains list (" + proxyOptions.noProxyDomains[i] + ")."); + return url; + } + } + } + return proxyOptions.proxyUrl + encodeURIComponent(url); + } +}; +/* harmony default export */ __webpack_exports__["default"] = (ProxyUtils); + +/***/ }), +/* 137 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ColorUtils + * @alias Gp.ColorUtils + * @description + * ... + * + * @example + * arrayTorgba(); + * arrayToHex(); + * rgbaToHex(); + * hexToRgba(); + * isHex(); + * isRGB(); + */ +var ColorUtils = { + /** + * Number to hex conversion + * + * @param {Number} number - 0-255 + * @returns {String} hex value + */ + hex: function hex(number) { + if (number > 255) { + throw new Error("'" + number + "'' is greater than 255(0xff);"); + } + var str = Number(number).toString(16); + return ("0" + str).slice(-2); + }, + /** + * Hexa to number conversion + * + * @param {*} hexa 00-FF + * @returns {Number} number value + */ + num: function num(hexa) { + return parseInt(hexa, 16); + }, + /** + * Converts an array ([255,255,255,1]) to rgba string + * + * @function arrayToRgba + * @param {Array} values - array of values + * @returns {String} A color of RGB or RGBA format + */ + arrayToRgba: function arrayToRgba(values) { + if (!Array.isArray(values)) { + throw new Error("Not an array !"); + } + var red = values[0]; + var green = values[1]; + var blue = values[2]; + var alpha = values[3] || 1; + var result = "rgba(" + red + ", " + green + ", " + blue + ", " + parseFloat(alpha) + ")"; + return result; + }, + /** + * Converts an array ([255,255,255,1]) to #RRGGBBAA + * + * @function arrayToHex + * @param {Array} values - array of values + * @returns {Object} hex and opacity formated values + */ + arrayToHex: function arrayToHex(values) { + if (!Array.isArray(values)) { + throw new Error("Not an array !"); + } + var red = values[0]; + var green = values[1]; + var blue = values[2]; + var alpha = values[3]; + var elems = [this.hex(red), this.hex(green), this.hex(blue)]; + var result = {}; + result.hex = "#" + elems.join(""); + if (alpha) { + // elems.push(hex(alpha)); + result.opacity = parseFloat(alpha); + } + return result; + }, + /** + * Converts rgba string to #RRGGBBAA + * (Code adapted from : https://gist.github.com/mstssk/afda4ce9e5c335fd79cd) + * + * @function rgbaToHex + * @param {String} rgba - A color of RGB or RGBA format. + * @returns {Object} hex and opacity formated values + */ + rgbaToHex: function rgbaToHex(rgba) { + var regex = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/; + var parsed = regex.exec(rgba); + if (!parsed) { + throw new Error("Invalid format: " + rgba); + } + var red = parsed[1]; + var green = parsed[2]; + var blue = parsed[3]; + var alpha = parsed[4]; + var elems = [this.hex(red), this.hex(green), this.hex(blue)]; + var result = {}; + result.hex = "#" + elems.join(""); + if (alpha) { + // elems.push(hex(alpha)); + result.opacity = parseFloat(alpha); + } + return result; + }, + /** + * Converts hex color and opacity value to rgba string. + * (Code adapted from : http://stackoverflow.com/a/5624139) + * + * @function hexToRgba + * @param {String} hex - A color value on RGB format (hexa). + * @param {Number} opacity - A opacity value. + * @returns {String} A color of RGB or RGBA format + */ + hexToRgba: function hexToRgba(hex, opacity) { + // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF") + var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; + if (!hex) { + throw new Error("Invalid format"); + } + hex = hex.replace(shorthandRegex, function (m, r, g, b) { + return r + r + g + g + b + b; + }); + var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + rgb = rgb ? { + r: parseInt(rgb[1], 16), + g: parseInt(rgb[2], 16), + b: parseInt(rgb[3], 16) + } : null; + var result = rgb ? "rgba(" + rgb.r + ", " + rgb.g + ", " + rgb.b + ", " + opacity + ")" : null; + return result; + }, + /** + * Determine if value is a correct hexa color. + * @param {*} value - hex color (#FFFFFF) + * @returns {Boolean} True if value is a hexa color + */ + isHex: function isHex(value) { + if (!value) { + return false; + } + if (value.charAt(0) !== "#") { + return false; + } + var regex = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i; + var parsed = regex.exec(value); + if (!parsed) { + return false; + } + return true; + }, + /** + * Determine if value is a correct rgba color. + * @param {*} value - rgba color (rgba(125,125,125,1)) + * @returns {Boolean} True if value is a rgba color + */ + isRGB: function isRGB(value) { + if (!value) { + return false; + } + var regex = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/; + var parsed = regex.exec(value); + if (!parsed) { + return false; + } + return true; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (ColorUtils); + +/***/ }) +/******/ ]); +}); \ No newline at end of file diff --git a/leaflet-2.3.4/dist/GpPluginLeaflet.css b/leaflet-2.3.4/dist/GpPluginLeaflet.css new file mode 100644 index 000000000..9eac3034f --- /dev/null +++ b/leaflet-2.3.4/dist/GpPluginLeaflet.css @@ -0,0 +1,88 @@ +/*! + * @brief French Geoportal Extension for Leaflet + * + * This software is released under the licence CeCILL-B (Free BSD compatible) + * @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt + * @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt + * @see http://www.cecill.info/ + * + * @copyright copyright (c) IGN + * @license CeCILL-B + * @author IGN + * @version 2.3.4 + * @date 30/08/2023 + * + */ + +/*! + * @overview Proj4Leaflet - Smooth Proj4js integration with Leaflet + * @copyright Copyright (c) 2012, Kartena AB + * @license BSD 2-Clause "Simplified" License + * See https://raw.githubusercontent.com/kartena/Proj4Leaflet/master/LICENSE + * @version 1.0.2 + */ + +/*! + * @overview leaflet-draw - Vector drawing and editing plugin for Leaflet + * @copyright Copyright (c) 2012-2017 Jon West, Jacob Toye, and Leaflet + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/Leaflet/Leaflet.draw/master/MIT-LICENSE.md + * @version 1.0.4 + */ + +/*! + * Sortable -- JavaScript library for reorderable drag-and-drop lists on modern + * browsers and touch devices. No jQuery required. Supports Meteor, AngularJS, + * React, Polymer, Vue, Knockout and any CSS library, e.g. Bootstrap. + * + * Released under MIT LICENSE + * + * Copyright Lebedev Konstantin + * https://github.com/SortableJS/Sortable + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * @version 1.14.0 + */ + +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.4 + */ + +/*! + * @overview Proj4js - Javascript reprojection library. + * + * @authors + * - Mike Adair madairATdmsolutions.ca + * - Richard Greenwood richATgreenwoodmap.com + * - Didier Richard didier.richardATign.fr + * - Stephen Irons stephen.ironsATclear.net.nz + * - Olivier Terral oterralATgmail.com + * - Calvin Metcalf cmetcalfATappgeo.com + * + * @copyright Copyright (c) 2014, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons, Olivier Terral and Calvin Metcalf + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/proj4js/proj4js/master/LICENSE.md + * @version 2.7.5 + */div[id^=GPboostRelief-]{font-size:11px;width:150px}div[id^=GPboostRelief-] label{display:block}div[id^=GPBoostReliefListContainer-]{position:relative;width:100%;height:28px;padding-left:8px;line-height:28px}.GPlayerRelief,.GPlayerReliefValue{position:absolute;top:0}.GPlayerRelief{width:calc(100% - 60px);height:28px;padding-left:8px}.GPlayerReliefValue{width:32px;left:calc(100% - 40px);line-height:28px;font-size:10px;font-style:italic;cursor:default}label[id^=GPshowBoostReliefPicto]{display:inline-block}input[id^=GPshowBoostRelief-]+label{display:block}input[id^=GPshowBoostRelief-]+label+div,input[id^=GPshowBoostRelief-]:checked+label{display:none}input[id^=GPshowBoostRelief-]:checked+label+div{display:block}div[id^=GPboostRelief-] input[type=checkbox]:checked+label+.GPlayerAdvancedToolsRelief{max-height:28px;opacity:1}.GPlayerAdvancedToolsRelief{display:block;position:relative;width:100%;border-bottom:1px dotted #ccc;background-color:#fff}.GPlayerReliefLayerId{position:relative;width:100px;height:28px;padding-left:8px;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.GPlayerRelief input{-webkit-appearance:none;-moz-appearance:none;background:none;display:block;width:100%;height:100%;margin:0;padding:0;overflow:hidden;cursor:pointer}.GPlayerRelief input[type=range]:focus{box-shadow:none;outline:none}.GPlayerRelief input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;height:3px}.GPlayerRelief input[type=range]::-webkit-slider-thumb:before{position:absolute;top:0;right:50%;left:-200px;height:3px;pointer-events:none}.GPlayerRelief input[type=range]::-webkit-slider-thumb{width:9px;height:17px;-webkit-appearance:none;border:2px solid #fff;background-color:#505050;position:relative;top:-7px}.GPlayerRelief input[type=range]::-moz-range-track{width:80px;height:3px}.GPlayerRelief input[type=range]::-moz-range-thumb{width:5px;height:13px;border:2px solid #fff;border-radius:0;box-shadow:0;background-color:#505050;position:relative}.GPlayerRelief input[type=range]::-ms-track{border:0;border-color:transparent;border-radius:0;border-width:0;color:transparent;height:3px;width:80px}.GPlayerRelief input[type=range]::-ms-fill-lower,.GPlayerRelief input[type=range]::-ms-fill-upper{background:transparent;border-radius:0}.GPlayerRelief input[type=range]::-ms-thumb{width:5px;height:13px;border:2px solid #fff;background-color:#505050}.GPlayerRelief input[type=range]::-ms-tooltip{display:none}div[id^=GPbuildings-]{font-size:11px}div[id^=GPbuildings-] label{display:block}label[id^=GPshowBuildingsPicto]{display:inline-block;cursor:pointer}label[id^=GPshowDrawingPicto-]{display:inline-block}input[id^=GPshowDrawing-]+label{display:block}input[id^=GPshowDrawing-]+label+div,input[id^=GPshowDrawing-]:checked+label{display:none}input[id^=GPshowDrawing-]:checked+label+div{display:block}div[id^=GPdrawingPanel-]{width:240px;overflow:hidden}div[id^=GPdrawingBasicPanel-]{padding:10px 15px}.GPdrawingCoords,.GPdrawingLabel{display:inline-block;line-height:20px}.GPdrawingLabel{width:80px;font-weight:700}.GPdrawingCoords{width:110px}.marker-input-radio{display:none}input.marker-input-radio:checked+label{border:1px solid red}div[id^=GPelevationPathPanelInfo]{display:none}.GPelevationPathCalcWaitingContainerHidden,.GPelevationPathCalcWaitingContainerVisible{position:absolute;top:32px;bottom:0;left:0;right:0;background-color:hsla(0,0%,100%,.9);font-size:1.5em;font-weight:700;overflow:hidden}.GPelevationPathInformationsContainerHidden,.GPelevationPathInformationsContainerVisible{position:absolute;top:32px;bottom:0;left:0;right:0;background-color:hsla(0,0%,100%,.9);font-size:13px;font-weight:700;overflow:hidden}.GPelevationPathCalcWaitingContainerVisible,.GPelevationPathInformationsContainerVisible{display:-webkit-flex;display:-webkit-box;display:-ms-flexbox;display:flex}.GPelevationPathInformationsContainerVisible{flex-direction:column}.GPelevationPathCalcWaitingContainerHidden,.GPelevationPathInformationsContainerHidden{display:none}.GPelevationPathCalcWaiting,.GPelevationPathInformations{margin:auto}.GPelevationPathInformations{font-size:.8em}.GPelevationPathCalcWaitingContainerHidden,.GPelevationPathCalcWaitingContainerVisible,.GPelevationPathInformationsContainerHidden,.GPelevationPathInformationsContainerVisible{border-radius:5px}#profileElevationRaw{resize:none;padding:unset}#profileElevationByDefault{display:-webkit-flex;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:100%}.altiPathValue{font-weight:700;fill:#5e5e5e}.altiPathCoords{font-style:italic;fill:#5e5e5e}.tooltipInit{opacity:0}.tooltipFadeIn{transition:opacity .3s ease 0ms,transform 50ms ease 0s,top 50ms ease 0s,left 50ms ease 0s;opacity:1}.tooltipFadeOut{transition:opacity .5s ease 0ms;opacity:0}.axis-d3>text{fill:#5e5e5e;font-family:Verdana;font-size:10px;opacity:1;text-anchor:end}.axis-d3{fill:none;stroke:#5e5e5e;stroke-width:1;shape-rendering:crispEdges}.area-d3{fill:#c77a04;stroke:#5e5e5e;stroke-width:0;fill-opacity:.4}.line-d3{fill:none;stroke:#c77a04;stroke-width:1px}.grid-d3 .tick{stroke:#d3d3d3;opacity:.7}.grid-d3 path{stroke-width:0}.overlay-d3{fill:none;pointer-events:all}.focusLine-d3{fill:none;stroke:#c77a04;stroke-width:.5px}.focusCircle-d3{fill:#c77a04}div.tooltip-d3{position:inherit;text-align:left;width:80px;height:45px;padding:5px;font:8px sans-serif;background:#fff;border:0;border-radius:8px;pointer-events:none}.GPwidget{position:absolute;font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:13px;color:#333}.GPwidget input[type=button],.GPwidget input[type=text]{-webkit-appearance:none;color:#333}.GPwidget input[type=checkbox]{display:none}.GPwidget select{padding-left:3px;border-radius:3px}.GPwidget form{margin-bottom:0}.GPwidget *{box-sizing:border-box}.GPwaiting,.GPwidget *{background-repeat:no-repeat}.GPwaiting{background-image:url(data:image/gif;base64,R0lGODlhNAA0AIQSAAFkpSZ5sAGV3k2Ruiao3kOj1/GUBk225pe/B4S83XrK75HH3qrS5szMzNbW1sHe797e3ubm5v///////////////////////////////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFAQAfACwAAAAANAA0AAAF5uAnjmRpnmiqrmzrvnAsz3T9FXhh72Ke8zWfDzgT/ogxIw55cjgiJ6XOhKjaII1sNio8Vb8ImnbMXVLBVhl2vI2hvzIHOwt9veGxyLwhu4dlcw59bzVjgjNoPHU2f0yOj5CRkpMocg2HjwaaBitzmZuaKWuGTKCgKHt8SKabqHulrJwno1qYQLGyJ56OrCuWtrChlMPExcbHH4s1ymK1NJZtM4Fxu3mvMXvMLdBj2ip60zG0WoBzENLVJL+66TDj7GQmbOc1EE9N4SURDvSRqcgj/gH8wC0LsGPtAK7pN7Chw4cQSYQAACH5BAUBAB8ALBYABAAaACcAAAVw4PdBTQOJaKquX+k2bJw6b+nIcu3isV7yLFrttioYczWWcVmICYkq5hKolB6pKOsUm9Vyu9JvKiyOls/otHqNQ7gR6ff7LJeX63Mx3n3f0+txeWyDhIVlBmsGiopoi45njo9fkZKTlIhil42RaYsxIQAh+QQFAQAfACwWAAkAGgAnAAAFdOAnjmQZOVCprmTjuikrf289y/Ub32SUuw6e6teICEuO31GVfC1Zxqd0Sq1arYVsAavNUrvdKVgrHm+l5jMazPVe3/C4/IN4I+73Kn5P3fOffn+AgXUqBocGK4QriIiKfoaNjip4LJKTT5eHU5qJnJJWjVUhACH5BAUBAB8ALAkAFgAnABoAAAV04CeOZGmepdM0Duq+5yo3cO2qcwPZPJnLveBvFezhZrsi76cM4lrNqHRKrVpPhmoBZuh2o4VwGOUtK8VoU9lcRKdJazbP/R7Fv236tnQ/If4IJ3pYa36Af4JuLl6Gh4gmYlKOgFclk4+VIpeBmSOTnZaUTSEAIfkEBQEAHwAsBAAWACcAGgAABXfg9xmkIZ5oqq5rWbJwnLqubLP0e+9nTvJAnwnIyxGJtaNyyWw6n1Ao4hmRIa7XpaPBbbCw4OO2y1WBw0Ryt4o6o3cRNdeRcmfTcojZvSr4CytyXntvKH9/gWR6X3cph4crEQ6LSo+IUYaWgJgnmpucIpagjpc3IQAh+QQFAQAfACwEAAkAGgAnAAAFb+AnjqJhkmiamqyhvmjLwrA806p946Tu8isbMNca1ozIpHLJTCKeiCYUupxOlVaqMxvdZqtWqbZJLpvPyEK5wGYz23AlPJ6c0412t9yucjQaDi98KX+FDTBtfYZ/gUmLhUqPf0p+i42Oi00QfxAiIQAh+QQFAQAfACwEAAQAGgAnAAAFc+AnjmRZGqhhrmyasrDounE7o/V64yvi6zuTb4gA0oTEn+lYSg5zSGcROpJOqVUntknc9rzgsHhMLhXOhTEaHV6vwW62N36G09tutbzM7/v/JhFlDYQNDmKFhYdeEYmFYA6OhIJbEJINYZdhlolkEA6UUCEAIfkEAQEAHwAsBAAEACcAGgAABXXgJ45kWSIoYq5sS6apK8swPN9mHeP8p6O9UmG4+qlMhmRryCwUa6uk1LBqMp9A5FQptBKDW2nX6+SFxSRyuXemjpvBz5lljYu2srX9vu/7/4CBgh8NhQ6DK4WKDYgkEIuGjSKQipKElIySj5CHlpSWIw6RoCEAOw==);background-position:50%}.GPpanel{background-color:#fff}.GPpanelHeader{position:relative;width:100%}.GPpanelTitle{width:100%;height:100%;text-align:center;font-weight:700}.GPpanelClose,.GPpanelInfo,.GPpanelReduce{position:absolute;cursor:pointer}.GPshowAdvancedToolPicto{position:relative;box-sizing:border-box;cursor:pointer}.GPshowAdvancedToolOpen{position:absolute;display:block;box-sizing:border-box}.GPflexInput{display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;display:flex;transition:max-height .3s ease-out,opacity .3s ease-out}.GPflexInput>*{display:block;height:28px;line-height:26px;border:1px solid #999;border-radius:0}.GPflexInput :not(:last-child){border-right:none}.GPflexInput :first-child{border-radius:3px 0 0 3px}.GPflexInput :last-child{border-radius:0 3px 3px 0}.GPflexInput>:not(input){overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.GPflexInput>input{padding:0 5px;min-width:0}.GPflexInput>input,.GPflexInput>select{-webkit-flex:1;-webkit-box-flex:1;-ms-flex:1;flex:1}.GPflexInput>select{padding-right:7px}.GPflexInput>label{background-color:#f2f2f2;color:#666;padding-left:7px;padding-right:9px;cursor:pointer}.GPinputSelect{border:1px solid #999;color:#333}.GPinputSelect,input.GPinputSubmit{display:block;height:28px;line-height:26px;margin:auto;cursor:pointer}input.GPinputSubmit{width:80px;padding:0;background:none;border:none;border-radius:3px;font-family:Helvetica Neue,Arial,Helvetica,sans-serif;color:#fff;font-weight:700;opacity:.8;transition:opacity .2s ease-out}input.GPinputSubmit:hover{opacity:1}.GPadvancedAutoCompleteList,.GPautoCompleteList{z-index:2;display:none;position:absolute;max-height:140px;background-color:#fff;border:1px solid #999;overflow-y:hidden}.GPadvancedAutoCompleteList{width:calc(100% - 28px);border-top:none;font-size:.9em}.GPautoCompleteProposal{width:100%;height:28px;line-height:16px;padding:6px 10px;color:#5e5e5e;font-size:1em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}.GPautoCompleteProposal:hover{color:#000;background-color:#cedbef}.GPshowMoreOptions{display:block;position:absolute;width:28px;height:28px;cursor:pointer;transition:all .5s ease-out 0s}input[type=checkbox]:checked+.GPshowMoreOptions{-webkit-transform:rotateX(180deg);transform:rotateX(180deg)}label[id^=GPgetFeatureInfoPicto]{display:inline-block}div[id^=GPgetFeatureInfo-]+label{display:block}span[id^=GPgetFeatureInfoActivate],span[id^=GPgetFeatureInfoDeactivate]{position:absolute;display:block;transition:border-radius .5s ease-out 0s,opacity .5s ease-out 0s}span[id^=GPgetFeatureInfoActivate]{background-position:0 0;opacity:1}span[id^=GPgetFeatureInfoDeactivate]{opacity:0}div[id^=GPgetFeatureInfo-] input[type=checkbox]:not(:checked)+label[id^=GPgetFeatureInfoPicto] span[id^=GPgetFeatureInfoDeactivate]{opacity:1}div[id^=GPisochron-]{top:140px}label[id^=GPshowIsochronPicto]{display:inline-block}input[id^=GPshowIsochron-]+label{display:block}input[id^=GPshowIsochron-]+label+div,input[id^=GPshowIsochron-]:checked+label{display:none}input[id^=GPshowIsochron-]:checked+label+div{display:block}div[id^=GPisochronPanel-]{width:280px}.GPisochronCalcWaitingContainerHidden,.GPisochronCalcWaitingContainerVisible{position:absolute;top:32px;bottom:0;left:0;right:0;background-color:hsla(0,0%,100%,.9);font-size:1.5em;font-weight:700;overflow:hidden}.GPisochronCalcWaitingContainerVisible{display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;display:flex}.GPisochronCalcWaitingContainerHidden{display:none}.GPisochronCalcWaiting{margin:auto}form[id^=GPisochronForm]{padding:15px}.GPisochronFormMini{max-height:58px;overflow:hidden}.GPisochronFormMini div[id^=GPisochronReset-],.GPisochronFormMini label[id^=GPshowIsoExclusionsPicto-]{display:none}.GPisochronOriginVisible{display:block}.GPisochronOriginHidden{display:none}.GPisochronOriginPointerImg{width:28px;background-color:#f2f2f2;cursor:pointer}input[id^=GPisochronOriginPointer]+.GPisochronOriginPointerImg{background-position:-1px -1px}input[id^=GPisochronOriginPointer]:checked+.GPisochronOriginPointerImg{background-position:-29px -1px}input[id^=GPisochronSubmit]{margin-top:5px}div[id^=GPisochronChoice]{display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;display:flex;width:160px;-webkit-justify-content:space-between;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin:15px auto 5px}.GPisochronChoiceAlt input{display:none}.GPisochronChoiceAltImg{display:block;width:28px;height:28px;margin:auto;cursor:pointer}input[id^=GPisochronChoiceAltChron]+.GPisochronChoiceAltImg{background-position:-56px 0}input[id^=GPisochronChoiceAltChron]:checked+.GPisochronChoiceAltImg{background-position:-84px 0}input[id^=GPisochronChoiceAltDist]+.GPisochronChoiceAltImg{background-position:-112px 0}input[id^=GPisochronChoiceAltDist]:checked+.GPisochronChoiceAltImg{background-position:-140px 0}.GPisochronChoiceAlt span{cursor:pointer;display:block;color:#999}.GPisochronValueHidden{display:none}div[id^=GPisochronValueChron],div[id^=GPisochronValueDist]{width:220px;margin:auto}div[id^=GPisochronModeChoice]{display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;display:flex;-webkit-justify-content:space-between;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin:15px 0}.GPisochronModeLabel{display:block;text-align:center;margin-bottom:5px}div[id^=GPisochronTransportChoice] input{display:none}.GPisochronTransportImg{display:inline-block;width:28px;height:28px;cursor:pointer}.GPisochronTransportImg:first-of-type{margin-left:18px;margin-right:10px}input[id^=GPisochronTransportCar]+.GPisochronTransportImg{background-position:-168px 0}input[id^=GPisochronTransportCar]:checked+.GPisochronTransportImg{background-position:-196px 0}input[id^=GPisochronTransportPedestrian]+.GPisochronTransportImg{background-position:-224px 0}input[id^=GPisochronTransportPedestrian]:checked+.GPisochronTransportImg{background-position:-252px 0}select[id^=GPisochronDirectionSelect]{width:80px}input[id^=GPshowIsoExclusions]{display:none}.GPshowIsoExclusionsPicto{top:250px;right:0;transition:all .5s ease-out 0s}input[id^=GPshowIsoExclusions]+label+div[id^=GPisoExclusions]{max-height:0;opacity:0;margin-bottom:0}input[id^=GPshowIsoExclusions]:checked+label+div[id^=GPisoExclusions]{display:block;max-height:60px;opacity:1;margin-bottom:15px}div[id^=GPisoExclusions]{transition:max-height .5s ease-in-out .25s,opacity .5s ease-in-out .25s,margin .3s ease-in-out .25s;overflow:hidden}.GPisoExclusionsLabel{display:block;text-align:center;margin-bottom:10px;font-weight:700;line-height:16px}.GPisoExclusionsOptions{display:-webkit-flex;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.GPisoExclusionsOption{display:block;height:28px;line-height:26px;color:#a77;background-color:#fee;padding-left:28px;padding-right:5px;border:1px solid #a77;border-radius:3px;cursor:pointer}input:checked+.GPisoExclusionsOption{background-color:#efe;background-position:0 -28px;color:#797;border:1px solid #797}div[id^=GPisochronReset]{position:absolute;margin-top:5px;width:28px;height:28px;border-radius:3px;opacity:.8;background-position:-281px 0;transition:opacity .2s ease-out;cursor:pointer}div[id^=GPisochronReset]:hover{opacity:1}div[id^=GPlayerSwitcher-]{font-size:11px}div[id^=GPlayerSwitcher-] [draggable]{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;user-select:none;-khtml-user-drag:element;-webkit-user-drag:element}div[id^=GPlayerSwitcher-] input[type=checkbox]+div,div[id^=GPlayerSwitcher-] input[type=checkbox]+label+div{max-height:0}div[id^=GPlayerSwitcher-] label{display:block}label[id^=GPshowLayersListPicto]{position:relative;float:right;display:block;opacity:1;transition:opacity .5s ease-out 0s,box-shadow .5s ease-out 0s,border .5s ease-out 0s,border-radius .5s ease-out 0s;cursor:pointer}span[id^=GPshowLayersListClose],span[id^=GPshowLayersListOpen]{position:absolute;display:block;transition:border-radius .5s ease-out 0s,opacity .5s ease-out 0s}span[id^=GPshowLayersListOpen]{background-position:0 0;opacity:1}span[id^=GPshowLayersListClose]{opacity:0}div[id^=GPlayerSwitcher-] input[type=checkbox]:checked+div+label[id^=GPshowLayersListPicto]{border-top-left-radius:0;border-top-right-radius:0}div[id^=GPlayerSwitcher-] input[type=checkbox]:checked+div+label[id^=GPshowLayersListPicto] span[id^=GPshowLayersListClose]{opacity:1}div[id^=GPlayersList]{position:relative;width:180px;border-bottom-right-radius:0;opacity:0;overflow:auto;transition:max-height .5s ease-out 0s,opacity .5s ease-out .25s}div[id^=GPlayerSwitcher-] input[type=checkbox]:checked+div[id^=GPlayersList]{max-height:232px;opacity:1;transition:max-height .5s ease-in 0s,opacity .25s ease-in 0s}.GPlayerSwitcher_layer{position:relative;top:0;background-color:#fff;border-bottom:1px dotted #ccc;overflow:hidden}div[id^=GPlayersList] .GPlayerSwitcher_layer:last-child{border-bottom:none}.GPlayerAdvancedTools,.GPlayerBasicTools{position:relative;width:100%;height:28px}.GPlayerInfo,.GPlayerInfoOpened,.GPlayerRemove,.GPlayerVisibility{width:28px;height:28px;cursor:pointer}.GPlayerInfo,.GPlayerInfoOpened,.GPlayerName,.GPlayerOpacity,.GPlayerOpacityValue,.GPlayerRemove,.GPlayerVisibility{position:absolute;top:0}.GPghostLayer{opacity:0}.GPlayerBasicTools{background-color:#fff}.GPlayerVisibility{left:0;background-position:-28px 0}input[type=checkbox]:checked+.GPlayerVisibility{background-position:0 0}.GPlayerName{left:28px;width:calc(100% - 56px);line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-left:4px;cursor:move}.outOfRange .GPlayerName{color:#aaa}.GPshowLayerAdvancedTools{top:0;right:0;background-position:-112px 0}.GPlayerAdvancedTools{display:block;max-height:0;opacity:0;transition:max-height .5s ease-out 0s,opacity .5s ease-out 0s}div[id^=GPlayerSwitcher-] input[type=checkbox]:checked+label+.GPlayerAdvancedTools{max-height:28px;opacity:1}.GPlayerInfo{left:0;background-position:-55px 0}.GPlayerInfoOpened{left:0;background-position:-83px 0}.GPlayerOpacity{left:28px;width:calc(100% - 100px);height:28px;padding-left:8px}.GPlayerOpacityValue{width:32px;left:calc(100% - 60px);line-height:28px;font-size:10px;font-style:italic;cursor:default}.GPlayerRemove{right:0;background-position:-140px 0}.GPlayerOpacity input{-webkit-appearance:none;-moz-appearance:none;background:none;display:block;width:100%;height:100%;margin:0;padding:0;overflow:hidden;cursor:pointer}.GPlayerOpacity input[type=range]:focus{box-shadow:none;outline:none}.GPlayerOpacity input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;height:3px}.GPlayerOpacity input[type=range]::-webkit-slider-thumb:before{position:absolute;top:0;right:50%;left:-200px;height:3px;pointer-events:none}.GPlayerOpacity input[type=range]::-webkit-slider-thumb{width:9px;height:17px;-webkit-appearance:none;border:2px solid #fff;background-color:#505050;position:relative;top:-7px}.GPlayerOpacity input[type=range]::-moz-range-track{width:80px;height:3px}.GPlayerOpacity input[type=range]::-moz-range-thumb{width:5px;height:13px;border:2px solid #fff;border-radius:0;box-shadow:0;background-color:#505050;position:relative}.GPlayerOpacity input[type=range]::-ms-track{border:0;border-color:transparent;border-radius:0;border-width:0;color:transparent;height:3px;width:80px}.GPlayerOpacity input[type=range]::-ms-fill-lower,.GPlayerOpacity input[type=range]::-ms-fill-upper{background:transparent;border-radius:0}.GPlayerOpacity input[type=range]::-ms-thumb{width:5px;height:13px;border:2px solid #fff;background-color:#505050}.GPlayerOpacity input[type=range]::-ms-tooltip{display:none}div[id^=GPlayerInfoPanel]{position:absolute;top:0;overflow-y:hidden;padding-top:10px;padding-bottom:10px}.GPlayerInfoPanelOpened{display:block}.GPlayerInfoPanelClosed{display:none}div[id^=GPlayerInfoContent]{position:relative;width:280px;max-height:200px;overflow-y:auto;padding-left:10px;padding-right:10px}div[id^=GPlayerInfoTitle]{width:calc(100% - 52px);margin:auto auto 10px;padding-bottom:5px;text-align:center;font-size:1.1em;font-weight:700}div[id^=GPlayerInfoQuicklook]{position:absolute;top:-2px;left:10px;width:20px;height:20px;cursor:pointer}div[id^=GPlayerInfoClose]{position:absolute;top:-8px;right:10px;width:28px;height:28px;cursor:pointer}div[id^=GPlayerInfoDescription]{font-size:.9em}.GPlayerInfoSubtitle{padding-left:35px;font-weight:700;margin-top:10px;margin-bottom:4px}.GPlayerInfoLink,.GPlayerInfoPopup{line-height:20px;padding-left:23px;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis;color:#999;background-repeat:no-repeat;cursor:pointer}.GPlayerInfoLink{background-position:0 -20px}.GPlayerInfoLink:hover,.GPlayerInfoPopup:hover{color:#333}.GPlayerInfoLink a,.GPlayerInfoLink a:visited .GPlayerInfoLink a:focus .GPlayerInfoLink a:hover{text-decoration:none;color:inherit}.GPlocationStageFlexInput{max-height:28px;opacity:1}.GPlocationStageFlexInputHidden{max-height:0;opacity:0;overflow:hidden}.GPlocationOriginVisible{display:block}.GPlocationOriginHidden{display:none}label.GPlocationOriginPointerImg[id*=GPlocationOriginPointerImg]{width:28px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-right:1px solid #999}input[id*=GPlocationOriginPointer]+.GPlocationOriginPointerImg{background-position:-1px -1px}input[id*=GPlocationOriginPointer]:checked+.GPlocationOriginPointerImg{background-position:-29px -1px}.GPlocationStageRemove,div[id^=GPlocationStageAdd]{width:28px;border:none;cursor:pointer}.GPlocationStageRemove{background-position:-84px 0}div[id^=GPlocationStageAdd]{background-position:-56px 0}label[id^=GPshowMeasureAreaPicto-]{display:inline-block}input[id^=GPshowMeasureArea-]+label{display:block}input[id^=GPshowMeasureArea-]:checked+label{display:block;background-color:rgba(0,60,136,.5)}input[id^=GPshowMeasureArea-]+label+div,input[id^=GPshowMeasureArea-]:checked+label+div{display:block}label[id^=GPshowMeasureAzimuthPicto-]{display:inline-block}input[id^=GPshowMeasureAzimuth-]+label{display:block}input[id^=GPshowMeasureAzimuth-]:checked+label{display:block;background-color:rgba(0,60,136,.5)}input[id^=GPshowMeasureAzimuth-]+label+div,input[id^=GPshowMeasureAzimuth-]:checked+label+div{display:block}label[id^=GPshowMeasureLengthPicto-]{display:inline-block}input[id^=GPshowMeasureLength-]+label{display:block}input[id^=GPshowMeasureLength-]:checked+label{display:block;background-color:rgba(0,60,136,.5)}input[id^=GPshowMeasureLength-]+label+div,input[id^=GPshowMeasureLength-]:checked+label+div{display:block}.GPmeasureTooltip{position:relative;background:rgba(0,0,0,.5);border-radius:4px;color:#fff;padding:4px 8px;white-space:nowrap}.GPmeasureTooltip-measure{font-weight:700}.GPmeasureTooltip-info{font-size:.75em;text-align:center}.GPmeasureTooltip-static{background-color:#fc3;color:#000;border:1px solid #fff}.GPmeasureTooltip-hidden{display:none}.GPmeasureTooltip-info:before,.GPmeasureTooltip-measure:before,.GPmeasureTooltip-static:before{border-top:6px solid rgba(0,0,0,.5);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.GPmeasureTooltip-static:before{border-top-color:#fc3}label[id^=GPshowMousePositionPicto]{display:inline-block}input[id^=GPshowMousePosition-]+label{display:block}input[id^=GPshowMousePosition-]+label+div,input[id^=GPshowMousePosition-]:checked+label{display:none}input[id^=GPshowMousePosition-]:checked+label+div{display:block}div[id^=GPmousePositionPanel-]{width:300px;overflow:hidden}div[id^=GPmousePositionBasicPanel]{padding:10px 15px;position:relative}.GPmousePositionCoords,.GPmousePositionLabel{display:inline-block;line-height:20px}.GPmousePositionLabel{width:80px;font-weight:700}.GPmousePositionCoords{width:110px}.GPshowMousePositionSettingsPicto{bottom:5px;right:0;transition:all .5s ease-out 0s}div[id^=GPmousePosition-] input[type=checkbox]:checked+.GPshowMousePositionSettingsPicto{bottom:100px}div[id^=GPmousePositionSettings-]{display:block;max-height:0;opacity:0;transition:max-height .5s ease-out 0s,opacity .5s ease-out 0s}div[id^=GPmousePosition-] input[type=checkbox]:checked+label+div[id^=GPmousePositionSettings-]{max-height:95px;opacity:1}div[id^=GPmousePositionSettings-]{height:95px;padding-left:0 15px;overflow:hidden}.GPmousePositionSettingsLabel{display:block;margin:auto;text-align:center;font-weight:700;line-height:16px}.GPmousePositionSettingsSelect{width:180px;margin-top:5px}div[id^=GPmousePositionCoordinate-] input.error{border:1px solid red}div[id^=GPmousePositionCoordinate-] input[readonly]{border:1px solid transparent;padding:2px;text-align:right}input[id^=GPmousePositionLat-],input[id^=GPmousePositionLon-]{width:120px}span[id^=GPmousePositionAlt-]{display:inline-block;padding:2px;width:120px;line-height:20px;text-align:right}.GPSexagesimal,.GPSexagesimalsec{margin:0;border:1px solid #ccc;border-radius:4px}input:read-only.GPSexagesimal,input:read-only.GPSexagesimalsec{text-align:right}.GPSexagesimal{width:30px}.GPSexagesimalsec{width:45px}.GPmousePositionSexagesimalLabel{font-size:1.2em;vertical-align:middle;padding:0}select.GPmousePositionDirection{border:1px solid #999;margin-left:2px}select.GPmousePositionDirection:disabled{border:none;background:transparent;color:#000;-webkit-appearance:none;-moz-appearance:none}select.GPmousePositionDirection:disabled::-ms-expand{display:none}select.GPmousePositionDirection:disabled::-ms-value{color:#000}.GPmousePositionAltitudeUnits,.GPmousePositionUnits{margin-left:5px}.GPmousePositionPanelEditTools{position:absolute;top:20px;right:5px}.GPmousePositionEditTool{width:18px;height:18px;display:inline-block;cursor:pointer}span[id^=GPmousePositionCloseEdit]{background-position:-18px 0;margin-left:5px}img[id^=GPmousePositionMarker]:hover{cursor:pointer;opacity:.7}#GPmapCenter{display:none;position:absolute;top:50%;left:50%;width:50px;height:50px;margin-top:-25px;margin-left:-25px}#GPmapCenter.GPmapCenterVisible{display:block}[id^=GPreverseGeocoding-]{top:180px}[id^=GPshowReverseGeocodingPicto-]{display:inline-block}[id^=GPshowReverseGeocoding-]+label{display:block}[id^=GPshowReverseGeocoding-]+label+div,[id^=GPshowReverseGeocoding-]:checked+label{display:none}[id^=GPshowReverseGeocoding-]:checked+label+div{display:block}div[id^=GPreverseGeocodingResultsClose]{top:0;right:0;width:30px;height:32px}[id^=GPreverseGeocodingPanel-]{width:280px}.GPreverseGeocodingComponentHidden{display:none}div[id^=GPreverseGeocodingReturnPicto-]{position:absolute;width:26px;height:26px;border-radius:3px;opacity:1;background-position:0 0;cursor:pointer}.GPreverseGeocodingReturnPictoHidden{display:none}[id^=GPreverseGeocodingForm-]{position:relative;max-height:270px;overflow-y:auto;padding-left:15px;padding-right:15px;padding-top:10px}.GPreverseGeocodingCodeLabel,.GPreverseGeocodingFilterLabel{max-width:105px}.GPreverseGeocodingCode,.GPreverseGeocodingCodeLabel{margin-top:5px;margin-bottom:0}.GPreverseGeocodingFilterInput,.GPreverseGeocodingFilterLabel{margin-bottom:5px}input[id^=GPreverseGeocodingSubmit-]{margin-top:5px;margin-bottom:15px;width:100px}.GPreverseGeocodingCalcWaitingContainerHidden,.GPreverseGeocodingCalcWaitingContainerVisible{position:absolute;top:32px;bottom:0;left:0;right:0;background-color:hsla(0,0%,100%,.9);font-size:1.5em;font-weight:700;overflow:hidden}.GPreverseGeocodingCalcWaitingContainerVisible{display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;display:flex}.GPreverseGeocodingCalcWaitingContainerHidden{display:none}.GPreverseGeocodingCalcWaiting{margin:auto}div[id^=GPreverseGeocodingResultsList-]{position:relative;max-height:210px;overflow-y:auto}div[id^=GProute-]{top:100px}label[id^=GPshowRoutePicto]{display:inline-block}input[id^=GPshowRoute-]+label{display:block}input[id^=GPshowRoute-]+label+div,input[id^=GPshowRoute-]:checked+label{display:none}input[id^=GPshowRoute-]:checked+label+div{display:block}div[id^=GProutePanel-]{width:320px}.GProuteComponentHidden{display:none}.GProuteCalcWaitingContainerHidden,.GProuteCalcWaitingContainerVisible{position:absolute;top:32px;bottom:0;left:0;right:0;background-color:hsla(0,0%,100%,.9);font-size:1.5em;font-weight:700;overflow:hidden}.GProuteCalcWaitingContainerVisible{display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;display:flex}.GProuteCalcWaitingContainerHidden{display:none}.GProuteCalcWaiting{margin:auto}form[id^=GProuteForm]{padding:15px}.GProuteFormMini{max-height:58px;overflow:hidden;-webkit-transform:translateY(-5px);transform:translateY(-5px)}.GProuteStageFlexInput{max-height:28px;opacity:1}.GProuteStageFlexInputHidden{max-height:0;opacity:0;overflow:hidden}form[id^=GProuteForm]>.GPlocationStageFlexInput{margin-top:5px}form[id^=GProuteForm]>.GPlocationStageFlexInputHidden{margin-top:0}form[id^=GProuteForm].GProuteFormMini .GPlocationStageFlexInput:first-child{margin-top:5px}.GProuteOriginVisible{display:block}.GProuteOriginHidden{display:none}label.GProuteOriginPointerImg[id*=GProuteOriginPointerImg]{width:28px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-right:1px solid #999}input[id*=GProuteOriginPointer]+.GProuteOriginPointerImg{background-position:-1px -1px}input[id*=GProuteOriginPointer]:checked+.GProuteOriginPointerImg{background-position:-29px -1px}.GProuteStageRemove,div[id^=GProuteStageAdd]{width:28px;border:none;cursor:pointer}.GProuteFormMini .GProuteStageRemove,.GProuteFormMini div[id^=GProuteStageAdd]{display:none}.GProuteStageRemove{background-position:-84px 0}div[id^=GProuteStageAdd]{background-position:-56px 0}div[id^=GProuteModeChoice]{display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;display:flex;-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around;margin:15px 0}.GProuteModeLabel{display:block;text-align:center;margin-bottom:5px}div[id^=GProuteTransportChoice] input{display:none}.GProuteTransportImg{display:inline-block;width:28px;height:28px;cursor:pointer}.GProuteTransportImg:first-of-type{margin-left:18px;margin-right:10px}input[id^=GProuteTransportCar]+.GProuteTransportImg{background-position:-112px 0}input[id^=GProuteTransportCar]:checked+.GProuteTransportImg{background-position:-140px 0}input[id^=GProuteTransportPedestrian]+.GProuteTransportImg{background-position:-168px 0}input[id^=GProuteTransportPedestrian]:checked+.GProuteTransportImg{background-position:-196px 0}select[id^=GProuteComputationSelect]{width:100px}input[id^=GPshowRouteExclusions]{display:none}.GPshowRouteExclusionsPicto{right:0;transition:all .3s ease-out 0s}input[id^=GPshowRouteExclusions]+label+div[id^=GProuteExclusions]{max-height:0;opacity:0;margin-bottom:0}input[id^=GPshowRouteExclusions]:checked+label+div[id^=GProuteExclusions]{display:block;max-height:60px;opacity:1;margin-bottom:15px}div[id^=GProuteExclusions]{transition:max-height .5s ease-in-out .25s,opacity .5s ease-in-out .25s,margin .3s ease-in-out .25s;overflow:hidden}.GProuteExclusionsLabel{display:block;text-align:center;margin-bottom:10px;font-weight:700;line-height:16px}.GProuteExclusionsOptions{display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;display:flex;-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.GProuteExclusionsOption{display:block;height:28px;line-height:26px;color:#a77;background-color:#fee;padding-left:28px;padding-right:5px;border:1px solid #a77;border-radius:3px;cursor:pointer}input:checked+.GProuteExclusionsOption{background-color:#efe;background-position:0 -28px;color:#797;border:1px solid #797}div[id^=GProuteReset]{position:absolute;width:28px;height:28px;border-radius:3px;opacity:.8;background-position:-224px 0;transition:opacity .2s ease-out;cursor:pointer}div[id^=GProuteReset]:hover{opacity:1}div[id^=GProuteResultsPanel]{padding:15px}.GProuteResultStage{display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;display:flex}div[id^=GProuteResultsStages]{margin-bottom:15px}.GProuteResultStageLabel,.GProuteResultStageValue,.GProuteResultsValueLabel,div[id^=GProuteResultsValueDist],div[id^=GProuteResultsValueTime]{display:inline-block;line-height:18px}.GProuteResultStageLabel,.GProuteResultsValueLabel{color:#666}.GProuteResultStageLabel{width:60px}.GProuteResultsValueLabel{width:65px}.GProuteResultStageValue{-webkit-flex:1;-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-x:hidden;white-space:nowrap;text-overflow:ellipsis}div[id^=GProuteResultsValueDist],div[id^=GProuteResultsValueTime]{width:80px;font-weight:700}div[id^=GProuteResults-]{display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;display:flex;-webkit-justify-content:space-between;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:10px}select[id^=GProuteResultsComputationSelect]{width:100px}div[id^=GProuteResultsNew]{width:28px;height:28px;border-radius:3px;opacity:.8;background-position:-224px 0;transition:opacity .2s ease-out;cursor:pointer}div[id^=GProuteResultsNew]:hover{opacity:1}.GPfakeBorder{display:inline-block;height:14px;width:60px;border-bottom:1px solid #999}.GPfakeBorderLeft{margin-left:15px}input[id^=GProuteResultsShowDetails]+label,input[id^=GProuteResultsShowDetails]+label+label{width:130px;line-height:28px;vertical-align:top;text-align:center;font-weight:700;cursor:pointer;transition:color .2s ease-out}input[id^=GProuteResultsShowDetails]+label,input[id^=GProuteResultsShowDetails]:checked+label+label{display:inline-block}input[id^=GProuteResultsShowDetails]+label+label,input[id^=GProuteResultsShowDetails]:checked+label{display:none}input[id^=GProuteResultsShowDetails]+label+label+div+div[id^=GProuteResultsDetails]{max-height:0;opacity:0}input[id^=GProuteResultsShowDetails]:checked+label+label+div+div[id^=GProuteResultsDetails]{max-height:200px;opacity:1}div[id^=GProuteResultsDetails]{overflow-y:auto;transition:max-height .5s ease-in-out .25s,opacity .5s ease-in-out .25s}.GProuteResultsDetailsInstruction,.GProuteResultsDetailsNumber{display:inline-block;margin-top:4px;line-height:16px;color:#666}.GProuteResultsDetailsNumber{font-weight:700;width:22px;text-align:right;vertical-align:top}.GProuteResultsDetailsInstruction{width:calc(100% - 30px);padding-left:5px}input[id^=GPshowSearchEngine-]{display:none}label[id^=GPshowSearchEnginePicto]{display:inline-block;transition:border-radius 0s ease-out 0s;transition-delay:.5s}input[id^=GPshowSearchEngine-]:checked+label{border-top-right-radius:0;border-bottom-right-radius:0;transition-delay:0s}input[id^=GPshowSearchEngine-]+label+form[id^=GPsearchInput-]{max-width:0;border:none;transition:max-width .5s ease-out 0s}input[id^=GPshowSearchEngine-]:checked+label+form[id^=GPsearchInput-]{max-width:280px}input[id^=GPshowSearchEngine-]+label+form[id^=GPsearchInput-]+div[id^=GPshowAdvancedSearch]{display:none}input[id^=GPshowSearchEngine-]:checked+label+form[id^=GPsearchInput-]+div[id^=GPshowAdvancedSearch]{display:inline-block}div[id^=GPautoCompleteList]{display:none}input[id^=GPshowSearchEngine-]:checked+label+form[id^=GPsearchInput-]+div[id^=GPautoCompleteList]{display:block}form[id^=GPsearchInput-]{display:inline-block;position:relative;left:-3px;width:280px;overflow:hidden}form[id^=GPsearchInput-] input{display:block;width:100%;height:100%;border:1px solid #999;border-top-right-radius:5px;border-bottom-right-radius:5px;padding:0 30px 0 5px;color:#333;font-size:1em}form[id^=GPsearchInput-] input:disabled{background-color:#ddd;color:#999}div[id^=GPsearchInputReset]{position:absolute;background-position:-30px 0;cursor:pointer}div[id^=GPadvancedSearchClose],div[id^=GPgeocodeResultsClose],div[id^=GPsearchInputReset]{top:0;right:0;width:30px;height:32px}div[id^=GPgeocodeResultsClose]{background-position:0 0}div[id^=GPadvancedSearchClose]{background-repeat:no-repeat}div[id^=GPshowAdvancedSearch]{transition:border-radius 0s ease-out 0s;transition-delay:.5s}div[id^=GPadvancedSearchPanel]{display:none;width:280px;vertical-align:top;overflow:hidden}form[id^=GPadvancedSearchForm]{max-height:220px;overflow-y:auto;padding-left:15px;padding-right:15px}.GPadvancedSearchCodeLabel,.GPadvancedSearchFilterLabel{max-width:105px}.GPadvancedSearchCode,.GPadvancedSearchCodeLabel,div[id^=GPadvancedSearchFilters]{margin-top:15px}.GPadvancedSearchFilterInput,.GPadvancedSearchFilterLabel{margin-bottom:5px}input[id^=GPadvancedSearchSubmit]{margin-top:10px;margin-bottom:15px}div[id^=GPautoCompleteList],div[id^=GPgeocodeResultsList]{width:280px}div[id^=GPautoCompleteList]{top:35px}div[id^=GPgeocodeResultsList]{display:none;position:absolute;top:40px;border-radius:4px;overflow:hidden}div[id^=GPgeocodeResults-]{background-color:#fff;max-height:140px;overflow-y:auto}#GPmapLoading{display:none;position:absolute;z-index:50;top:50%;left:50%;width:50px;height:50px;margin-top:-25px;margin-left:-25px}#GPmapLoading.GPmapLoadingVisible{display:block}#GPmapLoading{background-image:url(data:image/gif;base64,R0lGODlhNAA0AIQSAAFkpSZ5sAGV3k2Ruiao3kOj1/GUBk225pe/B4S83XrK75HH3qrS5szMzNbW1sHe797e3ubm5v///////////////////////////////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFAQAfACwAAAAANAA0AAAF5uAnjmRpnmiqrmzrvnAsz3T9FXhh72Ke8zWfDzgT/ogxIw55cjgiJ6XOhKjaII1sNio8Vb8ImnbMXVLBVhl2vI2hvzIHOwt9veGxyLwhu4dlcw59bzVjgjNoPHU2f0yOj5CRkpMocg2HjwaaBitzmZuaKWuGTKCgKHt8SKabqHulrJwno1qYQLGyJ56OrCuWtrChlMPExcbHH4s1ymK1NJZtM4Fxu3mvMXvMLdBj2ip60zG0WoBzENLVJL+66TDj7GQmbOc1EE9N4SURDvSRqcgj/gH8wC0LsGPtAK7pN7Chw4cQSYQAACH5BAUBAB8ALBYABAAaACcAAAVw4PdBTQOJaKquX+k2bJw6b+nIcu3isV7yLFrttioYczWWc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a6uk1LBqMp9A5FQptBKDW2nX6+SFxSRyuXemjpvBz5lljYu2srX9vu/7/4CBgh8NhQ6DK4WKDYgkEIuGjSKQipKElIySj5CHlpSWIw6RoCEAOw==)}.GPwidget{position:relative}#GPadvancedToolsPanel{position:static}.GPpanel{box-shadow:0 1px 6px #000;border-radius:5px}.GPpanelHeader{height:32px;background-color:#fff;border-top-left-radius:5px;border-top-right-radius:5px}.GPpanelTitle{width:calc(100% - 60px);margin:auto;line-height:32px;color:#c77a04;border-bottom:1px solid #c77a04}.GPpanelClose{top:0;right:0;width:30px;height:32px;background-position:-30px 1px}.GPpanelReduce{right:30px;background-position:-60px 1px}.GPpanelInfo,.GPpanelReduce{top:0;width:30px;height:32px}.GPpanelInfo{left:0;background-position:-90px 1px}.GPshowAdvancedToolPicto{width:30px;height:30px;box-shadow:0 1px 6px #000;background-color:#fff;border-radius:5px}.GPshowAdvancedToolPicto:hover{background-color:#f4f4f4}.GPshowAdvancedToolOpen{width:100%;height:100%}input.GPinputSubmit{background-color:#c77a04}.GPshowMoreOptionsImage{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAA7klEQVRIx+3UsUtCURTH8e/x3eciSAhC/QnRGIQPHPoTHPJfyLEpyFqcXkGT/0HQ4uBQs4s4VAiO0b/QJKIIcn333QYVnErIt53PeO7hnnv4wQWllMqa7NL0fmu+wPeLeXd10sJun322yE9t0AY5j+Lk+K+7cjs+rAPSmFnTGzQpb4qDJuWZNT2QxqpnTxsCvN0FdfHyBIwllVoaihXnXkGOxPvLyr173utAgI+b8NTn/AtwsC5NJJVa5WE5yizD+ZySC00XIFgmF4UC40wzXBhcFCfVKE6qC4PTDP81EGB4zeF2hmePfOt3ppT61Q8G2258CD5NRAAAAABJRU5ErkJggg==)}div[id^=GPelevationPath-]{top:0}label[id^=GPshowElevationPathPicto]{display:inline-block}input[id^=GPshowElevationPath-]+label{display:block}input[id^=GPshowElevationPath-]+label+div{display:none}input[id^=GPshowElevationPath-]:checked+label+div{display:block}[id^=GPelevationPathPanelClose],div[id^=GPelevationPathPanelInfo],div[id^=GPelevationPathPanelReduce],span[id^=GPshowElevationPathOpen]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAeCAYAAADnydqVAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAOwwAADsMBx2+oZAAAA4VJREFUaN7tmEFv3EQUx3/PHkdIFT3RIk4gAZVAHIrEwUslJM7tsfABQlBLk+ZuL0K+ZPfOpgpRmg+AhLhQPgBFja1euCAObXqlatUL4oDqXe/jkHXj7jqNvesmWZj/xdbYY83Mz/837w1YWVlZWVlZWVk1LjnshTg0Ot7W6gzELt0cqwxq3n7QM6s5cXARYNGpefuL3FvlHaujlXNQ+K0L96VEksD7cid0NzWaHGcuBYkDt7fT9lYszkmZquG6DG4cGs3bi84vts8CF9HvBHGS1HU0yq5IxHACbuj2BFkWVd1pe3y81l+fdyh3Is46qVkVuKjw7ijW3gN+HnqD3oWIx1M7+EWgi3vw+LX5zWN4fn98spSk7roWthQFSUL3hiDLeQ/R4XvzDnen7X7mpGYXaCucB04Bp1A+RPnaSc1uEriXZ8qiqziwCthZXKwgSeB+i0gh9OpNfyG7QoTmzt2fiW75XnZ13OXzBldUvq9Q3aiofu53sx8ac3BduA1kf+p3s1VUCyFXlu6m7mYSuuv/Nbh3Is6KyvY4XH+tj7/Wn1geFdm+HXCmccBHWSaVQc6QJZBrxwU3Do3EoSkmoDL23IlD80rtbDc1q8CrNbqcNmKuz5xknYA6TrWbrd4NXDKRledjl95sCm4cmgj4FHiz4vsAT4GncWj+Ae4Dv7Y6g804NP0pJnqJEuskbe/gLsIl4JvGAB/nIUcmiExu1NKEI1udQT6vT6b4RDq6vg/sju7r/3DK22XNeXguBa2805iDjwtusRQq+YW/SFJXy0qoqirABfgFeKvmJxZG1z8LIVv2hl53qtMsTwOATxRc0S0ZkqrkbbKUpC7TQs4d3OoMosJ+emgW2+oMNA7NG8DrwGvAE+DR6IepvV4CD0ZlUZ1ODxo76DgpcH0vu0qEJoGr+yXU9JCLDi7ca8W+D4GHjcxXuIXWAyzw00xZ9HHuuROlELrhr+0BfJZdoxvFEipJ3d68lklDb9AD/q7R5S+z16f5Ovho5Pz2LFkR3fIXshUpOEtA/U62XCihVHH+mFfAFyIei+riePRI2l5ZgqWoLn4U8eSlnWQdSc0ZeF8hww/8zvNwJ068QncddX5vdfsbzLmSwL2sItvA6YOci+piq5v9WDGMn1zA/1fdDjhjxFwXuAicGzXfE+GW8Qa9Ks49FHATA7U/iZWVlZWVlZWVlZXV/OlfogGsuXT788cAAAAASUVORK5CYII=)}[id^=GPelevationPathPanel-]{width:280px}[id^=GPelevationPathProfil]{height:150px;width:inherit;line-height:normal}div[id^=GPisochron-]{top:0}span[id^=GPshowIsochronOpen]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4AUXCjIhczCQjQAABBBJREFUaN7tmE9oI2UYxn/vTCeQHjxou2ULroIHsazYg4ekiiDSk+AtSiyZNqbLtrYUFC8NKwTcbW+LuNm20ubQySGwvfWwe1gvImuDFxXqgqhgPWzp0t1jo0knr4dOutO0tmkTpcV5IJCZL+/Mlx/P93x/IFCgQIECBQoU6L+QnKTItu17QJ93ec9xnNcDlIfLOGFdn+/7awHGFjt6aGjo5Wq1mgIuAe3e7S1gXlUX8vn8ais7tzJpXVKpvhoNuaOSoXrQbxSkOGl+oYbxc9+1SvZMg47FYqFwOPw5cNkbBS7w0Gs+B5iAKyJzW1tbHy8tLZVbARnRuZ336UIk5F6uh60gK2nzhiBjgKrIxGmFbTQI+Q4wCqwDI5ZlnXMcp9txnG7Lss6p6iiwoapj4XD4diwWCzVvgWrvk/7JcLFsZtVnDAUpps2bHmQAEa2+dGYdbdv2jAd5pVKpvFMoFDYP+l08Hu+wLGsZiIrIzcXFxfFmOlaLBER8z9lxNhnU52Tvn+h8xHJH/iliTjVoL5N/ANYrlUpvPeREIpESkQnHcV7xwf4R6FLV3mYz+yDYBrpQhTLIh2cFMkDbYY3exGcAnx3kZBEZ2OGxo0KhsDk4OHhVVWcMw0gBHzXpAtVpd6I4aVKD7SLDe9zRJOSVdNtJzam+a62L41B0avvPhkGLSL+qupZlLdW3DQwMPOUt7a7vcaHqLSCrqv0tGnKq0+7Ed5Mmrsj43iGoCy10cgZ4E3juGDV/eZ8S8AvwDfAlUDmWo1X1ArCRy+Ue27b9PvCsr/kFICQid/w1juM8sm37IXChlUPPFUT2Z4u0KD5rjnzjBPW1FVYP8GstDI4Fum6oXAHqZ/Xf1tbWvj1gJIiqaisA1y3h6l+UKpZN1cz+pd/xXrGrr4Hnj1lfW2E98PGqj5Mjo+MPVX0xlUo9ncvlehrcnj+jqp3A/X8Fsui8VCmr1O7JcLFs0gTsGpSMz1RHjRSNTm3rSrrtPNAFdACbwEZ0alvrITcSHXeBnnK5/C4w12DH3wMMr7blkCOWO0IGLU6a+mQ1cnLYHph6d2uDteve3qK5DYuqLng7vk/j8XjHUQ9LJpOdXsS4hmHkmgFdTJvZvXGhs5FrOyAFNDLtToDO+ow5XCybN87koVI+n18VkTmg27Ks5cNgJ5PJTtd1l4HzwMzi4uJPTXbt+91JRXQ+EnLHxec0AY1MuWOoZnd9gXH/tII+ctb2tuC3gbeAByJyVVVvOY7zqJbJXlxc8SB/VSqV3m7ReccoUr0YmdoLed+mJm1mUWM1Ol2ZPfOHSu3t7ddVdcQ7QKoCG15zl++gaaZUKn3SCsj/62PSRCJxEfhARPp9y6DfVfWuYRi55uMiUKBAgQIFChQoUHP6G9rPw3e7WtEyAAAAAElFTkSuQmCC)}div[id^=GPisochronPanel-]{left:10px}div[id^=GPisochronPanelClose],div[id^=GPisochronPanelReduce]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhE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Fsui8VCmr1O7JcLFs0gTsGpSMz1RHjRSNTm3rSrrtPNAFdACbwEZ0alvrITcSHXeBnnK5/C4w12DH3wMMr7blkCOWO0IGLU6a+mQ1cnLYHph6d2uDteve3qK5DYuqLng7vk/j8XjHUQ9LJpOdXsS4hmHkmgFdTJvZvXGhs5FrOyAFNDLtToDO+ow5XCybN87koVI+n18VkTmg27Ks5cNgJ5PJTtd1l4HzwMzi4uJPTXbt+91JRXQ+EnLHxec0AY1MuWOoZnd9gXH/tII+ctb2tuC3gbeAByJyVVVvOY7zqJbJXlxc8SB/VSqV3m7ReccoUr0YmdoLed+mJm1mUWM1Ol2ZPfOHSu3t7ddVdcQ7QKoCG15zl++gaaZUKn3SCsj/62PSRCJxEfhARPp9y6DfVfWuYRi55uMiUKBAgQIFChQoUHP6G9rPw3e7WtEyAAAAAElFTkSuQmCC)}.GPisochronCalcWaitingContainerHidden,.GPisochronCalcWaitingContainerVisible{border-radius:5px}.GPisochronChoiceAlt input:checked+label+span{color:#c77a04}.GPisochronChoiceAltImg,.GPisochronOriginPointerImg,.GPisochronTransportImg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAAcCAYAAADvCUNwAAAV90lEQVR42u1ce1RU173+fmceqMNTlIcoMYCVC6LUWl4Gn9Wbq4lGrpLXutZEwxCTmFsTY0BsaasQTWp6YxJmJj6aZNVWEhStWbUxMSGmgo9eNUgwcbDXRxQVZgRRcJg5v/sHZ2AYBpgZBpvS+dZiMXP2mfOds8/e3/72bz8AL7zwwgsvvPDCCy++XyBvFnRAo9GsJKJfAVBJh24BWKtWq1/vD77yNfKVYNjx0drUgtbX/xHPz8w+AJYAGA+gFsA7RFQ7UPi8GPiQe7PARt07ixmkz78C0D8C01nMJD7uP77esQPAAgDHAMQDUDNzAhEZBwjfgEFRUVGEIAhvM7OvKIrLly9f/k1/8h1egwiB6W0wfGUyXv7jdfjm+5gvgrdodILKwTHfAcTXk1sKBvAAAB0RJQN4GkAEgBkDg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3qxM/ypAprjaE5f8+3xeeEwcI8BkwE/O68XuyVj4E8kvjIRT4AKC4ullnjnE899dRBu4q9U+p+TvXUeyle1DEYkLzOfNDOue0E8wzyIF8f8A4cLJ9ya6uOgbDBoxvbB1mx8cqVKznubh9ETm8f1P6GNqYozDl3Y/sgZp4DYBuAUClA/iIRaQcK3z8jtFrtPrQteSpTq9XT7NICANzwZF2syKV9AM0lUFlygaUT3/HVCDDLhBsAkFIg/kP3rGNmFYAzRDSqz4I2kKDT6RYw86sAons5VQ9glVqtLu0L3+E1sgXEeBWgXvhYz4xVaYWW0rtcUASpC3aViMwDje+fCVu2bImxWCxnAMgEQZhp79A8bS4Ov4wYQRDOAJCRIMzs4tDQtvTr+yBoUtnZTETPdTKR/+qFJisra3dQUFAcgExm/j2AM5JbaAJQzcy/Z+ZFAOL6KmYAkLbesttfaYlj4kwwdeED0++JeZGizhJ3t8XMGssgou/ulrjcbb5/JpjN5uEADIIgRDkSMwkmIvLIPoQywnACDCSIUY7EzMoH8Iffkyza7i0lXnjhhRdeeOGFF1544YUXXtwl/D97JTQuDxIoMgAAAABJRU5ErkJggg==)}.GPisoExclusionsOption{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAA4CAYAAADuMJi0AAAE60lEQVRYw+2YWWxUZRTHz/fd7y4zzAzTbaAdpgtQWsBiYVxYGpcEMCwRQkx48KHGhKg0WhESNYglwSUgWCKGTaMRBF4MwShpECUshlJqay2U0LCUwrRAp+0Ms997v8UnEl8Gp9Ppg2Z+bzfnn+/knHvud865AFmy/GfZVVZW/vvb9eduNn7Wc+ixGQ3/pm+UcO735VP3/rpsyc39TudHyXQ4maF61cqfZi97ocbjmVi6YGHNxoOeor3JtDskae606uqzFfPmvRqLxFg4EetIpiXJDJqqOHBwEEjIDyXjiVw4t/S1XD34TKs/MX+z4EEAgK0SwhPtjh+qq6tXBjGOtTY11a31D371qEygRxn3F3vWPVE1deN0G82T+m5BbCAIF+8lBttifLoFQeV0W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7LM3L816LdLBedlTIKU05lUNfJM2ZzEBZORXzuHrtk+vnSu63JGF9LhvmH9/uVAu8s9MUQFnWUSIweHFJ90z7qlq+n6L2OyAQMA918NdLrcrqgwoQrHyAHWqX49PDzMxsohAIAUuZ0YsHJHSO+G5t7eXj+k8ZsEjfCmsQGABgAmAMQBIJEdN7L8//gb3FshBGMt81oAAAAASUVORK5CYII=)}div[id^=GPisochronReset]{background-color:#c77a04;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATQAAAAcCAYAAADvCUNwAAAV90lEQVR42u1ce1RU173+fmceqMNTlIcoMYCVC6LUWl4Gn9Wbq4lGrpLXutZEwxCTmFsTY0BsaasQTWp6YxJmJj6aZNVWEhStWbUxMSGmgo9eNUgwcbDXRxQVZgRRcJg5v/sHZ2AYBpgZBpvS+dZiMXP2mfOds8/e3/72bz8AL7zwwgsvvPDCCy++XyBvFnRAo9GsJKJfAVBJh24BWKtWq1/vD77yNfKVYNjx0drUgtbX/xHPz8w+AJYAGA+gFsA7RFQ7UPi8GPiQe7PARt07ixmkz78C0D8C01nMJD7uP77esQPAAgDHAMQDUDNzAhEZBwjfgEFRUVGEIAhvM7OvKIrLly9f/k1/8h1egwiB6W0wfGUyXv7jdfjm+5gvgrdodILKwTHfAcTXk1sKBvAAAB0RJQN4GkAEgBkDgW+gQRAELYB5RDRDJpPt6nc+Ji1A80A0wyIKu76v+eKWQ9NqtQwAarX6rnRZy3PlDACpBeZ+4SsuLlYaDIYFzGwmIvs8Met0uszAwMDSzMxMkyf4qvKhbGyVLQDD7OAdmMtzZZn+SktpfD5Md6sgEFE9Mw8C4CMdCpb+Xx8IfAMQU20+x92FEtKvfMy8AUAWgFlEdNzb5XQTGo1modFo3EhE93aXR8y802g01mg0mpeys7P71DpV5MgWNpqwEeieD6CdjSZZTXkOXkottDjFZ21kHEGtVpMz6TqdDgBQWlqK1tZWNDQ0YPfu3WVwEGu1NjKOkFpgJmfSK9YoAACnNemwmJrQcv1bVBalO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A8bS4Ov4wYQRDOAJCRIMzs4tDQtvTr+yBoUtnZTETPdTKR/+qFJisra3dQUFAcgExm/j2AM5JbaAJQzcy/Z+ZFAOL6KmYAkLbesttfaYlj4kwwdeED0++JeZGizhJ3t8XMGssgou/ulrjcbb5/JpjN5uEADIIgRDkSMwkmIvLIPoQywnACDCSIUY7EzMoH8Iffkyza7i0lXnjhhRdeeOGFF1544YUXXtwl/D97JTQuDxIoMgAAAABJRU5ErkJggg==)}div[id^=GPlayerSwitcher-]{top:10px;right:10px}label[id^=GPshowLayersListPicto]{width:36px;height:36px}span[id^=GPshowLayersListClose],span[id^=GPshowLayersListOpen]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAkCAYAAAAq23xmAAAGfklEQVRo3u2YX0xT7R3HP6eUyp9DQUUI6BTKaCx/BowSNPXKmy7RKDF5r19v95ItWZYtTqMciGNxb+LFe+edu53DSjRxxisF5x/wBaNQB1rNG1ZaoAd6OFDaHs+zm9GFvTBfoEWz9XvV9DzP9zzPN9/f9znPD7LIIossPiFM0xRZFXZA5P9VoaXtEkSjUbG4uAhAUVERxcXF0ue6WUVRrgM/URTlpz90jmWrL0skEmJ6elokk0nsdjt2u51kMsn09LRIJBKfnZt6eno8wJeAvpl5WxJodnZWqKpKYWEhNpst9b/NZqOwsBBVVZmdnRWfWQxcAbBYLL/LWInpui6i0SiFhYVYLJaPLYilpSWKi4uRZfmTll13d/cXQog/A39RFOWLtDvIMAwRCoXE8vIyRUVFa8QxTRNN09A0DdM0/01ssVBUVMTy8jKhUEgYhvFJHHXt2rVcIcTvgWROTs75zc63fmyAqqpiZmYGWZa/92xlZQVd1xFCrOYSsiyTl5eXGrP6e2ZmBlVVxZ49e3bUTdPT0z8HaoFvLl68OLnZ+Rs6KBaLiWAwKIDviWMYBgsLCywuLqbEARBCsLi4yMLCAoZhrJmzyhEMBkUsFtsRN125cqUIuAAs5ubm9m6FY12BwuGw0DQNWZaxWq1rBNB1nfn5eZLJ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gwAEaGxtTt3vTNHn58iVTU1M4nU5279695lR78+YN1dXVdHZ2kpeXl7bySiQSl4Bi4BfpFOcH9YOCwaDw+XzIskx5eXnKTUII3r9/z8zMDC0tLQCMjIxQVlZGVVXVmnFzc3NomkZHRweVlZVpDWdFURyAH5gCXIqiJNLJ/9F2R2VlpWSaphgaGuLBgwc4nU7y8/ORJInq6moqKioYGxsDoKmpaU2rIx6PMzk5ybFjx2hra8NisWTiw/BrwCZJ0m+7uroS6SbfdEfxzp07RCIRHA7Hhl3FVXeVlJRw8uTJjHUUFUU5AvwNeKYoylEg7R0C62YGr240EAiI/v5+KioqKCkpSZUTQDQaJRgMcurUKRwOR6abY38EJIvF8utMiLNpgVbhcDgkwzDEw4cPef78OS6XC4CJiQmam5s5c+YMVqt1JzqHMvCnS5cuPcrUC7a9CVVVxa1btwDo6Ohgp1uqWWSRRRZZ/B/jn0nf6l+CD/6FAAAAAElFTkSuQmCC)}span[id^=GPshowLayersListClose]{background-position:-36px 0}div[id^=GPlayerSwitcher-] input[type=checkbox]:checked+div+label[id^=GPshowLayersListPicto]{box-shadow:0 2px 2px #000;border-top:1px solid #ccc}div[id^=GPlayerSwitcher-] input[type=checkbox]:checked+div+label[id^=GPshowLayersListPicto] span[id^=GPshowLayersListOpen]{opacity:.4}.GPlayerInfo,.GPlayerInfoOpened,.GPlayerRemove,.GPlayerVisibility,.GPshowLayerAdvancedTools{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAAAcCAYAAAD1EPTXAAAIRUlEQVR42u2aXUyU2R3Gf4eZQZjxo2peQzCCsSL6NkZjHQWrDjEYqxKjySy9MZpsooYLGIia1K+tXogaQhC8mKvGQJW0drKa1ErMbohYK7QzRal2LFiN7LiTcV8Tg2RGw3ycXshM/WCV+bAum/e5mjnnvO/D/5znPOf/Pwzo0KFDhw4dOnTo0KFDhw4dOiYGhD4FOj4W9u7du9BgMKx9vS0ajV5vbGz893jfYZxoQV+5ckU+efKEefPmYbPZM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IR+wrGghk8v0tLS1LYrHY7enTp7Nw4UK6u7tZsKAYgIGBflatWsW9e/fihrOktrb2n2k5aBx1dXXi0qVLiWLpdcSLo/Pnz4tM/Tdp3bp1ory8HIC7d+8m8s94fgNgs9nSEudoXC4pZSXw/H3OmQlxApSciLrEB/iAoY8hToAVDQTiOWimxZlskRSLxR5nzEE/JY4cOSJ7enrYtWsXlZWVH+VvbmlpUaLRaLUQYjOwYLR5ALgciUTO7Nu372km+a4fQDEKY7WAN/iE4LLRFDmz/ChPmaA4ffp0EDCXlZVx7dq1xB3oN98MEm8DQrW1tZYfhUC3bt0qg8EgLS0tLFq0SP+J4A9foAP87xdh33cqDTgcjmJ9tnTo0KFDhw4dOnTo0KFDh44fC/4LLzyqAy83zsEAAAAASUVORK5CYII=)}.GPlayerOpacity input[type=range]::-webkit-slider-runnable-track{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAECAYAAAAZDrhMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAwSURBVDiNY/z379//v3//Mvz9+5fh379/DITYxKobKWYxMYwCisBoAFIIRgOQQgAADrTuhXfc36kAAAAASUVORK5CYII=)}.GPlayerOpacity input[type=range]::-moz-range-track{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAECAYAAAAZDrhMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAwSURBVDiNY/z379//v3//Mvz9+5fh379/DITYxKobKWYxMYwCisBoAFIIRgOQQgAADrTuhXfc36kAAAAASUVORK5CYII=)}.GPlayerOpacity input[type=range]::-ms-track{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAECAYAAAAZDrhMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAwSURBVDiNY/z379//v3//Mvz9+5fh379/DITYxKobKWYxMYwCisBoAFIIRgOQQgAADrTuhXfc36kAAAAASUVORK5CYII=)}div[id^=GPlayerInfoPanel]{right:190px}div[id^=GPlayerInfoTitle]{color:#c77a04;border-bottom:1px solid #c77a04}div[id^=GPlayerInfoQuicklook]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAI9SURBVEiJ7ZZBSxRhGMd/7zi7SGxLg4mWnSIWOoSFKLvbyUN5DtMPUEqfQNLJg0GuJlE3L+UXcA8JHRKDCERmaQOLTnoKXEkhq11nDzm783TIXdZ1d9TdCEL/p3mf9/3/eJ73eeedgWMnVTqYnp42gI7DGLPZrDU0NJQtj+t76Eq1h0KhN4FAwBNm2zarq6vdwDtPIEAwGMQwDE+gpmnV5zydNWhfhuVysxvY76dwNj8A4G/tgtBgbUA3+5Ufc7cQZxu9pROAX19eI6lFjNO9zUcG2skniLNN8OZz/OejAOysL5FeGOTcz7l7QLzc47mHzkYSvaWzCAPwt11Hnb2Gz92+Wsnz15viCfS3dpHbTLKzvlSMOetLyLdlclpwuZJn3x5mMhlc1/0zuHQXSS2SXhiEpt0Ktz4ieoBM4+X52b7Nhv44+apA27aTKysrN0pjZwK3m9vScwO+rc/tAI5mfPp+qvNla3p+qinkuyJjzh01hutV6aFkjeijlqlLwmyYkbI7oXaoqT+yTF0sU39aiNXV5UgsNwo8A7VWd3YnOs6qeMItU5fCsyjpj47n45ap3wcmS9dFYrl9fq+DnVKouIa2tmt+DPLioAyr3tgKZYVjTn9hnBj2dQjSexDwUK9e4oEvLJq8BQwgg5KZuoCuSDcQBDJKqZ7IeH4AeFgzMBrLTShhRCnVEx53EsnhxovKVa8qrT3wu1xQeCJX7HBey08K0keFU/Lv/hwEiSRM32y1uSMDgQu7ZZ3of9dvep7Bwy5Q9Q8AAAAASUVORK5CYII=)}div[id^=GPlayerInfoClose]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAgCAYAAAAFQMh/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAFgSURBVEiJ7ZS7UoNAGIXPYYe8i52FMxKfJ5kEQ+yhSiP2MXhL3gfGxs4ZXyXO8luEyEXIglruaffsfv91ASsrK6tfin1MaehOhfnFeKR9rpC3eQRgFqq1OM7H1e3n5s/gNHSnoDwBcADZeSM9a8IFYBqpe4ILACLkjQnumMBgfl76OMn2aiOVgAVgFqmkgAIAKfmZ6Vkj2It1AJFK9PSzSL3ICs4xU4B+eSxbb6SXxnxMBqDsH8igjFh2ObAHeF2DunreNQeDwW1waV4eAB0EPsJfQ7XWZFC/2D50p2QeroY0wR/RyrAEgIGlrqxMm2NQ1r0yboVSthRJShcn2V49y6rfm0ZTF9Rz9fzyTi8bq9Ybbv65IpXUVgby6MV6wcNgf38gtV2GPIxj3dGSg3qUxXkDir4dPofgCC0iFy/Wi0rmInDeze/2UBq6fhqpRE5UqGhJkoau3+WxsrKy+hd9AZasoFzDGcuhAAAAAElFTkSuQmCC)}.GPlayerInfoLink,.GPlayerInfoPopup{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAI9SURBVEiJ7ZZBSxRhGMd/7zi7SGxLg4mWnSIWOoSFKLvbyUN5DtMPUEqfQNLJg0GuJlE3L+UXcA8JHRKDCERmaQOLTnoKXEkhq11nDzm783TIXdZ1d9TdCEL/p3mf9/3/eJ73eeedgWMnVTqYnp42gI7DGLPZrDU0NJQtj+t76Eq1h0KhN4FAwBNm2zarq6vdwDtPIEAwGMQwDE+gpmnV5zydNWhfhuVysxvY76dwNj8A4G/tgtBgbUA3+5Ufc7cQZxu9pROAX19eI6lFjNO9zUcG2skniLNN8OZz/OejAOysL5FeGOTcz7l7QLzc47mHzkYSvaWzCAPwt11Hnb2Gz92+Wsnz15viCfS3dpHbTLKzvlSMOetLyLdlclpwuZJn3x5mMhlc1/0zuHQXSS2SXhiEpt0Ktz4ieoBM4+X52b7Nhv44+apA27aTKysrN0pjZwK3m9vScwO+rc/tAI5mfPp+qvNla3p+qinkuyJjzh01hutV6aFkjeijlqlLwmyYkbI7oXaoqT+yTF0sU39aiNXV5UgsNwo8A7VWd3YnOs6qeMItU5fCsyjpj47n45ap3wcmS9dFYrl9fq+DnVKouIa2tmt+DPLioAyr3tgKZYVjTn9hnBj2dQjSexDwUK9e4oEvLJq8BQwgg5KZuoCuSDcQBDJKqZ7IeH4AeFgzMBrLTShhRCnVEx53EsnhxovKVa8qrT3wu1xQeCJX7HBey08K0keFU/Lv/hwEiSRM32y1uSMDgQu7ZZ3of9dvep7Bwy5Q9Q8AAAAASUVORK5CYII=)}.GPlocationStageFlexInput{margin-bottom:5px}.GPlocationOriginPointerImg,.GPlocationStageRemove,.GPlocationTransportImg,div[id^=GPlocationStageAdd]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAAcCAYAAABF79LlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAzSSURBVHic7Zx/bFxVdsc/575nl+BAGLWJYmVF1RUI9UfKbqGJHZKFghZVSgiriEQVlbKAnXmTHyTdVNtgJ1mGruNAqw1tQrDfOD8olSL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C9UdW00Gj1R0bfJQ9ve1MsiupZ0pBdhUg/LpB6qa5ftSdWsdzURkXOEeytUdWBkZGRL+q6c6ddoNLqZqUivIvJxqXE9z/vQcZwVwF+nm8Y6OzvPq+rDOabRYuNEIpGzuW3z5s07A4yq6uvGmE0Ay37IhzZlVyBTesue5rwo0/S0hN7Pf8oMvQufBGcQRlF93VrdlO+6XFKp1GSlw1r7JPBoVve2ffv21Te5aMykXgp9UpBJPQPbhr5X32SmiFwhfABokYiUc2x3f/r16zPGKlf0yJEj84Mg2KqqKwlLIADnCPfs+z3P+89yxyqHt7qY32Tc8GEdTesJ51Q51dwc7L8zTl31Msz203K+729U1d/yPG+as2ejqpJeDfyz53l91WolEolDOafmujzPe7rE/KbNqdzSKsDZneaQKFN6SlfbXltUL/fwSluvrbhKkZmzMea+DRs2vJ5p7+/vfy1dpjzmeV5u8qtqMnMWY+5b2hNM6g13yWuI3KtwrL3X1k2vGlT1LLBQRH4tu73sslx6qb4b2J1Vh68qG18O4amrYDewe7IOX0U2vlIq+QOvcvw+gFgsVtAmfSMotYwvyfj4+OMtLS2rCfd0L0QikT8v47JdhOUgBzhWiZ7+j33czDGrFSYEXrhw3pbUU9glaT2pUA9gcHDQSSaTAGQ7O4CIHCdc3tetojC4lskDLdnODoAxx1G9V65OxaQUA+Q5ntuow/8Ckz4kU1ZZK4PneXuocs8bHpIpr4yWob3XVq0HkEwmT6bfnsnTfRzwgUXVjp/LzbfKSQgTjrl9bpA6Hjimrno1cBx4Krexqv9443mezHYkzKa9N5BKTtE1+P/BoUOHbiH9QJAx5k9z+z3P+6KeekNPcAukHwgyMkPvzmeoq14tiMh/A3+b296I8A2uWYIgmC8iY8aYpRs2bPiXAmYTIvJ39dBzhPnAGMYuXdpjC+qB1kWvDhwtbdKgQYMGDRo0aNCgQYNriP8DimGotcEqvNwAAAAASUVORK5CYII=)}div[id^=GPmousePositionPanelClose],span[id^=GPshowMousePositionOpen]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAHjSURBVFiF7ZixctpAEIb/PVk09otkxkUKF8LPc45NwO5RGhqL3jZxHO55InVpMpnxg7iBOf0pLGEQaIREFJj4vhl1dzv7z7+7twA4HI53idaaWmvuO4+6qH0n4HD8XaTpxbx/jTGNY1QRD/0LSnrW7diejJBuOkNAkqF3R6Wez2/nD1UxD7aH46F/AeE3gXxKZt4TR+u5EpA49O4hMhDy7scXf1AV96hpQm06CwCQ9CMgmUjRycybE7YvAIHM2dCbCKSX3xCmH6rCHqzDQWQHIJdKVHpJ6H3nCGrh7JtYQDgNOva6Km5tl8re3jYcz/sTIotSVaBJgRkgnxcHhdPAt1dlfb7MLg6/ZF9rCMBgbG+WnbYQ3VQssEFwcYMq2ahejDEnxpgTFERveX9rctGKfCCKJUlTRyxwwD1cxApkrWdYvyV36eHc2WOgvamdDyiB9EtOmKBjLxuXdA2Os681NooVToWcvJ0SXfZOb6Ldt3QHysQGvr3CCCxO722dPljBcehNVqYx+BhE64vHylsMfu1GtqT0X2lc0u3/HlY/gcyt16VikIsFsukd2f7Sk0VC/a6K2ni1bJtuNDfx0Pch6Wlwuyo2RwBybG+S0FOg+nU+nj/uI1fHf4H7T8vhcDj+AX8AnMTkomeXEcwAAAAASUVORK5CYII=)}.GPmousePositionEditTool{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAASCAYAAAAzI3woAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QYXCC4cQlf82gAAAvFJREFUSMfllk9PE1EUxc99DDQBxZV8BKGUlkJKQjEK6rIWDQETFy5o17JwQ1s0QEKhbNTA1kLixogkhIBbURL+JDYyFKTtZ9DEgIQEmb7rojNkWmYoG42Jb/fm3rz5zbn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1zRt5PB3y1LmARxocLvXXq7WPOmHA77btB25q2ciEAUQjr9hrg5ei6WcohcPXnCAJwI5zDlVC8p7Ozft+2xHTFI7r1c/rI52FCMFZHfCbzqrJqH+sNSXVhJusKToyn+KIlxIpo0dIf/GOedfRu2Dd+tjQQDNJNZGhD7OZrz8XAbQLXDtpqQ6NGNX0pdKcfM3WNELJAURMBzmnTyHb9nskMdo0p95UPjW8E2Fyk9PIB5TQS2vJCoqJkYWmEiTCIsUAeHc0iWcArIti01Ujt89K/A+D1E+N+7GXOgAAAABJRU5ErkJggg==)}[id^=GPreverseGeocoding-]{top:0}[id^=GPshowReverseGeocodingOpen-]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPcSURBVFiF7ZZPaBxVHMc/vxl3UggSwYMGAkVEqwfRQ4VNQRTUSw/2ksWiJZTs27QxaSGe3FRhpXS9qWiyavZPsBRLWal/QBHxIK2QPSiClYAeS8BbygTFkt15Pw87m2w2s91kiQgyn9sM733n9+H93nsDMTExMTExMf8Vsh8hxpj7gCngBeBhoA6sAO+USqVP+81dziYyKvbwqBdMSQ4bNUZBaln3PXWc345cqM/3yryjcDqdnhCRWZoSa8CXqpotl8tr7eOMMb8Aj0UWpPpyuVz+pFchnSxnExlEPwQc0FLSC051SivI8pz7viDTgKrI2V7STpf3kk6nL4tIGXgA+AnYACZF5NfJyckHO6QuAioi3wJ5VX0b+BtARF7dq2yzAvvEVn1iahvuvLYtkILU5tyFULb5KbWP9oq9K+qlMWYCOA587zjOawCNRuO267pHVTVvrV0Cnm5+F1zXLdbr9a+XlpZWWhmZTMZT1RngkT50SeaDmVrWtYjMhD5TtTk3oV5wihwaruzU5gTRYjIRnOmVG9nSxpgbNFf2OeAAgIgoUFfVWWDMWvtkpVL5sVuwMeZz4Bhws1QqHdytaDut/bklDQ5asrAB8sqWhRaTieB0t33eTreWfgi44TiObn5cVVTVcxznOoDruoe6hWYymddpyrbavS8ENPlWcBbVzX0ZIKZfWegufAsYbjQat8OVbWaLaBAE9wOo6q2oicaYN1T1fPj4zfr6+vmocbulJe2oziudLamlvchCF2ER+QI46LruUZpXzGZLi8gUsGatvd45zxjzDPBm+PiZ7/vHqtXqxm6LuROBIDv2n+79Wo0UttbOAX+oal5VZ0XkcRF5XlW/Au5R1TOVSuXPiKljNBfhd9/3j++HbMfVsx2RdG3D/UhzXTt1B5EDy+XymuM4T6nqD8CYqr5rrT0HWOAlERk2xlzO5XKdp/wBmtvh2r8mK1oU1YWtUWL2It2rJSSTyRxW1UPAmud51wqFwl/GmIvACeCS7/snq9VqsGebHnSTTSaC0+TQztO728/JDqF+ikmlUu7Q0FAFGAeujIyMnMjlco3x8fF7BwYGnhWR2uLi4s1+slssz7kL205j9INkPpiW8O5v/XjQfhejhdF8sLP129h177dTrVYD3/cngEvAi6urqyUAz/OuquoVa20tlUq5/WS3lfYzhKslWkx6wUxLFsLTOx9Mt11ZqjgrEUHbU/stJ5Q+CXwMfBe+bv1yDg8ODt7dbzbAaL5eQmUGtJC8EN2qm/c0WkBl+ki+vhCV1TFn/zDGnAOyInK1WCyO72d2TExMTEzM/5B/AE2JsceuwAzdAAAAAElFTkSuQmCC)}[id^=GPreverseGeocodingPanel-]{left:10px}[id^=GPreverseGeocodingPanelClose-]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPcSURBVFiF7ZZPaBxVHMc/vxl3UggSwYMGAkVEqwfRQ4VNQRTUSw/2ksWiJZTs27QxaSGe3FRhpXS9qWiyavZPsBRLWal/QBHxIK2QPSiClYAeS8Bb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XwMfBe+bv1yDg8ODt7dbzbAaL5eQmUGtJC8EN2qm/c0WkBl+ki+vhCV1TFn/zDGnAOyInK1WCyO72d2TExMTEzM/5B/AE2JsceuwAzdAAAAAElFTkSuQmCC)}.GPreverseGeocodingCalcWaitingContainerHidden,.GPreverseGeocodingCalcWaitingContainerVisible{border-radius:5px}[id^=GPreverseGeocodingReturnPicto-]{width:30px!important;height:30px!important;background-color:#c77a04;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4AYBCQs6x0UYEQAAATZJREFUSMftliFLBFEURs/dVUQURJvYLCaLGESz1T9gUJsoWARBEBRM/obFIFgMygabTQSbVoNgMCqYLMLusawwYVdnZ8bdsHvS8Oab97377p33LvTp09OoJ+qHOt9p0x+28s5XSml6DOwlhuLfjdVD4KDoHRz4w3QfOGryakUdBerAG/AMPEXEexE53bU96uqtuqaWs5rumI87dSJLjmdybtgScNl25GqoFfOz3sojfjEvAadAs49vgIfG8yAwDkwDC8BQQncfEYtZcl1Wz5tEst1CP6aeJXQ1dSproZXVizTGiTRdJ7QbmQ6QiKgBq8BVmoVGhMAm8FVIoaqDarXxvy6n0P8U52URh0pJnUypnW0YP3bjGr1XXzLfTjmoAMPdiHhEfe14xBHxCVS71S7N9ZvG3uQbY/KgCDQBMlkAAAAASUVORK5CYII=)}.GPreverseGeocodedLocationHighlight{background-color:rgba(255,200,0,.25);color:#222}div[id^=GProute-]{top:0}.GProuteStageFlexInput{margin-bottom:5px}span[id^=GPshowRouteOpen]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAJySURBVFiF7Za/btNQFMa/z46rRkwIiXdAYmBAwilrxQBvENS7kJZWcbsnSChLk70tKk07OSISDwALf7Y2VhcWhMQjFAmxVklvDkPqNHFtktwmUCH/Nl/rfDlfzp9rICUlJSXlP0MpdaKUOvnXeZiQMYy7PdUs/iKJhpeWlm6QfAvgyeC57/scfFZKSVy8iNSz2axXr9c7psm1Ss6ysHs/N6fXWEE39ncABiV7Syzr+8JmZ2eUphV3qJS6RfIDImYngeTK6enp+3w+f9MkvlVylkF5TXAlaNt7UrmcqwBsle1tkB5Fto5eON4o3VjDAN4AyJkkGmExk8n4RpHs3kM/PxaCtr0jQL+7BGBQtl8RLIYRlO6dUbJJhp8CODJKdJiPZ2dnyiTQrWoPIgMtyrWgbNelAqtfWXDt4rXsu3N6fZRurGHf93+KyCMA70ySBXozPD8//7jZbP4yiScgbk1vREwXjtv2XlC2dwYq2zPr6NWkOY/oTk64qKILbBaESwmkd/48nPQEZgHza6lPZEsfisjLRqPx+aq6IQREanrjuGRDk97wPywHk5gFkmfYlIckP01ZEwCgCV5qJ5m8Q6dt+JDk4jQFwwU1NLMh5LOkKyuJK7f0LOc41ixln120heEZC0HbhlT083Fae9oVnhpJZl1Hrz6o6fXo9h630tfW8KWrB7Lrbvaq2L+yILsX71kI2vb2KN1raxiwvgDnLdr7qPDYu5V6R4C4VV0cqLQIrG+jVK88w7MiV+0ctEqOA3bvupvDZkPCKyso2xbE+rpQ6+zGaQ1ybQ0DQG4MAwQEVV0E9FiapoZ/GMalpKSkpKT8gd85//Z5bfxYOAAAAABJRU5ErkJggg==)}div[id^=GProutePanel-]{left:10px}div[id^=GProutePanelClose]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAJySURBVFiF7Za/btNQFMa/z46rRkwIiXdAYmBAwilrxQBvENS7kJZWcbsnSChLk70tKk07OSISDwALf7Y2VhcWhMQjFAmxVklvDkPqNHFtktwmUCH/Nl/rfDlfzp9rICUlJSXlP0MpdaKUOvnXeZiQMYy7PdUs/iKJhpeWlm6QfAvgyeC57/scfFZKSVy8iNSz2axXr9c7psm1Ss6ysHs/N6fXWEE39ncABiV7Syzr+8JmZ2eUphV3qJS6RfIDImYngeTK6enp+3w+f9MkvlVylkF5TXAlaNt7UrmcqwBsle1tkB5Fto5eON4o3VjDAN4AyJkkGmExk8n4RpHs3kM/PxaCtr0jQL+7BGBQtl8RLIYRlO6dUbJJhp8CODJKdJiPZ2dnyiTQrWoPIgMtyrWgbNelAqtfWXDt4rXsu3N6fZRurGHf93+KyCMA70ySBXozPD8//7jZbP4yiScgbk1vREwXjtv2XlC2dwYq2zPr6NWkOY/oTk64qKILbBaESwmkd/48nPQEZgHza6lPZEsfisjLRqPx+aq6IQREanrjuGRDk97wPywHk5gFkmfYlIckP01ZEwCgCV5qJ5m8Q6dt+JDk4jQFwwU1NLMh5LOkKyuJK7f0LOc41ixln120heEZC0HbhlT083Fae9oVnhpJZl1Hrz6o6fXo9h630tfW8KWrB7Lrbvaq2L+yILsX71kI2vb2KN1raxiwvgDnLdr7qPDYu5V6R4C4VV0cqLQIrG+jVK88w7MiV+0ctEqOA3bvupvDZkPCKyso2xbE+rpQ6+zGaQ1ybQ0DQG4MAwQEVV0E9FiapoZ/GMalpKSkpKT8gd85//Z5bfxYOAAAAABJRU5ErkJggg==)}.GProuteCalcWaitingContainerHidden,.GProuteCalcWaitingContainerVisible{border-radius:5px}.GProuteOriginPointerImg,.GProuteStageRemove,.GProuteTransportImg,div[id^=GProuteStageAdd]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAAcCAYAAABF79LlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAzSS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NriP8DimGotcEqvNwAAAAASUVORK5CYII=)}.GProuteExclusionsOption{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAA4CAYAAADuMJi0AAAE60lEQVRYw+2YWWxUZRTHz/fd7y4zzAzTbaAdpgtQWsBiYVxYGpcEMCwRQkx48KHGhKg0WhESNYglwSUgWCKGTaMRBF4MwShpECUshlJqay2U0LCUwrRAp+0Ms997v8UnEl8Gp9Ppg2Z+bzfnn+/knHvud865AFmy/GfZVVZW/vvb9eduNn7Wc+ixGQ3/pm+UcO735VP3/rpsyc39TudHyXQ4maF61cqfZi97ocbjmVi6YGHNxoOeor3JtDskae606uqzFfPmvRqLxFg4EetIpiXJDJqqOHBwEEjIDyXjiVw4t/S1XD34TKs/MX+z4EEAgK0SwhPtjh+qq6tXBjGOtTY11a31D371qEygRxn3F3vWPVE1deN0G82T+m5BbCAIF+8lBttifLoFQeV0Wf7R7XbndsXird19/TUfAhgZeZ8H7eoXHYVWwzdBFTedsmhScfg0wfQPTRF7FfLdmBRRo4Q9RzTS8aeKRaeERAsC8TmRto30HJKqMCrhIcMUMuMcmADQJAQ5GJ4fqUMpFdE2mXgqOe+ewXhJFCHoJNJxu4omz7bhScVMyj/BeFPGUrlZIROOYRT4C0C0S0h8qUhHAAC2yGTFpUka7Skfx9/DZFZGnH2gEHxYwnc6EIguBYnDqtTzT3uDTFb3VdrEcZfWk5GUrgZxaI4QCyyaBAME04sUzTvL+dBD+xnOu8qiwrIgV1leEuf9JxhvTzu6Bgm5ThXkmNcciriaS8R2lXySTHvUqXb/lqsNp3Ju0qstx2Z7sfTZGuKsLAFkV4RK0J5k2s4wXYqYsO6WyYq0HUYN06c9XgX5SxcBuIt4gvJ40sJi7MaVONtVhGHmqIrmyLPzm29tqqf7ilwHUtHvVAjO9tksWbJkyQzehd7xo5ppUqW2tlbzLp380rhxitdB8q/4fD6acnsaKfX19c7Ji+QNJU/at7mmWaaZpklHNSY+irq6urzSxbBBy1PqEoJZfFdYoK2tjY2Jw4aGBpurJvKOmme8xWTTmgjq1DApAwAxoo6fIkieEnoF2+NvUDVqCekRiNIY4ip1eb1ekvEI39/65nOyO7hWtyWc0biOogkDooYOBhhujLEDAIZG4xADAH/4sH796y42ZWBNxBGrCEZMlNBNER1k8fBtdixwwzzY2toaTCtCr9drLXzKthgSiv7ztycfjvQo4O5fpWqR5eGojg2DCX1IBHUf3n2nSey5cOpCXzrfIXp6WZXXMtdYh8pi74JTL3WTijO913tDq2qXVxplA5vijgdTIvE4RO6zYOwO3t5/GhpbTrYMjnh78nq9VlwRfRmVRdewArM6rgJBTLbxErYEAL4J5vetwFJ4jghQxMNSSAyoO42Ttl0Xz58PpzXqS5JE7G5tqrAbM6lMiyljkimoQg1m8VhK7xrFwTpdixcbAaGz2/I+ekba0dzc/iDt3SIUCtH+Lv+lArWwjWPOOeMVJjI1imgRsyXKDas+mxoc83vKUfOC/dO2lst3M7LM3L816LdLBedlTIKU05lUNfJM2ZzEBZORXzuHrtk+vnSu63JGF9LhvmH9/uVAu8s9MUQFnWUSIweHFJ90z7qlq+n6L2OyAQMA918NdLrcrqgwoQrHyAHWqX49PDzMxsohAIAUuZ0YsHJHSO+G5t7eXj+k8ZsEjfCmsQGABgAmAMQBIJEdN7L8//gb3FshBGMt81oAAAAASUVORK5CYII=)}div[id^=GProuteResultsValueDist],div[id^=GProuteResultsValueTime]{color:#c77a04}div[id^=GProuteResultsNew]{background-color:#c77a04;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAAcCAYAAABF79LlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAzSSURBVHic7Zx/bFxVdsc/575nl+BAGLWJYmVF1RUI9UfKbqGJHZKFghZVSgiriEQVlbKAnXmTHyTdVNtgJ1mGruNAqw1tQrDfOD8olSLFUNJ0UzVaxI9AcYyEGgQFiSXaKts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BdhUg/LpB6qa5ftSdWsdzURkXOEeytUdWBkZGRL+q6c6ddoNLqZqUivIvJxqXE9z/vQcZwVwF+nm8Y6OzvPq+rDOabRYuNEIpGzuW3z5s07A4yq6uvGmE0Ay37IhzZlVyBTesue5rwo0/S0hN7Pf8oMvQufBGcQRlF93VrdlO+6XFKp1GSlw1r7JPBoVve2ffv21Te5aMykXgp9UpBJPQPbhr5X32SmiFwhfABokYiUc2x3f/r16zPGKlf0yJEj84Mg2KqqKwlLIADnCPfs+z3P+89yxyqHt7qY32Tc8GEdTesJ51Q51dwc7L8zTl31Msz203K+729U1d/yPG+as2ejqpJeDfyz53l91WolEolDOafmujzPe7rE/KbNqdzSKsDZneaQKFN6SlfbXltUL/fwSluvrbhKkZmzMea+DRs2vJ5p7+/vfy1dpjzmeV5u8qtqMnMWY+5b2hNM6g13yWuI3KtwrL3X1k2vGlT1LLBQRH4tu73sslx6qb4b2J1Vh68qG18O4amrYDewe7IOX0U2vlIq+QOvcvw+gFgsVtAmfSMotYwvyfj4+OMtLS2rCfd0L0QikT8v47JdhOUgBzhWiZ7+j33czDGrFSYEXrhw3pbUU9glaT2pUA9gcHDQSSaTAGQ7O4CIHCdc3tetojC4lskDLdnODoAxx1G9V65OxaQUA+Q5ntuow/8Ckz4kU1ZZK4PneXuocs8bHpIpr4yWob3XVq0HkEwmT6bfnsnTfRzwgUXVjp/LzbfKSQgTjrl9bpA6Hjimrno1cBx4Krexqv9443mezHYkzKa9N5BKTtE1+P/BoUOHbiH9QJAx5k9z+z3P+6KeekNPcAukHwgyMkPvzmeoq14tiMh/A3+b296I8A2uWYIgmC8iY8aYpRs2bPiXAmYTIvJ39dBzhPnAGMYuXdpjC+qB1kWvDhwtbdKgQYMGDRo0aNCgQYNriP8DimGotcEqvNwAAAAASUVORK5CYII=)}input[id^=GProuteResultsShowDetails]+label+label:hover,input[id^=GProuteResultsShowDetails]+label:hover{color:#c77a04}.GProuteResultsDetailsHighlight{background-color:rgba(255,200,0,.25);color:#222}span[id^=GPshowSearchEngineOpen]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAGbElEQVRo3u2Zf4xUVxXHP+e+mV2QdVdCaaAZagoNbRMxEpeuP0CXbqupURuNVFqzK84OryxIjYJt0vjH9I/+Q0VNy9r17ZsJQrDo1hqNqdEKbECKRQjVxugGS8kyFZDS7UKxu8ube/znTvPcALuZfftHdb7/TO6ZM+/c9z0/7x2ooYYaaqihhv9BZLPZ5q6urtmT0ZUaXdVhzZo1M1Kp1ADwXuDjYRj+7Vr6pkZZdUin098AbhSRwUwmM5BYRHd2dn5CRDYAK4DrgHPAAaA7DMMD0xw53wc+NDY29tkdO3acB+jo6JhTV1f3a+ClKIq+uX379pEk7fq+n46i6F7P8zIjIyPbdu7ceQmgvb191syZM79trd0ENIjIXb29vb+fMtG+76ettU8A666h1pPJZDbm8/lomoh+2y1Pi8guAFX9CjAfYHh4uL6vr28saaKttdvcclhEXnR2W4C7gQ+o6m8KhcJnJvO81EQKqvok8IBbngWettb+0xhzA3A/cD2w7tSpUxbYMA0pulxVK8v5qrp5vE5jY+MKYE+Sdq21N8eWTar6KcdHo4jcBijw1GSf501ULoCKV5+PoujLnue9KiJnPc/7i4g8paq3AgtFZFlzc/Oeo0ePDiYYVS2q+jTQGBO/BVwG6t5JS5G2pUuX/uHYsWOvJWE3l8vdpKo5EZkRE4+KSBlYCcwBBoC3W1pa/nHkyJE3p1Q6crncT4F7gbNRFLWmUql543WiKDqTSqX2A3NVdXehULgvgRd9xJWqTGyPB1R1c6FQOFxxQrlc/q6ILK8kH1ACfhSG4WPV2F27du3d1tpPGmPep6rinHjc87xnenp6TnZ2dt4uIn8EIlXtE5G3RESttW+KyP4wDJ+rdupY4dJld319/RXnRWPMbGC329SKhIL5fmBBnOTh4eE7KyQDBEHw4oULF9qAg7GgWQBU7WhVvV1EZsdJPn78+A96enpOOpWtgKjqFuDP7jciIrOBZVMZ7+a4z1K5XK6/Ct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Nq+d4wDNt4lyCfz5tSqXQY+DDwUBiGjydyLpiOzQZB8LIxpg3YWy6XV/MuQqlUugVYCAxGUfQkNUwfurq6Zmez2eYaEzXUUEMN/x/4D41MuU8OSr8EAAAAAElFTkSuQmCC)}form[id^=GPsearchInput-]{height:30px}div[id^=GPgeocodeResultsClose],div[id^=GPsearchInputReset]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAKPSURBVFiF7Za9ctpAFIXPkQY39oukS+GZyHkeGKOA3YALqNSEFJbsGWzZscX7wKRJlxk/B3JDRntToD9kCUkJnjT7dYgVh2/v7t4FNBqNRqPR/C/YZNBy0ukJ1enZUWTTgSobIwBXE3MuhvHy+evv+0P8uevr6x7J0zAMbcdxynNFeHNzM1dKvVxdXdXm1govJ50eKN8BGIAsrKPovCgtAJdT847gAIAIefmv0rFsnItFGIbnRWkRoed5dwC2uSKXddJGbTLVx2wcu6uNeS+5iRKAq6npx7IAQIr60MKtPJbM5aJ7fHx8LyJZrghd1/WxlY1fYW1urbA1i4YQyc0a7dXUfBYHRlJZgHb2tQTWUXTRyGoPo9FoSDLNJWl7nvfsOI6RVJbMckkGYRjW5jbaw8n+BDlMnhmQhQI2AL9kvyaB1Yn6Vfu8Lcn+FJE0l+RCKbUhs1ySwXq97lft8zyNhIG30lJ8+cCyaW6J9E5sC1mghTCwlf4xMecROdx9sfwwOxQiwtvb27lSqihdepjto/7QKhARfDNL0m7i/gal1NvY3CHWlFZLOtd6yka8S5ULraeMVlVuVOFSWUpAET8bxe5qYz6J037VVOaWyJIMAORy0T05OXlyHKdRbu2gKlmrE/U/fYsuCi3rYNJVsuv1uj8ajS7yLQstpOtvWlPT32k9kEdrFg24PajTi8dOL4Y8nM2iqiXYiPhSkeaKyON4PB6QlPgzXdf1870YwMN4PN6b26ASxk8g3pfbS8UwkQUAAmLNokGu0iIwfjX02keaSzJ4fX0dJrLxM4knIM0leYhcYDnp2Mup6cueFREvfX856dhVY9rieZ7tuq6/7zROKu153sFyNRqNRqPRvA9/AHtLag4LyzlCAAAAAElFTkSuQmCC)}div[id^=GPadvancedSearchClose]{background-position:-60px 0}div[id^=GPadvancedSearchClose],span[id^=GPshowAdvancedSearchOpen]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAGbElEQVRo3u2Zf4xUVxXHP+e+mV2QdVdCaaAZagoNbRMxEpeuP0CXbqupURuNVFqzK84OryxIjYJt0vjH9I/+Q0VNy9r17ZsJQrDo1hqNqdEKbECKRQjVxugGS8kyFZDS7UKxu8ube/znTvPcALuZfftHdb7/TO6ZM+/c9z0/7x2ooYYaaqihhv9BZLPZ5q6urtmT0ZUaXdVhzZo1M1Kp1ADwXuDjYRj+7Vr6pkZZdUin098AbhSRwUwmM5BYRHd2dn5CRDYAK4DrgHPAAaA7DMMD0xw53wc+NDY29tkdO3acB+jo6JhTV1f3a+ClKIq+uX379pEk7fq+n46i6F7P8zIjIyPbdu7ceQmgvb191syZM79trd0ENIjIXb29vb+fMtG+76ettU8A666h1pPJZDbm8/lomoh+2y1Pi8guAFX9CjAfYHh4uL6vr28saaKttdvcclhEXnR2W4C7gQ+o6m8KhcJnJvO81EQKqvok8IBbngWettb+0xhzA3A/cD2w7tSpUxbYMA0pulxVK8v5qrp5vE5jY+MKYE+Sdq21N8eWTar6KcdHo4jcBijw1GSf501ULoCKV5+PoujLnue9KiJnPc/7i4g8paq3AgtFZFlzc/Oeo0ePDiYYVS2q+jTQGBO/BVwG6t5JS5G2pUuX/uHYsWOvJWE3l8vdpKo5EZkRE4+KSBlYCcwBBoC3W1pa/nHkyJE3p1Q6crncT4F7gbNRFLWmUql543WiKDqTSqX2A3NVdXehULgvgRd9xJWqTGyPB1R1c6FQOFxxQrlc/q6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P1esVgcmMzzErsmDYLg78aYlcAZYK61NpEy0tDQEK/7r4nIFuBx4HRFePHixYMkDBHpcoH4V2vtIPBba+3vgOGKzokTJ16Z9DST5Oamg+yhoSEFeoAX0un0kt7e3ofDMHxobGxsCXAI6Jk3b16if2Bks9mVqvpp4N/As57nPRqG4bPFYvHno6Ojj4rICWvt/tbW1sk7bjrukH3fX2Kt3eNq+d4wDNt4lyCfz5tSqXQY+DDwUBiGjydyLpiOzQZB8LIxpg3YWy6XV/MuQqlUugVYCAxGUfQkNUwfurq6Zmez2eYaEzXUUEMN/x/4D41MuU8OSr8EAAAAAElFTkSuQmCC)}span[id^=GPshowAdvancedSearchOpen]{background-position:-30px 0}div[id^=GPautoCompleteList],div[id^=GPgeocodeResultsList]{margin-left:27px;box-shadow:0 1px 5px #000}div[id^=GPgeocodeResultsList]{top:38px;border-radius:5px}.leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAAeCAYAAACWuCNnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAG7AAABuwBHnU4NQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAbvSURBVHic7dtdbBxXFQfw/9nZ3SRKwAP7UFFUQOoHqGnUoEAoNghX9tyxVcpD1X0J+WgiUQmpfUB5ACSgG1qJIKASqBIUIauqAbWseIlqb+bOWHVR6y0FKZBEqdIUQROIREGRx3FFvR/38ODZst3a3nE8Ywfv+T2t7hzdM3fle/bOnWtACCGEEEIIIYQQQgghhBBCCCGEEEIIIcRa0EbfgBDdFItFKwzDAa3175LuWylVAvBIR/MxrXUp6Vxx9dp4VyObVEdKKW591lonXgiVUg6AHzPzk9ls9meVSmUh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Qqwi8knX8jEJHpHrXIGJNo8WDm1spph2VZgeu6+5RSX7YsK8D/Xnb8Psmcnebm5h7G4uS9ysxutOH8VQC70sy7UTb7eImImTnWlgkzUyaT6fr3v6qC1fGL8EytVjuQRrECANu2fwHg1TixzPyXNO5hvTHz6VWE/znJ3L7vzxBRa9PzDmb+FYBfArgjajvd39+f9vGGKwACZh5te6mwmc8KburxMvO5TCbzqW5xxWLRArDbsqyu8z32HtZSxSrNM0Hlcrnpum6JmZ+NEb4pHglrtdrz+Xz+AoBbu4Ser9fra37d3YEBfBvAkq+XmfmbpVIp9grwWnie9zSAp9PMcT3Z7OPNZrO/aTQaf1BKfbd9X7RTGIaHmPlcnPNYsVZYSikOw7AB4CAzj/f19e1fjwOMnueVEeMxJJfLbYqCNT093TDGHAGw0qHYBQBH0vj+Pc+bYOb3HFRk5nHf9yeTzgfgMhF9uEvMTQD+71/vR3pqvJOTk28AeBJAeXR09P1LxbiuuxfA9wB8LU6fsVdYrUOhtm0fTusxcAlMRN+KziUt5SqAM3v37r00OZnGfFp/QRC86DjOUCaTGWPm2zoun8fiIbuZtPLX6/UH8/n8rQDuippertfrD6aRKyqOR5VS81ji8Z+IbmfmgwB+mEb+9dZr4wWA/v7+R6rV6k+azeYpx3EezeVyJ7dv335lfn7+lkajcZCZDzPzYd/3/xSnv9gFq3UuaR2LFQDA87xAKVUB8BEAZ6N9nrNEdEZr/TcArLVOPG8aJ9jj8n3/pcHBwZ1btmx5519zmPl0vV5/Ie2V7fT09Nujo6Nus9kcA4CtW7ce1lq/nUYu27a/Mzs7CyI6gMVX/u/CzJeZ+Ue2bcc9pb1aXc8lJZms18YLANE2wkOu694N4OFGo3E8DMMPAHiDiCaY+ZOb4YCsEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhEjYfwGO+b5dFNs4OgAAAABJRU5ErkJggg==);background-image:linear-gradient(transparent,transparent),url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC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jgyNmg0djRoLTR6IiB0cmFuc2Zvcm09InJvdGF0ZSgtMTM0Ljk5IDM0MC43MDMgMTkuODE3KSIvPjwvZz48ZyBpZD0iYiIgZmlsbD0iIzQ2NDY0NiIgZmlsbC1vcGFjaXR5PSIxIj48cGF0aCBkPSJNMzgxIDQyaDE4VjI0aC0xOHYxOHptMTQtMTZoMnYxNGgtMlYyNnptLTQgMGgydjE0aC0yVjI2em0tNCAwaDJ2MTRoLTJWMjZ6bS00IDBoMnYxNGgtMlYyNnpNMzk1IDIwdi00aC0xMHY0aC02djJoMjJ2LTJoLTZ6bS0yIDBoLTZ2LTJoNnYyeiIvPjwvZz48L2c+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTIwKSIgZmlsbD0iI2JiYiI+PHVzZSB4bGluazpocmVmPSIjYSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjx1c2UgeGxpbms6aHJlZj0iI2IiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiLz48L2c+PHBhdGggZD0iTTU4MS42NTcgMzBjMCA2LjA3OC00LjkyNiAxMS0xMSAxMXMtMTEtNC45MjItMTEtMTFjMC02LjA3NCA0LjkyNi0xMSAxMS0xMXMxMSA0LjkyNiAxMSAxMXoiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzQ2NDY0NiIgc3Ryb2tlLXdpZHRoPSIyIi8+PC9zdmc+);background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAA8CAYAAAC6nMS5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA16SURBVHic7d1/jBxneQfw7zNzvotdn+9sVQkxoRKoammBqqpbk6uT5mLfvHPn42yn1VFRVCEhoFH5IYpoSaUCKi1NcGk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absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.leaflet-draw-actions{display:none;list-style:none;margin:0;padding:0;position:absolute;left:26px;top:0;white-space:nowrap}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{right:26px;left:auto}.leaflet-touch .leaflet-right .leaflet-draw-actions{right:32px;left:auto}.leaflet-draw-actions li{display:inline-block}.leaflet-draw-actions li:first-child a{border-left:none}.leaflet-draw-actions li:last-child a{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{-webkit-border-radius:0;border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.leaflet-draw-actions a{background-color:#919187;border-left:1px solid #aaa;color:#fff;font:11px/19px Helvetica Neue,Arial,Helvetica,sans-serif;line-height:28px;text-decoration:none;padding-left:10px;padding-right:10px;height:28px}.leaflet-touch .leaflet-draw-actions a{font-size:12px;line-height:30px;height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-bottom a,.leaflet-draw-actions-top a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-273px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-271px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:rgba(0,0,0,.5);border:1px solid transparent;-webkit-border-radius:4px;border-radius:4px;color:#fff;font:12px/18px Helvetica Neue,Arial,Helvetica,sans-serif;margin-left:20px;margin-top:-21px;padding:4px 8px;position:absolute;visibility:hidden;white-space:nowrap;z-index:6}.leaflet-draw-tooltip:before{border-right:6px solid rgba(0,0,0,.5);border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}.leaflet-error-draw-tooltip{background-color:#f2dede;border:1px solid #e6b6bd;color:#b94a48}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{font-size:1%;opacity:.6;position:absolute;width:5px;height:5px}.leaflet-edit-marker-selected{background-color:rgba(254,87,161,.1);border:4px dashed rgba(254,87,161,.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/GpPluginLeaflet.js b/leaflet-2.3.4/dist/GpPluginLeaflet.js new file mode 100644 index 000000000..e12b6e7a3 --- /dev/null +++ b/leaflet-2.3.4/dist/GpPluginLeaflet.js @@ -0,0 +1,98 @@ +/*! + * @brief French Geoportal Extension for Leaflet + * + * This software is released under the licence CeCILL-B (Free BSD compatible) + * @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt + * @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt + * @see http://www.cecill.info/ + * + * @copyright copyright (c) IGN + * @license CeCILL-B + * @author IGN + * @version 2.3.4 + * @date 30/08/2023 + * + */ +/*! + * @overview Proj4Leaflet - Smooth Proj4js integration with Leaflet + * @copyright Copyright (c) 2012, Kartena AB + * @license BSD 2-Clause "Simplified" License + * See https://raw.githubusercontent.com/kartena/Proj4Leaflet/master/LICENSE + * @version 1.0.2 + */ +/*! + * @overview leaflet-draw - Vector drawing and editing plugin for Leaflet + * @copyright Copyright (c) 2012-2017 Jon West, Jacob Toye, and Leaflet + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/Leaflet/Leaflet.draw/master/MIT-LICENSE.md + * @version 1.0.4 + */ +/*! + * Sortable -- JavaScript library for reorderable drag-and-drop lists on modern + * browsers and touch devices. No jQuery required. Supports Meteor, AngularJS, + * React, Polymer, Vue, Knockout and any CSS library, e.g. Bootstrap. + * + * Released under MIT LICENSE + * + * Copyright Lebedev Konstantin + * https://github.com/SortableJS/Sortable + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * @version 1.14.0 + */ +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.4 + */ +/*! + * @overview Proj4js - Javascript reprojection library. + * + * @authors + * - Mike Adair madairATdmsolutions.ca + * - Richard Greenwood richATgreenwoodmap.com + * - Didier Richard didier.richardATign.fr + * - Stephen Irons stephen.ironsATclear.net.nz + * - Olivier Terral oterralATgmail.com + * - Calvin Metcalf cmetcalfATappgeo.com + * + * @copyright Copyright (c) 2014, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons, Olivier Terral and Calvin Metcalf + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/proj4js/proj4js/master/LICENSE.md + * @version 2.7.5 + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("leaflet"),require("node-fetch"),require("xmldom")):"function"==typeof define&&define.amd?define("Gp",["leaflet","require","require"],e):"object"==typeof exports?exports.Gp=e(require("leaflet"),require("node-fetch"),require("xmldom")):t.Gp=e(t.L,t[void 0],t[void 0])}(this,(function(t,e,i){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=42)}([function(e,i){e.exports=t},function(t,e,i){"use strict";(function(t){var i={configuration:{},isConfigLoaded:function(){if(this.configuration&&0!==Object.keys(this.configuration).length)return!0;var e="undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==t?t:{};return!!(e.Gp&&e.Gp.Config&&e.Gp.Config.layers&&0!==Object.keys(e.Gp.Config.layers).length)&&(this.configuration=e.Gp.Config,!0)}};e.a=i}).call(this,i(5))},function(t){t.exports=JSON.parse('{"name":"geoportal-extensions","description":"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries","version":"2.8.6","date":"30/08/2023","leafletExtName":"French Geoportal Extension for Leaflet","leafletExtVersion":"2.3.4","olExtName":"French Geoportal Extension for OpenLayers","olExtVersion":"3.3.4","itownsExtName":"French Geoportal Extension for Itowns","itownsExtVersion":"2.4.3","main":"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js","types":"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts","module":"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js","directories":{},"scripts":{"setup":"npm install","clean":"echo \\"Warning: target not yet implemented!\\" && exit 0","eslint":"eslint src/","test":"npm run test:serve","test:serve":"cd test && webpack-dev-server --hot --config webpack.test.serve.js","sample":"npm run sample:serve","sample:serve":"npm run sample:ol:serve","sample:itowns:serve":"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path \'/dist/itowns/\' --port 9001 --open","sample:leaflet:serve":"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path \'/dist/leaflet/\' --port 9001 --open","sample:ol:serve":"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path \'/dist/openlayers/\' --port 9001 --open","generate-types:ol":"npx tsc -p build/types/tsconfig-openlayers.json","generate-types:leaflet":"npx tsc -p build/types/tsconfig-leaflet.json","generate-types:itowns":"npx tsc -p build/types/tsconfig-itowns.json","generate-jsdoc:ol":"jsdoc -c build/jsdoc/jsdoc-openlayers.json","generate-jsdoc:leaflet":"jsdoc -c build/jsdoc/jsdoc-leaflet.json","generate-jsdoc:itowns":"jsdoc -c build/jsdoc/jsdoc-itowns.json","doc":"npm run doc:serve","doc:serve":"npm run doc:ol:serve","doc:itowns:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open","doc:leaflet:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open","doc:ol:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open","build:dev":"npm-run-all --print-label --print-name build:*:dev","build:prod":"npm-run-all --print-label --print-name build:*:prod","build:src":"npm-run-all --print-label --print-name build:*:src","build":"npm-run-all --print-label --print-name build:*:*","build:itowns":"npm-run-all --print-label --print-name build:itowns:*","build:itowns:dev":"webpack --config build/webpack/webpack.config.itowns --mode=development","build:itowns:prod":"webpack --config build/webpack/webpack.config.itowns --mode=production","build:itowns:src":"webpack --config build/webpack/webpack.config.itowns --mode=none","build:ol":"npm-run-all --print-label --print-name build:ol:*","build:ol:dev":"webpack --config build/webpack/webpack.config.openlayers --mode=development","build:ol:prod":"webpack --config build/webpack/webpack.config.openlayers --mode=production","build:ol:src":"webpack --config build/webpack/webpack.config.openlayers --mode=none","build:leaflet":"npm-run-all --print-label --print-name build:leaflet:*","build:leaflet:dev":"webpack --config build/webpack/webpack.config.leaflet --mode=development","build:leaflet:prod":"webpack --config build/webpack/webpack.config.leaflet --mode=production","build:leaflet:src":"webpack --config build/webpack/webpack.config.leaflet --mode=none"},"repository":{"type":"git","url":"https://github.com/IGNF/geoportal-extensions.git"},"author":"IGNF","keywords":["geoportail","javascript","OpenLayers","Leaflet","Itowns","3D"],"license":"CECILL-B","bugs":{"url":"https://github.com/IGNF/geoportal-extensions/issues"},"homepage":"https://github.com/IGNF/geoportal-extensions#readme","dependencies":{"@mapbox/mapbox-gl-style-spec":"13.20.1","eventbusjs":"0.2.0","geoportal-access-lib":"3.3.4","itowns":"2.38.2","leaflet":"1.7.1","leaflet-draw":"1.0.4","loglevel":"^1.6.7","markdown-toc":"^1.2.0","ol":"6.9.0","ol-mapbox-style":"6.7.0","proj4":"2.7.5","proj4leaflet":"1.0.2","sortablejs":"1.14.0","three":"0.137.5","typescript":"^4.5.5","whatwg-fetch":"3.0.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-transform-template-literals":"^7.7.4","@babel/preset-env":"^7.4.4","babel-loader":"^8.0.5","chai":"^4.2.0","chalk":"^4.0.0","clean-webpack-plugin":"^3.0.0","copy-webpack-plugin":"^5.0.3","core-js":"^3.6.4","css-loader":"^3.4.2","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-loader":"^4.0.0","eslint-plugin-import":"^2.17.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.1.1","eslint-plugin-standard":"^4.0.0","exports-loader":"^0.7.0","expose-loader":"^0.7.5","fs-extra":"^9.0.0","handlebars":"^4.7.5","handlebars-layouts":"^3.1.4","html-webpack-plugin":"^4.0.4","jsdoc-webpack-plugin":"^0.3.0","mini-css-extract-plugin":"^0.9.0","mocha":"^7.1.1","mocha-loader":"^5.0.0","npm-run-all":"^4.1.5","optimize-css-assets-webpack-plugin":"^5.0.1","path":"^0.12.7","replace-bundle-webpack-plugin":"^1.0.0","requirejs":"^2.3.6","responsive-loader":"^1.2.0","speed-measure-webpack-plugin":"^1.3.0","string-template":"^1.0.0","style-loader":"^1.1.3","terser-webpack-plugin":"^2.0.0","url-loader":"^4.0.0","webpack":"^4.30.0","webpack-cli":"^3.3.1","webpack-dev-server":"^3.3.1","webpack-node-externals":"^1.7.2"}}')},function(t,e,i){var o,n;!function(s,a){"use strict";void 0===(n="function"==typeof(o=function(){var t=function(){},e="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"];function o(t,e){var i=t[e];if("function"==typeof i.bind)return i.bind(t);try{return Function.prototype.bind.call(i,t)}catch(e){return function(){return Function.prototype.apply.apply(i,[t,arguments])}}}function n(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(i){return"debug"===i&&(i="log"),"undefined"!=typeof console&&("trace"===i&&e?n:void 0!==console[i]?o(console,i):void 0!==console.log?o(console,"log"):t)}function a(e,o){for(var n=0;n=0&&e<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(n=e,!1!==o&&function(t){var e=(i[t]||"silent").toUpperCase();if("undefined"!=typeof window&&r){try{return void(window.localStorage[r]=e)}catch(t){}try{window.document.cookie=encodeURIComponent(r)+"="+e+";"}catch(t){}}}(e),a.call(s,e,t),"undefined"==typeof console&&eError: shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=e.getLatLngs(),o=i.splice(-1,1)[0];this._poly.setLatLngs(i),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(o,!1)}},addVertex:function(t){this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this._currentLatLng=i,this._updateTooltip(i),this._updateGuide(e),this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,o=e.clientY;this._startPoint.call(this,i,o)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,i=e.clientX,o=e.clientY;this._endPoint.call(this,i,o,t),this._clickHandled=null},_endPoint:function(e,i,o){if(this._mouseDownOrigin){var n=L.point(e,i).distanceTo(this._mouseDownOrigin),s=this._calculateFinishDistance(o.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(o.latlng),this._finishShape()):s<10&&L.Browser.touch?this._finishShape():Math.abs(n)<9*(t.devicePixelRatio||1)&&this.addVertex(o.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,i,o=t.originalEvent;!o.touches||!o.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=o.touches[0].clientX,i=o.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,i),this._endPoint.call(this,e,i,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var i;if(this.type===L.Draw.Polyline.TYPE)i=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;i=this._markers[0]}var o=this._map.latLngToContainerPoint(i.getLatLng()),n=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),s=this._map.latLngToContainerPoint(n.getLatLng());e=o.distanceTo(s)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var i,o,n,s=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),a=this.options.guidelineDistance,r=this.options.maxGuideLineLength,l=s>r?s-r:a;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="
    "+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(t,e){var i;!this.options.allowIntersection&&this.options.showArea&&(i=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(i)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,i,o=L.Draw.SimpleShape.prototype._getTooltipText.call(this),n=this._shape,s=this.options.showArea;return n&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),i=s?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:o.text,subtext:i}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,i=t.latlng,o=this.options.showRadius,n=this.options.metric;if(this._tooltip.updatePosition(i),this._isDrawing){this._drawShape(i),e=this._shape.getRadius().toFixed(1);var s="";o&&(s=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,n,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:s})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var i=parseInt(t.style.marginTop,10)-e,o=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=i+"px",t.style.marginLeft=o+"px"}}),L.Marker.addInitHook((function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())})),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;et&&(i._index+=e)}))},_createMiddleMarker:function(t,e){var i,o,n,s=this._getMiddleLatLng(t,e),a=this._createMarker(s);a.setOpacity(.6),t._middleRight=e._middleLeft=a,o=function(){a.off("touchmove",o,this);var n=e._index;a._index=n,a.off("click",i,this).on("click",this._onMarkerClick,this),s.lat=a.getLatLng().lat,s.lng=a.getLatLng().lng,this._spliceLatLngs(n,0,s),this._markers.splice(n,0,a),a.setOpacity(1),this._updateIndexes(n,1),e._index++,this._updatePrevNext(t,a),this._updatePrevNext(a,e),this._poly.fire("editstart")},n=function(){a.off("dragstart",o,this),a.off("dragend",n,this),a.off("touchmove",o,this),this._createMiddleMarker(t,a),this._createMiddleMarker(a,e)},i=function(){o.call(this),n.call(this),this._fireEdit()},a.on("click",i,this).on("dragstart",o,this).on("dragend",n,this).on("touchmove",o,this),this._markerGroup.addLayer(a)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var i=this._poly._map,o=i.project(t.getLatLng()),n=i.project(e.getLatLng());return i.unproject(o._add(n)._divideBy(2))}}),L.Polyline.addInitHook((function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",(function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()})),this.on("remove",(function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})))})),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,i=this._resizeMarkers.length;e"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook((function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())})),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(t,e){var i={};if(void 0!==t.touches){if(!t.touches.length)return;i=t.touches[0]}else{if("touch"!==t.pointerType)return;if(i=t,!this._filterClick(t))return}var o=this._map.mouseEventToContainerPoint(i),n=this._map.mouseEventToLayerPoint(i),s=this._map.layerPointToLatLng(n);this._map.fire(e,{latlng:s,layerPoint:n,containerPoint:o,pageX:i.pageX,pageY:i.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,i=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){if(this._map._loaded){this._touchEvent(t,"touchstart")}},_onTouchEnd:function(t){if(this._map._loaded){this._touchEvent(t,"touchend")}},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){if(this._map._loaded){this._touchEvent(t,"touchleave")}},_onTouchMove:function(t){if(this._map._loaded){this._touchEvent(t,"touchmove")}},_detectIE:function(){var e=t.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?e.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):e.concat(["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],i=0,o=t.length;i2){for(var a=0;a1&&(i=i+a+r[1])}return i},readableArea:function(t,e,i){var n,s;return i=L.Util.extend({},o,i),e?(s=["ha","m"],type=typeof e,"string"===type?s=[e]:"boolean"!==type&&(s=e),n=t>=1e6&&-1!==s.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*t,i.km)+" km²":t>=1e4&&-1!==s.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*t,i.ha)+" ha":L.GeometryUtil.formattedNumber(t,i.m)+" m²"):n=(t/=.836127)>=3097600?L.GeometryUtil.formattedNumber(t/3097600,i.mi)+" mi²":t>=4840?L.GeometryUtil.formattedNumber(t/4840,i.ac)+" acres":L.GeometryUtil.formattedNumber(t,i.yd)+" yd²",n},readableDistance:function(t,e,i,n,s){var a;switch(s=L.Util.extend({},o,s),e?"string"==typeof e?e:"metric":i?"feet":n?"nauticalMile":"yards"){case"metric":a=t>1e3?L.GeometryUtil.formattedNumber(t/1e3,s.km)+" km":L.GeometryUtil.formattedNumber(t,s.m)+" m";break;case"feet":t*=3.28083,a=L.GeometryUtil.formattedNumber(t,s.ft)+" ft";break;case"nauticalMile":t*=.53996,a=L.GeometryUtil.formattedNumber(t/1e3,s.nm)+" nm";break;case"yards":default:a=(t*=1.09361)>1760?L.GeometryUtil.formattedNumber(t/1760,s.mi)+" miles":L.GeometryUtil.formattedNumber(t,s.yd)+" yd"}return a},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}}),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,i,o){return this._checkCounterclockwise(t,i,o)!==this._checkCounterclockwise(e,i,o)&&this._checkCounterclockwise(t,e,i)!==this._checkCounterclockwise(t,e,o)},_checkCounterclockwise:function(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,i,o=this._getProjectedPoints(),n=o?o.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=n-1;t>=3;t--)if(e=o[t-1],i=o[t],this._lineSegmentsIntersectsRange(e,i,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var i=this._getProjectedPoints(),o=i?i.length:0,n=i?i[o-1]:null,s=o-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(n,t,s,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return!e||(i+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,i,o){var n,s,a=this._getProjectedPoints();o=o||0;for(var r=i;r>o;r--)if(n=a[r-1],s=a[r],L.LineUtil.segmentsIntersect(t,e,n,s))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),i=0;i=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,i=L.DomUtil.create("div","leaflet-draw-section"),o=0,n=this._toolbarClass||"",s=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?''+t.subtext+"
    ":"")+""+t.text+"",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),i=this._container;return this._container&&(this._visible&&(i.style.visibility="inherit"),L.DomUtil.setPosition(i,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer((function(t){this._revertLayer(t)}),this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer((function(e){e.edited&&(t.addLayer(e),e.edited=!1)})),this._map.fire(L.Draw.Event.EDITED,{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,i,o=t.layer||t.target||t;this._backupLayer(o),this.options.poly&&(i=L.Util.extend({},this.options.poly),o.options.poly=i),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=o.options.color,e.fillColor=o.options.fillColor),o.options.original=L.extend({},o.options),o.options.editing=e),o instanceof L.Marker?(o.editing&&o.editing.enable(),o.dragging.enable(),o.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):o.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),o=this._map.layerPointToLatLng(i);t.target.setLatLng(o)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer((function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})}),this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer((function(t){this._removeLayer({layer:t})}),this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}(window,document)},function(t,e,i){(function(e,i){ +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.8+1e68dce6 + */var o;o=function(){"use strict";function t(t){return"function"==typeof t}var o=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},n=0,s=void 0,a=void 0,r=function(t,e){m[n]=t,m[n+1]=e,2===(n+=2)&&(a?a(f):E())},l="undefined"!=typeof window?window:void 0,c=l||{},h=c.MutationObserver||c.WebKitMutationObserver,d="undefined"==typeof self&&void 0!==e&&"[object process]"==={}.toString.call(e),u="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var t=setTimeout;return function(){return t(f,1)}}var m=new Array(1e3);function f(){for(var t=0;t1)for(var i=1;i=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},_.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(f.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},_.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},_.prototype.number=function(t){if(!g.test(t)){if(f.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},_.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},_.prototype.keyword=function(t){if(m.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!f.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},_.prototype.neutral=function(t){if(p.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(g.test(t))return this.word=t,void(this.state=3);if(!f.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},_.prototype.output=function(){for(;this.place0?90:-90),t.lat_ts=t.lat1)}(n),n};function P(t){var e=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?P[t]=d(arguments[1]):P[t]=w(arguments[1]):P[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?P.apply(e,t):P(t)}));if("string"==typeof t){if(t in P)return P[t]}else"EPSG"in t?P["EPSG:"+t.EPSG]=t:"ESRI"in t?P["ESRI:"+t.ESRI]=t:"IAU2000"in t?P["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(P);var b=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],M=["3857","900913","3785","102113"];function C(t){if(!function(t){return"string"==typeof t}(t))return t;if(function(t){return t in P}(t))return P[t];if(function(t){return b.some((function(e){return t.indexOf(e)>-1}))}(t)){var e=w(t);if(function(t){var e=h(t,"authority");if(e){var i=h(e,"epsg");return i&&M.indexOf(i)>-1}}(e))return P["EPSG:3857"];var i=function(t){var e=h(t,"extension");if(e)return h(e,"proj4")}(e);return i?d(i):e}return function(t){return"+"===t[0]}(t)?d(t):void 0}var L=function(t,e){var i,o;if(t=t||{},!e)return t;for(o in e)void 0!==(i=e[o])&&(t[o]=i);return t},S=function(t,e,i){var o=t*e;return i/Math.sqrt(1-o*o)},x=function(t){return t<0?-1:1},G=function(t){return Math.abs(t)<=a?t:t-x(t)*s},I=function(t,i,o){var n=t*o,s=.5*t;return n=Math.pow((1-n)/(1+n),s),Math.tan(.5*(e-i))/n},k=function(t,i){for(var o,n,s=.5*t,a=e-2*Math.atan(i),r=0;r<=15;r++)if(o=t*Math.sin(a),a+=n=e-2*Math.atan(i*Math.pow((1-o)/(1+o),s))-a,Math.abs(n)<=1e-10)return a;return-9999};function R(t){return t}var T=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=S(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var i,s,a=t.x,r=t.y;if(r*o>90&&r*o<-90&&a*o>180&&a*o<-180)return null;if(Math.abs(Math.abs(r)-e)<=1e-10)return null;if(this.sphere)i=this.x0+this.a*this.k0*G(a-this.long0),s=this.y0+this.a*this.k0*Math.log(Math.tan(n+.5*r));else{var l=Math.sin(r),c=I(this.e,r,l);i=this.x0+this.a*this.k0*G(a-this.long0),s=this.y0-this.a*this.k0*Math.log(c)}return t.x=i,t.y=s,t},inverse:function(t){var i,o,n=t.x-this.x0,s=t.y-this.y0;if(this.sphere)o=e-2*Math.atan(Math.exp(-s/(this.a*this.k0)));else{var a=Math.exp(-s/(this.a*this.k0));if(-9999===(o=k(this.e,a)))return null}return i=G(this.long0+n/(this.a*this.k0)),t.x=i,t.y=o,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:R,inverse:R,names:["longlat","identity"]}],A={},D=[];function O(t,e){var i=D.length;return t.names?(D[i]=t,t.names.forEach((function(t){A[t.toLowerCase()]=i})),this):(console.log(e),!0)}var N={start:function(){T.forEach(O)},add:O,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==A[e]&&D[A[e]]?D[A[e]]:void 0}},U={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},j=U.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};U.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var F={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}},z={};function B(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:z[t]||null,isNull:!1}}function W(t){return t/3600*Math.PI/180}function q(t,e,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,i)))}function H(t){return t.map((function(t){return[W(t.longitudeShift),W(t.latitudeShift)]}))}function V(t,e,i){return{name:q(t,e+8,e+16).trim(),parent:q(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,i),upperLatitude:t.getFloat64(e+88,i),lowerLongitude:t.getFloat64(e+104,i),upperLongitude:t.getFloat64(e+120,i),latitudeInterval:t.getFloat64(e+136,i),longitudeInterval:t.getFloat64(e+152,i),gridNodeCount:t.getInt32(e+168,i)}}function Y(t,e,i,o){for(var n=e+176,s=[],a=0;a3&&(0===l.datum_params[3]&&0===l.datum_params[4]&&0===l.datum_params[5]&&0===l.datum_params[6]||(l.datum_type=2,l.datum_params[3]*=t,l.datum_params[4]*=t,l.datum_params[5]*=t,l.datum_params[6]=l.datum_params[6]/1e6+1))),r&&(l.datum_type=3,l.grids=r),l.a=o,l.b=n,l.es=s,l.ep2=a,l}(o.datumCode,o.datum_params,m.a,m.b,f.es,f.ep2,g);L(this,o),L(this,n),this.a=m.a,this.b=m.b,this.rf=m.rf,this.sphere=m.sphere,this.es=f.es,this.e=f.e,this.ep2=f.ep2,this.datum=_,this.init(),i(null,this)}else i(e)}else i(e)}function K(t,i,o){var n,s,a,r,l=t.x,c=t.y,h=t.z?t.z:0;if(c<-e&&c>-1.001*e)c=-e;else if(c>e&&c<1.001*e)c=e;else{if(c<-e)return{x:-1/0,y:-1/0,z:t.z};if(c>e)return{x:1/0,y:1/0,z:t.z}}return l>Math.PI&&(l-=2*Math.PI),s=Math.sin(c),r=Math.cos(c),a=s*s,{x:((n=o/Math.sqrt(1-i*a))+h)*r*Math.cos(l),y:(n+h)*r*Math.sin(l),z:(n*(1-i)+h)*s}}function Z(t,e,i,o){var n,s,a,r,l,c,h,d,u,p,m,f,g,_,v,y=t.x,E=t.y,w=t.z?t.z:0;if(n=Math.sqrt(y*y+E*E),s=Math.sqrt(y*y+E*E+w*w),n/i<1e-12){if(_=0,s/i<1e-12)return v=-o,{x:t.x,y:t.y,z:t.z}}else _=Math.atan2(E,y);a=w/s,d=(r=n/s)*(1-e)*(l=1/Math.sqrt(1-e*(2-e)*r*r)),u=a*l,g=0;do{g++,c=e*(h=i/Math.sqrt(1-e*u*u))/(h+(v=n*d+w*u-h*(1-e*u*u))),f=(m=a*(l=1/Math.sqrt(1-c*(2-c)*r*r)))*d-(p=r*(1-c)*l)*u,d=p,u=m}while(f*f>1e-24&&g<30);return{x:_,y:Math.atan(m/Math.abs(p)),z:v}}function J(t){return 1===t||2===t}X.projections=N,X.projections.start();var Q=function(t,e,i){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6])}(t,e))return i;if(5===t.datum_type||5===e.datum_type)return i;var o=t.a,n=t.es;if(3===t.datum_type){if(0!==$(t,!1,i))return;o=6378137,n=.0066943799901413165}var s=e.a,a=e.b,r=e.es;return 3===e.datum_type&&(s=6378137,a=6356752.314,r=.0066943799901413165),n!==r||o!==s||J(t.datum_type)||J(e.datum_type)?(i=K(i,n,o),J(t.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(2===e){var o=i[0],n=i[1],s=i[2],a=i[3],r=i[4],l=i[5],c=i[6];return{x:c*(t.x-l*t.y+r*t.z)+o,y:c*(l*t.x+t.y-a*t.z)+n,z:c*(-r*t.x+a*t.y+t.z)+s}}}(i,t.datum_type,t.datum_params)),J(e.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(2===e){var o=i[0],n=i[1],s=i[2],a=i[3],r=i[4],l=i[5],c=i[6],h=(t.x-o)/c,d=(t.y-n)/c,u=(t.z-s)/c;return{x:h+l*d-r*u,y:-l*h+d+a*u,z:r*h-a*d+u}}}(i,e.datum_type,e.datum_params)),i=Z(i,r,s,a),3!==e.datum_type||0===$(e,!0,i)?i:void 0):i};function $(t,e,i){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;for(var n={x:-i.x,y:i.y},s={x:Number.NaN,y:Number.NaN},a=[],r=0;rn.y||d>n.x||m1e-12&&Math.abs(a.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),o;o.x=G(s.x+i.ll[0]),o.y=s.y+i.ll[1]}else isNaN(s.x)||(o.x=t.x+s.x,o.y=t.y+s.y);return o}function et(t,e){var i,o={x:t.x/e.del[0],y:t.y/e.del[1]},n=Math.floor(o.x),s=Math.floor(o.y),a=o.x-1*n,r=o.y-1*s,l={x:Number.NaN,y:Number.NaN};if(n<0||n>=e.lim[0])return l;if(s<0||s>=e.lim[1])return l;i=s*e.lim[0]+n;var c=e.cvs[i][0],h=e.cvs[i][1];i++;var d=e.cvs[i][0],u=e.cvs[i][1];i+=e.lim[0];var p=e.cvs[i][0],m=e.cvs[i][1];i--;var f=e.cvs[i][0],g=e.cvs[i][1],_=a*r,v=a*(1-r),y=(1-a)*(1-r),E=(1-a)*r;return l.x=y*c+v*d+E*f+_*p,l.y=y*h+v*u+E*g+_*m,l}var it=function(t,e,i){var o,n,s,a=i.x,r=i.y,l=i.z||0,c={};for(s=0;s<3;s++)if(!e||2!==s||void 0!==i.z)switch(0===s?(o=a,n=-1!=="ew".indexOf(t.axis[s])?"x":"y"):1===s?(o=r,n=-1!=="ns".indexOf(t.axis[s])?"y":"x"):(o=l,n="z"),t.axis[s]){case"e":c[n]=o;break;case"w":c[n]=-o;break;case"n":c[n]=o;break;case"s":c[n]=-o;break;case"u":void 0!==i[n]&&(c.z=o);break;case"d":void 0!==i[n]&&(c.z=-o);break;default:return null}return c},ot=function(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e};function nt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function st(t,e,n,s){var a;if(Array.isArray(n)&&(n=ot(n)),function(t){nt(t.x),nt(t.y)}(n),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(n=st(t,a=new X("WGS84"),n,s),t=a),s&&"enu"!==t.axis&&(n=it(t,!1,n)),"longlat"===t.projName)n={x:n.x*i,y:n.y*i,z:n.z||0};else if(t.to_meter&&(n={x:n.x*t.to_meter,y:n.y*t.to_meter,z:n.z||0}),!(n=t.inverse(n)))return;if(t.from_greenwich&&(n.x+=t.from_greenwich),n=Q(t.datum,e.datum,n))return e.from_greenwich&&(n={x:n.x-e.from_greenwich,y:n.y,z:n.z||0}),"longlat"===e.projName?n={x:n.x*o,y:n.y*o,z:n.z||0}:(n=e.forward(n),e.to_meter&&(n={x:n.x/e.to_meter,y:n.y/e.to_meter,z:n.z||0})),s&&"enu"!==e.axis?it(e,!0,n):n}var at=X("WGS84");function rt(t,e,i,o){var n,s,a;return Array.isArray(i)?(n=st(t,e,i,o)||{x:NaN,y:NaN},i.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof n.z?[n.x,n.y,n.z].concat(i.splice(3)):[n.x,n.y,i[2]].concat(i.splice(3)):[n.x,n.y].concat(i.splice(2)):[n.x,n.y]):(s=st(t,e,i,o),2===(a=Object.keys(i)).length||a.forEach((function(o){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===o||"y"===o||"z"===o)return}else if("x"===o||"y"===o)return;s[o]=i[o]})),s)}function lt(t){return t instanceof X?t:t.oProj?t.oProj:X(t)}function ct(t,e,i){t=lt(t);var o,n=!1;return void 0===e?(e=t,t=at,n=!0):(void 0!==e.x||Array.isArray(e))&&(i=e,e=t,t=at,n=!0),e=lt(e),i?rt(t,e,i):(o={forward:function(i,o){return rt(t,e,i,o)},inverse:function(i,o){return rt(e,t,i,o)}},n&&(o.oProj=e),o)}var ht=65,dt=73,ut=79,pt={forward:mt,inverse:function(t){var e=vt(Et(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]},toPoint:ft};function mt(t,e){return e=e||5,function(t,e){var i,o,n,s,a,r,l,c,h,d,u,p,m,f,g="00000"+t.easting,_="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(h=t.easting,d=t.northing,u=t.zoneNumber,p=yt(u),m=Math.floor(h/1e5),f=Math.floor(d/1e5)%20,i=m,o=f,s="AJSAJS".charCodeAt(n=p-1),a="AFAFAF".charCodeAt(n),c=!1,(r=s+i-1)>90&&(r=r-90+ht-1,c=!0),(r===dt||sdt||(r>dt||sut||(r>ut||s90&&(r=r-90+ht-1),(l=a+o)>86?(l=l-86+ht-1,c=!0):c=!1,(l===dt||adt||(l>dt||aut||(l>ut||a86&&(l=l-86+ht-1),String.fromCharCode(r)+String.fromCharCode(l))+g.substr(g.length-5,e)+_.substr(_.length-5,e)}(function(t){var e,i,o,n,s,a,r,l=t.lat,c=t.lon,h=6378137,d=gt(l),u=gt(c);r=Math.floor((c+180)/6)+1,180===c&&(r=60),l>=56&&l<64&&c>=3&&c<12&&(r=32),l>=72&&l<84&&(c>=0&&c<9?r=31:c>=9&&c<21?r=33:c>=21&&c<33?r=35:c>=33&&c<42&&(r=37)),a=gt(6*(r-1)-180+3),e=h/Math.sqrt(1-.00669438*Math.sin(d)*Math.sin(d)),i=Math.tan(d)*Math.tan(d),o=.006739496752268451*Math.cos(d)*Math.cos(d),n=Math.cos(d)*(u-a),s=h*(.9983242984503243*d-.002514607064228144*Math.sin(2*d)+2639046602129982e-21*Math.sin(4*d)-3.418046101696858e-9*Math.sin(6*d));var p,m,f=.9996*e*(n+(1-i+o)*n*n*n/6+(5-18*i+i*i+72*o-.39089081163157013)*n*n*n*n*n/120)+5e5,g=.9996*(s+e*Math.tan(d)*(n*n/2+(5-i+9*o+4*o*o)*n*n*n*n/24+(61-58*i+i*i+600*o-2.2240339282485886)*n*n*n*n*n*n/720));return l<0&&(g+=1e7),{northing:Math.round(g),easting:Math.round(f),zoneNumber:r,zoneLetter:(p=l,m="Z",84>=p&&p>=72?m="X":72>p&&p>=64?m="W":64>p&&p>=56?m="V":56>p&&p>=48?m="U":48>p&&p>=40?m="T":40>p&&p>=32?m="S":32>p&&p>=24?m="R":24>p&&p>=16?m="Q":16>p&&p>=8?m="P":8>p&&p>=0?m="N":0>p&&p>=-8?m="M":-8>p&&p>=-16?m="L":-16>p&&p>=-24?m="K":-24>p&&p>=-32?m="J":-32>p&&p>=-40?m="H":-40>p&&p>=-48?m="G":-48>p&&p>=-56?m="F":-56>p&&p>=-64?m="E":-64>p&&p>=-72?m="D":-72>p&&p>=-80&&(m="C"),m)}}({lat:t[1],lon:t[0]}),e)}function ft(t){var e=vt(Et(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function gt(t){return t*(Math.PI/180)}function _t(t){return t/Math.PI*180}function vt(t){var e=t.northing,i=t.easting,o=t.zoneLetter,n=t.zoneNumber;if(n<0||n>60)return null;var s,a,r,l,c,h,d,u,p=6378137,m=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),f=i-5e5,g=e;o<"N"&&(g-=1e7),h=6*(n-1)-180+3,u=(d=g/.9996/6367449.145945056)+(3*m/2-27*m*m*m/32)*Math.sin(2*d)+(21*m*m/16-55*m*m*m*m/32)*Math.sin(4*d)+151*m*m*m/96*Math.sin(6*d),s=p/Math.sqrt(1-.00669438*Math.sin(u)*Math.sin(u)),a=Math.tan(u)*Math.tan(u),r=.006739496752268451*Math.cos(u)*Math.cos(u),l=.99330562*p/Math.pow(1-.00669438*Math.sin(u)*Math.sin(u),1.5),c=f/(.9996*s);var _=u-s*Math.tan(u)/l*(c*c/2-(5+3*a+10*r-4*r*r-.06065547077041606)*c*c*c*c/24+(61+90*a+298*r+45*a*a-1.6983531815716497-3*r*r)*c*c*c*c*c*c/720);_=_t(_);var v,y=(c-(1+2*a+r)*c*c*c/6+(5-2*r+28*a-3*r*r+.05391597401814761+24*a*a)*c*c*c*c*c/120)/Math.cos(u);if(y=h+_t(y),t.accuracy){var E=vt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});v={top:E.lat,right:E.lon,bottom:_,left:y}}else v={lat:_,lon:y};return v}function yt(t){var e=t%6;return 0===e&&(e=6),e}function Et(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,i=t.length,o=null,n="",s=0;!/[A-Z]/.test(e=t.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+t;n+=e,s++}var a=parseInt(n,10);if(0===s||s+3>i)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(s++);if(r<="A"||"B"===r||"Y"===r||r>="Z"||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;o=t.substring(s,s+=2);for(var l=yt(a),c=function(t,e){for(var i="AJSAJS".charCodeAt(e-1),o=1e5,n=!1;i!==t.charCodeAt(0);){if(++i===dt&&i++,i===ut&&i++,i>90){if(n)throw"Bad character: "+t;i=ht,n=!0}o+=1e5}return o}(o.charAt(0),l),h=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var i="AFAFAF".charCodeAt(e-1),o=0,n=!1;i!==t.charCodeAt(0);){if(++i===dt&&i++,i===ut&&i++,i>86){if(n)throw"Bad character: "+t;i=ht,n=!0}o+=1e5}return o}(o.charAt(1),l);h0&&(u=1e5/Math.pow(10,f),p=t.substring(s,s+f),g=parseFloat(p)*u,m=t.substring(s+f),_=parseFloat(m)*u),{easting:g+c,northing:_+h,zoneLetter:r,zoneNumber:a,accuracy:u}}function wt(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function Pt(t,e,i){if(!(this instanceof Pt))return new Pt(t,e,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var o=t.split(",");this.x=parseFloat(o[0],10),this.y=parseFloat(o[1],10),this.z=parseFloat(o[2],10)||0}else this.x=t,this.y=e,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Pt.fromMGRS=function(t){return new Pt(ft(t))},Pt.prototype.toMGRS=function(t){return mt([this.x,this.y],t)};var bt=.01068115234375,Mt=function(t){var e=[];e[0]=1-t*(.25+t*(.046875+t*(.01953125+t*bt))),e[1]=t*(.75-t*(.046875+t*(.01953125+t*bt)));var i=t*t;return e[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,e[3]=i*(.3645833333333333-.005696614583333333*t),e[4]=i*t*.3076171875,e},Ct=function(t,e,i,o){return i*=e,e*=e,o[0]*t-i*(o[1]+e*(o[2]+e*(o[3]+e*o[4])))},Lt=function(t,e,i){for(var o=1/(1-e),n=t,s=20;s;--s){var a=Math.sin(n),r=1-e*a*a;if(n-=r=(Ct(n,a,Math.cos(n),i)-t)*(r*Math.sqrt(r))*o,Math.abs(r)<1e-10)return n}return n},St={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Mt(this.es),this.ml0=Ct(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var e,i,o,n=t.x,s=t.y,a=G(n-this.long0),r=Math.sin(s),l=Math.cos(s);if(this.es){var c=l*a,h=Math.pow(c,2),d=this.ep2*Math.pow(l,2),u=Math.pow(d,2),p=Math.abs(l)>1e-10?Math.tan(s):0,m=Math.pow(p,2),f=Math.pow(m,2);e=1-this.es*Math.pow(r,2),c/=Math.sqrt(e);var g=Ct(s,r,l,this.en);i=this.a*(this.k0*c*(1+h/6*(1-m+d+h/20*(5-18*m+f+14*d-58*m*d+h/42*(61+179*f-f*m-479*m)))))+this.x0,o=this.a*(this.k0*(g-this.ml0+r*a*c/2*(1+h/12*(5-m+9*d+4*u+h/30*(61+f-58*m+270*d-330*m*d+h/56*(1385+543*f-f*m-3111*m))))))+this.y0}else{var _=l*Math.sin(a);if(Math.abs(Math.abs(_)-1)<1e-10)return 93;if(i=.5*this.a*this.k0*Math.log((1+_)/(1-_))+this.x0,o=l*Math.cos(a)/Math.sqrt(1-Math.pow(_,2)),(_=Math.abs(o))>=1){if(_-1>1e-10)return 93;o=0}else o=Math.acos(o);s<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return t.x=i,t.y=o,t},inverse:function(t){var i,o,n,s,a=(t.x-this.x0)*(1/this.a),r=(t.y-this.y0)*(1/this.a);if(this.es)if(i=this.ml0+r/this.k0,o=Lt(i,this.es,this.en),Math.abs(o)1e-10?Math.tan(o):0,d=this.ep2*Math.pow(c,2),u=Math.pow(d,2),p=Math.pow(h,2),m=Math.pow(p,2);i=1-this.es*Math.pow(l,2);var f=a*Math.sqrt(i)/this.k0,g=Math.pow(f,2);n=o-(i*=h)*g/(1-this.es)*.5*(1-g/12*(5+3*p-9*d*p+d-4*u-g/30*(61+90*p-252*d*p+45*m+46*d-g/56*(1385+3633*p+4095*m+1574*m*p)))),s=G(this.long0+f*(1-g/6*(1+2*p+d-g/20*(5+28*p+24*m+8*d*p+6*d-g/42*(61+662*p+1320*m+720*m*p))))/c)}else n=e*x(r),s=0;else{var _=Math.exp(a/this.k0),v=.5*(_-1/_),y=this.lat0+r/this.k0,E=Math.cos(y);i=Math.sqrt((1-Math.pow(E,2))/(1+Math.pow(v,2))),n=Math.asin(i),r<0&&(n=-n),s=0===v&&0===E?0:G(Math.atan2(v,E)+this.long0)}return t.x=s,t.y=n,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]},xt=function(t){var e=Math.exp(t);return e=(e-1/e)/2},Gt=function(t,e){t=Math.abs(t),e=Math.abs(e);var i=Math.max(t,e),o=Math.min(t,e)/(i||1);return i*Math.sqrt(1+Math.pow(o,2))},It=function(t){var e=Math.abs(t);return e=function(t){var e=1+t,i=e-1;return 0===i?t:t*Math.log(e)/i}(e*(1+e/(Gt(1,e)+1))),t<0?-e:e},kt=function(t,e){for(var i,o=2*Math.cos(2*e),n=t.length-1,s=t[n],a=0;--n>=0;)i=o*s-a+t[n],a=s,s=i;return e+i*Math.sin(2*e)},Rt=function(t,e,i){for(var o,n,s=Math.sin(e),a=Math.cos(e),r=xt(i),l=function(t){var e=Math.exp(t);return e=(e+1/e)/2}(i),c=2*a*l,h=-2*s*r,d=t.length-1,u=t[d],p=0,m=0,f=0;--d>=0;)o=m,n=p,u=c*(m=u)-o-h*(p=f)+t[d],f=h*m-n+c*p;return[(c=s*l)*u-(h=a*r)*f,c*f+h*u]},Tt={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(St.init.apply(this),this.forward=St.forward,this.inverse=St.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),i=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),i*=e,this.cgb[1]=i*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),i*=e,this.cgb[2]=i*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=i*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),i*=e,this.cgb[3]=i*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=i*(1237/630+e*(e*(-24832/14175)-2.4)),i*=e,this.cgb[4]=i*(4174/315+e*(-144838/6237)),this.cbg[4]=i*(-734/315+e*(109598/31185)),i*=e,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=i*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=i*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),i*=e,this.utg[2]=i*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=i*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),i*=e,this.utg[3]=i*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=i*(49561/161280+e*(-179/168+e*(6601661/7257600))),i*=e,this.utg[4]=i*(-4583/161280+e*(108847/3991680)),this.gtu[4]=i*(34729/80640+e*(-3418889/1995840)),i*=e,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var o=kt(this.cbg,this.lat0);this.Zb=-this.Qn*(o+function(t,e){for(var i,o=2*Math.cos(e),n=t.length-1,s=t[n],a=0;--n>=0;)i=o*s-a+t[n],a=s,s=i;return Math.sin(e)*i}(this.gtu,2*o))},forward:function(t){var e=G(t.x-this.long0),i=t.y;i=kt(this.cbg,i);var o=Math.sin(i),n=Math.cos(i),s=Math.sin(e),a=Math.cos(e);i=Math.atan2(o,a*n),e=Math.atan2(s*n,Gt(o,n*a)),e=It(Math.tan(e));var r,l,c=Rt(this.gtu,2*i,2*e);return i+=c[0],e+=c[1],Math.abs(e)<=2.623395162778?(r=this.a*(this.Qn*e)+this.x0,l=this.a*(this.Qn*i+this.Zb)+this.y0):(r=1/0,l=1/0),t.x=r,t.y=l,t},inverse:function(t){var e,i,o=(t.x-this.x0)*(1/this.a),n=(t.y-this.y0)*(1/this.a);if(n=(n-this.Zb)/this.Qn,o/=this.Qn,Math.abs(o)<=2.623395162778){var s=Rt(this.utg,2*n,2*o);n+=s[0],o+=s[1],o=Math.atan(xt(o));var a=Math.sin(n),r=Math.cos(n),l=Math.sin(o),c=Math.cos(o);n=Math.atan2(a*c,Gt(l,c*r)),o=Math.atan2(l,c*r),e=G(o+this.long0),i=kt(this.cgb,n)}else e=1/0,i=1/0;return t.x=e,t.y=i,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]},At={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(G(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*i,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Tt.init.apply(this),this.forward=Tt.forward,this.inverse=Tt.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},Dt=function(t,e){return Math.pow((1-t)/(1+t),e)},Ot={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+n)/(Math.pow(Math.tan(.5*this.lat0+n),this.C)*Dt(this.e*t,this.ratexp))},forward:function(t){var i=t.x,o=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*o+n),this.C)*Dt(this.e*Math.sin(o),this.ratexp))-e,t.x=this.C*i,t},inverse:function(t){for(var i=t.x/this.C,o=t.y,s=Math.pow(Math.tan(.5*o+n)/this.K,1/this.C),a=20;a>0&&(o=2*Math.atan(s*Dt(this.e*Math.sin(t.y),-.5*this.e))-e,!(Math.abs(o-t.y)<1e-14));--a)t.y=o;return a?(t.x=i,t.y=o,t):null},names:["gauss"]},Nt={init:function(){Ot.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,i,o,n;return t.x=G(t.x-this.long0),Ot.forward.apply(this,[t]),e=Math.sin(t.y),i=Math.cos(t.y),o=Math.cos(t.x),n=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*i*o),t.x=n*i*Math.sin(t.x),t.y=n*(this.cosc0*e-this.sinc0*i*o),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,i,o,n,s;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,s=Math.sqrt(t.x*t.x+t.y*t.y)){var a=2*Math.atan2(s,this.R2);e=Math.sin(a),i=Math.cos(a),n=Math.asin(i*this.sinc0+t.y*e*this.cosc0/s),o=Math.atan2(t.x*e,s*this.cosc0*i-t.y*this.sinc0*e)}else n=this.phic0,o=0;return t.x=o,t.y=n,Ot.inverse.apply(this,[t]),t.x=G(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},Ut={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*(1+x(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=1e-10&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*this.cons*S(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/I(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=S(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-e,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var i,o,n,s,a,r,l=t.x,c=t.y,h=Math.sin(c),d=Math.cos(c),u=G(l-this.long0);return Math.abs(Math.abs(l-this.long0)-Math.PI)<=1e-10&&Math.abs(c+this.lat0)<=1e-10?(t.x=NaN,t.y=NaN,t):this.sphere?(i=2*this.k0/(1+this.sinlat0*h+this.coslat0*d*Math.cos(u)),t.x=this.a*i*d*Math.sin(u)+this.x0,t.y=this.a*i*(this.coslat0*h-this.sinlat0*d*Math.cos(u))+this.y0,t):(o=2*Math.atan(this.ssfn_(c,h,this.e))-e,s=Math.cos(o),n=Math.sin(o),Math.abs(this.coslat0)<=1e-10?(a=I(this.e,c*this.con,this.con*h),r=2*this.a*this.k0*a/this.cons,t.x=this.x0+r*Math.sin(l-this.long0),t.y=this.y0-this.con*r*Math.cos(l-this.long0),t):(Math.abs(this.sinlat0)<1e-10?(i=2*this.a*this.k0/(1+s*Math.cos(u)),t.y=i*n):(i=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*n+this.cosX0*s*Math.cos(u))),t.y=i*(this.cosX0*n-this.sinX0*s*Math.cos(u))+this.y0),t.x=i*s*Math.sin(u)+this.x0,t))},inverse:function(t){var i,o,n,s,a;t.x-=this.x0,t.y-=this.y0;var r=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var l=2*Math.atan(r/(2*this.a*this.k0));return i=this.long0,o=this.lat0,r<=1e-10?(t.x=i,t.y=o,t):(o=Math.asin(Math.cos(l)*this.sinlat0+t.y*Math.sin(l)*this.coslat0/r),i=Math.abs(this.coslat0)<1e-10?this.lat0>0?G(this.long0+Math.atan2(t.x,-1*t.y)):G(this.long0+Math.atan2(t.x,t.y)):G(this.long0+Math.atan2(t.x*Math.sin(l),r*this.coslat0*Math.cos(l)-t.y*this.sinlat0*Math.sin(l))),t.x=i,t.y=o,t)}if(Math.abs(this.coslat0)<=1e-10){if(r<=1e-10)return o=this.lat0,i=this.long0,t.x=i,t.y=o,t;t.x*=this.con,t.y*=this.con,n=r*this.cons/(2*this.a*this.k0),o=this.con*k(this.e,n),i=this.con*G(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else s=2*Math.atan(r*this.cosX0/(2*this.a*this.k0*this.ms1)),i=this.long0,r<=1e-10?a=this.X0:(a=Math.asin(Math.cos(s)*this.sinX0+t.y*Math.sin(s)*this.cosX0/r),i=G(this.long0+Math.atan2(t.x*Math.sin(s),r*this.cosX0*Math.cos(s)-t.y*this.sinX0*Math.sin(s)))),o=-1*k(this.e,Math.tan(.5*(e+a)));return t.x=i,t.y=o,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,i,o){return i*=o,Math.tan(.5*(e+t))*Math.pow((1-i)/(1+i),.5*o)}},jt={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),i=this.a,o=1/this.rf,n=2*o-Math.pow(o,2),s=this.e=Math.sqrt(n);this.R=this.k0*i*Math.sqrt(1-n)/(1-n*Math.pow(e,2)),this.alpha=Math.sqrt(1+n/(1-n)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),r=Math.log(Math.tan(Math.PI/4+t/2)),l=Math.log((1+s*e)/(1-s*e));this.K=a-this.alpha*r+this.alpha*s/2*l},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),o=-this.alpha*(e+i)+this.K,n=2*(Math.atan(Math.exp(o))-Math.PI/4),s=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(n)+Math.cos(this.b0)*Math.cos(s))),r=Math.asin(Math.cos(this.b0)*Math.sin(n)-Math.sin(this.b0)*Math.cos(n)*Math.cos(s));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*a+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,i=t.y-this.y0,o=e/this.R,n=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(n)+Math.sin(this.b0)*Math.cos(n)*Math.cos(o)),a=Math.atan(Math.sin(o)/(Math.cos(this.b0)*Math.cos(o)-Math.sin(this.b0)*Math.tan(n))),r=this.lambda0+a/this.alpha,l=0,c=s,h=-1e3,d=0;Math.abs(c-h)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(c))/2)),h=c,c=2*Math.atan(Math.exp(l))-Math.PI/2}return t.x=r,t.y=c,t},names:["somerc"]},Ft={init:function(){var t,o,a,r,l,c,h,d,u,p,m,f,g,_=0,v=0,y=0,E=0,w=0,P=0,b=0;this.no_off=(g="object"==typeof(f=this).PROJECTION?Object.keys(f.PROJECTION)[0]:f.PROJECTION,"no_uoff"in f||"no_off"in f||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(g)),this.no_rot="no_rot"in this;var M=!1;"alpha"in this&&(M=!0);var C=!1;if("rectified_grid_angle"in this&&(C=!0),M&&(b=this.alpha),C&&(_=this.rectified_grid_angle*i),M||C)v=this.longc;else if(y=this.long1,w=this.lat1,E=this.long2,P=this.lat2,Math.abs(w-P)<=1e-7||(t=Math.abs(w))<=1e-7||Math.abs(t-e)<=1e-7||Math.abs(Math.abs(this.lat0)-e)<=1e-7||Math.abs(Math.abs(P)-e)<=1e-7)throw new Error;var L=1-this.es;o=Math.sqrt(L),Math.abs(this.lat0)>1e-10?(d=Math.sin(this.lat0),a=Math.cos(this.lat0),t=1-this.es*d*d,this.B=a*a,this.B=Math.sqrt(1+this.es*this.B*this.B/L),this.A=this.B*this.k0*o/t,(l=(r=this.B*o/(a*Math.sqrt(t)))*r-1)<=0?l=0:(l=Math.sqrt(l),this.lat0<0&&(l=-l)),this.E=l+=r,this.E*=Math.pow(I(this.e,this.lat0,d),this.B)):(this.B=1/o,this.A=this.k0,this.E=r=l=1),M||C?(M?(m=Math.asin(Math.sin(b)/r),C||(_=b)):(m=_,b=Math.asin(r*Math.sin(m))),this.lam0=v-Math.asin(.5*(l-1/l)*Math.tan(m))/this.B):(c=Math.pow(I(this.e,w,Math.sin(w)),this.B),h=Math.pow(I(this.e,P,Math.sin(P)),this.B),l=this.E/c,u=(h-c)/(h+c),p=((p=this.E*this.E)-h*c)/(p+h*c),(t=y-E)<-Math.pi?E-=s:t>Math.pi&&(E+=s),this.lam0=G(.5*(y+E)-Math.atan(p*Math.tan(.5*this.B*(y-E))/u)/this.B),m=Math.atan(2*Math.sin(this.B*G(y-this.lam0))/(l-1/l)),_=b=Math.asin(r*Math.sin(m))),this.singam=Math.sin(m),this.cosgam=Math.cos(m),this.sinrot=Math.sin(_),this.cosrot=Math.cos(_),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(r*r-1)/Math.cos(b))),this.lat0<0&&(this.u_0=-this.u_0)),l=.5*m,this.v_pole_n=this.ArB*Math.log(Math.tan(n-l)),this.v_pole_s=this.ArB*Math.log(Math.tan(n+l))},forward:function(t){var i,o,n,s,a,r,l,c,h={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-e)>1e-10){if(i=.5*((a=this.E/Math.pow(I(this.e,t.y,Math.sin(t.y)),this.B))-(r=1/a)),o=.5*(a+r),s=Math.sin(this.B*t.x),n=(i*this.singam-s*this.cosgam)/o,Math.abs(Math.abs(n)-1)<1e-10)throw new Error;c=.5*this.ArB*Math.log((1-n)/(1+n)),r=Math.cos(this.B*t.x),l=Math.abs(r)<1e-7?this.A*t.x:this.ArB*Math.atan2(i*this.cosgam+s*this.singam,r)}else c=t.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*t.y;return this.no_rot?(h.x=l,h.y=c):(l-=this.u_0,h.x=c*this.cosrot+l*this.sinrot,h.y=l*this.cosrot-c*this.sinrot),h.x=this.a*h.x+this.x0,h.y=this.a*h.y+this.y0,h},inverse:function(t){var i,o,n,s,a,r,l,c={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(o=t.y,i=t.x):(o=t.x*this.cosrot-t.y*this.sinrot,i=t.y*this.cosrot+t.x*this.sinrot+this.u_0),s=.5*((n=Math.exp(-this.BrA*o))-1/n),a=.5*(n+1/n),l=((r=Math.sin(this.BrA*i))*this.cosgam+s*this.singam)/a,Math.abs(Math.abs(l)-1)<1e-10)c.x=0,c.y=l<0?-e:e;else{if(c.y=this.E/Math.sqrt((1+l)/(1-l)),c.y=k(this.e,Math.pow(c.y,1/this.B)),c.y===1/0)throw new Error;c.x=-this.rB*Math.atan2(s*this.cosgam-r*this.singam,Math.cos(this.BrA*i))}return c.x+=this.lam0,c},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},zt={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<1e-10)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),i=Math.cos(this.lat1),o=S(this.e,e,i),n=I(this.e,this.lat1,e),s=Math.sin(this.lat2),a=Math.cos(this.lat2),r=S(this.e,s,a),l=I(this.e,this.lat2,s),c=I(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>1e-10?this.ns=Math.log(o/r)/Math.log(n/l):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=o/(this.ns*Math.pow(n,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var i=t.x,o=t.y;Math.abs(2*Math.abs(o)-Math.PI)<=1e-10&&(o=x(o)*(e-2e-10));var n,s,a=Math.abs(Math.abs(o)-e);if(a>1e-10)n=I(this.e,o,Math.sin(o)),s=this.a*this.f0*Math.pow(n,this.ns);else{if((a=o*this.ns)<=0)return null;s=0}var r=this.ns*G(i-this.long0);return t.x=this.k0*(s*Math.sin(r))+this.x0,t.y=this.k0*(this.rh-s*Math.cos(r))+this.y0,t},inverse:function(t){var i,o,n,s,a,r=(t.x-this.x0)/this.k0,l=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(i=Math.sqrt(r*r+l*l),o=1):(i=-Math.sqrt(r*r+l*l),o=-1);var c=0;if(0!==i&&(c=Math.atan2(o*r,o*l)),0!==i||this.ns>0){if(o=1/this.ns,n=Math.pow(i/(this.a*this.f0),o),-9999===(s=k(this.e,n)))return null}else s=-e;return a=G(c/this.ns+this.long0),t.x=a,t.y=s,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"]},Bt={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,i,o,n,s,a,r,l=t.x,c=t.y,h=G(l-this.long0);return e=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/e)-this.s45),o=-h*this.alfa,n=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(o)),s=Math.asin(Math.cos(i)*Math.sin(o)/Math.cos(n)),a=this.n*s,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(n/2+this.s45),this.n),t.y=r*Math.cos(a)/1,t.x=r*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,i,o,n,s,a,r,l=t.x;t.x=t.y,t.y=l,this.czech||(t.y*=-1,t.x*=-1),s=Math.sqrt(t.x*t.x+t.y*t.y),n=Math.atan2(t.y,t.x)/Math.sin(this.s0),o=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(o)-Math.sin(this.ad)*Math.cos(o)*Math.cos(n)),i=Math.asin(Math.cos(o)*Math.sin(n)/Math.cos(e)),t.x=this.long0-i/this.alfa,a=e,r=0;var c=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(r=1),a=t.y,c+=1}while(0===r&&c<15);return c>=15?null:t},names:["Krovak","krovak"]},Wt=function(t,e,i,o,n){return t*n-e*Math.sin(2*n)+i*Math.sin(4*n)-o*Math.sin(6*n)},qt=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))},Ht=function(t){return.375*t*(1+.25*t*(1+.46875*t))},Vt=function(t){return.05859375*t*t*(1+.75*t)},Yt=function(t){return t*t*t*(35/3072)},Xt=function(t,e,i){var o=e*i;return t/Math.sqrt(1-o*o)},Kt=function(t){return Math.abs(t)1e-7?(1-t*t)*(e/(1-(i=t*e)*i)-.5/t*Math.log((1-i)/(1+i))):2*e},$t={init:function(){var t,i=Math.abs(this.lat0);if(Math.abs(i-e)<1e-10?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<1e-10?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=Qt(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,i=[];return i[0]=.3333333333333333*t,e=t*t,i[0]+=.17222222222222222*e,i[1]=.06388888888888888*e,e*=t,i[0]+=.10257936507936508*e,i[1]+=.0664021164021164*e,i[2]=.016415012942191543*e,i}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Qt(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var i,o,s,a,r,l,c,h,d,u,p=t.x,m=t.y;if(p=G(p-this.long0),this.sphere){if(r=Math.sin(m),u=Math.cos(m),s=Math.cos(p),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((o=this.mode===this.EQUIT?1+u*s:1+this.sinph0*r+this.cosph0*u*s)<=1e-10)return null;i=(o=Math.sqrt(2/o))*u*Math.sin(p),o*=this.mode===this.EQUIT?r:this.cosph0*r-this.sinph0*u*s}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(s=-s),Math.abs(m+this.lat0)<1e-10)return null;o=n-.5*m,i=(o=2*(this.mode===this.S_POLE?Math.cos(o):Math.sin(o)))*Math.sin(p),o*=s}}else{switch(c=0,h=0,d=0,s=Math.cos(p),a=Math.sin(p),r=Math.sin(m),l=Qt(this.e,r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(c=l/this.qp,h=Math.sqrt(1-c*c)),this.mode){case this.OBLIQ:d=1+this.sinb1*c+this.cosb1*h*s;break;case this.EQUIT:d=1+h*s;break;case this.N_POLE:d=e+m,l=this.qp-l;break;case this.S_POLE:d=m-e,l=this.qp+l}if(Math.abs(d)<1e-10)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:d=Math.sqrt(2/d),o=this.mode===this.OBLIQ?this.ymf*d*(this.cosb1*c-this.sinb1*h*s):(d=Math.sqrt(2/(1+h*s)))*c*this.ymf,i=this.xmf*d*h*a;break;case this.N_POLE:case this.S_POLE:l>=0?(i=(d=Math.sqrt(l))*a,o=s*(this.mode===this.S_POLE?d:-d)):i=o=0}}return t.x=this.a*i+this.x0,t.y=this.a*o+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,o,n,s,a,r,l,c,h,d,u=t.x/this.a,p=t.y/this.a;if(this.sphere){var m,f=0,g=0;if((o=.5*(m=Math.sqrt(u*u+p*p)))>1)return null;switch(o=2*Math.asin(o),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(g=Math.sin(o),f=Math.cos(o)),this.mode){case this.EQUIT:o=Math.abs(m)<=1e-10?0:Math.asin(p*g/m),u*=g,p=f*m;break;case this.OBLIQ:o=Math.abs(m)<=1e-10?this.lat0:Math.asin(f*this.sinph0+p*g*this.cosph0/m),u*=g*this.cosph0,p=(f-Math.sin(o)*this.sinph0)*m;break;case this.N_POLE:p=-p,o=e-o;break;case this.S_POLE:o-=e}i=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(u,p):0}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(u/=this.dd,p*=this.dd,(r=Math.sqrt(u*u+p*p))<1e-10)return t.x=this.long0,t.y=this.lat0,t;s=2*Math.asin(.5*r/this.rq),n=Math.cos(s),u*=s=Math.sin(s),this.mode===this.OBLIQ?(l=n*this.sinb1+p*s*this.cosb1/r,a=this.qp*l,p=r*this.cosb1*n-p*this.sinb1*s):(l=p*s/r,a=this.qp*l,p=r*n)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(p=-p),!(a=u*u+p*p))return t.x=this.long0,t.y=this.lat0,t;l=1-a/this.qp,this.mode===this.S_POLE&&(l=-l)}i=Math.atan2(u,p),c=Math.asin(l),h=this.apa,d=c+c,o=c+h[0]*Math.sin(d)+h[1]*Math.sin(d+d)+h[2]*Math.sin(d+d+d)}return t.x=G(this.long0+i),t.y=o,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},te=function(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)},ee={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=S(this.e3,this.sin_po,this.cos_po),this.qs1=Qt(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=S(this.e3,this.sin_po,this.cos_po),this.qs2=Qt(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Qt(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>1e-10?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var o=Qt(this.e3,this.sin_phi,this.cos_phi),n=this.a*Math.sqrt(this.c-this.ns0*o)/this.ns0,s=this.ns0*G(e-this.long0),a=n*Math.sin(s)+this.x0,r=this.rh-n*Math.cos(s)+this.y0;return t.x=a,t.y=r,t},inverse:function(t){var e,i,o,n,s,a;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),o=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),o=-1),n=0,0!==e&&(n=Math.atan2(o*t.x,o*t.y)),o=e*this.ns0/this.a,this.sphere?a=Math.asin((this.c-o*o)/(2*this.ns0)):(i=(this.c-o*o)/this.ns0,a=this.phi1z(this.e3,i)),s=G(n/this.ns0+this.long0),t.x=s,t.y=a,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,e){var i,o,n,s,a=te(.5*e);if(t<1e-10)return a;for(var r=t*t,l=1;l<=25;l++)if(a+=s=.5*(n=1-(o=t*(i=Math.sin(a)))*o)*n/Math.cos(a)*(e/(1-r)-i/n+.5/t*Math.log((1-o)/(1+o))),Math.abs(s)<=1e-7)return a;return null}},ie={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var e,i,o,n,s,a,r,l=t.x,c=t.y;return o=G(l-this.long0),e=Math.sin(c),i=Math.cos(c),n=Math.cos(o),(s=this.sin_p14*e+this.cos_p14*i*n)>0||Math.abs(s)<=1e-10?(a=this.x0+1*this.a*i*Math.sin(o)/s,r=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*n)/s):(a=this.x0+this.infinity_dist*i*Math.sin(o),r=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*i*n)),t.x=a,t.y=r,t},inverse:function(t){var e,i,o,n,s,a;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(n=Math.atan2(e,this.rc),i=Math.sin(n),o=Math.cos(n),a=te(o*this.sin_p14+t.y*i*this.cos_p14/e),s=Math.atan2(t.x*i,e*this.cos_p14*o-t.y*this.sin_p14*i),s=G(this.long0+s)):(a=this.phic0,s=0),t.x=s,t.y=a,t},names:["gnom"]},oe={init:function(){this.sphere||(this.k0=S(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,i,o=t.x,n=t.y,s=G(o-this.long0);if(this.sphere)e=this.x0+this.a*s*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(n)/Math.cos(this.lat_ts);else{var a=Qt(this.e,Math.sin(n));e=this.x0+this.a*this.k0*s,i=this.y0+this.a*a*.5/this.k0}return t.x=e,t.y=i,t},inverse:function(t){var i,o;return t.x-=this.x0,t.y-=this.y0,this.sphere?(i=G(this.long0+t.x/this.a/Math.cos(this.lat_ts)),o=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(o=function(t,i){var o=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-o)<1e-6)return i<0?-1*e:e;for(var n,s,a,r,l=Math.asin(.5*i),c=0;c<30;c++)if(s=Math.sin(l),a=Math.cos(l),r=t*s,l+=n=Math.pow(1-r*r,2)/(2*a)*(i/(1-t*t)-s/(1-r*r)+.5/t*Math.log((1-r)/(1+r))),Math.abs(n)<=1e-10)return l;return NaN}(this.e,2*t.y*this.k0/this.a),i=G(this.long0+t.x/(this.a*this.k0))),t.x=i,t.y=o,t},names:["cea"]},ne={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,i=t.y,o=G(e-this.long0),n=Kt(i-this.lat0);return t.x=this.x0+this.a*o*this.rc,t.y=this.y0+this.a*n,t},inverse:function(t){var e=t.x,i=t.y;return t.x=G(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=Kt(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},se={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=qt(this.es),this.e1=Ht(this.es),this.e2=Vt(this.es),this.e3=Yt(this.es),this.ml0=this.a*Wt(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,i,o,n=t.x,s=t.y,a=G(n-this.long0);if(o=a*Math.sin(s),this.sphere)Math.abs(s)<=1e-10?(e=this.a*a,i=-1*this.a*this.lat0):(e=this.a*Math.sin(o)/Math.tan(s),i=this.a*(Kt(s-this.lat0)+(1-Math.cos(o))/Math.tan(s)));else if(Math.abs(s)<=1e-10)e=this.a*a,i=-1*this.ml0;else{var r=Xt(this.a,this.e,Math.sin(s))/Math.tan(s);e=r*Math.sin(o),i=this.a*Wt(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+r*(1-Math.cos(o))}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){var e,i,o,n,s,a,r,l,c;if(o=t.x-this.x0,n=t.y-this.y0,this.sphere)if(Math.abs(n+this.a*this.lat0)<=1e-10)e=G(o/this.a+this.long0),i=0;else{var h;for(a=this.lat0+n/this.a,r=o*o/this.a/this.a+a*a,l=a,s=20;s;--s)if(l+=c=-1*(a*(l*(h=Math.tan(l))+1)-l-.5*(l*l+r)*h)/((l-a)/h-1),Math.abs(c)<=1e-10){i=l;break}e=G(this.long0+Math.asin(o*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(n+this.ml0)<=1e-10)i=0,e=G(this.long0+o/this.a);else{var d,u,p,m,f;for(a=(this.ml0+n)/this.a,r=o*o/this.a/this.a+a*a,l=a,s=20;s;--s)if(f=this.e*Math.sin(l),d=Math.sqrt(1-f*f)*Math.tan(l),u=this.a*Wt(this.e0,this.e1,this.e2,this.e3,l),p=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=c=(a*(d*(m=u/this.a)+1)-m-.5*d*(m*m+r))/(this.es*Math.sin(2*l)*(m*m+r-2*a*m)/(4*d)+(a-m)*(d*p-2/Math.sin(2*l))-p),Math.abs(c)<=1e-10){i=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),e=G(this.long0+Math.asin(o*d/this.a)/Math.sin(i))}return t.x=e,t.y=i,t},names:["Polyconic","poly"]},ae={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(e){var i,o=e.x,n=e.y-this.lat0,s=o-this.long0,a=n/t*1e-5,r=s,l=1,c=0;for(i=1;i<=10;i++)l*=a,c+=this.A[i]*l;var h,d=c,u=r,p=1,m=0,f=0,g=0;for(i=1;i<=6;i++)h=m*d+p*u,p=p*d-m*u,m=h,f=f+this.B_re[i]*p-this.B_im[i]*m,g=g+this.B_im[i]*p+this.B_re[i]*m;return e.x=g*this.a+this.x0,e.y=f*this.a+this.y0,e},inverse:function(e){var i,o,n=e.x,s=e.y,a=n-this.x0,r=(s-this.y0)/this.a,l=a/this.a,c=1,h=0,d=0,u=0;for(i=1;i<=6;i++)o=h*r+c*l,c=c*r-h*l,h=o,d=d+this.C_re[i]*c-this.C_im[i]*h,u=u+this.C_im[i]*c+this.C_re[i]*h;for(var p=0;p.999999999999&&(i=.999999999999),e=Math.asin(i);var o=G(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));o<-Math.PI&&(o=-Math.PI),o>Math.PI&&(o=Math.PI),i=(2*e+Math.sin(2*e))/Math.PI,Math.abs(i)>1&&(i=1);var n=Math.asin(i);return t.x=o,t.y=n,t},names:["Mollweide","moll"]},he={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=qt(this.es),this.e1=Ht(this.es),this.e2=Vt(this.es),this.e3=Yt(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=S(this.e,this.sinphi,this.cosphi),this.ml1=Wt(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<1e-10?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=S(this.e,this.sinphi,this.cosphi),this.ml2=Wt(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Wt(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var e,i=t.x,o=t.y;if(this.sphere)e=this.a*(this.g-o);else{var n=Wt(this.e0,this.e1,this.e2,this.e3,o);e=this.a*(this.g-n)}var s=this.ns*G(i-this.long0),a=this.x0+e*Math.sin(s),r=this.y0+this.rh-e*Math.cos(s);return t.x=a,t.y=r,t},inverse:function(t){var e,i,o,n;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var s=0;if(0!==i&&(s=Math.atan2(e*t.x,e*t.y)),this.sphere)return n=G(this.long0+s/this.ns),o=Kt(this.g-i/this.a),t.x=n,t.y=o,t;var a=this.g-i/this.a;return o=Zt(a,this.e0,this.e1,this.e2,this.e3),n=G(this.long0+s/this.ns),t.x=n,t.y=o,t},names:["Equidistant_Conic","eqdc"]},de={init:function(){this.R=this.a},forward:function(t){var i,o,n=t.x,s=t.y,a=G(n-this.long0);Math.abs(s)<=1e-10&&(i=this.x0+this.R*a,o=this.y0);var r=te(2*Math.abs(s/Math.PI));(Math.abs(a)<=1e-10||Math.abs(Math.abs(s)-e)<=1e-10)&&(i=this.x0,o=s>=0?this.y0+Math.PI*this.R*Math.tan(.5*r):this.y0+Math.PI*this.R*-Math.tan(.5*r));var l=.5*Math.abs(Math.PI/a-a/Math.PI),c=l*l,h=Math.sin(r),d=Math.cos(r),u=d/(h+d-1),p=u*u,m=u*(2/h-1),f=m*m,g=Math.PI*this.R*(l*(u-f)+Math.sqrt(c*(u-f)*(u-f)-(f+c)*(p-f)))/(f+c);a<0&&(g=-g),i=this.x0+g;var _=c+u;return g=Math.PI*this.R*(m*_-l*Math.sqrt((f+c)*(c+1)-_*_))/(f+c),o=s>=0?this.y0+g:this.y0-g,t.x=i,t.y=o,t},inverse:function(t){var e,i,o,n,s,a,r,l,c,h,d,u;return t.x-=this.x0,t.y-=this.y0,d=Math.PI*this.R,s=(o=t.x/d)*o+(n=t.y/d)*n,d=3*(n*n/(l=-2*(a=-Math.abs(n)*(1+s))+1+2*n*n+s*s)+(2*(r=a-2*n*n+o*o)*r*r/l/l/l-9*a*r/l/l)/27)/(c=(a-r*r/3/l)/l)/(h=2*Math.sqrt(-c/3)),Math.abs(d)>1&&(d=d>=0?1:-1),u=Math.acos(d)/3,i=t.y>=0?(-h*Math.cos(u+Math.PI/3)-r/3/l)*Math.PI:-(-h*Math.cos(u+Math.PI/3)-r/3/l)*Math.PI,e=Math.abs(o)<1e-10?this.long0:G(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(o*o-n*n)+s*s))/2/o),t.x=e,t.y=i,t},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]},ue={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(t){var i,o,n,s,a,r,l,c,h,d,u,p,m,f,g,_,v,y,E,w,P,b,M=t.x,C=t.y,L=Math.sin(t.y),S=Math.cos(t.y),x=G(M-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=1e-10?(t.x=this.x0+this.a*(e-C)*Math.sin(x),t.y=this.y0-this.a*(e-C)*Math.cos(x),t):Math.abs(this.sin_p12+1)<=1e-10?(t.x=this.x0+this.a*(e+C)*Math.sin(x),t.y=this.y0+this.a*(e+C)*Math.cos(x),t):(y=this.sin_p12*L+this.cos_p12*S*Math.cos(x),v=(_=Math.acos(y))?_/Math.sin(_):1,t.x=this.x0+this.a*v*S*Math.sin(x),t.y=this.y0+this.a*v*(this.cos_p12*L-this.sin_p12*S*Math.cos(x)),t):(i=qt(this.es),o=Ht(this.es),n=Vt(this.es),s=Yt(this.es),Math.abs(this.sin_p12-1)<=1e-10?(a=this.a*Wt(i,o,n,s,e),r=this.a*Wt(i,o,n,s,C),t.x=this.x0+(a-r)*Math.sin(x),t.y=this.y0-(a-r)*Math.cos(x),t):Math.abs(this.sin_p12+1)<=1e-10?(a=this.a*Wt(i,o,n,s,e),r=this.a*Wt(i,o,n,s,C),t.x=this.x0+(a+r)*Math.sin(x),t.y=this.y0+(a+r)*Math.cos(x),t):(l=L/S,c=Xt(this.a,this.e,this.sin_p12),h=Xt(this.a,this.e,L),d=Math.atan((1-this.es)*l+this.es*c*this.sin_p12/(h*S)),E=0===(u=Math.atan2(Math.sin(x),this.cos_p12*Math.tan(d)-this.sin_p12*Math.cos(x)))?Math.asin(this.cos_p12*Math.sin(d)-this.sin_p12*Math.cos(d)):Math.abs(Math.abs(u)-Math.PI)<=1e-10?-Math.asin(this.cos_p12*Math.sin(d)-this.sin_p12*Math.cos(d)):Math.asin(Math.sin(x)*Math.cos(d)/Math.sin(u)),p=this.e*this.sin_p12/Math.sqrt(1-this.es),_=c*E*(1-(w=E*E)*(g=(m=this.e*this.cos_p12*Math.cos(u)/Math.sqrt(1-this.es))*m)*(1-g)/6+(P=w*E)/8*(f=p*m)*(1-2*g)+(b=P*E)/120*(g*(4-7*g)-3*p*p*(1-7*g))-b*E/48*f),t.x=this.x0+_*Math.sin(u),t.y=this.y0+_*Math.cos(u),t))},inverse:function(t){var i,o,n,s,a,r,l,c,h,d,u,p,m,f,g,_,v,y,E,w,P,b,M;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((i=Math.sqrt(t.x*t.x+t.y*t.y))>2*e*this.a)return;return o=i/this.a,n=Math.sin(o),s=Math.cos(o),a=this.long0,Math.abs(i)<=1e-10?r=this.lat0:(r=te(s*this.sin_p12+t.y*n*this.cos_p12/i),l=Math.abs(this.lat0)-e,a=Math.abs(l)<=1e-10?this.lat0>=0?G(this.long0+Math.atan2(t.x,-t.y)):G(this.long0-Math.atan2(-t.x,t.y)):G(this.long0+Math.atan2(t.x*n,i*this.cos_p12*s-t.y*this.sin_p12*n))),t.x=a,t.y=r,t}return c=qt(this.es),h=Ht(this.es),d=Vt(this.es),u=Yt(this.es),Math.abs(this.sin_p12-1)<=1e-10?(p=this.a*Wt(c,h,d,u,e),i=Math.sqrt(t.x*t.x+t.y*t.y),r=Zt((p-i)/this.a,c,h,d,u),a=G(this.long0+Math.atan2(t.x,-1*t.y)),t.x=a,t.y=r,t):Math.abs(this.sin_p12+1)<=1e-10?(p=this.a*Wt(c,h,d,u,e),i=Math.sqrt(t.x*t.x+t.y*t.y),r=Zt((i-p)/this.a,c,h,d,u),a=G(this.long0+Math.atan2(t.x,t.y)),t.x=a,t.y=r,t):(i=Math.sqrt(t.x*t.x+t.y*t.y),g=Math.atan2(t.x,t.y),m=Xt(this.a,this.e,this.sin_p12),_=Math.cos(g),y=-(v=this.e*this.cos_p12*_)*v/(1-this.es),E=3*this.es*(1-y)*this.sin_p12*this.cos_p12*_/(1-this.es),b=1-y*(P=(w=i/m)-y*(1+y)*Math.pow(w,3)/6-E*(1+3*y)*Math.pow(w,4)/24)*P/2-w*P*P*P/6,f=Math.asin(this.sin_p12*Math.cos(P)+this.cos_p12*Math.sin(P)*_),a=G(this.long0+Math.asin(Math.sin(g)*Math.sin(P)/Math.cos(f))),M=Math.sin(f),r=Math.atan2((M-this.es*b*this.sin_p12)*Math.tan(f),M*(1-this.es)),t.x=a,t.y=r,t)},names:["Azimuthal_Equidistant","aeqd"]},pe={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,i,o,n,s,a,r,l=t.x,c=t.y;return o=G(l-this.long0),e=Math.sin(c),i=Math.cos(c),n=Math.cos(o),((s=this.sin_p14*e+this.cos_p14*i*n)>0||Math.abs(s)<=1e-10)&&(a=1*this.a*i*Math.sin(o),r=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*n)),t.x=a,t.y=r,t},inverse:function(t){var i,o,n,s,a,r,l;return t.x-=this.x0,t.y-=this.y0,i=Math.sqrt(t.x*t.x+t.y*t.y),o=te(i/this.a),n=Math.sin(o),s=Math.cos(o),r=this.long0,Math.abs(i)<=1e-10?(l=this.lat0,t.x=r,t.y=l,t):(l=te(s*this.sin_p14+t.y*n*this.cos_p14/i),a=Math.abs(this.lat0)-e,Math.abs(a)<=1e-10?(r=this.lat0>=0?G(this.long0+Math.atan2(t.x,-t.y)):G(this.long0-Math.atan2(-t.x,t.y)),t.x=r,t.y=l,t):(r=G(this.long0+Math.atan2(t.x*n,i*this.cos_p14*s-t.y*this.sin_p14*n)),t.x=r,t.y=l,t))},names:["ortho"]},me=1,fe=2,ge=3,_e=4,ve=5,ye=6,Ee=1,we=2,Pe=3,be=4;function Me(t,i,o,s){var r;return t<1e-10?(s.value=Ee,r=0):(r=Math.atan2(i,o),Math.abs(r)<=n?s.value=Ee:r>n&&r<=e+n?(s.value=we,r-=e):r>e+n||r<=-(e+n)?(s.value=Pe,r=r>=0?r-a:r+a):(s.value=be,r+=e)),r}function Ce(t,e){var i=t+e;return i<-a?i+=s:i>+a&&(i-=s),i}var Le,Se={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=e-n/2?this.face=ve:this.lat0<=-(e-n/2)?this.face=ye:Math.abs(this.long0)<=n?this.face=me:Math.abs(this.long0)<=e+n?this.face=this.long0>0?fe:_e:this.face=ge,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var i,o,s,r,l,c,h={x:0,y:0},d={value:0};if(t.x-=this.long0,i=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,o=t.x,this.face===ve)r=e-i,o>=n&&o<=e+n?(d.value=Ee,s=o-e):o>e+n||o<=-(e+n)?(d.value=we,s=o>0?o-a:o+a):o>-(e+n)&&o<=-n?(d.value=Pe,s=o+e):(d.value=be,s=o);else if(this.face===ye)r=e+i,o>=n&&o<=e+n?(d.value=Ee,s=-o+e):o=-n?(d.value=we,s=-o):o<-n&&o>=-(e+n)?(d.value=Pe,s=-o-e):(d.value=be,s=o>0?-o+a:-o-a);else{var u,p,m,f,g,_;this.face===fe?o=Ce(o,+e):this.face===ge?o=Ce(o,+a):this.face===_e&&(o=Ce(o,-e)),f=Math.sin(i),g=Math.cos(i),_=Math.sin(o),u=g*Math.cos(o),p=g*_,m=f,this.face===me?s=Me(r=Math.acos(u),m,p,d):this.face===fe?s=Me(r=Math.acos(p),m,-u,d):this.face===ge?s=Me(r=Math.acos(-u),m,-p,d):this.face===_e?s=Me(r=Math.acos(-p),m,u,d):(r=s=0,d.value=Ee)}return c=Math.atan(12/a*(s+Math.acos(Math.sin(s)*Math.cos(n))-e)),l=Math.sqrt((1-Math.cos(r))/(Math.cos(c)*Math.cos(c))/(1-Math.cos(Math.atan(1/Math.cos(s))))),d.value===we?c+=e:d.value===Pe?c+=a:d.value===be&&(c+=1.5*a),h.x=l*Math.cos(c),h.y=l*Math.sin(c),h.x=h.x*this.a+this.x0,h.y=h.y*this.a+this.y0,t.x=h.x,t.y=h.y,t},inverse:function(t){var i,o,n,s,r,l,c,h,d,u,p,m,f={lam:0,phi:0},g={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,o=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),i=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?g.value=Ee:t.y>=0&&t.y>=Math.abs(t.x)?(g.value=we,i-=e):t.x<0&&-t.x>=Math.abs(t.y)?(g.value=Pe,i=i<0?i+a:i-a):(g.value=be,i+=e),d=a/12*Math.tan(i),r=Math.sin(d)/(Math.cos(d)-1/Math.sqrt(2)),l=Math.atan(r),(c=1-(n=Math.cos(i))*n*(s=Math.tan(o))*s*(1-Math.cos(Math.atan(1/Math.cos(l)))))<-1?c=-1:c>1&&(c=1),this.face===ve)h=Math.acos(c),f.phi=e-h,g.value===Ee?f.lam=l+e:g.value===we?f.lam=l<0?l+a:l-a:g.value===Pe?f.lam=l-e:f.lam=l;else if(this.face===ye)h=Math.acos(c),f.phi=h-e,g.value===Ee?f.lam=-l+e:g.value===we?f.lam=-l:g.value===Pe?f.lam=-l-e:f.lam=l<0?-l-a:-l+a;else{var _,v,y;d=(_=c)*_,v=(d+=(y=d>=1?0:Math.sqrt(1-d)*Math.sin(l))*y)>=1?0:Math.sqrt(1-d),g.value===we?(d=v,v=-y,y=d):g.value===Pe?(v=-v,y=-y):g.value===be&&(d=v,v=y,y=-d),this.face===fe?(d=_,_=-v,v=d):this.face===ge?(_=-_,v=-v):this.face===_e&&(d=_,_=v,v=-d),f.phi=Math.acos(-y)-e,f.lam=Math.atan2(v,_),this.face===fe?f.lam=Ce(f.lam,-e):this.face===ge?f.lam=Ce(f.lam,-a):this.face===_e&&(f.lam=Ce(f.lam,+e))}return 0!==this.es&&(u=f.phi<0?1:0,p=Math.tan(f.phi),m=this.b/Math.sqrt(p*p+this.one_minus_f_squared),f.phi=Math.atan(Math.sqrt(this.a*this.a-m*m)/(this.one_minus_f*m)),u&&(f.phi=-f.phi)),f.lam+=this.long0,t.x=f.lam,t.y=f.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},xe=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Ge=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ie=o/5,ke=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))},Re={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=G(t.x-this.long0),i=Math.abs(t.y),n=Math.floor(i*Ie);n<0?n=0:n>=18&&(n=17);var s={x:ke(xe[n],i=o*(i-.08726646259971647*n))*e,y:ke(Ge[n],i)};return t.y<0&&(s.y=-s.y),s.x=s.x*this.a*.8487+this.x0,s.y=s.y*this.a*1.3523+this.y0,s},inverse:function(t){var o={x:(t.x-this.x0)/(.8487*this.a),y:Math.abs(t.y-this.y0)/(1.3523*this.a)};if(o.y>=1)o.x/=xe[18][0],o.y=t.y<0?-e:e;else{var n=Math.floor(18*o.y);for(n<0?n=0:n>=18&&(n=17);;)if(Ge[n][0]>o.y)--n;else{if(!(Ge[n+1][0]<=o.y))break;++n}var s=Ge[n],a=5*(o.y-s[0])/(Ge[n+1][0]-s[0]);a=function(t,e,i,o){for(var n=e;o;--o){var s=t(n);if(n-=s,Math.abs(s)1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var s=function(t,e,i){for(var o=[],n=0;n3&&(t=o[o.length-3]+":"+o[o.length-1]),void 0===e.defs[t])throw"No projection definition for code "+t}return e(t)}}),t.Proj.CRS=t.Class.extend({includes:t.CRS,options:{transformation:new t.Transformation(1,0,-1,0)},initialize:function(e,i,o){var n,s,a,r;if(t.Proj._isProj4Obj(e)?(n=(s=e).srsCode,r=i||{},this.projection=new t.Proj.Projection(s,r.bounds)):(n=e,a=i,r=o||{},this.projection=new t.Proj.Projection(n,a,r.bounds)),t.Util.setOptions(this,r),this.code=n,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new t.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var l=this.options.resolutions.length-1;l>=0;l--)this.options.resolutions[l]&&(this._scales[l]=1/this.options.resolutions[l])}this.infinite=!this.options.bounds},scale:function(t){var e,i=Math.floor(t);return t===i?this._scales[t]:(e=this._scales[i])+(this._scales[i+1]-e)*(t-i)},zoom:function(t){var e,i,o=this._closestElement(this._scales,t),n=this._scales.indexOf(o);return t===o?n:void 0===o?-1/0:(i=n+1,void 0===(e=this._scales[i])?1/0:(t-o)/(e-o)+n)},distance:t.CRS.Earth.distance,R:t.CRS.Earth.R,_closestElement:function(t,e){for(var i,o=t.length;o--;)t[o]<=e&&(void 0===i||i + * @author owenm + * @license MIT + */ +function h(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function d(t){for(var e=1;e=0||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function g(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var _=g(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),v=g(/Edge/i),y=g(/firefox/i),E=g(/safari/i)&&!g(/chrome/i)&&!g(/android/i),w=g(/iP(ad|od|hone)/i),P=g(/chrome/i)&&g(/android/i),b={capture:!1,passive:!1};function M(t,e,i){t.addEventListener(e,i,!_&&b)}function C(t,e,i){t.removeEventListener(e,i,!_&&b)}function L(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function S(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function x(t,e,i,o){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&L(t,e):L(t,e))||o&&t===i)return t;if(t===i)break}while(t=S(t))}return null}var G,I=/\s+/g;function k(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(I," ").replace(" "+e+" "," ");t.className=(o+(i?" "+e:"")).replace(I," ")}}function R(t,e,i){var o=t&&t.style;if(o){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=i+("string"==typeof i?"":"px")}}function T(t,e){var i="";if("string"==typeof t)i=t;else do{var o=R(t,"transform");o&&"none"!==o&&(i=o+" "+i)}while(!e&&(t=t.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(i)}function A(t,e,i){if(t){var o=t.getElementsByTagName(e),n=0,s=o.length;if(i)for(;n=s:n<=s))return o;if(o===D())break;o=B(o,!1)}return!1}function U(t,e,i,o){for(var n=0,s=0,a=t.children;s2&&void 0!==arguments[2]?arguments[2]:{},o=i.evt,n=f(i,$);J.pluginEvent.bind(Vt)(t,e,d({dragEl:it,parentEl:ot,ghostEl:nt,rootEl:st,nextEl:at,lastDownEl:rt,cloneEl:lt,cloneHidden:ct,dragStarted:Pt,putSortable:ft,activeSortable:Vt.active,originalEvent:o,oldIndex:ht,oldDraggableIndex:ut,newIndex:dt,newDraggableIndex:pt,hideGhostForTarget:Bt,unhideGhostForTarget:Wt,cloneNowHidden:function(){ct=!0},cloneNowShown:function(){ct=!1},dispatchSortableEvent:function(t){et({sortable:e,name:t,originalEvent:o})}},n))};function et(t){Q(d({putSortable:ft,cloneEl:lt,targetEl:it,rootEl:st,oldIndex:ht,oldDraggableIndex:ut,newIndex:dt,newDraggableIndex:pt},t))}var it,ot,nt,st,at,rt,lt,ct,ht,dt,ut,pt,mt,ft,gt,_t,vt,yt,Et,wt,Pt,bt,Mt,Ct,Lt,St=!1,xt=!1,Gt=[],It=!1,kt=!1,Rt=[],Tt=!1,At=[],Dt="undefined"!=typeof document,Ot=w,Nt=v||_?"cssFloat":"float",Ut=Dt&&!P&&!w&&"draggable"in document.createElement("div"),jt=function(){if(Dt){if(_)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ft=function(t,e){var i=R(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),n=U(t,0,e),s=U(t,1,e),a=n&&R(n),r=s&&R(s),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(n).width,c=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+O(s).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(n&&a.float&&"none"!==a.float){var h="left"===a.float?"left":"right";return!s||"both"!==r.clear&&r.clear!==h?"horizontal":"vertical"}return n&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=o&&"none"===i[Nt]||s&&"none"===i[Nt]&&l+c>o)?"vertical":"horizontal"},zt=function(t){function e(t,i){return function(o,n,s,a){var r=o.options.group.name&&n.options.group.name&&o.options.group.name===n.options.group.name;if(null==t&&(i||r))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(o,n,s,a),i)(o,n,s,a);var l=(i?o:n).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var i={},o=t.group;o&&"object"==u(o)||(o={name:o}),i.name=o.name,i.checkPull=e(o.pull,!0),i.checkPut=e(o.put),i.revertClone=o.revertClone,t.group=i},Bt=function(){!jt&&nt&&R(nt,"display","none")},Wt=function(){!jt&&nt&&R(nt,"display","")};Dt&&document.addEventListener("click",(function(t){if(xt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),xt=!1,!1}),!0);var qt=function(t){if(it){t=t.touches?t.touches[0]:t;var e=(n=t.clientX,s=t.clientY,Gt.some((function(t){var e=t[Y].options.emptyInsertThreshold;if(e&&!j(t)){var i=O(t),o=n>=i.left-e&&n<=i.right+e,r=s>=i.top-e&&s<=i.bottom+e;return o&&r?a=t:void 0}})),a);if(e){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Y]._onDragOver(i)}}var n,s,a},Ht=function(t){it&&it.parentNode[Y]._isOutsideThisEl(t.target)};function Vt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=m({},e),t[Y]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ft(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Vt.supportPointer&&"PointerEvent"in window&&!E,emptyInsertThreshold:5};for(var o in J.initializePlugins(this,t,i),i)!(o in e)&&(e[o]=i[o]);for(var n in zt(e),this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));this.nativeDraggable=!e.forceFallback&&Ut,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?M(t,"pointerdown",this._onTapStart):(M(t,"mousedown",this._onTapStart),M(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(M(t,"dragover",this),M(t,"dragenter",this)),Gt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),m(this,X())}function Yt(t,e,i,o,n,s,a,r){var l,c,h=t[Y],d=h.options.onMove;return!window.CustomEvent||_||v?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=i,l.draggedRect=o,l.related=n||e,l.relatedRect=s||O(e),l.willInsertAfter=r,l.originalEvent=a,t.dispatchEvent(l),d&&(c=d.call(h,l,a)),c}function Xt(t){t.draggable=!1}function Kt(){Tt=!1}function Zt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,o=0;i--;)o+=e.charCodeAt(i);return o.toString(36)}function Jt(t){return setTimeout(t,0)}function Qt(t){return clearTimeout(t)}Vt.prototype={constructor:Vt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(bt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,it):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,o=this.options,n=o.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,r=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||r,c=o.filter;if(function(t){At.length=0;var e=t.getElementsByTagName("input"),i=e.length;for(;i--;){var o=e[i];o.checked&&At.push(o)}}(i),!it&&!(/mousedown|pointerdown/.test(s)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!E||!r||"SELECT"!==r.tagName.toUpperCase())&&!((r=x(r,o.draggable,i,!1))&&r.animated||rt===r)){if(ht=F(r),ut=F(r,o.draggable),"function"==typeof c){if(c.call(this,t,r,this))return et({sortable:e,rootEl:l,name:"filter",targetEl:r,toEl:i,fromEl:i}),tt("filter",e,{evt:t}),void(n&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=x(l,o.trim(),i,!1))return et({sortable:e,rootEl:o,name:"filter",targetEl:r,fromEl:i,toEl:i}),tt("filter",e,{evt:t}),!0}))))return void(n&&t.cancelable&&t.preventDefault());o.handle&&!x(l,o.handle,i,!1)||this._prepareDragStart(t,a,r)}}},_prepareDragStart:function(t,e,i){var o,n=this,s=n.el,a=n.options,r=s.ownerDocument;if(i&&!it&&i.parentNode===s){var l=O(i);if(st=s,ot=(it=i).parentNode,at=it.nextSibling,rt=i,mt=a.group,Vt.dragged=it,gt={target:it,clientX:(e||t).clientX,clientY:(e||t).clientY},Et=gt.clientX-l.left,wt=gt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,it.style["will-change"]="all",o=function(){tt("delayEnded",n,{evt:t}),Vt.eventCanceled?n._onDrop():(n._disableDelayedDragEvents(),!y&&n.nativeDraggable&&(it.draggable=!0),n._triggerDragStart(t,e),et({sortable:n,name:"choose",originalEvent:t}),k(it,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){A(it,t.trim(),Xt)})),M(r,"dragover",qt),M(r,"mousemove",qt),M(r,"touchmove",qt),M(r,"mouseup",n._onDrop),M(r,"touchend",n._onDrop),M(r,"touchcancel",n._onDrop),y&&this.nativeDraggable&&(this.options.touchStartThreshold=4,it.draggable=!0),tt("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(v||_))o();else{if(Vt.eventCanceled)return void this._onDrop();M(r,"mouseup",n._disableDelayedDrag),M(r,"touchend",n._disableDelayedDrag),M(r,"touchcancel",n._disableDelayedDrag),M(r,"mousemove",n._delayedDragTouchMoveHandler),M(r,"touchmove",n._delayedDragTouchMoveHandler),a.supportPointer&&M(r,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){it&&Xt(it),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;C(t,"mouseup",this._disableDelayedDrag),C(t,"touchend",this._disableDelayedDrag),C(t,"touchcancel",this._disableDelayedDrag),C(t,"mousemove",this._delayedDragTouchMoveHandler),C(t,"touchmove",this._delayedDragTouchMoveHandler),C(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?M(document,"pointermove",this._onTouchMove):M(document,e?"touchmove":"mousemove",this._onTouchMove):(M(it,"dragend",this),M(st,"dragstart",this._onDragStart));try{document.selection?Jt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(St=!1,st&&it){tt("dragStarted",this,{evt:e}),this.nativeDraggable&&M(document,"dragover",Ht);var i=this.options;!t&&k(it,i.dragClass,!1),k(it,i.ghostClass,!0),Vt.active=this,t&&this._appendGhost(),et({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(_t){this._lastX=_t.clientX,this._lastY=_t.clientY,Bt();for(var t=document.elementFromPoint(_t.clientX,_t.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(_t.clientX,_t.clientY))!==e;)e=t;if(it.parentNode[Y]._isOutsideThisEl(t),e)do{if(e[Y]){if(e[Y]._onDragOver({clientX:_t.clientX,clientY:_t.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Wt()}},_onTouchMove:function(t){if(gt){var e=this.options,i=e.fallbackTolerance,o=e.fallbackOffset,n=t.touches?t.touches[0]:t,s=nt&&T(nt,!0),a=nt&&s&&s.a,r=nt&&s&&s.d,l=Ot&&Lt&&z(Lt),c=(n.clientX-gt.clientX+o.x)/(a||1)+(l?l[0]-Rt[0]:0)/(a||1),h=(n.clientY-gt.clientY+o.y)/(r||1)+(l?l[1]-Rt[1]:0)/(r||1);if(!Vt.active&&!St){if(i&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,n,this)&&!g.animated){if(g===it)return D(!1);if(g&&s===t.target&&(a=g),a&&(i=O(a)),!1!==Yt(st,s,it,e,a,i,t,!!a))return A(),s.appendChild(it),ot=s,z(),D(!0)}else if(g&&function(t,e,i){var o=O(U(i.el,0,i.options,!0));return e?t.clientXh+c*s/2:ld-Ct)return-Mt}else if(l>h+c*(1-n)/2&&ld-c*s/2))return l>h+c/2?1:-1;return 0}(t,a,i,n,P?1:r.swapThreshold,null==r.invertedSwapThreshold?r.swapThreshold:r.invertedSwapThreshold,kt,bt===a))){var L=F(it);do{L-=v,E=ot.children[L]}while(E&&("none"===R(E,"display")||E===nt))}if(0===v||E===a)return D(!1);bt=a,Mt=v;var S=a.nextElementSibling,G=!1,I=Yt(st,s,it,e,a,i,t,G=1===v);if(!1!==I)return 1!==I&&-1!==I||(G=1===I),Tt=!0,setTimeout(Kt,30),A(),G&&!S?s.appendChild(it):a.parentNode.insertBefore(it,G?S:a),M&&H(M,0,C-M.scrollTop),ot=it.parentNode,void 0===y||kt||(Ct=Math.abs(y-O(a)[b])),z(),D(!0)}if(s.contains(it))return D(!1)}return!1}function T(r,l){tt(r,m,d({evt:t,isOwner:h,axis:n?"vertical":"horizontal",revert:o,dragRect:e,targetRect:i,canSort:u,fromSortable:p,target:a,completed:D,onMove:function(i,o){return Yt(st,s,it,e,i,O(i),t,o)},changed:z},l))}function A(){T("dragOverAnimationCapture"),m.captureAnimationState(),m!==p&&p.captureAnimationState()}function D(e){return T("dragOverCompleted",{insertion:e}),e&&(h?c._hideClone():c._showClone(m),m!==p&&(k(it,ft?ft.options.ghostClass:c.options.ghostClass,!1),k(it,r.ghostClass,!0)),ft!==m&&m!==Vt.active?ft=m:m===Vt.active&&ft&&(ft=null),p===m&&(m._ignoreWhileAnimating=a),m.animateAll((function(){T("dragOverAnimationComplete"),m._ignoreWhileAnimating=null})),m!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===it&&!it.animated||a===s&&!a.animated)&&(bt=null),r.dragoverBubble||t.rootEl||a===document||(it.parentNode[Y]._isOutsideThisEl(t.target),!e&&qt(t)),!r.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function z(){dt=F(it),pt=F(it,r.draggable),et({sortable:m,name:"change",toEl:s,newIndex:dt,newDraggableIndex:pt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){C(document,"mousemove",this._onTouchMove),C(document,"touchmove",this._onTouchMove),C(document,"pointermove",this._onTouchMove),C(document,"dragover",qt),C(document,"mousemove",qt),C(document,"touchmove",qt)},_offUpEvents:function(){var t=this.el.ownerDocument;C(t,"mouseup",this._onDrop),C(t,"touchend",this._onDrop),C(t,"pointerup",this._onDrop),C(t,"touchcancel",this._onDrop),C(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;dt=F(it),pt=F(it,i.draggable),tt("drop",this,{evt:t}),ot=it&&it.parentNode,dt=F(it),pt=F(it,i.draggable),Vt.eventCanceled||(St=!1,kt=!1,It=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Qt(this.cloneId),Qt(this._dragStartId),this.nativeDraggable&&(C(document,"drop",this),C(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),E&&R(document.body,"user-select",""),R(it,"transform",""),t&&(Pt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),nt&&nt.parentNode&&nt.parentNode.removeChild(nt),(st===ot||ft&&"clone"!==ft.lastPutMode)&<&<.parentNode&<.parentNode.removeChild(lt),it&&(this.nativeDraggable&&C(it,"dragend",this),Xt(it),it.style["will-change"]="",Pt&&!St&&k(it,ft?ft.options.ghostClass:this.options.ghostClass,!1),k(it,this.options.chosenClass,!1),et({sortable:this,name:"unchoose",toEl:ot,newIndex:null,newDraggableIndex:null,originalEvent:t}),st!==ot?(dt>=0&&(et({rootEl:ot,name:"add",toEl:ot,fromEl:st,originalEvent:t}),et({sortable:this,name:"remove",toEl:ot,originalEvent:t}),et({rootEl:ot,name:"sort",toEl:ot,fromEl:st,originalEvent:t}),et({sortable:this,name:"sort",toEl:ot,originalEvent:t})),ft&&ft.save()):dt!==ht&&dt>=0&&(et({sortable:this,name:"update",toEl:ot,originalEvent:t}),et({sortable:this,name:"sort",toEl:ot,originalEvent:t})),Vt.active&&(null!=dt&&-1!==dt||(dt=ht,pt=ut),et({sortable:this,name:"end",toEl:ot,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){tt("nulling",this),st=it=ot=nt=at=lt=rt=ct=gt=_t=Pt=dt=pt=ht=ut=bt=Mt=ft=mt=Vt.dragged=Vt.ghost=Vt.clone=Vt.active=null,At.forEach((function(t){t.checked=!0})),At.length=vt=yt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":it&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,o=0,n=i.length,s=this.options;othis._map.getZoom()||t.layer.options.maxZoomt.getZoom()||o.options.maxZoom1||e<0||this._map.hasLayer(t)&&(void 0!==t.setOpacity?t.setOpacity(e):(t.options.opacity=e,t.setStyle({fillOpacity:e,opacity:e})),this._updateOpacityDOMLayer(t))},setVisibility:function(t,e){ge.trace(t,e),this._layers[s.a.stamp(t)].visibility=e,this._updateVisibilityDOMLayer(t),this._updateVisibilityLayer(t)}}),ve={getLogger:function(t){"true".match(/true/)?r.disableAll():r.enableAll();var e=t||"default";return r.getLogger(e)}},ye={PARAM_MISSING:"Parameter(s) '%var%' missing",PARAM_EMPTY:"Parameter(s) '%var%' empty",PARAM_TYPE:"Wrong type(s) for parameter(s) '%var%'",PARAM_FORMAT:"Parameter(s) '%var%' not correctly formatted",PARAM_NOT_SUPPORT:"Value(s) for parameter(s) '%var%' not supported",PARAM_NOT_SUPPORT_NODEJS:"Value(s) for parameter(s) '%var%' not supported to NodeJS",PARAM_UNKNOWN:"Value(s) for parameter(s) '%var%' unknown",SERVICE_REQUEST_BUILD:"An error occurred during the request building of the service",SERVICE_REQUEST_EMPTY:"The request sent to the service is empty",SERVICE_RESPONSE_EXCEPTION:"The service returned an exception : '%var%'",SERVICE_RESPONSE_EXCEPTION_2:"The service returned an exception",SERVICE_RESPONSE_ANALYSE:"An error occurred while parsing the response '%var%' of the service",SERVICE_RESPONSE_ANALYSE_2:"An unknown error occurred while parsing the response",SERVICE_RESPONSE_EMPTY:"The response of the service is empty",SERVICE_RESPONSE_EMPTY_2:"The response from the service could not be analyzed or is empty",SERVICE_RESPONSE_FORMAT:"The format of the service response is not supported (handled format(s) : '%var%')",SERVICE_RESPONSE_FORMAT_2:"The format of the service response is not supported",SERVICE_RESPONSE_FORMAT_3:"No suggestion matching the search",CLASS_CONSTRUCTOR:"'%var%' constructor cannot be called as a function.",getMessage:function(t,e){if(0===Object.keys(arguments).length)return"Message indefined !";var i=Array.prototype.slice.call(arguments),o=i.shift(),n=i,s=this[o];try{s=Array.isArray(n)&&n.length>0?s.replace("%var%",n.join(" - ")):s.replace("%var%","%var% (not specified)")}catch(t){}return s}},Ee={normalyzeParameters:function(t){var e=null;if(t){var i=[];for(var o in t)if(t.hasOwnProperty(o)){var n=t[o];n||(n=""),i.push(o+"="+n)}e=i.join("&")}return e},normalyzeUrl:function(t,e,i){var o=t;if(t){var n=t.indexOf("?");-1===n&&(o+="?"),-1!==n&&n!==t.length-1&&(o+="&")}return e&&(o+="string"==typeof e?e:this.normalyzeParameters(e)),i&&(o=encodeURIComponent(o)),o},indent:function(t,e){return new Array((t||0)+1).join("\t")+e}},we=i(10),Pe=i.n(we),be={call:function(t){var e=ve.getLogger("XHR");if(e.trace("[XHR::call()]"),Pe.a.polyfill(),!t.url)throw new Error("missing parameter : url is not defined !");if(!t.method)throw new Error("missing parameter : method is not defined !");t.format||(t.format="text");var i={};switch(i.url=t.url,i.data=t.data?t.data:null,i.method=t.method,i.timeOut=t.timeOut||0,i.scope=t.scope||this,i.proxy=t.proxy||null,i.content=t.content||null,i.headers=t.headers||{referer:"http://localhost"},t.method){case"DELETE":case"GET":break;case"PUT":case"POST":i.content=t.content?t.content:"application/x-www-form-urlencoded",i.headers=t.headers?t.headers:{referer:"http://localhost"};break;case"HEAD":case"OPTIONS":throw new Error("HTTP method not yet supported !");default:throw new Error("HTTP method unknown !")}switch(t.format){case"text":this.__call(i).then((function(i){e.trace(i),t.onResponse.call(this,i)})).catch((function(e){t.onFailure.call(this,e)}));break;case"json":this.__callJSON(i).then((function(i){e.trace(i),t.onResponse.call(this,i)})).catch((function(e){t.onFailure.call(this,e)}));break;case"xml":this.__callXML(i).then((function(i){e.trace(i),t.onResponse.call(this,i)})).catch((function(e){t.onFailure.call(this,e)}));break;default:throw new Error("This output Format is not yet supported !")}},__call:function(t){var e=ve.getLogger("XHR");return e.trace("[XHR::__call()]"),new Promise((function(o,n){var s="POST"===t.method||"PUT"===t.method?1:0;t.data&&("object"==typeof t.data&&Object.keys(t.data).length||"string"==typeof t.data&&t.data.length)&&!s&&("Geocode"===t.scope.CLASSNAME||"ReverseGeocode"===t.scope.CLASSNAME?t.url=t.url+t.data:t.url=Ee.normalyzeUrl(t.url,t.data)),e.trace("URL = ",t.url);var a=null;if("undefined"==typeof window){var r=i(7),l={headers:{Referer:"https://localhost"}};return t.data&&"string"==typeof t.data&&s&&(l={method:t.method,body:t.data,headers:{"Content-Type":t.content,Referer:"https://localhost"}}),r(t.url,l).then((function(t){if(t.ok)o(t.text());else{var e="Errors Occured on Http Request (status : '"+t.statusText+"' | url : '"+t.url+"')",i=t.status;n({message:e,status:i})}})).catch((function(t){n({message:t,status:-1})}))}if(window.XMLHttpRequest){e.trace("XMLHttpRequest"),(a=new XMLHttpRequest).open(t.method,t.url,!0),a.overrideMimeType=t.content;var c=null;t.timeOut>0&&(e.trace("XHR - TimeOut actif !"),c=window.setTimeout((function(){n({message:"TimeOut Occured on Http Request with XMLHttpRequest !",status:-1})}),t.timeOut)),s&&(e.trace("data = ",t.data),a.setRequestHeader("Content-type",t.content)),a.onerror=function(t){console.log(t),n(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},a.ontimeout=function(t){console.log(t),n(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},a.onreadystatechange=function(t){if(4===a.readyState)if(200===a.status)window.clearTimeout(c),o(a.response);else{var e="Errors Occured on Http Request (status : '"+t.target.statusText+"' | url : '"+t.target.responseURL+"' | response : '"+t.target.response+"')",i=t.target.status;n({message:e,status:i})}};var h=t.data&&s?t.data:null;a.send(h)}else{if(!window.XDomainRequest)throw new Error("CORS not supported");e.trace("XDomainRequest"),(a=new XDomainRequest).open(t.method,t.url),a.overrideMimeType=t.content,t.timeOut>0&&(a.timeout=t.timeout,e.trace("XHR - TimeOut actif !")),s&&a.setRequestHeader("Content-type",t.content),a.onerror=function(){n(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},a.ontimeout=function(){n(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},a.onload=function(t){if(200===a.status)o(a.responseText);else{var e="Errors Occured on Http Request (status : '"+t.target.statusText+"' | url : '"+t.target.responseURL+"')",i=t.target.status;n({message:e,status:i})}};var d=t.data&&s?t.data:null;a.send(d)}}))},__callJSON:function(t){return this.__call(t).then(JSON.parse).catch((function(e){console.log("_callJSON failed on : ",t.url,e)}))},__callXML:function(t){return this.__call(t).then((function(t){var e;"undefined"==typeof window?e=(new(0,i(8).DOMParser)).parseFromString(t,"text/xml"):window.DOMParser?e=(new window.DOMParser).parseFromString(t,"text/xml"):((e=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,e.loadXML(t));return e})).catch((function(e){console.log("__callXML failed on : ",t.url,e)}))}},Me={uuid:(pe=Math.floor(Date.now()),function(){return pe++}),call:function(t){var e=ve.getLogger("JSONP");if(e.trace("[JSONP::call ()]"),!t)throw e.error("missing parameter : options !"),new Error("missing parameter : options !");if(!t.url)throw e.error("missing parameter : options.url !"),new Error("missing parameter : options.url !");if(t.timeOut||(e.info("setting 'options.timeOut' default value"),t.timeOut=0),!t.onResponse)throw e.error("missing parameter : options.onResponse !"),new Error("missing parameter : options.onResponse !");var i="string"==typeof t.callbackSuffix?t.callbackSuffix:this.uuid(),o=!1,n=!1,s=t.url.indexOf("callback=");if(-1!==s){o=!0;var a=t.url.indexOf("&",s);-1===a&&(a=t.url.length);var r=t.url.substring(s+9,a);r&&(n=!0,t.callbackName=r,e.info("setting 'options.callbackName' value ("+t.callbackName+") from 'options.url' parameter"))}if(!o){var l=t.url.indexOf("?");-1===l?t.url=t.url+"?callback=":l===t.url.length?t.url=t.url+"callback=":t.url=t.url+"&callback=",e.info("setting callback default key in 'options.url' : "+t.url)}var c=!!t.callbackName||n;if(n||(t.callbackName||(e.info("setting 'options.callbackName' default value"),t.callbackName="callback",(i||""===i)&&(t.callbackName+=i)),t.url=t.url.replace("callback=","callback="+t.callbackName),e.info("setting callback function name in 'options.url' : "+t.url)),t.onTimeOut||(e.info("setting 'options.onTimeOut' default value"),t.onTimeOut=function(){console.log("TimeOut while invoking url : "+t.url)}),!c){var h=this,d=null;t.timeOut>0&&(d=window.setTimeout((function(){window[t.callbackName]=function(){},t.onTimeOut(),h._deleteScript(i)}),t.timeOut)),window[t.callbackName]=function(e){window.clearTimeout(d),t.onResponse(e),h._deleteScript(i)}}this._createScript(i,t.url)},_createScript:function(t,e){var i,o=document.getElementById("results"+t);(i=document.createElement("script")).setAttribute("type","text/javascript"),i.setAttribute("src",e),i.setAttribute("charset","UTF-8"),i.setAttribute("id","results"+t),i.setAttribute("async","true");var n=document.documentElement||document.getElementsByTagName("head")[0];null===o?n.appendChild(i):n.replaceChild(i,o)},_deleteScript:function(t){var e=document.getElementById("results"+t);if(e){var i=e.parentNode||document.documentElement;if(!i)return;i.removeChild(e)}}},Ce={send:function(t){var e=t||{method:"GET",protocol:"XHR",timeOut:0,format:null,wrap:!0,nocache:!0,output:"json",callback:null,callbackSuffix:null};if("undefined"!=typeof window||"JSONP"!==t.protocol){if("XHR"===t.protocol||"json"===t.format?e.wrap=!1:"JSONP"===t.protocol&&"xml"===t.format&&(e.wrap=!0),e.callback=null,e.output=e.wrap?"json":null,e.wrap){var i={};i.output=e.output,i.callback=e.callback,delete i.callback,e.url=Ee.normalyzeUrl(t.url,i)}switch(e.protocol){case"XHR":"GET"===t.method&&t.nocache&&(e.url=Ee.normalyzeUrl(e.url,{t:(new Date).getTime()})),be.call(e);break;case"JSONP":e.data&&(e.url=Ee.normalyzeUrl(e.url,e.data)),Me.call(e);break;default:throw new Error("protocol not supported (XHR|JSONP) !")}}else console.log("Value (s) for parameter (s) 'protocol=JSONP (instead use XHR)' not supported to NodeJS")}};function Le(t){if(!(this instanceof Le))throw new TypeError("ErrorService constructor cannot be called as a function.");var e=t;"string"==typeof t||t instanceof String?(this.message=t,this.status=-1,this.type=Le.TYPE_UNKERR):(this.message=e.message||"undefined!?",this.type=e.type,this.status=e.status||-1),this.name="ErrorService",this.stack=(new Error).stack}Le.TYPE_SRVERR="SERVICE_ERROR",Le.TYPE_USEERR="USAGE_ERROR",Le.TYPE_UNKERR="UNKNOWN_ERROR",Le.prototype=Object.create(Error.prototype,{constructor:{value:Le,writable:!0,configurable:!0}});var Se=Le,xe={ssl:!0,url:function(t,e){return(!1===xe.ssl?"http://":"https://")+"wxs.ign.fr".concat("/",t,e)},Alti:{_key:{"elevation-json":"/alti/rest/elevation.json","elevation-xml":"/alti/rest/elevation.xml","profil-json":"/alti/rest/elevationLine.json","profil-xml":"/alti/rest/elevationLine.xml",wps:"/alti/wps"},url:function(t){return{"elevation-json":xe.url(t,this._key["elevation-json"]),"elevation-xml":xe.url(t,this._key["elevation-xml"]),"profil-json":xe.url(t,this._key["profil-json"]),"profil-xml":xe.url(t,this._key["profil-xml"]),wps:xe.url(t,this._key.wps)}}},ProcessIsoCurve:{_key:"/geoportail/isochrone/rest/1.0.0/isochrone",url:function(t){return xe.url(t,this._key)}},Config:{_key:"https://raw.githubusercontent.com/IGNF/geoportal-configuration/main/dist/",url:function(t){Array.isArray(t)||(t=t.split(","));for(var e=[],i=0;io(t,{credentials:"same-origin"}).then(t=>{if(t.ok)return t.json().then(t=>t).catch(t=>{throw new Error("Exception Json : "+t)});throw new Error("Exception HTTP : "+t.status+" (status code) !")}).catch(t=>new Promise((e,i)=>{i(t)})),a=[];for(let t=0;t{if(!t)throw new Error("results config empty !?");t.forEach(t=>{this.listConfigResults.push(t)})}).then(()=>{e.call(this,this.listConfigResults)}).catch(e=>{t.call(this,e)})},Ne=function(t,e){this.listConfigResults=[];for(var i=0;ie||t__IDENTIFIER__\x3c!-- __DATAINPUTS__ --\x3e__RAWDATAOUTPUT__',input:"__KEY____DATA__"}},namespaceByDefault:function(){return['xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"','xmlns="http://www.opengis.net/wps/1.0.0"','xmlns:wfs="http://www.opengis.net/wfs"','xmlns:wps="http://www.opengis.net/wps/1.0.0"','xmlns:ows="http://www.opengis.net/ows/1.1"','xmlns:gml="http://www.opengis.net/gml"','xmlns:ogc="http://www.opengis.net/ogc"','xmlns:wcs="http://www.opengis.net/wcs/1.1.1"','xmlns:xlink="http://www.w3.org/1999/xlink"'].join(" ")},schemaLocationByDefault:function(){return'xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"'},processRequestString:function(){this.logger.trace("WPS::processRequestString ()");var t="";if("POST"===this.method)t=this.template.post.value;else{if("GET"!==this.method)return this.logger.error("No other method supported by the service !"),!1;t=this.template.get.value}return t=(t=(t=(t=(t=t.replace(/__SERVICE__/g,this.paramservice)).replace(/__VERSION__/g,this.paramversion)).replace(/__RAWDATAOUTPUT__/g,this.paramrawdataoutput)).replace(/__IDENTIFIER__/g,this.paramidentifier)).replace(/__REQUEST__/g,this.paramrequest),"POST"===this.method&&(t=(t=t.replace(/__NAMESPACE__/g,this.namespaceByDefault)).replace(/__SCHEMALOCATION__/g,this.schemaLocationByDefault)),(t=t.replace(//g,this.__addDataInputs()))?(this.requestString=t,this.logger.trace("traduction tmpl",t),!0):(this.logger.warn("traduction tmpl : empty request !?"),!1)},__addDataInputs:function(){this.logger.trace("WPS::__addDataInputs ()");for(var t,e="GET"===this.method?this.template.get.input:this.template.post.input,i="GET"===this.method?";":"",o="",n=this,s=this.DataObject.getData(),a=0;a0)for(var a=o.getElementsByTagName("parsererror"),r=0;r0){var o=function(t){if(t.attributes.length>0){for(var e={},i=t.attributes,o=0;o0?e.index=e.filters.type[0]:e.index=e.filters.type),delete e.filters.type),e.filters.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),delete e.filters.bbox)),delete e.filterOptions),e.position&&(e.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),e.position.lon||(e.position.lon=e.position.x),delete e.position.x),e.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),e.position.lat||(e.position.lat=e.position.y),delete e.position.y)),e.returnFreeForm&&(this.logger.warn("The parameter 'returnFreeForm' is deprecated"),delete e.returnFreeForm),e.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete e.srs),e},Pi.prototype.buildRequest=function(t,e){var i={httpMethod:this.options.httpMethod,geocodeMethod:"search",query:this.options.query,index:this.options.index,returnTrueGeometry:this.options.returnTrueGeometry,position:this.options.position,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=pi.build(i),this.request?e.call(this,this.request):t.call(this,new Se(ye.getMessage("SERVICE_REQUEST_BUILD")))},Pi.prototype.analyzeResponse=function(t,e){if(this.response){var i={response:this.response,rawResponse:this.options.rawResponse,onError:t,onSuccess:e,scope:this};wi.build(i)}else t.call(this,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))};var bi=Pi;function Mi(t){if(!(this instanceof Mi))throw new TypeError(ye.getMessage("CLASS_CONSTRUCTOR","ReverseGeocode"));this.CLASSNAME="ReverseGeocode",this.logger=ve.getLogger("Gp.Services.ReverseGeocode"),this.logger.trace("[Constructeur ReverseGeocode (options)]");var e=this.patchOptionConvertor(t);if(e.serverUrl=e.serverUrl||"https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/reverse",Re.apply(this,[e]),e.searchGeometry)this.options.searchGeometry=e.searchGeometry;else if(!e.position)throw new Error(ye.getMessage("PARAM_MISSING","searchGeometry"));if(e.index||(this.options.index=e.index="StreetAddress"),e.filters)for(var i=Object.keys(e.filters),o=0;o0?e.index=e.filterOptions.type[0]:e.index=e.filterOptions.type),delete e.filterOptions.type),e.filterOptions.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),e.searchGeometry||(e.searchGeometry=this.bbox2Json(e.filterOptions.bbox)),delete e.filterOptions.bbox),e.filterOptions.circle&&(this.logger.warn("The parameter 'filterOptions.circle' is deprecated"),e.searchGeometry||(e.searchGeometry=this.circle2Json(e.filterOptions.circle)),delete e.filterOptions.circle),e.filterOptions.polygon&&(this.logger.warn("The parameter 'filterOptions.polygon' is deprecated"),e.searchGeometry||(e.searchGeometry=this.polygon2Json(e.filterOptions.polygon)),delete e.filterOptions.polygon),!e.filters&&Object.keys(e.filterOptions).length>0&&(e.filters=e.filterOptions),delete e.filterOptions),e.position&&(e.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),e.position.lon||(e.position.lon=e.position.x),delete e.position.x),e.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),e.position.lat||(e.position.lat=e.position.y),delete e.position.y)),e.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete e.srs),e},Mi.prototype.buildRequest=function(t,e){var i={httpMethod:this.options.httpMethod,geocodeMethod:"reverse",searchGeometry:this.options.searchGeometry,index:this.options.index,position:this.options.position,returnTrueGeometry:this.options.returnTrueGeometry,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=pi.build(i),this.request?e.call(this,this.request):t.call(this,new Se(ye.getMessage("SERVICE_REQUEST_BUILD")))},Mi.prototype.analyzeResponse=function(t,e){if(this.response){var i={response:this.response,rawResponse:this.options.rawResponse,onError:t,onSuccess:e,scope:this};wi.build(i)}else t.call(this,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))},Mi.prototype.bbox2Json=function(t){return{type:"Polygon",coordinates:[[[t.left,t.top],[t.right,t.top],[t.right,t.bottom],[t.left,t.bottom],[t.left,t.top]]]}},Mi.prototype.circle2Json=function(t){return{type:"Circle",radius:t.radius,coordinates:[t.x,t.y]}},Mi.prototype.polygon2Json=function(t){for(var e={type:"Polygon",coordinates:[[]]},i=0;i2?document.getElementById(e._addUID("GPlocationAutoCompleteList_"+o)).style.display="block":document.getElementById(e._addUID("GPlocationAutoCompleteList_"+o)).style.display="none",e.onAutoCompleteSearchText(t)}})),i.addEventListener("keydown",(function(i){var o=i.which||i.keyCode,n=document.getElementById(e._addUID("GPlocationAutoCompleteList_"+t));if(n){var s=n.getElementsByClassName("GPautoCompleteProposal current"),a=n.getElementsByClassName("GPautoCompleteProposal"),r=a.length;if(r){var l=null;if(!s.length)return(l=a[0]).className="GPautoCompleteProposal current",l.style.color="#000000",void(l.style["background-color"]="#CEDBEF");l=s[0];var h=parseInt(c.index(l.id),10),d=h===r-1?a[0]:a[h+1],u=0===h?a[r-1]:a[h-1];switch(l.style["background-color"]="",l.style.color="",u.style["background-color"]="",u.style.color="",d.style["background-color"]="",d.style.color="",o){case 38:ao.log("arrow up"),l.className="GPautoCompleteProposal",u.className="GPautoCompleteProposal current",u.style.color="#000000",u.style["background-color"]="#CEDBEF";break;case 40:ao.log("arrow down"),l.className="GPautoCompleteProposal",d.className="GPautoCompleteProposal current",d.style.color="#000000",d.style["background-color"]="#CEDBEF";break;case 13:ao.log("enter"),l.click(i)}l.focus()}}})),i},_createLocationCoordinateInputElement:function(t){var e=this,i=document.createElement("input");return i.id=this._addUID("GPlocationOriginCoords_"+t),i.className="GPlocationOriginHidden",i.type="text",i.disabled=!1,i.addEventListener("click",(function(){var t=c.index(this.id);document.getElementById(e._addUID("GPlocationOriginLabel_"+t)).click()})),i},_createLocationPointerShowInputElement:function(t){var e=document.createElement("input");return e.id=this._addUID("GPlocationOriginPointer_"+t),e.type="checkbox",e},_createLocationPointerInputElement:function(t){var e=this,i=document.createElement("label");return i.id=this._addUID("GPlocationOriginPointerImg_"+t),i.htmlFor=this._addUID("GPlocationOriginPointer_"+t),i.className="GPlocationOriginPointerImg",i.title="Pointer un lieu sur la carte",i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var i,o,n,s=c.index(this.id),a=document.getElementsByClassName(e._addUID("GPlocationPoint"));for(i=0;i",color:"blue",display:!0,addOption:!1,removeOption:!1},disableReverse:!1,displayInfo:!0,autocompleteOptions:{},reverseGeocodeOptions:{}},initialize:function(t){s.a.Util.setOptions(this,t),this._uid=this.options.tag.unique||null,this._activeDragAndDrop=!1,this._pressedKeyOnDragAndDrop=!1,this._map=null,this._inputsContainer=null,this._inputLabelContainer=null,this._inputAutoCompleteContainer=null,this._inputShowPointerContainer=null,this._inputCoordinateContainer=null,this._coordinate=null,this._suggestedContainer=null,this._suggestedLocations=[],this._currentLocation=null,this._marker=null,this._resources={},this._container=this._uid?this._initLayout():null},onAdd:function(){this._uid=c.generate();var t=this._initLayout();return s.a.DomEvent.disableClickPropagation(t).disableScrollPropagation(t),t},onRemove:function(){},getCoordinate:function(){return this._coordinate},setCoordinate:function(t){this._displayResultOfCoordinate(t)},setMap:function(t){this._map||(this._map=t)},clear:function(){this._setCursor(),this._setMarker(),this._clearResults(),this._inputLabelContainer.click()},dragging:function(t){this._marker&&(t?this._marker.dragging.enable():this._marker.dragging.disable())},_initLayout:function(){var t=this.options.tag.id,e=this._createMainContainerElement(),i=this._inputsContainer=this._createLocationPointElement(t,this.options.tag.display);e.appendChild(i);var o=this._inputLabelContainer=this._createLocationPointLabelElement(t,this.options.tag.label);i.appendChild(o);var n=this._inputAutoCompleteContainer=this._createLocationAutoCompleteteInputElement(t);i.appendChild(n);var s=this._inputCoordinateContainer=this._createLocationCoordinateInputElement(t);i.appendChild(s);var a=this._inputShowPointerContainer=this._createLocationPointerShowInputElement(t);i.appendChild(a);var r=this._createLocationPointerInputElement(t);if(i.appendChild(r),this.options.tag.addOption){var l=this._createLocationAddPointElement();i.appendChild(l)}if(this.options.tag.removeOption){var c=this._createLocationRemovePointElement(t);i.appendChild(c)}var h=this._suggestedContainer=this._createLocationAutoCompleteResultElement(t);return e.appendChild(h),e},_setLabel:function(t){this._inputAutoCompleteContainer.value=t||""},_setCoordinate:function(t){this._coordinate=t;var e;e=lo.roundToDecimal(t.lat,4);var i=lo.roundToDecimal(t.lng,4)+" , "+e;this.GPdisplayCoordinate(i)},_setPosition:function(t){uo.log("_setPosition()",t),this._map.panTo(s.a.latLng(t))},_setMarker:function(t,e,i){if(uo.log("_setMarker()",t,e,i),!this._activeDragAndDrop){var o=this._map;if(null!=this._marker&&(this._marker.off("mousedown",this.onMouseDownMarker,this),this._marker.off("dragstart",this.onStartDragMarker,this),this._marker.off("drag",this.onDragMarker,this),this._marker.off("dragend",this.onEndDragMarker,this),o.removeLayer(this._marker),this._marker=null),t){var n={icon:new ho(this.options.tag.color),draggable:!0,clickable:!0,zIndexOffset:1e3};if(this._marker=s.a.marker(s.a.latLng(t),n),this._marker.on("mousedown",this.onMouseDownMarker,this),this._marker.on("dragstart",this.onStartDragMarker,this),this._marker.on("drag",this.onDragMarker,this),this._marker.on("dragend",this.onEndDragMarker,this),this._marker.addTo(o),i){var a=null;a="string"!=typeof e?"GeocodedLocation"===e.service?so.getGeocodedLocationFreeform(e.location):"SuggestedLocation"===e.service?so.getSuggestedLocationFreeform(e.location):"sans informations.":e,this._marker.bindPopup(a)}}}},_setCursor:function(t){var e=this._map.getContainer();e.style.cursor=t||null},_clearResults:function(){this._currentLocation=null,this._coordinate=null,this._clearSuggestedLocation()},_clearSuggestedLocation:function(){if(this._suggestedLocations=[],this._suggestedContainer)for(;this._suggestedContainer.firstChild;)this._suggestedContainer.removeChild(this._suggestedContainer.firstChild)},_requestAutoComplete:function(t){if(uo.log("_requestAutoComplete()",t),t&&0!==Object.keys(t).length&&t.text){uo.log(t);var e={};s.a.Util.extend(e,this.options.autocompleteOptions),s.a.Util.extend(e,t),s.a.Util.extend(e,{apiKey:e.apiKey||this.options.apiKey}),uo.log(e),no.Services.autoComplete(e)}},_fillAutoCompletedLocationListContainer:function(t){if(uo.log("_fillAutoCompletedLocationListContainer()",t),t&&0!==t.length){var e=this._suggestedContainer;if(e.childElementCount)for(;e.firstChild;)e.removeChild(e.firstChild);for(var i=0;i=60&&(c=0,l+=1),l>=60&&(l=0,r+=1),{d:r,m:l,s:c,direction:e.charAt(o<0?1:0)}},toInteger:function(t,e){var i=parseInt(t,e||10);return!isNaN(i)&&isFinite(i)?i:null},isInteger:function(t){if(isNaN(t))return!1;var e=parseFloat(t);return(0|e)===e},toFloat:function(t){var e=parseFloat(t);return!isNaN(e)&&isFinite(e)?e:null}};function Eo(t){return(Eo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var wo={_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPmousePosition"),t.className="GPwidget",t},_createShowMousePositionElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowMousePosition"),t.type="checkbox",t},_createShowMousePositionPictoElement:function(t){var e=this,i=document.createElement("label");i.id=this._addUID("GPshowMousePositionPicto"),i.className="GPshowAdvancedToolPicto",i.htmlFor=this._addUID("GPshowMousePosition"),i.title="Afficher les coordonnées du curseur",i.addEventListener("click",(function(i){var o="";document.getElementById(e._addUID("GPshowMousePosition")).checked||t||(o="GPmapCenterVisible"),document.getElementById("GPmapCenter").className=o,e.onShowMousePositionClick(i)}));var o=document.createElement("span");return o.id=this._addUID("GPshowMousePositionOpen"),o.className="GPshowAdvancedToolOpen",i.appendChild(o),i},_createMousePositionPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPmousePositionPanel"),t.className="GPpanel",t},_createMapCenter:function(){var t=document.createElement("div");return t.id="GPmapCenter",t.className="",t},_createMousePositionPanelHeaderElement:function(){var t=document.createElement("div");t.className="GPpanelHeader";var e=document.createElement("div");e.className="GPpanelTitle",e.innerHTML="Coordonnées",t.appendChild(e);var i=document.createElement("div");i.id="GPmousePositionPanelClose",i.className="GPpanelClose",i.title="Fermer le panneau";var o=this;return i.addEventListener?i.addEventListener("click",(function(){document.getElementById(o._addUID("GPshowMousePositionPicto")).click()}),!1):i.attachEvent&&i.attachEvent("onclick",(function(){document.getElementById(o._addUID("GPshowMousePositionPicto")).click()})),t.appendChild(i),t},_createMousePositionPanelBasicElement:function(t,e,i,o){t=void 0===t||t,e=void 0===e||e,i=void 0!==i&&i;var n=document.createElement("div");return n.id=this._addUID("GPmousePositionBasicPanel"),n.appendChild(this._createMousePositionPanelBasicCoordinateElement(e,i,o)),n.appendChild(this._createMousePositionPanelEditToolsElement(i)),n.appendChild(this._createMousePositionPanelBasicAltitudeElement(t)),n},_createCoordinateElement:function(t,e){var i=this;if(-1===["Lon","Lat"].indexOf(t))return[];var o=[],n=document.createElement("input");n.id=this._addUID("GPmousePosition"+t),n.title=!0===e?"Cliquer pour saisir des coordonnées":"",n.readOnly=!0,e&&(n.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),n.addEventListener("change",(function(e){this.classList.remove("error"),i.validateExtentCoordinate(t,this.value,e)?this.classList.remove("error"):this.classList.add("error")}))),o.push(n);var s=document.createElement("span");return s.className="GPmousePositionUnits",o.push(s),o},_createDMSCoordinateElement:function(t,e){if(-1===["Lon","Lat"].indexOf(t))return[];var i=this,o=[],n=document.createElement("input");n.id=this._addUID("GPmousePosition"+t+"Degrees"),n.className="GPSexagesimal",n.setAttribute("name","degrees"),n.title=!0===e?"Cliquer pour saisir des coordonnées":"",n.readOnly=!0,n.dataset.min=0,n.dataset.max="Lon"===t?180:90,e&&(n.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),n.addEventListener("change",(function(){this.classList.remove("error"),i._checkDMSDegrees(t,this)?this.classList.remove("error"):this.classList.add("error")}))),o.push(n);var s=document.createElement("span");s.className="GPmousePositionSexagesimalLabel",s.innerHTML="°",o.push(s);var a=document.createElement("input");a.id=this._addUID("GPmousePosition"+t+"Minutes"),a.className="GPSexagesimal",a.setAttribute("name","minutes"),a.title=!0===e?"Cliquer pour saisir des coordonnées":"",a.readOnly=!0,a.dataset.min=0,a.dataset.max=59,e&&(a.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),a.addEventListener("change",(function(){this.classList.remove("error"),i._checkDMSElement(this)?this.classList.remove("error"):this.classList.add("error")}))),o.push(a);var r=document.createElement("span");r.className="GPmousePositionSexagesimalLabel",r.innerHTML="'",o.push(r);var l=document.createElement("input");l.id=this._addUID("GPmousePosition"+t+"Seconds"),l.className="GPSexagesimalsec",l.setAttribute("name","seconds"),l.title=!0===e?"Cliquer pour saisir des coordonnées":"",l.readOnly=!0,l.dataset.min=0,l.dataset.max=59,e&&(l.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),l.addEventListener("change",(function(){this.classList.remove("error"),i._checkDMSElement(this,!0)?this.classList.remove("error"):this.classList.add("error")}))),o.push(l);var c=document.createElement("span");c.className="GPmousePositionSexagesimalLabel",c.innerHTML="''",o.push(c);var h=document.createElement("select");h.id=this._addUID("GPmousePosition"+t+"Direction"),h.className="GPmousePositionDirection",h.setAttribute("name","direction"),h.disabled=!0;var d=document.createElement("option");d.value="Lon"===t?"E":"N",d.innerHTML="Lon"===t?"E":"N",h.appendChild(d);var u=document.createElement("option");return u.value="Lon"===t?"O":"S",u.innerHTML="Lon"===t?"O":"S",h.appendChild(u),o.push(h),o},_createMousePositionPanelBasicCoordinateElement:function(t,e,i){var o=document.createElement("div");o.id=this._addUID("GPmousePositionCoordinate"),o.style.display=t?"block":"none";var n=document.createElement("div"),s=document.createElement("span");s.className="GPmousePositionLabel",s.id=this._addUID("GPmousePositionLatLabel"),s.innerHTML="Latitude : ",n.appendChild(s);var a,r=document.createElement("span");r.id=this._addUID("GPmousePositionLatCoordinate"),a="DMS"===i?this._createDMSCoordinateElement("Lat",e):this._createCoordinateElement("Lat",e);for(var l=0;l=s&&n<=a},_checkDMSDegrees:function(t,e){if(isNaN(e.value))return!1;var i=parseFloat(e.value);if((0|i)!==i)return!1;var o=Number(e.dataset.min),n=Number(e.dataset.max);if(in)return!1;var s=document.getElementById(this._addUID("GPmousePosition"+t+"Minutes")),a=document.getElementById(this._addUID("GPmousePosition"+t+"Seconds"));return i>=n?(s.dataset.max=0,a.dataset.max=0):(s.dataset.max=59,a.dataset.max=59.9999),!0},GPdisplayCoords:function(t){if(t){var e=document.getElementById(this._addUID("GPmousePositionLonLabel")),i=document.getElementById(this._addUID("GPmousePositionLatLabel"));if(t.x||t.y?(i.innerHTML="X : ",e.innerHTML="Y : "):t.e||t.n?(i.innerHTML="E : ",e.innerHTML="N : "):(i.innerHTML="Latitude : ",e.innerHTML="Longitude : "),"object"===Eo(t.lat)&&"object"===Eo(t.lng)){var o={lng:"Lon",lat:"Lat"},n=["Degrees","Minutes","Seconds"];for(var s in o)for(var a=0;an[2]))return Ro.warn("coordinates (lon) out of extent !?"),!1;if("Lat"===t&&(a.latn[3]))return Ro.warn("coordinates (lat) out of extent !?"),!1}return!0},_getCoordinate:function(t){var e=s.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Degrees")),i=e.value;if(!i)return null;if(i=i.replace(",","."),!yo.isInteger(i))return null;var o=yo.toInteger(i);if(oNumber(e.dataset.max))return null;var n=s.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Direction")).value,a=s.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Minutes")),r=a.value;if(r&&(r=r.replace(",","."),yo.isInteger(r))){var l=yo.toInteger(r);l>=Number(a.dataset.min)&&l<=Number(a.dataset.max)&&(o+=l/60)}var c=s.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Seconds")),h=c.value;if(h){h=h.replace(",",".");var d=yo.toFloat(h);d&&d>=Number(c.dataset.min)&&d<=Number(c.dataset.max)&&(o+=d/3600)}return"O"!==n&&"S"!==n||(o=-o),o},_locateDMSCoordinates:function(){var t={lat:this._getCoordinate("Lat"),lng:this._getCoordinate("Lon")};this.validateExtentCoordinate("Lon",t.lng)&&(this.validateExtentCoordinate("Lat",t.lat)&&this._map.panTo(t))},_locateCoordinates:function(){var t=s.a.DomUtil.get(this._addUID("GPmousePositionLon")).value;if(t=t.replace(",","."),t=parseFloat(t),!isNaN(t)){var e=s.a.DomUtil.get(this._addUID("GPmousePositionLat")).value;if(e=e.replace(",","."),e=parseFloat(e),!isNaN(e)){var i=null,o=null,n=null,a=null;if("Geographical"===this._currentProjectionType?(i=t,o=e):(n=e,a=t),this.validateExtentCoordinate("Lon",i||n)&&this.validateExtentCoordinate("Lat",o||a)){var r=this._currentProjectionUnits,l=this._unproject({x:this._convertCoordinate(null!==i?i:n,r),y:this._convertCoordinate(null!==o?o:a,r)});this._map.panTo(l)}}}},onMousePositionEditModeLocateClick:function(){this.options.editCoordinates&&(this._isEditing?"DMS"===this._currentProjectionUnits?this._locateDMSCoordinates():this._locateCoordinates():this.onMousePositionEditModeClick(!0))},onMousePositionProjectionSystemChange:function(t){Ro.log("onMousePositionProjectionSystemChange",t);var e=t.target.selectedIndex,i=t.target.options[e].value,o=t.target.options[e].label;Ro.log(e,i,o),this._setCurrentSystem(i)},_setCurrentSystem:function(t){for(var e=null,i=0;in.geoBBox.right||e.getBounds()._southWest.lat>n.geoBBox.top||e.getBounds()._northEast.lng1e3&&(Do.log("INFO : initial circle radius ("+this._requestGeom.radius+") limited to 1000m."),this._requestGeom.radius=1e3),i.searchGeometry=this._requestGeom):"polygon"===this._requestGeom.type.toLowerCase()?i.searchGeometry=this._requestGeom:"point"===this._requestGeom.type.toLowerCase()&&("StreetAddress"===this._currentGeocodingType?(i.searchGeometry={type:"Circle",radius:50,coordinates:this._requestGeom.coordinates},i.maximumResponses=1):i.searchGeometry=this._requestGeom),Do.log("reverseGeocode request options : ",i),this._displayWaitingContainer(),no.Services.reverseGeocode(i)},_displayGeocodedLocations:function(t){var e=this._map;this._clearLocations(),this._clearLocationsFeature(e),this._reverseGeocodingLocations=t,t&&0!==t.length?(this._formContainer.className="GPreverseGeocodingComponentHidden",this._hideWaitingContainer(),this._panelTitleContainer.innerHTML="Résultats de la recherche",this._returnPictoContainer.className="",this._resultsContainer.className="GPpanel",this._fillGeocodedLocationListContainer(t),this._displayGeocodedLocationsOnMap(t),e.fitBounds(this._inputResultsLayer.getBounds())):this._clearInputRequest()},_fillGeocodedLocationListContainer:function(t){for(var e=0;e",d=r.placeAttributes;for(var u in d)d.hasOwnProperty(u)&&"trueGeometry"!==u&&"extraFields"!==u&&"houseNumberInfos"!==u&&"_count"!==u&&(h+="
  • ",h+=''+u.toUpperCase()+" : ",h+=d[u],h+="
  • ");h+=" ",c.bindPopup(h),c.on("mouseover",o),c.on("mouseout",n),c.on("click",(function(t){i.fire("reverse:onclickresult",{data:t.target.options.data})})),this._inputResultsLayer.addLayer(c)}}},onShowReverseGeocodingClick:function(){var t=this._map;this._showReverseGeocodingContainer.checked?this._removeMapInteraction(t):this._waiting||this._reverseGeocodingLocations.length||this._activateMapInteraction(t)},onReverseGeocodingTypeChange:function(t){var e=t.target.selectedIndex,i=t.target.options[e].value;i&&(Do.log(i),this._currentGeocodingType=i)},onReverseGeocodingDelimitationChange:function(t){var e=t.target.selectedIndex,i=t.target.options[e].value;if(i){Do.log(i),this._currentGeocodingDelimitation=i,this._clearInputRequest();var o=this._map;this._removeMapInteraction(o),this._activateMapInteraction(o)}},onGPreverseGeocodingReturnPictoClick:function(){var t=this._map;this._clearLocations(),this._clearLocationsFeature(t),this._clearInputRequest(),this._activateMapInteraction(t)},onReverseGeocodingSubmit:function(){if(this._requestGeom){var t=this._map,e=this;this._reverseGeocodingRequest({index:e._currentGeocodingType,onSuccess:function(i){if(Do.log(i),i){var o=i.locations;e._displayGeocodedLocations(o),e._hideWaitingContainer(),0===o.length&&e._activateMapInteraction(t)}},onFailure:function(i){e._hideWaitingContainer(),e._clearLocations(),e._clearLocationsFeature(t),e._clearInputRequest(),e._activateMapInteraction(t),Do.log(i.message)}})}else Do.log("missing search geometry")},onReverseGeocodingResultClick:function(t){var e=c.index(t.target.id);this._inputResultsLayer&&this._inputResultsLayer.eachLayer((function(t){t.options.id===parseInt(e,10)&&t.fire("click")}))},onReverseGeocodingResultMouseOver:function(t){var e=c.index(t.target.id);t.target.classList&&t.target.classList.add("GPreverseGeocodedLocationHighlight"),this._inputResultsLayer&&this._inputResultsLayer.eachLayer((function(t){t.options.id===parseInt(e,10)&&t.fire("mouseover")}))},onReverseGeocodingResultMouseOut:function(t){var e=c.index(t.target.id);t.target.classList&&t.target.classList.remove("GPreverseGeocodedLocationHighlight"),this._inputResultsLayer&&this._inputResultsLayer.eachLayer((function(t){t.options.id===parseInt(e,10)&&t.fire("mouseout")}))},_clearLocations:function(){if(this._reverseGeocodingLocations=[],this._resultsListContainer)for(;this._resultsListContainer.firstChild;)this._resultsListContainer.removeChild(this._resultsListContainer.firstChild)},_clearLocationsFeature:function(t){null!==this._inputResultsLayer&&(t.removeLayer(this._inputResultsLayer),this._inputResultsLayer=null)},_clearInputRequest:function(){this._requestPosition=null,this._requestCircleFilter=null,this._requestBboxFilter=null},_displayWaitingContainer:function(){this._waitingContainer.className="GPreverseGeocodingCalcWaitingContainerVisible",this._waiting=!0,this._timer&&(clearTimeout(this._timer),this._timer=null);var t=this;this._timer=setTimeout((function(){!0===t._waiting?t._hideWaitingContainer():t._timer&&clearTimeout(t._timer)}),16e3)},_hideWaitingContainer:function(){this._waiting&&(this._waitingContainer.className="GPreverseGeocodingCalcWaitingContainerHidden",this._waiting=!1,clearTimeout(this._timer),this._timer=null)}});s.a.extend(Oo.prototype,s.a.Evented.prototype);var No=Oo,Uo=l.getLogger("RouteDOM"),jo={_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProute"),t.className="GPwidget",t},_createShowRouteElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowRoute"),t.type="checkbox",t},_createShowRoutePictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowRoutePicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowRoute"),e.title="Ouvrir le calcul d'itinéraire",e.addEventListener?e.addEventListener("click",(function(e){t.onShowRoutePanelClick(e)})):e.attachEvent&&e.attachEvent("onclick",(function(e){t.onShowRoutePanelClick(e)}));var i=document.createElement("span");return i.id=this._addUID("GPshowRouteOpen"),i.className="GPshowAdvancedToolOpen",e.appendChild(i),e},_createRoutePanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProutePanel"),t.className="GPpanel",t},_createRoutePanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var i=document.createElement("div");i.className="GPpanelTitle",i.innerHTML="Calcul d'itinéraire",e.appendChild(i);var o=document.createElement("div");return o.id=this._addUID("GProutePanelClose"),o.className="GPpanelClose",o.title="Masquer le panneau",o.addEventListener?o.addEventListener("click",(function(){document.getElementById(t._addUID("GPshowRoutePicto")).click()}),!1):o.attachEvent&&o.attachEvent("onclick",(function(){document.getElementById(t._addUID("GPshowRoutePicto")).click()})),e.appendChild(o),e},_createRoutePanelFormElement:function(){var t=this,e=document.createElement("form");return e.id=this._addUID("GProuteForm"),e.setAttribute("onkeypress","return event.keyCode != 13;"),e.addEventListener("submit",(function(e){Uo.log(e),e.preventDefault();var i=document.getElementsByClassName(t._addUID("GPlocationPoint")),o=i[0].childNodes[0].id,n=i[i.length-1].childNodes[0].id,s=c.index(o),a=c.index(n);if(""===document.getElementById(t._addUID("GPlocationOrigin_"+s)).value&&""===document.getElementById(t._addUID("GPlocationOriginCoords_"+s)).value||""===document.getElementById(t._addUID("GPlocationOrigin_"+a)).value&&""===document.getElementById(t._addUID("GPlocationOriginCoords_"+a)).value)return!1;t._addRouteResultsStagesValuesElement(i);var r=null;if(document.getElementById(t._addUID("GProuteComputationSelect"))){var l=document.getElementById(t._addUID("GProuteResultsComputationSelect"));l.selectedIndex=document.getElementById(t._addUID("GProuteComputationSelect")).selectedIndex,r=l.options[l.selectedIndex].value}var h=null;document.getElementById(t._addUID("GProuteTransportCar"))&&document.getElementById(t._addUID("GProuteTransportCar")).checked&&(h=document.getElementById(t._addUID("GProuteTransportCar")).value),document.getElementById(t._addUID("GProuteTransportPedestrian"))&&document.getElementById(t._addUID("GProuteTransportPedestrian")).checked&&(h=document.getElementById(t._addUID("GProuteTransportPedestrian")).value);for(var d=[],u=document.getElementsByClassName("GProuteExclusionsOption"),p=0;p2?document.getElementById("GProuteAutoCompleteList"+i).style.display="block":document.getElementById("GProuteAutoCompleteList"+i).style.display="none",o.onAutoCompleteSearchText(t)}})),a.addEventListener("blur",(function(){var t=this.id.charAt(this.id.length-1);document.getElementById("GProuteAutoCompleteList"+t).style.display="none"})),n.appendChild(a);var r=document.createElement("input");r.id="GProuteOriginCoords"+t,r.className="GProuteOriginHidden",r.type="text",r.disabled=!0,n.appendChild(r);var l=document.createElement("input");l.id="GProuteOriginPointer"+t,l.type="checkbox",n.appendChild(l);var c=document.createElement("label");return c.id="GProuteOriginPointerImg"+t,c.htmlFor="GProuteOriginPointer"+t,c.className="GProuteOriginPointerImg",c.title="Pointer un lieu sur la carte",c.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e,i=this.id.charAt(this.id.length-1);for(e=1;e<8;e++)i!==e&&(document.getElementById("GProuteOriginPointer"+e).checked=!1,"Pointer un lieu sur la carte"===document.getElementById("GProuteOriginCoords"+e).value&&(document.getElementById("GProuteOriginCoords"+e).value="",document.getElementById("GProuteOrigin"+e).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+e).className="GProuteOriginHidden"));if(document.getElementById("GProuteOriginPointer"+i).checked){for(document.getElementById("GProuteOriginCoords"+i).value="",e=1;e<8;e++)document.getElementById("GProutePoint"+e).style.display="flex";document.getElementById("GProuteForm").className="",document.getElementById("GProuteOriginPointer"+i).checked=!1,document.getElementById("GProuteOrigin"+i).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+i).className="GProuteOriginHidden"}else{for(document.getElementById("GProuteOriginCoords"+i).value="Pointer un lieu sur la carte",e=1;e<8;e++)document.getElementById("GProutePoint"+e).style.display=i===e?"flex":"none";document.getElementById("GProuteForm").className="GProuteFormMini",document.getElementById("GProuteOriginPointer"+i).checked=!0,document.getElementById("GProuteOrigin"+i).className="GProuteOriginHidden",document.getElementById("GProuteOriginCoords"+i).className="GProuteOriginVisible"}o.onRouteMapPointClick(t)})),n.appendChild(c),n},_createRoutePanelFormRemoveStageElement:function(t){var e=this,i=document.createElement("div");return i.id="GProuteStageRemove"+t,i.className="GProuteStageRemove",i.title="Supprimer l'étape",1!==t&&7!==t&&i.addEventListener("click",(function(t){var i=this.id.charAt(this.id.length-1);document.getElementById("GProutePoint"+i).className="GPflexInput GProuteStageFlexInputHidden",document.getElementById("GProuteOrigin"+i).value="",document.getElementById("GProuteOrigin"+i).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+i).value="",document.getElementById("GProuteOriginCoords"+i).className="GProuteOriginHidden",document.getElementById("GProuteStageAdd").style.display="",e.onRouteRemovePointClick(t)})),i},_createRoutePanelFormAddStageElement:function(){var t=this,e=document.createElement("div");return e.id="GProuteStageAdd",e.title="Ajouter une étape",e.addEventListener("click",(function(e){for(var i=1,o=0,n=2;n<7;n++)"GPflexInput GProuteStageFlexInputHidden"===document.getElementById("GProutePoint"+n).className?1===i&&(i=n):o++;i<7&&(document.getElementById("GProutePoint"+i).className="GPflexInput GProuteStageFlexInput"),4===o&&(document.getElementById("GProuteStageAdd").style.display="none"),t.onRouteAddPointClick(e)})),e},_createRoutePanelFormAutoCompleteListElement:function(t){var e=this,i=document.createElement("div");return i.id="GProuteAutoCompleteList"+t,i.className="GPadvancedAutoCompleteList",i.addEventListener?i.addEventListener("click",(function(i){e.onAutoCompletedResultsItemClick(i),document.getElementById("GProuteAutoCompleteList"+t).style.display="none"}),!1):i.attachEvent&&i.attachEvent("onclick",(function(i){e.onAutoCompletedResultsItemClick(i),document.getElementById("GProuteAutoCompleteList"+t).style.display="none"})),i},_createRouteAutoCompletedLocationElement:function(t,e,i){var o=document.getElementById("GProuteAutoCompleteList"+e),n=document.createElement("div");n.id="AutoCompletedLocation"+i,n.className="GPautoCompleteProposal",n.innerHTML=so.getSuggestedLocationFreeform(t),o.appendChild(n)},_createRoutePanelFormModeChoiceElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProuteModeChoice"),t},_createRoutePanelFormModeChoiceTransportElement:function(t){var e=this,i=document.createElement("div");i.id=this._addUID("GProuteTransportChoice");var o=document.createElement("span");o.className="GProuteModeLabel",o.innerHTML="Mode de transport",i.appendChild(o);for(var n=0;n2?document.getElementById(e._addUID("GPautoCompleteList")).style.display="block":document.getElementById(e._addUID("GPautoCompleteList")).style.display="none",e.onAutoCompleteSearchText(t))})),o.addEventListener("keydown",(function(t){var i=t.which||t.keyCode,o=document.getElementById(e._addUID("GPautocompleteResults"));if(o){var n=o.getElementsByClassName("GPautoCompleteProposal current"),s=o.getElementsByClassName("GPautoCompleteProposal"),a=s.length;if(a){var r=null;if(!n.length)return(r=s[0]).className="GPautoCompleteProposal current",r.style.color="#000000",void(r.style["background-color"]="#CEDBEF");r=n[0];var l=parseInt(c.index(r.id),10),h=l===a-1?s[0]:s[l+1],d=0===l?s[a-1]:s[l-1];switch(r.style["background-color"]="",r.style.color="",d.style["background-color"]="",d.style.color="",h.style["background-color"]="",h.style.color="",i){case 38:r.className="GPautoCompleteProposal",d.className="GPautoCompleteProposal current",d.style.color="#000000",d.style["background-color"]="#CEDBEF";break;case 40:r.className="GPautoCompleteProposal",h.className="GPautoCompleteProposal current",h.style.color="#000000",h.style["background-color"]="#CEDBEF";break;case 13:t.preventDefault(),r.click(t)}r.focus()}}})),i.appendChild(o);var n=document.createElement("div");return n.id=this._addUID("GPsearchInputReset"),n.addEventListener("click",(function(){document.getElementById(e._addUID("GPsearchInputText")).value="",document.getElementById(e._addUID("GPautoCompleteList")).style.display="none",document.getElementById(e._addUID("GPgeocodeResultsList")).style.display="none",e.onSearchResetClick()})),i.appendChild(n),i},_createShowAdvancedSearchElement:function(){var t=this,e=document.createElement("div");e.id=this._addUID("GPshowAdvancedSearch"),e.className="GPshowAdvancedToolPicto",e.title="Ouvrir la recherche avancée",e.addEventListener("click",(function(){var e="#GPsearchInput-"+t._uid;document.querySelector(e+" input").disabled=!0,document.getElementById(t._addUID("GPautoCompleteList")).style.display="none",document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",document.getElementById(t._addUID("GPshowAdvancedSearch")).style.display="none",document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="inline-block"}));var i=document.createElement("span");return i.id=this._addUID("GPshowAdvancedSearchOpen"),i.className="GPshowAdvancedToolOpen",e.appendChild(i),e},_createAdvancedSearchPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPadvancedSearchPanel"),t.className="GPpanel",t.style.display="none",t},_createGeocodeResultsElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPgeocodeResultsList"),t.className="GPpanel",t.style.display="none",t.appendChild(this._createGeocodeResultsHeaderElement()),t},_createAutoCompleteElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPautoCompleteList"),t.className="GPautoCompleteList",t.style.display="none",t},_createAutoCompleteListElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPautocompleteResults"),e.addEventListener?e.addEventListener("click",(function(e){t.onAutoCompletedResultsItemClick(e),document.getElementById(t._addUID("GPautoCompleteList")).style.display="none"}),!1):e.attachEvent&&e.attachEvent("onclick",(function(e){t.onAutoCompletedResultsItemClick(e),document.getElementById(t._addUID("GPautoCompleteList")).style.display="none"})),e},_createAutoCompletedLocationElement:function(t,e){var i=document.getElementById(this._addUID("GPautocompleteResults")),o=document.createElement("div");o.id=this._addUID("AutoCompletedLocation_"+e),o.className="GPautoCompleteProposal",o.innerHTML=so.getSuggestedLocationFreeform(t),o.addEventListener?o.addEventListener("click",(function(t){i.click(t)}),!1):o.attachEvent&&o.attachEvent("onclick",(function(t){i.click(t)})),i.appendChild(o)},_createAdvancedSearchPanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var i=document.createElement("div");i.className="GPpanelTitle",i.innerHTML="Recherche avancée",e.appendChild(i);var o=document.createElement("div");return o.id=this._addUID("GPadvancedSearchClose"),o.className="GPpanelClose",o.title="Fermer la recherche avancée",o.addEventListener?o.addEventListener("click",(function(){var e="#GPsearchInput-"+t._uid;document.querySelector(e+" input").disabled=!1,document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",document.getElementById(t._addUID("GPshowAdvancedSearch")).style.display="inline-block",document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="none"}),!1):o.attachEvent&&o.attachEvent("onclick",(function(){var e="#GPsearchInput-"+t._uid;document.querySelector(e+" input").disabled=!1,document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",document.getElementById(t._addUID("GPshowAdvancedSearch")).style.display="inline-block",document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="none"})),e.appendChild(o),e},_createAdvancedSearchPanelFormElement:function(t){var e=this,i=document.createElement("form");i.id=this._addUID("GPadvancedSearchForm"),i.addEventListener("submit",(function(t){t.preventDefault();for(var i=[],o="#GPadvancedSearchFilters-"+e._uid,n=document.querySelectorAll(o+" > div > div > input"),s=0;sa&&(Vo.trace("zoom level max..."),o=a),Vo.trace("zoom",o),o},_setMarker:function(t,e,i,o){var n=this._map;if(null!=this._marker&&(n.removeLayer(this._marker),this._marker=null),t){var a=null;"string"==typeof o?a=new ho(o):o instanceof s.a.Icon?a=o:(a=new ho("blue"),Vo.log("Utilisation du marker par défaut !"));var r={clickable:!0,zIndexOffset:1e3,icon:a};if(this._marker=s.a.marker(s.a.latLng(t),r),this._marker.addTo(n),i){var l=null;if("string"!=typeof e)if("GeocodedLocation"===e.service){l="
      ";var c=e.location.placeAttributes;for(var h in c)c.hasOwnProperty(h)&&"trueGeometry"!==h&&"extraFields"!==h&&"houseNumberInfos"!==h&&"_count"!==h&&(l+="
    • ",l+=''+h.toUpperCase()+" : ",l+=c[h],l+="
    • ");l+="
    "}else l="SuggestedLocation"===e.service?so.getSuggestedLocationFreeform(e.location):"sans informations.";else l=e;this._marker.bindPopup(l)}}},_clearResults:function(){this._currentGeocodingLocation=null,this._clearSuggestedLocation(),this._clearGeocodedLocation(),this._setMarker()},_clearSuggestedLocation:function(){if(this._suggestedLocations=[],this._suggestedContainer)for(;this._suggestedContainer.firstChild;)this._suggestedContainer.removeChild(this._suggestedContainer.firstChild)},_clearGeocodedLocation:function(){if(this._geocodedLocations=[],this._geocodedContainer)for(;this._geocodedContainer.firstChild;)this._geocodedContainer.removeChild(this._geocodedContainer.firstChild)},onShowSearchEngineClick:function(){},onSearchResetClick:function(){this._clearResults()},onAutoCompleteSearchText:function(t){var e=t.target.value;if(e&&(this._currentGeocodingLocation=e,!(e.length<3))){var i=this.options.autocompleteOptions.triggerGeocode,o=this.options.autocompleteOptions.triggerDelay,n=this;this._requestAutoComplete({text:e,onSuccess:function(t){if(Vo.log("request from AutoComplete",t),t){n._suggestedLocations=t.suggestedLocations,n._locationsToBeDisplayed=[];for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:null,o=this.canvas||(this.canvas=document.createElement("canvas")),n=o.getContext("2d");n.font=null===i?"".concat(this._getCssProperty(e,"font-weight")," ").concat(this._getCssProperty(e,"font-size")," ").concat(this._getCssProperty(e,"font-family")):i;var s=n.measureText(t);return s.width},_dataZToSvgY:function(t,e,i,o){return e-(t-i)*o-.5},_dataDistToSvgX:function(t,e,i,o){return e-i+t*o},_svgXToDataDist:function(t,e,i,o){return(t+i-e)/o},_arrayBisect:function(t,e){var i;if(0===t.length)return 0;for(i=0;iS&&(L=Math.pow(10,Math.ceil(Math.log((p-u)/S)/Math.log(10))),x=Math.floor(u/L)*L,(G=Math.ceil(p/L)*L)===p&&(G+=L),x=Math.round(100*x)/100,G=Math.round(100*G)/100,I=Math.floor((G-x)/L)),I=Math.max(Math.round(I),1);var k=document.createElementNS("http://www.w3.org/2000/svg","g");k.setAttribute("class","profile-z-vertical");var R,T,A,D,O,N,U,j=document.createElementNS("http://www.w3.org/2000/svg","g"),F=b/I;R=p===u?b/.2:b/(G-x);for(var z=0;z<=I;z++)(T=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("class","profile-z-graduation"),T.setAttribute("font-family","Verdana"),T.setAttribute("font-size","10px"),T.setAttribute("fill","#5E5E5E"),T.textContent=(Math.round(100*(x+z*L))/100).toLocaleString(),A=b-z*F,T.setAttribute("transform","translate(".concat(17+w-8,", ").concat(A+5,")")),T.setAttribute("text-anchor","end"),k.appendChild(T),D=Math.round(A)-.5,O=document.createElementNS("http://www.w3.org/2000/svg","g"),(N=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),N.setAttribute("stroke-width","1"),0!==z?N.setAttribute("stroke-opacity","0.2"):N.setAttribute("stroke-opacity","1"),N.setAttribute("stroke","#000000"),N.setAttribute("fill","none"),N.setAttribute("d","M".concat(17+w,",").concat(D," L").concat(M+17+w,",").concat(D)),(U=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),U.setAttribute("stroke-width","1"),U.setAttribute("stroke-opacity","1"),U.setAttribute("stroke","#000000"),U.setAttribute("fill","none"),U.setAttribute("d","M".concat(17+w,",").concat(D," L").concat(17+w+5,",").concat(D)),U.setAttribute("transform","translate(-5, 0)"),O.appendChild(U),O.appendChild(N),j.appendChild(O);var B=document.createElementNS("http://www.w3.org/2000/svg","text");B.setAttribute("class","profile-z-legend"),B.setAttribute("font-family","Verdana"),B.setAttribute("font-size","11px"),B.setAttribute("fill","#5E5E5E"),B.textContent="Altitude (m)",B.setAttribute("transform","translate(".concat(9,", ").concat(Math.round(b/2),") rotate(-90)")),B.setAttribute("text-anchor","middle"),k.appendChild(B),C.appendChild(k),C.appendChild(j),m>2e3&&(m/=1e3,f="km");var W=Math.floor(M/P),q=Math.pow(10,Math.ceil(Math.log(m/W)/Math.log(10)))/2,H=m,V=Math.floor(H/q);V>W?(q=Math.pow(10,Math.ceil(Math.log(m/W)/Math.log(10))),V=Math.floor(H/q)):V<1&&(q=Math.pow(10,Math.ceil(Math.log(m/W)/Math.log(10))-1),V=Math.floor(H/q));var Y=q*(V=Math.max(V,1)),X=document.createElementNS("http://www.w3.org/2000/svg","g");X.setAttribute("class","profile-x-vertical");for(var K,Z,J,Q,$,tt,et=document.createElementNS("http://www.w3.org/2000/svg","g"),it=M/H,ot=(H-Y)*it,nt=Math.round((M-ot)/V),st=0;st<=V+1;st++)(K=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("class","profile-x-graduation"),K.setAttribute("font-family","Verdana"),K.setAttribute("font-size","10px"),K.setAttribute("fill","#5E5E5E"),st!==V+1&&(K.textContent=(Math.round(100*st*q)/100).toLocaleString()),Z=17+w+st*nt,st===V+1&&(Z=17+w+M),K.setAttribute("transform","translate(".concat(Z,", ").concat(b+15+5,")")),K.setAttribute("text-anchor","middle"),X.appendChild(K),J=Z-.5,Q=document.createElementNS("http://www.w3.org/2000/svg","g"),($=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),$.setAttribute("stroke-width","1"),0!==st?$.setAttribute("stroke-opacity","0.2"):$.setAttribute("stroke-opacity","1"),$.setAttribute("stroke","#000000"),$.setAttribute("fill","none"),$.setAttribute("d","M".concat(J,",").concat(b," L").concat(J,",0")),(tt=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),tt.setAttribute("stroke-width","1"),tt.setAttribute("stroke-opacity","1"),tt.setAttribute("stroke","#000000"),tt.setAttribute("fill","none"),tt.setAttribute("d","M".concat(J,",").concat(b," L").concat(J,",").concat(b-5)),tt.setAttribute("transform","translate(0, 5)"),Q.appendChild(tt),Q.appendChild($),et.appendChild(Q);var at=document.createElementNS("http://www.w3.org/2000/svg","text");at.setAttribute("class","profile-x-legend"),at.setAttribute("font-family","Verdana"),at.setAttribute("font-size","11px"),at.setAttribute("fill","#5E5E5E"),at.textContent="Distance (".concat(f,")"),at.setAttribute("transform","translate(".concat(17+w+M/2,", ").concat(b+15+17+3,")")),at.setAttribute("text-anchor","middle"),X.appendChild(at),C.appendChild(X),C.appendChild(et);var rt=document.createElementNS("http://www.w3.org/2000/svg","g"),lt=1;"km"===f&&(lt=1e3);for(var ct=this._dataDistToSvgX(h[0].dist/lt,E,M,it),ht=this._dataZToSvgY(h[0].z,b,x,R),dt="M".concat(ct,",").concat(ht),ut=1;utl.dist-s&&(c=l);var d=this._dataDistToSvgX(c.dist/lt,E,M,it),u=this._dataZToSvgY(c.z,b,x,R);Et.setAttribute("cx",d),Et.setAttribute("cy",u),vt.setAttribute("x1",d),vt.setAttribute("y1",b),vt.setAttribute("x2",d),vt.setAttribute("y2",0),yt.setAttribute("x1",17+w),yt.setAttribute("y1",u),yt.setAttribute("x2",M+17+w),yt.setAttribute("y2",u),o.__updateProfileMarker(n,c);var p="Altitude : ".concat(c.z.toLocaleString()," m"),f="Pente : ".concat(c.slope," %"),g="(lat : ".concat(c.lat.toLocaleString()," / lon : ").concat(c.lon.toLocaleString(),")");Pt.innerHTML=p,bt.innerHTML=f,Mt.innerHTML=g;var _,v=Math.max(this._getTextWidth(g,Mt),this._getTextWidth(p,Pt));c.dist>m*lt/2?(_="M -0.5 -0.5 l -6 6 l 0 16 l -".concat(v+10," 0 l 0 -44 l ").concat(v+10," 0 l 0 16 l 6 6"),wt.setAttribute("transform","translate(".concat(-(v/2+12),",0)"))):c.dist<=m*lt/2&&(_="M -0.5 -0.5 l 6 6 l 0 16 l ".concat(v+10," 0 l 0 -44 l -").concat(v+10," 0 l 0 16 l -6 6"),wt.setAttribute("transform","translate(".concat(v/2+12,",0)"))),Lt.setAttribute("d",_),St.setAttribute("d",_),Ct.setAttribute("transform","translate(".concat(d,",").concat(u,")")),Ct.style.transform="translate(".concat(d,"px,").concat(u,"px)")}.bind(this)),ft.appendChild(gt),C.appendChild(ft),g.appendChild(C),e}},displayProfileRaw:function(t,e,i,o){if(e){for(;e.firstChild;)e.removeChild(e.firstChild);var n=t&&t.points?t.points:{},s=document.createElement("textarea");return s.id="profilElevationResults",s.rows=10,s.cols=50,s.style.width="100%",s.innerHTML=JSON.stringify(n,void 0,4),s.addEventListener("mouseover",(function(t){o.__customRawProfileMouseOverEvent(i,t)})),e.appendChild(s),e}},displayProfileLibD3:function(t,e,i,o){var n=i;if(e&&t){for(;e.firstChild;)e.removeChild(e.firstChild);var s=t.points;if(t.distance>2e3){t.unit="km";for(var a=0;al[0]-e?l:a,h=g(c.dist),d=_(c.z);C.select("#focusCircle").attr("cx",h).attr("cy",d),C.select("#focusLineX").attr("x1",h).attr("y1",_(M[0])).attr("x2",h).attr("y2",_(M[1])),C.select("#focusLineY").attr("x1",g(b[0])).attr("y1",d).attr("x2",g(b[1])).attr("y2",d),o.__updateProfileMarker(n,c),L.transition().duration(200).style("opacity",.9);var u="";u+=" Altitude : "+c.z+" m",r.currentSlope&&(u+="
    Pente : "+c.slope+" %"),u+="
    (Lat : "+c.lat+"/ Lon : "+c.lon+")",L.html(u).style("left",d3.event.pageX+"px").style("top",d3.event.pageY-28+"px")})),P}},displayProfileLibAmCharts:function(t,e,i,o){var n=i;if(e&&t){var s=t.points,a="[[title]] : [[value]]m
    ";if(n.options.displayProfileOptions.currentSlope&&(a+="Pente : [[slope]] %
    "),a+="(Lat: [[lat]] / Lon:[[lon]])",AmCharts.addInitHandler((function(){})),t.distance>2e3){t.unit="km";for(var r=0;r100?h=1:c>10&&(h=10),c=Math.round(c*h)/h,s[l].dist=c}var d={type:"serial",pathToImages:"http://cdn.amcharts.com/lib/3/images/",categoryField:"dist",autoMarginOffset:0,marginRight:10,marginTop:10,startDuration:0,color:"#5E5E5E",fontSize:8,theme:"light",thousandsSeparator:"",numberFormatter:{precision:-1,decimalSeparator:",",thousandsSeparator:" "},categoryAxis:{color:"#5E5E5E",gridPosition:"start",minHorizontalGap:40,tickPosition:"start",title:"Distance ("+t.unit+")",titleColor:"#5E5E5E",labelOffset:0,startOnAxis:!0},chartCursor:{animationDuration:0,bulletsEnabled:!0,bulletSize:10,categoryBalloonEnabled:!1,cursorColor:"#F90",graphBulletAlpha:1,graphBulletSize:1,zoomable:!1},trendLines:[],graphs:[{balloonColor:"#CCCCCC",balloonText:a,bullet:"round",bulletAlpha:0,bulletBorderColor:"#FFF",bulletBorderThickness:2,bulletColor:"#F90",bulletSize:6,hidden:!1,id:"AmGraph-1",fillAlphas:.4,fillColors:"#C77A04",lineAlpha:1,lineColor:"#C77A04",lineThickness:1,title:"Altitude",valueField:"z"}],guides:[],valueAxes:[{id:"ValueAxis-1",minVerticalGap:20,title:"Altitude (m)"}],balloon:{borderColor:"#CCCCCC",borderThickness:1,fillColor:"#FFFFFF",showBullet:!0},titles:[],allLabels:[],dataProvider:s},u=AmCharts.makeChart(e,d);return u.addListener("changed",(function(t){var e=t.chart.dataProvider[t.index];o.__updateProfileMarker(n,e)})),u}}},Jo=l.getLogger("ElevationPath"),Qo=s.a.Control.extend({includes:Ko,options:{position:"topleft",active:!1,elevationPathOptions:{},stylesOptions:{},displayProfileOptions:{greaterSlope:!0,meanSlope:!0,ascendingElevation:!0,descendingElevation:!0,currentSlope:!0,apply:null,target:null}},initialize:function(t){s.a.Util.setOptions(this,t),this._uid=c.generate(),this._initDisplayProfileOptions(),this._showContainer=null,this._pictoContainer=null,this._panelContainer=null,this._profilContainer=null,this._waitingContainer=null,this._infoContainer=null,this._timerHdlr=null,this._reducePanel=!1,this._featuresLayer=null,this._lastIdLayer=0,this._currentIdLayer=0,this._currentFeature=null,this._profile=null,this._marker=null,this._geometry=null,this._distance=0,this._data={}},onAdd:function(t){var e=this._container=this._initLayout();return t&&this.options.active&&(null===this._profile&&(this._panelContainer.style.display="none"),this._activateMapInteraction(t)),s.a.DomEvent.disableClickPropagation(e).disableScrollPropagation(e),e},onRemove:function(){},_initDisplayProfileOptions:function(){var t=this.options.displayProfileOptions,e=t.apply;t.apply="function"==typeof e?e:Qo.DISPLAY_PROFILE_BY_DEFAULT;var i=t.target;t.target=void 0!==i?i:null;var o=Object.getPrototypeOf(this.options);void 0===t.meanSlope&&(t.meanSlope=o.displayProfileOptions.meanSlope),void 0===t.greaterSlope&&(t.greaterSlope=o.displayProfileOptions.greaterSlope),void 0===t.ascendingElevation&&(t.ascendingElevation=o.displayProfileOptions.ascendingElevation),void 0===t.descendingElevation&&(t.descendingElevation=o.displayProfileOptions.descendingElevation),void 0===t.currentSlope&&(t.currentSlope=o.displayProfileOptions.currentSlope)},_initLayout:function(){var t=this._createMainContainerElement(),e=this._showContainer=this._createShowElevationPathElement();t.appendChild(e),this.options.active&&(this._showContainer.checked=!0);var i=this._pictoContainer=this._createShowElevationPathPictoElement();t.appendChild(i);var o=this._panelContainer=this._createElevationPathPanelElement(),n=this._createElevationPathPanelHeaderElement();o.appendChild(n);var s=this._profilContainer=this._createElevationPathPanelProfilElement();o.appendChild(s);var a=this._waitingContainer=this._createElevationPathWaitingElement();o.appendChild(a);var r=this._infoContainer=this._createElevationPathInformationsElement();return o.appendChild(r),t.appendChild(o),t},onShowElevationPathClick:function(t){Jo.trace(t);var e=this._map;this._reducePanel?null!==this._profile&&(null===this.options.displayProfileOptions.target&&(this._pictoContainer.style.display="none"),this._panelContainer.style.display="block"):this._showContainer.checked?(this._pictoContainer.style.display="block",this._panelContainer.style.display="none",this._removeMapInteraction(e),this._clear()):(null===this._profile&&(this._panelContainer.style.display="none"),this._activateMapInteraction(e)),this._reducePanel=!1},onReduceElevationPathPanelClick:function(){this._reducePanel=!0,this._pictoContainer.style.display="block",this._panelContainer.style.display="none"},onOpenElevationPathInfoClick:function(){var t=this.options.displayProfileOptions.meanSlope,e=this.options.displayProfileOptions.greaterSlope,i=this.options.displayProfileOptions.ascendingElevation,o=this.options.displayProfileOptions.descendingElevation,n=this._infoContainer;if(n.childElementCount)for(;n.firstChild;)n.removeChild(n.firstChild);i&&this._addElevationPathInformationsItem("Dénivelé positif : "+this._data.ascendingElevation.toLocaleString()+" m"),o&&this._addElevationPathInformationsItem("Dénivelé négatif : "+this._data.descendingElevation.toLocaleString()+" m"),t&&this._addElevationPathInformationsItem("Pente moyenne : "+this._data.meanSlope.toLocaleString()+" %"),e&&this._addElevationPathInformationsItem("Plus forte pente : "+this._data.greaterSlope.toLocaleString()+" %"),"GPelevationPathInformationsContainerVisible"===n.className?(clearTimeout(this._timerHdlr),n.className="GPelevationPathInformationsContainerHidden"):n.className="GPelevationPathInformationsContainerVisible",this._timerHdlr=setTimeout((function(){n.className="GPelevationPathInformationsContainerHidden"}),4e3)},_activateMapInteraction:function(t){if(Jo.info("_activateMapInteraction()"),null===this._featuresLayer){this._featuresLayer=new s.a.FeatureGroup,t.addLayer(this._featuresLayer);var e=this;t.on("contextmenu",(function(){})),t.on("draw:created",(function(t){Jo.trace("draw:created"),e._currentIdLayer=s.a.Util.stamp(t.layer),e._getFeatureGeometry(t.layer),e._addFeatureLayer(t.layer)})),t.on("draw:drawstart",(function(){Jo.trace("draw:drawstart"),e._removeFeatureLayer(e._lastIdLayer),e._lastIdLayer=e._currentIdLayer})),t.on("draw:drawstop",(function(){Jo.trace("draw:drawstop"),void 0===e.options.elevationPathOptions.onSuccess&&null===e.options.displayProfileOptions.target&&(e._pictoContainer.style.display="none",e._panelContainer.style.display="block"),e._altiRequest()}))}this._activatePolyLineInteraction(t)},_removeMapInteraction:function(t){t&&(null!==this._featuresLayer&&(t.off("draw:created"),t.off("draw:drawstart"),t.off("draw:drawstop"),t.removeLayer(this._featuresLayer),this._featuresLayer=null),this._lastIdLayer=this._currentIdLayer=0,this._currentFeature&&this._currentFeature.disable())},_activatePolyLineInteraction:function(t){this._currentFeature&&this._currentFeature.disable();var e=this.options.stylesOptions||{},i=0!==Object.keys(e).length?e:{stroke:!0,color:"#C77A04",weight:4,opacity:.5,fill:!1};this._currentFeature=new s.a.Draw.Polyline(t,{shapeOptions:i}),this._currentFeature.enable()},_getFeatureGeometry:function(t){Jo.log(t.getLatLngs()),null!==this._geometry&&(this._geometry=null),this._geometry=[],this._distance=0;for(var e=t.getLatLngs(),i=0;i=200?200:Math.floor(o)}var n=this;s.a.Util.extend(t,{sampling:e,onSuccess:this.options.elevationPathOptions.onSuccess||function(t){Jo.log(t),t&&(null!==n.options.displayProfileOptions.target&&(n._pictoContainer.style.display="block",n._panelContainer.style.display="block"),n._displayProfil(t.elevations),n._waitingContainer.className="GPelevationPathCalcWaitingContainerHidden",n._waiting=!1)},onFailure:this.options.elevationPathOptions.onFailure||function(t){Jo.log(t.message),n._pictoContainer.style.display="block",n._panelContainer.style.display="none",n._waitingContainer.className="GPelevationPathCalcWaitingContainerHidden",n._waiting=!1,n._clear()}});var a=this._geometry;s.a.Util.extend(t,{positions:a}),Jo.log(t),this._waitingContainer.className="GPelevationPathCalcWaitingContainerVisible",no.Services.getAltitude(t)}else Jo.log("missing position")},_computeElevationMeasure:function(t){var e=function(t,e){var i=lo.decimalToRadian(t[1]),o=lo.decimalToRadian(e[1]),n=(o-i)/2,s=lo.decimalToRadian(e[0]-t[0])/2,a=Math.sin(n)*Math.sin(n)+Math.sin(s)*Math.sin(s)*Math.cos(i)*Math.cos(o);return 12756274*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))},i=t,o=this._geometry,n=0,s=0,a=o[1];i[0].dist=0,i[0].slope=0,i[0].lat=Math.round(1e4*i[0].lat)/1e4,i[0].lon=Math.round(1e4*i[0].lon)/1e4;for(var r=0,l=0,c=0,h=0,d=0,u=0,p=[],m=1;m0&&(l+=_,c+=E),d=g,i[m].dist=g,p.push(g),u+=E?Math.abs(Math.round(E/_*100)):0,i[m].slope=E?Math.abs(Math.round(E/_*100)):0;var w=i[m].slope;i[m].color=w>15&&w<30?"#005b4c":w>30&&w<45?"#00362d":w>45?"#00120f":"#00B798",i[m].lat=Math.round(1e4*i[m].lat)/1e4,i[m].lon=Math.round(1e4*i[m].lon)/1e4}Jo.trace("List Distances",p);for(var P=i[0].z,b=i[0].z,M=i[0].slope,C=0;Cb&&(b=L.z),L.zM&&(M=L.slope)}return{greaterSlope:M,meanSlope:Math.round(u/i.length),distancePlus:l,distanceMinus:r,ascendingElevation:c,descendingElevation:h,altMin:P.toLocaleString(),altMax:b.toLocaleString(),distance:this._distance,unit:"m",points:i}},_displayProfil:function(t){this._map.off("contextmenu"),this._data&&(this._data={});var e=this._data=this._computeElevationMeasure(t),i=this.options.displayProfileOptions.target;i&&i.appendChild(this._panelContainer),i=this._profilContainer;var o=this.options.displayProfileOptions,n=o.apply;"undefined"!=typeof AmCharts&&"undefined"!=typeof d3&&Jo.trace("Aucune lib. n'est presente !"),n.call(this,e,i,this);var a=s.a.DomUtil.get("GPelevationPathPanelInfo-"+this._uid);(o.greaterSlope||o.meanSlope||o.ascendingElevation||o.descendingElevation)&&(a.style.display="block")},_clear:function(){if(this._geometry=null,this._profile=null,this._profilContainer)for(;this._profilContainer.firstChild;)this._profilContainer.removeChild(this._profilContainer.firstChild);var t=this._map;this._marker&&(t.removeLayer(this._marker),this._marker=null)}});Qo.__createProfileMarker=function(t,e){Jo.log("__createProfileMarker");var i=t,o=i._map;i._marker=s.a.marker(s.a.latLng(e),{icon:new ho("orange"),draggable:!1,clickable:!1,zIndexOffset:1e3}),i._marker.addTo(o)},Qo.__updateProfileMarker=function(t,e){Jo.log("__updateProfileMarker");var i=t,o=i._map;i._marker?(i._marker.setLatLng(s.a.latLng(e)),i._marker.update()):(i._marker=s.a.marker(s.a.latLng(e),{icon:new ho("orange"),draggable:!1,clickable:!1,zIndexOffset:1e3}),i._marker.addTo(o))},Qo.__removeProfileMarker=function(t){Jo.log("__removeProfileMarker");var e=t,i=e._map;e._marker&&(i.removeLayer(e._marker),e._marker=null)},Qo.__customRawProfileOperation=function(){Jo.log("__customRawProfileOperation")},Qo.__customRawProfileMouseOverEvent=function(t,e){Jo.log("__customRawProfileMouseOverEvent",t,e)},Qo.DISPLAY_PROFILE_BY_DEFAULT=function(t,e,i){Jo.trace("ElevationPath.DISPLAY_PROFILE_BY_DEFAULT");var o=Zo.displayProfileByDefault(t,e,i,Qo);o&&(this._profile=o)},Qo.DISPLAY_PROFILE_RAW=function(t,e,i){Jo.trace("ElevationPath.DISPLAY_PROFILE_RAW");var o=Zo.displayProfileRaw(t,e,i,Qo);o&&(this._profile=o)},Qo.DISPLAY_PROFILE_LIB_D3=function(t,e,i){if(Jo.trace("ElevationPath.DISPLAY_PROFILE_LIB_D3"),"undefined"!=typeof d3){var o=Zo.displayProfileLibD3(t,e,i,Qo);o&&(this._profile=o)}else Jo.log("Lib. D3 is not loaded !")},Qo.DISPLAY_PROFILE_LIB_AMCHARTS=function(t,e,i){if(Jo.trace("ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS"),"undefined"!=typeof AmCharts){var o=Zo.displayProfileLibAmCharts(t,e,i,Qo);o&&(this._profile=o)}else Jo.log("Lib. AmCharts is not loaded !")};var $o=Qo,tn=s.a.Control.extend({options:{position:"topright",picto:null,url:null,text:null,size:"30px"},initialize:function(t){s.a.setOptions(this,t)},onAdd:function(){var t=null;t=s.a.DomUtil.create("div","gp-control-logo",t);var e=!(!this.options.url&&!this.options.text),i=null;e&&((i=s.a.DomUtil.create("a","",t)).target="_blank",this.options.url&&(i.href=this.options.url,this.options.text&&(i.title=this.options.text))),e&&this.options.text&&(i.text=this.options.text);var o=null;return!!this.options.picto&&((o=e?s.a.DomUtil.create("img","",i):s.a.DomUtil.create("img","",t)).src=this.options.picto,"string"==typeof this.options.size?o.style.height=o.style.width=this.options.size:(o.style.height=this.options.size.height,o.style.width=this.options.size.width)),t}}),en={LayerSwitcher:function(t){return new _e(t)},Isocurve:function(t){return new _o(t)},MousePosition:function(t){return new To(t)},ReverseGeocode:function(t){return new No(t)},Route:function(t){return new zo(t)},SearchEngine:function(t){return new Xo(t)},ElevationPath:function(t){return new $o(t)},Logo:function(t){return new tn(t)}},on={getZoomLevelFromScaleDenominator:function(t,e){var i={};switch(e){case"EPSG:2154":i={0:104579.224549894,1:52277.5323537905,2:26135.4870785954,3:13066.8913818,4:6533.2286041135,5:3266.5595244627,6:1633.2660045974,7:816.629554986,8:408.3139146768,9:204.1567415109,10:102.0783167832,11:51.0391448966,12:25.5195690743,13:12.7597836936,14:6.379891636,15:3.1899457653,16:1.5949728695,17:.7974864315,18:.3987432149,19:.1993716073,20:.0996858037,21:.0498429018};break;default:i={0:156543.033928041,1:78271.51696402048,2:39135.758482010235,3:19567.87924100512,4:9783.93962050256,5:4891.96981025128,6:2445.98490512564,7:1222.99245256282,8:611.49622628141,9:305.7481131407048,10:152.8740565703525,11:76.43702828517624,12:38.21851414258813,13:19.10925707129406,14:9.554628535647032,15:4.777314267823516,16:2.388657133911758,17:1.194328566955879,18:.5971642834779395,19:.2985821417389697,20:.1492910708694849,21:.0746455354347424}}var o=28e-5*t;for(var n in i)if(i.hasOwnProperty(n)&&i[n]<=o)return n=parseInt(n,10);return 0},getAttributions:function(t){var e=t.zoom,i=[];if(null!=t.originators&&t.visibility)for(var o,n=0,s=t.originators.length;ne&&(o=!1),o&&u&&u=1.3&&-1!==["EPSG:4326"].indexOf(this._crs.code)?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),c=s.a.Util.template(this._url,{s:this._getSubdomain(t)});return c+s.a.Util.getParamString(this.wmsParams,c,!0)+"&BBOX="+l}}),hn=l.getLogger("wmts"),dn=s.a.TileLayer.extend({includes:rn,defaultWmtsParams:{service:"WMTS",request:"GetTile",version:"1.0.0",layer:"",style:"",tilematrixset:"PM",format:"image/jpeg"},initialize:function(t,e){hn.log("initialize"),this._wmtsParams={},s.a.Util.extend(this._wmtsParams,this.defaultWmtsParams,e.paramsWmts),s.a.TileLayer.prototype.initialize.call(this,no.Helper.normalyzeUrl(t,{"gp-leaflet-ext":o.leafletExtVersion||o.version},!1),e.paramsNative),this._originators=e.originators,this._legends=e.legends,this._metadata=e.metadata,this._title=e.title,this._description=e.description,this._quicklookUrl=e.quicklookUrl,this._geoportal_id=0},onAdd:function(t){hn.trace("onAdd layer",this._geoportal_id),this._map=t,this._geoportal_id=s.a.stamp(this),s.a.TileLayer.prototype.onAdd.call(this,t),this.setVisible(!0),this.updateAttributions(t),t.on({overlayremove:this._onRemoveLayer,overlayadd:this._onAddLayer,layerremove:this._onRemoveLayer,layeradd:this._onAddLayer,moveend:this._onMoveEndLayer},this)},onRemove:function(t){hn.trace("onRemove layer",this._geoportal_id),this._map=t,s.a.TileLayer.prototype.onRemove.call(this,t),this.setVisible(!1),this.removeAttributions(t),t.off({overlayremove:this._onRemoveLayer,overlayadd:this._onAddLayer,layerremove:this._onRemoveLayer,layeradd:this._onAddLayer,moveend:this._onMoveEndLayer},this)},getTileUrl:function(t){var e=this._getZoomForUrl(),i=s.a.Util.template(this._url,{s:this._getSubdomain(t)});return i+s.a.Util.getParamString(this._wmtsParams,i)+"&tilematrix="+e+"&tilerow="+t.y+"&tilecol="+t.x},setParams:function(t,e){return s.a.extend(this._wmtsParams,t),e||this.redraw(),this}}),un=l.getLogger("layers"),pn={options:{},params:{},protocol:null,serviceUrl:"http://localhost?no-rights-found-for=[{layer}]",_initOptions:function(){if(!this.options||0===Object.keys(this.options).length)throw new Error("PARAM_MISSING : options !");if(!this.options.layer)throw new Error("PARAM_MISSING : layer !");this.options.apiKey||un.log("PARAM_MISSING : apiKey !"),void 0===this.options.ssl&&(this.options.ssl=!0)},_initContext:function(){this.protocol=!1===this.options.ssl?"http://":"https://"},_initParams:function(t){t||(t="WMTS"),this.params=sn.get({key:this.options.apiKey,layer:this.options.layer,service:t}),this.params&&0!==Object.keys(this.params).length||(this.params={},this.options.apiKey||un.log("WARNING PARAM_MISSING : parameter 'apiKey' is mandatory if the contract key configuration has not been loaded !"))},WMS:function(t,e){var i=l.getLogger("layers-wms");this.options=t||{},this._initOptions(),this.settings=e||{},this._initContext(),this._initParams("WMS"),i.log(this.params);var o=null;o=this.options.apiKey?s.a.Util.template("https://wxs.ign.fr/{key}/geoportail/r/wms",{key:this.options.apiKey}):this.params.url?this.params.url:s.a.Util.template(this.serviceUrl,{layer:this.options.layer});var n={layers:this.options.layer,styles:this.params.styles||"normal",format:this.params.format||"image/jpeg",version:this.params.version||"1.3.0"},a={minZoom:this.params.minZoom||1,maxZoom:this.params.maxZoom||21};return s.a.Util.extend(n,this.settings),s.a.Util.extend(a,this.settings),new cn(o.replace(/(http|https):\/\//,this.protocol),{paramsNative:a,paramsWms:n,originators:this.params.originators||this.settings.originators||[],legends:this.settings.originators||this.params.legends||[],metadata:this.settings.metadata||this.params.metadata||[],title:this.settings.title||this.params.title||"",description:this.settings.description||this.params.description||"",quicklookUrl:this.settings.quicklookUrl||this.params.quicklookUrl||""})},WMTS:function(t,e){var i=l.getLogger("layers-wmts");this.options=t||{},this._initOptions(),this.settings=e||{},this._initContext(),this._initParams("WMTS"),i.log(this.params);var o=null;o=this.options.apiKey?s.a.Util.template("https://wxs.ign.fr/{key}/geoportail/wmts",{key:this.options.apiKey}):this.params.url?this.params.url:s.a.Util.template(this.serviceUrl,{layer:this.options.layer});var n={layer:this.options.layer,style:this.params.styles||"normal",format:this.params.format||"image/jpeg",version:this.params.version||"1.0.0",tilematrixset:this.params.TMSLink||"PM"},a={minZoom:this.params.minZoom||1,maxZoom:this.params.maxZoom||21};return s.a.Util.extend(n,this.settings),s.a.Util.extend(a,this.settings),new dn(o.replace(/(http|https):\/\//,this.protocol),{paramsNative:a,paramsWmts:n,originators:this.params.originators||this.settings.originators||[],legends:this.settings.originators||this.params.legends||[],metadata:this.settings.metadata||this.params.metadata||[],title:this.settings.title||this.params.title||"",description:this.settings.description||this.params.description||"",quicklookUrl:this.settings.quicklookUrl||this.params.quicklookUrl||""})}};!function(){var t=document.getElementsByTagName("script"),e=t[t.length-1].getAttribute("data-key"),i=t[t.length-1].getAttribute("data-url"),o=t[t.length-1].getAttribute("data-timeout");if(e||i){var n={apiKey:e,sync:!0,onSuccess:function(){},onFailure:function(t){throw new Error("Configuration load failed : "+t.message)}};i&&(n.customConfigFile=i,n.callbackSuffix=""),o&&(n.timeOut=o),window.Gp||no.Services.getConfig(n)}}();var mn={proxifyUrl:function(t,e){var i=l.getLogger("proxifyUrl");if(!e||!e.hasOwnProperty("proxyUrl")||null===e.proxyUrl||0===e.proxyUrl.trim().length)return t;if(e.noProxyDomains&&Array.isArray(e.noProxyDomains)&&e.noProxyDomains.length>0)for(var o in e.noProxyDomains)if(i.trace("[ProxyUtils] proxifyUrl : analyzing "+e.noProxyDomains[o]),-1!==t.indexOf(e.noProxyDomains[o]))return i.info("[ProxyUtils] proxifyUrl : "+t+" found in noProxyDomains list ("+e.noProxyDomains[o]+")."),t;return e.proxyUrl+encodeURIComponent(t)}},fn={hex:function(t){if(t>255)throw new Error("'"+t+"'' is greater than 255(0xff);");return("0"+Number(t).toString(16)).slice(-2)},num:function(t){return parseInt(t,16)},arrayToRgba:function(t){if(!Array.isArray(t))throw new Error("Not an array !");var e=t[0],i=t[1],o=t[2],n=t[3]||1;return"rgba("+e+", "+i+", "+o+", "+parseFloat(n)+")"},arrayToHex:function(t){if(!Array.isArray(t))throw new Error("Not an array !");var e=t[0],i=t[1],o=t[2],n=t[3],s=[this.hex(e),this.hex(i),this.hex(o)],a={};return a.hex="#"+s.join(""),n&&(a.opacity=parseFloat(n)),a},rgbaToHex:function(t){var e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/.exec(t);if(!e)throw new Error("Invalid format: "+t);var i=e[1],o=e[2],n=e[3],s=e[4],a=[this.hex(i),this.hex(o),this.hex(n)],r={};return r.hex="#"+a.join(""),s&&(r.opacity=parseFloat(s)),r},hexToRgba:function(t,e){if(!t)throw new Error("Invalid format");t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,o){return e+e+i+i+o+o}));var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return(i=i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null)?"rgba("+i.r+", "+i.g+", "+i.b+", "+e+")":null},isHex:function(t){if(!t)return!1;if("#"!==t.charAt(0))return!1;return!!/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t)},isRGB:function(t){if(!t)return!1;return!!/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/.exec(t)}},gn=no.Services,_n=no.Error,vn=no.Helper,yn=no.Protocols,En=no.servicesDate,wn=no.servicesVersion,Pn=o.leafletExtVersion||o.version,bn=o.date,Mn=window.Gp?window.Gp.Config:{};s.a.geoportalLayer=pn,s.a.geoportalControl=en,s.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_LIB_D3=$o.DISPLAY_PROFILE_LIB_D3,s.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS=$o.DISPLAY_PROFILE_LIB_AMCHARTS,s.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_RAW=$o.DISPLAY_PROFILE_RAW,s.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_BY_DEFAULT=$o.DISPLAY_PROFILE_BY_DEFAULT,s.a.geoportalCRS=Io,s.a.geoportalCRS.EPSG2154=Io.EPSG2154(),s.a.geoportalCRS.EPSG27572=Io.EPSG27572(),s.a.geoportalCRS.EPSG4326=Io.EPSG4326()}])})); \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/CRS/CRS.d.ts b/leaflet-2.3.4/dist/Leaflet/CRS/CRS.d.ts new file mode 100644 index 000000000..1f99550cd --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/CRS/CRS.d.ts @@ -0,0 +1,29 @@ +export default CRS; +/** + * CRS (Coordinate Reference Systems) Factory to create L.Proj.CRS instances. + * + * @module CRS + * @alias L.geoportalCRS + * @abstract + * @example + * var map = L.Map('divmap', { + * crs : L.geoportalCRS.EPSG2154 + * }).setView(); + * + * var lyr = L.geoportalLayer.WMTS( + * { + * layer : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93" + * }, + * { + * opacity : 1, + * transparent : true, + * minZoom : 1, + * maxZoom : 21 + * ... + * }); + * + * lyr.addTo(map); // ou map.addLayer(lyr); + */ +/** @type {L.geoportalCRS} */ +declare var CRS: L.geoportalCRS; +//# sourceMappingURL=CRS.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/CRS/CRS.d.ts.map b/leaflet-2.3.4/dist/Leaflet/CRS/CRS.d.ts.map new file mode 100644 index 000000000..46d415313 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/CRS/CRS.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CRS.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/CRS/CRS.js"],"names":[],"mappings":";AAaA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,6BAA6B;AAC7B,gCAsCE"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/CRS/EPSG2154.d.ts b/leaflet-2.3.4/dist/Leaflet/CRS/EPSG2154.d.ts new file mode 100644 index 000000000..7d646ce66 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/CRS/EPSG2154.d.ts @@ -0,0 +1,22 @@ +export default EPSG2154; +/** + * @classdesc + * + * Leaflet Lambert 93 (EPSG:2154) ICRS compatible definition. + * + * @module + * @alias L.geoportalCRS.EPSG2154 + * @example + * var map = L.Map('divmap', { + * crs : L.geoportalCRS.EPSG2154 + * }).setView(); + * var lyr = L.geoportalLayer.WMTS( + * { + * layer : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93" + * }); + * + * lyr.addTo(map); // ou map.addLayer(lyr); + */ +/** @type {L.geoportalCRS.EPSG2154} */ +declare var EPSG2154: L.geoportalCRS.EPSG2154; +//# sourceMappingURL=EPSG2154.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/CRS/EPSG2154.d.ts.map b/leaflet-2.3.4/dist/Leaflet/CRS/EPSG2154.d.ts.map new file mode 100644 index 000000000..14924bf76 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/CRS/EPSG2154.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"EPSG2154.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/CRS/EPSG2154.js"],"names":[],"mappings":";AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH,sCAAsC;AACtC,8CAmFE"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/CRS/EPSG27572.d.ts b/leaflet-2.3.4/dist/Leaflet/CRS/EPSG27572.d.ts new file mode 100644 index 000000000..83b352728 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/CRS/EPSG27572.d.ts @@ -0,0 +1,30 @@ +export default EPSG27572; +/** + * + * Projection Lambert 2 étendu + * + * @module + * @alias L.geoportalCRS.EPSG27572 + * @example + * var map = L.Map('divmap', { + * crs : L.geoportalCRS.EPSG27572 + * }).setView(); + * var lyr = L.geoportalLayer.WMTS( + * { + * layer : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93", + * apiKey : "wqxljfvklsdhvlfkjqfmlq787645" + * }, + * { + * attribution : "test for layer ORTHOIMAGERY", + * opacity : 1, + * transparent : true, + * minZoom : 1, + * maxZoom : 21 + * ... + * }); + * + * lyr.addTo(map); // ou map.addLayer(lyr); + */ +/** @type {L.geoportalCRS.EPSG27572} */ +declare var EPSG27572: L.geoportalCRS.EPSG27572; +//# sourceMappingURL=EPSG27572.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/CRS/EPSG27572.d.ts.map b/leaflet-2.3.4/dist/Leaflet/CRS/EPSG27572.d.ts.map new file mode 100644 index 000000000..c7b00e5a4 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/CRS/EPSG27572.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"EPSG27572.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/CRS/EPSG27572.js"],"names":[],"mappings":";AAIA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,uCAAuC;AACvC,gDAqFE"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/CRS/EPSG4326.d.ts b/leaflet-2.3.4/dist/Leaflet/CRS/EPSG4326.d.ts new file mode 100644 index 000000000..65f08677f --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/CRS/EPSG4326.d.ts @@ -0,0 +1,32 @@ +export default EPSG4326; +/** + * Projection Geographic (EPSG:4326) + * (PROTOTYPE) + * + * @ignore + * @module + * @alias L.geoportalCRS.EPSG2154 + * @returns {L.Proj.CRS} + * @example + * var map = L.Map('divmap', { + * crs : L.geoportalCRS.EPSG4326 // ou L.CRS.EPSG4326 + * }).setView(); + * var lyr = L.geoportalLayer.WMTS( + * { + * layer : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO", + * apiKey : "wqxljfvklsdhvlfkjqfmlq787645" + * }, + * { + * attribution : "test for layer ORTHOIMAGERY", + * opacity : 1, + * transparent : true, + * minZoom : 1, + * maxZoom : 21 + * ... + * }); + * + * lyr.addTo(map); // ou map.addLayer(lyr); + */ +/** @type {L.geoportalCRS.EPSG4326} */ +declare var EPSG4326: L.geoportalCRS.EPSG4326; +//# sourceMappingURL=EPSG4326.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/CRS/EPSG4326.d.ts.map b/leaflet-2.3.4/dist/Leaflet/CRS/EPSG4326.d.ts.map new file mode 100644 index 000000000..572744055 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/CRS/EPSG4326.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"EPSG4326.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/CRS/EPSG4326.js"],"names":[],"mappings":";AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,sCAAsC;AACtC,8CAgFE"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/Controls.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/Controls.d.ts new file mode 100644 index 000000000..a9b63dcbb --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/Controls.d.ts @@ -0,0 +1,93 @@ +export default Controls; +declare namespace Controls { + function LayerSwitcher(options: { + position?: string | undefined; + collapsed?: boolean | undefined; + layers?: any[] | undefined; + }): L.geoportalControl.LayerSwitcher; + function Isocurve(options: { + apiKey?: string | undefined; + position?: string | undefined; + collapsed?: boolean | undefined; + ssl?: boolean | undefined; + exclusions?: Object | undefined; + graphs?: any[] | undefined; + methods?: any[] | undefined; + directions?: any[] | undefined; + disableReverse?: boolean | undefined; + isocurveOptions?: Object | undefined; + autocompleteOptions?: Object | undefined; + }): L.geoportalControl.Isocurve; + function MousePosition(options: { + apiKey?: string | undefined; + position?: string | undefined; + collapsed?: boolean | undefined; + ssl?: boolean | undefined; + systems?: any[] | undefined; + }): L.geoportalControl.MousePosition; + function ReverseGeocode(options: { + apiKey?: string | undefined; + position?: string | undefined; + collapsed?: boolean | undefined; + ssl?: boolean | undefined; + resources?: any[] | undefined; + delimitations?: any[] | undefined; + ReverseGeocodeOptions?: Object | undefined; + }): L.geoportalControl.ReverseGeocode; + function Route(options: { + apiKey?: string | undefined; + position?: string | undefined; + collapsed?: boolean | undefined; + ssl?: boolean | undefined; + disableReverse?: boolean | undefined; + exclusions?: Object | undefined; + graphs?: any[] | undefined; + autocompleteOptions?: Object | undefined; + routeOptions?: Object | undefined; + }): L.geoportalControl.Route; + function SearchEngine(options: { + apiKey?: string | undefined; + collapsed?: boolean | undefined; + ssl?: boolean | undefined; + position?: string | undefined; + placeholder?: string | undefined; + displayMarker?: boolean | undefined; + markerStyle?: string | Object | undefined; + displayInfo?: boolean | undefined; + zoomTo?: any; + resources?: Object | undefined; + displayAdvancedSearch?: boolean | undefined; + advancedSearch?: Object | undefined; + geocodeOptions?: Object | undefined; + autocompleteOptions?: { + serviceOptions?: Object | undefined; + triggerGeocode?: boolean | undefined; + triggerDelay?: number | undefined; + } | undefined; + }): L.geoportalControl.SearchEngine; + function ElevationPath(options: { + apiKey?: string | undefined; + position?: string | undefined; + ssl?: boolean | undefined; + active?: boolean | undefined; + stylesOptions?: Object | undefined; + elevationPathOptions?: Object | undefined; + displayProfileOptions?: { + apply?: Function | undefined; + target?: Object | undefined; + greaterSlope?: boolean | undefined; + meanSlope?: boolean | undefined; + ascendingElevation?: boolean | undefined; + descendingElevation?: boolean | undefined; + currentSlope?: boolean | undefined; + } | undefined; + }): L.geoportalControl.ElevationPath; + function Logo(options: { + position: string; + url: string; + text: string; + picto: string; + size: string | Object; + }): any; +} +//# sourceMappingURL=Controls.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/Controls.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/Controls.d.ts.map new file mode 100644 index 000000000..4f7767292 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/Controls.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Controls.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Controls/Controls.js"],"names":[],"mappings":";;IA6DoB;;;;yCAEf;IAoCU;;;;;;;;;;;;oCAEV;IAkEe;;;;;;yCAEf;IA+BgB;;;;;;;;0CAEhB;IAmCO;;;;;;;;;;iCAEP;IAqEc;;;;;;;;;;;;;;;;;;;wCAEd;IA0Ce;;;;;;;;;;;;;;;;yCAEf;IA2BM;;;;;;YAEN"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/ElevationPath.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/ElevationPath.d.ts new file mode 100644 index 000000000..eb674a1fc --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/ElevationPath.d.ts @@ -0,0 +1,15 @@ +export default ElevationPath; +/** + * @classdesc + * + * Leaflet Control Class to compute and display Profil Elevation. + * + * Use {@link module:Controls.ElevationPath L.geoportalControl.ElevationPath()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control native class. + * + * @namespace + * @alias L.geoportalControl.ElevationPath + */ +declare var ElevationPath: any; +//# sourceMappingURL=ElevationPath.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/ElevationPath.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/ElevationPath.d.ts.map new file mode 100644 index 000000000..3f9a1cd0c --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/ElevationPath.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ElevationPath.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Controls/ElevationPath.js"],"names":[],"mappings":";AAaA;;;;;;;;;;;GAWG;AACH,+BAw3BG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/GroupLocationSelector.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/GroupLocationSelector.d.ts new file mode 100644 index 000000000..33e55c76f --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/GroupLocationSelector.d.ts @@ -0,0 +1,23 @@ +export default GroupLocationSelector; +/** + * @classdesc + * + * Group of LocationSelector Control. + * + * @constructor GroupLocationSelector + * @alias GroupLocationSelector + * @extends {L.Control} + * @param {Object} options - options for function call. + * @param {String} [options.apiKey] - API key. The "calcul" key is used by default. + * @param {String} [options.position] - position of component into the map, 'topleft' by default + * @param {Boolean} [options.collapsed] - collapse mode, false by default + * @param {Object} ... + * @private + * @example + * var route = L.geoportalControl.Route({ + * position : "topright", + * collapsed : true + * }); + */ +declare var GroupLocationSelector: any; +//# sourceMappingURL=GroupLocationSelector.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/GroupLocationSelector.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/GroupLocationSelector.d.ts.map new file mode 100644 index 000000000..4b3f3f00b --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/GroupLocationSelector.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GroupLocationSelector.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Controls/GroupLocationSelector.js"],"names":[],"mappings":";AAQA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,uCA0MG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/Isocurve.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/Isocurve.d.ts new file mode 100644 index 000000000..c83ddbcfd --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/Isocurve.d.ts @@ -0,0 +1,15 @@ +export default Isocurve; +/** + * @classdesc + * + * Leaflet Control Class to compute and display Isochrone or isodistances curves. + * + * Use {@link module:Controls.Isocurve L.geoportalControl.Isocurve()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control native class. + * + * @namespace + * @alias L.geoportalControl.Isocurve + */ +declare var Isocurve: any; +//# sourceMappingURL=Isocurve.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/Isocurve.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/Isocurve.d.ts.map new file mode 100644 index 000000000..0d3a581f8 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/Isocurve.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Isocurve.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Controls/Isocurve.js"],"names":[],"mappings":";AASA;;;;;;;;;;;GAWG;AACH,0BAm+BG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/LayerSwitcher.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/LayerSwitcher.d.ts new file mode 100644 index 000000000..ededef174 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/LayerSwitcher.d.ts @@ -0,0 +1,15 @@ +export default LayerSwitcher; +/** + * @classdesc + * + * Leaflet Control Class to manage map layers : their order, visibility and opacity, and display their informations (title, description, legends, metadata...) + * + * Use {@link module:Controls.LayerSwitcher L.geoportalControl.LayerSwitcher()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control.Layers native class. + * + * @namespace + * @alias L.geoportalControl.LayerSwitcher + */ +declare var LayerSwitcher: any; +//# sourceMappingURL=LayerSwitcher.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/LayerSwitcher.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/LayerSwitcher.d.ts.map new file mode 100644 index 000000000..69d286c2e --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/LayerSwitcher.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LayerSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Controls/LayerSwitcher.js"],"names":[],"mappings":";AAQA;;;;;;;;;;;GAWG;AACH,+BA01BG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/LocationSelector.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/LocationSelector.d.ts new file mode 100644 index 000000000..77accda09 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/LocationSelector.d.ts @@ -0,0 +1,31 @@ +export default LocationSelector; +/** +* @classdesc +* +* LocationSelector Control. +* +* @private +* @constructor LocationSelector +* @alias LocationSelector +* @extends {L.Control} +* LocationSelector component. Enables to select a location, using autocompletion or picking location on the map +* @param {Object} [options] - component options +* @param {Boolean} [options.displayInfo = true] - whether to display info in a popup or not (not implemented yet) Default is true +* @param {Boolean} [options.disableReverse = false] - whether to enable/disable the reverse geocoding. +* @param {Object} [options.tag] - tag options +* @param {Number} [options.tag.id = 0] - order id number in a locations group, in case several LocationSelector are used. For instance in route case : departure tag id should be 0, arrival tag id should be 1, and other ones : 2, 3, ... +* @param {Number} [options.tag.unique = null] - locationSelector global component id (in case locationSelector is called by another graphic component, e.g. route control) +* @param {String} [options.tag.label = ">"] - text to display in component (e.g. "Departure"). Default is ">" +* @param {String} [options.tag.color = blue] - color of marker (blue, green, orange and red) +* @param {Boolean} [options.tag.display = true] - whether to display or hide component. Default is true +* @param {Boolean} [options.tag.addOption = false] - whether to display picto to add another LocationSelector (in case of route control) +* @param {Boolean} [options.tag.removeOption = false] - whether to display picto to remove a LocationSelector (in case of route control) +* @param {Object} [options.autocompleteOptions] - autocomplete service options +* @param {Object} [options.reverseGeocodeOptions] - reverse geocoding service options + +* @example +* var point = L.geoportalControl.LocationSelector({ +* }); +*/ +declare var LocationSelector: any; +//# sourceMappingURL=LocationSelector.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/LocationSelector.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/LocationSelector.d.ts.map new file mode 100644 index 000000000..9b4bc82bf --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/LocationSelector.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LocationSelector.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Controls/LocationSelector.js"],"names":[],"mappings":";AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BE;AACF,kCAw6BG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/Logo.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/Logo.d.ts new file mode 100644 index 000000000..a7b902859 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/Logo.d.ts @@ -0,0 +1,28 @@ +export default Logo; +/** + * @classdesc + * + * Control Logo + * + * @private + * @constructor + * @extends {L.Control} + * @alias Logo + * @param {Object} options - options for function call. + * @param {String} options.position - 'topright' by default + * @param {String} options.url - URL + * @param {String} options.text - text + * @param {String} options.picto - picto + * @example + * var map = L.map('map').setView([48, 2], 4); + * var logo = L.geoportalControl.Logo({ + * position : "topright", + * picto : "http://www.ign.fr/logo-ign.jpg", + * url : "http://www.ign.fr", + * text : "© IGN", + * size : "70px" + * }); + * logo.addTo(map); + */ +declare var Logo: any; +//# sourceMappingURL=Logo.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/Logo.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/Logo.d.ts.map new file mode 100644 index 000000000..50cc15f67 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/Logo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Controls/Logo.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,sBAwEG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/MousePosition.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/MousePosition.d.ts new file mode 100644 index 000000000..9e5b310e0 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/MousePosition.d.ts @@ -0,0 +1,15 @@ +export default MousePosition; +/** + * @classdesc + * + * Leaflet Control Class to display Mouse position in various CRS and altitude using the altimetric web service of the Geoportal Platform. + * + * Use {@link module:Controls.MousePosition L.geoportalControl.MousePosition()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control native class. + * + * @namespace + * @alias L.geoportalControl.MousePosition + */ +declare var MousePosition: any; +//# sourceMappingURL=MousePosition.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/MousePosition.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/MousePosition.d.ts.map new file mode 100644 index 000000000..0997d9b2c --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/MousePosition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MousePosition.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Controls/MousePosition.js"],"names":[],"mappings":";AAWA;;;;;;;;;;;GAWG;AACH,+BA07CG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/ReverseGeocoding.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/ReverseGeocoding.d.ts new file mode 100644 index 000000000..f01ae280a --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/ReverseGeocoding.d.ts @@ -0,0 +1,15 @@ +export default ReverseGeocoding; +/** + * @classdesc + * + * Leaflet Control Class to find locations by clicking on a map using reverse geocoding service of the Geoportal platform. + * + * Use {@link module :Controls.ReverseGeocode L.geoportalControl.ReverseGeocode()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control native class. + * + * @namespace + * @alias L.geoportalControl.ReverseGeocode + */ +declare var ReverseGeocoding: any; +//# sourceMappingURL=ReverseGeocoding.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/ReverseGeocoding.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/ReverseGeocoding.d.ts.map new file mode 100644 index 000000000..431c2f216 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/ReverseGeocoding.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ReverseGeocoding.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Controls/ReverseGeocoding.js"],"names":[],"mappings":";AAUA;;;;;;;;;;;GAWG;AACH,kCA4oCG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/Route.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/Route.d.ts new file mode 100644 index 000000000..5d036bfe2 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/Route.d.ts @@ -0,0 +1,15 @@ +export default Route; +/** + * @classdesc + * + * Leaflet Control Class to compute and display route between start and end points using routing service of the geoportal platform. + * + * Use {@link module:Controls.Route L.geoportalControl.Route()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control native class. + * + * @namespace + * @alias L.geoportalControl.Route + */ +declare var Route: any; +//# sourceMappingURL=Route.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/Route.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/Route.d.ts.map new file mode 100644 index 000000000..a148df610 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/Route.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Controls/Route.js"],"names":[],"mappings":";AASA;;;;;;;;;;;GAWG;AACH,uBAo2CG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/SearchEngine.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/SearchEngine.d.ts new file mode 100644 index 000000000..cbdae2504 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/SearchEngine.d.ts @@ -0,0 +1,19 @@ +export default SearchEngine; +/** + * @classdesc + * + * Leaflet Control Class to search positons of geographic identifiers (places names, address, cadastral parcel) using : + * + * - the [geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage.html}. + * - the [autocompletion service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/autocompletion.html} + *
    + * + * Use {@link module :Controls.SearchEngine L.geoportalControl.SearchEngine()} factory to create instances of that class. + * + * **Extends** Leaflet L.Control native class. + * + * @namespace + * @alias L.geoportalControl.SearchEngine + */ +declare var SearchEngine: any; +//# sourceMappingURL=SearchEngine.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/SearchEngine.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/SearchEngine.d.ts.map new file mode 100644 index 000000000..a0d91812c --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/SearchEngine.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SearchEngine.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Controls/SearchEngine.js"],"names":[],"mappings":";AAaA;;;;;;;;;;;;;;;GAeG;AACH,8BAqvCG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/Utils/IconDefault.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/Utils/IconDefault.d.ts new file mode 100644 index 000000000..2ab0d2717 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/Utils/IconDefault.d.ts @@ -0,0 +1,8 @@ +export default IconDefault; +/** + * @classdesc + * + * **Extends** Leaflet L.Icon.Default native class. + */ +declare var IconDefault: any; +//# sourceMappingURL=IconDefault.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/Utils/IconDefault.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/Utils/IconDefault.d.ts.map new file mode 100644 index 000000000..6f3c0fd73 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/Utils/IconDefault.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"IconDefault.d.ts","sourceRoot":"","sources":["../../../../../src/Leaflet/Controls/Utils/IconDefault.js"],"names":[],"mappings":";AAKA;;;;GAIG;AACH,6BA+EG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/Utils/PositionFormater.d.ts b/leaflet-2.3.4/dist/Leaflet/Controls/Utils/PositionFormater.d.ts new file mode 100644 index 000000000..a85722fde --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/Utils/PositionFormater.d.ts @@ -0,0 +1,18 @@ +export default PositionFormater; +declare namespace PositionFormater { + const NORTH: string; + const SOUTH: string; + const EAST: string; + const WEST: string; + const digitSecond: number; + const digitDecimal: number; + const digitRadian: number; + function roundToDecimal(inputNum: number, numPoints: Integer): number; + function decimalToRadian(location: number): number; + function decimalToGrade(location: number): number; + function decimalToDMS(location: number, hemisphere: string, obj: boolean): string | Object; + function decimalLatToDMS(location: number, obj: boolean): string | Object; + function decimalLonToDMS(location: number, obj: boolean): string | Object; + function DMSToDecimal(degrees: number, minutes: number, seconds: number, hemisphere: string): number; +} +//# sourceMappingURL=PositionFormater.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Controls/Utils/PositionFormater.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Controls/Utils/PositionFormater.d.ts.map new file mode 100644 index 000000000..731391c55 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Controls/Utils/PositionFormater.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PositionFormater.d.ts","sourceRoot":"","sources":["../../../../../src/Leaflet/Controls/Utils/PositionFormater.js"],"names":[],"mappings":";;;;;;;;;IAuCqB,sEAGhB;IAOiB,mDAGjB;IAOgB,kDAGhB;IASc,2FA0Bd;IAQiB,0EAGjB;IAQiB,0EAGjB;IAUc,qGAMd"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Layers/LayerConfig.d.ts b/leaflet-2.3.4/dist/Leaflet/Layers/LayerConfig.d.ts new file mode 100644 index 000000000..be50dc656 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Layers/LayerConfig.d.ts @@ -0,0 +1,5 @@ +export default LayerConfig; +declare namespace LayerConfig { + function get(options: Object): Object; +} +//# sourceMappingURL=LayerConfig.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Layers/LayerConfig.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Layers/LayerConfig.d.ts.map new file mode 100644 index 000000000..b6df67214 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Layers/LayerConfig.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LayerConfig.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Layers/LayerConfig.js"],"names":[],"mappings":";;IAoBU,sCAqBL"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Layers/LayerEvent.d.ts b/leaflet-2.3.4/dist/Leaflet/Layers/LayerEvent.d.ts new file mode 100644 index 000000000..6144ca45b --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Layers/LayerEvent.d.ts @@ -0,0 +1,10 @@ +export default LayerEvent; +/** + * @classdesc + * + * Evenement sur les couches Geoportail + * @private + */ +/** @type {LayerEvent} */ +declare var LayerEvent: any; +//# sourceMappingURL=LayerEvent.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Layers/LayerEvent.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Layers/LayerEvent.d.ts.map new file mode 100644 index 000000000..54abfb734 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Layers/LayerEvent.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LayerEvent.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Layers/LayerEvent.js"],"names":[],"mappings":";AAMA;;;;;GAKG;AACH,yBAAyB;AACzB,4BAwKE"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Layers/Layers.d.ts b/leaflet-2.3.4/dist/Leaflet/Layers/Layers.d.ts new file mode 100644 index 000000000..8853175e3 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Layers/Layers.d.ts @@ -0,0 +1,15 @@ +export default Layers; +/** + * Geoportal Layers Factory to be used together with Leaflet Maps. + * + * @module Layers + * @alias L.geoportalLayer + * @example + * var map = L.Map(...) ; + * var layer = L.geoportalLayer.WMTS({ + * layer : "ORTHOIMAGERY.ORTHOPHOTOS", + * }).addTo(map) ; + */ +/** @type {L.geoportalLayer} */ +declare var Layers: L.geoportalLayer; +//# sourceMappingURL=Layers.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Layers/Layers.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Layers/Layers.d.ts.map new file mode 100644 index 000000000..82f37b3c1 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Layers/Layers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Layers.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Layers/Layers.js"],"names":[],"mappings":";AAQA;;;;;;;;;;GAUG;AACH,+BAA+B;AAC/B,qCAmSE"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Layers/WMS.d.ts b/leaflet-2.3.4/dist/Leaflet/Layers/WMS.d.ts new file mode 100644 index 000000000..3f8b336b7 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Layers/WMS.d.ts @@ -0,0 +1,15 @@ +export default WMS; +/** + * @namespace + * @alias L.geoportalLayers.WMS + * @classdesc + * + * Leaflet Layer Class for Geoportal or INSPIRE WMS Layers. + * + * Use {@link module:Layers.WMS L.geoportalLayer.WMS()} factory to create instances of that class. + * + * **Extends** Leaflet L.TileLayer.WMS native class. + * + */ +declare var WMS: any; +//# sourceMappingURL=WMS.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Layers/WMS.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Layers/WMS.d.ts.map new file mode 100644 index 000000000..90a996676 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Layers/WMS.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"WMS.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Layers/WMS.js"],"names":[],"mappings":";AAeA;;;;;;;;;;;GAWG;AACH,qBAmOG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Layers/WMTS.d.ts b/leaflet-2.3.4/dist/Leaflet/Layers/WMTS.d.ts new file mode 100644 index 000000000..355f9e0bd --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Layers/WMTS.d.ts @@ -0,0 +1,15 @@ +export default WMTS; +/** + * @namespace + * @alias L.geoportalLayers.WMTS + * @classdesc + * + * Leaflet Layer Class for Geoportal WMTS Layers. + * + * Use {@link module:Layers.WMTS L.geoportalLayer.WMTS()} factory to create instances of that class. + * + * **Extends** Leaflet L.TileLayer native class. + * + */ +declare var WMTS: any; +//# sourceMappingURL=WMTS.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Layers/WMTS.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Layers/WMTS.d.ts.map new file mode 100644 index 000000000..ead6a51c1 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Layers/WMTS.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"WMTS.d.ts","sourceRoot":"","sources":["../../../../src/Leaflet/Layers/WMTS.js"],"names":[],"mappings":";AAcA;;;;;;;;;;;GAWG;AACH,sBAiQG"} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Styles.d.ts b/leaflet-2.3.4/dist/Leaflet/Styles.d.ts new file mode 100644 index 000000000..93815f397 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Styles.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=Styles.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/Styles.d.ts.map b/leaflet-2.3.4/dist/Leaflet/Styles.d.ts.map new file mode 100644 index 000000000..9568df738 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/Styles.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../src/Leaflet/Styles.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/index.d.ts b/leaflet-2.3.4/dist/Leaflet/index.d.ts new file mode 100644 index 000000000..d66e7028e --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/index.d.ts @@ -0,0 +1,18 @@ +/** Version */ +export const leafletExtVersion: any; +/** Publication date */ +export const leafletExtDate: any; +export { default as LayerUtils } from "../Common/Utils/LayerUtils"; +export { default as ProxyUtils } from "../Common/Utils/ProxyUtils"; +export { default as ColorUtils } from "../Common/Utils/ColorUtils"; +export { default as MathUtils } from "../Common/Utils/MathUtils"; +export { default as Logger } from "../Common/Utils/LoggerByDefault"; +export const Config: any; +export var Services: any; +export var Error: any; +export var Helper: any; +export var Protocols: any; +export var servicesDate: any; +export var servicesVersion: any; +export { L as LExtended }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/leaflet-2.3.4/dist/Leaflet/index.d.ts.map b/leaflet-2.3.4/dist/Leaflet/index.d.ts.map new file mode 100644 index 000000000..a258dbd36 --- /dev/null +++ b/leaflet-2.3.4/dist/Leaflet/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Leaflet/index.js"],"names":[],"mappings":"AA6FA,cAAc;AACd,oCAAsE;AACtE,uBAAuB;AACvB,iCAAuC;;;;;;AAUvC,yBAA0D;AAhD1D,yBAA2B;AAC3B,sBAAqB;AACrB,uBAAuB;AACvB,0BAA6B;AAC7B,6BAAmC;AACnC,gCAAyC"} \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/L.geoportalControl.ElevationPath.html b/leaflet-2.3.4/jsdoc/L.geoportalControl.ElevationPath.html new file mode 100644 index 000000000..660311c27 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/L.geoportalControl.ElevationPath.html @@ -0,0 +1,3225 @@ + + + + + + + + + + + + + Namespace: ElevationPath + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Namespace: ElevationPath

    + + + + +
    + + +

    + L.geoportalControl.ElevationPath +

    + + +

    Leaflet Control Class to compute and display Profil Elevation.

    +

    Use L.geoportalControl.ElevationPath() factory to create instances of that class.

    +

    Extends Leaflet L.Control native class.

    + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + static__createProfileMarker(context, data) +

    + + +
    + Leaflet/Controls/ElevationPath.js, line 922 +
    + +
    + + +
    +
    + + +
    +

    create Profile Marker

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    context + + +Object + + + + + +

    context

    data + + +Object + + + + + +

    data

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + static__customRawProfileMouseOverEvent(context, e) +

    + + +
    + Leaflet/Controls/ElevationPath.js, line 1009 +
    + +
    + + +
    +
    + + +
    +

    custom operation into raw profil...
    +TODO

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    context + + +Object + + + + + +

    context

    e + + +Object + + + + + +

    event

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + static__customRawProfileOperation() +

    + + +
    + Leaflet/Controls/ElevationPath.js, line 998 +
    + +
    + + +
    +
    + + +
    +

    custom operation into raw profil...
    +TODO

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + static__removeProfileMarker(context) +

    + + +
    + Leaflet/Controls/ElevationPath.js, line 982 +
    + +
    + + +
    +
    + + +
    +

    remove Profile Marker

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    context + + +Object + + + + + +

    context

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + static__updateProfileMarker(context, data) +

    + + +
    + Leaflet/Controls/ElevationPath.js, line 950 +
    + +
    + + +
    +
    + + +
    +

    update Profile Marker

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    context + + +Object + + + + + +

    context

    data + + +Object + + + + + +

    data

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + staticDISPLAY_PROFILE_BY_DEFAULT(data, container, context) +

    + + +
    + Leaflet/Controls/ElevationPath.js, line 1021 +
    + +
    + + +
    +
    + + +
    +

    Display Profile function used by default : no additonal framework needed.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    data + + +Object + + + + + +

    elevations values for profile

    container + + +HTMLElement + + + + + +

    html container where to display profile

    context + + +Object + + + + + +

    this control object

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + staticDISPLAY_PROFILE_LIB_AMCHARTS(data, container, context) +

    + + +
    + Leaflet/Controls/ElevationPath.js, line 1080 +
    + +
    + + +
    +
    + + +
    +

    Display Profile using Amcharts framework. This method needs AmCharts libraries to be loaded.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    data + + +Object + + + + + +

    elevations values for profile

    container + + +HTMLElement + + + + + +

    html container where to display profile

    context + + +Object + + + + + +

    this control object

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + staticDISPLAY_PROFILE_LIB_D3(data, container, context) +

    + + +
    + Leaflet/Controls/ElevationPath.js, line 1057 +
    + +
    + + +
    +
    + + +
    +

    Display Profile using D3 javascript framework. This method needs D3 libraries to be loaded.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    data + + +Object + + + + + +

    elevations values for profile

    container + + +HTMLElement + + + + + +

    html container where to display profile

    context + + +Object + + + + + +

    this control object

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + staticDISPLAY_PROFILE_RAW(data, container, context) +

    + + +
    + Leaflet/Controls/ElevationPath.js, line 1039 +
    + +
    + + +
    +
    + + +
    +

    Display Profile without graphical rendering (raw service response)

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    data + + +Object + + + + + +

    elevations values for profile

    container + + +HTMLElement + + + + + +

    html container where to display profile

    context + + +Object + + + + + +

    this control object

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/L.geoportalControl.Isocurve.html b/leaflet-2.3.4/jsdoc/L.geoportalControl.Isocurve.html new file mode 100644 index 000000000..82cd4dbdf --- /dev/null +++ b/leaflet-2.3.4/jsdoc/L.geoportalControl.Isocurve.html @@ -0,0 +1,2127 @@ + + + + + + + + + + + + + Namespace: Isocurve + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Namespace: Isocurve

    + + + + +
    + + +

    + L.geoportalControl.Isocurve +

    + + +

    Leaflet Control Class to compute and display Isochrone or isodistances curves.

    +

    Use L.geoportalControl.Isocurve() factory to create instances of that class.

    +

    Extends Leaflet L.Control native class.

    + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + compute(position, value, options) +

    + + +
    + Leaflet/Controls/Isocurve.js, line 960 +
    + +
    + + +
    +
    + + +
    +

    This method is public.
    +It allows to control the execution of a traitment.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    position + + +Object + + + + + +

    position = {lon: , lat: }

    value + + +Object + + + + + +

    distance en km ou heures-minutes

    options + + +Object + + + + + +

    options = {...}

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/L.geoportalControl.LayerSwitcher.html b/leaflet-2.3.4/jsdoc/L.geoportalControl.LayerSwitcher.html new file mode 100644 index 000000000..f9ebd371b --- /dev/null +++ b/leaflet-2.3.4/jsdoc/L.geoportalControl.LayerSwitcher.html @@ -0,0 +1,2507 @@ + + + + + + + + + + + + + Namespace: LayerSwitcher + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Namespace: LayerSwitcher

    + + + + +
    + + +

    + L.geoportalControl.LayerSwitcher +

    + + +

    Leaflet Control Class to manage map layers : their order, visibility and opacity, and display their informations (title, description, legends, metadata...)

    +

    Use L.geoportalControl.LayerSwitcher() factory to create instances of that class.

    +

    Extends Leaflet L.Control.Layers native class.

    + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + addLayer(layer, config) +

    + + +
    + Leaflet/Controls/LayerSwitcher.js, line 798 +
    + +
    + + +
    +
    + + +
    +

    Adding layer configuration to be displayed by the control

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    layer + + +Object + + + + + +

    layer to add to layer switcher

    config + + +Object + + + + + +

    See L.geoportalControl.LayerSwitcher() for layer display config object definition.

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + addTo(map){Object} +

    + + +
    + Leaflet/Controls/LayerSwitcher.js, line 341 +
    + +
    + + +
    +
    + + +
    +

    Method 'addTo'
    +(overwritten : L.Control.Layers because of exception with _expandIfNotCollapsed())

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    map + + +Object + + + + + +

    the map

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + setOpacity(layer, opacity) +

    + + +
    + Leaflet/Controls/LayerSwitcher.js, line 846 +
    + +
    + + +
    +
    + + +
    +

    Set the opacity of a layer, and opacity must be a number from 0 to 1.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    layer + + +Object + + + + + +

    layer into layerswitcher

    opacity + + +Number + + + + + +

    0-1.

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + setVisibility(layer, visibility) +

    + + +
    + Leaflet/Controls/LayerSwitcher.js, line 873 +
    + +
    + + +
    +
    + + +
    +

    Set the visibility of a layer.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    layer + + +Object + + + + + +

    layer into layerswitcher

    visibility + + +Object + + + + + +

    true/false.

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/L.geoportalControl.MousePosition.html b/leaflet-2.3.4/jsdoc/L.geoportalControl.MousePosition.html new file mode 100644 index 000000000..b975726b9 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/L.geoportalControl.MousePosition.html @@ -0,0 +1,2300 @@ + + + + + + + + + + + + + Namespace: MousePosition + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Namespace: MousePosition

    + + + + +
    + + +

    + L.geoportalControl.MousePosition +

    + + +

    Leaflet Control Class to display Mouse position in various CRS and altitude using the altimetric web service of the Geoportal Platform.

    +

    Use L.geoportalControl.MousePosition() factory to create instances of that class.

    +

    Extends Leaflet L.Control native class.

    + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + moveTo(position, zoom, options) +

    + + +
    + Leaflet/Controls/MousePosition.js, line 1474 +
    + +
    + + +
    +
    + + +
    +

    This method is public.
    +It allows to control the execution of a movement.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    position + + +Object + + + + + +

    position = {lon: , lat: }

    zoom + + +Number + + + + + +

    zoom

    options + + +Object + + + + + +

    Zoom/pan options

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + validateExtentCoordinate(coordType, value, e){Boolean} +

    + + +
    + Leaflet/Controls/MousePosition.js, line 1111 +
    + +
    + + +
    +
    + + +
    +

    Validate Extend coordinate

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    coordType + + +String + + + + + +

    Lat or Lon

    value + + +String + + + + + +

    coordinate

    e + + +Event + + + + + +

    event

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +is within extent +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/L.geoportalControl.ReverseGeocode.html b/leaflet-2.3.4/jsdoc/L.geoportalControl.ReverseGeocode.html new file mode 100644 index 000000000..8b20227d8 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/L.geoportalControl.ReverseGeocode.html @@ -0,0 +1,1959 @@ + + + + + + + + + + + + + Namespace: ReverseGeocode + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Namespace: ReverseGeocode

    + + + + +
    + + +

    + L.geoportalControl.ReverseGeocode +

    + + +

    Leaflet Control Class to find locations by clicking on a map using reverse geocoding service of the Geoportal platform.

    +

    Use :Controls.ReverseGeocode L.geoportalControl.ReverseGeocode() factory to create instances of that class.

    +

    Extends Leaflet L.Control native class.

    + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/L.geoportalControl.Route.html b/leaflet-2.3.4/jsdoc/L.geoportalControl.Route.html new file mode 100644 index 000000000..b2284538a --- /dev/null +++ b/leaflet-2.3.4/jsdoc/L.geoportalControl.Route.html @@ -0,0 +1,2104 @@ + + + + + + + + + + + + + Namespace: Route + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Namespace: Route

    + + + + +
    + + +

    + L.geoportalControl.Route +

    + + +

    Leaflet Control Class to compute and display route between start and end points using routing service of the geoportal platform.

    +

    Use L.geoportalControl.Route() factory to create instances of that class.

    +

    Extends Leaflet L.Control native class.

    + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + compute(positions, options) +

    + + +
    + Leaflet/Controls/Route.js, line 1352 +
    + +
    + + +
    +
    + + +
    +

    This method is public.
    +It allows to control the execution of a traitment.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    positions + + +Object + + + + + +

    positions = [{lng: , lat: }]

    options + + +Object + + + + + +

    options = {...}

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/L.geoportalControl.SearchEngine.html b/leaflet-2.3.4/jsdoc/L.geoportalControl.SearchEngine.html new file mode 100644 index 000000000..7a3ab267f --- /dev/null +++ b/leaflet-2.3.4/jsdoc/L.geoportalControl.SearchEngine.html @@ -0,0 +1,2132 @@ + + + + + + + + + + + + + Namespace: SearchEngine + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Namespace: SearchEngine

    + + + + +
    + + +

    + L.geoportalControl.SearchEngine +

    + + +

    Leaflet Control Class to search positons of geographic identifiers (places names, address, cadastral parcel) using :

    + +

    Use :Controls.SearchEngine L.geoportalControl.SearchEngine() factory to create instances of that class.

    +

    Extends Leaflet L.Control native class.

    + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + setText(text, type, options) +

    + + +
    + Leaflet/Controls/SearchEngine.js, line 1279 +
    + +
    + + +
    +
    + + +
    +

    This method is public.
    +It allows to control the execution of a geocoding or an autocompletion.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    text + + +String + + + + + +

    location

    type + + +Boolean + + + + + +

    true (geocoding) / false (autocompletion)

    options + + +Object + + + + + +

    options

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/L.geoportalLayers.WMS.html b/leaflet-2.3.4/jsdoc/L.geoportalLayers.WMS.html new file mode 100644 index 000000000..398d0e05d --- /dev/null +++ b/leaflet-2.3.4/jsdoc/L.geoportalLayers.WMS.html @@ -0,0 +1,1959 @@ + + + + + + + + + + + + + Namespace: WMS + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Namespace: WMS

    + + + + +
    + + +

    + L.geoportalLayers.WMS +

    + + +

    Leaflet Layer Class for Geoportal or INSPIRE WMS Layers.

    +

    Use L.geoportalLayer.WMS() factory to create instances of that class.

    +

    Extends Leaflet L.TileLayer.WMS native class.

    + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/L.geoportalLayers.WMTS.html b/leaflet-2.3.4/jsdoc/L.geoportalLayers.WMTS.html new file mode 100644 index 000000000..c93d1cd27 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/L.geoportalLayers.WMTS.html @@ -0,0 +1,1959 @@ + + + + + + + + + + + + + Namespace: WMTS + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Namespace: WMTS

    + + + + +
    + + +

    + L.geoportalLayers.WMTS +

    + + +

    Leaflet Layer Class for Geoportal WMTS Layers.

    +

    Use L.geoportalLayer.WMTS() factory to create instances of that class.

    +

    Extends Leaflet L.TileLayer native class.

    + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/fonts/glyphicons-halflings-regular.eot b/leaflet-2.3.4/jsdoc/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 000000000..423bd5d3a Binary files /dev/null and b/leaflet-2.3.4/jsdoc/fonts/glyphicons-halflings-regular.eot differ diff --git a/leaflet-2.3.4/jsdoc/fonts/glyphicons-halflings-regular.svg b/leaflet-2.3.4/jsdoc/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 000000000..446948874 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/fonts/glyphicons-halflings-regular.ttf b/leaflet-2.3.4/jsdoc/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 000000000..a498ef4e7 Binary files /dev/null and b/leaflet-2.3.4/jsdoc/fonts/glyphicons-halflings-regular.ttf differ diff --git a/leaflet-2.3.4/jsdoc/fonts/glyphicons-halflings-regular.woff b/leaflet-2.3.4/jsdoc/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 000000000..d83c539b8 Binary files /dev/null and b/leaflet-2.3.4/jsdoc/fonts/glyphicons-halflings-regular.woff differ diff --git a/leaflet-2.3.4/jsdoc/global.html b/leaflet-2.3.4/jsdoc/global.html new file mode 100644 index 000000000..1c824de4d --- /dev/null +++ b/leaflet-2.3.4/jsdoc/global.html @@ -0,0 +1,2303 @@ + + + + + + + + + + + + + Global + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Global

    + + + + +
    + + +

    + +

    + + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +
    +

    IconDefault

    +
    + + +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    +
    +

    LayerEventLayerEvent

    +
    + + +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    +
    +

    PositionFormater

    +
    + + +
    +
    + +
    +

    ...

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + +
    + + + + + + + +

    Events

    + +
    + +
    +
    +

    + + reverse:onclickresult +

    + + +
    + Leaflet/Controls/ReverseGeocoding.js, line 858 +
    + +
    + + +
    +
    + + +
    +

    event triggered when an element of the results is clicked for geocoding

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + searchengine:autocomplete:click +

    + + +
    + Leaflet/Controls/SearchEngine.js, line 1078 +
    + +
    + + +
    +
    + + +
    +

    event triggered when an element of the results is clicked for autocompletion

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + searchengine:geocode:click +

    + + +
    + Leaflet/Controls/SearchEngine.js, line 1167 +
    + +
    + + +
    +
    + + +
    +

    event triggered when an element of the results is clicked for geocoding

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/images/entete.png b/leaflet-2.3.4/jsdoc/images/entete.png new file mode 100644 index 000000000..785651104 Binary files /dev/null and b/leaflet-2.3.4/jsdoc/images/entete.png differ diff --git a/leaflet-2.3.4/jsdoc/images/logoIGN.png b/leaflet-2.3.4/jsdoc/images/logoIGN.png new file mode 100644 index 000000000..2c440434b Binary files /dev/null and b/leaflet-2.3.4/jsdoc/images/logoIGN.png differ diff --git a/leaflet-2.3.4/jsdoc/images/logoIGNsmall.png b/leaflet-2.3.4/jsdoc/images/logoIGNsmall.png new file mode 100644 index 000000000..9b33003c3 Binary files /dev/null and b/leaflet-2.3.4/jsdoc/images/logoIGNsmall.png differ diff --git a/leaflet-2.3.4/jsdoc/images/showLeftMenu.png b/leaflet-2.3.4/jsdoc/images/showLeftMenu.png new file mode 100644 index 000000000..eed13c5e2 Binary files /dev/null and b/leaflet-2.3.4/jsdoc/images/showLeftMenu.png differ diff --git a/leaflet-2.3.4/jsdoc/index.html b/leaflet-2.3.4/jsdoc/index.html new file mode 100644 index 000000000..05f0b7529 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/index.html @@ -0,0 +1,1996 @@ + + + + + + + + + + + + + Index + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Index

    + + + + + + + + + + + + + + + + + + + + + +
    +

    API Reference

    +

    The Geoportal Extension for Leaflet provides additionnal javascript functionalities (Coordinate Reference Systems, Layers and Controls) making access to french geoportal webservices more easier when using Leaflet javascript library.

    +

    This extension is not standalone and has to be used together with Leaflet library. In a web page, you thus have to include both Leaflet and Geoportal Extension resources. For instance :

    +
    <!-- Leaflet -->
    +<link rel="stylesheet" href="path/to/leaflet.css" />
    +<script src="path/to/leaflet.js"></script>
    +
    +<!-- Geoportal Extension for Leaflet -->
    +<script src="path/to/GpPluginLeaflet.js" data-key="{your-geoportal-access-key}"></script>
    +<link rel="stylesheet" href="path/to/GpPluginLeaflet.css" />
    +
    +

    NB : to have complete access to this extension functionnalities, you need to freely provide a geoportal access key among the one available here : . Use it either when loading extension script (using the data-key attribute) or by conditinning their use to the onSuccess callback function of a Gp.Services.GetConfig() call with that key. Otherwhise some functionalities may not work as announced.

    +

    Geoportal CRS

    +

    Additionnaly to built in Leaflet Coordinate Reference Systems (CRS) the Geoportal Extension provides Lambert 93 (EPSG:2154) CRS definition, useful for Lambert 93 WMTS Geoportal Layers display.

    + + + + + + + + + + + + + +
    Geoportal CRSDescription
    L.geoportalCRS.EPSG2154Lambert 93 (EPSG:2154) CRS.
    +

    The integration of Proj4Leaflet and Proj4js libraries in the Geoportal extension allows developpers to define further CRS if they need.

    +

    Geoportal Layers

    +

    Layers provided by the Geoportal Extension are additionnal Leaflet tiled layers that can be added to an Leaflet Map like any other Leaflet layer.

    + + + + + + + + + + + + + + + + + +
    Geoportal LayerDescription
    L.geoportalLayer.WMSProvides access to Geoportal or INSPIRE WMS web services.
    L.geoportalLayer.WMTSProvides access to Geoportal WMTS web service.
    +

    Geoportal Controls

    +

    Controls provided by the Geoportal Extension are additionnal Leaflet controls that, when added to an Leaflet Map, allows user to interact with it.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Geoportal ControlDescription
    L.geoportalControl.LayerSwitcherAllows users to manage layer organisation of the map
    L.geoportalControl.MousePositionAllows users to know coordinates of the mouse displayed in various Coordinates Reference Systems. It has the additionnal capability of displaying elevation of Mouse Position based on elevation service of the Geoportal Platform.
    L.geoportalControl.SearchEngineAllows users to search and display locations on a map using autocompletion service and geocoding service of the Geoportal Platform.
    L.geoportalControl.ReverseGeocodeAllows users to find locations by clicking on a map using geocoding service of the Geoportal Platform.
    L.geoportalControl.RouteAllows users to compute and display routes on a Map using routing service of the Geoportal Platform.
    L.geoportalControl.IsocurveAllows users to compute and display Isochrone or Isodistance curves on a Map using isochron/isodistance service of the Geoportal Platform.
    L.geoportalControl.ElevationPathAllows users to compute an altimetric profile using elevation service of the Geoportal Platform.
    +
    + + + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:39 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-CRS.html b/leaflet-2.3.4/jsdoc/module-CRS.html new file mode 100644 index 000000000..45afa00a9 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-CRS.html @@ -0,0 +1,2192 @@ + + + + + + + + + + + + + Module: CRS + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: CRS

    + + + + +
    + + +

    + L.geoportalCRS +

    + + + + +
    +
    + + + + +

    CRS (Coordinate Reference Systems) Factory to create L.Proj.CRS instances.

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    var map = L.Map('divmap', {
    +   crs : L.geoportalCRS.EPSG2154
    + }).setView();
    +
    + var lyr = L.geoportalLayer.WMTS(
    +   {
    +     layer : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93"
    +   },
    +   {
    +     opacity : 1,
    +     transparent : true,
    +     minZoom : 1,
    +     maxZoom : 21
    +     ...
    +   });
    +
    + lyr.addTo(map); // ou map.addLayer(lyr);
    + + + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +
    +

    innerCRSL.geoportalCRS

    +
    + + +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + +
    + + + +

    Methods

    + +
    + +
    +
    +

    + + staticEPSG2154(){EPSG2154} +

    + + +
    + Leaflet/CRS/CRS.js, line 42 +
    + +
    + + +
    +
    + + +
    +

    Lambert 93 ("EPSG:2154") CRS definition to be used with Leaflet.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +code +
    + + + + + +
    + + + +
    +
    +

    + + staticEPSG27572(){EPSG27572} +

    + + +
    + Leaflet/CRS/CRS.js, line 54 +
    + +
    + + +
    +
    + + +
    +

    CRS : Lambert 2 extened

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +code +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-ColorUtils.html b/leaflet-2.3.4/jsdoc/module-ColorUtils.html new file mode 100644 index 000000000..179828e20 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-ColorUtils.html @@ -0,0 +1,2507 @@ + + + + + + + + + + + + + Module: ColorUtils + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: ColorUtils

    + + + + +
    + + +

    + Gp.ColorUtils +

    + + + + +
    +
    + + + + +

    ...

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    arrayTorgba();
    +arrayToHex();
    +rgbaToHex();
    +hexToRgba();
    +isHex();
    +isRGB();
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + innerarrayToHex(values){Object} +

    + + +
    + Common/Utils/ColorUtils.js, line 60 +
    + +
    + + +
    +
    + + +
    +

    Converts an array ([255,255,255,1]) to #RRGGBBAA

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    values + + +Array + + + + + +

    array of values

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +and opacity formated values +
    + + + + + +
    + + + +
    +
    +

    + + innerarrayToRgba(values){String} +

    + + +
    + Common/Utils/ColorUtils.js, line 41 +
    + +
    + + +
    +
    + + +
    +

    Converts an array ([255,255,255,1]) to rgba string

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    values + + +Array + + + + + +

    array of values

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +color of RGB or RGBA format +
    + + + + + +
    + + + +
    +
    +

    + + innerhexToRgba(hex, opacity){String} +

    + + +
    + Common/Utils/ColorUtils.js, line 113 +
    + +
    + + +
    +
    + + +
    +

    Converts hex color and opacity value to rgba string.
    +(Code adapted from : http://stackoverflow.com/a/5624139)

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    hex + + +String + + + + + +

    A color value on RGB format (hexa).

    opacity + + +Number + + + + + +

    A opacity value.

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +color of RGB or RGBA format +
    + + + + + +
    + + + +
    +
    +

    + + innerrgbaToHex(rgba){Object} +

    + + +
    + Common/Utils/ColorUtils.js, line 85 +
    + +
    + + +
    +
    + + +
    +

    Converts rgba string to #RRGGBBAA
    +(Code adapted from : https://gist.github.com/mstssk/afda4ce9e5c335fd79cd)

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    rgba + + +String + + + + + +

    A color of RGB or RGBA format.

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +and opacity formated values +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-Config.html b/leaflet-2.3.4/jsdoc/module-Config.html new file mode 100644 index 000000000..2045db7ed --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-Config.html @@ -0,0 +1,1965 @@ + + + + + + + + + + + + + Module: Config + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: Config

    + + + + +
    + + +

    + [private] Config +

    + + + + +
    +
    + + + + +

    ...

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    isConfigLoaded();
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-Controls.html b/leaflet-2.3.4/jsdoc/module-Controls.html new file mode 100644 index 000000000..b149067f5 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-Controls.html @@ -0,0 +1,6585 @@ + + + + + + + + + + + + + Module: Controls + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: Controls

    + + + + +
    + + +

    + L.geoportalControl +

    + + + + +
    +
    + + + + +

    Geoportal Controls Factory to be used together with Leaflet Maps.

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    var layerSwitcher = L.geoportalControl.LayerSwitcher(options);
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + staticElevationPath(options){L.geoportalControl.ElevationPath} +

    + + +
    + Leaflet/Controls/Controls.js, line 313 +
    + +
    + + +
    +
    + + +
    +

    Factory function for ElevationPath Control creation.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    options + + +Object + + + + + +

    options for function call.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDefaultDescription
    apiKey + + +String + + + + + + + + + optional + + + + + +

    API key for elevation service call, mandatory if configuration service has not been loaded in advance. See "Configuration de l'accès à la plateforme Géoportail" documentation chapter for more information.

    position + + +String + + + + + + + + + optional + + + + + +

    position of component into the map, 'topleft' by default. See L.Control options for available values.

    ssl + + +Boolean + + + + + + true + + + + + optional + + + + + +

    use of ssl or not (default true, service requested using https protocol)

    active + + +Boolean + + + + + + false + + + + + optional + + + + + +

    specify if control should be actived at startup. Default is false.

    stylesOptions + + +Object + + + + + + DEFAULT_STYLES + + + + + optional + + + + + +

    Styles to use when drawing. see leaflet options for available properties.

    elevationPathOptions + + +Object + + + + + + {} + + + + + optional + + + + + +

    elevation path service options. See options for available options

    displayProfileOptions + + +Object + + + + + + {} + + + + + optional + + + + + +

    profile options.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDefaultDescription
    apply + + +function + + + + + + + + + optional + + + + + +

    function to display profile if you want to cutomise it. By default, DISPLAY_PROFILE_BY_DEFAULT() is used. Helper functions to use with D3 DISPLAY_PROFILE_LIB_D3() or AmCharts DISPLAY_PROFILE_LIB_AMCHARTS() frameworks are also provided. You may also provide your own function.

    target + + +Object + + + + + + + + + optional + + + + + +

    DOM container to use to display the profile.

    greaterSlope + + +Boolean + + + + + + true + + + + + optional + + + + + +

    display the greater slope into the graph

    meanSlope + + +Boolean + + + + + + true + + + + + optional + + + + + +

    display the mean slope into the graph

    ascendingElevation + + +Boolean + + + + + + true + + + + + optional + + + + + +

    display the ascending elevation into the graph

    descendingElevation + + +Boolean + + + + + + true + + + + + optional + + + + + +

    display the descending elevation into the graph

    currentSlope + + +Boolean + + + + + + true + + + + + optional + + + + + +

    display current slope value on profile mouseover

    + +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +Object + +
    + + + + + +
    Example
    + + + +
    var e = L.geoportalControl.ElevationPath({
    +     active : false
    +     position : "topleft"
    +     stylesOptions : {},
    +     elevationPathOptions : {},
    +     displayProfileOptions  : {
    +         apply : L.geoportalControl.DISPLAY_PROFILE_LIB_AMCHARTS
    +         target : null, // by default
    +         meanSlope : true, // by default
    +         greaterSlope : true, // by default
    +         ascendingElevation : false,
    +         descendingElevation : false,
    +         currentSlope : false
    +     }
    + });
    + + + +
    + + + +
    +
    +

    + + staticIsocurve(options){L.geoportalControl.Isocurve} +

    + + +
    + Leaflet/Controls/Controls.js, line 66 +
    + +
    + + +
    +
    + + +
    +

    Factory function for Isocurve Control creation.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    options + + +Object + + + + + +

    Isocurve control options

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDefaultDescription
    apiKey + + +String + + + + + + + + + optional + + + + + +

    API key for services call (isocurve and autocomplete services). The key "calcul" is used by default.

    position + + +String + + + + + + + + + optional + + + + + +

    position of component into the map, 'topleft' by default. See L.Control options for available values.

    collapsed + + +Boolean + + + + + + true + + + + + optional + + + + + +

    Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.

    ssl + + +Boolean + + + + + + true + + + + + optional + + + + + +

    use of ssl or not (default true, service requested using https protocol)

    exclusions + + +Object + + + + + + {"toll" : false, "tunnel" : false, "bridge" : false} + + + + + optional + + + + + +

    list of exclusions with status (true = checked), by default : ["toll":false, "tunnel":false, "bridge":false].

    graphs + + +Array + + + + + + ["Voiture", "Pieton"] + + + + + optional + + + + + +

    list of graph resources to be used for isocurve calculation, by default : ["Voiture", "Pieton"]. The first element is selected.

    methods + + +Array + + + + + + ["time", "distance"] + + + + + optional + + + + + +

    list of methods, by default : ["time", "distance"]. The first element is selected by default.

    directions + + +Array + + + + + + ["departure", "arrival"] + + + + + optional + + + + + +

    list of directions to be displayed, by default : ["departure", "arrival"]. The first element is selected by default.
    +Directions enable to specify if input location point will be used as a departure point ("departure") or as an arrival point ("arrival")

    disableReverse + + +Boolean + + + + + + false + + + + + optional + + + + + +

    whether to enable/disable the reverse geocoding

    isocurveOptions + + +Object + + + + + + {} + + + + + optional + + + + + +

    isocurve service options. see Gp.Services.isoCurve

    autocompleteOptions + + +Object + + + + + + {} + + + + + optional + + + + + +

    autocomplete service options. see Gp.Services.autoComplete

    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +Object + +
    + + + + + +
    Example
    + + + +
    var iso = L.geoportalControl.Isocurve({
    +     collapsed : false
    +     methods : ["time", "distance"],
    +     exclusions : {
    +        toll : true,
    +        bridge : false,
    +        tunnel : true
    +     },
    +     graphs : ["Pieton", "Voiture"],
    +     isocurveOptions : {},
    +     autocompleteOptions : {}
    + });
    + + + +
    + + + +
    +
    +

    + + staticLayerSwitcher(options){L.geoportalControl.LayerSwitcher} +

    + + +
    + Leaflet/Controls/Controls.js, line 20 +
    + +
    + + +
    +
    + + +
    +

    Factory function for LayerSwitcher Control creation.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    options + + +Object + + + + + +

    options for function call.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDefaultDescription
    position + + +String + + + + + + + + + optional + + + + + +

    position of component into the map, 'topleft' by default. See L.Control options for available values.

    collapsed + + +Boolean + + + + + + true + + + + + optional + + + + + +

    collapse mode, false by default

    layers + + +Array + + + + + + + + + optional + + + + + +

    list of layers to be configured. Each array element is an object, with following properties :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    layer + + +Object + + + + + + + optional + + + + + +

    layer object

    display + + +Boolean + + + + + + + optional + + + + + +

    display layer in widget layer list

    config + + +Object + + + + + + + optional + + + + + +

    layer display config

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    visibility + + +String + + + + + + + optional + + + + + +

    layer visibility on map

    title + + +String + + + + + + + optional + + + + + +

    layer alias, to be displayed in widget layer list. E.g. : "Cartes IGN"

    description + + +String + + + + + + + optional + + + + + +

    layer description, to be displayed on title hover, or in layer information panel.

    quicklookUrl + + +String + + + + + + + optional + + + + + +

    link to a quick look image for this layer.

    legends + + +Array + + + + + + + optional + + + + + +

    array of layer legends. Each array element is an object, with following properties :
    +- url (String, mandatory) : link to a legend
    +- minScaleDenominator (Number, optional) : min scale denominator for legend validity.

    metadata + + +Array + + + + + + + optional + + + + + +

    array of layer metadata. Each array element is an object, with property url (String, mandatory) : link to a metadata

    + +
    + +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +Object + +
    + + + + + +
    Example
    + + + +
    layers = [
    +     {
    +         layer : wms1,
    +         display : false,
    +         config : {
    +             title : "test layer name 1",
    +             description : "test layer desc 1",
    +         }
    +     }
    + ];
    +
    + options = {
    +     position : "topright",
    +     collapsed : true,
    +     layers : layers
    + };
    +
    + var layerSwitcher = L.geoportalControl.LayerSwitcher(options);
    + + + +
    + + + +
    +
    +

    + + staticMousePosition(options){L.geoportalControl.MousePosition} +

    + + +
    + Leaflet/Controls/Controls.js, line 104 +
    + +
    + + +
    +
    + + +
    +

    Factory function for Geoportal MousePosition Control creation.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    options + + +Object + + + + + +

    options for function call.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDefaultDescription
    apiKey + + +String + + + + + + + + + optional + + + + + +

    API key. The "calcul" key is used by default.

    position + + +String + + + + + + + + + optional + + + + + +

    position of component into the map, 'bottomleft' by default. See L.Control options for available values.

    collapsed + + +Boolean + + + + + + true + + + + + optional + + + + + +

    collapse mode, false by default

    ssl + + +Boolean + + + + + + true + + + + + optional + + + + + +

    use of ssl or not (default true, service requested using https protocol)

    systems + + +Array + + + + + + + + + optional + + + + + +

    list of projection systems, GEOGRAPHIC, MERCATOR, LAMB93 and LAMB2E by default
    +Each array element (=system) is an object with following properties :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    crs + + +String + + + + + + + + + + +

    Proj4 crs alias (from proj4 defs). e.g. : "EPSG:4326". Required

    label + + +String + + + + + + + optional + + + + + +

    CRS label to be displayed in control. Default is crs code (e.g. "EPSG:4326")

    type + + +String + + + + + + + optional + + + + + +

    CRS units type for coordinates conversion : "Geographical" or "Metric". Default: "Metric"

    geoBBox + + +Object + + + + + + + optional + + + + + +

    Aera covered by the system (WGS84 coordinates).

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    right + + +Number + + + + + +

    Right bound.

    left + + +Number + + + + + +

    Left bound.

    top + + +Number + + + + + +

    Top bound.

    bottom + + +Number + + + + + +

    Bottom bound.

    + +
    + +
    units + + +Array + + + + + + + + + optional + + + + + +

    list of units by system, Geographical and Metric by default
    +Values may be "DEC" (decimal degrees), "DMS" (sexagecimal), "RAD" (radians) and "GON" (grades) for geographical coordinates,
    +and "M" or "KM" for metric coordinates

    displayAltitude + + +Boolean + + + + + + true + + + + + optional + + + + + +

    active/desactivate the altitude panel, if desactivate, have just the coordinate panel, true by default

    displayCoordinates + + +Boolean + + + + + + true + + + + + optional + + + + + +

    active/desactivate the coordinate panel, if desactivate, have just the altitude panel, true by default

    editCoordinates + + +Boolean + + + + + + false + + + + + optional + + + + + +

    If true, coordinates from the MousePosition control can be edited by users to re-center the view. False by default.

    altitude + + +Object + + + + + + + + + optional + + + + + +

    elevation configuration

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    serviceOptions + + +Object + + + + + + + optional + + + + + +

    options of elevation service. see Gp.Services.getAltitude

    responseDelay + + +Number + + + + + + + optional + + + + + +

    latency for altitude request, 500 ms by default

    triggerDelay + + +Number + + + + + + + optional + + + + + +

    immobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default

    noDataValue + + +Number + + + + + + + optional + + + + + +

    value used for altitude service no data (default is -99999). In this case, "---m" will be displayed instead of "-99999m"

    noDataValueTolerance + + +Number + + + + + + + optional + + + + + +

    tolerance for no data value :
    +values in [noDataValue - noDataValueTolerance ; noDataValue + noDataValueTolerance] interval will not be displayed, but "---m" will be displayed instead.
    +Default is 90000

    + +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +Object + +
    + + + + + +
    Example
    + + + +
    var MousePosition = L.geoportalControl.MousePosition({
    +     position : 'bottomleft',
    +     collapsed : false,
    +     displayAltitude : true,
    +     editCoordinates : false,
    +     altitude : {
    +          triggerDelay : 100,
    +          responseDelay : 500,
    +          noDataValue : -99999,
    +          noDataValueTolerance : 90000,
    +          serviceOptions : {}
    +     },
    +     systems : [
    +      {
    +         crs : L.CRS.EPSG4326,
    +         label : "Lon,Lat",
    +         type : "Geographical"
    +       },
    +      {
    +         crs : L.geoportalCRS.EPSG2154,
    +         label : "Lambert 93",
    +         type : "Metric"
    +       }
    +     ],
    +     units : ["DEC", "DMS"]
    + });
    + + + +
    + + + +
    +
    +

    + + staticReverseGeocode(options){L.geoportalControl.ReverseGeocode} +

    + + +
    + Leaflet/Controls/Controls.js, line 172 +
    + +
    + + +
    +
    + + +
    +

    Factory function for Geoportal ReverseGeocode Control creation.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    options + + +Object + + + + + +

    ReverseGeocoding control options

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDefaultDescription
    apiKey + + +String + + + + + + + + + optional + + + + + +

    API key for services call (reverse geocode service). The "calcul" key is used by default.

    position + + +String + + + + + + + + + optional + + + + + +

    position of component into the map, 'topleft' by default. See L.Control options for available values.

    collapsed + + +Boolean + + + + + + true + + + + + optional + + + + + +

    Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.

    ssl + + +Boolean + + + + + + true + + + + + optional + + + + + +

    use of ssl or not (default true, service requested using https protocol)

    resources + + +Array + + + + + + ["StreetAddress", "PositionOfInterest", "CadastralParcel"] + + + + + optional + + + + + +

    resources for geocoding, by default : ["StreetAddress", "PositionOfInterest"]

    delimitations + + +Array + + + + + + ["Point", "Circle", "Extent"] + + + + + optional + + + + + +

    delimitations for reverse geocoding, by default : ["Point", "Circle", "Extent"]

    ReverseGeocodeOptions + + +Object + + + + + + {} + + + + + optional + + + + + +

    reverse geocode service options. see Gp.Services.reverseGeocode to know all reverse geocode options.

    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Fires:
    + + + + + + + + + + + + + + +
    Returns:
    +Object + +
    + + + + + +
    Example
    + + + +
    var reverse = L.geoportalControl.ReverseGeocode({
    +     collapsed : false,
    +     position : "topright",
    +     resources : ["StreetAddress", "PositionOfInterest"],
    +     delimitations : ["Point", "Circle"],
    +     reverseGeocodeOptions : {}
    + });
    +reverse.on("reverse:onclickresult", function (e) {
    +  console.log(e.data):
    +});
    + + + +
    + + + +
    +
    +

    + + staticRoute(options){L.geoportalControl.Route} +

    + + +
    + Leaflet/Controls/Controls.js, line 205 +
    + +
    + + +
    +
    + + +
    +

    Factory function for Geoportal Route Control creation.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    options + + +Object + + + + + +

    options for function call.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDefaultDescription
    apiKey + + +String + + + + + + + + + optional + + + + + +

    API key. The "calcul" key is used by default.

    position + + +String + + + + + + "topleft" + + + + + optional + + + + + +

    position of component into the map, 'topleft' by default. See L.Control options for available values.

    collapsed + + +Boolean + + + + + + false + + + + + optional + + + + + +

    collapse mode, false by default

    ssl + + +Boolean + + + + + + true + + + + + optional + + + + + +

    use of ssl or not (default true, service requested using https protocol)

    disableReverse + + +Boolean + + + + + + false + + + + + optional + + + + + +

    whether to enable/disable the reverse geocoding when entering points.
    +Active by default. But, you can disable it when entering with the "ctrl" key on the keyboard

    exclusions + + +Object + + + + + + {"toll" : false, "tunnel" : false, "bridge" : false} + + + + + optional + + + + + +

    list of exclusions with status

    graphs + + +Array + + + + + + ["Voiture", "Pieton"] + + + + + optional + + + + + +

    list of resources, by default : ["Voiture", "Pieton"], and the first element is selected.

    autocompleteOptions + + +Object + + + + + + {} + + + + + optional + + + + + +

    options of autocomplete service. see Gp.Services.autoComplete

    routeOptions + + +Object + + + + + + {} + + + + + optional + + + + + +

    options of route service. see Gp.Services.route

    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +Object + +
    + + + + + +
    Example
    + + + +
    var route = L.geoportalControl.Route({
    +     position : "topright",
    +     collapsed : true,
    +     exclusions : {
    +        "toll" : true,
    +        "bridge" : false,
    +        "tunnel" : true
    +     },
    +     graphs : ['Pieton', 'Voiture'],
    +     autocompleteOptions : {},
    +     routeOptions : {}
    + });
    + + + +
    + + + +
    +
    +

    + + staticSearchEngine(options){L.geoportalControl.SearchEngine} +

    + + +
    + Leaflet/Controls/Controls.js, line 242 +
    + +
    + + +
    +
    + + +
    +

    Factory function for Geoportal SearchEngine Control creation.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    options + + +Object + + + + + +

    control options

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDefaultDescription
    apiKey + + +String + + + + + + + + + optional + + + + + +

    API key. The "calcul" key is used by default.

    collapsed + + +Boolean + + + + + + false + + + + + optional + + + + + +

    collapse mode

    ssl + + +Boolean + + + + + + true + + + + + optional + + + + + +

    use of ssl or not (default true, service requested using https protocol)

    position + + +String + + + + + + "topleft" + + + + + optional + + + + + +

    position of component into the map. See L.Control options for available values.

    placeholder + + +String + + + + + + "Rechercher un lieu, une adresse" + + + + + optional + + + + + +

    set placeholder in search bar

    displayMarker + + +Boolean + + + + + + true + + + + + optional + + + + + +

    set a marker on search result

    markerStyle + + +String +| + +Object + + + + + + "blue" + + + + + optional + + + + + +

    set a marker style. Currently possible values are "blue" (default value), "orange", "red" and "green". But you can use an L.Icon object (see L.Icon )

    displayInfo + + +Boolean + + + + + + true + + + + + optional + + + + + +

    get informations on popup marker

    zoomTo + + +String +| + +Numeric +| + +function + + + + + + + + + optional + + + + + +

    zoom to results, by default, current zoom.
    +possible values : "auto", any fixed zoom level or a function retruning a zoom :

    +
      ```
    +  zoomTo : function (info) {
    +      // do some stuff...
    +      return zoom; // required : return the zoom level !
    +  }
    +
    +  With parameter 'info' : {
    +      type : "PositionOfInterest" | "StreetAddress" | ...
    +      service : "SuggestedLocation" | "GeocodedLocation"
    +      fields : { // fields of service response }
    +  }
    +  ```
    +
    apiKey + + +String + + + + + + + + + optional + + + + + +

    API key. The "calcul" key is used by default.

    resources + + +Object + + + + + + + + + optional + + + + + +

    resources to be used by geocode and autocompletion services, by default : ["StreetAddress", "PositionOfInterest"]

    displayAdvancedSearch + + +Boolean + + + + + + + + + optional + + + + + +

    False to disable advanced search tools (it will not be displayed). Default is true (displayed)

    advancedSearch + + +Object + + + + + + + + + optional + + + + + +

    advanced search for geocoding (filters)

    geocodeOptions + + +Object + + + + + + + + + optional + + + + + +

    options of geocode service. see Gp.Services.geocode

    autocompleteOptions + + +Object + + + + + + + + + optional + + + + + +

    options of autocomplete service. see Gp.Services.autoComplete

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDefaultDescription
    serviceOptions + + +Object + + + + + + + + + optional + + + + + +

    options of autocomplete service

    triggerGeocode + + +Boolean + + + + + + false + + + + + optional + + + + + +

    trigger a geocoding request if the autocompletion does not return any suggestions, false by default

    triggerDelay + + +Number + + + + + + 1000 + + + + + optional + + + + + +

    waiting time before sending the geocoding request, 1000ms by default

    + +
    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Fires:
    + + + + + + + + + + + + + + +
    Returns:
    +Object + +
    + + + + + +
    Example
    + + + +
    var SearchEngine = L.geoportalControl.SearchEngine({
    +     position : "topright",
    +     collapsed : true,
    +     zoomTo : "auto",
    +     displayInfo : true,
    +     displayAdvancedSearch : true,
    +     resources : ["PositionOfInterest", "StreetAddress"],
    +     advancedSearch : {
    +         PositionOfInterest : [{name : "municipality", title : "Ville"}],
    +         StreetAddress : [{...}],
    +         CadastralParcel : null,
    +     },
    +     apiKey : "zfgzrgffg57rfg8ar7gr4g5r4",
    +     geocodeOptions : {},
    +     autocompleteOptions : {}
    + });
    + SearchEngine.on("searchengine:autocomplete:click", function (e) {
    +  console.log(e.data):
    + });
    + SearchEngine.on("searchengine:geocode:click", function (e) {
    +  console.log(e.data):
    + });
    + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-Draggable.html b/leaflet-2.3.4/jsdoc/module-Draggable.html new file mode 100644 index 000000000..90b52807a --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-Draggable.html @@ -0,0 +1,2161 @@ + + + + + + + + + + + + + Module: Draggable + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: Draggable

    + + + + +
    + + +

    + [private] Draggable +

    + + + + +
    +
    + + + + +

    ...

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    dragElement();
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + innerdragElement(element, header, container) +

    + + +
    + Common/Utils/Draggable.js, line 15 +
    + +
    + + +
    +
    + + +
    +

    A draggable HTML element with JavaScript and CSS.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    element + + +DOMElement + + + + + +

    element

    header + + +DOMElement + + + + + +

    header (optional)

    container + + +DOMElement + + + + + +

    container (optional)

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    See:
    +
    + +
    + + + +
    + + + + + + + + + + + + + +
    Example
    + + + +
    // CSS :
    +      // #element { position: absolute; }
    +  // HTML :
    +      // 
    + //
    + // + //
    + // JS : + var element = document.getElementById("element"); + Draggable.dragElement(element, header, container);
    + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-Gp.html b/leaflet-2.3.4/jsdoc/module-Gp.html new file mode 100644 index 000000000..33f018e9b --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-Gp.html @@ -0,0 +1,2439 @@ + + + + + + + + + + + + + Module: Gp + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: Gp

    + + + + +
    + + +

    + Gp +

    + + + + +
    +
    + + + + +

    This is the global variable that is exposed in the browser environment.
    +Content is composed of constructor, functions and properties...

    +
    +

    Config: (...)

    +
    +
    +

    ColorUtils: (...)
    +LayerUtils: (...)
    +MathUtils: (...)
    +ProxyUtils: (...)
    +Logger: (...)

    +
    +
    +

    LExtended: (...)

    +
    +
    +

    leafletExtDate: "YYYY-MM-DD"
    +leafletExtVersion: "X.X.X"

    +
    +
    +

    Error: (...)
    +Helper: (...)
    +Protocols: (...)
    +Services: (...)
    +servicesDate: "YYYY-MM-DD"
    +servicesVersion: "X.X.X"

    +
    +

    The following variables are aslo global :

    +
      +
    • proj4,
    • +
    • L
    • +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +
    +

    staticmodule:Gp.Error

    +
    + + +
    +
    + +
    +

    Error

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    See:
    +
    + +
    + + + +
    + + + +
    + + + +
    +
    +

    staticmodule:Gp.Helper

    +
    + + +
    +
    + +
    +

    Helper

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    See:
    +
    + +
    + + + +
    + + + +
    + + + +
    +
    +

    static,constantmodule:Gp.leafletExtDate

    +
    + + +
    +
    + +
    +

    Publication date

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    +
    +

    static,constantmodule:Gp.leafletExtVersion

    +
    + + +
    +
    + +
    +

    Version

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    +
    +

    staticmodule:Gp.LExtended

    +
    + + +
    +
    + +
    +

    Expose extensions leaflet extended

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    +
    +

    staticmodule:Gp.Protocols

    +
    + + +
    +
    + +
    +

    Protocols

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    See:
    +
    + +
    + + + +
    + + + +
    + + + +
    +
    +

    staticmodule:Gp.Services

    +
    + + +
    +
    + +
    +

    Services

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    See:
    +
    + +
    + + + +
    + + + +
    + + + +
    +
    +

    staticmodule:Gp.servicesDate

    +
    + + +
    +
    + +
    +

    servicesDate

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    See:
    +
    + +
    + + + +
    + + + +
    + + + +
    +
    +

    staticmodule:Gp.servicesVersion

    +
    + + +
    +
    + +
    +

    servicesVersion

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    See:
    +
    + +
    + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-LayerUtils.html b/leaflet-2.3.4/jsdoc/module-LayerUtils.html new file mode 100644 index 000000000..d38ad9101 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-LayerUtils.html @@ -0,0 +1,2536 @@ + + + + + + + + + + + + + Module: LayerUtils + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: LayerUtils

    + + + + +
    + + +

    + Gp.LayerUtils +

    + + + + +
    +
    + + + + +

    ...

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    getZoomLevelFromScaleDenominator();
    +getAttributions();
    +intersects();
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + innergetAttributions(params){Object} +

    + + +
    + Common/Utils/LayerUtils.js, line 184 +
    + +
    + + +
    +
    + + +
    +

    Get attributions list for a layer, based on current zoom and extent

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    params + + +Object + + + + + +

    function params

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    extent + + +Array.<Float> + + + + + +

    map current geographical extent (EPSG:4326) : [top, left, bottom, right] = [maxy, minx, miny, maxx]

    zoom + + +Number + + + + + +

    map current zoom

    crs + + +String + + + + + +

    map current projection code (ex "EPSG:2154")

    visibility + + +Boolean + + + + + +

    layer visibility

    originators + + +Gp.Services.Config.Originator + + + + + +

    resource originators (from Gp.Config.layers[].originators)

    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +- associative array, mapping originators url (keys) with their properties : html attributions elements +
    + + + + + +
    + + + +
    +
    +

    + + innergetZoomLevelFromScaleDenominator(scaleDenominator, crs){Integer} +

    + + +
    + Common/Utils/LayerUtils.js, line 14 +
    + +
    + + +
    +
    + + +
    +

    Obtenir le ZoomLevel à partir du ScaleDenominator

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    scaleDenominator + + +Number + + + + + +

    the scale denominator

    crs + + +String + + + + + +

    the crs

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +level +
    + + + + + +
    + + + +
    +
    +

    + + innerintersects(extent1, extent2){Boolean} +

    + + +
    + Common/Utils/LayerUtils.js, line 300 +
    + +
    + + +
    +
    + + +
    +

    Determines if one extent (extent1) intersects another (extent2)

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    extent1 + + +Array.<Float> + + + + + +

    First extent : [top, left, bottom, right] = [maxy, minx, miny, maxx]

    extent2 + + +Array.<Float> + + + + + +

    Second extent : [top, left, bottom, right] = [maxy, minx, miny, maxx]

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +- True if the two extents intersect, false otherwise. +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-Layers.html b/leaflet-2.3.4/jsdoc/module-Layers.html new file mode 100644 index 000000000..a9173e125 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-Layers.html @@ -0,0 +1,2778 @@ + + + + + + + + + + + + + Module: Layers + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: Layers

    + + + + +
    + + +

    + L.geoportalLayer +

    + + + + +
    +
    + + + + +

    Geoportal Layers Factory to be used together with Leaflet Maps.

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    var map = L.Map(...) ;
    +var layer = L.geoportalLayer.WMTS({
    +     layer : "ORTHOIMAGERY.ORTHOPHOTOS",
    +}).addTo(map) ;
    + + + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +
    +

    innerLayersL.geoportalLayer

    +
    + + +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + +
    + + + +

    Methods

    + +
    + +
    +
    +

    + + staticWMS(options, settings){L.geoportalLayer.WMS} +

    + + +
    + Leaflet/Layers/Layers.js, line 88 +
    + +
    + + +
    +
    + + +
    +

    Factory function for Geoportal or INSPIRE WMS Layers creation.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    options + + +Object + + + + + + + + + + +

    options for function call.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    layer + + +String + + + + + + + + + + +

    layer name (e.g. "ORTHOIMAGERY.ORTHOPHOTOS")

    ssl + + +Boolean + + + + + + + optional + + + + + +

    if set true, enforce protocol https (only for nodejs)

    apiKey + + +String + + + + + + + optional + + + + + +

    access key to Geoportal platform, obtained here.

    + +
    settings + + +Object + + + + + + + optional + + + + + +

    other options for L.TileLayer.WMS function (see http://leafletjs.com/reference.html#tilelayer-wms-options)

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    legends + + +Array + + + + + + + optional + + + + + +

    Overloads the default legends objects associated to the layer

    metadata + + +Array + + + + + + + optional + + + + + +

    Overloads the default Metadata objects associated to the layer

    title + + +String + + + + + + + optional + + + + + +

    Overloads the default title of the layer

    description + + +String + + + + + + + optional + + + + + +

    Overloads the default description of the layer

    quicklookUrl + + +String + + + + + + + optional + + + + + +

    Overloads the default quicklookUrl of the layer

    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +layer +
    + + + + + +
    Example
    + + + +
    var map = L.Map('divmap').setView();
    + var lyr = L.geoportalLayer.WMS(
    +   {
    +     layer : "OI.OrthoimageCoverage"
    +   },
    +   {
    +     opacity : 1,
    +     transparent : true,
    +     minZoom : 1,
    +     maxZoom : 21
    +     ...
    +   });
    +
    + lyr.addTo(map); // ou map.addLayer(lyr);
    + + + +
    + + + +
    +
    +

    + + staticWMTS(options, settings){L.geoportalLayer.WMTS} +

    + + +
    + Leaflet/Layers/Layers.js, line 198 +
    + +
    + + +
    +
    + + +
    +

    Factory function for Geoportal WMTS Layers creation.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    options + + +Object + + + + + + + + + + +

    options for function call.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    layer + + +String + + + + + + + + + + +

    layer name (e.g. "ORTHOIMAGERY.ORTHOPHOTOS")

    ssl + + +Boolean + + + + + + + optional + + + + + +

    if set true, enforce protocol https (only for nodejs)

    apiKey + + +String + + + + + + + optional + + + + + +

    free access key to Geoportal platform, obtained here.

    + +
    settings + + +Object + + + + + + + optional + + + + + +

    other options for L.TileLayer function (see http://leafletjs.com/reference.html#tilelayer-options)

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +layer +
    + + + + + +
    Example
    + + + +
    var map = L.Map('divmap').setView();
    + var lyr = L.geoportalLayer.WMTS(
    +   {
    +     layer : "ORTHOIMAGERY.ORTHOPHOTOS"
    +   },
    +   {
    +     opacity : 1,
    +     transparent : true,
    +     minZoom : 1,
    +     maxZoom : 21
    +     ...
    +   });
    +
    + lyr.addTo(map); // ou map.addLayer(lyr);
    + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-Leaflet_CRS_EPSG2154.html b/leaflet-2.3.4/jsdoc/module-Leaflet_CRS_EPSG2154.html new file mode 100644 index 000000000..11e96483f --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-Leaflet_CRS_EPSG2154.html @@ -0,0 +1,2018 @@ + + + + + + + + + + + + + Module: Leaflet/CRS/EPSG2154 + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: Leaflet/CRS/EPSG2154

    + + + + +
    + + +

    + L.geoportalCRS.EPSG2154 +

    + + +

    Leaflet Lambert 93 (EPSG:2154) ICRS compatible definition.

    + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    var map = L.Map('divmap', {
    +   crs : L.geoportalCRS.EPSG2154
    + }).setView();
    + var lyr = L.geoportalLayer.WMTS(
    +   {
    +     layer : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93"
    +   });
    +
    + lyr.addTo(map); // ou map.addLayer(lyr);
    + + + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +
    +

    innerEPSG2154L.geoportalCRS.EPSG2154

    +
    + + +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-Leaflet_CRS_EPSG27572.html b/leaflet-2.3.4/jsdoc/module-Leaflet_CRS_EPSG27572.html new file mode 100644 index 000000000..6044a4823 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-Leaflet_CRS_EPSG27572.html @@ -0,0 +1,2027 @@ + + + + + + + + + + + + + Module: Leaflet/CRS/EPSG27572 + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: Leaflet/CRS/EPSG27572

    + + + + +
    + + +

    + L.geoportalCRS.EPSG27572 +

    + + + + +
    +
    + + + + +

    Projection Lambert 2 étendu

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    var map = L.Map('divmap', {
    +   crs : L.geoportalCRS.EPSG27572
    + }).setView();
    + var lyr = L.geoportalLayer.WMTS(
    +   {
    +     layer : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93",
    +     apiKey : "wqxljfvklsdhvlfkjqfmlq787645"
    +   },
    +   {
    +     attribution : "test for layer ORTHOIMAGERY",
    +     opacity : 1,
    +     transparent : true,
    +     minZoom : 1,
    +     maxZoom : 21
    +     ...
    +   });
    +
    + lyr.addTo(map); // ou map.addLayer(lyr);
    + + + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +
    +

    innerEPSG27572L.geoportalCRS.EPSG27572

    +
    + + +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-LoggerByDefault.html b/leaflet-2.3.4/jsdoc/module-LoggerByDefault.html new file mode 100644 index 000000000..e9904b36d --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-LoggerByDefault.html @@ -0,0 +1,2251 @@ + + + + + + + + + + + + + Module: LoggerByDefault + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: LoggerByDefault

    + + + + +
    + + +

    + [private] LoggerByDefault +

    + + + + +
    +
    + + + + +

    ...

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    getLogger();
    +disableAll();
    +enableAll();
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + innerdisableAll() +

    + + +
    + Common/Utils/LoggerByDefault.js, line 40 +
    + +
    + + +
    +
    + + +
    +

    desactive tous les loggers

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + innerenableAll() +

    + + +
    + Common/Utils/LoggerByDefault.js, line 53 +
    + +
    + + +
    +
    + + +
    +

    active tous les loggers

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + innergetLogger(name){Object} +

    + + +
    + Common/Utils/LoggerByDefault.js, line 15 +
    + +
    + + +
    +
    + + +
    +

    creation d'un logger statique

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDefaultDescription
    name + + +String + + + + + + "default" + + + + + optional + + + + + +

    the logger name

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-MathUtils.html b/leaflet-2.3.4/jsdoc/module-MathUtils.html new file mode 100644 index 000000000..ffa99a0f6 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-MathUtils.html @@ -0,0 +1,2689 @@ + + + + + + + + + + + + + Module: MathUtils + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: MathUtils

    + + + + +
    + + +

    + Gp.MathUtils +

    + + + + +
    +
    + + + + +

    ...

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    modulo();
    +decimalToDMS();
    +toInteger();
    +isInteger();
    +toFloat();
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + innerdecimalToDMS(degrees, hemispheres, numDigits){Object} +

    + + +
    + Common/Utils/MathUtils.js, line 27 +
    + +
    + + +
    +
    + + +
    +

    Transform degrees, minutes, seconds form decimal degrees -
    +Largely inspired by the private function degreesToStringHDMS from ol/coordinate.js

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    degrees + + +Number + + + + + +

    decimal degrees

    hemispheres + + +Array + + + + + +

    "NS" ou "EO"

    numDigits + + +Number + + + + + +

    number of digits for seconds

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +coordinate +
    + + + + + +
    + + + +
    +
    +

    + + innerisInteger(s){Boolean} +

    + + +
    + Common/Utils/MathUtils.js, line 84 +
    + +
    + + +
    +
    + + +
    +

    check if s represents an integer

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    s + + +String + + + + + +

    string number

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +integer +
    + + + + + +
    + + + +
    +
    +

    + + innermodulo(a, b){Number} +

    + + +
    + Common/Utils/MathUtils.js, line 15 +
    + +
    + + +
    +
    + + +
    +

    Reste de la division euclidienne

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    a + + +Number + + + + + +

    divisor

    b + + +Number + + + + + +

    quotient

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + innertoFloat(s){null|Numeric} +

    + + +
    + Common/Utils/MathUtils.js, line 100 +
    + +
    + + +
    +
    + + +
    +

    Converts s to float

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    s + + +String + + + + + +

    string number

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + innertoInteger(s, base){null|Numeric} +

    + + +
    + Common/Utils/MathUtils.js, line 67 +
    + +
    + + +
    +
    + + +
    +

    Converts string to Integer

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    s + + +String + + + + + +

    string number

    base + + +Numeric + + + + + +

    between 2 and 36

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-Parser.html b/leaflet-2.3.4/jsdoc/module-Parser.html new file mode 100644 index 000000000..315cd8507 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-Parser.html @@ -0,0 +1,1966 @@ + + + + + + + + + + + + + Module: Parser + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: Parser

    + + + + +
    + + +

    + Gp.Parser +

    + + + + +
    +
    + + + + +

    ...

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    parse();
    +toString();
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-ProfileElevationPathDOM.html b/leaflet-2.3.4/jsdoc/module-ProfileElevationPathDOM.html new file mode 100644 index 000000000..5f3e9e4d1 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-ProfileElevationPathDOM.html @@ -0,0 +1,1957 @@ + + + + + + + + + + + + + Module: ProfileElevationPathDOM + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: ProfileElevationPathDOM

    + + + + +
    + + +

    + [private] ProfileElevationPathDOM +

    + + + + +
    +
    + + + + +

    create DOM element

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-ProxyUtils.html b/leaflet-2.3.4/jsdoc/module-ProxyUtils.html new file mode 100644 index 000000000..87cfc8f79 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-ProxyUtils.html @@ -0,0 +1,2212 @@ + + + + + + + + + + + + + Module: ProxyUtils + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: ProxyUtils

    + + + + +
    + + +

    + Gp.ProxyUtils +

    + + + + +
    +
    + + + + +

    ...

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    proxifyUrl();
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + innerproxifyUrl(url, proxyOptions){String} +

    + + +
    + Common/Utils/ProxyUtils.js, line 13 +
    + +
    + + +
    +
    + + +
    +

    Ajoute un proxy aux url des couches vecteurs si besoin.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    url + + +String + + + + + + + + + + +

    Url to proxify.

    proxyOptions + + +Object + + + + + + + optional + + + + + +

    Object defining proxy options.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    proxyUrl + + +String + + + + + + + + + + +

    Proxy URL.

    noProxyDomains + + +Array.<String> + + + + + + + optional + + + + + +

    Proxy will not be used for this list of domain names.

    + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +url +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-Register.html b/leaflet-2.3.4/jsdoc/module-Register.html new file mode 100644 index 000000000..337e6e874 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-Register.html @@ -0,0 +1,2632 @@ + + + + + + + + + + + + + Module: Register + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: Register

    + + + + +
    + + +

    + [private] Register +

    + + + + +
    +
    + + + + +

    Register definition for IGNF, and EPSG CRS.

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    Gp.Register.IGNF.AMST63
    +  // return : "+title=Amsterdam 1963 +proj=geocent +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs"
    +Gp.Register.get("IGNF:AMST63")
    +  // same as Gp.Register.IGNF.AMST63
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + innerexist(name){Boolean} +

    + + +
    + Common/Utils/Register.js, line 54 +
    + +
    + + +
    +
    + + +
    +

    does projection code exist ?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +String + + + + + +

    ie. EPSG:2154 (Lambert)

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Example
    + + + +
    Register.exist("EPSG:2154"); // true
    + + + +
    + + + +
    +
    +

    + + innerget(name){Object} +

    + + +
    + Common/Utils/Register.js, line 20 +
    + +
    + + +
    +
    + + +
    +

    get the definition for a code

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +String + + + + + +

    ie. EPSG:2154 (Lambert)

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Example
    + + + +
    Register.get("EPSG:2154");
    +// "+title=RGF93 / Lambert-93 +proj=lcc +lat_1=49 ..."
    + + + +
    + + + +
    +
    +

    + + innerload(Proj4) +

    + + +
    + Common/Utils/Register.js, line 87 +
    + +
    + + +
    +
    + + +
    +

    load all defs to proj4

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    Proj4 + + +Object + + + + + +

    proj4 instance

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + innerloadByDefault(Proj4) +

    + + +
    + Common/Utils/Register.js, line 126 +
    + +
    + + +
    +
    + + +
    +

    load defs by default to proj4

    +

    include into proj4 :

    +
      +
    • WGS84
    • +
    • ['EPSG:4326']
    • +
    • ['EPSG:3785'], ['EPSG:3857'], GOOGLE, ['EPSG:900913'], ['EPSG:102113']
    • +
    +
      +
    • +
    +
      +
    • ["EPSG:2154"], ["EPSG:27571"], ["EPSG:27572"], ["EPSG:27573"], ["EPSG:2757"],
    • +
    • ["CRS:84"],
    • +
    • ["IGNF:LAMB93"],
    • +
    • ["IGNF:LAMBE"], ["IGNF:LAMB1"], ["IGNF:LAMB2"], ["IGNF:LAMB3"], ["IGNF:LAMB4"],
    • +
    • ["IGNF:RGF93G"],
    • +
    • ["IGNF:WGS84G"]
    • +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    Proj4 + + +Object + + + + + +

    proj4 instance

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + innerloadByName(Proj4, name){Boolean} +

    + + +
    + Common/Utils/Register.js, line 182 +
    + +
    + + +
    +
    + + +
    +

    load only a def to proj4

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    Proj4 + + +Object + + + + + +

    proj4 instance

    name + + +String + + + + + +

    ie. EPSG:2154 (Lambert)

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-SearchEngineUtils.html b/leaflet-2.3.4/jsdoc/module-SearchEngineUtils.html new file mode 100644 index 000000000..62c035357 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-SearchEngineUtils.html @@ -0,0 +1,2168 @@ + + + + + + + + + + + + + Module: SearchEngineUtils + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: SearchEngineUtils

    + + + + +
    + + +

    + [private] SearchEngineUtils +

    + + + + +
    +
    + + + + +

    ...

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    advancedSearchFiltersByDefault();
    +zoomToResultsByDefault();
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + inneradvancedSearchFiltersByDefault() +

    + + +
    + Common/Utils/SearchEngineUtils.js, line 12 +
    + +
    + + +
    +
    + + +
    +

    Advanced Search Filters by default

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + innerzoomToResultsByDefault(info){Integer} +

    + + +
    + Common/Utils/SearchEngineUtils.js, line 98 +
    + +
    + + +
    +
    + + +
    +

    Provides default zoom based on results.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    info + + +Object + + + + + +

    location information

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +level +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-SelectorID.html b/leaflet-2.3.4/jsdoc/module-SelectorID.html new file mode 100644 index 000000000..1f0ff7a19 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-SelectorID.html @@ -0,0 +1,2413 @@ + + + + + + + + + + + + + Module: SelectorID + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: SelectorID

    + + + + +
    + + +

    + [private] SelectorID +

    + + + + +
    +
    + + + + +

    formalisme d'un tag ID :
    +-> NAME(_ORDER)-1460636385836

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    Ex.
    +  GProutePoints-1460636385836
    +  GProutePoint_10-1460636385836
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + innergenerate() +

    + + +
    + Common/Utils/SelectorID.js, line 15 +
    + +
    + + +
    +
    + + +
    +

    Construction d'un identifiant statique basé sur le timestamp,
    +et qui s'incremente de +1 à chaque appel

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + innerindex(id){String} +

    + + +
    + Common/Utils/SelectorID.js, line 46 +
    + +
    + + +
    +
    + + +
    +

    numero d'identifiant du tag

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    id + + +String + + + + + +

    the id

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + innername(id){String} +

    + + +
    + Common/Utils/SelectorID.js, line 27 +
    + +
    + + +
    +
    + + +
    +

    nom du tag

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    id + + +String + + + + + +

    the id

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + inneruuid(id){String} +

    + + +
    + Common/Utils/SelectorID.js, line 67 +
    + +
    + + +
    +
    + + +
    +

    uuid du tag

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    id + + +String + + + + + +

    the id

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/module-Utils.html b/leaflet-2.3.4/jsdoc/module-Utils.html new file mode 100644 index 000000000..f3a1b7ea7 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/module-Utils.html @@ -0,0 +1,2363 @@ + + + + + + + + + + + + + Module: Utils + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    +

    Geoportal Extension for Leaflet API Reference

    +
    +
    + + +
    + + + + + +
    + +

    Module: Utils

    + + + + +
    + + +

    + Gp.olUtils +

    + + + + +
    +
    + + + + +

    ...

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    Example

    + + + +
    detectSupport();
    +assign();
    +mergeParams();
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +
    +

    + + innerassign(dest, source){Object} +

    + + +
    + Common/Utils.js, line 46 +
    + +
    + + +
    +
    + + +
    +

    Copies all source object members to dest

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    dest + + +Object + + + + + +

    destination object where properties and method will be copied

    source + + +Object + + + + + +

    source object from which properties and method will be copied

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +

    + + innerdetectSupport(){Boolean} +

    + + +
    + Common/Utils.js, line 14 +
    + +
    + + +
    +
    + + +
    +

    this method is called by the constructor.
    +this information is useful to switch to touch mode.
    +Detection : test for desktop or tactile

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Returns:
    +- true for desktop userAgent, false for mobile +
    + + + + + +
    + + + +
    +
    +

    + + innermergeParams(dest, source, replace) +

    + + +
    + Common/Utils.js, line 64 +
    + +
    + + +
    +
    + + +
    +

    Merge two objects parameters (deeper than assign)

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    dest + + +Object + + + + + +

    destination object where properties and method will be merge

    source + + +Object + + + + + +

    source object from which properties and method will be merge

    replace + + +Boolean + + + + + +

    replace destination value by source if exists or not (true by default)

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + +
    +
    + +
    + Geoportail - Copyright (c) IGN, released under the CECILL-B license +
    + Documentation generated by JSDoc 3.6.11 on Wed Aug 30 2023 16:05:40 GMT+0000 (Coordinated Universal Time) +
    + + + + + + + \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/scripts/bootstrap.min.js b/leaflet-2.3.4/jsdoc/scripts/bootstrap.min.js new file mode 100644 index 000000000..1a6258efc --- /dev/null +++ b/leaflet-2.3.4/jsdoc/scripts/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.0.3 (http://getbootstrap.com) + * Copyright 2013 Twitter, Inc. + * Licensed under http://www.apache.org/licenses/LICENSE-2.0 + */ + +if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]'),b=!0;if(a.length){var c=this.$element.find("input");"radio"===c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?b=!1:a.find(".active").removeClass("active")),b&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}b&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file diff --git a/leaflet-2.3.4/jsdoc/scripts/jquery.min.js b/leaflet-2.3.4/jsdoc/scripts/jquery.min.js new file mode 100644 index 000000000..9a85bd346 --- /dev/null +++ b/leaflet-2.3.4/jsdoc/scripts/jquery.min.js @@ -0,0 +1,6 @@ +/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery.min.map +*/ +(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.3",f=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:p,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(s){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return f.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}t=x(o),function(e,undefined){var t,n,r,i,o,s,a,u,l,c,p,f,h,d,g,m,y,v="sizzle"+-new Date,b=e.document,w=0,T=0,C=st(),k=st(),N=st(),E=!1,S=function(e,t){return e===t?(E=!0,0):0},j=typeof undefined,D=1<<31,A={}.hasOwnProperty,L=[],q=L.pop,H=L.push,O=L.push,F=L.slice,P=L.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",$=W.replace("w","w#"),B="\\["+M+"*("+W+")"+M+"*(?:([*^$|!~]?=)"+M+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+$+")|)|)"+M+"*\\]",I=":("+W+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+B.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=RegExp("^"+M+"*,"+M+"*"),X=RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=RegExp(M+"*[+~]"),Y=RegExp("="+M+"*([^\\]'\"]*)"+M+"*\\]","g"),V=RegExp(I),G=RegExp("^"+$+"$"),J={ID:RegExp("^#("+W+")"),CLASS:RegExp("^\\.("+W+")"),TAG:RegExp("^("+W.replace("w","w*")+")"),ATTR:RegExp("^"+B),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:RegExp("^(?:"+R+")$","i"),needsContext:RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/^(?:input|select|textarea|button)$/i,et=/^h\d$/i,tt=/'|\\/g,nt=RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{O.apply(L=F.call(b.childNodes),b.childNodes),L[b.childNodes.length].nodeType}catch(it){O={apply:L.length?function(e,t){H.apply(e,F.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function ot(e,t,r,i){var o,s,a,u,l,f,g,m,x,w;if((t?t.ownerDocument||t:b)!==p&&c(t),t=t||p,r=r||[],!e||"string"!=typeof e)return r;if(1!==(u=t.nodeType)&&9!==u)return[];if(h&&!i){if(o=K.exec(e))if(a=o[1]){if(9===u){if(s=t.getElementById(a),!s||!s.parentNode)return r;if(s.id===a)return r.push(s),r}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&y(t,s)&&s.id===a)return r.push(s),r}else{if(o[2])return O.apply(r,t.getElementsByTagName(e)),r;if((a=o[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&(!d||!d.test(e))){if(m=g=v,x=t,w=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){f=gt(e),(g=t.getAttribute("id"))?m=g.replace(tt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",l=f.length;while(l--)f[l]=m+mt(f[l]);x=U.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return O.apply(r,x.querySelectorAll(w)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,r,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>i.cacheLength&&delete t[e.shift()],t[n]=r}return t}function at(e){return e[v]=!0,e}function ut(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),r=e.length;while(r--)i.attrHandle[n[r]]=t}function ct(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return at(function(t){return t=+t,at(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},n=ot.support={},c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:b,r=t.defaultView;return t!==p&&9===t.nodeType&&t.documentElement?(p=t,f=t.documentElement,h=!s(t),r&&r.attachEvent&&r!==r.top&&r.attachEvent("onbeforeunload",function(){c()}),n.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ut(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=ut(function(e){return e.innerHTML="
    ",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),n.getById=ut(function(e){return f.appendChild(e).id=v,!t.getElementsByName||!t.getElementsByName(v).length}),n.getById?(i.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete i.find.ID,i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=n.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):undefined}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==j&&h?t.getElementsByClassName(e):undefined},g=[],d=[],(n.qsa=Q.test(t.querySelectorAll))&&(ut(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll(":checked").length||d.push(":checked")}),ut(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&d.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")})),(n.matchesSelector=Q.test(m=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ut(function(e){n.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",I)}),d=d.length&&RegExp(d.join("|")),g=g.length&&RegExp(g.join("|")),y=Q.test(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},S=f.compareDocumentPosition?function(e,r){if(e===r)return E=!0,0;var i=r.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(r);return i?1&i||!n.sortDetached&&r.compareDocumentPosition(e)===i?e===t||y(b,e)?-1:r===t||y(b,r)?1:l?P.call(l,e)-P.call(l,r):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,s=n.parentNode,a=[e],u=[n];if(e===n)return E=!0,0;if(!o||!s)return e===t?-1:n===t?1:o?-1:s?1:l?P.call(l,e)-P.call(l,n):0;if(o===s)return ct(e,n);r=e;while(r=r.parentNode)a.unshift(r);r=n;while(r=r.parentNode)u.unshift(r);while(a[i]===u[i])i++;return i?ct(a[i],u[i]):a[i]===b?-1:u[i]===b?1:0},t):p},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Y,"='$1']"),!(!n.matchesSelector||!h||g&&g.test(t)||d&&d.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return ot(t,p,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},ot.attr=function(e,t){(e.ownerDocument||e)!==p&&c(e);var r=i.attrHandle[t.toLowerCase()],o=r&&A.call(i.attrHandle,t.toLowerCase())?r(e,t,!h):undefined;return o===undefined?n.attributes||!h?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null:o},ot.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,r=[],i=0,o=0;if(E=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(S),E){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return e},o=ot.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=ot.selectors={cacheLength:50,createPseudo:at,match:J,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[4]||e[5]||"").replace(nt,rt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ot.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return J.CHILD.test(e[0])?null:(e[3]&&e[4]!==undefined?e[2]=e[4]:n&&V.test(n)&&(t=gt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,y=a&&t.nodeName.toLowerCase(),x=!u&&!a;if(m){if(o){while(g){p=t;while(p=p[g])if(a?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&x){c=m[v]||(m[v]={}),l=c[e]||[],h=l[0]===w&&l[1],f=l[0]===w&&l[2],p=h&&m.childNodes[h];while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[w,h,f];break}}else if(x&&(l=(t[v]||(t[v]={}))[e])&&l[0]===w)f=l[1];else while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if((a?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(x&&((p[v]||(p[v]={}))[e]=[w,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return r[v]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var i,o=r(e,t),s=o.length;while(s--)i=P.call(e,o[s]),e[i]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(z,"$1"));return r[v]?at(function(e,t,n,i){var o,s=r(e,null,i,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:at(function(e){return G.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return et.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},i.pseudos.nth=i.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=pt(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=ft(t);function dt(){}dt.prototype=i.filters=i.pseudos,i.setFilters=new dt;function gt(e,t){var n,r,o,s,a,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);a=e,u=[],l=i.preFilter;while(a){(!n||(r=_.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(z," ")}),a=a.slice(n.length));for(s in i.filter)!(r=J[s].exec(a))||l[s]&&!(r=l[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ot.error(e):k(e,u).slice(0)}function mt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function yt(e,t,n){var i=t.dir,o=n&&"parentNode"===i,s=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,a){var u,l,c,p=w+" "+s;if(a){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,a))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[v]||(t[v]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,a)||r,l[1]===!0)return!0}}function vt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,s=[],a=0,u=e.length,l=null!=t;for(;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function bt(e,t,n,r,i,o){return r&&!r[v]&&(r=bt(r)),i&&!i[v]&&(i=bt(i,o)),at(function(o,s,a,u){var l,c,p,f=[],h=[],d=s.length,g=o||Ct(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:xt(g,f,e,a,u),y=n?i||(o?e:d||r)?[]:s:m;if(n&&n(m,y,a,u),r){l=xt(y,h),r(l,[],a,u),c=l.length;while(c--)(p=l[c])&&(y[h[c]]=!(m[h[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?P.call(o,p):f[c])>-1&&(o[l]=!(s[l]=p))}}else y=xt(y===s?y.splice(d,y.length):y),i?i(null,s,y,u):O.apply(s,y)})}function wt(e){var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,c=yt(function(e){return e===t},a,!0),p=yt(function(e){return P.call(t,e)>-1},a,!0),f=[function(e,n,r){return!s&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>l;l++)if(n=i.relative[e[l].type])f=[yt(vt(f),n)];else{if(n=i.filter[e[l].type].apply(null,e[l].matches),n[v]){for(r=++l;o>r;r++)if(i.relative[e[r].type])break;return bt(l>1&&vt(f),l>1&&mt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&wt(e.slice(l,r)),o>r&&wt(e=e.slice(r)),o>r&&mt(e))}f.push(n)}return vt(f)}function Tt(e,t){var n=0,o=t.length>0,s=e.length>0,a=function(a,l,c,f,h){var d,g,m,y=[],v=0,x="0",b=a&&[],T=null!=h,C=u,k=a||s&&i.find.TAG("*",h&&l.parentNode||l),N=w+=null==C?1:Math.random()||.1;for(T&&(u=l!==p&&l,r=n);null!=(d=k[x]);x++){if(s&&d){g=0;while(m=e[g++])if(m(d,l,c)){f.push(d);break}T&&(w=N,r=++n)}o&&((d=!m&&d)&&v--,a&&b.push(d))}if(v+=x,o&&x!==v){g=0;while(m=t[g++])m(b,y,l,c);if(a){if(v>0)while(x--)b[x]||y[x]||(y[x]=q.call(f));y=xt(y)}O.apply(f,y),T&&!a&&y.length>0&&v+t.length>1&&ot.uniqueSort(f)}return T&&(w=N,u=C),b};return o?at(a):a}a=ot.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){t||(t=gt(e)),n=t.length;while(n--)o=wt(t[n]),o[v]?r.push(o):i.push(o);o=N(e,Tt(i,r))}return o};function Ct(e,t,n){var r=0,i=t.length;for(;i>r;r++)ot(e,t[r],n);return n}function kt(e,t,r,o){var s,u,l,c,p,f=gt(e);if(!o&&1===f.length){if(u=f[0]=f[0].slice(0),u.length>2&&"ID"===(l=u[0]).type&&n.getById&&9===t.nodeType&&h&&i.relative[u[1].type]){if(t=(i.find.ID(l.matches[0].replace(nt,rt),t)||[])[0],!t)return r;e=e.slice(u.shift().value.length)}s=J.needsContext.test(e)?0:u.length;while(s--){if(l=u[s],i.relative[c=l.type])break;if((p=i.find[c])&&(o=p(l.matches[0].replace(nt,rt),U.test(u[0].type)&&t.parentNode||t))){if(u.splice(s,1),e=o.length&&mt(u),!e)return O.apply(r,o),r;break}}}return a(e,f)(o,t,!h,r,U.test(e)),r}n.sortStable=v.split("").sort(S).join("")===v,n.detectDuplicates=E,c(),n.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(p.createElement("div"))}),ut(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||lt("type|href|height|width",function(e,t,n){return n?undefined:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ut(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||lt("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?undefined:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||lt(R,function(e,t,n){var r;return n?undefined:(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===!0?t.toLowerCase():null}),x.find=ot,x.expr=ot.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ot.uniqueSort,x.text=ot.getText,x.isXMLDoc=ot.isXML,x.contains=ot.contains}(e);var D={};function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,o,s,a=[],u=!e.once&&[],l=function(p){for(t=e.memory&&p,n=!0,s=i||0,i=0,o=a.length,r=!0;a&&o>s;s++)if(a[s].apply(p[0],p[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(u?u.length&&l(u.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&x.each(arguments,function(e,t){var n;while((n=x.inArray(t,a,n))>-1)a.splice(n,1),r&&(o>=n&&o--,s>=n&&s--)}),this},has:function(e){return e?x.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=u=t=undefined,this},disabled:function(){return!a},lock:function(){return u=undefined,t||c.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!a||n&&!u||(t=t||[],t=[e,t.slice?t.slice():t],r?u.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var s=o[0],a=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),s=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},a,u,l;if(r>1)for(a=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(s(t,l,n)).fail(o.reject).progress(s(t,u,a)):--i;return i||o.resolveWith(l,n),o.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),a=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=o.getElementsByTagName("body")[0];a&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var L,q,H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(x.isEmptyObject(o))x.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){var r;return t===undefined||t&&"string"==typeof t&&n===undefined?(r=this.get(e,t),r!==undefined?r:this.get(e,x.camelCase(t))):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),s=this.cache[o];if(t===undefined)this.cache[o]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):(i=x.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(w)||[])),n=r.length;while(n--)delete s[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}},L=new F,q=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||q.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return q.access(e,t,n)},_removeData:function(e,t){q.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],o=0,s=null;if(e===undefined){if(this.length&&(s=L.get(i),1===i.nodeType&&!q.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>o;o++)r=n[o].name,0===r.indexOf("data-")&&(r=x.camelCase(r.slice(5)),P(i,r,s[r]));q.set(i,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}});function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:H.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=q.get(e,t),n&&(!r||x.isArray(n)?r=q.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),s=function(){x.dequeue(e,t) +};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(function(){q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=undefined),e=e||"fx";while(s--)n=q.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var R,M,W=/[\t\r\n\f]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,o,s=0,a=this.length,u="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,i=0,o=x(this),s=e.match(w)||[];while(t=s[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===r||"boolean"===n)&&(this.className&&q.set(this,"__className__",this.className),this.className=this.className||e===!1?"":q.get(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=x.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,x(this).val()):e,null==i?i="":"number"==typeof i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;for(;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),s=i.length;while(s--)r=i[s],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,t,n){var i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===r?x.prop(e,t,n):(1===s&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.bool.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=x.find.attr(e,t),null==o?undefined:o):null!==n?i&&"set"in i&&(o=i.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!x.isXMLDoc(e),o&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],o=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle[t]=i,o}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}x.event={global:{},add:function(e,t,n,i,o){var s,a,u,l,c,p,f,h,d,g,m,y=q.get(e);if(y){n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=x.guid++),(l=y.events)||(l=y.events={}),(a=y.handle)||(a=y.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(a.elem,arguments)},a.elem=e),t=(t||"").match(w)||[""],c=t.length;while(c--)u=X.exec(t[c])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(f=x.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=x.event.special[d]||{},p=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:g.join(".")},s),(h=l[d])||(h=l[d]=[],h.delegateCount=0,f.setup&&f.setup.call(e,i,g,a)!==!1||e.addEventListener&&e.addEventListener(d,a,!1)),f.add&&(f.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,p):h.push(p),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,p,f,h,d,g,m=q.hasData(e)&&q.get(e);if(m&&(u=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(a=X.exec(t[l])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){p=x.event.special[h]||{},h=(r?p.delegateType:p.bindType)||h,f=u[h]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;while(o--)c=f[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));s&&!f.length&&(p.teardown&&p.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&(delete m.handle,q.remove(e,"events"))}},trigger:function(t,n,r,i){var s,a,u,l,c,p,f,h=[r||o],d=y.call(t,"type")?t.type:t,g=y.call(t,"namespace")?t.namespace.split("."):[];if(a=u=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),c=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),f=x.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!x.isWindow(r)){for(l=f.delegateType||d,_.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||o)&&h.push(u.defaultView||u.parentWindow||e)}s=0;while((a=h[s++])&&!t.isPropagationStopped())t.type=s>1?l:f.bindType||d,p=(q.get(a,"events")||{})[t.type]&&q.get(a,"handle"),p&&p.apply(a,n),p=c&&a[c],p&&x.acceptData(a)&&p.apply&&p.apply(a,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!x.acceptData(r)||c&&x.isFunction(r[d])&&!x.isWindow(r)&&(u=r[c],u&&(r[c]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,u&&(r[c]=u)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,o,s=[],a=d.call(arguments),u=(q.get(this,"events")||{})[e.type]||[],l=x.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),t=0;while((i=s[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((x.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",r[i]===undefined&&(r[i]=o.needsContext?x(i,this).index(u)>=0:x.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,s=e,a=this.fixHooks[i];a||(this.fixHooks[i]=a=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new x.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=o),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(o=r,r=function(e){return x().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=/^(?:parents|prev(?:Until|All))/,Q=x.expr.match.needsContext,K={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){var e=0;for(;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(et(this,e||[],!0))},filter:function(e){return this.pushStack(et(this,e||[],!1))},is:function(e){return!!et(this,"string"==typeof e&&Q.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],s=Q.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(s?s.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function Z(e,t){while((e=e[t])&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return Z(e,"nextSibling")},prev:function(e){return Z(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return e.contentDocument||x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(K[e]||x.unique(i),J.test(e)&&i.reverse()),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function et(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,nt=/<([\w:]+)/,rt=/<|&#?\w+;/,it=/<(?:script|style|link)/i,ot=/^(?:checkbox|radio)$/i,st=/checked\s*(?:[^=]|=\s*.checked.)/i,at=/^$|\/(?:java|ecma)script/i,ut=/^true\/(.*)/,lt=/^\s*\s*$/g,ct={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};ct.optgroup=ct.option,ct.tbody=ct.tfoot=ct.colgroup=ct.caption=ct.thead,ct.th=ct.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(mt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&dt(mt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(mt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!it.test(e)&&!ct[(nt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(tt,"<$1>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(x.cleanData(mt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=f.apply([],e);var r,i,o,s,a,u,l=0,c=this.length,p=this,h=c-1,d=e[0],g=x.isFunction(d);if(g||!(1>=c||"string"!=typeof d||x.support.checkClone)&&st.test(d))return this.each(function(r){var i=p.eq(r);g&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=x.map(mt(r,"script"),ft),s=o.length;c>l;l++)a=r,l!==h&&(a=x.clone(a,!0,!0),s&&x.merge(o,mt(a,"script"))),t.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,x.map(o,ht),l=0;s>l;l++)a=o[l],at.test(a.type||"")&&!q.access(a,"globalEval")&&x.contains(u,a)&&(a.src?x._evalUrl(a.src):x.globalEval(a.textContent.replace(lt,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=[],i=x(e),o=i.length-1,s=0;for(;o>=s;s++)n=s===o?this:this.clone(!0),x(i[s])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=mt(a),o=mt(e),r=0,i=o.length;i>r;r++)yt(o[r],s[r]);if(t)if(n)for(o=o||mt(e),s=s||mt(a),r=0,i=o.length;i>r;r++)gt(o[r],s[r]);else gt(e,a);return s=mt(a,"script"),s.length>0&&dt(s,!u&&mt(e,"script")),a},buildFragment:function(e,t,n,r){var i,o,s,a,u,l,c=0,p=e.length,f=t.createDocumentFragment(),h=[];for(;p>c;c++)if(i=e[c],i||0===i)if("object"===x.type(i))x.merge(h,i.nodeType?[i]:i);else if(rt.test(i)){o=o||f.appendChild(t.createElement("div")),s=(nt.exec(i)||["",""])[1].toLowerCase(),a=ct[s]||ct._default,o.innerHTML=a[1]+i.replace(tt,"<$1>")+a[2],l=a[0];while(l--)o=o.lastChild;x.merge(h,o.childNodes),o=f.firstChild,o.textContent=""}else h.push(t.createTextNode(i));f.textContent="",c=0;while(i=h[c++])if((!r||-1===x.inArray(i,r))&&(u=x.contains(i.ownerDocument,i),o=mt(f.appendChild(i),"script"),u&&dt(o),n)){l=0;while(i=o[l++])at.test(i.type||"")&&n.push(i)}return f},cleanData:function(e){var t,n,r,i,o,s,a=x.event.special,u=0;for(;(n=e[u])!==undefined;u++){if(F.accepts(n)&&(o=n[q.expando],o&&(t=q.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(s=0;(i=r[s])!==undefined;s++)a[i]?x.event.remove(n,i):x.removeEvent(n,i,t.handle);q.cache[o]&&delete q.cache[o]}delete L.cache[n[L.expando]]}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}});function pt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ht(e){var t=ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function dt(e,t){var n=e.length,r=0;for(;n>r;r++)q.set(e[r],"globalEval",!t||q.get(t[r],"globalEval"))}function gt(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=q.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)x.event.add(t,i,l[i][n])}L.hasData(e)&&(a=L.access(e),u=x.extend({},a),L.set(t,u))}}function mt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x.nodeName(e,t)?x.merge([e],n):n}function yt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ot.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var vt,xt,bt=/^(none|table(?!-c[ea]).+)/,wt=/^margin/,Tt=RegExp("^("+b+")(.*)$","i"),Ct=RegExp("^("+b+")(?!px)[a-z%]+$","i"),kt=RegExp("^([+-])=("+b+")","i"),Nt={BODY:"block"},Et={position:"absolute",visibility:"hidden",display:"block"},St={letterSpacing:0,fontWeight:400},jt=["Top","Right","Bottom","Left"],Dt=["Webkit","O","Moz","ms"];function At(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Dt.length;while(i--)if(t=Dt[i]+n,t in e)return t;return r}function Lt(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function qt(t){return e.getComputedStyle(t,null)}function Ht(e,t){var n,r,i,o=[],s=0,a=e.length;for(;a>s;s++)r=e[s],r.style&&(o[s]=q.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Lt(r)&&(o[s]=q.access(r,"olddisplay",Rt(r.nodeName)))):o[s]||(i=Lt(r),(n&&"none"!==n||!i)&&q.set(r,"olddisplay",i?n:x.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,o={},s=0;if(x.isArray(t)){for(r=qt(e),i=t.length;i>s;s++)o[t[s]]=x.css(e,t[s],!1,r);return o}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return Ht(this,!0)},hide:function(){return Ht(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Lt(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=vt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=x.camelCase(t),u=e.style;return t=x.cssProps[a]||(x.cssProps[a]=At(u,a)),s=x.cssHooks[t]||x.cssHooks[a],n===undefined?s&&"get"in s&&(i=s.get(e,!1,r))!==undefined?i:u[t]:(o=typeof n,"string"===o&&(i=kt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(x.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||x.cssNumber[a]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&(n=s.set(e,n,r))===undefined||(u[t]=n)),undefined)}},css:function(e,t,n,r){var i,o,s,a=x.camelCase(t);return t=x.cssProps[a]||(x.cssProps[a]=At(e.style,a)),s=x.cssHooks[t]||x.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),i===undefined&&(i=vt(e,t,r)),"normal"===i&&t in St&&(i=St[t]),""===n||n?(o=parseFloat(i),n===!0||x.isNumeric(o)?o||0:i):i}}),vt=function(e,t,n){var r,i,o,s=n||qt(e),a=s?s.getPropertyValue(t)||s[t]:undefined,u=e.style;return s&&(""!==a||x.contains(e.ownerDocument,e)||(a=x.style(e,t)),Ct.test(a)&&wt.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=s.width,u.width=r,u.minWidth=i,u.maxWidth=o)),a};function Ot(e,t,n){var r=Tt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ft(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;for(;4>o;o+=2)"margin"===n&&(s+=x.css(e,n+jt[o],!0,i)),r?("content"===n&&(s-=x.css(e,"padding"+jt[o],!0,i)),"margin"!==n&&(s-=x.css(e,"border"+jt[o]+"Width",!0,i))):(s+=x.css(e,"padding"+jt[o],!0,i),"padding"!==n&&(s+=x.css(e,"border"+jt[o]+"Width",!0,i)));return s}function Pt(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=qt(e),s=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=vt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Ct.test(i))return i;r=s&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ft(e,t,n||(s?"border":"content"),r,o)+"px"}function Rt(e){var t=o,n=Nt[e];return n||(n=Mt(e,t),"none"!==n&&n||(xt=(xt||x("