text: /*!
   * @brief Geoportal Extension for OpenLayers 3
   *
   * 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 CeCILL-B
   * copyright IGN
   * @author IGN
   * @version 0.11.0
   * @date 2016-12-04
   *
   */
  /*!
   * @overview es6-promise - a tiny implementation of Promises/A+.
   * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and cont  ributors (Conversion to ES6 API by Jake Archibald)
   * @license   Licensed under MIT license
   *            See https://raw.githubusercontent.com/jakearchibald/es6-promise/  master/LICENSE
   * @version   3.0.2
   */
  /*!
   * Sortable -- minimalist JavaScript library for reorderable drag-and-drop lists
   *
   * Released under MIT LICENSE
   * 
   * Copyright 2013-2016 Lebedev Konstantin <ibnRubaXa@gmail.com>
   * http://rubaxa.github.io/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.
   */
  /*!
   * 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 (c) 2014, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons, Olivier Terral and Calvin Metcalf
   * 
   *  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._
   * 
   */
  ;(function(root, factory) {
    if (typeof define === 'function' && define.amd) {
      define(['ol'], factory);
    } else if (typeof exports === 'object') {
      module.exports = factory(require('ol'));
    } else {
      root.Gp = factory(root.ol);
    }
  }(this, function(ol) {
  var gp,CommonUtilsAutoLoadConfig,CommonUtilsLayerUtils,proj4,CommonUtilsRegister,Ol3FormatsKML,Ol3CRSCRS,Ol3Utils,CommonUtilsConfig,Ol3LayersSourceWMTS,Ol3LayersSourceWMS,Ol3LayersLayerWMTS,Ol3LayersLayerWMS,sortable,CommonControlsLayerSwitcherDOM,Ol3ControlsLayerSwitcher,Ol3ControlsUtilsMarkers,CommonUtilsCheckRightManagement,CommonUtilsSelectorID,CommonControlsSearchEngineDOM,CommonControlsSearchEngineUtils,Ol3ControlsSearchEngine,CommonControlsMousePositionDOM,Ol3ControlsMousePosition,CommonControlsDrawingDOM,Ol3ControlsDrawing,CommonControlsLocationSelectorDOM,Ol3ControlsLocationSelector,CommonControlsRouteDOM,Ol3ControlsRoute,CommonControlsIsoDOM,Ol3ControlsIsocurve,CommonControlsReverseGeocodingDOM,Ol3ControlsReverseGeocode,CommonControlsLayerImportDOM,Ol3ControlsLayerImport,Ol3ControlsGeoportalAttribution,Ol3ControlsMeasuresMeasures,CommonControlsMeasureToolBoxDOM,Ol3ControlsMeasureToolBox,CommonControlsElevationPathDOM,Ol3ControlsElevationPath,CommonControlsMeasureLengthDOM,Ol3ControlsMeasuresMeasureLength,CommonControlsMeasureAreaDOM,Ol3ControlsMeasuresMeasureArea,CommonControlsMeasureAzimuthDOM,Ol3ControlsMeasuresMeasureAzimuth,Ol3GpPluginOl3;!function(t,e){gp=function(){return"function"==typeof e?e():e}()}(this,function(){var t,e,o,n,i,s,r,a,l,c,u,h,d,p,m,f,g,_,y,v,E,S,C,A,P,M,w,I,R,G,b,x,O,L,T,N,k,D,U,F,j,B,V,W,z,q,H,Y,K,Z,X,Q,J,$,tt,et,ot,nt,it,st,rt,at,lt,ct,ut,ht,dt,pt,mt,ft,gt,_t,yt,vt,Et,St,Ct,At,Pt,Mt,wt,It,Rt,Gt,bt,xt,Ot,Lt,Tt,Nt,kt,Dt,Ut,Ft,jt,Bt,Vt;return t=void 0,e={loggers:[{root:!0,level:"all",appenders:[{type:"Console",layout:{type:"PatternLayout",pattern:"%d{yyyy-MM-dd HH:mm:ss} [%p] %c - %m%n"}}]}]},o=function(t,e){var o={getLogger:function(o){t.load(e,function(t){if(t)throw t});var n=o||"default";return t.getLogger(n)}};return o}(t,e),n=function(){var t={normalyzeParameters:function(t){var e=null;if(t){var o=[];for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];i||(i=""),o.push(n+"="+i)}e=o.join("&")}return e},normalyzeUrl:function(t,e,o){var n=t;if(t){var i=t.indexOf("?");i===-1&&(n+="?"),i!==-1&&i!==t.length-1&&(n+="&")}return e&&(n+="string"==typeof e?e:this.normalyzeParameters(e)),o&&(n=encodeURIComponent(n)),n},indent:function(t,e){var o=t||0;return new Array(o+1).join("\t")+e}};return t}(),function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}function e(t){return"function"==typeof t}function o(t){return"object"==typeof t&&null!==t}function n(t){V=t}function s(t){H=t}function r(){return function(){process.nextTick(h)}}function a(){return function(){B(h)}}function l(){var t=0,e=new Z(h),o=document.createTextNode("");return e.observe(o,{characterData:!0}),function(){o.data=t=++t%2}}function c(){var t=new MessageChannel;return t.port1.onmessage=h,function(){t.port2.postMessage(0)}}function u(){return function(){setTimeout(h,1)}}function h(){for(var t=0;t<q;t+=2){var e=J[t],o=J[t+1];e(o),J[t]=void 0,J[t+1]=void 0}q=0}function d(){try{var t=require,e=t("vertx");return B=e.runOnLoop||e.runOnContext,a()}catch(t){return u()}}function p(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function f(){return new TypeError("A promises callback cannot return that same promise.")}function g(t){try{return t.then}catch(t){return ot.error=t,ot}}function _(t,e,o,n){try{t.call(e,o,n)}catch(t){return t}}function y(t,e,o){H(function(t){var n=!1,i=_(o,e,function(o){n||(n=!0,e!==o?S(t,o):A(t,o))},function(e){n||(n=!0,P(t,e))},"Settle: "+(t._label||" unknown promise"));!n&&i&&(n=!0,P(t,i))},t)}function v(t,e){e._state===tt?A(t,e._result):e._state===et?P(t,e._result):M(e,void 0,function(e){S(t,e)},function(e){P(t,e)})}function E(t,o){if(o.constructor===t.constructor)v(t,o);else{var n=g(o);n===ot?P(t,ot.error):void 0===n?A(t,o):e(n)?y(t,o,n):A(t,o)}}function S(e,o){e===o?P(e,m()):t(o)?E(e,o):A(e,o)}function C(t){t._onerror&&t._onerror(t._result),w(t)}function A(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&H(w,t))}function P(t,e){t._state===$&&(t._state=et,t._result=e,H(C,t))}function M(t,e,o,n){var i=t._subscribers,s=i.length;t._onerror=null,i[s]=e,i[s+tt]=o,i[s+et]=n,0===s&&t._state&&H(w,t)}function w(t){var e=t._subscribers,o=t._state;if(0!==e.length){for(var n,i,s=t._result,r=0;r<e.length;r+=3)n=e[r],i=e[r+o],n?G(o,n,i,s):i(s);t._subscribers.length=0}}function I(){this.error=null}function R(t,e){try{return t(e)}catch(t){return nt.error=t,nt}}function G(t,o,n,i){var s,r,a,l,c=e(n);if(c){if(s=R(n,i),s===nt?(l=!0,r=s.error,s=null):a=!0,o===s)return void P(o,f())}else s=i,a=!0;o._state!==$||(c&&a?S(o,s):l?P(o,r):t===tt?A(o,s):t===et&&P(o,s))}function b(t,e){try{e(function(e){S(t,e)},function(e){P(t,e)})}catch(e){P(t,e)}}function x(t,e){var o=this;o._instanceConstructor=t,o.promise=new t(p),o._validateInput(e)?(o._input=e,o.length=e.length,o._remaining=e.length,o._init(),0===o.length?A(o.promise,o._result):(o.length=o.length||0,o._enumerate(),0===o._remaining&&A(o.promise,o._result))):P(o.promise,o._validationError())}function O(t){return new it(this,t).promise}function L(t){function e(t){S(i,t)}function o(t){P(i,t)}var n=this,i=new n(p);if(!z(t))return P(i,new TypeError("You must pass an array to race.")),i;for(var s=t.length,r=0;i._state===$&&r<s;r++)M(n.resolve(t[r]),void 0,e,o);return i}function T(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var o=new e(p);return S(o,t),o}function N(t){var e=this,o=new e(p);return P(o,t),o}function k(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function D(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this._id=ct++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==t&&(e(t)||k(),this instanceof U||D(),b(this,t))}function F(){var t;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;e&&"[object Promise]"===Object.prototype.toString.call(e.resolve())&&!e.cast||(t.Promise=ut)}var j;j=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B,V,W,z=j,q=0,H=({}.toString,function(t,e){J[q]=t,J[q+1]=e,q+=2,2===q&&(V?V(h):W())}),Y="undefined"!=typeof window?window:void 0,K=Y||{},Z=K.MutationObserver||K.WebKitMutationObserver,X="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Q="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,J=new Array(1e3);W=X?r():Z?l():Q?c():void 0===Y&&"function"==typeof require?d():u();var $=void 0,tt=1,et=2,ot=new I,nt=new I;x.prototype._validateInput=function(t){return z(t)},x.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},x.prototype._init=function(){this._result=new Array(this.length)};var it=x;x.prototype._enumerate=function(){for(var t=this,e=t.length,o=t.promise,n=t._input,i=0;o._state===$&&i<e;i++)t._eachEntry(n[i],i)},x.prototype._eachEntry=function(t,e){var n=this,i=n._instanceConstructor;o(t)?t.constructor===i&&t._state!==$?(t._onerror=null,n._settledAt(t._state,e,t._result)):n._willSettleAt(i.resolve(t),e):(n._remaining--,n._result[e]=t)},x.prototype._settledAt=function(t,e,o){var n=this,i=n.promise;i._state===$&&(n._remaining--,t===et?P(i,o):n._result[e]=o),0===n._remaining&&A(i,n._result)},x.prototype._willSettleAt=function(t,e){var o=this;M(t,void 0,function(t){o._settledAt(tt,e,t)},function(t){o._settledAt(et,e,t)})};var st=O,rt=L,at=T,lt=N,ct=0,ut=U;U.all=st,U.race=rt,U.resolve=at,U.reject=lt,U._setScheduler=n,U._setAsap=s,U._asap=H,U.prototype={constructor:U,then:function(t,e){var o=this,n=o._state;if(n===tt&&!t||n===et&&!e)return this;var i=new this.constructor(p),s=o._result;if(n){var r=arguments[n-1];H(function(){G(n,i,r,s)})}else M(o,i,t,e);return i},catch:function(t){return this.then(null,t)}};var ht=F,dt={Promise:ut,polyfill:ht};i=function(){return dt}(),ht()}.call(this),s=function(t,e,o){var n={call:function(t){if(o.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 e={};switch(e.url=t.url,e.data=t.data?t.data:null,e.method=t.method,e.timeOut=t.timeOut||0,e.scope=t.scope||this,t.method){case"DELETE":case"GET":break;case"PUT":case"POST":e.content=t.content?t.content:"application/x-www-form-urlencoded",e.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(e).then(function(e){t.onResponse.call(this,e)}).catch(function(e){t.onFailure.call(this,e)});break;case"json":this.__callJSON(e).then(function(e){t.onResponse.call(this,e)}).catch(function(e){t.onFailure.call(this,e)});break;case"xml":this.__callXML(e).then(function(e){t.onResponse.call(this,e)}).catch(function(e){t.onFailure.call(this,e)});break;default:throw new Error("This output Format is not yet supported !")}},__call:function(t){var o=new Promise(function(o,n){var i="POST"===t.method||"PUT"===t.method;t.data&&!i&&(t.url=e.normalyzeUrl(t.url,t.data));var s=null;if(window.XMLHttpRequest){s=new XMLHttpRequest,s.open(t.method,t.url,!0),s.overrideMimeType=t.content;var r=null;t.timeOut>0&&(r=window.setTimeout(function(){var t="TimeOut Occured on Http Request with XMLHttpRequest !";n({message:t,status:-1})},t.timeOut)),i&&s.setRequestHeader("Content-type",t.content),s.onerror=function(t){console.log(t),n(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},s.ontimeout=function(){n(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)window.clearTimeout(r),o(s.response);else{var t="Errors Occured on Http Request (status : '"+s.status+"' | response : '"+s.response+"')",e=s.status;n({message:t,status:e})}};var a=t.data&&i?t.data:null;s.send(a)}else{if(!window.XDomainRequest)throw new Error("CORS not supported");s=new XDomainRequest,s.open(t.method,t.url),s.overrideMimeType=t.content,t.timeOut>0&&(s.timeout=t.timeout),i&&s.setRequestHeader("Content-type",t.content),s.onerror=function(){n(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},s.ontimeout=function(){n(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},s.onload=function(){if(200==s.status)o(s.responseText);else{var t="Errors Occured on Http Request (status : '"+s.status+"' | response : '"+s.responseText+"')",e=s.status;n({message:t,status:e})}};var l=t.data&&i?t.data:null;s.send(l)}});return o},__callJSON:function(t){return this.__call(t).then(JSON.parse).catch(function(e){throw console.log("_callJSON failed on : ",t.url,e),e})},__callXML:function(t){return this.__call(t).then(function(t){var e;if(window.DOMParser){var o=new DOMParser;e=o.parseFromString(t,"text/xml")}else e=new window.ActiveXObject("Microsoft.XMLDOM"),e.async=!1,e.loadXML(t);return e}).catch(function(e){throw console.log("__callXML failed on : ",t.url,e),e})}};return n}(o,n,i),r=function(){var t={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_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(!arguments)return"Message indefined !";var o=Array.prototype.slice.call(arguments),n=o.shift(),i=o,s=this[n];try{s=Array.isArray(i)&&i.length>0?s.replace("%var%",i.join(" - ")):s.replace("%var%","%var% (not specified)")}catch(t){}return s}};return t}(),a=function(){function t(e){if(!(this instanceof t))throw new TypeError("ErrorService constructor cannot be called as a function.");var o=e;"string"==typeof e||e instanceof String?(this.message=e,this.status=-1,this.type=t.TYPE_UNKERR):(this.message=o.message||"undefined!?",this.type=o.type,this.status=o.status||-1),this.name="ErrorService",this.stack=(new Error).stack}return t.TYPE_SRVERR="SERVICE_ERROR",t.TYPE_USEERR="USAGE_ERROR",t.TYPE_UNKERR="UNKNOWN_ERROR",t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),t}(),l=function(t){var e={uuid:function(){var t=Math.floor(Date.now());return function(){return t++}}(),call:function(t){if(!t)throw new Error("missing parameter : options !");if(!t.url)throw new Error("missing parameter : options.url !");if(t.timeOut||(t.timeOut=0),!t.onResponse)throw new Error("missing parameter : options.onResponse !");var e="string"==typeof t.callbackSuffix?t.callbackSuffix:this.uuid(),o=!1,n=!1,i=t.url.indexOf("callback=");if(i!=-1){o=!0;var s=t.url.indexOf("&",i);s===-1&&(s=t.url.length);var r=t.url.substring(i+9,s);r&&(n=!0,t.callbackName=r)}if(!o){var a=t.url.indexOf("?");a===-1?t.url=t.url+"?callback=":a===t.url.length?t.url=t.url+"callback=":t.url=t.url+"&callback="}var l=!!t.callbackName||n;if(n||(t.callbackName||(t.callbackName="callback",(e||""===e)&&(t.callbackName+=e)),t.url=t.url.replace("callback=","callback="+t.callbackName)),t.onTimeOut||(t.onTimeOut=function(){console.log("TimeOut while invoking url : "+t.url)}),!l){var c=this,u=null;t.timeOut>0&&(u=window.setTimeout(function(){window[t.callbackName]=function(){},t.onTimeOut(),c._deleteScript(e)},t.timeOut)),window[t.callbackName]=function(o){window.clearTimeout(u),t.onResponse(o),c._deleteScript(e)}}this._createScript(e,t.url)},_createScript:function(t,e){var o,n=document.getElementById("results"+t);o=document.createElement("script"),o.setAttribute("type","text/javascript"),o.setAttribute("src",e),o.setAttribute("charset","UTF-8"),o.setAttribute("id","results"+t),o.setAttribute("async","true");var i=document.documentElement||document.getElementsByTagName("head")[0];null===n?i.appendChild(o):i.replaceChild(o,n)},_deleteScript:function(t){var e=document.getElementById("results"+t);if(e){var o=e.parentNode||document.documentElement;if(!o)return;o.removeChild(e)}}};return e}(o),c=function(t,e,o){var n={send:function(n){var i=n||{method:"GET",protocol:"JSONP",timeOut:0,format:null,wrap:!0,nocache:!0,output:"json",callback:null,callbackSuffix:null};if("XHR"===n.protocol||"json"===n.format?i.wrap=!1:"JSONP"===n.protocol&&"xml"===n.format&&(i.wrap=!0),i.callback=("JSONP"==n.protocol,null),i.output=i.wrap?"json":null,i.wrap){var s={};s.output=i.output,s.callback=i.callback,delete s.callback,i.url=t.normalyzeUrl(n.url,s)}switch(i.protocol){case"XHR":"GET"===n.method&&n.nocache&&(i.url=t.normalyzeUrl(i.url,{t:(new Date).getTime()})),e.call(i);break;case"JSONP":i.data&&(i.url=t.normalyzeUrl(i.url,i.data)),o.call(i);break;default:throw new Error("protocol not supported (XHR|JSONP) !")}}};return n}(n,s,l),u=function(){var t=location&&location.protocol&&0===location.protocol.indexOf("https:")?"https://":"http://",e="wxs.ign.fr",o="%KEY%",n=t+e.concat("/",o),i=function(t){return this._key.replace(t?o:null,t)},s={Alti:{_key:{"elevation-json":n+"/alti/rest/elevation.json","elevation-xml":n+"/alti/rest/elevation.xml","profil-json":n+"/alti/rest/elevationLine.json","profil-xml":n+"/alti/rest/elevationLine.xml",wps:n+"/alti/wps"},url:function(t){return{"elevation-json":this._key["elevation-json"].replace(t?o:null,t),"elevation-xml":this._key["elevation-xml"].replace(t?o:null,t),"profil-json":this._key["profil-json"].replace(t?o:null,t),"profil-xml":this._key["profil-xml"].replace(t?o:null,t),wps:this._key.wps.replace(t?o:null,t)}}},ProcessIsoCurve:{_key:{"iso-json":n+"/isochrone/isochrone.json","iso-xml":n+"/isochrone/isochrone.xml"},url:function(t){return{"iso-json":this._key["iso-json"].replace(t?o:null,t),"iso-xml":this._key["iso-xml"].replace(t?o:null,t)}}},AutoComplete:{_key:n+"/ols/apis/completion",url:i},ReverseGeocode:{_key:n+"/geoportail/ols",url:i},AutoConf:{_key:{apiKey:n+"/autoconf",apiKeys:n+"/autoconf?keys=%KEYS%"},url:function(n){var i="";if(Array.isArray(n)&&n.length>0){i=n[0];for(var s=1;s<n.length;s++)i+=","+n[s]}return{apiKey:this._key.apiKey.replace(n?o:null,n),apiKeys:this._key.apiKeys.replace(o,n[0]).replace("%KEYS%",i),aggregate:t+e.concat("/")+n+"/autoconf/id/"}}},Geocode:{_key:n+"/geoportail/ols",url:i},Route:{_key:{ols:n+"/itineraire/ols","route-json":n+"/itineraire/rest/route.json","route-xml":n+"/itineraire/rest/route.xml"},url:function(t){return{ols:this._key.ols.replace(t?o:null,t),"route-json":this._key["route-json"].replace(t?o:null,t),"route-xml":this._key["route-xml"].replace(t?o:null,t)}}}};return s}(),h=function(t,e,o,n,i,s){function r(t){if(!(this instanceof r))throw new TypeError(o.getMessage("CLASS_CONSTRUCTOR"));this.options={protocol:"JSONP",proxyURL:"",callbackSuffix:null,httpMethod:"GET",timeOut:0,rawResponse:!1,scope:this,onSuccess:function(t){console.log("onSuccess - la reponse est la suivante : ",t)},onFailure:function(t){200!==t.status&&t.status?console.log("onFailure - Erreur (",t.status,") : ",t.message):console.log("onFailure : ",t.message)}};for(var e in t)t.hasOwnProperty(e)&&(this.options[e]=t[e]);if(!this.options.apiKey&&!this.options.serverUrl)throw new Error(o.getMessage("PARAM_MISSING","apiKey","serverUrl"));this.options.rawResponse&&!this.options.onSuccess&&(this.options.onSuccess=function(t){console.log("onSuccess - la réponse brute du service est la suivante : ",t)});var n=null!==this.options.onSuccess&&"function"==typeof this.options.onSuccess;if(!n)throw new Error(o.getMessage("PARAM_MISSING","onSuccess()"));if(!this.options.serverUrl){var i=s[this.CLASSNAME].url(this.options.apiKey);"string"==typeof i&&(this.options.serverUrl=i)}if(this.options.serverUrl){var a=this.options.serverUrl,l=a.split("?");this.options.serverUrl=l[0]}switch(this.options.httpMethod="string"==typeof t.httpMethod?t.httpMethod.toUpperCase():"GET",this.options.httpMethod){case"POST":case"GET":break;case"PUT":case"DELETE":case"HEAD":case"OPTIONS":throw new Error(o.getMessage("PARAM_NOT_SUPPORT","httpMethod"));default:throw new Error(o.getMessage("PARAM_UNKNOWN","httpMethod"))}switch(this.options.protocol="string"==typeof t.protocol?t.protocol.toUpperCase():"JSONP",this.options.protocol){case"JSONP":case"XHR":break;default:throw new Error(o.getMessage("PARAM_UNKNOWN","protocol"))}"JSONP"===this.options.protocol&&(this.options.httpMethod="GET"),this.options.nocache=t.nocache||!1,this.options.outputFormat=null,this.request=null,this.response=null}return r.prototype={constructor:r,call:function(){function t(){this.buildRequest.call(this,s,e)}function e(t){this.callService.call(this,s,o)}function o(t){this.analyzeResponse.call(this,s,n)}function n(t){return t?void this.options.onSuccess.call(this,t):s.call(this,new i("Analyse de la reponse en échec !?"))}function s(t){var e=t;e instanceof i||(e=new i(t.message)),this.options.onFailure.call(this,e)}t.call(this)},buildRequest:function(t,e){},callService:function(t,o){var s=null,r=this.request,a=!(!this.options.proxyURL||"XHR"!==this.options.protocol);this.options.serverUrl=e.normalyzeUrl(this.options.serverUrl,{"gp-access-lib":"1.0.0-beta3"},!1),a&&("GET"===this.options.httpMethod&&(s=this.options.proxyURL+e.normalyzeUrl(this.options.serverUrl,this.request,!0),r=null),"POST"===this.options.httpMethod&&(s=this.options.proxyURL+e.normalyzeUrl(this.options.serverUrl,null,!0),r=this.request));var l=this,c={url:s||this.options.serverUrl,method:this.options.httpMethod,protocol:this.options.protocol,timeOut:this.options.timeOut||0,format:this.options.outputFormat,nocache:this.options.nocache||!1,wrap:"XHR"!==this.options.protocol,callbackSuffix:this.options.callbackSuffix,data:r,headers:null,content:this.options.contentType||"application/xml",scope:this.options.scope||this,onResponse:function(e){var n=null;if("XHR"==l.options.protocol&&(n=e),"JSONP"==l.options.protocol){if(!e)return void t.call(l,new i("Le contenu de la reponse est vide !?"));if(e.http){if(200!==e.http.status)return void t.call(l,new i({status:e.http.status,message:e.http.error,type:i.TYPE_SRVERR}));n=e.xml}else n=e}l.response=n,o.call(l,n)},onFailure:function(e){e.type=i.TYPE_SRVERR,t.call(l,new i(e))},onTimeOut:function(){t.call(l,new i("TimeOut!"))}};n.send(c)},analyzeResponse:function(t,e){}},r}(o,n,r,c,a,u),d=function(t){function e(t){if(!(this instanceof e))throw new TypeError("AltiRequest constructor cannot be called as a function.");this.options=t||{},this.positions=this.options.positions||[],this.delimiter=this.options.delimiter||"|",this.indent=this.options.indent||!1,this.crs=this.options.crs||"CRS:84",this.format=this.options.format||"json"}return e.CLASSNAME="AltiRequest",e.prototype={constructor:e,setPositions:function(t){for(var e=[],o=0;o<t.length;o++){var n=t[o];n.lon&&n.lat&&e.push(n)}this.positions=e},getPositions:function(t){if(!t)return this.positions;var e=this.positions.length-1;return t>e||t<e?this.positions:this.positions[t]},addPositions:function(t){for(var e=0;e<t.length;e++){var o=t[e];o.lon&&o.lat&&this.positions.push(t[e])}},getLon:function(){for(var t=[],e=0;e<this.positions.length;e++)t.push(this.positions[e].lon);return t.join(this.delimiter)},getLat:function(){for(var t=[],e=0;e<this.positions.length;e++)t.push(this.positions[e].lat);return t.join(this.delimiter)}},e.prototype.getData=function(){var t=[];return t.push({k:"lon",v:this.getLon()}),t.push({k:"lat",v:this.getLat()}),t.push({k:"delimiter",v:this.delimiter}),t.push({k:"indent",v:this.indent}),t.push({k:"crs",v:this.crs}),t.push({k:"format",v:this.format}),t},e}(o),p=function(t,e){function o(t){if(!(this instanceof o))throw new TypeError("AltiElevationRequest constructor cannot be called as a function.");this.CLASSNAME="AltiElevationRequest",e.apply(this,arguments),this.zonly=this.options.zonly||!1}return o.prototype=Object.create(e.prototype,{zonly:{get:function(){return this._zonly},set:function(t){this._zonly=t}}}),o.prototype.constructor=o,o.prototype.getData=function(){var t=[];return t.push({k:"lon",v:this.getLon()}),t.push({k:"lat",v:this.getLat()}),t.push({k:"indent",v:this.indent}),t.push({k:"crs",v:this.crs}),t.push({k:"zonly",v:this.zonly}),t.push({k:"format",v:this.format}),t},o}(o,d),m=function(t,e){function o(t){if(!(this instanceof o))throw new TypeError("AltiProfilRequest constructor cannot be called as a function.");this.CLASSNAME="AltiProfilRequest",e.apply(this,arguments),this.sampling=this.options.sampling||3}return o.prototype=Object.create(e.prototype,{sampling:{get:function(){return this._sampling},set:function(t){this._sampling=t}}}),o.prototype.constructor=o,o.prototype.getData=function(){var t=[];return t.push({k:"lon",v:this.getLon()}),t.push({k:"lat",v:this.getLat()}),t.push({k:"indent",v:this.indent}),t.push({k:"crs",v:this.crs}),t.push({k:"sampling",v:this.sampling}),t.push({k:"format",v:this.format}),t},o}(o,d),f=function(t,e,o,n){function i(t){if(!(this instanceof i))throw new TypeError("AltiRequestREST constructor cannot be called as a function.");if(this.options=t||{},!this.options)throw new Error(e.getMessage("PARAM_EMPTY","options"));if(!this.options.type)throw new Error(e.getMessage("PARAM_EMPTY","type (Elevation or Profil)"));switch(this.DataObject=null,this.options.type){case"Elevation":this.DataObject=new o(this.options.param);break;case"Profil":this.DataObject=new n(this.options.param);break;default:throw new Error(e.getMessage("PARAM_TYPE","type (Elevation or Profil)"))}this.method=this.options.method||"GET"}return i.prototype={requestString:null,constructor:i,template:{get:{value:"lon=__LON__&lat=__LAT__&indent=__INDENT__&crs='__CRS__'",input:{point:"&zonly=__ZONLY__",profil:"&sampling=__SAMPLING__"}},post:{value:"lon=__LON__\nlat=__LAT__\nindent=__INDENT__\ncrs='__CRS__'\n",input:{point:"zonly=__ZONLY__",profil:"sampling=__SAMPLING__"}}},processRequestString:function(){var t="";return"POST"==this.method?t=this.template.post.value:"GET"==this.method&&(t=this.template.get.value),t=t.replace(/__LON__/g,this.DataObject.getLon()),t=t.replace(/__LAT__/g,this.DataObject.getLat()),t=t.replace(/__INDENT__/g,this.DataObject.indent),t=t.replace(/__CRS__/g,this.DataObject.crs),t+=this.__addDataInputs(),this.requestString=t,this.requestString},__addDataInputs:function(){var t;if("POST"==this.method)t=this.template.post;else{if("GET"!=this.method)throw new Error("No other HTTP method supported by the service !");t=this.template.get}var e=null;if("AltiElevationRequest"==this.DataObject.CLASSNAME)return e=t.input.point,e.replace(/__ZONLY__/g,this.DataObject.zonly);if("AltiProfilRequest"==this.DataObject.CLASSNAME)return e=t.input.profil,e.replace(/__SAMPLING__/g,this.DataObject.sampling);throw new Error("No other object supported than elevation or profil !?")}},i}(o,r,p,m),g=function(t){function e(t){if(!(this instanceof e))throw new TypeError("WPS constructor cannot be called as a function.");if(this.options=t||{},this.DataObject=this.options.data,!this.DataObject)throw new TypeError("This data object is not defined !");this.paramservice=this.options.param.service||"WPS",this.paramversion=this.options.param.version||"1.0.0",this.paramidentifier=this.options.param.identifier||"gs:WPS",this.paramrawdataoutput=this.options.param.rawdataoutput||"result",this.paramrequest=this.options.param.request||"Execute",this.method=this.options.method||"GET"}return e.prototype={requestString:null,constructor:e,template:{get:{value:"service=__SERVICE__&version=__VERSION__&rawdataoutput=__RAWDATAOUTPUT__&identifier=__IDENTIFIER__&request=__REQUEST__&datainputs=<!-- __DATAINPUTS__ -->",input:"__KEY__=__DATA__"},post:{value:'<?xml version="1.0" encoding="UTF-8"?><wps:__REQUEST__ version="__VERSION__" service="__SERVICE__" __NAMESPACE__ __SCHEMALOCATION__><ows:Identifier>__IDENTIFIER__</ows:Identifier><wps:DataInputs><!-- __DATAINPUTS__ --></wps:DataInputs><wps:ResponseForm><wps:RawDataOutput><ows:Identifier>__RAWDATAOUTPUT__</ows:Identifier></wps:RawDataOutput></wps:ResponseForm></wps:__REQUEST__>',input:"<wps:Input><ows:Identifier>__KEY__</ows:Identifier><wps:Data><wps:LiteralData>__DATA__</wps:LiteralData></wps:Data></wps:Input>"}},namespaceByDefault:function(){var t=['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 t.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(){var t="";if("POST"==this.method)t=this.template.post.value;else{if("GET"!=this.method)return!1;t=this.template.get.value}return t=t.replace(/__SERVICE__/g,this.paramservice),t=t.replace(/__VERSION__/g,this.paramversion),t=t.replace(/__RAWDATAOUTPUT__/g,this.paramrawdataoutput),t=t.replace(/__IDENTIFIER__/g,this.paramidentifier),t=t.replace(/__REQUEST__/g,this.paramrequest),"POST"==this.method&&(t=t.replace(/__NAMESPACE__/g,this.namespaceByDefault),t=t.replace(/__SCHEMALOCATION__/g,this.schemaLocationByDefault)),!!(t=t.replace(/<!-- __DATAINPUTS__ -->/g,this.__addDataInputs()))&&(this.requestString=t,!0)},__addDataInputs:function(){for(var t="GET"==this.method?this.template.get.input:this.template.post.input,e="GET"==this.method?";":"",o="",n=this,i=this.DataObject.getData(),s=0;s<i.length;s++)!function(s){e&&(e=s==i.length-1?"":";"),o=o.concat(n.__addDataInput(t,i[s].k,i[s].v),e)}(s);return o},__addDataInput:function(t,e,o){var n=t;return n=n.replace(/__KEY__/g,e),n=n.replace(/__DATA__/g,o)},setMethod:function(t){"GET"!=t&&"POST"!=t||(this.method=t)},getMethod:function(){return this.method}},e}(o),_=function(t,e,o,n,i){var s={build:function(t){if(!t)throw new Error(e.getMessage("PARAM_EMPTY","options"));if(!t.type)throw new Error(e.getMessage("PARAM_EMPTY","type (Elevation or Profil)"));var s=null;switch(t.type){case"Elevation":t.wps.identifier="gs:WPSElevation",s=new n(t.param);break;case"Profil":t.wps.identifier="gs:WPSLineElevation",s=new i(t.param);break;default:throw new Error(e.getMessage("PARAM_TYPE","type (Elevation or Profil)"))}var r={data:s,method:t.method,param:t.wps},a=new o(r);if(!a.processRequestString())throw new Error("Enable to process request !");return a.requestString}};return s}(o,r,g,p,m),y=function(t,e,o,n){var i={build:function(t){var i=null,s={type:t.sampling?"Profil":"Elevation",method:t.httpMethod,param:{positions:null,delimiter:null,indent:null,crs:null,format:null,sampling:null,zonly:null}};s.param.positions=t.positions,s.param.format=t.outputFormat,s.param.sampling=t.sampling,s.param.zonly=t.zonly;var r=null!==t.onError&&"function"==typeof t.onError,a=null!==t.onSuccess&&"function"==typeof t.onSuccess,l=null;switch(t.api){case"REST":var c=new o(s);if(!c.processRequestString()){if(l="Error in process request (rest) !",r)return void t.onError.call(t.scope,new e(l));throw new Error(l)}i=c.requestString;break;case"WPS":if(s.wps={service:null,version:null,identifier:null,rawdataoutput:null,request:null},i=n.build(s),!i){if(l="Error in process request (wps) !",r)return void t.onError.call(t.scope,new e(l));throw new Error(l)}break;default:if(l="Type of API is not supported by service (REST or WPS) !",r)return void t.onError.call(t.scope,new e(l));throw new Error(l)}return a&&t.onSuccess.call(t.scope,i),i}};return i}(o,a,f,_),v=function(t){function e(t){if(!(this instanceof e))throw new TypeError("XML constructor cannot be called as a function.");this.xmlString=null,this.xmlDoc=null,this.reader=null,t&&(t.xmlString&&"string"==typeof t.xmlString&&(this.xmlString=t.xmlString,this.xmlDoc=o(t.xmlString)),t.reader&&this.setReader(t.reader))}function o(t){if("object"==typeof exports){var e=xmldom.DOMParser;return(new e).parseFromString(t,"text/xml")}var o,n,i="Erreur lors du parsing de la réponse du service : XML non conforme";if(window.ActiveXObject){n=new window.ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t);var s=n.parseError;if(s.errorCode)throw s.line&&s.linepos&&(i+="( ligne "+s.line+", colonne "+s.linepos),s.reason&&(i+=":  "+s.reason+")"),new Error(i);return n}if(window.DOMParser){o=new window.DOMParser;try{n=o.parseFromString(t,"text/xml")}catch(t){throw"SyntaxError"===t.message?new Error(i):new Error("Erreur lors du parsing de la réponse du service : "+t.message)}if(n.getElementsByTagName("parsererror").length>0)for(var r=n.getElementsByTagName("parsererror"),a=0;a<r.length;a++){var l=r[a].innerHTML;if(l.indexOf("Huge input lookup")==-1)throw i+="("+l+")",new Error(i)}else if(!n.documentElement)throw new Error(i);return n}throw new Error("Incompatible DOM Parser pour ce navigateur !");
  }function n(t){var e;return 9===t.nodeType?e=t.documentElement:1===t.nodeType&&(e=t),e}function i(t){var e={};if(t.attributes.length>0){var o=s(t);e.attributes=o}if(t.hasChildNodes())for(var n,r={},a=t.childNodes,l=0;l<a.length;l++)if(n=a[l],3===n.nodeType)e.textContent=n.nodeValue;else if(1===n.nodeType)if(r=i(n),e[n.nodeName]){if(!Array.isArray(e[n.nodeName])){var c=e[n.nodeName];e[n.nodeName]=[],e[n.nodeName].push(c)}e[n.nodeName].push(r)}else e[n.nodeName]=r;return e}function s(t){if(t.attributes.length>0){for(var e={},o=t.attributes,n=0;n<o.length;n++){var i=o[n];e[i.nodeName]=i.nodeValue}return e}}return e.prototype={constructor:e,getXMLString:function(){return this.xmlString},setXMLString:function(t){t&&"string"==typeof t&&(this.xmlString=t,this.xmlDoc=o(t))},getReader:function(){return this.reader},setReader:function(t){t&&t.read&&"function"==typeof t.read&&(this.reader=t)},getXMLDoc:function(){return this.xmlDoc},setXMLDoc:function(t){this.xmlDoc=t},parse:function(){if(!this.xmlDoc&&this.xmlString&&(this.xmlDoc=o(this.xmlString)),this.xmlDoc){var t=n(this.xmlDoc);if(t){var e;return this.reader&&this.reader.read?e=this.reader.read(t):(e={},e[t.nodeName]=i(t)),e}return{}}}},e}(o),E=function(){function t(){if(!(this instanceof t))throw new TypeError("AltiResponse constructor cannot be called as a function.");this.elevations=[]}return t.prototype={constructor:t},t}(),S=function(){function t(){if(!(this instanceof t))throw new TypeError("Elevation constructor cannot be called as a function.");this.z=null}return t.prototype={constructor:t},t}(),C=function(t,e,o){var n={};return n.READERS={elevations:function(t){var o=new e;if(t.hasChildNodes())for(var i,s,r=t.childNodes,a=0;a<r.length;a++)i=r[a],n.READERS[i.nodeName]&&(s=n.READERS[i.nodeName](i),o.elevations.push(s));return o},elevation:function(t){var e=new o;if(t.hasChildNodes())for(var i,s=t.childNodes,r=0;r<s.length;r++)i=s[r],n.READERS[i.nodeName]&&n.READERS[i.nodeName](i,e);return e},lat:function(t,e){var o=t.firstChild;if(!o||3!==o.nodeType)throw new Error("Erreur dans la lecture de la réponse du service: latitude attendue mais absente");e.lat=parseFloat(o.nodeValue)},lon:function(t,e){var o=t.firstChild;if(!o||3!==o.nodeType)throw new Error("Erreur dans la lecture de la réponse du service: longitude attendue mais absente");e.lon=parseFloat(o.nodeValue)},z:function(t,e){var n=t.firstChild;if(!n||3!==n.nodeType)throw new Error("Erreur dans la lecture de la réponse du service: altitude attendue mais absente");return e?void(e.z=parseFloat(n.nodeValue)):(e=new o,e.z=parseFloat(n.nodeValue),e)},acc:function(t,e){var o=t.firstChild;if(!o||3!==o.nodeType)throw new Error("Erreur dans la lecture de la réponse du service: précision (acc) attendue mais absente");e.acc=parseFloat(o.nodeValue)},exceptionreport:function(t){var e={};if(t.hasChildNodes())for(var o,i=t.childNodes,s=0;s<i.length;s++)o=i[s],"Exception"===o.nodeName&&(e.exceptionReport=n.READERS.exception(o));return e},exception:function(t){var e={},o=t.getAttribute("exceptionCode");o&&(e.exceptionCode=o);var n=t.firstChild;return n&&3===n.nodeType&&(e.exception=n.nodeValue),e},error:function(t){var e={error:{}};if(t.hasChildNodes())for(var o,n=t.childNodes,i=0;i<n.length;i++){o=n[i];var s;1===o.nodeType&&"code"===o.nodeName&&(s=o.firstChild,s&&3===s.nodeType&&(e.error.code=s.nodeValue)),1===o.nodeType&&"description"===o.nodeName&&(s=o.firstChild,s&&3===s.nodeType&&(e.error.description=s.nodeValue))}return e}},n.read=function(t){if("elevations"===t.nodeName){var e=n.READERS.elevations(t);return e}if("ExceptionReport"===t.nodeName){var o=n.READERS.exceptionreport(t);return o}if("error"===t.nodeName){var i=n.READERS.error(t);return i}throw new Error("Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.")},n}(o,E,S),A=function(t,e,o,n,i,s,r){var a={build:function(t){var a=null;if(!t.response)return void t.onError.call(t.scope,new e(o.getMessage("SERVICE_RESPONSE_EMPTY")));if(t.rawResponse)a=t.response;else{switch(t.outputFormat){case"xml":try{var l=new n({reader:i});if("string"==typeof t.response?l.setXMLString(t.response):l.setXMLDoc(t.response),a=l.parse(),!a)throw new Error(o.getMessage("SERVICE_RESPONSE_EXCEPTION_2"))}catch(n){var c=n.message;return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_EXCEPTION",c),status:200,type:e.TYPE_SRVERR}))}break;case"json":var u;if(u="string"==typeof t.response?window.JSON.parse(t.response):t.response,u.error)return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_EXCEPTION",u.error.description),status:200,type:e.TYPE_SRVERR}));if(u){var h,d=u.elevations,p=new s;if(Array.isArray(d)&&d.length)for(var m=0;m<d.length;m++)h=new r,"object"==typeof d[m]?(d[m].lon&&(h.lon=d[m].lon),d[m].lat&&(h.lat=d[m].lat),d[m].z&&(h.z=d[m].z),d[m].acc&&(h.acc=d[m].acc)):"number"==typeof d[m]&&(h.z=d[m]),Array.isArray(p.elevations)&&p.elevations.push(h);a=p}if(!a)return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_ANALYSE_2"),type:e.TYPE_UNKERR,status:-1}));break;default:return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_FORMAT_2"),type:e.TYPE_UNKERR,status:-1}))}if(a.exceptionReport)return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_EXCEPTION",a.exceptionReport),type:e.TYPE_SRVERR,status:200}));if(a.error){var f=a.error.description;return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_EXCEPTION",f),type:e.TYPE_SRVERR,status:200}))}}t.onSuccess.call(t.scope,a)}};return a}(o,a,r,v,C,E,S),P=function(t,e,o,n,i,s,r){function a(t){if(!(this instanceof a))throw new TypeError(e.getMessage("CLASS_CONSTRUCTOR","Alti"));if(this.CLASSNAME="Alti",n.apply(this,arguments),!t.positions)throw new Error(e.getMessage("PARAM_MISSING","positions"));if(0===t.positions.length)throw new Error(e.getMessage("PARAM_EMPTY","positions"));if(this.options.positions=t.positions,this.options.outputFormat="string"==typeof t.outputFormat?t.outputFormat.toLowerCase():"xml",this.options.sampling=t.sampling||null,this.options.api="string"==typeof t.api?t.api.toUpperCase():"REST","REST"===this.options.api&&(this.options.httpMethod="GET"),this.options.zonly=t.zonly||!1,!this.options.serverUrl){var o=i.Alti.url(this.options.apiKey),s=null;switch(this.options.api){case"WPS":s=o.wps;break;case"REST":var r=(t.sampling?"profil":"elevation")+"-"+this.options.outputFormat;s=o[r];break;default:throw new Error(e.getMessage("PARAM_UNKNOWN","api"))}if(!s)throw new Error("Url by default not found !");this.options.serverUrl=s}var l=this.options.serverUrl.lastIndexOf(".");if(l!==-1){var c=this.options.serverUrl.substring(l+1);if(c&&c.length<5)switch(c.toLowerCase()){case"json":case"xml":this.options.outputFormat=c.toLowerCase();break;default:throw new Error("type of service : unknown or unsupported (json or xml) !")}}}return a.prototype=Object.create(n.prototype,{}),a.prototype.constructor=a,a.prototype.buildRequest=function(t,e){var o={httpMethod:this.options.httpMethod,onSuccess:function(t){this.request=t,e.call(this,this.request)},onError:t,scope:this,positions:this.options.positions,outputFormat:this.options.outputFormat,sampling:this.options.sampling,api:this.options.api,zonly:this.options.zonly};s.build(o)},a.prototype.analyzeResponse=function(t,n){if(this.response){var i={response:this.response,outputFormat:this.options.outputFormat,rawResponse:this.options.rawResponse,onError:t,onSuccess:n,scope:this};r.build(i)}else t.call(this,new o(e.getMessage("SERVICE_RESPONSE_EMPTY")))},a}(o,r,a,h,u,y,A),M=function(){function t(){if(!(this instanceof t))throw new TypeError("AutoConfResponse constructor cannot be called as a function.");this.generalOptions={apiKeys:{},title:null,defaultGMLGFIStyle:null,theme:null,wgs84Resolutions:[]},this.layers={},this.territories={},this.tileMatrixSets={},this.services={}}return t.prototype={constructor:t,isConfLoaded:function(t){if(t)return!!this.generalOptions.apiKeys[t]},getLayersId:function(t){return this.generalOptions.apiKeys[t]},getLayersConf:function(t){var e={},o=this.getLayersId(t);if(o)for(var n=0;n<o.length;n++){var i=o[n];e[i]=this.layers[i]}return e},getLayerConf:function(t){if(this.layers)return this.layers[t]},getTileMatrixSets:function(){return this.tileMatrixSets},getTMSConf:function(t){if(this.tileMatrixSets)return this.tileMatrixSets[t]},getTerritories:function(){return this.territories},getTerritoryConf:function(t){if(this.territories)return this.territories[t]},getServices:function(){return this.services},getServiceConf:function(t){if(this.services)return this.services[t]}},t}(),w=function(){function t(){if(!(this instanceof t))throw new TypeError("Constraint constructor cannot be called as a function.");this.crs=null,this.bbox={left:null,right:null,top:null,bottom:null},this.minScaleDenominator=null,this.maxScaleDenominator=null,this.temporalExtent=[null,null]}return t.prototype={constructor:t},t}(),I=function(){function t(){if(!(this instanceof t))throw new TypeError("Format constructor cannot be called as a function.");this.current=null,this.name=null}return t.prototype={constructor:t},t}(),R=function(){function t(){if(!(this instanceof t))throw new TypeError("Layer constructor cannot be called as a function.")}return t.prototype={constructor:t,getName:function(){return this.name},getTitle:function(){return this.title},getDescription:function(){return this.description},getLayerId:function(){return this.layerId},getQuicklookUrl:function(){return this.quicklookUrl},getDefaultProjection:function(){return this.defaultProjection},getProjections:function(){var t=[];t.push(this.defaultProjection);var e=t.concat(this.additionalProjections);return e},getBBOX:function(){if(this.globalConstraint)return this.globalConstraint.bbox},getMinScaleDenominator:function(){if(this.globalConstraint)return this.globalConstraint.minScaleDenominator},getMaxScaleDenominator:function(){if(this.globalConstraint)return this.globalConstraint.maxScaleDenominator},getTMSID:function(){if(this.wmtsOptions)return this.wmtsOptions.tileMatrixSetLink},getServiceParams:function(){return this.serviceParams},getServerUrl:function(t){if(t&&this.serviceParams&&this.serviceParams.serverUrl)return this.serviceParams.serverUrl[t]},getLegends:function(){return this.legends},getMetadata:function(){return this.metadata},getStyles:function(){return this.styles},getDefaultStyle:function(){if(this.styles){for(var t,e=this.styles,o=0;o<e.length;o++)if(e[o].current===!0){t=e[o].name;break}return t}},getThematics:function(){return this.thematics},getDefaultFormat:function(){if(this.formats){for(var t,e=this.formats,o=0;o<e.length;o++)if(e[o].current===!0){t=e[o].name;break}return t}},getConstraints:function(){return this.constraints},getOriginators:function(){return this.originators},getDimensions:function(){return this.dimensions},getAggregatedLayers:function(){return this.isAggregate?this.aggregatedLayers:void 0}},t}(),G=function(){function t(){if(!(this instanceof t))throw new TypeError("Legend constructor cannot be called as a function.");this.format=null,this.url=null,this.minScaleDenominator=null}return t.prototype={constructor:t},t}(),b=function(){function t(){if(!(this instanceof t))throw new TypeError("Metadata constructor cannot be called as a function.");this.format=null,this.url=null}return t.prototype={constructor:t},t}(),x=function(){function t(){if(!(this instanceof t))throw new TypeError("Originator constructor cannot be called as a function.");this.name=null,this.attribution=null,this.logo=null,this.url=null,this.constraints=[]}return t.prototype={constructor:t},t}(),O=function(){function t(){if(!(this instanceof t))throw new TypeError("Service constructor cannot be called as a function.");this.title=null,this.serverUrl=null,this.version=null}return t.prototype={constructor:t},t}(),L=function(){function t(){if(!(this instanceof t))throw new TypeError("Style constructor cannot be called as a function.");this.name=null,this.title=null,this.current=null}return t.prototype={constructor:t},t}(),T=function(){function t(){if(!(this instanceof t))throw new TypeError("Territory constructor cannot be called as a function.");this.isDefault=null,this.defaultCRS=null,this.additionalCRS=[],this.geoBBOX={left:null,right:null,top:null,bottom:null},this.geoCenter={lon:null,lat:null},this.defaultOptions={resolution:null,minScaleDenominator:null,maxScaleDenominator:null},this.defaultLayers=[]}return t.prototype={constructor:t},t}(),N=function(){function t(){if(!(this instanceof t))throw new TypeError("Thematic constructor cannot be called as a function.");this.inspire=null,this.name=null}return t.prototype={constructor:t},t}(),k=function(){function t(){if(!(this instanceof t))throw new TypeError("TileMatrixSet constructor cannot be called as a function.");this.projection=null,this.nativeResolutions=[],this.matrixIds=[],this.tileMatrices={}}return t.prototype={constructor:t,getResolutions:function(){return this.nativeResolutions},getMatrixIds:function(){return this.matrixIds},getProjection:function(){return this.projection},getTileMatrices:function(){return this.tileMatrices},getTopLeftCorner:function(){var t,e=this.getTileMatrices();if(e)for(var o in e)if(e.hasOwnProperty(o)){t=e[o].topLeftCorner;break}return t}},t}(),D=function(){function t(){if(!(this instanceof t))throw new TypeError("TileMatrix constructor cannot be called as a function.");this.matrixId=null,this.matrixHeight=null,this.matrixWidth=null,this.scaleDenominator=null,this.tileHeight=null,this.tileWidth=null,this.topLeftCorner=null}return t.prototype={constructor:t,getTopLeftCorner:function(){return this.topLeftCorner},getScaleDenominator:function(){return this.scaleDenominator},getTileHeight:function(){return this.tileHeight},getTileWidth:function(){return this.tileWidth},getMatrixHeight:function(){return this.matrixHeight},getMatrixWidth:function(){return this.matrixWidth}},t}(),U=function(){function t(){if(!(this instanceof t))throw new TypeError("TileMatrixLimit constructor cannot be called as a function.");this.minTileRow=null,this.maxTileRow=null,this.minTileCol=null,this.maxTileCol=null}return t.prototype={constructor:t},t}(),F=function(t,e,o,n,i,s,r,a,l,c,u,h,d,p,m){function f(t){if(t.attributes.length>0){for(var e={},o=t.attributes,n=0;n<o.length;n++){var i=o[n];e[i.nodeName]=i.nodeValue}return e}}function g(t,e){if(t.hasChildNodes())for(var o,n,i,s=t.childNodes,r=0;r<s.length;r++)if(o=s[r],1===o.nodeType)if(n=o.localName||o.baseName||o.nodeName,i=o.prefix||v.DEFAULTPREFIX,v.READERS[i][n]){var a=v.READERS[i][n];a(o,e)}else g(o,e)}function _(t){var e,o="";return t.hasChildNodes()&&(e=t.firstChild,3!==e.nodeType&&4!==e.nodeType||(o=e.nodeValue)),o}function y(t){if(t.attributes.length>0){var e=f(t);for(var o in e)if(e.hasOwnProperty(o)){if("version"===o&&e.version!==v.VERSION)return void console.log("[AutoConfResponseReader] autoconf version is not the expected one : there may be errors in parsing");if("xmlns"===o){if(e[o]!==v.NAMESPACES.xmlns)return void console.log("[AutoConfResponseReader] autoconf response default namespace is not the expected one");continue}var n=o.split(":")[0],i=o.split(":")[1];if("xmlns"===n&&i&&v.NAMESPACES[i]&&v.NAMESPACES[i]!==e[o])return void console.log("[AutoConfResponseReader] autoconf response "+o+" namespace is not the expected one");if("schemaLocation"===i&&e[o]!==v.SCHEMALOCATION[0]&&e[o]!==v.SCHEMALOCATION[1])return void console.log("[AutoConfResponseReader] autoconf response schema location is not the expected one")}}}var v={};return v.VERSION="1.1.0",v.NAMESPACES={xmlns:"http://www.opengis.net/context",gpp:"http://api.ign.fr/geoportail",ows:"http://www.opengis.net/ows/1.1",sld:"http://www.opengis.net/sld",wmts:"http://www.opengis.net/wmts/1.0",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},v.SCHEMALOCATION=["http://www.opengis.net/context http://gpp3-wxs.ign.fr/schemas/extContext.xsd http://api.ign.fr/geoportail http://wxs.ign.fr/schemas/autoconf/autoconf.xsd","http://www.opengis.net/context http://gpp3-wxs.ign.fr/schemas/extContext.xsd http://api.ign.fr/geoportail http://gpp3-wxs.ign.fr/schemas/autoconf.xsd"],v.DEFAULTPREFIX="context",v.READERS={context:{ViewContext:function(t){y(t);var o=new e;return g(t,o),o},Title:function(t,e){e&&e.generalOptions?e.generalOptions.title=_(t):e&&e.lyr&&(e.lyr.title=_(t))},Abstract:function(t,e){e&&e.lyr&&(e.lyr.description=_(t))},Server:function(t,e){var o=t.getAttribute("service"),n=t.getAttribute("title"),i=t.getAttribute("version");if(o)if(e&&e.services&&"object"==typeof e.services&&!e.services[o]){var s=new l;s.title=n,s.version=i,g(t,s),e.services[o]=s}else e&&e.lyr&&(e.lyr.serviceParams||(e.lyr.serviceParams={}),e.lyr.serviceParams.id=o,e.lyr.serviceParams.version=i)},OnlineResource:function(t,e){e&&e.hasOwnProperty("serverUrl")&&(e.serverUrl=t.getAttribute("xlink:href"))},LayerList:function(t,e){if(g(t,e),e&&e.layers&&e.generalOptions&&e.services)for(var o in e.layers)if(e.layers.hasOwnProperty(o)){var n=e.layers[o],i=n.apiKeys;if(i&&Array.isArray(i))for(var s=0;s<i.length;s++){var r=i[s];e.generalOptions.apiKeys&&(e.generalOptions.apiKeys[r]&&Array.isArray(e.generalOptions.apiKeys[r])||(e.generalOptions.apiKeys[r]=[]),e.generalOptions.apiKeys[r].push(o))}var a=n.serviceParams;if(a&&a.id&&!e.services[a.id]){var c=new l;a.serverUrl&&(c.serverUrl=a.serverUrl),a.version&&(c.version=a.version),e.services[a.id]=c}if(n.wmtsOptions&&n.wmtsOptions.tileMatrixSetLink&&e.tileMatrixSets){var u=n.wmtsOptions.tileMatrixSetLink,h=e.tileMatrixSets;for(var d in h)h.hasOwnProperty(d)&&d===u&&(n.defaultProjection=h[d].projection)}}},Layer:function(t,e){if(e&&e.layers){var o={lyr:new i,lyrId:null},n=t.getAttribute("hidden");"1"===n?o.lyr.hidden=!0:o.lyr.hidden=!1;var s=t.getAttribute("queryable");if("1"===s?o.lyr.queryable=!0:o.lyr.queryable=!1,g(t,o),o.lyrId){if(o.lyr.serviceParams&&o.lyr.serviceParams.id){var r=o.lyr.serviceParams.id;if(r.toUpperCase().indexOf("OPENLS")!==-1||r.toUpperCase().indexOf("ELEVATION")!==-1){var a=o.lyrId.split("$")[0];o.lyrId=a+"$"+r}}o.lyr.layerId=o.lyrId,e.layers[o.lyrId]=o.lyr}}},Name:function(t,e){e&&e.lyr&&(e.lyr.name=_(t))},SRS:function(t,e){e&&e.lyr&&(e.lyr.defaultProjection=_(t))},Format:function(t,e){if(e&&e.lyr){var o=new n,i=t.getAttribute("current");"1"===i?o.current=!0:o.current=!1,o.name=_(t),e.lyr.formats&&Array.isArray(e.lyr.formats)||(e.lyr.formats=[]),e.lyr.formats.push(o)}},Style:function(t,e){if(e&&e.lyr){var o=new c,n=t.getAttribute("current");if("1"===n||1===n?o.current=!0:o.current=!1,t.hasChildNodes)for(var i,s,r=t.childNodes,a=0;a<r.length;a++)i=r[a],1===i.nodeType&&(s=i.localName||i.baseName||i.nodeName,"Name"===s?o.name=_(i):"Title"===s&&(o.title=_(i)));e.lyr.styles&&Array.isArray(e.lyr.styles)||(e.lyr.styles=[]),e.lyr.styles.push(o)}},Dimension:function(t,e){var o=t.getAttribute("name"),n=_(t);e&&e.lyr&&(e.lyr.dimensions||(e.lyr.dimensions={}),"Type"===o?e.lyr.dimensions.type=n:"VisibilityRange"===o?e.lyr.dimensions.visibilityRange=n:"VisibilityMode "===o?e.lyr.dimensions.visibilityMode=n:"GeometricType"===o?e.lyr.dimensions.geometricType=n:"NoDataValue"===o&&(e.lyr.dimensions.noDataValue=n))}},gpp:{Theme:function(t,e){e&&e.generalOptions&&e.generalOptions.hasOwnProperty("theme")&&(e.generalOptions.theme=_(t))},defaultGMLGFIStyleUrl:function(t,e){e&&e.generalOptions&&e.generalOptions.hasOwnProperty("defaultGMLGFIStyle")&&(e.generalOptions.defaultGMLGFIStyle=_(t))},Territory:function(t,e){var o=t.getAttribute("id");if(o){var n=new u,i=t.getAttribute("default");"1"===i?n.isDefault=!0:n.isDefault=!1,g(t,n),e&&e.territories&&"object"==typeof e.territories&&(e.territories[o]=n)}},defaultCRS:function(t,e){e&&e.hasOwnProperty("defaultCRS")&&(e.defaultCRS=_(t))},AdditionalCRS:function(t,e){var o=_(t);o&&e&&(Array.isArray(e.additionalCRS)?e.additionalCRS.push(o):(e.additionalProjections&&Array.isArray(e.additionalProjections)||(e.additionalProjections=[]),e.additionalProjections.push(o)))},DefaultLayer:function(t,e){var o=t.getAttribute("layerId");o&&e&&Array.isArray(e.defaultLayers)&&e.defaultLayers.push(o)},BoundingBox:function(t,e){if(e){var n=_(t).split(",");if(4===n.length){var i={left:parseFloat(n[0]),right:parseFloat(n[2]),top:parseFloat(n[3]),bottom:parseFloat(n[1])},s=t.getAttribute("minT"),r=t.getAttribute("maxT");if(e.hasOwnProperty("geoBBOX"))e.geoBBOX=i;else if(e.hasOwnProperty("bbox"))if(e.bbox.left||e.bbox.right||e.bbox.top||e.bbox.bottom){e.multiConstraints||(e.multiConstraints=[]);var a=new o;a.bbox=i,a.temporalExtent=[s,r],e.multiConstraints.push(a)}else e.bbox=i,e.temporalExtent=[s,r];else e.globalConstraint||(e.globalConstraint=new o),e.globalConstraint.bbox=i,e.globalConstraint.temporalExtent=[s,r]}}},Resolution:function(t,e){var o=_(t);o&&e&&e.defaultOptions&&e.defaultOptions.hasOwnProperty("resolution")&&(e.defaultOptions.resolution=parseFloat(o))},x:function(t,e){var o=_(t);o&&e&&e.geoCenter&&e.geoCenter.hasOwnProperty("lon")&&(e.geoCenter.lon=parseFloat(o))},y:function(t,e){var o=_(t);o&&e&&e.geoCenter&&e.geoCenter.hasOwnProperty("lat")&&(e.geoCenter.lat=parseFloat(o))},Resolutions:function(t,e){e&&e.generalOptions&&e.generalOptions.hasOwnProperty("wgs84Resolutions")&&(e.generalOptions.wgs84Resolutions=_(t).split(","))},Layer:function(t,e){if(e&&e.hasOwnProperty("lyrId")&&e.lyr){e.lyrId=t.getAttribute("id");var o=t.getAttribute("aggregate"),n=t.getAttribute("more");(o||n)&&(e.lyr.isAggregate=!0),g(t,e.lyr)}},Constraint:function(t,e){var n=new o;if(g(t,n),e)if(e.constraints&&Array.isArray(e.constraints)||(e.constraints=[]),n.multiConstraints&&Array.isArray(n.multiConstraints)){var i=new o;i.crs=n.crs,i.bbox=n.bbox,i.minScaleDenominator=n.minScaleDenominator,i.maxScaleDenominator=n.maxScaleDenominator,i.temporalExtent=n.temporalExtent,e.constraints.push(i);for(var s=0;s<n.multiConstraints.length;s++)i=new o,i.crs=n.crs,i.minScaleDenominator=n.minScaleDenominator,i.maxScaleDenominator=n.maxScaleDenominator,i.bbox=n.multiConstraints[s].bbox,i.temporalExtent=n.multiConstraints[s].temporalExtent,e.constraints.push(i)}else e.constraints.push(n)},CRS:function(t,e){e&&e.hasOwnProperty("crs")&&(e.crs=_(t))},Thematic:function(t,e){if(e){var o=new h;o.inspire=!1,o.name=_(t),e.thematics&&Array.isArray(e.thematics)||(e.thematics=[]),e.thematics.push(o)}},InspireThematic:function(t,e){if(e){var o=new h;o.inspire=!0,o.name=_(t),e.thematics&&Array.isArray(e.thematics)||(e.thematics=[]),e.thematics.push(o)}},Originator:function(t,e){if(e){var o=new a;o.name=t.getAttribute("name"),g(t,o),e.originators&&Array.isArray(e.originators)||(e.originators=[]),e.originators.push(o)}},Attribution:function(t,e){e&&e.hasOwnProperty("attribution")&&(e.attribution=_(t))},Logo:function(t,e){e&&e.hasOwnProperty("logo")&&(e.logo=_(t))},URL:function(t,e){e&&e.hasOwnProperty("url")&&(e.url=_(t))},Legend:function(t,e){var o=new s;g(t,o),e&&(e.legends&&Array.isArray(e.legends)||(e.legends=[]),e.legends.push(o))},LegendURL:function(t,e){if(e&&e.hasOwnProperty("format")&&(e.format=t.getAttribute("format"),t.hasChildNodes)){var o=t.childNodes[0],n=o.localName||o.baseName||o.nodeName;"OnlineResource"===n&&e.hasOwnProperty("url")&&(e.url=o.getAttribute("xlink:href"))}},QuickLook:function(t,e){if(t.hasChildNodes){var o=t.childNodes[0],n=o.localName||o.baseName||o.nodeName;"OnlineResource"===n&&e&&(e.quicklookUrl=o.getAttribute("xlink:href"))}},MetadataURL:function(t,e){if(e){var o=new r;if(o.format=t.getAttribute("format"),t.hasChildNodes){var n=t.childNodes[0],i=n.localName||n.baseName||n.nodeName;"OnlineResource"===i&&(o.url=n.getAttribute("xlink:href"))}e.metadata||Array.isArray(e.metadata)||(e.metadata=[]),e.metadata.push(o)}},Key:function(t,e){if(e){var o=t.getAttribute("id");e.apiKeys&&Array.isArray(e.apiKeys)||(e.apiKeys=[]),e.apiKeys.push(o);var n=_(t);e.serviceParams||(e.serviceParams={}),e.serviceParams.serverUrl||(e.serviceParams.serverUrl={}),e.serviceParams.serverUrl[o]||(e.serviceParams.serverUrl[o]=n)}}},ows:{Identifier:function(t,e){e&&e.hasOwnProperty("TMS")?e.identifier=_(t):e&&e.hasOwnProperty("matrixId")&&(e.matrixId=_(t))},SupportedCRS:function(t,e){e&&e.TMS&&e.TMS.hasOwnProperty("projection")&&(e.TMS.projection=_(t))}},sld:{MinScaleDenominator:function(t,e){var n=_(t);n&&e&&(e.hasOwnProperty("defaultOptions")?e.defaultOptions.minScaleDenominator=parseFloat(n):e.lyr?(e.lyr.globalConstraint||(e.lyr.globalConstraint=new o),e.lyr.globalConstraint.minScaleDenominator=parseFloat(n)):e.hasOwnProperty("minScaleDenominator")&&(e.minScaleDenominator=parseFloat(n)))},MaxScaleDenominator:function(t,e){var n=_(t);n&&e&&(e.hasOwnProperty("defaultOptions")?e.defaultOptions.maxScaleDenominator=parseFloat(n):e.lyr?(e.lyr.globalConstraint||(e.lyr.globalConstraint=new o),e.lyr.globalConstraint.maxScaleDenominator=parseFloat(n)):e.hasOwnProperty("maxScaleDenominator")&&(e.maxScaleDenominator=parseFloat(n)))}},wmts:{TileMatrixSetLimits:function(t,e){if(e){var o={};g(t,o),e.wmtsOptions||(e.wmtsOptions={}),e.wmtsOptions.tileMatrixSetLimits=o}},TileMatrixLimits:function(t,e){var o,n=new m;if(t.hasChildNodes){for(var i=t.childNodes,s=0;s<i.length;s++){var r=i[s],a=r.localName||r.baseName||r.nodeName;"TileMatrix"===a?o=_(r):"MinTileRow"===a?n.minTileRow=_(r):"MaxTileRow"===a?n.maxTileRow=_(r):"MinTileCol"===a?n.minTileCol=_(r):"MaxTileCol"===a&&(n.maxTileCol=_(r))}o&&e&&!e[o]&&(e[o]=n)}},TileMatrixSet:function(t,e){if(e&&e.tileMatrixSets){var o={};o.TMS=new d,o.resolutions=[],g(t,o);var n=o.TMS.tileMatrices;for(var i in n)n.hasOwnProperty(i)&&o.TMS.matrixIds.push(i);if(("IGNF:WGS84G"===o.TMS.getProjection()||"EPSG:4326"===o.TMS.getProjection())&&e.generalOptions&&Array.isArray(e.generalOptions.wgs84Resolutions))for(var s=e.generalOptions.wgs84Resolutions,r=0;r<s.length;r++)o.resolutions[r]=parseFloat(s[r]);Array.isArray(o.resolutions)&&void 0!==o.resolutions.sort&&o.resolutions.sort(function(t,e){return e-t}),o.TMS.nativeResolutions=o.resolutions,e.tileMatrixSets[o.identifier]=o.TMS}else e&&!e.wmtsOptions&&(e.wmtsOptions={}),e.wmtsOptions.tileMatrixSetLink=_(t)},TileMatrix:function(t,e){if(e){var o=new p;if(g(t,o),e.TMS&&e.TMS.getProjection()){var n=e.TMS.getProjection();if("EPSG:3857"===n||"EPSG:2154"===n){var i=28e-5*o.scaleDenominator;e.resolutions&&Array.isArray(e.resolutions)&&e.resolutions.push(i)}}e.TMS&&e.TMS.tileMatrices&&(e.TMS.tileMatrices[o.matrixId]=o)}},ScaleDenominator:function(t,e){var o=_(t);o&&e&&e.hasOwnProperty("scaleDenominator")&&(e.scaleDenominator=parseFloat(o))},TopLeftCorner:function(t,e){var o=_(t).split(" ");o&&e&&(e.topLeftCorner={},e.topLeftCorner.x=parseFloat(o[0]),e.topLeftCorner.y=parseFloat(o[1]))},TileWidth:function(t,e){var o=_(t);o&&e&&e.hasOwnProperty("tileWidth")&&(e.tileWidth=parseInt(o,10))},TileHeight:function(t,e){var o=_(t);o&&e&&e.hasOwnProperty("tileHeight")&&(e.tileHeight=parseInt(o,10))},MatrixWidth:function(t,e){var o=_(t);o&&e&&e.hasOwnProperty("matrixWidth")&&(e.matrixWidth=parseInt(o,10))},MatrixHeight:function(t,e){var o=_(t);o&&e&&e.hasOwnProperty("matrixHeight")&&(e.matrixHeight=parseInt(o,10))}},serviceException:function(t){var e={};if(t.hasChildNodes())for(var o,n=t.childNodes,i=0;i<n.length;i++)o=n[i],"exception"===o.nodeName&&(e.exceptionReport=v.READERS.exception(o));return e},exception:function(t){var e={},o=t.getAttribute("code");o&&(e.exceptionCode=o);var n=t.firstChild;return n&&3===n.nodeType&&(e.exception=n.nodeValue),e}},v.read=function(t){if("ViewContext"===t.nodeName){var e=t.prefix||v.DEFAULTPREFIX,o=v.READERS[e][t.nodeName](t);return o}if("serviceException"===t.nodeName){var n=v.READERS[t.nodeName](t);return n}throw new Error("Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.")},v}(o,M,w,I,R,G,b,x,O,L,T,N,k,D,U),j=function(t,e,o,n,i){var s={build:function(t){var s=null;if(!t.response)return void t.onError.call(t.scope,new e(o.getMessage("SERVICE_RESPONSE_EMPTY")));if(t.rawResponse)s=t.response;else{try{var r=new n({reader:i});"string"==typeof t.response?r.setXMLString(t.response):r.setXMLDoc(t.response),s=r.parse()}catch(n){var a=n.message;return a+="string"==typeof t.response?"\n(raw response service'"+t.response+"')":"\n(raw response service'"+t.response.documentElement.innerHTML+"')",void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_EXCEPTION",a),status:200,type:e.TYPE_SRVERR}))}var l=!0;for(var c in s)s.hasOwnProperty(c)&&(l=!1);if(l)return void t.onError.call(t.scope,new e(o.getMessage("SERVICE_RESPONSE_EMPTY_2")));if(s.exceptionReport)return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_EXCEPTION",s.exceptionReport),type:e.TYPE_SRVERR,status:200}))}var u="undefined"!=typeof window?window:{};u.Gp||(u.Gp={}),u.Gp.Config?this.mergeConfig(u.Gp.Config,s,t.layerId):u.Gp.Config=s,t.onSuccess.call(t.scope,u.Gp.Config)},mergeConfig:function(t,e,o){if(e&&t){for(var n in e)if(e.hasOwnProperty(n))if("generalOptions"==n)for(var i in e[n].apiKeys)e[n].apiKeys.hasOwnProperty(i)&&!t.generalOptions.apiKeys[i]&&(t.generalOptions.apiKeys[i]=e[n].apiKeys[i]);else if(t[n])for(var s in e[n])e[n].hasOwnProperty(s)&&!t[n][s]&&(t[n][s]=e[n][s]);if(o){var r=[];for(var a in e.layers)e.layers.hasOwnProperty(a)&&r.push(a);t.layers[o]&&(t.layers[o].aggregatedLayers=r)}}}};return s}(o,a,r,v,F),B=function(t,e,o,n,i,s,r){function a(t){if(!(this instanceof a))throw new TypeError(e.getMessage("CLASS_CONSTRUCTOR","AutoConf"));if(this.CLASSNAME="AutoConf",s.apply(this,arguments),!this.options.serverUrl&&!this.options.serverUrl){var o=i.AutoConf.url(this.options.apiKey);this.options.layerId?this.options.serverUrl=o.aggregate+this.options.layerId:Array.isArray(this.options.apiKey)&&this.options.apiKey.length>0?this.options.serverUrl=o.apiKeys:this.options.serverUrl=o.apiKey}"XHR"===this.options.protocol&&"POST"===this.options.httpMethod&&(this.options.httpMethod="GET"),this.options.outputFormat="xml"}return a.prototype=Object.create(s.prototype,{}),a.prototype.constructor=a,a.prototype.buildRequest=function(t,e){var o="undefined"!=typeof window?window:{};if(o.Gp&&o.Gp.Config&&o.Gp.Config.generalOptions&&o.Gp.Config.layers&&o.Gp.Config.generalOptions.apiKeys[this.options.apiKey]){if(!this.options.layerId)return void this.options.onSuccess.call(this,o.Gp.Config);if(o.Gp.Config.layers[this.options.layerId]&&o.Gp.Config.layers[this.options.layerId].aggregatedLayers)return void this.options.onSuccess.call(this,o.Gp.Config)}this.request="";var i;i=this.options.serverUrl.indexOf("http://")===-1,!i&&this.layerId&&(this.request=n.normalyzeParameters({layerId:this.layerId})),e.call(this,this.request)},a.prototype.analyzeResponse=function(t,n){if(this.response){var i={layerId:this.options.layerId,response:this.response,rawResponse:this.options.rawResponse,onSuccess:n,onError:t,scope:this};r.build(i)}else t.call(this,new o(e.getMessage("SERVICE_RESPONSE_EMPTY")))},a}(o,r,a,n,u,h,j),V=function(t){function e(t){if(!(this instanceof e))throw new TypeError("RequestHeader constructor cannot be called as a function.");this.options=t||{srsName:"EPSG:4326"};for(var o in t)t.hasOwnProperty(o)&&(this.options[o]=t[o])}return e.prototype={requestString:null,template:'<RequestHeader srsName="__SRSNAME__"/>',constructor:e,toString:function(){var t=null;return t=this.template,t=t.replace(/__SRSNAME__/g,this.options.srsName),this.requestString=t,this.requestString}},e}(o),W=function(t){function e(t){if(!(this instanceof e))throw new TypeError("Request constructor cannot be called as a function.");this.options=t||{maximumResponses:25,methodName:null,version:"1.2"};for(var o in t)t.hasOwnProperty(o)&&(this.options[o]=t[o])}return e.prototype={requestString:null,template:'<Request maximumResponses="__MAXRESPONSES__" methodName="__METHODNAME__" requestID="__UUID__" version="__VERSION__"><!-- __REQUESTSERVICE__ --></Request>',constructor:e,guid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0,o="x"===t?e:3&e|8;
  return o.toString(16)})},toString:function(){var t=null;return t=this.template,t=t.replace(/__MAXRESPONSES__/g,this.options.maximumResponses),t=t.replace(/__METHODNAME__/g,this.options.methodName),t=t.replace(/__UUID__/g,this.guid()),t=t.replace(/__VERSION__/g,this.options.version),this.requestString=t,this.requestString}},e}(o),z=function(t){function e(t){if(!(this instanceof e))throw new TypeError("AbstractService constructor cannot be called as a function.");this.options=t||{};for(var o in t)t.hasOwnProperty(o)&&(this.options[o]=t[o])}return e.prototype={strRequest:null,oRequest:null,oFilter:null,constructor:e,addRequest:function(t){},addFilter:function(t){},toString:function(){}},e}(o),q=function(t,e,o,n){function i(t){if(!(this instanceof i))throw new TypeError("XLS constructor cannot be called as a function.");this.options={srsName:"EPSG:4326",maximumResponses:25};for(var e in t)t.hasOwnProperty(e)&&t[e]&&(this.options[e]=t[e])}return i.VERSION="1.2",i.prototype={requestString:null,namespace:!1,oService:null,constructor:i,template:'<?xml version="1.0" encoding="UTF-8"?>\n<XLS version="__VERSION__"\n__NAMESPACE__ \n__SCHEMALOCATION__>\n__REQUESTHEADER__\n__REQUEST__\n</XLS>\n',namespaceByDefault:function(){var t=['xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"','xmlns:xls="http://www.opengis.net/xls"','xmlns:gml="http://www.opengis.net/gml"'];return t.join(" ")},schemaLocationByDefault:function(){return'xsi:schemaLocation="http://www.opengis.net/xls http://schemas.opengis.net/ols/1.2/olsAll.xsd"'},setService:function(t){t&&t instanceof n&&(this.oService=t)},getService:function(){return this.oService}},i.prototype.addNamespace=function(t,e){for(var o=t.key,n=!1,i=this.namespaceByDefault().split(" "),s=0;s<i.length;s++){var r=i[s],a=r.split("="),l=a[0];if(l==="xmlns:"+o){n=!0;break}}if(!n)return e;var c,u;return c=/<(\w+[\s>])/g,u="<"+o+":$1",e=e.replace(c,u),c=/<\/(\w+[\s>])/g,u="</"+o+":$1",e=e.replace(c,u)},i.prototype.build=function(){var t=!!this.getService(),n="";n=this.template,n=n.replace(/__VERSION__/g,i.VERSION),n=n.replace(/__NAMESPACE__/g,this.namespaceByDefault),n=n.replace(/__SCHEMALOCATION__/g,this.schemaLocationByDefault);var s=new e({srsName:this.options.srsName});n=n.replace(/__REQUESTHEADER__/g,s.toString());var r=new o({maximumResponses:this.options.maximumResponses,version:i.VERSION,methodName:t?this.getService().CLASSTYPE:null});if(n=n.replace(/__REQUEST__/g,r.toString()),t&&(n=n.replace(/<!-- __REQUESTSERVICE__ -->/g,this.getService().toString())),n)return this.namespace&&(n=this.addNamespace({key:"xls",url:"http://www.opengis.net/xls"},n)),this.requestString=n,this.requestString},i}(o,V,W,z),H=function(t,e){function o(t){if(!(this instanceof o))throw new TypeError("Address constructor cannot be called as a function.");if(this.options=t||{location:{},type:["StreetAddress"],filter:{}},!t.location)throw new Error("l'option 'location' n'est pas renseignée !");for(var e in t)t.hasOwnProperty(e)&&(this.options[e]=t[e])}return o.prototype={constructor:o,requestString:null,template:{address:'<Address countryCode="__COUNTRYCODE__">__LOCATION____PLACE____POSTALCODE____ENVELOPE__</Address>',location:{freeFormAddress:"<freeFormAddress>__FREEFORMADDRESSVALUE__</freeFormAddress>",streetAddress:{container:"<StreetAddress>__STREET____BUILDING__</StreetAddress>",building:'<Building number="__BUILDINGVALUE__"/>',street:"<Street>__STREETVALUE__</Street>"}},place:'<Place type="__PLACETYPE__">__PLACEVALUE__</Place>',postalCode:"<PostalCode>__POSTALCODEVALUE__</PostalCode>",envelope:"<gml:Envelope><gml:lowerCorner>__LEFT__ __BOTTOM__</gml:lowerCorner><gml:upperCorner>__RIGHT__ __TOP__</gml:upperCorner></gml:Envelope>"}},o.prototype.toString=function(){var t=null;if(t=this.template.address,t=t.replace(/__COUNTRYCODE__/g,this.options.type),"string"==typeof this.options.location){var e=this.template.location.freeFormAddress;e=e.replace(/__FREEFORMADDRESSVALUE__/g,this.options.location),t=t.replace(/__LOCATION__/g,e)}else{var o="",n="";this.options.location.number&&(o=this.template.location.streetAddress.building,o=o.replace(/__BUILDINGVALUE__/g,this.options.location.number)),this.options.location.street&&(n=this.template.location.streetAddress.street,n=n.replace(/__STREETVALUE__/g,this.options.location.street));var i=this.template.location.streetAddress.container;i=i.replace(/__STREET__/g,n),i=i.replace(/__BUILDING__/g,o),t=t.replace(/__LOCATION__/g,i)}var s="";this.options.location.postalCode&&(s=this.template.postalCode,s=s.replace(/__POSTALCODEVALUE__/g,this.options.location.postalCode));var r="";if(this.options.filter){var a=this.options.filter.bbox;a&&(r=this.template.envelope,r=r.replace(/__LEFT__/g,a.left),r=r.replace(/__BOTTOM__/g,a.bottom),r=r.replace(/__RIGHT__/g,a.right),r=r.replace(/__TOP__/g,a.top))}var l=[],c="";if(this.options.filter){var u=this.options.filter;for(var h in u)"bbox"!==h&&(c=this.template.place,c=c.replace(/__PLACETYPE__/g,h),c=c.replace(/__PLACEVALUE__/g,u[h]),l.push(c))}var d="";return this.options.location.city&&(d=this.template.place,d=d.replace(/__PLACETYPE__/g,"Municipality"),d=d.replace(/__PLACEVALUE__/g,this.options.location.city),l.push(d)),t=t.replace(/__POSTALCODE__/g,s),t=t.replace(/__PLACE__/g,l.join("\n")),t=t.replace(/__ENVELOPE__/g,r),this.requestString=t,this.requestString},o}(Vt,o),Y=function(t){function e(){if(!(this instanceof e))throw new TypeError("GeocodeFilterExtension constructor cannot be called as a function.");this.filters=[]}return e.prototype={constructor:e,addFilterExtensions:function(t){t&&this.filters.push(t)},getNames:function(){var t=[];for(var e in this.filters)t.push(this.filters[e].CLASSNAME);return t},getFilter:function(t){var e=null;for(var o in this.filters)this.filters[o].CLASSNAME==t&&(e=this.filters[o]);return e},getFilters:function(){return this.filters},getAttributs:function(t){var e=[];for(var o in this.filters)this.filters[o].CLASSNAME==t&&(e=this.filters[o].attributesList);return e},setPlaceAttributs:function(t,e){var o=this.getFilter(t),n=this.getAttributs(t);for(var i in n){var s=n[i];e[s]&&(o.placeAttributes[s]=e[s])}},getPlaceAttributs:function(t){var e={};for(var o in this.filters)this.filters[o].CLASSNAME==t&&(e=this.filters[o].placeAttributes);return e}},e}(o),K=function(t,e,o){function n(t){if(!(this instanceof n))throw new TypeError("GeocodeRequest constructor cannot be called as a function.");this.options=t||{};for(var e in t)t.hasOwnProperty(e)&&(this.options[e]=t[e]);this.CLASSNAME="GeocodeRequest"}return n.prototype={strRequest:null,oAddress:null,oFilter:null,template:'<GeocodeRequest returnFreeForm="__RETURNFREEFORM__">__ADDRESS__</GeocodeRequest>',addAddress:function(t){t instanceof e&&(this.oAddress=t)},addFilter:function(t){t instanceof o&&(this.oFilter=t)},constructor:n,toString:function(){var t="";if(t=this.template,!this.oAddress){var o={};if(o.location=this.options.location,o.type=this.options.filterOptions.type||["StreetAddress"],o.filter=this.options.filterOptions,delete o.filter.type,this.oFilter){o.filter={};for(var n in o.type){var i=o.type[n],s=this.oFilter.getFilter(i);if(s){for(var r=this.options.filterOptions,a=s.attributesList,l=0;l<a.length;l++){var c=a[l];if(r[c]){var u=s.serviceAttributes[l];s.placeAttributes[u]=r[c]}}var h=s.placeAttributes;for(var d in h)h.hasOwnProperty(d)&&(o.filter[d]=h[d])}}}if(this.oAddress=new e(o),!this.oAddress)throw new Error("La construction de l'adresse n'est pas correctement definie !?")}return t=t.replace(/__ADDRESS__/g,this.oAddress.toString()),t=t.replace(/__RETURNFREEFORM__/g,this.options.returnFreeForm?"true":"false"),this.strRequest=t,this.strRequest}},n}(o,H,Y),Z=function(t){function e(t){if(!(this instanceof e))throw new TypeError("Position constructor cannot be called as a function.");if(this.options=t||{},!t.position)throw new Error("l'option 'position' n'est pas renseignée !");for(var o in t)t.hasOwnProperty(o)&&(this.options[o]=t[o])}return e.prototype={constructor:e,requestString:null,template:{position:"<Position>__GMLPOINT____GMLFILTER__</Position>",gml:{point:'<gml:Point xmlns:gml="http://www.opengis.net/gml"><gml:pos>__X__ __Y__</gml:pos></gml:Point>',pos:null,filter:{bbox:'<gml:Envelope xmlns:gml="http://www.opengis.net/gml"><gml:lowerCorner>__LEFT__ __BOTTOM__</gml:lowerCorner><gml:upperCorner>__RIGHT__ __TOP__</gml:upperCorner></gml:Envelope>',circle:'<gml:CircleByCenterPoint xmlns:gml="http://www.opengis.net/gml"><gml:pos>__X__ __Y__</gml:pos><gml:radius>__RADIUS__</gml:radius></gml:CircleByCenterPoint>',polygon:'<gml:Polygon xmlns:gml="http://www.opengis.net/gml"><gml:exterior><gml:LinearRing><gml:posList>__XY__</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon>',multipolygon:null}}}},e.prototype.toString=function(){var t=this.template.position,e=this.template.gml.point;e=e.replace(/__X__/g,this.options.position.x),e=e.replace(/__Y__/g,this.options.position.y);var o="";if(this.options.filter){var n=this.options.filter;for(var i in n)switch(i){case"circle":o=this.template.gml.filter[i],o=o.replace(/__X__/g,n[i].x),o=o.replace(/__Y__/g,n[i].y),o=o.replace(/__RADIUS__/g,n[i].radius);break;case"bbox":o=this.template.gml.filter[i],o=o.replace(/__LEFT__/g,n[i].left),o=o.replace(/__BOTTOM__/g,n[i].bottom),o=o.replace(/__RIGHT__/g,n[i].right),o=o.replace(/__TOP__/g,n[i].top);break;case"polygon":o=this.template.gml.filter[i];for(var s="",r=n[i],a=0;a<r.length;a++){var l=r[a];if(Array.isArray(l))break;(l.x&&l.y||0===l.x||0===l.y)&&(s+=l.x+" "+l.y),r.length!==a+1&&(s+=" ")}o=o.replace(/__XY__/g,s);break;case"multipolygon":}}return t=t.replace(/__GMLPOINT__/g,e),t=t.replace(/__GMLFILTER__/g,o),this.requestString=t,this.requestString},e}(o),X=function(t){function e(t){if(!(this instanceof e))throw new TypeError("Preference constructor cannot be called as a function.");this.type=t}return e.prototype={constructor:e,requestString:null,template:"<ReverseGeocodePreference>__TYPE__</ReverseGeocodePreference>"},e.prototype.toString=function(){for(var t=[],e="",o=0;o<this.type.length;o++)e=this.template,e=e.replace(/__TYPE__/g,this.type[o]),t.push(e);return this.strRequest=t.join("\n"),this.strRequest},e}(o),Q=function(t,e,o){function n(t){if(!(this instanceof n))throw new TypeError("ReverseGeocodeRequest constructor cannot be called as a function.");this.options=t||{};for(var e in t)t.hasOwnProperty(e)&&(this.options[e]=t[e]);this.CLASSNAME="ReverseGeocodeRequest"}return n.prototype={strRequest:null,oPosition:null,oPreference:null,constructor:n,template:'<ReverseGeocodeRequest returnFreeForm="__RETURNFREEFORM__">__POSITION____PREFERENCE__</ReverseGeocodeRequest>',addPosition:function(t){t instanceof e&&(this.oPosition=t)},addPreferences:function(t){t instanceof o&&(this.oPreference=t)},toString:function(){var t="";if(t=this.template,!this.oPreference&&(this.oPreference=new o(this.options.filterOptions.type||["StreetAddress"]),!this.oPreference))throw new Error("Les preferences ne sont pas definies !?");if(t=t.replace(/__PREFERENCE__/g,this.oPreference.toString()),!this.oPosition){var n={position:this.options.position,filter:{}};if(this.options.filterOptions&&(n.filter=this.options.filterOptions,delete n.filter.type),this.oPosition=new e(n),!this.oPosition)throw new Error("La position et ses filtres ne sont pas definis !?")}return t=t.replace(/__POSITION__/g,this.oPosition.toString()),t=t.replace(/__RETURNFREEFORM__/g,this.options.returnFreeForm?"true":"false"),this.strRequest=t,this.strRequest}},n}(o,Z,X),J=function(t,e,o,n,i){function s(t){if(!(this instanceof s))throw new TypeError("LocationUtilityService constructor cannot be called as a function.");this.CLASSNAME="LocationUtilityService",this.CLASSTYPE=null,e.apply(this,arguments),this.options&&(this.CLASSTYPE=this.options.location?"GeocodeRequest":this.options.position?"ReverseGeocodeRequest":null)}return s.prototype=Object.create(e.prototype,{}),s.prototype.constructor=s,s.prototype.addRequest=function(t){switch(this.CLASSTYPE=t.CLASSNAME,this.CLASSTYPE){case"GeocodeRequest":case"ReverseGeocodeRequest":this.oRequest=t;break;default:throw new Error("Ce n'est pas un objet de type 'LUS Request' !?")}},s.prototype.addFilter=function(t){t instanceof i&&(this.oFilter=t)},s.prototype.toString=function(){if(!this.oRequest){if(!this.options)throw new Error("Les options ne sont pas renseignées, impossible de construire la requête !");if("GeocodeRequest"===this.CLASSTYPE){var t={location:this.options.location,returnFreeForm:this.options.returnFreeForm,filterOptions:this.options.filterOptions||{}};this.oRequest=new o(t),this.oFilter&&this.oRequest.addFilter(this.oFilter)}else if("ReverseGeocodeRequest"===this.CLASSTYPE){var e={position:this.options.position,returnFreeForm:this.options.returnFreeForm,filterOptions:this.options.filterOptions||{}};this.oRequest=new n(e)}}if(!this.oRequest)throw new Error("Type de Geocodage indefini !");return this.strRequest=this.oRequest.toString(),this.strRequest},s}(o,z,K,Q,Y),$=function(){function t(){if(!(this instanceof t))throw new TypeError("GeocodeLocation constructor cannot be called as a function.");this.placeAttributes={},this.attributesList=[],this.serviceAttributes=[]}return t.prototype={constructor:t},t}(),tt=function(t){function e(){if(!(this instanceof e))throw new TypeError("StreetAddress constructor cannot be called as a function.");t.apply(this,arguments),this.CLASSNAME="StreetAddress",this.attributesList=["bbox","ID","IDTR","quality","territory","commune","department","insee","municipality"],this.serviceAttributes=["bbox","ID","IDTR","Qualite","Territoire","Commune","Departement","INSEE","Municipality"]}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}($),et=function(t){function e(){if(!(this instanceof e))throw new TypeError("PositionOfInterest constructor cannot be called as a function.");t.apply(this,arguments),this.CLASSNAME="PositionOfInterest",this.attributesList=["bbox","importance","nature","territory","commune","department","insee","municipality"],this.serviceAttributes=["bbox","Importance","Nature","Territoire","Commune","Departement","INSEE","Municipality"]}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}($),ot=function(t){function e(){if(!(this instanceof e))throw new TypeError("CadastralParcel constructor cannot be called as a function.");t.apply(this,arguments),this.CLASSNAME="CadastralParcel",this.attributesList=["absorbedCity","sheet","number","section","commune","department","insee","municipality","origin"],this.serviceAttributes=["CommuneAbsorbee","Feuille","Numero","Section","Commune","Departement","INSEE","Municipality","Type"]}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}($),nt=function(t){function e(){if(!(this instanceof e))throw new TypeError("Administratif constructor cannot be called as a function.");t.apply(this,arguments),this.CLASSNAME="Administratif",this.attributesList=["bbox","prefecture","inseeRegion","inseeDepartment","municipality"],this.serviceAttributes=["bbox","Prefecture","InseeRegion","InseeDepartement","Municipality"]}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}($),it=function(t,e,o,n,i,s,r,a){var l={build:function(t){var l=null,c=new n;c.addFilterExtensions(new a),c.addFilterExtensions(new i),c.addFilterExtensions(new s),c.addFilterExtensions(new r);var u=new o({location:t.location,returnFreeForm:t.returnFreeForm,filterOptions:t.filterOptions});u.addFilter(c);var h=new e({srsName:t.srs,maximumResponses:t.maximumResponses});if(h.namespace=!0,h.setService(u),l=h.build(),"GET"==t.httpMethod){var d="qxml="+encodeURIComponent(l).replace(/\-/g,"%2D").replace(/\_/g,"%5F").replace(/\./g,"%2E").replace(/\!/g,"%21").replace(/\~/g,"%7E").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29");l=d}return l}};return l}(o,q,J,Y,tt,et,ot,nt),st=function(){function t(){if(!(this instanceof t))throw new TypeError("GeocodeResponse constructor cannot be called as a function.");this.locations=[]}return t.prototype={constructor:t},t}(),rt=function(){function t(){if(!(this instanceof t))throw new TypeError("GeocodedLocation constructor cannot be called as a function.");this.position={x:null,y:null},this.matchType=null,this.placeAttributes={},this.type=null}return t.prototype={constructor:t},t}(),at=function(t){function e(){if(!(this instanceof e))throw new TypeError("DirectGeocodedLocation constructor cannot be called as a function.");t.apply(this,arguments),this.CLASSNAME="DirectGeocodedLocation",this.accuracy=null}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}(rt),lt=function(t,e,o,n,i){function s(t){if(t.attributes.length>0){for(var e={},o=t.attributes,n=0;n<o.length;n++){var i=o[n];e[i.nodeName]=i.nodeValue}return e}}function r(t,e){if(t.hasChildNodes())for(var o,n,i,s=t.childNodes,a=0;a<s.length;a++)if(o=s[a],1===o.nodeType)if(n=o.localName||o.baseName||o.nodeName,i=o.prefix||c.DEFAULTPREFIX,c.READERS[i][n]){var l=c.READERS[i][n];l(o,e)}else r(o,e)}function a(t){var e,o="";return t.hasChildNodes()&&(e=t.firstChild,3===e.nodeType&&(o=e.nodeValue)),o}function l(t){if(t.attributes.length>0){var e=s(t);for(var o in e)if(e.hasOwnProperty(o)){if("version"===o&&e.version!==c.VERSION)return void console.log("[DirectGeocodeResponseReader] geocode version is not the expected one : there may be errors in parsing");if("xmlns"===o){if(e[o]!==c.NAMESPACES[c.DEFAULTPREFIX])return void console.log("[DirectGeocodeResponseReader] geocode response default namespace is not the expected one");continue}var n=o.split(":")[0],i=o.split(":")[1];if("xmlns"===n&&i&&c.NAMESPACES[i]&&c.NAMESPACES[i]!==e[o])return void console.log("[DirectGeocodeResponseReader] geocode response "+o+" namespace is not the expected one");if("schemaLocation"===i&&c.SCHEMALOCATION!==e[o])return void console.log("[DirectGeocodeResponseReader] geocode response schema location is not the expected one")}}}var c={};return c.VERSION="1.2",c.NAMESPACES={xmlns:"http://www.opengis.net/xls",gml:"http://www.opengis.net/gml",xls:"http://www.opengis.net/xls",xlsext:"http://www.opengis.net/xlsext",xsi:"http://www.w3.org/2001/XMLSchema-instance"},c.SCHEMALOCATION="http://wxs.ign.fr/schemas/olsAll.xsd",c.DEFAULTPREFIX="xls",c.READERS={xls:{XLS:function(t){var e=new n;return l(t),r(t,e),e},GeocodedAddress:function(t,e){var o=new i;r(t,o),e&&Array.isArray(e.locations)&&e.locations.push(o)},GeocodeMatchCode:function(t,e){var o=t.getAttribute("accuracy");o&&e&&(e.accuracy=parseFloat(o));var n=t.getAttribute("matchType");n&&e&&(e.matchType=n)},Address:function(t,e){var o=t.getAttribute("countryCode");e&&o&&(e.type=o),r(t,e)},freeFormAddress:function(t,e){e&&e.hasOwnProperty("placeAttributes")&&(e.placeAttributes.freeform=a(t))},Building:function(t,e){var o=t.getAttribute("number");e&&e.hasOwnProperty("placeAttributes")&&(o?e.placeAttributes.number=o:t.getAttribute("buildingName")?e.placeAttributes.number=t.getAttribute("buildingName"):t.getAttribute("subdivision")&&(e.placeAttributes.number=t.getAttribute("subdivision")))},Street:function(t,e){e&&e.hasOwnProperty("placeAttributes")&&("StreetAddress"===e.type?e.placeAttributes.street=a(t):"CadastralParcel"===e.type&&(e.placeAttributes.cadastralParcel=a(t)))},Place:function(t,e){var o=t.getAttribute("type"),n=a(t);if(e&&e.hasOwnProperty("placeAttributes"))if("Municipality"===o)e.placeAttributes.municipality=n;else if("Bbox"===o){var i=n.split(";");4===i.length&&(e.placeAttributes.bbox={left:parseFloat(i[0]),right:parseFloat(i[2]),top:parseFloat(i[1]),bottom:parseFloat(i[3])})}else"Commune"===o?e.placeAttributes.commune=n:"Departement"===o?e.placeAttributes.department=n:"INSEE"===o?e.placeAttributes.insee=n:"Qualite"===o?e.placeAttributes.quality=n:"Territoire"===o?e.placeAttributes.territory=n:"ID"===o?e.placeAttributes.ID=n:"ID_TR"===o?e.placeAttributes.IDTR=n:"Importance"===o?e.placeAttributes.importance=parseInt(n,10):"Nature"===o?e.placeAttributes.nature=n:"Numero"===o?e.placeAttributes.number=n:"Feuille"===o?e.placeAttributes.sheet=n:"Section"===o?e.placeAttributes.section=n:"CommuneAbsorbee"===o?e.placeAttributes.absorbedCity=n:"Arrondissement"===o?n&&(e.placeAttributes.arrondissement=n):"Type"===o?e.placeAttributes.origin=n:"Prefecture"===o?e.placeAttributes.prefecture=n:"InseeRegion"===o?e.placeAttributes.inseeRegion=n:"InseeDepartment"===o&&(e.placeAttributes.inseeDepartment=n)},PostalCode:function(t,e){e&&e.hasOwnProperty("placeAttributes")&&(e.placeAttributes.postalCode=a(t))},Error:function(t){var n=t.getAttribute("message"),i=t.getAttribute("errorCode"),s=e.getMessage("SERVICE_RESPONSE_EXCEPTION","("+i+") : "+n);throw new o({message:s,type:o.TYPE_SRVERR})}},gml:{pos:function(t,e){var o=a(t);e&&o&&(e.position={x:parseFloat(o.split(" ")[0]),y:parseFloat(o.split(" ")[1])})}},ExceptionReport:function(t){var e={};if(t.hasChildNodes())for(var o,n=t.childNodes,i=0;i<n.length;i++)o=n[i],"Exception"===o.nodeName&&(e.exceptionReport=c.READERS.Exception(o));return e},Exception:function(t){var e={},o=t.getAttribute("exceptionCode");o&&(e.exceptionCode=o);var n=t.firstChild;return n&&3===n.nodeType&&(e.exception=n.nodeValue),e}},c.read=function(t){if("XLS"===t.nodeName){var n=t.prefix;n||(n=c.DEFAULTPREFIX);var i=c.READERS[n][t.nodeName](t);return i}if("ExceptionReport"===t.nodeName){var s=c.READERS[t.nodeName](t);return s}var r=e.getMessage("SERVICE_RESPONSE_ANALYSE",t.nodeName);throw new o({message:r,type:o.TYPE_UNKERR,status:200})},c}(o,r,a,st,at),ct=function(t,e,o,n,i){var s={build:function(t){var s=null;if(!t.response)return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_EMPTY"),type:e.TYPE_SRVERR,status:-1}));if(t.rawResponse)s=t.response;else{try{var r=new n({reader:i});if("string"==typeof t.response?r.setXMLString(t.response):r.setXMLDoc(t.response),s=r.parse(),!s)throw new Error("L'analyse de la réponse du service !?")}catch(n){var a=n.message;return a+="string"==typeof t.response?"('"+t.response+"')":"('"+t.response.documentElement.innerHTML+"')",void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_ANALYSE",a),type:e.TYPE_UNKERR,status:-1}))}if(s.exceptionReport)return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_EXCEPTION",s.exceptionReport),type:e.TYPE_SRVERR,status:200}))}t.onSuccess.call(t.scope,s)}};return s}(o,a,r,v,lt),ut=function(t,e,o,n,i,s){function r(t){if(!(this instanceof r))throw new TypeError(e.getMessage("CLASS_CONSTRUCTOR","Geocode"));if(this.CLASSNAME="Geocode",n.apply(this,arguments),!t.location)throw new Error(e.getMessage("PARAM_MISSING","location"));if("object"==typeof t.location&&0===Object.keys(t.location).length)throw new Error(e.getMessage("PARAM_EMPTY","location"));if("string"==typeof t.location&&0===t.location.length)throw new Error(e.getMessage("PARAM_EMPTY","location"));this.options.location=t.location,t.filterOptions&&"object"==typeof t.filterOptions||(this.options.filterOptions=t.filterOptions={type:["StreetAddress"]}),0===Object.keys(t.filterOptions).length&&(this.options.filterOptions={type:["StreetAddress"]});for(var o=Object.keys(t.filterOptions),i=0;i<o.length;i++){var s=o[i],a=["department","number","postalCode","insee","importance","ID","IDTR","absorbedCity","sheet","section","inseeRegion","inseeDepartment"];a.indexOf(s)!==-1&&"string"!=typeof t.filterOptions[s]&&(t.filterOptions[s]=t.filterOptions[s].toString()),t.filterOptions[s]||delete this.options.filterOptions[s]}this.options.filterOptions.type=t.filterOptions.type||["StreetAddress"],this.options.maximumResponses=t.maximumResponses||25,this.options.returnFreeForm=t.returnFreeForm||!1,this.options.srs=t.srs||"EPSG:4326",this.options.outputFormat="xml"}return r.prototype=Object.create(n.prototype,{}),r.prototype.constructor=r,r.prototype.buildRequest=function(t,n){var s={httpMethod:this.options.httpMethod,location:this.options.location,returnFreeForm:this.options.returnFreeForm,filterOptions:this.options.filterOptions,srs:this.options.srs,maximumResponses:this.options.maximumResponses};this.request=i.build(s),this.request?n.call(this,this.request):t.call(this,new o(e.getMessage("SERVICE_REQUEST_BUILD")))},r.prototype.analyzeResponse=function(t,n){if(this.response){var i={response:this.response,rawResponse:this.options.rawResponse,onError:t,onSuccess:n,scope:this};s.build(i)}else t.call(this,new o(e.getMessage("SERVICE_RESPONSE_EMPTY")))},r}(o,r,a,h,it,ct),ht=function(t,e,o){var n={build:function(t){var n=t||{},i=null,s=new o({position:n.position,returnFreeForm:n.returnFreeForm,filterOptions:n.filterOptions}),r=new e({srsName:n.srs,maximumResponses:n.maximumResponses});if(r.namespace=!0,r.setService(s),i=r.build(),"GET"==n.httpMethod){var a="qxml="+encodeURIComponent(i).replace(/\-/g,"%2D").replace(/\_/g,"%5F").replace(/\./g,"%2E").replace(/\!/g,"%21").replace(/\~/g,"%7E").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29");i=a}return i}};return n}(o,q,J),dt=function(t){function e(){if(!(this instanceof e))throw new TypeError("ReverseGeocodedLocation constructor cannot be called as a function.");t.apply(this,arguments),this.CLASSNAME="ReverseGeocodedLocation",this.searchCenterDistance=null}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}(rt),pt=function(t,e,o,n,i){function s(t){if(t.attributes.length>0){for(var e={},o=t.attributes,n=0;n<o.length;n++){var i=o[n];e[i.nodeName]=i.nodeValue}return e}}function r(t,e){if(t.hasChildNodes())for(var o,n,i,s=t.childNodes,a=0;a<s.length;a++)if(o=s[a],1===o.nodeType)if(n=o.localName||o.baseName||o.nodeName,i=o.prefix||c.DEFAULTPREFIX,c.READERS[i][n]){var l=c.READERS[i][n];l(o,e)}else r(o,e)}function a(t){var e,o="";return t.hasChildNodes()&&(e=t.firstChild,3===e.nodeType&&(o=e.nodeValue)),o}function l(t){if(t.attributes.length>0){var e=s(t);for(var o in e)if(e.hasOwnProperty(o)){if("version"===o&&e.version!==c.VERSION)return void console.log("[ReverseGeocodeResponseReader] geocode version is not the expected one : there may be errors in parsing");if("xmlns"===o){if(e[o]!==c.NAMESPACES[c.DEFAULTPREFIX])return void console.log("[ReverseGeocodeResponseReader] geocode response default namespace is not the expected one");continue}var n=o.split(":")[0],i=o.split(":")[1];if("xmlns"===n&&i&&c.NAMESPACES[i]&&c.NAMESPACES[i]!==e[o])return void console.log("[ReverseGeocodeResponseReader] geocode response "+o+" namespace is not the expected one");if("schemaLocation"===i&&c.SCHEMALOCATION!==e[o])return void console.log("[ReverseGeocodeResponseReader] geocode response schema location is not the expected one")}}}var c={};return c.VERSION="1.2",c.NAMESPACES={xmlns:"http://www.opengis.net/xls",gml:"http://www.opengis.net/gml",xls:"http://www.opengis.net/xls",xlsext:"http://www.opengis.net/xlsext",xsi:"http://www.w3.org/2001/XMLSchema-instance"},c.SCHEMALOCATION="http://wxs.ign.fr/schemas/olsAll.xsd",c.DEFAULTPREFIX="xls",c.READERS={xls:{XLS:function(t){var e=new n;return l(t),r(t,e),e},ReverseGeocodedLocation:function(t,e){var o=new i;r(t,o),e&&Array.isArray(e.locations)&&e.locations.push(o)},Address:function(t,e){var o=t.getAttribute("countryCode");e&&o&&(e.type=o),r(t,e)},Building:function(t,e){var o=t.getAttribute("number");e&&e.hasOwnProperty("placeAttributes")&&(o?e.placeAttributes.number=o:t.getAttribute("buildingName")?e.placeAttributes.number=t.getAttribute("buildingName"):t.getAttribute("subdivision")&&(e.placeAttributes.number=t.getAttribute("subdivision")))},Street:function(t,e){"StreetAddress"===e.type?e.placeAttributes.street=a(t):"CadastralParcel"===e.type&&(e.placeAttributes.cadastralParcel=a(t))},Place:function(t,e){var o=t.getAttribute("type"),n=a(t);if(e&&e.hasOwnProperty("placeAttributes"))if("Municipality"===o)e.placeAttributes.municipality=n;else if("Bbox"===o){var i=n.split(";");4===i.length&&(e.placeAttributes.bbox={left:parseFloat(i[0]),right:parseFloat(i[2]),top:parseFloat(i[1]),bottom:parseFloat(i[3])})}else"Commune"===o?e.placeAttributes.commune=n:"Departement"===o?e.placeAttributes.department=n:"INSEE"===o?e.placeAttributes.insee=n:"Qualite"===o?e.placeAttributes.quality=n:"Territoire"===o?e.placeAttributes.territory=n:"ID"===o?e.placeAttributes.ID=n:"ID_TR"===o?e.placeAttributes.IDTR=n:"Importance"===o?e.placeAttributes.importance=parseInt(n,10):"Nature"===o?e.placeAttributes.nature=n:"Numero"===o?e.placeAttributes.number=n:"Feuille"===o?e.placeAttributes.sheet=n:"Section"===o?e.placeAttributes.section=n:"CommuneAbsorbee"===o?e.placeAttributes.absorbedCity=n:"Arrondissement"===o?n&&(e.placeAttributes.arrondissement=n):"Type"===o?e.placeAttributes.origin=n:"Prefecture"===o?e.placeAttributes.prefecture=n:"InseeRegion"===o?e.placeAttributes.inseeRegion=n:"InseeDepartment"===o&&(e.placeAttributes.inseeDepartment=n)},PostalCode:function(t,e){e&&e.hasOwnProperty("placeAttributes")&&(e.placeAttributes.postalCode=a(t))},SearchCentreDistance:function(t,e){e&&(e.searchCenterDistance=parseFloat(t.getAttribute("value")))},Error:function(t){var n=t.getAttribute("message"),i=t.getAttribute("errorCode"),s=e.getMessage("SERVICE_RESPONSE_EXCEPTION","("+i+") : "+n);throw new o({message:s,type:o.TYPE_SRVERR})}},gml:{pos:function(t,e){var o=a(t);e&&o&&(e.position={x:parseFloat(o.split(" ")[0]),y:parseFloat(o.split(" ")[1])})}},xlsext:{ExtendedGeocodeMatchCode:function(t,e){e&&(e.matchType=a(t))}},ExceptionReport:function(t){var e={};if(t.hasChildNodes())for(var o,n=t.childNodes,i=0;i<n.length;i++)o=n[i],"Exception"===o.nodeName&&(e.exceptionReport=c.READERS.Exception(o));return e},Exception:function(t){var e={},o=t.getAttribute("exceptionCode");o&&(e.exceptionCode=o);var n=t.firstChild;return n&&3===n.nodeType&&(e.exception=n.nodeValue),e}},c.read=function(t){if("XLS"===t.nodeName){var e=t.prefix;e||(e=c.DEFAULTPREFIX);var o=c.READERS[e][t.nodeName](t);return o}if("ExceptionReport"===t.nodeName){var n=c.READERS[t.nodeName](t);return n}throw new Error("Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.")},c}(o,r,a,st,dt),mt=function(t,e,o,n,i){var s={build:function(t){var s=null;if(!t.response)return void t.onError.call(t.scope,new o({message:e.getMessage("SERVICE_RESPONSE_EMPTY"),type:o.TYPE_SRVERR,status:-1}));if(t.rawResponse)s=t.response;else{try{var r=new n({reader:i});if("string"==typeof t.response?r.setXMLString(t.response):r.setXMLDoc(t.response),s=r.parse(),!s)throw new Error("L'analyse de la réponse du service !?")}catch(e){return e.status=200,void t.onError.call(t.scope,e)}if(s.exceptionReport)return void t.onError.call(t.scope,new o({message:e.getMessage("SERVICE_RESPONSE_EXCEPTION",s.exceptionReport),type:o.TYPE_SRVERR,status:200}));if(t.scope&&t.scope.options&&t.scope.options.srs&&"EPSG:4326"!==t.scope.options.srs){var a,l;if(s||s.locations||s.locations.length)for(var c=0;c<s.locations.length;c++)a=s.locations[c],a&&(l=a.position,l&&(a.position={x:l.y,y:l.x}))}}t.onSuccess.call(t.scope,s)}};return s}(o,r,a,v,pt),ft=function(t,e,o,n,i,s){function r(t){if(!(this instanceof r))throw new TypeError(e.getMessage("CLASS_CONSTRUCTOR","ReverseGeocode"));if(this.CLASSNAME="ReverseGeocode",n.apply(this,arguments),!t.position)throw new Error(e.getMessage("PARAM_MISSING","position"));if(null==t.position.x)throw new Error(e.getMessage("PARAM_MISSING","position.x"));if(null==t.position.y)throw new Error(e.getMessage("PARAM_MISSING","position.y"));this.options.position=t.position,t.filterOptions&&"object"==typeof t.filterOptions||(this.options.filterOptions=t.filterOptions={type:["StreetAddress"]}),0===Object.keys(t.filterOptions).length&&(this.options.filterOptions={type:["StreetAddress"]});for(var o=Object.keys(t.filterOptions),i=0;i<o.length;i++){var s=o[i];t.filterOptions[s]&&0!==Object.keys(t.filterOptions[s]).length||delete this.options.filterOptions[s]}if(this.options.filterOptions.type=t.filterOptions.type||["StreetAddress"],!Array.isArray(this.options.filterOptions.type))throw new Error(e.getMessage("PARAM_TYPE","filterOptions.type"));if(this.options.maximumResponses=t.maximumResponses||25,
  this.options.returnFreeForm=t.returnFreeForm||!1,this.options.srs=t.srs||"CRS:84",r.geoEPSG.indexOf(this.options.srs)===-1){if(this.options.position={x:this.options.position.y,y:this.options.position.x},this.options.filterOptions&&this.options.filterOptions.circle){var a=this.options.filterOptions.circle;this.options.filterOptions.circle={x:a.y,y:a.x,radius:a.radius}}if(this.options.filterOptions&&this.options.filterOptions.polygon){var l=this.options.filterOptions.polygon;for(i=0;i<l.length;i++){var c=l[i];this.options.filterOptions.polygon[i]={x:c.y,y:c.x}}}}this.options.outputFormat="xml"}return r.prototype=Object.create(n.prototype,{}),r.prototype.constructor=r,r.prototype.buildRequest=function(t,n){var s={httpMethod:this.options.httpMethod,position:this.options.position,returnFreeForm:this.options.returnFreeForm,filterOptions:this.options.filterOptions,srs:"EPSG:4326",maximumResponses:this.options.maximumResponses};this.request=i.build(s),this.request?n.call(this,this.request):t.call(this,new o(e.getMessage("SERVICE_REQUEST_BUILD")))},r.prototype.analyzeResponse=function(t,n){if(this.response){var i={response:this.response,rawResponse:this.options.rawResponse,onError:t,onSuccess:n,scope:this};s.build(i)}else t.call(this,new o(e.getMessage("SERVICE_RESPONSE_EMPTY")))},r.geoEPSG=["EPSG:4326"],r}(o,r,a,h,ht,mt),gt=function(){function t(){if(!(this instanceof t))throw new TypeError("AutoCompleteResponse constructor cannot be called as a function.");this.suggestedLocations=[]}return t.prototype={constructor:t},t}(),_t=function(){function t(){if(!(this instanceof t))throw new TypeError("SuggestedLocation constructor cannot be called as a function.");this.type=null,this.position={x:null,y:null},this.commune=null,this.fullText=null,this.postalCode=null,this.classification=null,this.street=null,this.poi=null,this.kind=null}return t.prototype={constructor:t},t}(),yt=function(t,e,o,n,i,s){var r={build:function(t){var n=null;if(!t.response)return void t.onError.call(t.scope,new e(o.getMessage("SERVICE_RESPONSE_EMPTY")));if(t.rawResponse)n=t.response;else{var r;if(r="string"==typeof t.response?window.JSON.parse(t.response):t.response){if(r.error)return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_EXCEPTION",r.error.description),status:r.error.code,type:e.TYPE_SRVERR}));if(n=new i,!r.results||!Array.isArray(r.results))return void t.onError.call(t.scope,new e(o.getMessage("SERVICE_RESPONSE_FORMAT_3")));for(var a,l=0;l<r.results.length;l++){var c=r.results[l];a=new s,a&&(c&&"StreetAddress"===c.country?(a.street=c.street,a.type="StreetAddress"):c&&"PositionOfInterest"===c.country&&(a.poi=c.street,a.kind=c.kind,a.type="PositionOfInterest"),a.position&&(a.position.x=c.x,a.position.y=c.y),a.commune=c.city,a.fullText=c.fulltext,a.postalCode=c.zipcode,a.classification=c.classification),n.suggestedLocations.push(a)}if(!n.suggestedLocations.length)return void t.onError.call(t.scope,new e(o.getMessage("SERVICE_RESPONSE_FORMAT_3")))}if(!n)return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_ANALYSE_2"),type:e.TYPE_UNKERR,status:-1}));if(n.exceptionReport)return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_EXCEPTION",n.exceptionReport),type:e.TYPE_SRVERR,status:200}))}t.onSuccess.call(t.scope,n)}};return r}(o,a,r,v,gt,_t),vt=function(t,e,o,n,i,s){function r(e){if(!(this instanceof r))throw new TypeError(n.getMessage("CLASS_CONSTRUCTOR","AutoComplete"));if(this.CLASSNAME="AutoComplete",t.apply(this,arguments),!e.text)throw new Error(n.getMessage("PARAM_MISSING","text"));this.options.text=e.text,e.filterOptions&&"object"==typeof e.filterOptions||(this.options.filterOptions=e.filterOptions={territory:[],type:["StreetAddress"]}),0===Object.keys(e.filterOptions).length&&(this.options.filterOptions={territory:[],type:["StreetAddress"]}),this.options.filterOptions.type=e.filterOptions.type||["StreetAddress"],this.options.filterOptions.territory=e.filterOptions.territory||[],this.options.maximumResponses=e.maximumResponses||10,"XHR"===this.options.protocol&&"POST"===this.options.httpMethod&&(this.options.httpMethod="GET"),this.options.outputFormat="json"}return r.prototype=Object.create(t.prototype,{}),r.prototype.constructor=r,r.prototype.buildRequest=function(t,e){var o="";this.options.filterOptions.territory&&(o=this.options.filterOptions.territory.join(";"));var n="";this.options.filterOptions.type&&(n=this.options.filterOptions.type.join(",")),this.request=s.normalyzeParameters({text:encodeURIComponent(this.options.text),type:n,terr:o,maximumResponses:this.options.maximumResponses}),e.call(this,this.request)},r.prototype.analyzeResponse=function(t,o){if(this.response){var s={response:this.response,rawResponse:this.options.rawResponse,onSuccess:o,onError:t,scope:this};e.build(s)}else t.call(this,new i(n.getMessage("SERVICE_RESPONSE_EMPTY")))},r}(h,yt,o,r,a,n),Et=function(t){function e(t){if(!(this instanceof e))throw new TypeError("RoutePlan constructor cannot be called as a function.");if(this.options=t||{},!t.startPoint)throw new Error("l'option 'startPoint' n'est pas renseignée !");if(!t.endPoint)throw new Error("l'option 'endPoint' n'est pas renseignée !");for(var o in t)t.hasOwnProperty(o)&&(this.options[o]=t[o])}return e.prototype={constructor:e,requestString:null,template:{routePlan:"<RoutePlan>__ROUTEPREFERENCE____GRAPH____WAYPOINTLIST____AVOIDLIST__</RoutePlan>",routePreference:"<RoutePreference>__VALUEROUTEPREFERENCE__</RoutePreference>",graph:'<xlsext:graphName xmlns:xlsext="http://www.opengis.net/xlsext" name="__VALUEGRAPH__"/>',wayPointList:{container:"<WayPointList>__STARTPOINT____VIAPOINT____ENDPOINT__</WayPointList>",point:'<Position><gml:Point xmlns:gml="http://www.opengis.net/gml"><gml:pos>__X__ __Y__</gml:pos></gml:Point></Position>',startPoint:"<StartPoint>__POINT__</StartPoint>",endPoint:"<EndPoint>__POINT__</EndPoint>",viaPoint:"<ViaPoint>__POINT__</ViaPoint>"},avoidList:{container:"<AvoidList>__AVOIDFEATURE__</AvoidList>",avoidFeature:"<AvoidFeature>__VALUEAVOIDFEATURE__</AvoidFeature>"}},toString:function(){var t="";if(t=this.template.routePlan,this.options.routePreference){var e=this.template.routePreference;e=e.replace(/__VALUEROUTEPREFERENCE__/,this.options.routePreference),t=t.replace(/__ROUTEPREFERENCE__/g,e)}if(t=t.replace(/__ROUTEPREFERENCE__/g,""),this.options.avoidFeature){for(var o=this.template.avoidList.container,n=[],i=0;i<this.options.avoidFeature.length;i++){var s=this.template.avoidList.avoidFeature;s=s.replace(/__VALUEAVOIDFEATURE__/,this.options.avoidFeature[i]),n.push(s)}o=o.replace(/__AVOIDFEATURE__/,n.join("\n")),t=t.replace(/__AVOIDLIST__/g,o)}if(t=t.replace(/__AVOIDLIST__/g,""),this.options.graph){var r=this.template.graph;r=r.replace(/__VALUEGRAPH__/,this.options.graph),t=t.replace(/__GRAPH__/g,r)}t=t.replace(/__GRAPH__/g,"");var a=this.template.wayPointList.container,l="";if(l=this.template.wayPointList.point,l=l.replace(/__X__/,this.options.startPoint.x),l=l.replace(/__Y__/,this.options.startPoint.y),a=a.replace(/__STARTPOINT__/,this.template.wayPointList.startPoint.replace(/__POINT__/,l)),l=this.template.wayPointList.point,l=l.replace(/__X__/,this.options.endPoint.x),l=l.replace(/__Y__/,this.options.endPoint.y),a=a.replace(/__ENDPOINT__/,this.template.wayPointList.endPoint.replace(/__POINT__/,l)),this.options.viaPoint){for(var c=[],u=0;u<this.options.viaPoint.length;u++){var h=this.options.viaPoint[u];l=this.template.wayPointList.point,l=l.replace(/__X__/,h.x),l=l.replace(/__Y__/,h.y),c.push(l)}a=a.replace(/__VIAPOINT__/,this.template.wayPointList.viaPoint.replace(/__POINT__/,c.join("\n")))}else a=a.replace(/__VIAPOINT__/,"");return t=t.replace(/__WAYPOINTLIST__/g,a),this.requestString=t,this.requestString}},e}(o),St=function(t,e){function o(t){if(!(this instanceof o))throw new TypeError("DetermineRouteRequest constructor cannot be called as a function.");this.options=t||{};for(var e in t)t.hasOwnProperty(e)&&(this.options[e]=t[e]);this.CLASSNAME="DetermineRouteRequest"}return o.prototype={strRequest:null,oRoutePlan:null,template:{determineRouteRequest:'<DetermineRouteRequest distanceUnit="__DISTANCEUNIT__">__ROUTEPLAN____ROUTEINSTRUCTIONREQUEST____ROUTEGEOMETRYREQUEST____ROUTEMAPREQUEST__</DetermineRouteRequest>',routeInstructionRequest:'<RouteInstructionsRequest provideGeometry="__PROVIDEGEOMETRY__" provideBoundingBox="__PROVIDEBBOX__" />',routeGeometryRequest:"<RouteGeometryRequest />",routeMapRequest:""},addRoute:function(t){t instanceof e&&(this.oRoutePlan=t)},constructor:o,toString:function(){var t="";if(t=this.template.determineRouteRequest,t=t.replace(/__DISTANCEUNIT__/g,this.options.distanceUnit||"KM"),!this.oRoutePlan){var o=this.options.route;if(this.oRoutePlan=new e(o),!this.oRoutePlan)throw new Error("La construction du calcul d'initineraire n'est pas correctement definie !?")}t=t.replace(/__ROUTEPLAN__/g,this.oRoutePlan.toString());var n=this.template.routeInstructionRequest;n=n.replace(/__PROVIDEGEOMETRY__/g,this.options.provideGeometry||!1),n=n.replace(/__PROVIDEBBOX__/g,this.options.provideBoundingBox||!1),t=t.replace(/__ROUTEINSTRUCTIONREQUEST__/g,n);var i=this.template.routeGeometryRequest;t=t.replace(/__ROUTEGEOMETRYREQUEST__/g,i);var s=this.template.routeMapRequest;return t=t.replace(/__ROUTEMAPREQUEST__/g,s),this.strRequest=t,this.strRequest}},o}(o,Et),Ct=void 0,At=function(t,e,o,n){function i(t){if(!(this instanceof i))throw new TypeError("RouteService constructor cannot be called as a function.");this.CLASSNAME="RouteService",this.CLASSTYPE="RouteRequest",e.apply(this,arguments)}return i.prototype=Object.create(e.prototype,{}),i.prototype.constructor=i,i.prototype.addRequest=function(t){if("DetermineRouteRequest"!==t.CLASSNAME)throw new Error("Ce n'est pas un objet de type 'Route Request' !?");this.oRequest=t},i.prototype.addFilter=function(t){t instanceof n&&(this.oFilter=t)},i.prototype.toString=function(){if(!this.oRequest){if(!this.options)throw new Error("Les options ne sont pas renseignées, impossible de construire la requête !");if("RouteRequest"===this.CLASSTYPE){var t={distanceUnit:this.options.distanceUnit||null,provideGeometry:this.options.provideGeometry||null,provideBoundingBox:this.options.provideBoundingBox||null,route:{routePreference:this.options.routePreference||null,startPoint:this.options.startPoint,viaPoint:this.options.viaPoint||null,endPoint:this.options.endPoint,avoidFeature:this.options.avoidFeature||null,graph:this.options.graph||null,expectedStartTime:this.options.expectedStartTime||null}};this.oRequest=new o(t),this.oFilter&&this.oRequest.addFilter(this.oFilter)}}if(!this.oRequest)throw new Error("Type de requête indefini !");return this.strRequest=this.oRequest.toString(),this.strRequest},i}(o,z,St,Ct),Pt=function(t,e,o){var n={build:function(t){var n=null,i={startPoint:t.startPoint,endPoint:t.endPoint,viaPoint:t.viaPoints,provideBoundingBox:t.provideBbox,avoidFeature:t.exclusions,expectedStartTime:t.expectedStartTime,distanceUnit:t.distanceUnit,graph:t.graph,provideGeometry:t.geometryInInstructions,routePreference:t.routePreference},s=new o(i),r=new e({srsName:t.srs,maximumResponses:t.maximumResponses});if(r.namespace=!0,r.setService(s),n=r.build(),"GET"==t.httpMethod){var a="qxml="+encodeURIComponent(n).replace(/\-/g,"%2D").replace(/\_/g,"%5F").replace(/\./g,"%2E").replace(/\!/g,"%21").replace(/\~/g,"%7E").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29");n=a}return n}};return n}(o,q,At),Mt=function(t){function e(t){if(!(this instanceof e))throw new TypeError("RouteParamREST constructor cannot be called as a function.");if(this.options=t||{},this.origin=this.options.startPoint.x+","+this.options.startPoint.y,this.destination=this.options.endPoint.x+","+this.options.endPoint.y,this.waypoints=this.options.viaPoints||null,this.startDateTime=this.options.expectedStartTime||null,this.graphName=this.options.graph,this.srs=this.options.srs,this.exclusions=this.options.exclusions,this.method="TIME",this.options.routePreference){var o=this.options.routePreference;switch(o){case"fastest":this.method="TIME";break;case"shortest":this.method="DISTANCE";break;default:this.method="TIME"}}this.format=this.options.geometryInInstructions?"STANDARDEXT":"STANDARD",this.tolerance=10,this.profileId=null,this.profileName=null}return e.CLASSNAME="RouteParamREST",e.prototype={constructor:e,getWaypoints:function(){if(this.waypoints){for(var t=[],e=0;e<this.waypoints.length;e++){var o=this.waypoints[e];t.push(o.x+","+o.y)}return t.join(";")}},getExclusions:function(){return this.exclusions.join(";")}},e.prototype.getParams=function(){var t=[];return t.push({k:"origin",v:this.origin}),t.push({k:"destination",v:this.destination}),t.push({k:"method",v:this.method}),this.waypoints&&t.push({k:"waypoints",v:this.getWaypoints()}),this.startDateTime&&t.push({k:"startDateTime",v:this.startDateTime}),this.graphName&&t.push({k:"graphName",v:this.graphName}),this.exclusions&&t.push({k:"exclusions",v:this.getExclusions()}),this.srs&&t.push({k:"srs",v:this.srs}),this.format&&t.push({k:"format",v:this.format}),t},e}(o),wt=function(t,e,o){function n(t){if(!(this instanceof n))throw new TypeError("RouteRequestREST constructor cannot be called as a function.");if(!t)throw new Error(e.getMessage("PARAM_EMPTY","options"));this.settings=t}return n.prototype={requestString:null,constructor:n,processRequestString:function(){for(var t=new o(this.settings),e=t.getParams(),n="",i=0;i<e.length;i++){var s=e[i];n&&(n+="&"),n+=s.k+"="+s.v}return this.requestString=n,this.requestString}},n}(o,r,Mt),It=function(t,e,o,n){var i={build:function(t){var i=null,s=t||{},r=null!==t.onError&&"function"==typeof t.onError,a=null;switch(t.api){case"REST":var l=new n(s);if(!l.processRequestString()){if(a="Error process request (rest) !",r)return void t.onError.call(t.scope,new e(a));throw new Error(a)}i=l.requestString;break;case"OLS":if(i=o.build(s),!i){if(a="Error process request (ols) !",r)return void t.onError.call(t.scope,new e(a));throw new Error(a)}break;default:if(a="Type of API is not supported by service (REST or OLS) !",r)return void t.onError.call(t.scope,new e(a));throw new Error(a)}return i}};return i}(o,a,Pt,wt),Rt=function(t){var e={toJson:function(t,e,o){var n=null;try{if(!t)throw new Error("La chaine WKT n'est pas renseignée !");e||(e=function(t){console.log(t)}),o||(o=function(t){console.log(t)});var i,s,r;if(i=/(-?\d+\.?[0-9]*)\s(-?\d+\.?[0-9]+)/g,s="[$1,$2]",t=t.replace(i,s),i=/^(\w+)/,r=i.exec(t),"POLYGON"===RegExp.$1?(s='{"type" : "Polygon",',t=t.replace(RegExp.$1,s),i=/(\({2}?)/,s='"coordinates" : [[',t=t.replace(i,s),i=/(\){2}?)/,s="]]}",t=t.replace(i,s),i=/(\()/g,s="[",t=t.replace(i,s),i=/(\))/g,s="]",t=t.replace(i,s)):"LINESTRING"===RegExp.$1&&(s='{"type" : "LineString",',t=t.replace(RegExp.$1,s),i=/(\(\(?)/,s='"coordinates" : [',t=t.replace(i,s),i=/(\)\)?)/,s="]}",t=t.replace(i,s)),n=JSON.parse(t),!n)throw new Error("Le JSON est vide !");if(!n.type)throw new Error("Le type de geometrie n'est pas connu !");if(!n.coordinates)throw new Error("La liste des points est vide !");e.call(this,n)}catch(t){if("SyntaxError"===t.name)return void o.call(this,"Erreur de parsing JSON !");o.call(this,t)}}};return e}(o),Gt=function(){function t(){if(!(this instanceof t))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,this.routeInstructions=[]}return t.prototype={constructor:t},t}(),bt=function(){function t(){if(!(this instanceof t))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}return t.prototype={constructor:t},t}(),xt=function(t,e,o,n,i,s){function r(t){var e,o="";return t.hasChildNodes()&&(e=t.firstChild,e&&3===e.nodeType&&(o=e.nodeValue)),o}function a(t,e){if(t.hasChildNodes())for(var o,n,i=t.childNodes,s=0;s<i.length;s++)if(o=i[s],1===o.nodeType)if(n=o.localName||o.baseName||o.nodeName,l.READERS[n]){var r=l.READERS[n];r(o,e)}else a(o,e)}var l={};return l.READERS={routeResult:function(t){var e=new i;if(a(t,e),"error"===e.status){var s=o.getMessage("SERVICE_RESPONSE_EXCEPTION",e.message);throw new n({message:s,type:n.TYPE_SRVERR})}return e},status:function(t,e){var o=r(t);"ERROR"!==o&&"error"!==o||e&&(e.status="error")},message:function(t,e){e&&(e.message=r(t))},distance:function(t,e){e&&(e.totalDistance=r(t))},durationSeconds:function(t,e){e&&(e.totalTime=parseFloat(r(t)))},bounds:function(t,e){if(e&&e.bbox){var o=r(t).split(/[,;]/);e.bbox.left=parseFloat(o[0]),e.bbox.bottom=parseFloat(o[1]),e.bbox.right=parseFloat(o[2]),e.bbox.top=parseFloat(o[3])}},geometryWkt:function(t,n){if(n){var i=t.innerHTML,s=function(t){n.routeGeometry=t},r=function(){var t=o.getMessage("PARAM_FORMAT",["geometryWkt"]);throw new Error(t)};e.toJson(i,s,r)}},step:function(t,e){var o,n=new s;if(t.hasChildNodes)for(var i,a,l=t.childNodes,c=0;c<l.length;c++)i=l[c],1===i.nodeType&&(a=i.localName||i.baseName||i.nodeName,"durationSeconds"===a?n.duration=r(i):"distance"===a?n.distance=r(i):"navInstruction"===a?n.code=r(i):"name"===a&&(o=r(i)));if(n.code)switch(n.code){case"F":"Valeur non renseignée"!=o?n.instruction="Tout droit "+o:n.instruction="Continuer tout droit ";break;case"B":n.instruction="Demi-tour "+o;break;case"L":n.instruction="Tourner à gauche "+o;break;case"R":n.instruction="Tourner à droite "+o;break;case"BL":n.instruction="Tourner très à gauche "+o;break;case"BR":n.instruction="Tourner très à droite "+o;break;case"FL":n.instruction="Tourner légèrement à gauche "+o;break;case"FR":n.instruction="Tourner légèrement à droite "+o;break;case"round_about_entry":n.instruction="Entrée rond-point "+o;break;case"round_about_exit":n.instruction="Sortie rond-point "+o;break;case null:n.instruction="Prendre "+o;break;default:n.instruction="?"+n.code+"? "+o}Array.isArray(e.routeInstructions)&&e.routeInstructions.push(n)}},l.read=function(t){var e;if("routeResult"===t.nodeName)return e=l.READERS.routeResult(t);throw new Error("Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.")},l}(o,Rt,r,a,Gt,bt),Ot=function(t){var e={};return e.READERS={},e.read=function(t){},e}(o),Lt=function(t,e,o,n,i,s,r,a,l){var c={build:function(t){var c=null;if(!t.response)return void t.onError.call(t.scope,new e(i.getMessage("SERVICE_RESPONSE_EMPTY")));if(t.rawResponse)c=t.response;else{switch(t.outputFormat){case"xml":var u="REST"===t.api?s:r;try{var h=new o({reader:u});if("string"==typeof t.response?h.setXMLString(t.response):h.setXMLDoc(t.response),c=h.parse(),!c)throw new e(i.getMessage("SERVICE_RESPONSE_FORMAT","xml"))}catch(o){return void t.onError.call(t.scope,new e(i.getMessage("SERVICE_RESPONSE_ANALYSE",t.response)))}break;case"json":var d;if(d="string"==typeof t.response?window.JSON.parse(t.response):t.response,d.message)return void t.onError.call(t.scope,new e(i.getMessage("SERVICE_RESPONSE_EXCEPTION",d.message)));if(d){var p=[],m=[],f=[];if(c=new a,c.hasOwnProperty("totalTime")&&(c.totalTime=parseFloat(d.durationSeconds)),c.hasOwnProperty("totalDistance")&&(c.totalDistance="m"===t.distanceUnit?d.distanceMeters:d.distance),c.hasOwnProperty("bbox")){var g=d.bounds.split(/[,;]/);c.bbox.left=parseFloat(g[0]),c.bbox.bottom=parseFloat(g[1]),c.bbox.right=parseFloat(g[2]),c.bbox.top=parseFloat(g[3])}var _=function(t){c.routeGeometry=t},y=function(o){console.log(o),t.onError.call(t.scope,new e(i.getMessage("PARAM_FORMAT",["geometryWkt"])))};if(c.hasOwnProperty("routeGeometry")){var v=d.geometryWkt||d.simplifiedWkt;if(v&&(n.toJson(v,_,y),!c.routeGeometry))return}if(c.hasOwnProperty("routeInstructions")){var E,S=d.legs;if(Array.isArray(S)&&S.length)for(E=0;E<S.length;E++)p.push(S[E]);if(Array.isArray(p)&&p.length)for(E=0;E<p.length;E++)m.push(p[E].steps);if(Array.isArray(m)&&m.length)for(E=0;E<m.length;E++)f=f.concat(m[E]);f.forEach(function(e){c.routeInstructions.push(new l),c.routeInstructions[c.routeInstructions.length-1].duration=e.durationSeconds,c.routeInstructions[c.routeInstructions.length-1].distance="m"===t.distanceUnit?e.distanceMeters:e.distance,c.routeInstructions[c.routeInstructions.length-1].code=e.navInstruction;for(var o=[],n=0;n<e.points.length;n++){var i=e.points[n].split(",");i&&o.push(i)}switch(o&&0!==o.length?c.routeInstructions[c.routeInstructions.length-1].geometry={coordinates:o,type:"LineString"}:c.routeInstructions[c.routeInstructions.length-1].geometry=null,"Valeur non renseignée"==e.name&&(e.name=""),e.navInstruction){case"F":e.name?c.routeInstructions[c.routeInstructions.length-1].instruction="Tout droit "+e.name:c.routeInstructions[c.routeInstructions.length-1].instruction="Continuer tout droit ";break;case"B":c.routeInstructions[c.routeInstructions.length-1].instruction="Demi-tour "+e.name;break;case"L":c.routeInstructions[c.routeInstructions.length-1].instruction="Tourner à gauche "+e.name;break;case"R":c.routeInstructions[c.routeInstructions.length-1].instruction="Tourner à droite "+e.name;break;case"BL":c.routeInstructions[c.routeInstructions.length-1].instruction="Tourner très à gauche "+e.name;break;case"BR":c.routeInstructions[c.routeInstructions.length-1].instruction="Tourner très à droite "+e.name;break;case"FL":c.routeInstructions[c.routeInstructions.length-1].instruction="Tourner légèrement à gauche "+e.name;break;case"FR":c.routeInstructions[c.routeInstructions.length-1].instruction="Tourner légèrement à droite "+e.name;break;case"round_about_entry":c.routeInstructions[c.routeInstructions.length-1].instruction="Entrée rond-point "+e.name;break;case"round_about_exit":c.routeInstructions[c.routeInstructions.length-1].instruction="Sortie rond-point "+e.name;break;case null:c.routeInstructions[c.routeInstructions.length-1].instruction="Prendre tout droit "+e.name;break;default:c.routeInstructions[c.routeInstructions.length-1].instruction="?"+e.navInstruction+"? "+e.name}})}}if(!c)return void t.onError.call(t.scope,new e(i.getMessage("SERVICE_RESPONSE_ANALYSE","json")));break;default:return void t.onError.call(t.scope,new e(i.getMessage("SERVICE_RESPONSE_FORMAT","json","xml")))}if(c&&c.exceptionReport)return void t.onError.call(t.scope,new e(i.getMessage("SERVICE_RESPONSE_EXCEPTION_2")))}t.onSuccess.call(t.scope,c)}};return c}(o,a,v,Rt,r,xt,Ot,Gt,bt),Tt=function(t,e,o,n,i,s,r){function a(t){if(!(this instanceof a))throw new TypeError(e.getMessage("CLASS_CONSTRUCTOR","Route"));if(this.CLASSNAME="Route",n.apply(this,arguments),!t.startPoint)throw new Error(e.getMessage("PARAM_MISSING","startPoint"));if(null==t.startPoint.x)throw new Error(e.getMessage("PARAM_MISSING","startPoint.x"));if(null==t.startPoint.y)throw new Error(e.getMessage("PARAM_MISSING","startPoint.y"));if(!t.endPoint)throw new Error(e.getMessage("PARAM_MISSING","endPoint"));if(null==t.endPoint.x)throw new Error(e.getMessage("PARAM_MISSING","endPoint.x"));if(null==t.endPoint.y)throw new Error(e.getMessage("PARAM_MISSING","endPoint.y"));if(this.options.api="string"==typeof t.api?t.api.toUpperCase():"REST",this.options.outputFormat="string"==typeof t.outputFormat?t.outputFormat.toLowerCase():"json",this.options.startPoint=t.startPoint,this.options.endPoint=t.endPoint,this.options.viaPoints=t.viaPoints||null,this.options.exclusions=t.exclusions||null,this.options.routePreference=t.routePreference||"fastest",this.options.graph=t.graph||"Voiture",this.options.geometryInInstructions=t.geometryInInstructions||!1,this.options.provideBbox=t.provideBbox||!0,this.options.distanceUnit=t.distanceUnit||"km",this.options.expectedStartTime=null,this.options.srs=t.srs||"EPSG:4326",this.options.api="REST","XHR"===this.options.protocol&&(this.options.httpMethod="GET"),!this.options.serverUrl){var o=i.Route.url(this.options.apiKey),s=null;switch(this.options.api){case"OLS":s=o.ols;break;case"REST":var r="route-"+this.options.outputFormat;s=o[r];break;default:throw new Error(e.getMessage("PARAM_UNKNOWN","api"))}if(!s)throw new Error("Url by default not found !");this.options.serverUrl=s}var l=this.options.serverUrl.lastIndexOf(".");if(l!==-1){var c=this.options.serverUrl.substring(l+1);if(c&&c.length<5)switch(c.toLowerCase()){case"json":case"xml":this.options.outputFormat=c.toLowerCase();break;default:throw new Error("type of service : unknown or unsupported (json or xml) !")}}}return a.prototype=Object.create(n.prototype,{}),a.prototype.constructor=a,a.prototype.buildRequest=function(t,n){var i={api:this.options.api,startPoint:this.options.startPoint,endPoint:this.options.endPoint,viaPoints:this.options.viaPoints,provideBbox:this.options.provideBbox,exclusions:this.options.exclusions,distanceUnit:this.options.distanceUnit,graph:this.options.graph,geometryInInstructions:this.options.geometryInInstructions,routePreference:this.options.routePreference,srs:this.options.srs};this.request=s.build(i),this.request?n.call(this,this.request):t.call(this,new o(e.getMessage("SERVICE_REQUEST_BUILD")))},a.prototype.analyzeResponse=function(t,n){if(this.response){var i={distanceUnit:this.options.distanceUnit,response:this.response,outputFormat:this.options.outputFormat,api:this.options.api,rawResponse:this.options.rawResponse,onError:t,onSuccess:n,scope:this};r.build(i)}else t.call(this,new o(e.getMessage("SERVICE_RESPONSE_EMPTY")))},a}(o,r,a,h,u,It,Lt),Nt=function(t){function e(t){if(!(this instanceof e))throw new TypeError("ProcessIsoCurveParam constructor cannot be called as a function.");this.options=t||{},this.id=this.options.id,this.location=this.options.position,this.srs=this.options.srs,this.graphName=this.options.graph,this.profileId=this.options.profileId||null,this.profileName=this.options.profileName||null,this.exclusions=this.options.exclusions,this.reverse=this.options.reverse,this.smoothing=this.options.smoothing,this.holes=this.options.holes;var o=this.options.method;switch(o){case"time":this.method="time",this.time=this.options.time;break;case"distance":this.method="distance",this.distance=this.options.distance;break;default:this.method="time"}}return e.CLASSNAME="ProcessIsoCurveParam",e.prototype={constructor:e,getLocation:function(){return this.location.x+","+this.location.y},getExclusions:function(){return this.exclusions.join(";")}},e.prototype.getParams=function(){var t=[];return t.push({k:"location",v:this.getLocation()}),t.push({k:"smoothing",v:this.smoothing}),t.push({k:"holes",v:this.holes}),t.push({k:"reverse",v:this.reverse}),t.push({k:"method",v:this.method}),this.time&&t.push({k:"time",v:this.time}),this.distance&&t.push({k:"distance",v:this.distance}),t.push({k:"graphName",v:this.graphName}),this.exclusions&&t.push({k:"exclusions",v:this.getExclusions()}),this.srs&&t.push({k:"srs",v:this.srs}),t},e}(o),kt=function(t,e,o){function n(t){if(!(this instanceof n))throw new TypeError("ProcessIsoCurveRequest constructor cannot be called as a function.");if(!t)throw new Error(e.getMessage("PARAM_EMPTY","options"));this.settings=t,this.mode=this.settings.httpMethod||"GET"}return n.prototype={requestString:null,constructor:n,template:{container:'<?xml version="1.0" encoding="UTF-8"?>\n<isochroneRequest>\n__ID__\t<location>\n\t\t<x>__X__</x>\n\t\t<y>__Y__</y>\n\t</location>\n\t<srs>__SRS__</srs>\n\t<graphName>__GRAPHNAME__</graphName>\n__PROFIL____EXCLUSIONS__\t<method>__METHOD__</method>\n__TIME____DISTANCE__\t<reverse>__REVERSE__</reverse>\n\t<smoothing>__SMOOTHING__</smoothing>\n\t<holes>__HOLES__</holes>\n</isochroneRequest>',id:"\t<id>__IDVALUE__</id>\n",profil:"\t<profileId>__PROFILID__</profileId>\n\t<profileName>__PROFILNAME__</profileName>\n",exclusions:{container:"\t<exclusions>\n__EXCLUSIONFEATURE__\n\t</exclusions>\n",feature:"\t\t<exclusion>__EXCLUSIONVALUE__</exclusion>"},time:"\t<time>__TIMEVALUE__</time>\n",distance:"\t<distance>__DISTANCEVALUE__</distance>\n"},processRequestString:function(){var t="",e=0;switch(this.mode){case"GET":var n=new o(this.settings),i=n.getParams();for(e=0;e<i.length;e++){var s=i[e];t&&(t+="&"),t+=s.k+"="+s.v}break;case"POST":if(t=this.template.container,t=t.replace(/__ID__/g,""),t=t.replace(/__PROFIL__/g,""),t=t.replace(/__X__/g,this.settings.position.x),t=t.replace(/__Y__/g,this.settings.position.y),t=t.replace(/__GRAPHNAME__/g,this.settings.graph),t=t.replace(/__SRS__/g,this.settings.srs),t=t.replace(/__SMOOTHING__/g,this.settings.smoothing),t=t.replace(/__HOLES__/g,this.settings.holes),t=t.replace(/__REVERSE__/g,this.settings.reverse),this.settings.exclusions){var r=this.template.exclusions.container,a=[];for(e=0;e<this.settings.exclusions.length;e++){var l=this.template.exclusions.feature;l=l.replace(/__EXCLUSIONVALUE__/,this.settings.exclusions[e]),a.push(l)}r=r.replace(/__EXCLUSIONFEATURE__/,a.join("\n")),t=t.replace(/__EXCLUSIONS__/g,r)}if(t=t.replace(/__EXCLUSIONS__/g,""),this.settings.distance){var c=this.template.distance;c=c.replace(/__DISTANCEVALUE__/g,this.settings.distance),t=t.replace(/__DISTANCE__/g,c),t=t.replace(/__METHOD__/g,"distance")}if(t=t.replace(/__DISTANCE__/g,""),this.settings.time){var u=this.template.time;u=u.replace(/__TIMEVALUE__/g,this.settings.time),t=t.replace(/__TIME__/g,u),t=t.replace(/__METHOD__/g,"time")}t=t.replace(/__TIME__/g,"")}return this.requestString=t,this.requestString}},n}(o,r,Nt),Dt=function(){function t(){if(!(this instanceof t))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}return t.prototype={constructor:t},t}(),Ut=function(t,e,o,n,i){function s(t){var e,o="";return t.hasChildNodes()&&(e=t.firstChild,e&&3===e.nodeType&&(o=e.nodeValue)),o}var r={};return r.READERS={isochronResult:function(t){var e=new i;if(t.hasChildNodes())for(var s,a=t.childNodes,l=0;l<a.length;l++)s=a[l],r.READERS[s.nodeName]&&r.READERS[s.nodeName](s,e);if("error"===e.status){var c=n.getMessage("SERVICE_RESPONSE_EXCEPTION",e.message);throw new o({message:c,type:o.TYPE_SRVERR})}return e},message:function(t,e){e&&(e.message=s(t))},status:function(t,e){var o=s(t);"ERROR"!==o&&"error"!==o||e&&(e.status="error")},id:function(t,e){e&&(e.id=s(t))},location:function(t,e){var o=s(t);e&&e.location&&(e.location.x=parseFloat(o.split(",")[0]),e.location.y=parseFloat(o.split(",")[1]))},srs:function(t,e){e&&(e.srs=s(t))},distance:function(t,e){e&&(e.distance=parseFloat(s(t)))},time:function(t,e){e&&(e.time=parseFloat(s(t)))},wktGeometry:function(t,o){if(o){var i=t.innerHTML,s=function(t){o.geometry=t},r=function(){var t=n.getMessage("PARAM_FORMAT",["wktGeometry"]);throw new Error(t)};o.hasOwnProperty("geometry")&&e.toJson(i,s,r)}},serviceResult:function(t){var e={};if(t.hasChildNodes())for(var o,n=t.childNodes,i=0;i<n.length;i++)o=n[i],r.READERS[o.nodeName]&&r.READERS[o.nodeName](o,e);return e},ExceptionReport:function(t){var e={};if(t.hasChildNodes())for(var o,n=t.childNodes,i=0;i<n.length;i++)o=n[i],"Exception"===o.nodeName&&(e.exceptionReport=r.READERS.Exception(o));return e},Exception:function(t){var e={},o=t.getAttribute("exceptionCode");o&&(e.exceptionCode=o);var n=t.firstChild;return n&&3===n.nodeType&&(e.exception=n.nodeValue),e}},r.read=function(t){var e;if("isochronResult"===t.nodeName||"isochroneResult"===t.nodeName||"IsochroneResult"===t.nodeName)return e=r.READERS.isochronResult(t);if("ExceptionReport"===t.nodeName)return e=r.READERS[t.nodeName](t);if(r.READERS[t.nodeName]){if(e=r.READERS[t.nodeName](t),"error"===e.status){var i=n.getMessage("SERVICE_RESPONSE_EXCEPTION",e.message);throw new o({message:i,type:o.TYPE_SRVERR})}return e}throw new o({message:n.getMessage("SERVICE_RESPONSE_ANALYSE",t.nodeName),type:o.TYPE_UNKERR})},r}(o,Rt,a,r,Dt),Ft=function(t,e,o,n,i,s,r){var a={build:function(t){var a=null;if(!t.response)return void t.onError.call(t.scope,new e(o.getMessage("SERVICE_RESPONSE_EMPTY")));if(t.rawResponse)a=t.response;else{switch(t.outputFormat){
  case"xml":try{var l=new n({reader:s});if("string"==typeof t.response?l.setXMLString(t.response):l.setXMLDoc(t.response),a=l.parse(),!a)throw new Error(o.getMessage("SERVICE_RESPONSE_EXCEPTION_2"))}catch(n){var c=n.message;return c+="\n(raw response service : '"+t.response+"')",void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_EXCEPTION",c),status:200,type:e.TYPE_SRVERR}))}break;case"json":var u;if(u="string"==typeof t.response?window.JSON.parse(t.response):t.response,"OK"===u.status||"ok"===u.status){if(a=new r,!a)return void t.onError.call(t.scope,new e(o.getMessage("SERVICE_RESPONSE_ANALYSE",t.response)));a.time=u.time,a.distance=u.distance,a.message=u.message,a.id=u.id,a.srs=u.srs;var h=function(t){a.geometry=t},d=function(){t.onError.call(t.scope,new e({message:o.getMessage("PARAM_FORMAT","wktGeometry")}))};if(a.hasOwnProperty("geometry")&&(i.toJson(u.wktGeometry,h,d),!a.geometry))return;var p=u.location.split(",");a.location&&(a.location.x=p[0],a.location.y=p[1])}else if("ERROR"===u.status||"error"===u.status){var m=u.message;return m+="\n(raw response service : '"+u+"')",void t.onError.call(t.scope,new e(o.getMessage("SERVICE_RESPONSE_EXCEPTION",m)))}break;default:return void t.onError.call(t.scope,new e(o.getMessage("SERVICE_RESPONSE_FORMAT","json","xml")))}if(a&&a.exceptionReport)return void t.onError.call(t.scope,new e({message:o.getMessage("SERVICE_RESPONSE_EXCEPTION",a.exceptionReport),type:e.TYPE_SRVERR,status:200}))}t.onSuccess.call(t.scope,a)}};return a}(o,a,r,v,Rt,Ut,Dt),jt=function(t,e,o,n,i,s,r){function a(t){if(!(this instanceof a))throw new TypeError(e.getMessage("CLASS_CONSTRUCTOR","ProcessIsoCurve"));if(this.CLASSNAME="ProcessIsoCurve",n.apply(this,arguments),!t.position)throw new Error(e.getMessage("PARAM_MISSING","position"));if(null==t.position.x)throw new Error(e.getMessage("PARAM_MISSING","position.x"));if(null==t.position.y)throw new Error(e.getMessage("PARAM_MISSING","position.y"));if(!t.time&&!t.distance)throw new Error("Parameter(s) 'distance' missing. Parameter time to calculate an isochrone, parameter distance for an isodistance");if(!t.time&&t.distance&&(this.options.method="distance",this.options.time&&delete this.options.time),t.time&&!t.distance&&(this.options.method="time",this.options.distance&&delete this.options.distance),this.options.method=this.options.method||"time",this.options.exclusions=t.exclusions||null,this.options.graph=t.graph||"Voiture",this.options.reverse=t.reverse||!1,this.options.smoothing=t.smoothing||!1,this.options.holes=t.holes||!1,this.options.srs=t.srs||"EPSG:4326",this.options.outputFormat="string"==typeof t.outputFormat?t.outputFormat.toLowerCase():"json",!this.options.serverUrl){var o=i.ProcessIsoCurve.url(this.options.apiKey),s=o["iso-"+this.options.outputFormat];if(!s)throw new Error("Url by default not found !");this.options.serverUrl=s}var r=this.options.serverUrl.lastIndexOf(".");if(r!==-1){var l=this.options.serverUrl.substring(r+1);if(l&&l.length<5)switch(l.toLowerCase()){case"json":case"xml":this.options.outputFormat=l.toLowerCase();break;default:throw new Error("type of service : unknown or unsupported (json or xml) !")}}}return a.prototype=Object.create(n.prototype,{}),a.prototype.constructor=a,a.prototype.buildRequest=function(t,n){try{var i=new s(this.options);if(!i.processRequestString())throw new Error(e.getMessage("SERVICE_REQUEST_BUILD"));this.request=i.requestString}catch(e){return void t.call(this,new o(e.message))}n.call(this,this.request)},a.prototype.analyzeResponse=function(t,n){if(this.response){var i={response:this.response,outputFormat:this.options.outputFormat,rawResponse:this.options.rawResponse,onSuccess:n,onError:t,scope:this};r.build(i)}else t.call(this,new o(e.getMessage("SERVICE_RESPONSE_EMPTY")))},a}(o,r,a,h,u,kt,Ft),Bt=function(t,e,o,n,i,s,r){var a={getConfig:function(t){var o=new e(t);o.call()},getAltitude:function(e){var o=new t(e);o.call()},geocode:function(t){var e=new o(t);e.call()},reverseGeocode:function(t){var e=new n(t);e.call()},autoComplete:function(t){var e=new i(t);e.call()},route:function(t){var e=new s(t);e.call()},isoCurve:function(t){var e=new r(t);e.call()}};return a}(P,B,ut,ft,vt,Tt,jt),Vt=function(t,e,o,n,i,s,r,a,l,c,u,h,d,p,m,f,g,_,y,v,E,S,C,A,P,M,w,I,R){var G="undefined"!=typeof window?window:{},b=G.Gp||{servicesVersion:"1.0.0-beta3",servicesDate:"2016-12-01",extend:function(t,e){var o,n=t.split("."),i=this;o=n.length;for(var s=0;s<o;s++){"undefined"==typeof i[n[s]]&&(i[n[s]]={});var r=o-1;s===r&&(i[n[s]]=e),i=i[n[s]]}return this}};return b.extend("Protocols",{}),b.extend("Protocols.XHR",t),b.extend("Services",e),b.extend("Services.AltiResponse",o),b.extend("Services.Alti.Elevation",n),b.extend("Services.AutoCompleteResponse",i),b.extend("Services.AutoComplete.SuggestedLocation",s),b.extend("Services.GetConfigResponse",r),b.extend("Services.Config.Constraint",a),b.extend("Services.Config.Format",l),b.extend("Services.Config.Layer",c),b.extend("Services.Config.Legend",u),b.extend("Services.Config.Metadata",h),b.extend("Services.Config.Originator",d),b.extend("Services.Config.Service",p),b.extend("Services.Config.Style",m),b.extend("Services.Config.Territory",f),b.extend("Services.Config.Thematic",s),b.extend("Services.Config.TileMatrix",_),b.extend("Services.Config.TileMatrixLimit",y),b.extend("Services.Config.TileMatrixSet",v),b.extend("Services.GeocodeResponse",E),b.extend("Services.Geocode.GeocodedLocation",S),b.extend("Services.Geocode.DirectGeocodedLocation",C),b.extend("Services.Geocode.ReverseGeocodedLocation",A),b.extend("Services.IsoCurveResponse",P),b.extend("Services.RouteResponse",M),b.extend("Services.Route.RouteInstruction",w),b.extend("Error",I),b.extend("Helper",R),G.Gp=b,G.Gp}(s,Bt,E,S,gt,_t,M,w,I,R,G,b,x,O,L,T,N,D,U,k,st,rt,at,dt,Dt,Gt,bt,a,n)}),CommonUtilsAutoLoadConfig=function(t){!function(){var e=document.getElementsByTagName("script"),o=e[e.length-1].getAttribute("data-key");if(o){var n=o.split(/;|,|\|/);if(o&&n.length>1){for(var i=[],s=0;s<n.length;s++)i.push(n[s]);o=i}}var r=e[e.length-1].getAttribute("data-url"),a=e[e.length-1].getAttribute("data-timeout"),l=function(){},c=function(t){throw new Error("Configuration load failed : "+t.message)};if(o||r){var u={apiKey:o,onSuccess:l,onFailure:c};r&&(u.serverUrl=r,u.callbackSuffix=""),a&&(u.timeOut=a),t.Config||t.Services.getConfig(u)}}()}(gp),CommonUtilsLayerUtils=function(){var t={getZoomLevelFromScaleDenominator:function(t,e){var o={};switch(e){case"EPSG:2154":o={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:o={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 n=28e-5*t;for(var i in o)if(o.hasOwnProperty(i)&&o[i]<=n)return i;return 0},getAttributions:function(t){var e=t.zoom,o=[];if(null!=t.originators&&t.visibility)for(var n,i=0,s=t.originators.length;i<s;i++){n=!0;for(var r=t.originators[i],a=t.originators[i].constraints||[],l=0,c=a.length;l<c;l++){var u=a[l];n=!0;var h=this.getZoomLevelFromScaleDenominator(u.maxScaleDenominator,t.crs),d=this.getZoomLevelFromScaleDenominator(u.minScaleDenominator,t.crs);h&&h>e&&(n=!1),n&&d&&d<e&&(n=!1);var p=u.bbox;if(n&&p){n=!1;var m=t.extent;if(m){var f=[p.top,p.left,p.bottom,p.right];if(this.intersects(m,f)){n=!0;break}}}}if(n){var g=r.logo,_=r.url,y=r.name?r.name:"",v=r.attribution,E=document.createElement("div");E.className="gp-control-attribution";var S=null;S=document.createElement("a"),S.className="gp-control-attribution-link",S.target="_blank",E.appendChild(S),_&&(S.href=_);var C=!!g,A=null;C?(A=document.createElement("img"),S?(A.className="gp-control-attribution-image",S.appendChild(A)):(A.className="",E.appendChild(A)),A.src=g,A.title=v||y,A.style.height="30px",A.style.width="30px"):y?S.textContent=y:v?S.textContent=v:_?S.textContent=_:S.textContent="",o.push(E.innerHTML+" ")}}return o},intersects:function(t,e){var o=t[1]<=e[3]&&e[1]<=t[3],n=t[2]<=e[0]&&e[2]<=t[0];return o&&n}};return t}(),!function(t){if("object"==typeof exports)module.exports=t();else{proj4=function(){return"function"==typeof t?t():t}()}}(function(){return function t(e,o,n){function i(r,a){if(!o[r]){if(!e[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(s)return s(r,!0);throw new Error("Cannot find module '"+r+"'")}var c=o[r]={exports:{}};e[r][0].call(c.exports,function(t){var o=e[r][1][t];return i(o?o:t)},c,c.exports,t,e,o,n)}return o[r].exports}for(var s="function"==typeof require&&require,r=0;r<n.length;r++)i(n[r]);return i}({1:[function(t,e){function o(t,e,n){if(!(this instanceof o))return new o(t,e,n);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&&"undefined"==typeof e){var i=t.split(",");this.x=parseFloat(i[0],10),this.y=parseFloat(i[1],10),this.z=parseFloat(i[2],10)||0}else this.x=t,this.y=e,this.z=n||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}var n=t("mgrs");o.fromMGRS=function(t){return new o(n.toPoint(t))},o.prototype.toMGRS=function(t){return n.forward([this.x,this.y],t)},e.exports=o},{mgrs:66}],2:[function(t,e){function o(t,e){if(!(this instanceof o))return new o(t);e=e||function(t){if(t)throw t};var s=n(t);if("object"!=typeof s)return void e(t);var a=r(s),l=o.projections.get(a.projName);l?(i(this,a),i(this,l),this.init(),e(null,this)):e(t)}var n=t("./parseCode"),i=t("./extend"),s=t("./projections"),r=t("./deriveConstants");o.projections=s,o.projections.start(),e.exports=o},{"./deriveConstants":32,"./extend":33,"./parseCode":36,"./projections":38}],3:[function(t,e){e.exports=function(t,e,o){var n,i,s,r=o.x,a=o.y,l=o.z||0;for(s=0;3>s;s++)if(!e||2!==s||void 0!==o.z)switch(0===s?(n=r,i="x"):1===s?(n=a,i="y"):(n=l,i="z"),t.axis[s]){case"e":o[i]=n;break;case"w":o[i]=-n;break;case"n":o[i]=n;break;case"s":o[i]=-n;break;case"u":void 0!==o[i]&&(o.z=n);break;case"d":void 0!==o[i]&&(o.z=-n);break;default:return null}return o}},{}],4:[function(t,e){var o=Math.PI/2,n=t("./sign");e.exports=function(t){return Math.abs(t)<o?t:t-n(t)*Math.PI}},{"./sign":21}],5:[function(t,e){var o=2*Math.PI,n=t("./sign");e.exports=function(t){return Math.abs(t)<Math.PI?t:t-n(t)*o}},{"./sign":21}],6:[function(t,e){e.exports=function(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}},{}],7:[function(t,e){e.exports=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))}},{}],8:[function(t,e){e.exports=function(t){return.375*t*(1+.25*t*(1+.46875*t))}},{}],9:[function(t,e){e.exports=function(t){return.05859375*t*t*(1+.75*t)}},{}],10:[function(t,e){e.exports=function(t){return t*t*t*(35/3072)}},{}],11:[function(t,e){e.exports=function(t,e,o){var n=e*o;return t/Math.sqrt(1-n*n)}},{}],12:[function(t,e){e.exports=function(t,e,o,n,i){var s,r;s=t/e;for(var a=0;15>a;a++)if(r=(t-(e*s-o*Math.sin(2*s)+n*Math.sin(4*s)-i*Math.sin(6*s)))/(e-2*o*Math.cos(2*s)+4*n*Math.cos(4*s)-6*i*Math.cos(6*s)),s+=r,Math.abs(r)<=1e-10)return s;return NaN}},{}],13:[function(t,e){var o=Math.PI/2;e.exports=function(t,e){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-n)<1e-6)return 0>e?-1*o:o;for(var i,s,r,a,l=Math.asin(.5*e),c=0;30>c;c++)if(s=Math.sin(l),r=Math.cos(l),a=t*s,i=Math.pow(1-a*a,2)/(2*r)*(e/(1-t*t)-s/(1-a*a)+.5/t*Math.log((1-a)/(1+a))),l+=i,Math.abs(i)<=1e-10)return l;return NaN}},{}],14:[function(t,e){e.exports=function(t,e,o,n,i){return t*i-e*Math.sin(2*i)+o*Math.sin(4*i)-n*Math.sin(6*i)}},{}],15:[function(t,e){e.exports=function(t,e,o){var n=t*e;return o/Math.sqrt(1-n*n)}},{}],16:[function(t,e){var o=Math.PI/2;e.exports=function(t,e){for(var n,i,s=.5*t,r=o-2*Math.atan(e),a=0;15>=a;a++)if(n=t*Math.sin(r),i=o-2*Math.atan(e*Math.pow((1-n)/(1+n),s))-r,r+=i,Math.abs(i)<=1e-10)return r;return-9999}},{}],17:[function(t,e){var o=1,n=.25,i=.046875,s=.01953125,r=.01068115234375,a=.75,l=.46875,c=.013020833333333334,u=.007120768229166667,h=.3645833333333333,d=.005696614583333333,p=.3076171875;e.exports=function(t){var e=[];e[0]=o-t*(n+t*(i+t*(s+t*r))),e[1]=t*(a-t*(i+t*(s+t*r)));var m=t*t;return e[2]=m*(l-t*(c+t*u)),m*=t,e[3]=m*(h-t*d),e[4]=m*t*p,e}},{}],18:[function(t,e){var o=t("./pj_mlfn"),n=1e-10,i=20;e.exports=function(t,e,s){for(var r=1/(1-e),a=t,l=i;l;--l){var c=Math.sin(a),u=1-e*c*c;if(u=(o(a,c,Math.cos(a),s)-t)*u*Math.sqrt(u)*r,a-=u,Math.abs(u)<n)return a}return a}},{"./pj_mlfn":19}],19:[function(t,e){e.exports=function(t,e,o,n){return o*=e,e*=e,n[0]*t-o*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))}},{}],20:[function(t,e){e.exports=function(t,e){var o;return t>1e-7?(o=t*e,(1-t*t)*(e/(1-o*o)-.5/t*Math.log((1-o)/(1+o)))):2*e}},{}],21:[function(t,e){e.exports=function(t){return 0>t?-1:1}},{}],22:[function(t,e){e.exports=function(t,e){return Math.pow((1-t)/(1+t),e)}},{}],23:[function(t,e){e.exports=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}},{}],24:[function(t,e){var o=Math.PI/2;e.exports=function(t,e,n){var i=t*n,s=.5*t;return i=Math.pow((1-i)/(1+i),s),Math.tan(.5*(o-e))/i}},{}],25:[function(t,e,o){o.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},o.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},o.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},o.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},o.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},o.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},o.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},o.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},o.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},o.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},o.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},o.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},o.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},o.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},o.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},o.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}},{}],26:[function(t,e,o){o.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},o.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},o.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},o.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},o.airy={a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},o.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},o.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},o.mod_airy={a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},o.andrae={a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},o.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},o.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},o.bessel={a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},o.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},o.clrk66={a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},o.clrk80={a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},o.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},o.CPM={a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},o.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},o.engelis={a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},o.evrst30={a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},o.evrst48={a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},o.evrst56={a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},o.evrst69={a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},o.evrstSS={a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},o.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},o.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},o.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},o.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},o.hough={a:6378270,rf:297,ellipseName:"Hough"},o.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},o.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},o.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},o.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},o.new_intl={a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},o.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},o.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},o.SEasia={a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},o.walbeck={a:6376896,b:6355834.8467,ellipseName:"Walbeck"},o.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},o.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},o.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"},o.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"},o.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}},{}],27:[function(t,e,o){o.greenwich=0,o.lisbon=-9.131906111111,o.paris=2.337229166667,o.bogota=-74.080916666667,o.madrid=-3.687938888889,o.rome=12.452333333333,o.bern=7.439583333333,o.jakarta=106.807719444444,o.ferro=-17.666666666667,o.brussels=4.367975,o.stockholm=18.058277777778,o.athens=23.7163375,o.oslo=10.722916666667},{}],28:[function(t,e){function o(t,e,o){var n;return Array.isArray(o)?(n=r(t,e,o),3===o.length?[n.x,n.y,n.z]:[n.x,n.y]):r(t,e,o)}function n(t){return t instanceof s?t:t.oProj?t.oProj:s(t)}function i(t,e,i){t=n(t);var s,r=!1;return"undefined"==typeof e?(e=t,t=a,r=!0):("undefined"!=typeof e.x||Array.isArray(e))&&(i=e,e=t,t=a,r=!0),e=n(e),i?o(t,e,i):(s={forward:function(n){return o(t,e,n)},inverse:function(n){return o(e,t,n)}},r&&(s.oProj=e),s)}var s=t("./Proj"),r=t("./transform"),a=s("WGS84");e.exports=i},{"./Proj":2,"./transform":64}],29:[function(t,e){var o=Math.PI/2,n=1,i=2,s=3,r=4,a=5,l=484813681109536e-20,c=1.0026,u=.3826834323650898,h=function(t){if(!(this instanceof h))return new h(t);if(this.datum_type=r,t){if(t.datumCode&&"none"===t.datumCode&&(this.datum_type=a),t.datum_params){for(var e=0;e<t.datum_params.length;e++)t.datum_params[e]=parseFloat(t.datum_params[e]);(0!==t.datum_params[0]||0!==t.datum_params[1]||0!==t.datum_params[2])&&(this.datum_type=n),t.datum_params.length>3&&(0!==t.datum_params[3]||0!==t.datum_params[4]||0!==t.datum_params[5]||0!==t.datum_params[6])&&(this.datum_type=i,t.datum_params[3]*=l,t.datum_params[4]*=l,t.datum_params[5]*=l,t.datum_params[6]=t.datum_params[6]/1e6+1)}this.datum_type=t.grids?s:this.datum_type,this.a=t.a,this.b=t.b,this.es=t.es,this.ep2=t.ep2,this.datum_params=t.datum_params,this.datum_type===s&&(this.grids=t.grids)}};h.prototype={compare_datums:function(t){return this.datum_type===t.datum_type&&(!(this.a!==t.a||Math.abs(this.es-t.es)>5e-11)&&(this.datum_type===n?this.datum_params[0]===t.datum_params[0]&&this.datum_params[1]===t.datum_params[1]&&this.datum_params[2]===t.datum_params[2]:this.datum_type===i?this.datum_params[0]===t.datum_params[0]&&this.datum_params[1]===t.datum_params[1]&&this.datum_params[2]===t.datum_params[2]&&this.datum_params[3]===t.datum_params[3]&&this.datum_params[4]===t.datum_params[4]&&this.datum_params[5]===t.datum_params[5]&&this.datum_params[6]===t.datum_params[6]:this.datum_type!==s&&t.datum_type!==s||this.nadgrids===t.nadgrids))},geodetic_to_geocentric:function(t){var e,n,i,s,r,a,l,c=t.x,u=t.y,h=t.z?t.z:0,d=0;if(-o>u&&u>-1.001*o)u=-o;else if(u>o&&1.001*o>u)u=o;else if(-o>u||u>o)return null;return c>Math.PI&&(c-=2*Math.PI),r=Math.sin(u),l=Math.cos(u),a=r*r,s=this.a/Math.sqrt(1-this.es*a),e=(s+h)*l*Math.cos(c),n=(s+h)*l*Math.sin(c),i=(s*(1-this.es)+h)*r,t.x=e,t.y=n,t.z=i,d},geocentric_to_geodetic:function(t){var e,n,i,s,r,a,l,c,u,h,d,p,m,f,g,_,y,v=1e-12,E=v*v,S=30,C=t.x,A=t.y,P=t.z?t.z:0;if(m=!1,e=Math.sqrt(C*C+A*A),n=Math.sqrt(C*C+A*A+P*P),e/this.a<v){if(m=!0,g=0,n/this.a<v)return _=o,void(y=-this.b)}else g=Math.atan2(A,C);i=P/n,s=e/n,r=1/Math.sqrt(1-this.es*(2-this.es)*s*s),c=s*(1-this.es)*r,u=i*r,f=0;do f++,l=this.a/Math.sqrt(1-this.es*u*u),y=e*c+P*u-l*(1-this.es*u*u),a=this.es*l/(l+y),r=1/Math.sqrt(1-a*(2-a)*s*s),h=s*(1-a)*r,d=i*r,p=d*c-h*u,c=h,u=d;while(p*p>E&&S>f);return _=Math.atan(d/Math.abs(h)),t.x=g,t.y=_,t.z=y,t},geocentric_to_geodetic_noniter:function(t){var e,n,i,s,r,a,l,h,d,p,m,f,g,_,y,v,E,S=t.x,C=t.y,A=t.z?t.z:0;if(S=parseFloat(S),C=parseFloat(C),A=parseFloat(A),E=!1,0!==S)e=Math.atan2(C,S);else if(C>0)e=o;else if(0>C)e=-o;else if(E=!0,e=0,A>0)n=o;else{if(!(0>A))return n=o,void(i=-this.b);n=-o}return r=S*S+C*C,s=Math.sqrt(r),a=A*c,h=Math.sqrt(a*a+r),p=a/h,f=s/h,m=p*p*p,l=A+this.b*this.ep2*m,v=s-this.a*this.es*f*f*f,d=Math.sqrt(l*l+v*v),g=l/d,_=v/d,y=this.a/Math.sqrt(1-this.es*g*g),i=_>=u?s/_-y:-u>=_?s/-_-y:A/g+y*(this.es-1),E===!1&&(n=Math.atan(g/_)),t.x=e,t.y=n,t.z=i,t},geocentric_to_wgs84:function(t){if(this.datum_type===n)t.x+=this.datum_params[0],t.y+=this.datum_params[1],t.z+=this.datum_params[2];else if(this.datum_type===i){var e=this.datum_params[0],o=this.datum_params[1],s=this.datum_params[2],r=this.datum_params[3],a=this.datum_params[4],l=this.datum_params[5],c=this.datum_params[6],u=c*(t.x-l*t.y+a*t.z)+e,h=c*(l*t.x+t.y-r*t.z)+o,d=c*(-a*t.x+r*t.y+t.z)+s;t.x=u,t.y=h,t.z=d}},geocentric_from_wgs84:function(t){if(this.datum_type===n)t.x-=this.datum_params[0],t.y-=this.datum_params[1],t.z-=this.datum_params[2];else if(this.datum_type===i){var e=this.datum_params[0],o=this.datum_params[1],s=this.datum_params[2],r=this.datum_params[3],a=this.datum_params[4],l=this.datum_params[5],c=this.datum_params[6],u=(t.x-e)/c,h=(t.y-o)/c,d=(t.z-s)/c;t.x=u+l*h-a*d,t.y=-l*u+h+r*d,t.z=a*u-r*h+d}}},e.exports=h},{}],30:[function(t,e){var o=1,n=2,i=3,s=5,r=6378137,a=.006694379990141316;e.exports=function(t,e,l){function c(t){return t===o||t===n}var u,h,d;if(t.compare_datums(e))return l;if(t.datum_type===s||e.datum_type===s)return l;var p=t.a,m=t.es,f=e.a,g=e.es,_=t.datum_type;if(_===i)if(0===this.apply_gridshift(t,0,l))t.a=r,t.es=a;else{if(!t.datum_params)return t.a=p,t.es=t.es,l;for(u=1,h=0,d=t.datum_params.length;d>h;h++)u*=t.datum_params[h];if(0===u)return t.a=p,t.es=t.es,l;_=t.datum_params.length>3?n:o}return e.datum_type===i&&(e.a=r,e.es=a),(t.es!==e.es||t.a!==e.a||c(_)||c(e.datum_type))&&(t.geodetic_to_geocentric(l),c(t.datum_type)&&t.geocentric_to_wgs84(l),c(e.datum_type)&&e.geocentric_from_wgs84(l),e.geocentric_to_geodetic(l)),e.datum_type===i&&this.apply_gridshift(e,1,l),t.a=p,t.es=m,e.a=f,e.es=g,l}},{}],31:[function(t,e){function o(t){var e=this;if(2===arguments.length){var n=arguments[1];o[t]="string"==typeof n?"+"===n[0]?i(arguments[1]):s(arguments[1]):n}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?o.apply(e,t):o(t)});if("string"==typeof t){if(t in o)return o[t]}else"EPSG"in t?o["EPSG:"+t.EPSG]=t:"ESRI"in t?o["ESRI:"+t.ESRI]=t:"IAU2000"in t?o["IAU2000:"+t.IAU2000]=t:console.log(t);return}}var n=t("./global"),i=t("./projString"),s=t("./wkt");n(o),e.exports=o},{"./global":34,"./projString":37,"./wkt":65}],32:[function(t,e){var o=t("./constants/Datum"),n=t("./constants/Ellipsoid"),i=t("./extend"),s=t("./datum"),r=1e-10,a=.16666666666666666,l=.04722222222222222,c=.022156084656084655;e.exports=function(t){if(t.datumCode&&"none"!==t.datumCode){var e=o[t.datumCode];e&&(t.datum_params=e.towgs84?e.towgs84.split(","):null,t.ellps=e.ellipse,t.datumName=e.datumName?e.datumName:t.datumCode)}if(!t.a){var u=n[t.ellps]?n[t.ellps]:n.WGS84;i(t,u)}return t.rf&&!t.b&&(t.b=(1-1/t.rf)*t.a),(0===t.rf||Math.abs(t.a-t.b)<r)&&(t.sphere=!0,t.b=t.a),t.a2=t.a*t.a,t.b2=t.b*t.b,t.es=(t.a2-t.b2)/t.a2,t.e=Math.sqrt(t.es),t.R_A&&(t.a*=1-t.es*(a+t.es*(l+t.es*c)),t.a2=t.a*t.a,t.b2=t.b*t.b,t.es=0),t.ep2=(t.a2-t.b2)/t.b2,t.k0||(t.k0=1),t.axis||(t.axis="enu"),t.datum=s(t),t}},{"./constants/Datum":25,"./constants/Ellipsoid":26,"./datum":29,"./extend":33}],33:[function(t,e){e.exports=function(t,e){t=t||{};var o,n;if(!e)return t;for(n in e)o=e[n],void 0!==o&&(t[n]=o);return t}},{}],34:[function(t,e){e.exports=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"]}},{}],35:[function(t,e){var o=t("./core");o.defaultDatum="WGS84",o.Proj=t("./Proj"),o.WGS84=new o.Proj("WGS84"),o.Point=t("./Point"),o.toPoint=t("./common/toPoint"),o.defs=t("./defs"),o.transform=t("./transform"),o.mgrs=t("mgrs"),o.version=t("../package.json").version,t("./includedProjections")(o),e.exports=o},{"../package.json":67,"./Point":1,"./Proj":2,"./common/toPoint":23,"./core":28,"./defs":31,"./includedProjections":"gWUPNW","./transform":64,mgrs:66}],36:[function(t,e){function o(t){return"string"==typeof t}function n(t){return t in a}function i(t){var e=["GEOGCS","GEOCCS","PROJCS","LOCAL_CS"];return e.reduce(function(e,o){return e+1+t.indexOf(o)},0)}function s(t){return"+"===t[0]}function r(t){return o(t)?n(t)?a[t]:i(t)?l(t):s(t)?c(t):void 0:t}var a=t("./defs"),l=t("./wkt"),c=t("./projString");e.exports=r},{"./defs":31,"./projString":37,"./wkt":65}],37:[function(t,e){var o=.017453292519943295,n=t("./constants/PrimeMeridian");e.exports=function(t){var e={},i={};t.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).forEach(function(t){var e=t.split("=");e.push(!0),i[e[0].toLowerCase()]=e[1]});var s,r,a,l={proj:"projName",datum:"datumCode",rf:function(t){e.rf=parseFloat(t,10)},lat_0:function(t){e.lat0=t*o},lat_1:function(t){e.lat1=t*o},lat_2:function(t){e.lat2=t*o},lat_ts:function(t){e.lat_ts=t*o},lon_0:function(t){e.long0=t*o},lon_1:function(t){e.long1=t*o},lon_2:function(t){e.long2=t*o},alpha:function(t){e.alpha=parseFloat(t)*o},lonc:function(t){e.longc=t*o},x_0:function(t){e.x0=parseFloat(t,10)},y_0:function(t){e.y0=parseFloat(t,10)},k_0:function(t){e.k0=parseFloat(t,10)},k:function(t){e.k0=parseFloat(t,10)},r_a:function(){e.R_A=!0},zone:function(t){e.zone=parseInt(t,10)},south:function(){e.utmSouth=!0},towgs84:function(t){e.datum_params=t.split(",").map(function(t){return parseFloat(t,10)})},to_meter:function(t){e.to_meter=parseFloat(t,10)},from_greenwich:function(t){e.from_greenwich=t*o},pm:function(t){e.from_greenwich=(n[t]?n[t]:parseFloat(t,10))*o},nadgrids:function(t){"@null"===t?e.datumCode="none":e.nadgrids=t},axis:function(t){var o="ewnsud";3===t.length&&-1!==o.indexOf(t.substr(0,1))&&-1!==o.indexOf(t.substr(1,1))&&-1!==o.indexOf(t.substr(2,1))&&(e.axis=t)}};for(s in i)r=i[s],s in l?(a=l[s],"function"==typeof a?a(r):e[a]=r):e[s]=r;return"string"==typeof e.datumCode&&"WGS84"!==e.datumCode&&(e.datumCode=e.datumCode.toLowerCase()),e}},{"./constants/PrimeMeridian":27}],38:[function(t,e,o){function n(t,e){var o=r.length;return t.names?(r[o]=t,t.names.forEach(function(t){s[t.toLowerCase()]=o}),this):(console.log(e),!0)}var i=[t("./projections/merc"),t("./projections/longlat")],s={},r=[];o.add=n,o.get=function(t){if(!t)return!1;var e=t.toLowerCase();return"undefined"!=typeof s[e]&&r[s[e]]?r[s[e]]:void 0},o.start=function(){i.forEach(n)}},{"./projections/longlat":50,"./projections/merc":51}],39:[function(t,e,o){var n=1e-10,i=t("../common/msfnz"),s=t("../common/qsfnz"),r=t("../common/adjust_lon"),a=t("../common/asinz");o.init=function(){Math.abs(this.lat1+this.lat2)<n||(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=i(this.e3,this.sin_po,this.cos_po),this.qs1=s(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=i(this.e3,this.sin_po,this.cos_po),this.qs2=s(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=s(this.e3,this.sin_po,this.cos_po),this.ns0=Math.abs(this.lat1-this.lat2)>n?(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):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)},o.forward=function(t){var e=t.x,o=t.y;this.sin_phi=Math.sin(o),this.cos_phi=Math.cos(o);var n=s(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,a=this.ns0*r(e-this.long0),l=i*Math.sin(a)+this.x0,c=this.rh-i*Math.cos(a)+this.y0;return t.x=l,t.y=c,t},o.inverse=function(t){var e,o,n,i,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),n=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),i=0,0!==e&&(i=Math.atan2(n*t.x,n*t.y)),n=e*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(o=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,o)),s=r(i/this.ns0+this.long0),t.x=s,t.y=a,t},o.phi1z=function(t,e){var o,i,s,r,l,c=a(.5*e);if(n>t)return c;for(var u=t*t,h=1;25>=h;h++)if(o=Math.sin(c),i=Math.cos(c),s=t*o,r=1-s*s,l=.5*r*r/i*(e/(1-u)-o/r+.5/t*Math.log((1-s)/(1+s))),c+=l,Math.abs(l)<=1e-7)return c;return null},o.names=["Albers_Conic_Equal_Area","Albers","aea"]},{"../common/adjust_lon":5,"../common/asinz":6,"../common/msfnz":15,"../common/qsfnz":20}],40:[function(t,e,o){var n=t("../common/adjust_lon"),i=Math.PI/2,s=1e-10,r=t("../common/mlfn"),a=t("../common/e0fn"),l=t("../common/e1fn"),c=t("../common/e2fn"),u=t("../common/e3fn"),h=t("../common/gN"),d=t("../common/asinz"),p=t("../common/imlfn");o.init=function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},o.forward=function(t){var e,o,d,p,m,f,g,_,y,v,E,S,C,A,P,M,w,I,R,G,b,x,O,L=t.x,T=t.y,N=Math.sin(t.y),k=Math.cos(t.y),D=n(L-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=s?(t.x=this.x0+this.a*(i-T)*Math.sin(D),t.y=this.y0-this.a*(i-T)*Math.cos(D),t):Math.abs(this.sin_p12+1)<=s?(t.x=this.x0+this.a*(i+T)*Math.sin(D),t.y=this.y0+this.a*(i+T)*Math.cos(D),t):(I=this.sin_p12*N+this.cos_p12*k*Math.cos(D),M=Math.acos(I),w=M/Math.sin(M),t.x=this.x0+this.a*w*k*Math.sin(D),t.y=this.y0+this.a*w*(this.cos_p12*N-this.sin_p12*k*Math.cos(D)),t):(e=a(this.es),o=l(this.es),d=c(this.es),p=u(this.es),Math.abs(this.sin_p12-1)<=s?(m=this.a*r(e,o,d,p,i),f=this.a*r(e,o,d,p,T),t.x=this.x0+(m-f)*Math.sin(D),t.y=this.y0-(m-f)*Math.cos(D),t):Math.abs(this.sin_p12+1)<=s?(m=this.a*r(e,o,d,p,i),f=this.a*r(e,o,d,p,T),t.x=this.x0+(m+f)*Math.sin(D),t.y=this.y0+(m+f)*Math.cos(D),t):(g=N/k,_=h(this.a,this.e,this.sin_p12),y=h(this.a,this.e,N),v=Math.atan((1-this.es)*g+this.es*_*this.sin_p12/(y*k)),E=Math.atan2(Math.sin(D),this.cos_p12*Math.tan(v)-this.sin_p12*Math.cos(D)),R=0===E?Math.asin(this.cos_p12*Math.sin(v)-this.sin_p12*Math.cos(v)):Math.abs(Math.abs(E)-Math.PI)<=s?-Math.asin(this.cos_p12*Math.sin(v)-this.sin_p12*Math.cos(v)):Math.asin(Math.sin(D)*Math.cos(v)/Math.sin(E)),
  S=this.e*this.sin_p12/Math.sqrt(1-this.es),C=this.e*this.cos_p12*Math.cos(E)/Math.sqrt(1-this.es),A=S*C,P=C*C,G=R*R,b=G*R,x=b*R,O=x*R,M=_*R*(1-G*P*(1-P)/6+b/8*A*(1-2*P)+x/120*(P*(4-7*P)-3*S*S*(1-7*P))-O/48*A),t.x=this.x0+M*Math.sin(E),t.y=this.y0+M*Math.cos(E),t))},o.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,o,m,f,g,_,y,v,E,S,C,A,P,M,w,I,R,G,b,x,O,L,T;if(this.sphere){if(e=Math.sqrt(t.x*t.x+t.y*t.y),e>2*i*this.a)return;return o=e/this.a,m=Math.sin(o),f=Math.cos(o),g=this.long0,Math.abs(e)<=s?_=this.lat0:(_=d(f*this.sin_p12+t.y*m*this.cos_p12/e),y=Math.abs(this.lat0)-i,g=n(Math.abs(y)<=s?this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y):this.long0+Math.atan2(t.x*m,e*this.cos_p12*f-t.y*this.sin_p12*m))),t.x=g,t.y=_,t}return v=a(this.es),E=l(this.es),S=c(this.es),C=u(this.es),Math.abs(this.sin_p12-1)<=s?(A=this.a*r(v,E,S,C,i),e=Math.sqrt(t.x*t.x+t.y*t.y),P=A-e,_=p(P/this.a,v,E,S,C),g=n(this.long0+Math.atan2(t.x,-1*t.y)),t.x=g,t.y=_,t):Math.abs(this.sin_p12+1)<=s?(A=this.a*r(v,E,S,C,i),e=Math.sqrt(t.x*t.x+t.y*t.y),P=e-A,_=p(P/this.a,v,E,S,C),g=n(this.long0+Math.atan2(t.x,t.y)),t.x=g,t.y=_,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),I=Math.atan2(t.x,t.y),M=h(this.a,this.e,this.sin_p12),R=Math.cos(I),G=this.e*this.cos_p12*R,b=-G*G/(1-this.es),x=3*this.es*(1-b)*this.sin_p12*this.cos_p12*R/(1-this.es),O=e/M,L=O-b*(1+b)*Math.pow(O,3)/6-x*(1+3*b)*Math.pow(O,4)/24,T=1-b*L*L/2-O*L*L*L/6,w=Math.asin(this.sin_p12*Math.cos(L)+this.cos_p12*Math.sin(L)*R),g=n(this.long0+Math.asin(Math.sin(I)*Math.sin(L)/Math.cos(w))),_=Math.atan((1-this.es*T*this.sin_p12/Math.sin(w))*Math.tan(w)/(1-this.es)),t.x=g,t.y=_,t)},o.names=["Azimuthal_Equidistant","aeqd"]},{"../common/adjust_lon":5,"../common/asinz":6,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/imlfn":12,"../common/mlfn":14}],41:[function(t,e,o){var n=t("../common/mlfn"),i=t("../common/e0fn"),s=t("../common/e1fn"),r=t("../common/e2fn"),a=t("../common/e3fn"),l=t("../common/gN"),c=t("../common/adjust_lon"),u=t("../common/adjust_lat"),h=t("../common/imlfn"),d=Math.PI/2,p=1e-10;o.init=function(){this.sphere||(this.e0=i(this.es),this.e1=s(this.es),this.e2=r(this.es),this.e3=a(this.es),this.ml0=this.a*n(this.e0,this.e1,this.e2,this.e3,this.lat0))},o.forward=function(t){var e,o,i=t.x,s=t.y;if(i=c(i-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(s)*Math.sin(i)),o=this.a*(Math.atan2(Math.tan(s),Math.cos(i))-this.lat0);else{var r=Math.sin(s),a=Math.cos(s),u=l(this.a,this.e,r),h=Math.tan(s)*Math.tan(s),d=i*Math.cos(s),p=d*d,m=this.es*a*a/(1-this.es),f=this.a*n(this.e0,this.e1,this.e2,this.e3,s);e=u*d*(1-p*h*(1/6-(8-h+8*m)*p/120)),o=f-this.ml0+u*r/a*p*(.5+(5-h+6*m)*p/24)}return t.x=e+this.x0,t.y=o+this.y0,t},o.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,o,n=t.x/this.a,i=t.y/this.a;if(this.sphere){var s=i+this.lat0;e=Math.asin(Math.sin(s)*Math.cos(n)),o=Math.atan2(Math.tan(n),Math.cos(s))}else{var r=this.ml0/this.a+i,a=h(r,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-d)<=p)return t.x=this.long0,t.y=d,0>i&&(t.y*=-1),t;var m=l(this.a,this.e,Math.sin(a)),f=m*m*m/this.a/this.a*(1-this.es),g=Math.pow(Math.tan(a),2),_=n*this.a/m,y=_*_;e=a-m*Math.tan(a)/f*_*_*(.5-(1+3*g)*_*_/24),o=_*(1-y*(g/3+(1+3*g)*g*y/15))/Math.cos(a)}return t.x=c(o+this.long0),t.y=u(e),t},o.names=["Cassini","Cassini_Soldner","cass"]},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/imlfn":12,"../common/mlfn":14}],42:[function(t,e,o){var n=t("../common/adjust_lon"),i=t("../common/qsfnz"),s=t("../common/msfnz"),r=t("../common/iqsfnz");o.init=function(){this.sphere||(this.k0=s(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},o.forward=function(t){var e,o,s=t.x,r=t.y,a=n(s-this.long0);if(this.sphere)e=this.x0+this.a*a*Math.cos(this.lat_ts),o=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var l=i(this.e,Math.sin(r));e=this.x0+this.a*this.k0*a,o=this.y0+this.a*l*.5/this.k0}return t.x=e,t.y=o,t},o.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,o;return this.sphere?(e=n(this.long0+t.x/this.a/Math.cos(this.lat_ts)),o=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(o=r(this.e,2*t.y*this.k0/this.a),e=n(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=o,t},o.names=["cea"]},{"../common/adjust_lon":5,"../common/iqsfnz":13,"../common/msfnz":15,"../common/qsfnz":20}],43:[function(t,e,o){var n=t("../common/adjust_lon"),i=t("../common/adjust_lat");o.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)},o.forward=function(t){var e=t.x,o=t.y,s=n(e-this.long0),r=i(o-this.lat0);return t.x=this.x0+this.a*s*this.rc,t.y=this.y0+this.a*r,t},o.inverse=function(t){var e=t.x,o=t.y;return t.x=n(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=i(this.lat0+(o-this.y0)/this.a),t},o.names=["Equirectangular","Equidistant_Cylindrical","eqc"]},{"../common/adjust_lat":4,"../common/adjust_lon":5}],44:[function(t,e,o){var n=t("../common/e0fn"),i=t("../common/e1fn"),s=t("../common/e2fn"),r=t("../common/e3fn"),a=t("../common/msfnz"),l=t("../common/mlfn"),c=t("../common/adjust_lon"),u=t("../common/adjust_lat"),h=t("../common/imlfn"),d=1e-10;o.init=function(){Math.abs(this.lat1+this.lat2)<d||(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=n(this.es),this.e1=i(this.es),this.e2=s(this.es),this.e3=r(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=a(this.e,this.sinphi,this.cosphi),this.ml1=l(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<d?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=a(this.e,this.sinphi,this.cosphi),this.ml2=l(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=l(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},o.forward=function(t){var e,o=t.x,n=t.y;if(this.sphere)e=this.a*(this.g-n);else{var i=l(this.e0,this.e1,this.e2,this.e3,n);e=this.a*(this.g-i)}var s=this.ns*c(o-this.long0),r=this.x0+e*Math.sin(s),a=this.y0+this.rh-e*Math.cos(s);return t.x=r,t.y=a,t},o.inverse=function(t){t.x-=this.x0,t.y=this.rh-t.y+this.y0;var e,o,n,i;this.ns>=0?(o=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(o=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var s=0;if(0!==o&&(s=Math.atan2(e*t.x,e*t.y)),this.sphere)return i=c(this.long0+s/this.ns),n=u(this.g-o/this.a),t.x=i,t.y=n,t;var r=this.g-o/this.a;return n=h(r,this.e0,this.e1,this.e2,this.e3),i=c(this.long0+s/this.ns),t.x=i,t.y=n,t},o.names=["Equidistant_Conic","eqdc"]},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/imlfn":12,"../common/mlfn":14,"../common/msfnz":15}],45:[function(t,e,o){var n=Math.PI/4,i=t("../common/srat"),s=Math.PI/2,r=20;o.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)*i(this.e*t,this.ratexp))},o.forward=function(t){var e=t.x,o=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*o+n),this.C)*i(this.e*Math.sin(o),this.ratexp))-s,t.x=this.C*e,t},o.inverse=function(t){for(var e=1e-14,o=t.x/this.C,a=t.y,l=Math.pow(Math.tan(.5*a+n)/this.K,1/this.C),c=r;c>0&&(a=2*Math.atan(l*i(this.e*Math.sin(t.y),-.5*this.e))-s,!(Math.abs(a-t.y)<e));--c)t.y=a;return c?(t.x=o,t.y=a,t):null},o.names=["gauss"]},{"../common/srat":22}],46:[function(t,e,o){var n=t("../common/adjust_lon"),i=1e-10,s=t("../common/asinz");o.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},o.forward=function(t){var e,o,s,r,a,l,c,u,h=t.x,d=t.y;return s=n(h-this.long0),e=Math.sin(d),o=Math.cos(d),r=Math.cos(s),l=this.sin_p14*e+this.cos_p14*o*r,a=1,l>0||Math.abs(l)<=i?(c=this.x0+this.a*a*o*Math.sin(s)/l,u=this.y0+this.a*a*(this.cos_p14*e-this.sin_p14*o*r)/l):(c=this.x0+this.infinity_dist*o*Math.sin(s),u=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*o*r)),t.x=c,t.y=u,t},o.inverse=function(t){var e,o,i,r,a,l;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))?(r=Math.atan2(e,this.rc),o=Math.sin(r),i=Math.cos(r),l=s(i*this.sin_p14+t.y*o*this.cos_p14/e),a=Math.atan2(t.x*o,e*this.cos_p14*i-t.y*this.sin_p14*o),a=n(this.long0+a)):(l=this.phic0,a=0),t.x=a,t.y=l,t},o.names=["gnom"]},{"../common/adjust_lon":5,"../common/asinz":6}],47:[function(t,e,o){var n=t("../common/adjust_lon");o.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},o.forward=function(t){var e,o,i,s,r,a,l,c=t.x,u=t.y,h=n(c-this.long0);return e=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),o=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/e)-this.s45),i=-h*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(o)+Math.sin(this.ad)*Math.cos(o)*Math.cos(i)),r=Math.asin(Math.cos(o)*Math.sin(i)/Math.cos(s)),a=this.n*r,l=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n),t.y=l*Math.cos(a)/1,t.x=l*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t},o.inverse=function(t){var e,o,n,i,s,r,a,l,c=t.x;t.x=t.y,t.y=c,this.czech||(t.y*=-1,t.x*=-1),r=Math.sqrt(t.x*t.x+t.y*t.y),s=Math.atan2(t.y,t.x),i=s/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/r,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),o=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(e)),t.x=this.long0-o/this.alfa,a=e,l=0;var u=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&&(l=1),a=t.y,u+=1;while(0===l&&15>u);return u>=15?null:t},o.names=["Krovak","krovak"]},{"../common/adjust_lon":5}],48:[function(t,e,o){var n=Math.PI/2,i=Math.PI/4,s=1e-10,r=t("../common/qsfnz"),a=t("../common/adjust_lon");o.S_POLE=1,o.N_POLE=2,o.EQUIT=3,o.OBLIQ=4,o.init=function(){var t=Math.abs(this.lat0);if(this.mode=Math.abs(t-n)<s?this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<s?this.EQUIT:this.OBLIQ,this.es>0){var e;switch(this.qp=r(this.e,1),this.mmf=.5/(1-this.es),this.apa=this.authset(this.es),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(.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),e=Math.sin(this.lat0),this.sinb1=r(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*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))},o.forward=function(t){var e,o,l,c,u,h,d,p,m,f,g=t.x,_=t.y;if(g=a(g-this.long0),this.sphere){if(u=Math.sin(_),f=Math.cos(_),l=Math.cos(g),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(o=this.mode===this.EQUIT?1+f*l:1+this.sinph0*u+this.cosph0*f*l,s>=o)return null;o=Math.sqrt(2/o),e=o*f*Math.sin(g),o*=this.mode===this.EQUIT?u:this.cosph0*u-this.sinph0*f*l}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(l=-l),Math.abs(_+this.phi0)<s)return null;o=i-.5*_,o=2*(this.mode===this.S_POLE?Math.cos(o):Math.sin(o)),e=o*Math.sin(g),o*=l}}else{switch(d=0,p=0,m=0,l=Math.cos(g),c=Math.sin(g),u=Math.sin(_),h=r(this.e,u),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=h/this.qp,p=Math.sqrt(1-d*d)),this.mode){case this.OBLIQ:m=1+this.sinb1*d+this.cosb1*p*l;break;case this.EQUIT:m=1+p*l;break;case this.N_POLE:m=n+_,h=this.qp-h;break;case this.S_POLE:m=_-n,h=this.qp+h}if(Math.abs(m)<s)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:m=Math.sqrt(2/m),o=this.mode===this.OBLIQ?this.ymf*m*(this.cosb1*d-this.sinb1*p*l):(m=Math.sqrt(2/(1+p*l)))*d*this.ymf,e=this.xmf*m*p*c;break;case this.N_POLE:case this.S_POLE:h>=0?(e=(m=Math.sqrt(h))*c,o=l*(this.mode===this.S_POLE?m:-m)):e=o=0}}return t.x=this.a*e+this.x0,t.y=this.a*o+this.y0,t},o.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,o,i,r,l,c,u,h=t.x/this.a,d=t.y/this.a;if(this.sphere){var p,m=0,f=0;if(p=Math.sqrt(h*h+d*d),o=.5*p,o>1)return null;switch(o=2*Math.asin(o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(f=Math.sin(o),m=Math.cos(o)),this.mode){case this.EQUIT:o=Math.abs(p)<=s?0:Math.asin(d*f/p),h*=f,d=m*p;break;case this.OBLIQ:o=Math.abs(p)<=s?this.phi0:Math.asin(m*this.sinph0+d*f*this.cosph0/p),h*=f*this.cosph0,d=(m-Math.sin(o)*this.sinph0)*p;break;case this.N_POLE:d=-d,o=n-o;break;case this.S_POLE:o-=n}e=0!==d||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(h,d):0}else{if(u=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(h/=this.dd,d*=this.dd,c=Math.sqrt(h*h+d*d),s>c)return t.x=0,t.y=this.phi0,t;r=2*Math.asin(.5*c/this.rq),i=Math.cos(r),h*=r=Math.sin(r),this.mode===this.OBLIQ?(u=i*this.sinb1+d*r*this.cosb1/c,l=this.qp*u,d=c*this.cosb1*i-d*this.sinb1*r):(u=d*r/c,l=this.qp*u,d=c*i)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(d=-d),l=h*h+d*d,!l)return t.x=0,t.y=this.phi0,t;u=1-l/this.qp,this.mode===this.S_POLE&&(u=-u)}e=Math.atan2(h,d),o=this.authlat(Math.asin(u),this.apa)}return t.x=a(this.long0+e),t.y=o,t},o.P00=.3333333333333333,o.P01=.17222222222222222,o.P02=.10257936507936508,o.P10=.06388888888888888,o.P11=.0664021164021164,o.P20=.016415012942191543,o.authset=function(t){var e,o=[];return o[0]=t*this.P00,e=t*t,o[0]+=e*this.P01,o[1]=e*this.P10,e*=t,o[0]+=e*this.P02,o[1]+=e*this.P11,o[2]=e*this.P20,o},o.authlat=function(t,e){var o=t+t;return t+e[0]*Math.sin(o)+e[1]*Math.sin(o+o)+e[2]*Math.sin(o+o+o)},o.names=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"]},{"../common/adjust_lon":5,"../common/qsfnz":20}],49:[function(t,e,o){var n=1e-10,i=t("../common/msfnz"),s=t("../common/tsfnz"),r=Math.PI/2,a=t("../common/sign"),l=t("../common/adjust_lon"),c=t("../common/phi2z");o.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)<n)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),o=Math.cos(this.lat1),r=i(this.e,e,o),a=s(this.e,this.lat1,e),l=Math.sin(this.lat2),c=Math.cos(this.lat2),u=i(this.e,l,c),h=s(this.e,this.lat2,l),d=s(this.e,this.lat0,Math.sin(this.lat0));this.ns=Math.abs(this.lat1-this.lat2)>n?Math.log(r/u)/Math.log(a/h):e,isNaN(this.ns)&&(this.ns=e),this.f0=r/(this.ns*Math.pow(a,this.ns)),this.rh=this.a*this.f0*Math.pow(d,this.ns),this.title||(this.title="Lambert Conformal Conic")}},o.forward=function(t){var e=t.x,o=t.y;Math.abs(2*Math.abs(o)-Math.PI)<=n&&(o=a(o)*(r-2*n));var i,c,u=Math.abs(Math.abs(o)-r);if(u>n)i=s(this.e,o,Math.sin(o)),c=this.a*this.f0*Math.pow(i,this.ns);else{if(u=o*this.ns,0>=u)return null;c=0}var h=this.ns*l(e-this.long0);return t.x=this.k0*c*Math.sin(h)+this.x0,t.y=this.k0*(this.rh-c*Math.cos(h))+this.y0,t},o.inverse=function(t){var e,o,n,i,s,a=(t.x-this.x0)/this.k0,u=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(a*a+u*u),o=1):(e=-Math.sqrt(a*a+u*u),o=-1);var h=0;if(0!==e&&(h=Math.atan2(o*a,o*u)),0!==e||this.ns>0){if(o=1/this.ns,n=Math.pow(e/(this.a*this.f0),o),i=c(this.e,n),-9999===i)return null}else i=-r;return s=l(h/this.ns+this.long0),t.x=s,t.y=i,t},o.names=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]},{"../common/adjust_lon":5,"../common/msfnz":15,"../common/phi2z":16,"../common/sign":21,"../common/tsfnz":24}],50:[function(t,e,o){function n(t){return t}o.init=function(){},o.forward=n,o.inverse=n,o.names=["longlat","identity"]},{}],51:[function(t,e,o){var n=t("../common/msfnz"),i=Math.PI/2,s=1e-10,r=57.29577951308232,a=t("../common/adjust_lon"),l=Math.PI/4,c=t("../common/tsfnz"),u=t("../common/phi2z");o.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.k0=this.sphere?Math.cos(this.lat_ts):n(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k0=this.k?this.k:1)},o.forward=function(t){var e=t.x,o=t.y;if(o*r>90&&-90>o*r&&e*r>180&&-180>e*r)return null;var n,u;if(Math.abs(Math.abs(o)-i)<=s)return null;if(this.sphere)n=this.x0+this.a*this.k0*a(e-this.long0),u=this.y0+this.a*this.k0*Math.log(Math.tan(l+.5*o));else{var h=Math.sin(o),d=c(this.e,o,h);n=this.x0+this.a*this.k0*a(e-this.long0),u=this.y0-this.a*this.k0*Math.log(d)}return t.x=n,t.y=u,t},o.inverse=function(t){var e,o,n=t.x-this.x0,s=t.y-this.y0;if(this.sphere)o=i-2*Math.atan(Math.exp(-s/(this.a*this.k0)));else{var r=Math.exp(-s/(this.a*this.k0));if(o=u(this.e,r),-9999===o)return null}return e=a(this.long0+n/(this.a*this.k0)),t.x=e,t.y=o,t},o.names=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{"../common/adjust_lon":5,"../common/msfnz":15,"../common/phi2z":16,"../common/tsfnz":24}],52:[function(t,e,o){var n=t("../common/adjust_lon");o.init=function(){},o.forward=function(t){var e=t.x,o=t.y,i=n(e-this.long0),s=this.x0+this.a*i,r=this.y0+this.a*Math.log(Math.tan(Math.PI/4+o/2.5))*1.25;return t.x=s,t.y=r,t},o.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e=n(this.long0+t.x/this.a),o=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=o,t},o.names=["Miller_Cylindrical","mill"]},{"../common/adjust_lon":5}],53:[function(t,e,o){var n=t("../common/adjust_lon"),i=1e-10;o.init=function(){},o.forward=function(t){for(var e=t.x,o=t.y,s=n(e-this.long0),r=o,a=Math.PI*Math.sin(o),l=0;!0;l++){var c=-(r+Math.sin(r)-a)/(1+Math.cos(r));if(r+=c,Math.abs(c)<i)break}r/=2,Math.PI/2-Math.abs(o)<i&&(s=0);var u=.900316316158*this.a*s*Math.cos(r)+this.x0,h=1.4142135623731*this.a*Math.sin(r)+this.y0;return t.x=u,t.y=h,t},o.inverse=function(t){var e,o;t.x-=this.x0,t.y-=this.y0,o=t.y/(1.4142135623731*this.a),Math.abs(o)>.999999999999&&(o=.999999999999),e=Math.asin(o);var i=n(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));i<-Math.PI&&(i=-Math.PI),i>Math.PI&&(i=Math.PI),o=(2*e+Math.sin(2*e))/Math.PI,Math.abs(o)>1&&(o=1);var s=Math.asin(o);return t.x=i,t.y=s,t},o.names=["Mollweide","moll"]},{"../common/adjust_lon":5}],54:[function(t,e,o){var n=484813681109536e-20;o.iterations=1,o.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},o.forward=function(t){var e,o=t.x,i=t.y,s=i-this.lat0,r=o-this.long0,a=s/n*1e-5,l=r,c=1,u=0;for(e=1;10>=e;e++)c*=a,u+=this.A[e]*c;var h,d,p=u,m=l,f=1,g=0,_=0,y=0;for(e=1;6>=e;e++)h=f*p-g*m,d=g*p+f*m,f=h,g=d,_=_+this.B_re[e]*f-this.B_im[e]*g,y=y+this.B_im[e]*f+this.B_re[e]*g;return t.x=y*this.a+this.x0,t.y=_*this.a+this.y0,t},o.inverse=function(t){var e,o,i,s=t.x,r=t.y,a=s-this.x0,l=r-this.y0,c=l/this.a,u=a/this.a,h=1,d=0,p=0,m=0;for(e=1;6>=e;e++)o=h*c-d*u,i=d*c+h*u,h=o,d=i,p=p+this.C_re[e]*h-this.C_im[e]*d,m=m+this.C_im[e]*h+this.C_re[e]*d;for(var f=0;f<this.iterations;f++){var g,_,y=p,v=m,E=c,S=u;for(e=2;6>=e;e++)g=y*p-v*m,_=v*p+y*m,y=g,v=_,E+=(e-1)*(this.B_re[e]*y-this.B_im[e]*v),S+=(e-1)*(this.B_im[e]*y+this.B_re[e]*v);y=1,v=0;var C=this.B_re[1],A=this.B_im[1];for(e=2;6>=e;e++)g=y*p-v*m,_=v*p+y*m,y=g,v=_,C+=e*(this.B_re[e]*y-this.B_im[e]*v),A+=e*(this.B_im[e]*y+this.B_re[e]*v);var P=C*C+A*A;p=(E*C+S*A)/P,m=(S*C-E*A)/P}var M=p,w=m,I=1,R=0;for(e=1;9>=e;e++)I*=M,R+=this.D[e]*I;var G=this.lat0+R*n*1e5,b=this.long0+w;return t.x=b,t.y=G,t},o.names=["New_Zealand_Map_Grid","nzmg"]},{}],55:[function(t,e,o){var n=t("../common/tsfnz"),i=t("../common/adjust_lon"),s=t("../common/phi2z"),r=Math.PI/2,a=Math.PI/4,l=1e-10;o.init=function(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var t=Math.sin(this.lat0),e=Math.cos(this.lat0),o=this.e*t;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(e,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-o*o);var s=n(this.e,this.lat0,t),r=this.bl/e*Math.sqrt((1-this.es)/(1-o*o));1>r*r&&(r=1);var a,l;if(isNaN(this.longc)){var c=n(this.e,this.lat1,Math.sin(this.lat1)),u=n(this.e,this.lat2,Math.sin(this.lat2));this.el=this.lat0>=0?(r+Math.sqrt(r*r-1))*Math.pow(s,this.bl):(r-Math.sqrt(r*r-1))*Math.pow(s,this.bl);var h=Math.pow(c,this.bl),d=Math.pow(u,this.bl);a=this.el/h,l=.5*(a-1/a);var p=(this.el*this.el-d*h)/(this.el*this.el+d*h),m=(d-h)/(d+h),f=i(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(p*Math.tan(.5*this.bl*f)/m)/this.bl,this.long0=i(this.long0);var g=i(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*g)/l),this.alpha=Math.asin(r*Math.sin(this.gamma0))}else a=this.lat0>=0?r+Math.sqrt(r*r-1):r-Math.sqrt(r*r-1),this.el=a*Math.pow(s,this.bl),l=.5*(a-1/a),this.gamma0=Math.asin(Math.sin(this.alpha)/r),this.long0=this.longc-Math.asin(l*Math.tan(this.gamma0))/this.bl;this.uc=this.no_off?0:this.lat0>=0?this.al/this.bl*Math.atan2(Math.sqrt(r*r-1),Math.cos(this.alpha)):-1*this.al/this.bl*Math.atan2(Math.sqrt(r*r-1),Math.cos(this.alpha))},o.forward=function(t){var e,o,s,c=t.x,u=t.y,h=i(c-this.long0);if(Math.abs(Math.abs(u)-r)<=l)s=u>0?-1:1,o=this.al/this.bl*Math.log(Math.tan(a+s*this.gamma0*.5)),e=-1*s*r*this.al/this.bl;else{var d=n(this.e,u,Math.sin(u)),p=this.el/Math.pow(d,this.bl),m=.5*(p-1/p),f=.5*(p+1/p),g=Math.sin(this.bl*h),_=(m*Math.sin(this.gamma0)-g*Math.cos(this.gamma0))/f;o=Math.abs(Math.abs(_)-1)<=l?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-_)/(1+_))/this.bl,e=Math.abs(Math.cos(this.bl*h))<=l?this.al*this.bl*h:this.al*Math.atan2(m*Math.cos(this.gamma0)+g*Math.sin(this.gamma0),Math.cos(this.bl*h))/this.bl}return this.no_rot?(t.x=this.x0+e,t.y=this.y0+o):(e-=this.uc,t.x=this.x0+o*Math.cos(this.alpha)+e*Math.sin(this.alpha),t.y=this.y0+e*Math.cos(this.alpha)-o*Math.sin(this.alpha)),t},o.inverse=function(t){var e,o;this.no_rot?(o=t.y-this.y0,e=t.x-this.x0):(o=(t.x-this.x0)*Math.cos(this.alpha)-(t.y-this.y0)*Math.sin(this.alpha),e=(t.y-this.y0)*Math.cos(this.alpha)+(t.x-this.x0)*Math.sin(this.alpha),e+=this.uc);var n=Math.exp(-1*this.bl*o/this.al),a=.5*(n-1/n),c=.5*(n+1/n),u=Math.sin(this.bl*e/this.al),h=(u*Math.cos(this.gamma0)+a*Math.sin(this.gamma0))/c,d=Math.pow(this.el/Math.sqrt((1+h)/(1-h)),1/this.bl);return Math.abs(h-1)<l?(t.x=this.long0,t.y=r):Math.abs(h+1)<l?(t.x=this.long0,t.y=-1*r):(t.y=s(this.e,d),t.x=i(this.long0-Math.atan2(a*Math.cos(this.gamma0)-u*Math.sin(this.gamma0),Math.cos(this.bl*e/this.al))/this.bl)),t},o.names=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"]},{"../common/adjust_lon":5,"../common/phi2z":16,"../common/tsfnz":24}],56:[function(t,e,o){var n=t("../common/e0fn"),i=t("../common/e1fn"),s=t("../common/e2fn"),r=t("../common/e3fn"),a=t("../common/adjust_lon"),l=t("../common/adjust_lat"),c=t("../common/mlfn"),u=1e-10,h=t("../common/gN"),d=20;o.init=function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=n(this.es),this.e1=i(this.es),this.e2=s(this.es),this.e3=r(this.es),this.ml0=this.a*c(this.e0,this.e1,this.e2,this.e3,this.lat0)},o.forward=function(t){var e,o,n,i=t.x,s=t.y,r=a(i-this.long0);if(n=r*Math.sin(s),this.sphere)Math.abs(s)<=u?(e=this.a*r,o=-1*this.a*this.lat0):(e=this.a*Math.sin(n)/Math.tan(s),o=this.a*(l(s-this.lat0)+(1-Math.cos(n))/Math.tan(s)));else if(Math.abs(s)<=u)e=this.a*r,o=-1*this.ml0;else{var d=h(this.a,this.e,Math.sin(s))/Math.tan(s);e=d*Math.sin(n),o=this.a*c(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+d*(1-Math.cos(n))}return t.x=e+this.x0,t.y=o+this.y0,t},o.inverse=function(t){var e,o,n,i,s,r,l,h,p;if(n=t.x-this.x0,i=t.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=u)e=a(n/this.a+this.long0),o=0;else{r=this.lat0+i/this.a,l=n*n/this.a/this.a+r*r,h=r;var m;for(s=d;s;--s)if(m=Math.tan(h),p=-1*(r*(h*m+1)-h-.5*(h*h+l)*m)/((h-r)/m-1),h+=p,Math.abs(p)<=u){o=h;break}e=a(this.long0+Math.asin(n*Math.tan(h)/this.a)/Math.sin(o))}else if(Math.abs(i+this.ml0)<=u)o=0,e=a(this.long0+n/this.a);else{r=(this.ml0+i)/this.a,l=n*n/this.a/this.a+r*r,h=r;var f,g,_,y,v;for(s=d;s;--s)if(v=this.e*Math.sin(h),f=Math.sqrt(1-v*v)*Math.tan(h),g=this.a*c(this.e0,this.e1,this.e2,this.e3,h),_=this.e0-2*this.e1*Math.cos(2*h)+4*this.e2*Math.cos(4*h)-6*this.e3*Math.cos(6*h),y=g/this.a,p=(r*(f*y+1)-y-.5*f*(y*y+l))/(this.es*Math.sin(2*h)*(y*y+l-2*r*y)/(4*f)+(r-y)*(f*_-2/Math.sin(2*h))-_),h-=p,Math.abs(p)<=u){o=h;break}f=Math.sqrt(1-this.es*Math.pow(Math.sin(o),2))*Math.tan(o),e=a(this.long0+Math.asin(n*f/this.a)/Math.sin(o))}return t.x=e,t.y=o,t},o.names=["Polyconic","poly"]},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/mlfn":14}],57:[function(t,e,o){var n=t("../common/adjust_lon"),i=t("../common/adjust_lat"),s=t("../common/pj_enfn"),r=20,a=t("../common/pj_mlfn"),l=t("../common/pj_inv_mlfn"),c=Math.PI/2,u=1e-10,h=t("../common/asinz");o.init=function(){this.sphere?(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)):this.en=s(this.es)},o.forward=function(t){var e,o,i=t.x,s=t.y;if(i=n(i-this.long0),this.sphere){if(this.m)for(var l=this.n*Math.sin(s),c=r;c;--c){var h=(this.m*s+Math.sin(s)-l)/(this.m+Math.cos(s));if(s-=h,Math.abs(h)<u)break}else s=1!==this.n?Math.asin(this.n*Math.sin(s)):s;e=this.a*this.C_x*i*(this.m+Math.cos(s)),o=this.a*this.C_y*s}else{var d=Math.sin(s),p=Math.cos(s);o=this.a*a(s,d,p,this.en),e=this.a*i*p/Math.sqrt(1-this.es*d*d)}return t.x=e,t.y=o,t},o.inverse=function(t){var e,o,s,r;return t.x-=this.x0,s=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,s/=this.C_x*(this.m+Math.cos(e)),this.m?e=h((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=h(Math.sin(e)/this.n)),s=n(s+this.long0),e=i(e)):(e=l(t.y/this.a,this.es,this.en),r=Math.abs(e),c>r?(r=Math.sin(e),o=this.long0+t.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(e)),s=n(o)):c>r-u&&(s=this.long0)),t.x=s,t.y=e,t},o.names=["Sinusoidal","sinu"]},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/asinz":6,"../common/pj_enfn":17,"../common/pj_inv_mlfn":18,"../common/pj_mlfn":19}],58:[function(t,e,o){o.init=function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),o=this.a,n=this.rf,i=1/n,s=2*i-Math.pow(i,2),r=this.e=Math.sqrt(s);this.R=this.k0*o*Math.sqrt(1-s)/(1-s*Math.pow(e,2)),this.alpha=Math.sqrt(1+s/(1-s)*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)),l=Math.log(Math.tan(Math.PI/4+t/2)),c=Math.log((1+r*e)/(1-r*e));this.K=a-this.alpha*l+this.alpha*r/2*c},o.forward=function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),o=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(e+o)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),s=this.alpha*(t.x-this.lambda0),r=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(s))),a=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(s));return t.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,t.x=this.R*r+this.x0,t},o.inverse=function(t){for(var e=t.x-this.x0,o=t.y-this.y0,n=e/this.R,i=2*(Math.atan(Math.exp(o/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),r=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),a=this.lambda0+r/this.alpha,l=0,c=s,u=-1e3,h=0;Math.abs(c-u)>1e-7;){if(++h>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)),u=c,c=2*Math.atan(Math.exp(l))-Math.PI/2}return t.x=a,t.y=c,t},o.names=["somerc"]},{}],59:[function(t,e,o){var n=Math.PI/2,i=1e-10,s=t("../common/sign"),r=t("../common/msfnz"),a=t("../common/tsfnz"),l=t("../common/phi2z"),c=t("../common/adjust_lon");o.ssfn_=function(t,e,o){return e*=o,Math.tan(.5*(n+t))*Math.pow((1-e)/(1+e),.5*o)},o.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)<=i&&(this.k0=.5*(1+s(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=i&&(this.con=this.lat0>0?1:-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)<=i&&(this.k0=.5*this.cons*r(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/a(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=r(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-n,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},o.forward=function(t){var e,o,s,r,l,u,h=t.x,d=t.y,p=Math.sin(d),m=Math.cos(d),f=c(h-this.long0);return Math.abs(Math.abs(h-this.long0)-Math.PI)<=i&&Math.abs(d+this.lat0)<=i?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*p+this.coslat0*m*Math.cos(f)),t.x=this.a*e*m*Math.sin(f)+this.x0,t.y=this.a*e*(this.coslat0*p-this.sinlat0*m*Math.cos(f))+this.y0,t):(o=2*Math.atan(this.ssfn_(d,p,this.e))-n,r=Math.cos(o),s=Math.sin(o),Math.abs(this.coslat0)<=i?(l=a(this.e,d*this.con,this.con*p),u=2*this.a*this.k0*l/this.cons,t.x=this.x0+u*Math.sin(h-this.long0),t.y=this.y0-this.con*u*Math.cos(h-this.long0),t):(Math.abs(this.sinlat0)<i?(e=2*this.a*this.k0/(1+r*Math.cos(f)),t.y=e*s):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*s+this.cosX0*r*Math.cos(f))),t.y=e*(this.cosX0*s-this.sinX0*r*Math.cos(f))+this.y0),t.x=e*r*Math.sin(f)+this.x0,t))},o.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,o,s,r,a,u=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var h=2*Math.atan(u/(.5*this.a*this.k0));return e=this.long0,o=this.lat0,i>=u?(t.x=e,t.y=o,t):(o=Math.asin(Math.cos(h)*this.sinlat0+t.y*Math.sin(h)*this.coslat0/u),e=c(Math.abs(this.coslat0)<i?this.lat0>0?this.long0+Math.atan2(t.x,-1*t.y):this.long0+Math.atan2(t.x,t.y):this.long0+Math.atan2(t.x*Math.sin(h),u*this.coslat0*Math.cos(h)-t.y*this.sinlat0*Math.sin(h))),
  t.x=e,t.y=o,t)}if(Math.abs(this.coslat0)<=i){if(i>=u)return o=this.lat0,e=this.long0,t.x=e,t.y=o,t;t.x*=this.con,t.y*=this.con,s=u*this.cons/(2*this.a*this.k0),o=this.con*l(this.e,s),e=this.con*c(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else r=2*Math.atan(u*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,i>=u?a=this.X0:(a=Math.asin(Math.cos(r)*this.sinX0+t.y*Math.sin(r)*this.cosX0/u),e=c(this.long0+Math.atan2(t.x*Math.sin(r),u*this.cosX0*Math.cos(r)-t.y*this.sinX0*Math.sin(r)))),o=-1*l(this.e,Math.tan(.5*(n+a)));return t.x=e,t.y=o,t},o.names=["stere"]},{"../common/adjust_lon":5,"../common/msfnz":15,"../common/phi2z":16,"../common/sign":21,"../common/tsfnz":24}],60:[function(t,e,o){var n=t("./gauss"),i=t("../common/adjust_lon");o.init=function(){n.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"))},o.forward=function(t){var e,o,s,r;return t.x=i(t.x-this.long0),n.forward.apply(this,[t]),e=Math.sin(t.y),o=Math.cos(t.y),s=Math.cos(t.x),r=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*o*s),t.x=r*o*Math.sin(t.x),t.y=r*(this.cosc0*e-this.sinc0*o*s),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},o.inverse=function(t){var e,o,s,r,a;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,a=Math.sqrt(t.x*t.x+t.y*t.y)){var l=2*Math.atan2(a,this.R2);e=Math.sin(l),o=Math.cos(l),r=Math.asin(o*this.sinc0+t.y*e*this.cosc0/a),s=Math.atan2(t.x*e,a*this.cosc0*o-t.y*this.sinc0*e)}else r=this.phic0,s=0;return t.x=s,t.y=r,n.inverse.apply(this,[t]),t.x=i(t.x+this.long0),t},o.names=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative"]},{"../common/adjust_lon":5,"./gauss":45}],61:[function(t,e,o){var n=t("../common/e0fn"),i=t("../common/e1fn"),s=t("../common/e2fn"),r=t("../common/e3fn"),a=t("../common/mlfn"),l=t("../common/adjust_lon"),c=Math.PI/2,u=1e-10,h=t("../common/sign"),d=t("../common/asinz");o.init=function(){this.e0=n(this.es),this.e1=i(this.es),this.e2=s(this.es),this.e3=r(this.es),this.ml0=this.a*a(this.e0,this.e1,this.e2,this.e3,this.lat0)},o.forward=function(t){var e,o,n,i=t.x,s=t.y,r=l(i-this.long0),c=Math.sin(s),u=Math.cos(s);if(this.sphere){var h=u*Math.sin(r);if(Math.abs(Math.abs(h)-1)<1e-10)return 93;o=.5*this.a*this.k0*Math.log((1+h)/(1-h)),e=Math.acos(u*Math.cos(r)/Math.sqrt(1-h*h)),0>s&&(e=-e),n=this.a*this.k0*(e-this.lat0)}else{var d=u*r,p=Math.pow(d,2),m=this.ep2*Math.pow(u,2),f=Math.tan(s),g=Math.pow(f,2);e=1-this.es*Math.pow(c,2);var _=this.a/Math.sqrt(e),y=this.a*a(this.e0,this.e1,this.e2,this.e3,s);o=this.k0*_*d*(1+p/6*(1-g+m+p/20*(5-18*g+Math.pow(g,2)+72*m-58*this.ep2)))+this.x0,n=this.k0*(y-this.ml0+_*f*p*(.5+p/24*(5-g+9*m+4*Math.pow(m,2)+p/30*(61-58*g+Math.pow(g,2)+600*m-330*this.ep2))))+this.y0}return t.x=o,t.y=n,t},o.inverse=function(t){var e,o,n,i,s,r,a=6;if(this.sphere){var p=Math.exp(t.x/(this.a*this.k0)),m=.5*(p-1/p),f=this.lat0+t.y/(this.a*this.k0),g=Math.cos(f);e=Math.sqrt((1-g*g)/(1+m*m)),s=d(e),0>f&&(s=-s),r=0===m&&0===g?this.long0:l(Math.atan2(m,g)+this.long0)}else{var _=t.x-this.x0,y=t.y-this.y0;for(e=(this.ml0+y/this.k0)/this.a,o=e,i=0;n=(e+this.e1*Math.sin(2*o)-this.e2*Math.sin(4*o)+this.e3*Math.sin(6*o))/this.e0-o,o+=n,!(Math.abs(n)<=u);i++)if(i>=a)return 95;if(Math.abs(o)<c){var v=Math.sin(o),E=Math.cos(o),S=Math.tan(o),C=this.ep2*Math.pow(E,2),A=Math.pow(C,2),P=Math.pow(S,2),M=Math.pow(P,2);e=1-this.es*Math.pow(v,2);var w=this.a/Math.sqrt(e),I=w*(1-this.es)/e,R=_/(w*this.k0),G=Math.pow(R,2);s=o-w*S*G/I*(.5-G/24*(5+3*P+10*C-4*A-9*this.ep2-G/30*(61+90*P+298*C+45*M-252*this.ep2-3*A))),r=l(this.long0+R*(1-G/6*(1+2*P+C-G/20*(5-2*C+28*P-3*A+8*this.ep2+24*M)))/E)}else s=c*h(y),r=this.long0}return t.x=r,t.y=s,t},o.names=["Transverse_Mercator","Transverse Mercator","tmerc"]},{"../common/adjust_lon":5,"../common/asinz":6,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/mlfn":14,"../common/sign":21}],62:[function(t,e,o){var n=.017453292519943295,i=t("./tmerc");o.dependsOn="tmerc",o.init=function(){this.zone&&(this.lat0=0,this.long0=(6*Math.abs(this.zone)-183)*n,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,i.init.apply(this),this.forward=i.forward,this.inverse=i.inverse)},o.names=["Universal Transverse Mercator System","utm"]},{"./tmerc":61}],63:[function(t,e,o){var n=t("../common/adjust_lon"),i=Math.PI/2,s=1e-10,r=t("../common/asinz");o.init=function(){this.R=this.a},o.forward=function(t){var e,o,a=t.x,l=t.y,c=n(a-this.long0);Math.abs(l)<=s&&(e=this.x0+this.R*c,o=this.y0);var u=r(2*Math.abs(l/Math.PI));(Math.abs(c)<=s||Math.abs(Math.abs(l)-i)<=s)&&(e=this.x0,o=l>=0?this.y0+Math.PI*this.R*Math.tan(.5*u):this.y0+Math.PI*this.R*-Math.tan(.5*u));var h=.5*Math.abs(Math.PI/c-c/Math.PI),d=h*h,p=Math.sin(u),m=Math.cos(u),f=m/(p+m-1),g=f*f,_=f*(2/p-1),y=_*_,v=Math.PI*this.R*(h*(f-y)+Math.sqrt(d*(f-y)*(f-y)-(y+d)*(g-y)))/(y+d);0>c&&(v=-v),e=this.x0+v;var E=d+f;return v=Math.PI*this.R*(_*E-h*Math.sqrt((y+d)*(d+1)-E*E))/(y+d),o=l>=0?this.y0+v:this.y0-v,t.x=e,t.y=o,t},o.inverse=function(t){var e,o,i,r,a,l,c,u,h,d,p,m,f;return t.x-=this.x0,t.y-=this.y0,p=Math.PI*this.R,i=t.x/p,r=t.y/p,a=i*i+r*r,l=-Math.abs(r)*(1+a),c=l-2*r*r+i*i,u=-2*l+1+2*r*r+a*a,f=r*r/u+(2*c*c*c/u/u/u-9*l*c/u/u)/27,h=(l-c*c/3/u)/u,d=2*Math.sqrt(-h/3),p=3*f/h/d,Math.abs(p)>1&&(p=p>=0?1:-1),m=Math.acos(p)/3,o=t.y>=0?(-d*Math.cos(m+Math.PI/3)-c/3/u)*Math.PI:-(-d*Math.cos(m+Math.PI/3)-c/3/u)*Math.PI,e=Math.abs(i)<s?this.long0:n(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(i*i-r*r)+a*a))/2/i),t.x=e,t.y=o,t},o.names=["Van_der_Grinten_I","VanDerGrinten","vandg"]},{"../common/adjust_lon":5,"../common/asinz":6}],64:[function(t,e){var o=.017453292519943295,n=57.29577951308232,i=1,s=2,r=t("./datum_transform"),a=t("./adjust_axis"),l=t("./Proj"),c=t("./common/toPoint");e.exports=function t(e,u,h){function d(t,e){return(t.datum.datum_type===i||t.datum.datum_type===s)&&"WGS84"!==e.datumCode}var p;return Array.isArray(h)&&(h=c(h)),e.datum&&u.datum&&(d(e,u)||d(u,e))&&(p=new l("WGS84"),t(e,p,h),e=p),"enu"!==e.axis&&a(e,!1,h),"longlat"===e.projName?(h.x*=o,h.y*=o):(e.to_meter&&(h.x*=e.to_meter,h.y*=e.to_meter),e.inverse(h)),e.from_greenwich&&(h.x+=e.from_greenwich),h=r(e.datum,u.datum,h),u.from_greenwich&&(h.x-=u.from_greenwich),"longlat"===u.projName?(h.x*=n,h.y*=n):(u.forward(h),u.to_meter&&(h.x/=u.to_meter,h.y/=u.to_meter)),"enu"!==u.axis&&a(u,!0,h),h}},{"./Proj":2,"./adjust_axis":3,"./common/toPoint":23,"./datum_transform":30}],65:[function(t,e){function o(t,e,o){t[e]=o.map(function(t){var e={};return n(t,e),e}).reduce(function(t,e){return l(t,e)},{})}function n(t,e){var i;return Array.isArray(t)?(i=t.shift(),"PARAMETER"===i&&(i=t.shift()),void(1===t.length?Array.isArray(t[0])?(e[i]={},n(t[0],e[i])):e[i]=t[0]:t.length?"TOWGS84"===i?e[i]=t:(e[i]={},["UNIT","PRIMEM","VERT_DATUM"].indexOf(i)>-1?(e[i]={name:t[0].toLowerCase(),convert:t[1]},3===t.length&&(e[i].auth=t[2])):"SPHEROID"===i?(e[i]={name:t[0],a:t[1],rf:t[2]},4===t.length&&(e[i].auth=t[3])):["GEOGCS","GEOCCS","DATUM","VERT_CS","COMPD_CS","LOCAL_CS","FITTED_CS","LOCAL_DATUM"].indexOf(i)>-1?(t[0]=["name",t[0]],o(e,i,t)):t.every(function(t){return Array.isArray(t)})?o(e,i,t):n(t,e[i])):e[i]=!0)):void(e[t]=!0)}function i(t,e){var o=e[0],n=e[1];!(o in t)&&n in t&&(t[o]=t[n],3===e.length&&(t[o]=e[2](t[o])))}function s(t){return t*a}function r(t){function e(e){var o=t.to_meter||1;return parseFloat(e,10)*o}"GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):t.projName="object"==typeof t.PROJECTION?Object.keys(t.PROJECTION)[0]:t.PROJECTION,t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&(t.to_meter=parseFloat(t.UNIT.convert,10))),t.GEOGCS&&(t.datumCode=t.GEOGCS.DATUM?t.GEOGCS.DATUM.name.toLowerCase():t.GEOGCS.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),("new_zealand_geodetic_datum_1949"===t.datumCode||"new_zealand_1949"===t.datumCode)&&(t.datumCode="nzgd49"),"wgs_1984"===t.datumCode&&("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),t.GEOGCS.DATUM&&t.GEOGCS.DATUM.SPHEROID&&(t.ellps=t.GEOGCS.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=t.GEOGCS.DATUM.SPHEROID.a,t.rf=parseFloat(t.GEOGCS.DATUM.SPHEROID.rf,10)),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36")),t.b&&!isFinite(t.b)&&(t.b=t.a);var o=function(e){return i(t,e)},n=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",s],["longitude_of_center","Longitude_Of_Center"],["longc","longitude_of_center",s],["x0","false_easting",e],["y0","false_northing",e],["long0","central_meridian",s],["lat0","latitude_of_origin",s],["lat0","standard_parallel_1",s],["lat1","standard_parallel_1",s],["lat2","standard_parallel_2",s],["alpha","azimuth",s],["srsCode","name"]];n.forEach(o),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.PROJECTION&&"Lambert_Azimuthal_Equal_Area"!==t.PROJECTION||(t.long0=t.longc)}var a=.017453292519943295,l=t("./extend");e.exports=function(t,e){var o=JSON.parse((","+t).replace(/\s*\,\s*([A-Z_0-9]+?)(\[)/g,',["$1",').slice(1).replace(/\s*\,\s*([A-Z_0-9]+?)\]/g,',"$1"]')),i=o.shift(),s=o.shift();o.unshift(["name",s]),o.unshift(["type",i]),o.unshift("output");var a={};return n(o,a),r(a.output),l(e,a.output)}},{"./extend":33}],66:[function(t,e,o){function n(t){return t*(Math.PI/180)}function i(t){return 180*(t/Math.PI)}function s(t){var e,o,i,s,r,l,c,u,h,d=t.lat,p=t.lon,m=6378137,f=.00669438,g=.9996,_=n(d),y=n(p);h=Math.floor((p+180)/6)+1,180===p&&(h=60),d>=56&&64>d&&p>=3&&12>p&&(h=32),d>=72&&84>d&&(p>=0&&9>p?h=31:p>=9&&21>p?h=33:p>=21&&33>p?h=35:p>=33&&42>p&&(h=37)),e=6*(h-1)-180+3,u=n(e),o=f/(1-f),i=m/Math.sqrt(1-f*Math.sin(_)*Math.sin(_)),s=Math.tan(_)*Math.tan(_),r=o*Math.cos(_)*Math.cos(_),l=Math.cos(_)*(y-u),c=m*((1-f/4-3*f*f/64-5*f*f*f/256)*_-(3*f/8+3*f*f/32+45*f*f*f/1024)*Math.sin(2*_)+(15*f*f/256+45*f*f*f/1024)*Math.sin(4*_)-35*f*f*f/3072*Math.sin(6*_));var v=g*i*(l+(1-s+r)*l*l*l/6+(5-18*s+s*s+72*r-58*o)*l*l*l*l*l/120)+5e5,E=g*(c+i*Math.tan(_)*(l*l/2+(5-s+9*r+4*r*r)*l*l*l*l/24+(61-58*s+s*s+600*r-330*o)*l*l*l*l*l*l/720));return 0>d&&(E+=1e7),{northing:Math.round(E),easting:Math.round(v),zoneNumber:h,zoneLetter:a(d)}}function r(t){var e=t.northing,o=t.easting,n=t.zoneLetter,s=t.zoneNumber;if(0>s||s>60)return null;var a,l,c,u,h,d,p,m,f,g,_=.9996,y=6378137,v=.00669438,E=(1-Math.sqrt(1-v))/(1+Math.sqrt(1-v)),S=o-5e5,C=e;"N">n&&(C-=1e7),m=6*(s-1)-180+3,a=v/(1-v),p=C/_,f=p/(y*(1-v/4-3*v*v/64-5*v*v*v/256)),g=f+(3*E/2-27*E*E*E/32)*Math.sin(2*f)+(21*E*E/16-55*E*E*E*E/32)*Math.sin(4*f)+151*E*E*E/96*Math.sin(6*f),l=y/Math.sqrt(1-v*Math.sin(g)*Math.sin(g)),c=Math.tan(g)*Math.tan(g),u=a*Math.cos(g)*Math.cos(g),h=y*(1-v)/Math.pow(1-v*Math.sin(g)*Math.sin(g),1.5),d=S/(l*_);var A=g-l*Math.tan(g)/h*(d*d/2-(5+3*c+10*u-4*u*u-9*a)*d*d*d*d/24+(61+90*c+298*u+45*c*c-252*a-3*u*u)*d*d*d*d*d*d/720);A=i(A);var P=(d-(1+2*c+u)*d*d*d/6+(5-2*u+28*c-3*u*u+8*a+24*c*c)*d*d*d*d*d/120)/Math.cos(g);P=m+i(P);var M;if(t.accuracy){var w=r({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});M={top:w.lat,right:w.lon,bottom:A,left:P}}else M={lat:A,lon:P};return M}function a(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function l(t,e){var o=""+t.easting,n=""+t.northing;return t.zoneNumber+t.zoneLetter+c(t.easting,t.northing,t.zoneNumber)+o.substr(o.length-5,e)+n.substr(n.length-5,e)}function c(t,e,o){var n=u(o),i=Math.floor(t/1e5),s=Math.floor(e/1e5)%20;return h(i,s,n)}function u(t){var e=t%g;return 0===e&&(e=g),e}function h(t,e,o){var n=o-1,i=_.charCodeAt(n),s=y.charCodeAt(n),r=i+t-1,a=s+e,l=!1;r>A&&(r=r-A+v-1,l=!0),(r===E||E>i&&r>E||(r>E||E>i)&&l)&&r++,(r===S||S>i&&r>S||(r>S||S>i)&&l)&&(r++,r===E&&r++),r>A&&(r=r-A+v-1),a>C?(a=a-C+v-1,l=!0):l=!1,(a===E||E>s&&a>E||(a>E||E>s)&&l)&&a++,(a===S||S>s&&a>S||(a>S||S>s)&&l)&&(a++,a===E&&a++),a>C&&(a=a-C+v-1);var c=String.fromCharCode(r)+String.fromCharCode(a);return c}function d(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,o=t.length,n=null,i="",s=0;!/[A-Z]/.test(e=t.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+t;i+=e,s++}var r=parseInt(i,10);if(0===s||s+3>o)throw"MGRSPoint bad conversion from: "+t;var a=t.charAt(s++);if("A">=a||"B"===a||"Y"===a||a>="Z"||"I"===a||"O"===a)throw"MGRSPoint zone letter "+a+" not handled: "+t;n=t.substring(s,s+=2);for(var l=u(r),c=p(n.charAt(0),l),h=m(n.charAt(1),l);h<f(a);)h+=2e6;var d=o-s;if(d%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"+t;var g,_,y,v,E,S=d/2,C=0,A=0;return S>0&&(g=1e5/Math.pow(10,S),_=t.substring(s,s+S),C=parseFloat(_)*g,y=t.substring(s+S),A=parseFloat(y)*g),v=C+c,E=A+h,{easting:v,northing:E,zoneLetter:a,zoneNumber:r,accuracy:g}}function p(t,e){for(var o=_.charCodeAt(e-1),n=1e5,i=!1;o!==t.charCodeAt(0);){if(o++,o===E&&o++,o===S&&o++,o>A){if(i)throw"Bad character: "+t;o=v,i=!0}n+=1e5}return n}function m(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var o=y.charCodeAt(e-1),n=0,i=!1;o!==t.charCodeAt(0);){if(o++,o===E&&o++,o===S&&o++,o>C){if(i)throw"Bad character: "+t;o=v,i=!0}n+=1e5}return n}function f(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}var g=6,_="AJSAJS",y="AFAFAF",v=65,E=73,S=79,C=86,A=90;o.forward=function(t,e){return e=e||5,l(s({lat:t[1],lon:t[0]}),e)},o.inverse=function(t){var e=r(d(t.toUpperCase()));return[e.left,e.bottom,e.right,e.top]},o.toPoint=function(t){var e=o.inverse(t);return[(e[2]+e[0])/2,(e[3]+e[1])/2]}},{}],67:[function(t,e){e.exports={name:"proj4",version:"2.2.1",description:"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",main:"lib/index.js",directories:{test:"test",doc:"docs"},scripts:{test:"./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"},repository:{type:"git",url:"git://github.com/proj4js/proj4js.git"},author:"",license:"MIT",jam:{main:"dist/proj4.js",include:["dist/proj4.js","README.md","AUTHORS","LICENSE.md"]},devDependencies:{"grunt-cli":"~0.1.13",grunt:"~0.4.2","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~0.8.0",chai:"~1.8.1",mocha:"~1.17.1","grunt-mocha-phantomjs":"~0.4.0",browserify:"~3.24.5","grunt-browserify":"~1.3.0","grunt-contrib-uglify":"~0.3.2",curl:"git://github.com/cujojs/curl.git",istanbul:"~0.2.4",tin:"~0.4.0"},dependencies:{mgrs:"0.0.0"}}},{}],"./includedProjections":[function(t,e){e.exports=t("gWUPNW")},{}],gWUPNW:[function(t,e){var o=[t("./lib/projections/tmerc"),t("./lib/projections/utm"),t("./lib/projections/sterea"),t("./lib/projections/stere"),t("./lib/projections/somerc"),t("./lib/projections/omerc"),t("./lib/projections/lcc"),t("./lib/projections/krovak"),t("./lib/projections/cass"),t("./lib/projections/laea"),t("./lib/projections/aea"),t("./lib/projections/gnom"),t("./lib/projections/cea"),t("./lib/projections/eqc"),t("./lib/projections/poly"),t("./lib/projections/nzmg"),t("./lib/projections/mill"),t("./lib/projections/sinu"),t("./lib/projections/moll"),t("./lib/projections/eqdc"),t("./lib/projections/vandg"),t("./lib/projections/aeqd")];e.exports=function(t){o.forEach(function(e){t.Proj.projections.add(e)})}},{"./lib/projections/aea":39,"./lib/projections/aeqd":40,"./lib/projections/cass":41,"./lib/projections/cea":42,"./lib/projections/eqc":43,"./lib/projections/eqdc":44,"./lib/projections/gnom":46,"./lib/projections/krovak":47,"./lib/projections/laea":48,"./lib/projections/lcc":49,"./lib/projections/mill":52,"./lib/projections/moll":53,"./lib/projections/nzmg":54,"./lib/projections/omerc":55,"./lib/projections/poly":56,"./lib/projections/sinu":57,"./lib/projections/somerc":58,"./lib/projections/stere":59,"./lib/projections/sterea":60,"./lib/projections/tmerc":61,"./lib/projections/utm":62,"./lib/projections/vandg":63}]},{},[35])(35)}),CommonUtilsRegister=function(t){var e={isLoaded:!1,get:function(t){if(""!==t&&null!==t&&"undefined"!=typeof t){var e=t.split(":");if(2===e.length){var o=e[0],n=e[1];if(this.hasOwnProperty(o)&&this[o].hasOwnProperty(n))return this[o][n]}}},load:function(){if(!this.isLoaded){for(var e=["IGNF","EPSG","CRS"],o=0;o<e.length;o++){var n=e[o],i=this[n];for(var s in i)if(i.hasOwnProperty(s)){var r=n+":"+s;t.defs(r,this.get(r))}}this.isLoaded=!0}},EPSG:{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 ",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 ",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"},CRS:{84:"+title=WGS 84 longitude-latitude +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs "},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"}};return e}(proj4),Ol3FormatsKML=function(t,e){function o(t){if(!(this instanceof o))throw new TypeError("ERROR CLASS_CONSTRUCTOR");e.format.KML.call(this,t)}function n(t){var e=/(>)\s*(<)(\/*)/g,o=/ *(.*) +\n/g,n=/(<.+>)(.+\n)/g;t=t.replace(e,"$1\n$2$3").replace(o,"$1\n").replace(n,"$1\n$2");for(var i="",s=t.split("\n"),r=0,a="other",l={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},c=0;c<s.length;c++){var u=s[c],h=Boolean(u.match(/<.+\/>/)),d=Boolean(u.match(/<\/.+>/)),p=Boolean(u.match(/<[^!].*>/)),m=h?"single":d?"closing":p?"opening":"other",f=a+"->"+m;a=m;var g="";r+=l[f];for(var _=0;_<r;_++)g+="\t";"opening->closing"==f?i=i.substr(0,i.length-1)+u+"\n":i+=g+u+"\n"}return i}function i(t){var e=null,o=null,n="undefined"!=typeof window?window:null;if("object"==typeof exports&&null===window){var i=xmldom.DOMParser;o=new i,e=o.parseFromString(t,"text/xml")}else n.DOMParser?(o=new n.DOMParser,e=o.parseFromString(t,"text/xml")):n.ActiveXObject?(e=new n.ActiveXObject("Microsoft.XMLDOM"),e.async=!1,e.loadXML(t)):console.log("Incompatible environment for DOM Parser !");return e}function s(t){var e=new XMLSerializer,o=e.serializeToString(t);return o}function r(t,e,o){var n=t.documentElement,i=n.childNodes,s=i;1===i.length&&"Document"===i[0].nodeName&&(s=i[0].childNodes);for(var r={},a=-1,l=0;l<s.length;l++){var c=s[l];switch(c.nodeName){case"Style":var u=c.attributes[0];if("id"===u.nodeName){var h=u.nodeValue,d=c;r[h]=d}break;case"Placemark":a++;for(var p=c.childNodes,m=!1,f=null,g=null,_=0;_<p.length;_++)switch(p[_].nodeName){case"Point":m=!0;break;case"Style":f=p[_].childNodes;break;case"styleUrl":var y=p[_].textContent.slice(1);r[y]&&(f=r[y].childNodes);break;case"ExtendedData":g=p[_].childNodes}if(g){var v=o.extendedData;v&&"function"==typeof v&&v(e[a],g)}if(m&&f&&f.length){for(var E=null,S=null,C=0;C<f.length;C++)switch(f[C].nodeName){case"LabelStyle":E=f[C];break;case"IconStyle":S=f[C]}if(E){var A=o.labelStyle;A&&"function"==typeof A&&A(e[a],E)}else if(S){var P=o.iconStyle;P&&"function"==typeof P&&P(e[a],S)}}}}}return e.inherits(o,e.format.KML),o.prototype=Object.create(e.format.KML.prototype,{}),o.prototype.constructor=o,o.prototype.writeFeatures=function(t,e){var o=this._writeExtendStylesFeatures(t,e);return o},o.prototype._writeExtendStylesFeatures=function(t,o){var a=e.format.KML.prototype.writeFeatures.call(this,t,o),l=i(a);if(null===l)return a;var c=function(t,e){function o(t){var e=t.toString(16);"#"===e.charAt(0)&&(e=e.slice(1));var o=1;o=parseInt(255*o,10),o=o.toString(16);var n=o;return n+=e.substr(4,2),n+=e.substr(2,2),n+=e.substr(0,2)}if(t){var n=o("#FFFFFF"),i="3",s="1",r="Sans",a=t.getStyle().getText().getStroke();if(n=o(a.getColor()),i=a.getWidth(),e&&0===e.getElementsByTagName("LabelStyleSimpleExtensionGroup").length){var c=l.createElement("LabelStyleSimpleExtensionGroup");c.setAttribute("fontFamily",r),c.setAttribute("haloColor",n),c.setAttribute("haloRadius",i),c.setAttribute("haloOpacity",s),e.appendChild(c)}}},u=function(t,e){if(t){var o=0,n=0,i="pixels",s="pixels",r=t.getStyle().getImage(),a=r.getSize(),c=r.getAnchor();if(c.length&&(o=c[0],n=c[1],n="fraction"===s?1===c[1]?0:1-c[1]:"pixels"===s&&c[1]===a[1]?0:a[1]-c[1]),e&&0===e.getElementsByTagName("hotSpot").length){var u=l.createElement("hotSpot");u.setAttribute("x",o),u.setAttribute("y",n),u.setAttribute("xunits",i),u.setAttribute("yunits",s),e.appendChild(u)}}};r(l,t,{labelStyle:c,iconStyle:u});var h=s(l);null===h&&(h=a);var d=n(h);return null===d&&(d=a),d},o.prototype.readFeatures=function(t,e){var o=this._readExtendStylesFeatures(t,e);return o},o.prototype._readExtendStylesFeatures=function(t,o){var n=e.format.KML.prototype.readFeatures.call(this,t,o),s=null,a="";if(a="string"==typeof t?t:t.documentElement.outerHTML,a=a.replace(/\n/g,""),a=a.replace(/(>)\s*(<)/g,"$1$2"),s=i(a),null===s)return n;var l=function(t,o){function n(t){var e="";e+=t.substr(6,2),e+=t.substr(4,2),e+=t.substr(2,2);for(var o=parseInt(e,16).toString(16),n="",i=o.length||0,s=0;s<6-i;s++)n+="0";return o="#"+n+o,o.toString(16)}if(t){for(var i=t.getProperties().name||"---",s=n("ff000000"),r="#FFFFFF",a=4,l="Sans",c="16px",u=o.childNodes,h=0;h<u.length;h++)switch(u[h].nodeName){case"scale":break;case"colorMode":break;case"color":s=n(u[h].textContent);break;case"LabelStyleSimpleExtensionGroup":for(var d=u[h].attributes,p=0;p<d.length;p++)switch(d[p].nodeName){case"fontFamily":break;case"haloColor":r=n(d[p].nodeValue);break;case"haloRadius":a=parseInt(d[p].nodeValue,10);break;case"haloOpacity":}}t.setStyle(new e.style.Style({image:new e.style.Icon({src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiYAAAAAkAAxkR2eQAAAAASUVORK5CYII=",size:[51,38],anchor:[25.5,38],anchorOrigin:"top-left",anchorXUnits:"pixels",anchorYUnits:"pixels"}),text:new e.style.Text({font:c+" "+l,textAlign:"left",text:i,fill:new e.style.Fill({color:s}),stroke:new e.style.Stroke({color:r,width:a})})}))}},c=function(t,e){},u=function(t,e){if(t){for(var o="",n=t.getProperties().description||"",i=null,s=0;s<e.length;s++){var r=e[s],a=r.attributes[0];if("name"===a.nodeName)switch(a.nodeValue){case"label":o=r.textContent;break;case"attributetitle":for(var l=r.childNodes,c=0;c<l.length;c++)"value"===l[c].nodeName&&(i=l[c].textContent)}}i&&(n=n?i+" : "+n:i),t.setProperties({name:o,description:n})}};return r(s,n,{labelStyle:l,iconStyle:c,extendedData:u}),n},o}({},ol),Ol3CRSCRS=function(t,e,o){!function(){o.load(),!e.proj.proj4_&&e.proj.setProj4?e.proj.setProj4(t):console.log("WARNING : OpenLayers library should manage proj4 dependency in order to add custom projections (Lambert 93 for instance)")}();var n={overloadTransformExtent:function(){e.proj.transformExtent=function(t,o,n){"EPSG:2154"===n&&"EPSG:4326"===o&&(t[0]<-9.62&&(t[0]=-9.62),t[1]<41.18&&(t[1]=41.18),t[2]>10.3&&(t[2]=10.3),t[3]>51.54&&(t[3]=51.54));var i=e.proj.getTransform(o,n),s=e.extent.applyTransform(t,i);return s}},overload:function(){this.overloadTransformExtent()}};return n}(proj4,ol,CommonUtilsRegister),Ol3Utils=function(){var t={assign:function(t,e){t=t||{};for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);return t},mergeParams:function(t,e){if(t&&e)for(var o in e)e.hasOwnProperty(o)&&("object"==typeof e[o]&&t.hasOwnProperty(o)?this.mergeParams(t[o],e[o]):t[o]=e[o])},detectSupport:function(){var t=!0,e=window.navigator.userAgent.toLowerCase();return e.indexOf("iphone")===-1&&e.indexOf("ipod")===-1&&e.indexOf("ipad")===-1&&e.indexOf("android")===-1&&e.indexOf("mobile")===-1&&e.indexOf("blackberry")===-1&&e.indexOf("tablet")===-1&&e.indexOf("phone")===-1&&e.indexOf("touch")===-1||(t=!1),e.indexOf("msie")===-1&&e.indexOf("trident")===-1||(t=!0),t},getOL3ObjectId:function(t){var e=null;if(t){for(var o in t)if(!("string"!=typeof o||o.indexOf("closure_uid")<0))return t[o];return e}}};return t}(),CommonUtilsConfig=function(){var t={configuration:null,isConfigLoaded:function(){var t="undefined"!=typeof window?window:{};return!(!t.Gp||!t.Gp.Config||0===Object.keys(t.Gp.Config).length)&&(this.configuration=t.Gp.Config,!0)},getLayerId:function(t,e){var o=null;if(this.configuration){var n=this.configuration.layers;for(var i in n)if(n.hasOwnProperty(i)){var s=i.split("$");if(t===s[0]&&s[1]){var r=s[1].split(":"),a=s[1].split(";");if(a[1]===e){o=i;break}if(r[2]===e){o=i;break}}}}return o||console.log("ERROR layer id ("+t+" / "+e+") was not found !?"),o},getLayerParams:function(t,e,o){var n={};if(this.configuration){var i=this.getLayerId(t,e);if(i){var s=this.configuration.layers[i],r=s.apiKeys[0];if(o&&o!==r)return void console.log("ERROR different keys ("+o+" !== "+r+") !?");o=o||r,n.key=o,n.url=s.getServerUrl(o),n.version=s.getServiceParams().version,n.styles=s.getDefaultStyle(),n.format=s.getDefaultFormat(),n.projection=s.getDefaultProjection(),n.minScale=s.getMinScaleDenominator(),n.maxScale=s.getMaxScaleDenominator(),n.extent=s.getBBOX(),n.legends=s.getLegends(),n.metadata=s.getMetadata(),n.originators=s.getOriginators(),n.title=s.getTitle(),n.description=s.getDescription(),n.quicklookUrl=s.getQuicklookUrl(),s.wmtsOptions&&(n.tileMatrixSetLimits=s.wmtsOptions.tileMatrixSetLimits);var a=s.getTMSID();if(a){n.TMSLink=a;var l=this.configuration.getTMSConf(a);n.matrixOrigin=l.getTopLeftCorner(),n.nativeResolutions=l.nativeResolutions,n.matrixIds=l.matrixIds,n.tileMatrices=l.tileMatrices}}}return n},getServiceParams:function(t,e,o){var n={};if(this.configuration){var i=this.getLayerId(t,e);if(i){var s=this.configuration.layers[i],r=s.apiKeys[0];if(o&&o!==r)return;o=o||r,n.key=o,n.url=s.getServerUrl(o),n.version=s.getServiceParams().version,n.extent=s.getBBOX(),n.title=s.getTitle(),n.description=s.getDescription()}}return n},getResolutions:function(){var t=[];return this.configuration&&(t=this.configuration.generalOptions.wgs84Resolutions),t},getTileMatrix:function(t){var e={};return this.configuration&&t&&(e=this.configuration.tileMatrixSets[t.toUpperCase()]),e},getGlobalConstraints:function(t){var e={};if(t){var o=this.configuration.layers[t];e.projection=o.getDefaultProjection(),e.minScale=o.getMinScaleDenominator(),e.maxScale=o.getMaxScaleDenominator(),e.extent=o.getBBOX()}return e}};return t}(),Ol3LayersSourceWMTS=function(t,e,o,n,i){function s(r){if(!(this instanceof s))throw new TypeError("ERROR CLASS_CONSTRUCTOR");if(!r.layer)throw new Error("ERROR PARAM_MISSING : layer");if("string"!=typeof r.layer)throw new Error("ERROR WRONG TYPE : layer");if(!n.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers. See http://ignf.github.io/evolution-apigeoportail/ol3/ol3-autoconf.html");var a=n.getLayerId(r.layer,"WMTS");if(!a||!n.configuration.getLayerConf(a))return console.log("[source WMTS] ERROR : "+r.layer+" cannot be found in Geoportal Configuration. Make sure that this resource is included in your contract key."),new t.source.WMTS({});var l=n.getLayerParams(r.layer,"WMTS",r.apiKey);this._originators=l.originators,this._legends=l.legends,this._metadata=l.metadata;var c={url:e.Helper.normalyzeUrl(l.url,{"gp-ol3-ext":"0.11.0"},!1),version:l.version,style:l.styles,format:l.format,projection:l.projection,maxZoom:i.getZoomLevelFromScaleDenominator(l.minScale),layer:r.layer,matrixSet:l.TMSLink,tileGrid:new t.tilegrid.WMTS({resolutions:l.nativeResolutions,matrixIds:l.matrixIds,origin:[l.matrixOrigin.x,l.matrixOrigin.y]})};o.mergeParams(c,r.olParams),t.source.WMTS.call(this,c),this._originators=l.originators,this._legends=l.legends,this._metadata=l.metadata,this._description=l.description,this._title=l.title,this._quicklookUrl=l.quicklookUrl}return t.inherits(s,t.source.WMTS),s.prototype=Object.create(t.source.WMTS.prototype,{}),s.prototype.constructor=s,s}(ol,gp,Ol3Utils,CommonUtilsConfig,CommonUtilsLayerUtils),Ol3LayersSourceWMS=function(t,e,o,n){function i(s){if(!(this instanceof i))throw new TypeError("ERROR CLASS_CONSTRUCTOR");if(!s.layer)throw new Error("ERROR PARAM_MISSING : layer");if("string"!=typeof s.layer)throw new Error("ERROR WRONG TYPE : layer");if(!n.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers. See http://ignf.github.io/evolution-apigeoportail/ol3/ol3-autoconf.html");var r=n.getLayerId(s.layer,"WMS");if(!r||!n.configuration.getLayerConf(r))return console.log("[source WMS] ERROR : "+s.layer+" cannot be found in Geoportal Configuration. Make sure that this resource is included in your contract key."),new t.source.TileWMS({});var a=n.getLayerParams(s.layer,"WMS",s.apiKey),l={url:e.Helper.normalyzeUrl(a.url,{"gp-ol3-ext":"0.11.0"},!1),params:{SERVICE:"WMS",LAYERS:s.layer,VERSION:a.version,STYLES:a.styles,FORMAT:a.format}};o.mergeParams(l,s.olParams),t.source.TileWMS.call(this,l),this._originators=a.originators,this._legends=a.legends,this._metadata=a.metadata}return t.inherits(i,t.source.TileWMS),i.prototype=Object.create(t.source.TileWMS.prototype,{}),i.prototype.constructor=i,i}(ol,gp,Ol3Utils,CommonUtilsConfig),Ol3LayersLayerWMTS=function(t,e,o,n,i){function s(n){if(!(this instanceof s))throw new TypeError("ERROR CLASS_CONSTRUCTOR");if(!n.layer)throw new Error("ERROR PARAM_MISSING : layer");if("string"!=typeof n.layer)throw new Error("ERROR WRONG TYPE : layer");if(!o.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers. See http://ignf.github.io/evolution-apigeoportail/ol3/ol3-autoconf.html");var r;n.olParams&&n.olParams.sourceParams&&(r=n.olParams.sourceParams);var a=new i({layer:n.layer,apiKey:n.apiKey,olParams:r}),l={source:a};if(void 0!==a.getLayer()){var c=o.getLayerId(n.layer,"WMTS"),u=o.getGlobalConstraints(c);if(u&&u.projection){var h;"string"==typeof u.projection&&(h=t.proj.get(u.projection)),h&&h.getUnits()&&("m"===h.getUnits()?(l.minResolution=28e-5*(u.minScale-1),l.maxResolution=28e-5*(u.maxScale+1)):"degrees"===h.getUnits()&&(l.minResolution=28e-5*(u.minScale-1)*180/(6378137*Math.PI),l.maxResolution=28e-5*(u.maxScale+1)*180/(6378137*Math.PI)))}}e.mergeParams(l,n.olParams),t.layer.Tile.call(this,l)}return t.inherits(s,t.layer.Tile),s.prototype=Object.create(t.layer.Tile.prototype,{}),s.prototype.constructor=s,s}(ol,Ol3Utils,CommonUtilsConfig,CommonUtilsLayerUtils,Ol3LayersSourceWMTS),Ol3LayersLayerWMS=function(t,e,o,n,i){function s(n){if(!(this instanceof s))throw new TypeError("ERROR CLASS_CONSTRUCTOR");if(!n.layer)throw new Error("ERROR PARAM_MISSING : layer");if("string"!=typeof n.layer)throw new Error("ERROR WRONG TYPE : layer");if(!o.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers. See http://ignf.github.io/evolution-apigeoportail/ol3/ol3-autoconf.html");var r;n.olParams&&n.olParams.sourceParams&&(r=n.olParams.sourceParams);var a=new i({layer:n.layer,apiKey:n.apiKey,olParams:r}),l={source:a};if(void 0!==a.getParams().LAYERS){var c=o.getLayerId(n.layer,"WMS"),u=o.getGlobalConstraints(c);if(r&&r.projection){var h=[u.extent.left,u.extent.bottom,u.extent.right,u.extent.top];l.extent=t.proj.transformExtent(h,"EPSG:4326",r.projection);var d;"string"==typeof r.projection?d=t.proj.get(r.projection):"object"==typeof r.projection&&r.projection.getCode()&&(d=t.proj.get(r.projection.getCode())),d&&d.getUnits()&&("m"===d.getUnits()?(l.minResolution=28e-5*(u.minScale-1),l.maxResolution=28e-5*(u.maxScale+1)):"degrees"===d.getUnits()&&(l.minResolution=28e-5*(u.minScale-1)*180/(6378137*Math.PI),l.maxResolution=28e-5*(u.maxScale+1)*180/(6378137*Math.PI)))}}e.mergeParams(l,n.olParams),t.layer.Tile.call(this,l)}return t.inherits(s,t.layer.Tile),s.prototype=Object.create(t.layer.Tile.prototype,{}),s.prototype.constructor=s,s}(ol,Ol3Utils,CommonUtilsConfig,CommonUtilsLayerUtils,Ol3LayersSourceWMS),function(t){"use strict";sortable=function(){return"function"==typeof t?t():t}()}(function(){"use strict";function t(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(t);this.el=t,this.options=e=y({},e),t[U]=this;var o={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(t.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var n in o)!(n in e)&&(e[n]=o[n]);K(e);for(var s in this)"_"===s.charAt(0)&&(this[s]=this[s].bind(this));
  this.nativeDraggable=!e.forceFallback&&V,i(t,"mousedown",this._onTapStart),i(t,"touchstart",this._onTapStart),this.nativeDraggable&&(i(t,"dragover",this),i(t,"dragenter",this)),H.push(this._onDragOver),e.store&&this.sort(e.store.get(this))}function e(t){C&&C.state!==t&&(a(C,"display",t?"none":""),!t&&C.state&&A.insertBefore(C,v),C.state=t)}function o(t,e,o){if(t){o=o||j;do if(">*"===e&&t.parentNode===o||g(t,e))return t;while(t!==o&&(t=t.parentNode))}return null}function n(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.preventDefault()}function i(t,e,o){t.addEventListener(e,o,!1)}function s(t,e,o){t.removeEventListener(e,o,!1)}function r(t,e,o){if(t)if(t.classList)t.classList[o?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(D," ").replace(" "+e+" "," ");t.className=(n+(o?" "+e:"")).replace(D," ")}}function a(t,e,o){var n=t&&t.style;if(n){if(void 0===o)return j.defaultView&&j.defaultView.getComputedStyle?o=j.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),void 0===e?o:o[e];e in n||(e="-webkit-"+e),n[e]=o+("string"==typeof o?"":"px")}}function l(t,e,o){if(t){var n=t.getElementsByTagName(e),i=0,s=n.length;if(o)for(;i<s;i++)o(n[i],i);return n}return[]}function c(t,e,o,n,i,s,r){var a=j.createEvent("Event"),l=(t||e[U]).options,c="on"+o.charAt(0).toUpperCase()+o.substr(1);a.initEvent(o,!0,!0),a.to=e,a.from=i||e,a.item=n||e,a.clone=C,a.oldIndex=s,a.newIndex=r,e.dispatchEvent(a),l[c]&&l[c].call(t,a)}function u(t,e,o,n,i,s){var r,a,l=t[U],c=l.options.onMove;return r=j.createEvent("Event"),r.initEvent("move",!0,!0),r.to=e,r.from=t,r.dragged=o,r.draggedRect=n,r.related=i||e,r.relatedRect=s||e.getBoundingClientRect(),t.dispatchEvent(r),c&&(a=c.call(l,r)),a}function h(t){t.draggable=!1}function d(){z=!1}function p(t,e){var o=t.lastElementChild,n=o.getBoundingClientRect();return(e.clientY-(n.top+n.height)>5||e.clientX-(n.right+n.width)>5)&&o}function m(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,o=e.length,n=0;o--;)n+=e.charCodeAt(o);return n.toString(36)}function f(t,e){var o=0;if(!t||!t.parentNode)return-1;for(;t&&(t=t.previousElementSibling);)"TEMPLATE"!==t.nodeName.toUpperCase()&&g(t,e)&&o++;return o}function g(t,e){if(t){e=e.split(".");var o=e.shift().toUpperCase(),n=new RegExp("\\s("+e.join("|")+")(?=\\s)","g");return!(""!==o&&t.nodeName.toUpperCase()!=o||e.length&&((" "+t.className+" ").match(n)||[]).length!=e.length)}return!1}function _(t,e){var o,n;return function(){void 0===o&&(o=arguments,n=this,setTimeout(function(){1===o.length?t.call(n,o[0]):t.apply(n,o),o=void 0},e))}}function y(t,e){if(t&&e)for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);return t}if("undefined"==typeof window||"undefined"==typeof window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var v,E,S,C,A,P,M,w,I,R,G,b,x,O,L,T,N,k={},D=/\s+/g,U="Sortable"+(new Date).getTime(),F=window,j=F.document,B=F.parseInt,V=!!("draggable"in j.createElement("div")),W=function(t){return t=j.createElement("x"),t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}(),z=!1,q=Math.abs,H=([].slice,[]),Y=_(function(t,e,o){if(o&&e.scroll){var n,i,s,r,a=e.scrollSensitivity,l=e.scrollSpeed,c=t.clientX,u=t.clientY,h=window.innerWidth,d=window.innerHeight;if(w!==o&&(M=e.scroll,w=o,M===!0)){M=o;do if(M.offsetWidth<M.scrollWidth||M.offsetHeight<M.scrollHeight)break;while(M=M.parentNode)}M&&(n=M,i=M.getBoundingClientRect(),s=(q(i.right-c)<=a)-(q(i.left-c)<=a),r=(q(i.bottom-u)<=a)-(q(i.top-u)<=a)),s||r||(s=(h-c<=a)-(c<=a),r=(d-u<=a)-(u<=a),(s||r)&&(n=F)),k.vx===s&&k.vy===r&&k.el===n||(k.el=n,k.vx=s,k.vy=r,clearInterval(k.pid),n&&(k.pid=setInterval(function(){n===F?F.scrollTo(F.pageXOffset+s*l,F.pageYOffset+r*l):(r&&(n.scrollTop+=r*l),s&&(n.scrollLeft+=s*l))},24)))}},30),K=function(t){var e=t.group;e&&"object"==typeof e||(e=t.group={name:e}),["pull","put"].forEach(function(t){t in e||(e[t]=!0)}),t.groups=" "+e.name+(e.put.join?" "+e.put.join(" "):"")+" "};return t.prototype={constructor:t,_onTapStart:function(t){var e=this,n=this.el,i=this.options,s=t.type,r=t.touches&&t.touches[0],a=(r||t).target,l=a,u=i.filter;if(!("mousedown"===s&&0!==t.button||i.disabled)&&(a=o(a,i.draggable,n))){if(b=f(a,i.draggable),"function"==typeof u){if(u.call(this,t,a,this))return c(e,l,"filter",a,n,b),void t.preventDefault()}else if(u&&(u=u.split(",").some(function(t){if(t=o(l,t.trim(),n))return c(e,t,"filter",a,n,b),!0})))return void t.preventDefault();i.handle&&!o(l,i.handle,n)||this._prepareDragStart(t,r,a)}},_prepareDragStart:function(t,e,o){var n,s=this,a=s.el,c=s.options,u=a.ownerDocument;o&&!v&&o.parentNode===a&&(L=t,A=a,v=o,E=v.parentNode,P=v.nextSibling,O=c.group,n=function(){s._disableDelayedDrag(),v.draggable=!0,r(v,s.options.chosenClass,!0),s._triggerDragStart(e)},c.ignore.split(",").forEach(function(t){l(v,t.trim(),h)}),i(u,"mouseup",s._onDrop),i(u,"touchend",s._onDrop),i(u,"touchcancel",s._onDrop),c.delay?(i(u,"mouseup",s._disableDelayedDrag),i(u,"touchend",s._disableDelayedDrag),i(u,"touchcancel",s._disableDelayedDrag),i(u,"mousemove",s._disableDelayedDrag),i(u,"touchmove",s._disableDelayedDrag),s._dragStartTimer=setTimeout(n,c.delay)):n())},_disableDelayedDrag:function(){var t=this.el.ownerDocument;clearTimeout(this._dragStartTimer),s(t,"mouseup",this._disableDelayedDrag),s(t,"touchend",this._disableDelayedDrag),s(t,"touchcancel",this._disableDelayedDrag),s(t,"mousemove",this._disableDelayedDrag),s(t,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(t){t?(L={target:v,clientX:t.clientX,clientY:t.clientY},this._onDragStart(L,"touch")):this.nativeDraggable?(i(v,"dragend",this),i(A,"dragstart",this._onDragStart)):this._onDragStart(L,!0);try{j.selection?j.selection.empty():window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(){A&&v&&(r(v,this.options.ghostClass,!0),t.active=this,c(this,A,"start",v,A,b))},_emulateDragOver:function(){if(T){if(this._lastX===T.clientX&&this._lastY===T.clientY)return;this._lastX=T.clientX,this._lastY=T.clientY,W||a(S,"display","none");var t=j.elementFromPoint(T.clientX,T.clientY),e=t,o=" "+this.options.group.name,n=H.length;if(e)do{if(e[U]&&e[U].options.groups.indexOf(o)>-1){for(;n--;)H[n]({clientX:T.clientX,clientY:T.clientY,target:t,rootEl:e});break}t=e}while(e=e.parentNode);W||a(S,"display","")}},_onTouchMove:function(e){if(L){t.active||this._dragStarted(),this._appendGhost();var o=e.touches?e.touches[0]:e,n=o.clientX-L.clientX,i=o.clientY-L.clientY,s=e.touches?"translate3d("+n+"px,"+i+"px,0)":"translate("+n+"px,"+i+"px)";N=!0,T=o,a(S,"webkitTransform",s),a(S,"mozTransform",s),a(S,"msTransform",s),a(S,"transform",s),e.preventDefault()}},_appendGhost:function(){if(!S){var t,e=v.getBoundingClientRect(),o=a(v),n=this.options;S=v.cloneNode(!0),r(S,n.ghostClass,!1),r(S,n.fallbackClass,!0),a(S,"top",e.top-B(o.marginTop,10)),a(S,"left",e.left-B(o.marginLeft,10)),a(S,"width",e.width),a(S,"height",e.height),a(S,"opacity","0.8"),a(S,"position","fixed"),a(S,"zIndex","100000"),a(S,"pointerEvents","none"),n.fallbackOnBody&&j.body.appendChild(S)||A.appendChild(S),t=S.getBoundingClientRect(),a(S,"width",2*e.width-t.width),a(S,"height",2*e.height-t.height)}},_onDragStart:function(t,e){var o=t.dataTransfer,n=this.options;this._offUpEvents(),"clone"==O.pull&&(C=v.cloneNode(!0),a(C,"display","none"),A.insertBefore(C,v)),e?("touch"===e?(i(j,"touchmove",this._onTouchMove),i(j,"touchend",this._onDrop),i(j,"touchcancel",this._onDrop)):(i(j,"mousemove",this._onTouchMove),i(j,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(o&&(o.effectAllowed="move",n.setData&&n.setData.call(this,o,v)),i(j,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(t){var n,i,s,r=this.el,l=this.options,c=l.group,h=c.put,m=O===c,f=l.sort;if(void 0!==t.preventDefault&&(t.preventDefault(),!l.dragoverBubble&&t.stopPropagation()),N=!0,O&&!l.disabled&&(m?f||(s=!A.contains(v)):O.pull&&h&&(O.name===c.name||h.indexOf&&~h.indexOf(O.name)))&&(void 0===t.rootEl||t.rootEl===this.el)){if(Y(t,l,this.el),z)return;if(n=o(t.target,l.draggable,r),i=v.getBoundingClientRect(),s)return e(!0),void(C||P?A.insertBefore(v,C||P):f||A.appendChild(v));if(0===r.children.length||r.children[0]===S||r===t.target&&(n=p(r,t))){if(n){if(n.animated)return;_=n.getBoundingClientRect()}e(m),u(A,r,v,i,n,_)!==!1&&(v.contains(r)||(r.appendChild(v),E=r),this._animate(i,v),n&&this._animate(_,n))}else if(n&&!n.animated&&n!==v&&void 0!==n.parentNode[U]){I!==n&&(I=n,R=a(n),G=a(n.parentNode));var g,_=n.getBoundingClientRect(),y=_.right-_.left,M=_.bottom-_.top,w=/left|right|inline/.test(R.cssFloat+R.display)||"flex"==G.display&&0===G["flex-direction"].indexOf("row"),b=n.offsetWidth>v.offsetWidth,x=n.offsetHeight>v.offsetHeight,L=(w?(t.clientX-_.left)/y:(t.clientY-_.top)/M)>.5,T=n.nextElementSibling,k=u(A,r,v,i,n,_);if(k!==!1){if(z=!0,setTimeout(d,30),e(m),1===k||k===-1)g=1===k;else if(w){var D=v.offsetTop,F=n.offsetTop;g=D===F?n.previousElementSibling===v&&!b||L&&b:F>D}else g=T!==v&&!x||L&&x;v.contains(r)||(g&&!T?r.appendChild(v):n.parentNode.insertBefore(v,g?T:n)),E=v.parentNode,this._animate(i,v),this._animate(_,n)}}}},_animate:function(t,e){var o=this.options.animation;if(o){var n=e.getBoundingClientRect();a(e,"transition","none"),a(e,"transform","translate3d("+(t.left-n.left)+"px,"+(t.top-n.top)+"px,0)"),e.offsetWidth,a(e,"transition","all "+o+"ms"),a(e,"transform","translate3d(0,0,0)"),clearTimeout(e.animated),e.animated=setTimeout(function(){a(e,"transition",""),a(e,"transform",""),e.animated=!1},o)}},_offUpEvents:function(){var t=this.el.ownerDocument;s(j,"touchmove",this._onTouchMove),s(t,"mouseup",this._onDrop),s(t,"touchend",this._onDrop),s(t,"touchcancel",this._onDrop)},_onDrop:function(e){var o=this.el,n=this.options;clearInterval(this._loopId),clearInterval(k.pid),clearTimeout(this._dragStartTimer),s(j,"mousemove",this._onTouchMove),this.nativeDraggable&&(s(j,"drop",this),s(o,"dragstart",this._onDragStart)),this._offUpEvents(),e&&(N&&(e.preventDefault(),!n.dropBubble&&e.stopPropagation()),S&&S.parentNode.removeChild(S),v&&(this.nativeDraggable&&s(v,"dragend",this),h(v),r(v,this.options.ghostClass,!1),r(v,this.options.chosenClass,!1),A!==E?(x=f(v,n.draggable),x>=0&&(c(null,E,"sort",v,A,b,x),c(this,A,"sort",v,A,b,x),c(null,E,"add",v,A,b,x),c(this,A,"remove",v,A,b,x))):(C&&C.parentNode.removeChild(C),v.nextSibling!==P&&(x=f(v,n.draggable),x>=0&&(c(this,A,"update",v,A,b,x),c(this,A,"sort",v,A,b,x)))),t.active&&(null!==x&&x!==-1||(x=b),c(this,A,"end",v,A,b,x),this.save()))),this._nulling()},_nulling:function(){A=v=E=S=P=C=M=w=L=T=N=x=I=R=O=t.active=null},handleEvent:function(t){var e=t.type;"dragover"===e||"dragenter"===e?v&&(this._onDragOver(t),n(t)):"drop"!==e&&"dragend"!==e||this._onDrop(t)},toArray:function(){for(var t,e=[],n=this.el.children,i=0,s=n.length,r=this.options;i<s;i++)t=n[i],o(t,r.draggable,this.el)&&e.push(t.getAttribute(r.dataIdAttr)||m(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach(function(t,i){var s=n.children[i];o(s,this.options.draggable,n)&&(e[t]=s)},this),t.forEach(function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))})},save:function(){var t=this.options.store;t&&t.set(this)},closest:function(t,e){return o(t,e||this.options.draggable,this.el)},option:function(t,e){var o=this.options;return void 0===e?o[t]:(o[t]=e,void("group"===t&&K(o)))},destroy:function(){var t=this.el;t[U]=null,s(t,"mousedown",this._onTapStart),s(t,"touchstart",this._onTapStart),this.nativeDraggable&&(s(t,"dragover",this),s(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),H.splice(H.indexOf(this._onDragOver),1),this._onDrop(),this.el=t=null}},t.utils={on:i,off:s,css:a,find:l,is:function(t,e){return!!o(t,e,t)},extend:y,throttle:_,closest:o,toggleClass:r,index:f},t.create=function(e,o){return new t(e,o)},t.version="1.4.2",t}),CommonControlsLayerSwitcherDOM=function(t){var e={_createDraggableElement:function(e,o){t.create(e,{handle:".GPlayerName",draggable:".draggable-layer",ghostClass:"GPghostLayer",animation:200,onEnd:function(t){o._onDragAndDropLayerClick(t)}})},_addUID:function(t){var e=this._uid?t+"-"+this._uid:t;return e},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPlayerSwitcher"),t.className="GPwidget",t},_createMainLayersShowElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowLayersList"),t.type="checkbox",t},_createMainLayersElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPlayersList"),t.className="GPpanel",t},_createMainPictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowLayersListPicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowLayersList"),e.title="Afficher/masquer le gestionnaire de couches";var o=document.createElement("span");o.id=this._addUID("GPshowLayersListOpen"),o.className="GPshowAdvancedToolOpen",o.addEventListener("click",function(){if(document.getElementById(t._addUID("GPshowLayersList")).checked){for(var e=document.getElementsByClassName("GPlayerInfoOpened"),o=0;o<e.length;o++)e[o].className="GPlayerInfo";document.getElementById(t._addUID("GPlayerInfoPanel")).className="GPlayerInfoPanelClosed"}}),e.appendChild(o);var n=document.createElement("span");return n.addEventListener("click",function(){if(document.getElementById(t._addUID("GPshowLayersList")).checked){for(var e=document.getElementsByClassName("GPlayerInfoOpened"),o=0;o<e.length;o++)e[o].className="GPlayerInfo";document.getElementById(t._addUID("GPlayerInfoPanel")).className="GPlayerInfoPanelClosed"}}),n.id=t._addUID("GPshowLayersListClose"),e.appendChild(n),e},_createMainInfoElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPlayerInfoPanel"),t.className="GPpanel GPlayerInfoPanelClosed",t},_createContainerLayerElement:function(t){var e=document.createElement("div");e.id="GPlayerSwitcher_ID"+t.id,e.className="GPlayerSwitcher_layer draggable-layer",e.appendChild(this._createBasicToolElement(t));for(var o=this._createAdvancedToolShowElement(t),n=0;n<o.length;n++)e.appendChild(o[n]);return e.appendChild(this._createAdvancedToolElement(t)),e},_createBasicToolElement:function(t){var e=document.createElement("div");e.id="GPbasicTools_IDLayer"+t.id,e.className="GPlayerBasicTools",e.appendChild(this._createBasicToolNameElement(t));for(var o=this._createBasicToolVisibilityElement(t),n=0;n<o.length;n++)e.appendChild(o[n]);return e},_createBasicToolNameElement:function(t){var e=document.createElement("span");return e.id="GPname_ID"+t.id,e.className="GPlayerName",e.title=t.description||t.title,e.innerHTML=t.title,e},_createBasicToolVisibilityElement:function(t){var e=[],o=t.visibility,n="GPvisibility_ID"+t.id,i=document.createElement("input");i.id=n,i.type="checkbox",i.checked=o;var s=document.createElement("label");s.htmlFor=n,s.id="GPvisibilityPicto_ID"+t.id,s.className="GPlayerVisibility",s.title="Afficher/masquer la couche";var r=this;return i.addEventListener?i.addEventListener("click",function(t){r._onVisibilityLayerClick.call(r,t)}):i.attachEvent&&i.attachEvent("onclick",function(t){r._onVisibilityLayerClick.call(r,t)}),e.push(i),e.push(s),e},_createAdvancedToolShowElement:function(t){var e=[],o=document.createElement("label");o.id="GPshowAdvancedToolsPicto_ID"+t.id,o.htmlFor="GPshowAdvancedTools_ID"+t.id,o.title="Plus d'outils",o.className="GPshowMoreOptions GPshowLayerAdvancedTools";var n=document.createElement("input");return n.type="checkbox",n.id="GPshowAdvancedTools_ID"+t.id,e.push(n),e.push(o),e},_createAdvancedToolElement:function(t){var e=document.createElement("div");if(e.id="GPadvancedTools_ID"+t.id,e.className="GPlayerAdvancedTools",e.appendChild(this._createAdvancedToolDeleteElement(t)),t.title&&t.description&&e.appendChild(this._createAdvancedToolInformationElement(t)),"feature"!==t.type)for(var o=this._createAdvancedToolOpacityElement(t),n=0;n<o.length;n++)e.appendChild(o[n]);return e},_createAdvancedToolDeleteElement:function(t){var e=document.createElement("div");e.id="GPremove_ID"+t.id,e.className="GPlayerRemove",e.title="Supprimer la couche",e.layerId=t.id;var o=this;return e.addEventListener?e.addEventListener("click",function(t){o._onDropLayerClick.call(o,t)}):e.attachEvent&&e.attachEvent("onclick",function(t){o._onDropLayerClick.call(o,t)}),e},_createAdvancedToolInformationElement:function(t){var e=document.createElement("div");e.id="GPinfo_ID"+t.id,e.className="GPlayerInfo",e.title="Informations/légende",e.layerId=t.id;var o=this;return e.addEventListener?e.addEventListener("click",function(t){o._onOpenLayerInfoClick.call(o,t)}):e.attachEvent&&e.attachEvent("onclick",function(t){o._onOpenLayerInfoClick.call(o,t)}),e},_createAdvancedToolOpacityElement:function(t){var e=[],o=document.createElement("div");o.id="GPopacity_ID"+t.id,o.className="GPlayerOpacity",o.title="Opacité";var n=Math.round(100*t.opacity),i=document.createElement("input");i.id="GPopacityValueDiv_ID"+t.id,i.type="range",i.value=n;var s=this;i.addEventListener?i.addEventListener("change",function(t){s._onChangeLayerOpacity.call(s,t)}):i.attachEvent&&i.attachEvent("onchange",function(t){s._onChangeLayerOpacity.call(s,t)}),i.addEventListener?i.addEventListener("input",function(t){s._onChangeLayerOpacity.call(s,t)}):i.attachEvent&&i.attachEvent("oninput",function(t){s._onChangeLayerOpacity.call(s,t)}),o.appendChild(i);var r=document.createElement("div");r.id="GPopacityValueDiv_ID"+t.id,r.className="GPlayerOpacityValue";var a=document.createElement("span");return a.id="GPopacityValue_ID"+t.id,a.innerHTML=n+"%",r.appendChild(a),e.push(o),e.push(r),e},_createContainerLayerInfoElement:function(t){var e=document.createElement("div");e.id="GPlayerInfoContent";var o=document.createElement("div");if(o.id="GPlayerInfoTitle",o.innerHTML=t.title,e.appendChild(o),t.quicklookUrl){var n=document.createElement("div");n.id="GPlayerInfoQuicklook",n.title="Afficher un aperçu de la couche";var i=document.createElement("a");i.href=t.quicklookUrl,i.appendChild(n),e.appendChild(i)}var s=document.createElement("div");s.id="GPlayerInfoClose",s.title="Fermer la fenêtre";var r=function(){document.getElementById("GPlayerInfoPanel").className="GPlayerInfoPanelClosed";for(var t=document.getElementsByClassName("GPlayerInfoOpened"),e=0;e<t.length;e++)t[e].className="GPlayerInfo"};s.addEventListener?s.addEventListener("click",r):s.attachEvent&&s.attachEvent("onclick",r),e.appendChild(s);var a=document.createElement("div");if(a.id="GPlayerInfoDescription",a.innerHTML=t.description,e.appendChild(a),t.metadata){var l=document.createElement("div");l.id="GPlayerInfoMetadata";var c=document.createElement("div");c.className="GPlayerInfoSubtitle",c.innerHTML="Métadonnées",l.appendChild(c);for(var u=0;u<t.metadata.length;u++){var h=t.metadata[u].url,d=document.createElement("div");d.className="GPlayerInfoLink";var p=document.createElement("a");p.href=h,p.innerHTML=h,d.appendChild(p),l.appendChild(d)}0!==t.metadata.length&&e.appendChild(l)}if(t.legends){var m=document.createElement("div");m.id="GPlayerInfoLegend";var f=document.createElement("div");f.className="GPlayerInfoSubtitle",f.innerHTML="Légende",m.appendChild(f);for(var g={},_=t.maxScaleDenominator||56e7,y=0;y<t.legends.length;y++){var v=t.legends[y].minScaleDenominator;if(v){var E=v.toString();v=Math.round(parseInt(E.substring(0,3),10)/10)*Math.pow(10,E.length-2)}else v=270;g[v]=t.legends[y]}for(var S in g)if(g.hasOwnProperty(S)){var C=g[S].url;if("string"==typeof C&&C.toLowerCase().indexOf("nolegend.jpg")==-1){var A=document.createElement("div");A.className="GPlayerInfoLink",_=g[S].maxScaleDenominator||_;var P=document.createElement("a");P.href=C,P.innerHTML="Du 1/"+S+" au 1/"+_,A.appendChild(P),m.appendChild(A)}else delete g[S]}0!==Object.keys(g).length&&e.appendChild(m)}return e}};return e}(sortable),Ol3ControlsLayerSwitcher=function(t,e,o){function n(e){e=e||{};var o=e.options||{},i=e.layers||[];if(!(this instanceof n))throw new TypeError("ERROR CLASS_CONSTRUCTOR");if(i&&!Array.isArray(i))throw new Error("ERROR WRONG_TYPE : layers should be an array");if(o&&"object"!=typeof o)throw new Error("ERROR WRONG_TYPE : options should be an object");this._initialize(o,i);var s=this._initContainer(o);t.control.Control.call(this,{element:s,target:o.target,render:o.render})}return t.inherits(n,t.control.Control),n.prototype=Object.create(t.control.Control.prototype,{}),e.assign(n.prototype,o),n.prototype.constructor=n,n.prototype.setMap=function(e){e&&(this._addMapLayers(e),e.on("moveend",function(){this._onMapMoveEnd.call(this,e)},this),e.getLayers().on("add",function(t){var e,o=t.element;o.hasOwnProperty("gpLayerId")?e=o.gpLayerId:(e=this._layerId,o.gpLayerId=e,this._layerId++),this._layers[e]||this.addLayer(o)},this),e.getLayers().on("remove",function(t){var e=t.element,o=e.gpLayerId;this._layers[o]&&this.removeLayer(e)},this)),t.control.Control.prototype.setMap.call(this,e)},n.prototype.addLayer=function(t,e){var o=this.getMap();if(e=e||{},!t)return void console.log("[ERROR] LayerSwitcher:addLayer - missing layer parameter");var n=t.gpLayerId;if("undefined"===n)return void console.log("[ERROR] LayerSwitcher:addLayer - configuration cannot be set for "+t+" layer (layer id not found)");var i=!1;if(o.getLayers().forEach(function(t){t.gpLayerId===n&&(i=!0)},this),!i)return void console.log("[ERROR] LayerSwitcher:addLayer - configuration cannot be set for ",t," layer (layer is not in map.getLayers() )");if(this._layers[n]){if(this._layers[n]&&e){for(var s in e)e.hasOwnProperty(s)&&(this._layers[n][s]=e[s]);if(e.title){var r=document.getElementById("GPname_ID"+n);r&&(r.innerHTML=e.title,r.title=e.description||e.title)}var a=document.getElementById("GPinfo_ID"+n);if(!document.getElementById("GPinfo_ID"+n)&&e.description){var l=document.getElementById("GPadvancedTools_ID"+n);l&&l.appendChild(this._createAdvancedToolInformationElement({id:n}))}a&&"GPlayerInfoOpened"===a.className&&(document.getElementById("GPlayerInfoPanel").className="GPlayerInfoPanelClosed","GPlayerInfo"===a.className)}}else{var c=this.getLayerInfo(t)||{},u=t.getOpacity(),h=t.getVisible(),d=this.isInRange(t,o),p={layer:t,id:n,opacity:null!=u?u:1,visibility:null==h||h,inRange:null==d||d,title:null!=e.title?e.title:c._title||n,description:e.description||c._description||null,legends:e.legends||c._legends||[],metadata:e.metadata||c._metadata||[],quicklookUrl:e.quicklookUrl||c._quicklookUrl||null};this._layers[n]=p;var m=this._createLayerDiv(p);this._layers[n].div=m,t.getZIndex&&0!==t.getZIndex()?this._updateLayersOrder(o):(this._layersOrder.unshift(p),this._lastZIndex++,t.setZIndex(this._lastZIndex),this._layerListContainer.insertBefore(m,this._layerListContainer.firstChild)),t.on("change:opacity",this._updateLayerOpacity),t.on("change:visible",this._updateLayerVisibility);var f=this,g=function(t){f._updateLayersOrder.call(f,t)};null==this._layers[n].onZIndexChangeEvent&&(this._layers[n].onZIndexChangeEvent=t.on("change:zIndex",g))}},n.prototype.removeLayer=function(t){var e=t.gpLayerId,o=document.getElementById("GPlayersList"),n=document.getElementById("GPinfo_ID"+e);n&&"GPlayerInfoOpened"===n.className&&(document.getElementById("GPlayerInfoPanel").className="GPlayerInfoPanelClosed","GPlayerInfo"===n.className);var i=document.getElementById("GPlayerSwitcher_ID"+e);o.removeChild(i);var s=Math.abs(t.getZIndex()-this._lastZIndex);this._layersOrder.splice(s,1),this._lastZIndex--;for(var r=0;r<this._layersOrder.length;r++)this._layersOrder[r].layer.setZIndex(this._lastZIndex-r);delete this._layers[e]},n.prototype.setCollapsed=function(t){if(void 0===t)return void console.log("[ERROR] LayerSwitcher:setCollapsed - missing collapsed parameter");var e=!document.getElementById("GPshowLayersList").checked;if(!(t&&e||!t&&!e)){if(!e){for(var o=document.getElementsByClassName("GPlayerInfoOpened"),n=0;n<o.length;n++)o[n].className="GPlayerInfo";document.getElementById("GPlayerInfoPanel").className="GPlayerInfoPanelClosed"}document.getElementById("GPshowLayersList").checked=!t}},n.prototype.getCollapsed=function(){return this.collapsed},n.prototype.setRemovable=function(t,e){if(t){var o=t.gpLayerId;if(null==o)return void console.log("[LayerSwitcher:setRemovable] layer should be added to map before calling setRemovable method");var n=document.getElementById("GPremove_ID"+o);if(console.log(n.style.display),n)if(e===!1)n.style.display="none";else{if(e!==!0)return;n.style.display="block"}}},n.prototype._initialize=function(t,e){this._layers={},this._layersOrder=[],this._layersIndex={},this._lastZIndex=0,this._layerId=0,this.collapsed=void 0===t.collapsed||t.collapsed,this._layerListContainer=null;for(var o=0;o<e.length;o++){var n=e[o].layer;if(n){var i;n.hasOwnProperty("gpLayerId")?i=n.gpLayerId:(i=this._layerId,n.gpLayerId=i,this._layerId++);var s=e[o].config||{},r=n.getOpacity(),a=n.getVisible(),l={layer:n,id:i,opacity:null!=r?r:1,visibility:null==a||a,title:null!=s.title?s.title:i,description:s.description||null,legends:s.legends||[],metadata:s.metadata||[],quicklookUrl:s.quicklookUrl||null};this._layers[i]=l}}},n.prototype._initContainer=function(){var t=this._createMainContainerElement(),e=this._createMainLayersShowElement();t.appendChild(e),this.collapsed?this.collapsed=!0:(e.checked="checked",this.collapsed=!1);var o=this,n=function(t){this.collapsed=!t.target.checked,this.dispatchEvent("change:collapsed")};e.addEventListener("click",function(t){n.call(o,t)});var i=this._layerListContainer=this._createMainLayersElement();t.appendChild(i),this._createDraggableElement(i,this);var s=this._createMainPictoElement();t.appendChild(s);var r=this._createMainInfoElement();return t.appendChild(r),t},n.prototype._addMapLayers=function(t){this._layersIndex={};var e=this;t.getLayers().forEach(function(e){var o;e.hasOwnProperty("gpLayerId")?o=e.gpLayerId:(o=this._layerId,e.gpLayerId=o,this._layerId++);var n=this.getLayerInfo(e)||{};if(this._layers[o])this._layers[o].opacity=e.getOpacity(),this._layers[o].visibility=e.getVisible(),this._layers[o].inRange=this.isInRange(e,t);else{var i=e.getOpacity(),s=e.getVisible(),r=this.isInRange(e,t),a={layer:e,id:o,opacity:null!=i?i:1,visibility:null==s||s,inRange:null==r||r,title:n._title||o,description:n._description||null,legends:n._legends||[],metadata:n._metadata||[],quicklookUrl:n._quicklookUrl||null};this._layers[o]=a}e.on("change:opacity",this._updateLayerOpacity),e.on("change:visible",this._updateLayerVisibility);var l=null;void 0!==e.getZIndex&&(l=e.getZIndex(),this._layersIndex[l]&&Array.isArray(this._layersIndex[l])||(this._layersIndex[l]=[]),this._layersIndex[l].push(this._layers[o]))},this);var o=function(t){e._updateLayersOrder.call(e,t)};for(var n in this._layersIndex)if(this._layersIndex.hasOwnProperty(n))for(var i=this._layersIndex[n],s=0;s<i.length;s++)this._layersOrder.unshift(i[s]),this._lastZIndex++,i[s].layer.setZIndex(this._lastZIndex),null==this._layers[i[s].layer.gpLayerId].onZIndexChangeEvent&&(this._layers[i[s].layer.gpLayerId].onZIndexChangeEvent=i[s].layer.on("change:zIndex",o));for(var r=0;r<this._layersOrder.length;r++){var a=this._layersOrder[r],l=this._createLayerDiv(a);this._layerListContainer.appendChild(l),this._layers[a.id].div=l}},n.prototype._createLayerDiv=function(t){var e=t.legends&&0!==t.legends.length,o=t.metadata&&0!==t.metadata.length,n=t.quicklookUrl;(e||o||n)&&(t.displayInformationElement=!0);var i=this._createContainerLayerElement(t);return t.inRange||i.classList.add("outOfRange"),i},n.prototype._onChangeLayerOpacity=function(t){var e=t.target.id,o=e.substring(e.indexOf("_")+3),n=this._layers[o].layer,i=t.target.value,s=document.getElementById("GPopacityValue_ID"+o);s.innerHTML=i+"%",n.setOpacity(i/100)},n.prototype._updateLayerOpacity=function(t){var e=t.target.getOpacity();e>1&&(e=1),e<0&&(e=0);var o=t.target.gpLayerId,n=document.getElementById("GPopacityValueDiv_ID"+o);n.value=Math.round(100*e);var i=document.getElementById("GPopacityValue_ID"+o);i.innerHTML=Math.round(100*e)+"%"},n.prototype._onVisibilityLayerClick=function(t){var e=t.target.id,o=e.substring(e.indexOf("_")+3),n=this._layers[o].layer;n.setVisible(t.target.checked)},n.prototype._updateLayerVisibility=function(t){var e=t.target.getVisible(),o=t.target.gpLayerId,n=document.getElementById("GPvisibility_ID"+o);n.checked=e},n.prototype._updateLayersOrder=function(){var e=this.getMap();if(e){this._layersIndex={};var o,n;e.getLayers().forEach(function(e){n=e.gpLayerId,t.Observable.unByKey(this._layers[n].onZIndexChangeEvent),this._layers[n].onZIndexChangeEvent=null,o=null,void 0!==e.getZIndex&&(o=e.getZIndex(),this._layersIndex[o]&&Array.isArray(this._layersIndex[o])||(this._layersIndex[o]=[]),this._layersIndex[o].push(this._layers[n]))},this),this._lastZIndex=0;var i=this,s=function(t){i._updateLayersOrder.call(i,t)};this._layersOrder=[];for(var r in this._layersIndex)if(this._layersIndex.hasOwnProperty(r))for(var a=this._layersIndex[r],l=0;l<a.length;l++)this._layersOrder.unshift(a[l]),this._lastZIndex++,null==this._layers[a[l].layer.gpLayerId].onZIndexChangeEvent&&(this._layers[a[l].layer.gpLayerId].onZIndexChangeEvent=a[l].layer.on("change:zIndex",s));if(this._layerListContainer){for(;this._layerListContainer.firstChild;)this._layerListContainer.removeChild(this._layerListContainer.firstChild);for(var c=0;c<this._layersOrder.length;c++){var u=this._layersOrder[c];this._layerListContainer.appendChild(u.div)}}else console.log("[ol.control.LayerSwitcher] _updateLayersOrder : layer list container not found to update layers order ?!")}},n.prototype._onOpenLayerInfoClick=function(t){var e,o,n=t.target.id,i=n.substring(n.indexOf("_")+3),s=this._layers[i];if(n=document.getElementById(t.target.id),"GPlayerInfoOpened"===n.className)return void 0!==n.classList&&(n.classList.remove("GPlayerInfoOpened"),n.classList.add("GPlayerInfo")),e=document.getElementById("GPlayerInfoPanel"),void 0!==e.classList&&(e.classList.remove("GPpanel"),e.classList.remove("GPlayerInfoPanelOpened"),e.classList.add("GPlayerInfoPanelClosed")),o=document.getElementById("GPlayerInfoContent"),void e.removeChild(o);for(var r=document.getElementsByClassName("GPlayerInfoOpened"),a=0;a<r.length;a++)r[a].className="GPlayerInfo";void 0!==n.classList&&(n.classList.remove("GPlayerInfo"),n.classList.add("GPlayerInfoOpened")),e=document.getElementById("GPlayerInfoPanel"),void 0!==e.classList&&(e.classList.add("GPpanel"),e.classList.remove("GPlayerInfoPanelClosed"),e.classList.add("GPlayerInfoPanelOpened")),o=document.getElementById("GPlayerInfoContent"),o&&e.removeChild(o);var l={title:s.title,description:s.description,quicklookUrl:s.quicklookUrl,metadata:s.metadata,legends:s.legends},c=s.layer.getMaxResolution();c===1/0?l._maxScaleDenominator=56e7:l._maxScaleDenominator=Math.round(c/28e-5);var u=this._createContainerLayerInfoElement(l);e.appendChild(u)},n.prototype._onDropLayerClick=function(t){var e=t.target.id,o=e.substring(e.indexOf("_")+3),n=this._layers[o].layer;this.getMap().getLayers().remove(n)},n.prototype._onDragAndDropLayerClick=function(){var e=this.getMap(),o=this,n=function(t){o._updateLayersOrder.call(o,t)},i=document.querySelectorAll("div.GPlayerSwitcher_layer"),s=i.length;this._layersOrder=[];for(var r=0;r<i.length;r++){var a=i[r].id,l=a.substring(a.indexOf("_")+3),c=this._layers[l].layer;t.Observable.unByKey(this._layers[l].onZIndexChangeEvent),this._layers[l].onZIndexChangeEvent=null,c.setZIndex&&(c.setZIndex(s),this._layersOrder.push(this._layers[l]),s--),null==this._layers[l].onZIndexChangeEvent&&(this._layers[l].onZIndexChangeEvent=c.on("change:zIndex",n))}e.updateSize()},n.prototype._onMapMoveEnd=function(t){t.getLayers().forEach(function(e){var o=e.gpLayerId;if(this._layers[o]){var n,i=this._layers[o];this.isInRange(e,t)&&!i.inRange?(i.inRange=!0,n=document.getElementById("GPlayerSwitcher_ID"+o),n.classList.remove("outOfRange")):!this.isInRange(e,t)&&i.inRange&&(i.inRange=!1,
  n=document.getElementById("GPlayerSwitcher_ID"+o),n.classList.add("outOfRange"))}},this)},n.prototype.getLayerDOMId=function(t){var o=null;return this.getMap().getLayers().forEach(function(n){e.getOL3ObjectId(n)==e.getOL3ObjectId(t)&&(o=n.hasOwnProperty("gpLayerId")?n.gpLayerId:null)},this),null!==o?"GPlayerSwitcher_ID"+o:null},n.prototype.isInRange=function(e,o){if(o){var n=o.getView().getResolution();if(n>e.getMaxResolution()||n<e.getMinResolution())return!1;var i=o.getView().calculateExtent(o.getSize()),s=e.getExtent();return!(s&&!t.extent.intersects(i,s))}},n.prototype.getLayerInfo=function(t){var e={};if(void 0!==t.getSource){var o=t.getSource();e._title=o._title||"",e._description=o._description||"",e._quicklookUrl=o._quicklookUrl||"",e._metadata=o._metadata||[],e._legends=o._legends||[]}return e},n}(ol,Ol3Utils,CommonControlsLayerSwitcherDOM),Ol3ControlsUtilsMarkers=function(){var t={lightOrange:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAARDSURBVFiF3ZndaxxVGMZ/Z/YjX00Nadpo1qrFBgu56D9QbAtiLoRC7ywSNK1NURRREBKRFlSwFBW0gnSrJXY1CmISgyjFiyYSFC9ajE3MmpjdjWlMUtNos9lN9mteLzbRuCbZmTMTBB+Yi51znvd5n3nPnjnnjBIR/i/wuh4xpCpI0ojiENAA1AE1wCzwKzCE0EM5l2iShJvSyrXKnFVb8dOK4hmg3AIjifAmaU7ztMy7kYI7Zs6rQwjvka+AXcyiOMZx6XGahuE0AEHVitCFnhGAGoQugqrVaSrOKpNP4FWnSaxCGy1yWpesbyY/tLpwo7p/w0RxWHfI6Zk5q7ZSwhj6Q2sjzJLiXp1JQe+p+mllc4wA1CzHtw37lQmpCha5gbXpVxdJythh9z1kvzJJGrFixPBmOXixl+Z4mONmguZ4mIMXezG8WQsq5cs6tmDfTP7NXiSqN0vTzBD1TQfwbdmDUhX4tuyhvukATTNDlgxZ0SmUtUsgv0T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FF91AJnKDES21NaYN26l8uVoLWyhSZhS/345kUj4/+Q9XjMPdBR/9wl6Qn3TjyWnzyW88i3Y5e92BmDx6tPAV35KjDnXftqHEQBhKDXZvxmA4p5NCJzH+mFg3rxzvXzn0ZN+5BUoW8p4YcxUbbZQ4nXyGEIfhrDt7MS6o/tEOm07Z48ArTPCMPYnEomewpgBeGl1HMQGN5SSk381hdsSNzwqag1tRbZdHY/HL8JoXJwfr24AXnVKK7rae/mpz3fs8aCQ1FqfxzTPxuPxf7243V9oOMESa4XOvqgDZtlIKTKVHpz4w6Ej+ZbUWlgIHdNStkYikbZoNGoNl1f4lQGM3V8us0tLfhmhvh6/98Tu0hN/XslVQ2uRlahOIWWrMozLsVgs7aQ7KmYAAnVb67PjSh+bDsKtHX9Ubmv4dQRaEiE6JLQHwuG21tbWjBvNwm+z+8hmU+/Iu8l5akwo8uA34/bg3+W1B088nKdhCK2vmFJemjV7dqyxsdHzyTZqKwMQ2r55bmpK+SktRABb2ZO+2//9E+djvcAthIgZ0P5aZ+eVzaAKoTeqZgCKt238LP10xYaxZy7tq/j5+E5Ms629vb0b0KOt/Z/GP4jqqfL5oxVsAAAAAElFTkSuQmCC",defaultOffset:[-25.5,-38]};return t}(),CommonUtilsCheckRightManagement=function(t,e){return{check:function(t){if(t){var o=t.key,n=t.resources||[],i=t.services||[];if(n&&0!==n.length&&i&&0!==i.length){var s={};if(!o){if(!e.isConfigLoaded())return void console.log("WARNING : parameter 'apiKey' has not been parametered, and the contract key configuration has not been loaded, so impossible to check yours rights !");o=Object.keys(e.configuration.generalOptions.apiKeys)[0]}if(o){if(e.isConfigLoaded()){for(var r=0;r<n.length;r++)for(var a=n[r],l=0;l<i.length;l++){var c=i[l],u=e.getServiceParams(a,c,o);u&&0!==Object.keys(u).length?(s[c]||(s[c]=[]),s[c].push(a)):console.log("WARNING : contract key configuration has no rights to load this geoportal resource ("+a+") for this service ("+c+") ")}return s&&0!==Object.keys(s).length?(s.key=o,s):void console.log("WARNING : the contract key configuration has been loaded, and the parameter 'apiKey' has been parametered, but, there is a problem on the mapping between the contract and the key !")}console.log("WARNING : the contract key configuration has not been loaded, so be carefull !");for(var h={},d=0;d<i.length;d++){var p=i[d];h[p]=[];for(var m=0;m<n.length;m++){var f=n[m];h[p].push(f)}}return h.key=o,h}}}}}}({},CommonUtilsConfig),CommonUtilsSelectorID=function(){var t={generate:function(){var t=Math.floor(Date.now());return function(){return t++}}(),name:function(t){var e=null,o=t.indexOf("-");return e=o===-1?t:t.substring(0,o)},index:function(t){var e=null,o=this.name(t);if(o!==t){var n=o.indexOf("_");n!==-1&&(e=o.substring(n+1))}return e},uuid:function(t){var e=null,o=t.indexOf("-");return o!==-1&&(e=parseInt(t.substring(o+1),10)),e}};return t}(),CommonControlsSearchEngineDOM=function(t){var e={_addUID:function(t){return t+"-"+this._uid},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPsearchEngine"),t.className="GPwidget",t},_createShowSearchEngineElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowSearchEngine"),t.type="checkbox",t},_createShowSearchEnginePictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowSearchEnginePicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowSearchEngine"),e.title="Afficher/masquer la recherche par lieux",e.addEventListener("click",function(){document.getElementById(t._addUID("GPautoCompleteList")).style.display="none",document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none";var e=document.getElementById(t._addUID("GPshowAdvancedSearch"));e&&(e.style.display=null,document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="none");var o="#GPsearchInput-"+t._uid;document.querySelector(o+" input").disabled=!1,t.onShowSearchEngineClick()});var o=document.createElement("span");return o.id=this._addUID("GPshowSearchEngineOpen"),o.className="GPshowAdvancedToolOpen",e.appendChild(o),e},_createSearchInputElement:function(){var t=this,e=document.createElement("form");e.id=this._addUID("GPsearchInput"),e.addEventListener("submit",function(e){return e.preventDefault(),document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="block",document.getElementById(t._addUID("GPautoCompleteList")).style.display="none",t.onGeocodingSearchSubmit(e),!1});var o=document.createElement("input");o.id=this._addUID("GPsearchInputText"),o.type="text",o.placeholder="Rechercher un lieu, une adresse",o.autocomplete="off",o.addEventListener("keyup",function(e){var n=e.which||e.keyCode;13!==n&&10!==n&&38!==n&&40!==n&&(document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",o.value.length>2?document.getElementById(t._addUID("GPautoCompleteList")).style.display="block":document.getElementById(t._addUID("GPautoCompleteList")).style.display="none",t.onAutoCompleteSearchText(e))}),o.addEventListener("keydown",function(t){return}),e.appendChild(o);var n=document.createElement("div");return n.id=this._addUID("GPsearchInputReset"),n.addEventListener("click",function(){document.getElementById(t._addUID("GPsearchInputText")).value="",document.getElementById(t._addUID("GPautoCompleteList")).style.display="none",document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",t.onSearchResetClick()}),e.appendChild(n),e},_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 o=document.createElement("span");return o.id=this._addUID("GPshowAdvancedSearchOpen"),o.className="GPshowAdvancedToolOpen",e.appendChild(o),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 o=document.getElementById(this._addUID("GPautocompleteResults")),n=document.createElement("div");n.id=this._addUID("AutoCompletedLocation_"+e),n.className="GPautoCompleteProposal",n.innerHTML=t.fullText,n.addEventListener?n.addEventListener("click",function(t){o.click(t)},!1):n.attachEvent&&n.attachEvent("onclick",function(t){o.click(t)}),o.appendChild(n)},_createAdvancedSearchPanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var o=document.createElement("div");o.className="GPpanelTitle",o.innerHTML="Recherche avancée",e.appendChild(o);var n=document.createElement("div");return n.id=this._addUID("GPadvancedSearchClose"),n.className="GPpanelClose",n.title="Fermer la recherche avancée",n.addEventListener?n.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):n.attachEvent&&n.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(n),e},_createAdvancedSearchPanelFormElement:function(t){var e=this,o=document.createElement("form");o.id=this._addUID("GPadvancedSearchForm"),o.addEventListener("submit",function(t){t.preventDefault();for(var o=[],n="#GPadvancedSearchFilters-"+e._uid,i=document.querySelectorAll(n+" > div > div > input"),s=0;s<i.length;s++){var r=i[s];o.push({key:r.name,value:r.value})}return e.onGeocodingAdvancedSearchSubmit(t,o),document.getElementById(e._addUID("GPgeocodeResultsList")).style.display="block",!1});var n=document.createElement("div");n.className="GPflexInput";var i=document.createElement("label");i.className="GPadvancedSearchCodeLabel",i.innerHTML="Recherche par",n.appendChild(i);var s=this._createAdvancedSearchFormCodeElement(t);return n.appendChild(s),o.appendChild(n),o},_createAdvancedSearchFormCodeElement:function(t){var e=this,o=document.createElement("select");o.id=this._addUID("GPadvancedSearchCode"),o.className="GPadvancedSearchCode",o.addEventListener("change",function(t){e.onGeocodingAdvancedSearchCodeChange(t)},!1),t||(t=[{id:"PositionOfInterest",title:"Lieux/toponymes"},{id:"StreetAddress",title:"Adresses"},{id:"CadastralParcel",title:"Parcelles cadastrales"},{id:"Administratif",title:"Administratif"}]);for(var n=0;n<t.length;n++){var i=document.createElement("option");i.value=t[n].id,i.text=t[n].title,o.appendChild(i)}return o},_createAdvancedSearchFormInputElement:function(){var t=document.createElement("input");return t.type="submit",t.id=this._addUID("GPadvancedSearchSubmit"),t.className="GPinputSubmit",t.value="Chercher",t},_createAdvancedSearchFormFiltersElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPadvancedSearchFilters"),t},_createAdvancedSearchFiltersTableElement:function(t,e){var o=document.createElement("div");return o.id=this._addUID(t),e||(o.style.display="none"),o},_createAdvancedSearchFiltersAttributElement:function(t){var e=null,o=t.name,n=t.title,i=t.description,s=t.code,r=t.value,a=document.createElement("div");a.className="GPflexInput";var l=document.createElement("label");l.className="GPadvancedSearchFilterLabel",l.htmlFor=o,l.title=i||n,l.innerHTML=n,a.appendChild(l);var c=document.createElement("input");return c.id=o,c.className="GPadvancedSearchFilterInput",c.type="text",c.name=o,r&&(c.value=r),a.appendChild(c),e=document.getElementById(this._addUID(s)),e?e.appendChild(a):e=a,e},_createGeocodeResultsHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var o=document.createElement("div");o.className="GPpanelTitle",o.innerHTML="Résultats de la recherche",e.appendChild(o);var n=document.createElement("div");return n.id=this._addUID("GPgeocodeResultsClose"),n.className="GPpanelClose",n.title="Fermer la fenêtre de résultats",n.addEventListener?n.addEventListener("click",function(){document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none"},!1):n.attachEvent&&n.attachEvent("onclick",function(){document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none"}),e.appendChild(n),e},_createGeocodeResultsListElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPgeocodeResults"),e.addEventListener?e.addEventListener("click",function(e){e.ctrlKey||(document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none"),t.onGeocodedResultsItemClick(e)},!1):e.attachEvent&&e.attachEvent("onclick",function(e){e.ctrlKey||(document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none"),t.onGeocodedResultsItemClick(e)}),e},_createGeocodedLocationElement:function(t,e){var o=document.getElementById(this._addUID("GPgeocodeResults")),n=document.createElement("div");if(n.id=this._addUID("GeocodedLocation_"+e),n.className="GPautoCompleteProposal","string"==typeof t)n.innerHTML=t;else{var i=t.placeAttributes;i.freeform?n.innerHTML=i.freeform:i.postalCode?n.innerHTML=i.postalCode+" "+i.commune:i.cadastralParcel?n.innerHTML=i.cadastralParcel:n.innerHTML="..."}o.appendChild(n)}};return e}(CommonUtilsSelectorID),CommonControlsSearchEngineUtils=function(){var t={advancedSearchFiltersByDefault:{PositionOfInterest:[{name:"importance",title:"Importance"},{name:"nature",title:"Nature"},{name:"territory",title:"Territoire"},{name:"insee",title:"Code INSEE"},{name:"municipality",title:"Ville"},{name:"department",title:"Département"}],StreetAddress:[{name:"territory",title:"Territoire"},{name:"insee",title:"Code INSEE"},{name:"municipality",title:"Ville"},{name:"department",title:"Département"}],CadastralParcel:[{name:"department",title:"Département",description:"Numéro du département (ex: 01, 94)"},{name:"commune",title:"Code commune (INSEE)",description:"Code commune (INSEE) : 3 chiffres (ex: 067)"},{name:"absorbedCity",title:"Commune absorbée",description:"Commune absorbée : 3 chiffres (ex: 000, 001)"},{name:"section",title:"Section",description:"Section : 2 caractères (ex: AA, 0D)"},{name:"number",title:"Numéro",description:"Numéro de la parcelle : 4 chiffres (ex: 0041, 0250)"}],Administratif:[{name:"prefecture",title:"Préfecture"},{name:"inseeRegion",title:"Code région (INSEE)"},{name:"inseeDepartment",title:"Code département (INSEE)"},{name:"municipality",title:"Ville"}]},zoomToResultsByDefault:function(t){var e=15,o=t.service,n=t.fields,i=t.type,s={1:11,2:12,3:13,4:14,5:15,6:16,7:17,8:17};return"SuggestedLocation"===o&&"PositionOfInterest"===i&&(e=s[n.classification]),"DirectGeocodedLocation"===o&&"PositionOfInterest"===i&&(e=s[n.importance]||14),"StreetAddress"===i&&(e=17),"CadastralParcel"===i&&(e=17),"Administratif"===i&&(e=12),e}};return t}(),Ol3ControlsSearchEngine=function(t,e,o,n,i,s,r,a,l){function c(e){if(e=e||{},!(this instanceof c))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this.initialize(e),this._container=this._initContainer(),this._containerElement=null,e.element&&e.element.appendChild&&(e.element.appendChild(this._container),this._containerElement=e.element),t.control.Control.call(this,{element:this._containerElement||this._container,target:e.target,render:e.render})}return t.inherits(c,t.control.Control),c.prototype=Object.create(t.control.Control.prototype,{}),n.assign(c.prototype,a),c.prototype.constructor=c,c.prototype.getCollapsed=function(){return this.collapsed},c.prototype.setCollapsed=function(t){return void 0===t?void console.log("[ERROR] SearchEngine:setCollapsed - missing collapsed parameter"):void(t&&this.collapsed||!t&&!this.collapsed||(t?this._showSearchEngineInput.click():this._showSearchEngineInput.click(),this.collapsed=t))},c.prototype.initialize=function(t){this._checkInputOptions(t),this.options={collapsed:!0,zoomTo:"",resources:{geocode:[],autocomplete:[]},displayAdvancedSearch:!0,advancedSearch:{},geocodeOptions:{},autocompleteOptions:{}},n.mergeParams(this.options,t),0===this.options.resources.geocode.length&&(this.options.resources.geocode=["PositionOfInterest","StreetAddress"]),0===this.options.resources.autocomplete.length&&(this.options.resources.autocomplete=["PositionOfInterest","StreetAddress"]),this.collapsed=this.options.collapsed,this._uid=r.generate(),this._showSearchEngineInput=null,this._inputSearchContainer=null,this._autocompleteContainer=null,this._suggestedContainer=null,this._suggestedLocations=[],this._geocodedContainer=null,this._geocodedLocations=[],this._filterContainer=null,this._currentGeocodingCode=null,this._currentGeocodingLocation=null,this._advancedSearchFilters={},this._initAdvancedSearchFilters(),this._advancedSearchCodes=[],this._initAdvancedSearchCodes(),this._marker=null,this._markerUrl=i.lightOrange,this._popupContent=null,this._popupDiv=this._initPopupDiv(),this._popupOverlay=null,this._servicesRightManagement={},this._noRightManagement=!1,this._checkRightsManagement()},c.prototype._checkInputOptions=function(t){var e;if(t.resources)if("object"==typeof t.resources){var o=t.resources.geocode;if(o){Array.isArray(o)||(console.log("[SearchEngine] 'options.resources.geocode' parameter should be an array"),o=null);var n=["StreetAddress","PositionOfInterest","CadastralParcel","Administratif"];for(e=0;e<o.length;e++)n.indexOf(o[e])===-1&&console.log("[SearchEngine] options.resources.geocode : "+o[e]+" is not a resource for geocode")}var i=t.resources.autocomplete;if(i){Array.isArray(i)||(console.log("[SearchEngine] 'options.resources.autocomplete' parameter should be an array"),i=null);var s=["StreetAddress","PositionOfInterest"];for(e=0;e<i.length;e++)s.indexOf(i[e])===-1&&console.log("[SearchEngine] options.resources.autocomplete : "+i[e]+" is not a resource for autocomplete")}}else console.log("[SearchEngine] 'resources' parameter should be an object"),t.resources=null},c.prototype._initAdvancedSearchCodes=function(){for(var t=this.options.resources.geocode,e=0;e<t.length;e++)switch(t[e]){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;case"Administratif":this._advancedSearchCodes.push({id:"Administratif",title:"Administratif"})}0===this._advancedSearchCodes.length&&(this._advancedSearchCodes=[{id:"StreetAddress",title:"Adresses"},{id:"PositionOfInterest",title:"Lieux/toponymes"}])},c.prototype._initAdvancedSearchFilters=function(){this._advancedSearchFilters=l.advancedSearchFiltersByDefault;var t=this.options.advancedSearch;n.assign(this._advancedSearchFilters,t)},c.prototype._initPopupDiv=function(){var t=this,e=document.createElement("div");e.className="gp-feature-info-div";var o=document.createElement("input");return o.type="button",o.className="gp-styling-button closer",o.onclick=function(){return null!=t._popupOverlay&&t._popupOverlay.setPosition(void 0),!1},this._popupContent=document.createElement("div"),this._popupContent.className="gp-features-content-div",this._popupContent.style["min-width"]="200px",e.appendChild(this._popupContent),e.appendChild(o),e},c.prototype._initContainer=function(){var t=this._createMainContainerElement(),e=this._showSearchEngineInput=this._createShowSearchEngineElement();t.appendChild(e),this.options.collapsed||(e.checked=!0);var o=this._createShowSearchEnginePictoElement();t.appendChild(o);var n=this._inputSearchContainer=this._createSearchInputElement(),i=this;if(n.addEventListener?n.addEventListener("click",function(){i.onAutoCompleteInputClick()}):n.attachEvent&&n.attachEvent("onclick",function(){i.onAutoCompleteInputClick()}),t.appendChild(n),this.options.displayAdvancedSearch){var s=this._createShowAdvancedSearchElement();t.appendChild(s);var r=this._createAdvancedSearchPanelElement(),a=this._createAdvancedSearchPanelHeaderElement(),l=this._createAdvancedSearchPanelFormElement(this._advancedSearchCodes),c=this._filterContainer=this._createAdvancedSearchFormFiltersElement();this._setFilter(this._advancedSearchCodes[0].id);var u=this._createAdvancedSearchFormInputElement();l.appendChild(c),l.appendChild(u),r.appendChild(a),r.appendChild(l),t.appendChild(r)}var h=this._autocompleteContainer=this._createAutoCompleteElement(),d=this._suggestedContainer=this._createAutoCompleteListElement();h.appendChild(d),t.appendChild(h);var p=this._createGeocodeResultsElement(),m=this._geocodedContainer=this._createGeocodeResultsListElement();return p.appendChild(m),t.appendChild(p),t},c.prototype._setFilter=function(t){for(var e=this._filterContainer,o=!1,n=0;n<this._advancedSearchCodes.length;n++)if(this._advancedSearchCodes[n].id===t){o=!0;break}if(o){for(this._currentGeocodingCode=t;e.firstChild;)e.removeChild(e.firstChild);var i=this._advancedSearchFilters[t];if(i&&0!==i.length){for(var s=this._createAdvancedSearchFiltersTableElement(t,!0),r=0;r<i.length;r++){var a=this._createAdvancedSearchFiltersAttributElement(i[r]);s.appendChild(a)}return e.appendChild(s),e}}else for(;e.firstChild;)e.removeChild(e.firstChild)},c.prototype._checkRightsManagement=function(){var t,e=[],o=null;t=this.options.autocompleteOptions.apiKey,o=this.options.autocompleteOptions.filterOptions,e=o?o.type:[],e&&0!==e.length||(e=this.options.resources.autocomplete),e&&0!==e.length||(e=["StreetAddress","PositionOfInterest"]);var n=s.check({key:t||this.options.apiKey,resources:e,services:["AutoCompletion"]});t=this.options.geocodeOptions.apiKey,o=this.options.geocodeOptions.filterOptions,e=o?o.type:[],e&&0!==e.length||(e=this.options.resources.geocode),e&&0!==e.length||(e=["StreetAddress","PositionOfInterest"]);var i=s.check({key:t||this.options.apiKey,resources:e,services:["Geocode"]});return n||i?(this.options.apiKey||(i?this.options.apiKey=i.key:this.options.apiKey=n.key),n&&(this._servicesRightManagement.AutoCompletion=n.AutoCompletion),void(i&&(this._servicesRightManagement.Geocode=i.Geocode))):void(this._noRightManagement=!0)},c.prototype._requestAutoComplete=function(t){if(t&&("object"!=typeof t||0!==Object.keys(t).length)&&t.text){var o={};n.assign(o,this.options.autocompleteOptions),n.assign(o,t);var i=this.options.resources.autocomplete;i&&Array.isArray(i)&&(o.filterOptions||(o.filterOptions={}),o.filterOptions.type||(o.filterOptions.type=i)),o.apiKey=o.apiKey||this.options.apiKey,e.Services.autoComplete(o)}},c.prototype._fillAutoCompletedLocationListContainer=function(t){if(t&&0!==t.length){var e=this._suggestedContainer;if(e.childElementCount)for(;e.firstChild;)e.removeChild(e.firstChild);this._displaySuggestedLocation();for(var o=0;o<t.length;o++)this._createAutoCompletedLocationElement(t[o],o);this._suggestedLocations=t}},c.prototype._requestGeocoding=function(t){if(t&&("object"!=typeof t||0!==Object.keys(t).length)&&t.location){var o={};o.returnFreeForm=!0,n.assign(o,this.options.geocodeOptions),n.assign(o,t);var i=this.options.resources.geocode;i&&Array.isArray(i)&&(o.filterOptions||(o.filterOptions={}),o.filterOptions.type||(o.filterOptions.type=i)),o.apiKey=o.apiKey||this.options.apiKey,e.Services.geocode(o)}},c.prototype._fillGeocodedLocationListContainer=function(t){if(!t||0===t.length)return void this._clearGeocodedLocation();var e=this._geocodedContainer;if(e.childElementCount)for(;e.firstChild;)e.removeChild(e.firstChild);for(var o=0;o<t.length;o++)this._createGeocodedLocationElement(t[o],o);this._geocodedLocations=t},c.prototype._setLabel=function(t){document.getElementById("GPsearchInputText-"+this._uid).value=t},c.prototype._setPosition=function(t,e){var o=this.getMap().getView();console.log(t),o.setCenter(t),o.setZoom(e)},c.prototype._setMarker=function(e,o){var n=this.getMap(),i=this;if(null!=this._marker&&(n.removeOverlay(this._marker),this._marker=null),e){var s=document.createElement("img");s.src=this._markerUrl,s.addEventListener?s.addEventListener("click",function(){i._onResultMarkerSelect(o)}):s.attachEvent&&s.attachEvent("onclick",function(){i._onResultMarkerSelect(o)}),this._marker=new t.Overlay({position:e,offset:[-25.5,-38],element:s,stopEvent:!1}),n.addOverlay(this._marker)}},c.prototype._getZoom=function(t){var e=this.getMap(),o=this.options.zoomTo,n=null;if("function"==typeof o&&(n=o.call(this,t)),"number"==typeof o&&(n=o),"string"==typeof o)if("auto"===o)n=l.zoomToResultsByDefault(t);else{var i=parseInt(o,10);isNaN(i)||(n=i)}Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},n&&""!==n&&Number.isInteger(n)||(n=e.getView().getZoom());var s=e.minZoom,r=e.maxZoom;return n<s&&(n=s),n>r&&(n=r),n},c.prototype._onResultMarkerSelect=function(e){var o=this.getMap(),n="";if(e.attributes){n="<ul>";var i=e.attributes;for(var s in i)i.hasOwnProperty(s)&&"bbox"!==s&&(n+="<li>",n+='<span class="gp-attname-others-span">'+s.toUpperCase()+" : </span>",n+=i[s],n+=" </li>");n+=" </ul>"}else n=e.label;this._popupContent.innerHTML=n,this._popupOverlay?this._popupOverlay.setPosition(this._marker.getPosition()):(this._popupOverlay=new t.Overlay({element:this._popupDiv,positioning:"bottom-center",position:this._marker.getPosition(),offset:[0,-42]}),o.addOverlay(this._popupOverlay))},c.prototype.onShowSearchEngineClick=function(){this.collapsed=this._showSearchEngineInput.checked,this.dispatchEvent("change:collapsed")},c.prototype.onSearchResetClick=function(){this._clearResults()},c.prototype.onAutoCompleteInputClick=function(){var t=document.getElementById("GPsearchInputText-"+this._uid);t&&!t.disabled&&t.value.length>2&&this._displaySuggestedLocation()},c.prototype.onAutoCompleteSearchText=function(t){
  var e=t.target.value;if(e){if(this._noRightManagement)return void console.log("no rights for this service !");if(this._currentGeocodingLocation=e,e.length<3)return void this._clearSuggestedLocation();var o=this;this._requestAutoComplete({text:e,onSuccess:function(t){if(t){var e=t.suggestedLocations;o._fillAutoCompletedLocationListContainer(e)}},onFailure:function(t){o._clearSuggestedLocation()}});var n=this.getMap();n.on("click",this._hideSuggestedLocation,this),n.on("pointerdrag",this._hideSuggestedLocation,this)}},c.prototype.onAutoCompletedResultsItemClick=function(e){var o=r.index(e.target.id);if(o){var n=[this._suggestedLocations[o].position.x,this._suggestedLocations[o].position.y],i={service:"SuggestedLocation",type:this._suggestedLocations[o].type,fields:this._suggestedLocations[o]},s=this._suggestedLocations[o].fullText;this._setLabel(s),i.label=s;var a=this.getMap().getView(),l=a.getProjection().getCode();"EPSG:4326"!==l&&(n=t.proj.transform(n,"EPSG:4326",l));var c=this._getZoom(i);this._setPosition(n,c),this._setMarker(n,i)}},c.prototype.onGeocodingSearchSubmit=function(t){var e=t.target[0].value;if(e){if(this._noRightManagement)return void console.log("no rights for this service !");this._currentGeocodingLocation=e;var o=this;this._requestGeocoding({location:e,onSuccess:function(t){if(t){var e=t.locations;o._fillGeocodedLocationListContainer(e)}},onFailure:function(t){o._clearGeocodedLocation()}})}},c.prototype.onGeocodedResultsItemClick=function(e){var o=r.index(e.target.id);if(o){var n,i=[this._geocodedLocations[o].position.y,this._geocodedLocations[o].position.x],s=this._geocodedLocations[o].placeAttributes,a={service:"DirectGeocodedLocation",type:this._geocodedLocations[o].type,fields:this._geocodedLocations[o]};s.freeform?n=s.freeform:s.postalCode?(n=s.postalCode+" "+s.commune,a.attributes=s):s.cadastralParcel?(n=s.cadastralParcel,a.attributes=s):n="...",this._setLabel(n),a.label=n;var l=this.getMap().getView(),c=l.getProjection().getCode();"EPSG:4326"!==c&&(i=t.proj.transform(i,"EPSG:4326",c));var u=this._getZoom(a);this._setPosition(i,u),this._setMarker(i,a)}},c.prototype.onGeocodingAdvancedSearchCodeChange=function(t){var e=t.target.selectedIndex,o=t.target.options[e].value;o&&this._setFilter(o)},c.prototype.onGeocodingAdvancedSearchSubmit=function(t,e){if(e&&0!==e.length){var o,n,i={};i.type=[this._currentGeocodingCode];for(var s=0;s<e.length;s++)n=e[s],i[n.key]=n.value;"CadastralParcel"===this._currentGeocodingCode?(o=this._getCadastralParcelRequestParams(i),i={type:[this._currentGeocodingCode]}):o=this._currentGeocodingLocation;var r=this;this._requestGeocoding({location:o,filterOptions:i,onSuccess:function(t){if(t){var e=t.locations;r._fillGeocodedLocationListContainer(e)}},onFailure:function(t){r._clearGeocodedLocation()}})}},c.prototype._getCadastralParcelRequestParams=function(t){var e,o="",n=t.department;n?(e=n.length,o=2===e?n:1===e?"0"+n:n.substring(0,2)):o="__";var i=t.commune;i?(e=i.length,o+=3===e?i:2==e?"_"+i:1==e?"__"+i:i.substring(0,3)):o+="___";var s=t.insee;s&&5===s.length&&(o=s);var r=t.absorbedCity;r?(e=r.length,3===e?o+=r:e<3?2===e?o+="_"+r:1===e&&(o+="__"+r):o+=r.substring(0,3)):o+="___";var a=t.section;a?(e=a.length,o+=2===e?a:1===e?"_"+a:a.substring(0,2)):o+="__";var l=t.number;return l?(e=l.length,o+=4===e?l:3===e?"_"+l:2===e?"__"+l:1===e?"___"+l:l.substring(0,4)):o+="___",o},c.prototype._clearResults=function(){var t=this.getMap();this._currentGeocodingLocation=null,this._clearSuggestedLocation(),this._clearGeocodedLocation(),this._setMarker(),null!=this._popupOverlay&&(t.removeOverlay(this._popupOverlay),this._popupOverlay=null)},c.prototype._clearSuggestedLocation=function(){if(this._suggestedLocations=[],this._suggestedContainer)for(;this._suggestedContainer.firstChild;)this._suggestedContainer.removeChild(this._suggestedContainer.firstChild)},c.prototype._hideSuggestedLocation=function(){this._autocompleteContainer&&(this._autocompleteContainer.style.display="none")},c.prototype._displaySuggestedLocation=function(){this._autocompleteContainer&&(this._autocompleteContainer.style.display="block")},c.prototype._clearGeocodedLocation=function(){if(this._geocodedLocations=[],this._geocodedContainer)for(;this._geocodedContainer.firstChild;)this._geocodedContainer.removeChild(this._geocodedContainer.firstChild)},c}(ol,gp,{},Ol3Utils,Ol3ControlsUtilsMarkers,CommonUtilsCheckRightManagement,CommonUtilsSelectorID,CommonControlsSearchEngineDOM,CommonControlsSearchEngineUtils),CommonControlsMousePositionDOM=function(){var t={_addUID:function(t){var e=this._uid?t+"-"+this._uid:t;return e},_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,o=document.createElement("label");o.id=this._addUID("GPshowMousePositionPicto"),o.className="GPshowAdvancedToolPicto",o.htmlFor=this._addUID("GPshowMousePosition"),o.title="Afficher les coordonnées du curseur",o.addEventListener("click",function(o){var n="";document.getElementById(e._addUID("GPshowMousePosition")).checked||t||(n="GPmapCenterVisible"),document.getElementById("GPmapCenter").className=n,e.onShowMousePositionClick(o)});var n=document.createElement("span");return n.id=this._addUID("GPshowMousePositionOpen"),n.className="GPshowAdvancedToolOpen",o.appendChild(n),o},_createMousePositionPanelElement:function(t,e){t=!!t||"undefined"==typeof t,e=!!e||"undefined"==typeof e;var o=document.createElement("div");o.id=this._addUID("GPmousePositionPanel"),o.className="GPpanel",o.appendChild(this._createMousePositionPanelHeaderElement()),o.appendChild(this._createMousePositionPanelBasicElement(t,e));for(var n=this._createShowMousePositionSettingsElement(e),i=0;i<n.length;i++)o.appendChild(n[i]);return o},_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 o=document.createElement("div");o.id="GPmousePositionPanelClose",o.className="GPpanelClose",o.title="Fermer le panneau";var n=this;return o.addEventListener?o.addEventListener("click",function(){document.getElementById(n._addUID("GPshowMousePositionPicto")).click()},!1):o.attachEvent&&o.attachEvent("onclick",function(){document.getElementById(n._addUID("GPshowMousePositionPicto")).click()}),t.appendChild(o),t},_createMousePositionPanelBasicElement:function(t,e){var o=document.createElement("div");return o.id=this._addUID("GPmousePositionBasicPanel"),o.appendChild(this._createMousePositionPanelBasicCoordinateElement(e)),o.appendChild(this._createMousePositionPanelBasicAltitudeElement(t)),o},_createMousePositionPanelBasicCoordinateElement:function(t){var e=document.createElement("div");e.id=this._addUID("GPmousePositionCoordinate"),e.style.display=t?"block":"none";var o=document.createElement("span");o.className="GPmousePositionLabel",o.id=this._addUID("GPmousePositionLatLabel"),o.innerHTML="Latitude : ",e.appendChild(o);var n=document.createElement("span");n.className="GPmousePositionCoords",n.id=this._addUID("GPmousePositionLat"),n.innerHTML="",e.appendChild(n);var i=document.createElement("span");i.className="GPmousePositionLabel",i.id=this._addUID("GPmousePositionLonLabel"),i.innerHTML="Longitude : ",e.appendChild(i);var s=document.createElement("span");return s.className="GPmousePositionCoords",s.id=this._addUID("GPmousePositionLon"),s.innerHTML="",e.appendChild(s),e},_createMousePositionPanelBasicAltitudeElement:function(t){var e=document.createElement("div");e.id=this._addUID("GPmousePositionAltitude"),e.style.display=t?"block":"none";var o=document.createElement("span");o.className="GPmousePositionLabel",o.innerHTML="Altitude : ",e.appendChild(o);var n=document.createElement("span");return n.className="GPmousePositionCoords",n.id=this._addUID("GPmousePositionAlt"),n.innerHTML="",e.appendChild(n),e},_createShowMousePositionSettingsElement:function(t){var e=[],o=document.createElement("input");o.type="checkbox",o.id=this._addUID("GPshowMousePositionSettings");var n=document.createElement("label");return n.id=this._addUID("GPshowMousePositionSettingsPicto"),n.htmlFor=this._addUID("GPshowMousePositionSettings"),n.title="Réglages",n.className="GPshowMoreOptions GPshowMousePositionSettingsPicto",n.style.display=t?"block":"none",e.push(o),e.push(n),e},_createMousePositionSettingsElement:function(){var t=document.createElement("div");t.id=this._addUID("GPmousePositionSettings");var e=document.createElement("span");return e.className="GPmousePositionSettingsLabel",e.innerHTML="Système de référence",t.appendChild(e),t},_createMousePositionSettingsSystemsElement:function(t){var e=this,o=document.createElement("select");o.id=this._addUID("GPmousePositionProjectionSystem"),o.className="GPinputSelect GPmousePositionSettingsSelect",o.addEventListener("change",function(t){e.onMousePositionProjectionSystemChange(t)}),o.addEventListener("mouseover",function(t){e.onMousePositionProjectionSystemMouseOver(t)});for(var n=0;n<t.length;n++){var i=t[n],s=document.createElement("option");s.value=i.code,s.text=i.label||n,o.appendChild(s)}return o},_createMousePositionSettingsUnitsElement:function(t){var e=this,o=document.createElement("select");o.id=this._addUID("GPmousePositionProjectionUnits"),o.className="GPinputSelect GPmousePositionSettingsSelect",o.addEventListener("change",function(t){e.onMousePositionProjectionUnitsChange(t)});for(var n=0;n<t.length;n++){var i=t[n],s=document.createElement("option");s.value=i.code?i.code:n,s.text=i.label||n,o.appendChild(s)}return o},GPdisplayCoords:function(t){if(t&&null!=t){var e=document.getElementById(this._addUID("GPmousePositionLonLabel")),o=document.getElementById(this._addUID("GPmousePositionLatLabel"));t.x||t.y?(o.innerHTML="X : ",e.innerHTML="Y : "):t.e||t.n?(o.innerHTML="E : ",e.innerHTML="N : "):(o.innerHTML="Latitude : ",e.innerHTML="Longitude : ");var n=document.getElementById(this._addUID("GPmousePositionLat")),i=document.getElementById(this._addUID("GPmousePositionLon"));n.innerHTML=t.x||t.lat||t.e||"0",t.unit&&(n.innerHTML+=" ",n.innerHTML+=t.unit),i.innerHTML=t.y||t.lng||t.lon||t.n||"0",t.unit&&(i.innerHTML+=" ",i.innerHTML+=t.unit)}},GPdisplayElevation:function(t,e,o,n){var i,s=this;e||(e=500),clearTimeout(i),document.getElementById(this._addUID("GPmousePositionAlt")).innerHTML="...",null==o&&(o=-99999),null==n&&(n=99980);var r=o+n,a=o-n;t&&null!=t&&document.getElementById(this._addUID("GPmousePositionAltitude"))&&(i=setTimeout(function(){s.onRequestAltitude(t,function(t){a<t&&t<r?document.getElementById(s._addUID("GPmousePositionAlt")).innerHTML="--- m":document.getElementById(s._addUID("GPmousePositionAlt")).innerHTML=t+" m"})},e))}};return t}(),Ol3ControlsMousePosition=function(t,e,o,n,i,s,r,a){function l(e){if(e=e||{},!(this instanceof l))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this._initialize(e);var o=this._initContainer(e);t.control.Control.call(this,{element:o,target:e.target,render:e.render})}return t.inherits(l,t.control.Control),l.prototype=Object.create(t.control.Control.prototype,{}),i.assign(l.prototype,a),l.prototype.constructor=l,l.prototype.setMap=function(e){if(e){var o=this._createMapCenter();e.getViewport().appendChild(o),this.collapsed||this._isDesktop||(o.className="GPmapCenterVisible"),this.collapsed||(this._isDesktop?e.on("pointermove",this.onMouseMove,this):e.on("moveend",this.onMapMove,this))}if(t.control.Control.prototype.setMap.call(this,e),null!=e&&!this.collapsed){var n=document.getElementById("GPshowMousePosition-"+this._uid);n.checked="checked",this._setElevationPanel(this.options.displayAltitude),this._setCoordinatesPanel(this.options.displayCoordinates),this.options.displayCoordinates||this._setSettingsPanel(!1)}},l.prototype.addSystem=function(t){if("object"!=typeof t)return void console.log("[ERROR] MousePosition:addSystem - system parameter should be an object");if(t.crs){t.label||(t.label=t.crs),t.type||(t.type="Metric");for(var e=!1,o=0;o<this._projectionSystems.length;o++){var n=this._projectionSystems[o];t.crs===n.crs&&(e=!0)}t.code=this._projectionSystems.length,this._projectionSystems.push(t);var i=document.getElementById("GPmousePositionProjectionSystem-"+this._uid);if(i){var s=document.createElement("option");s.value=t.code,s.text=t.label,i.appendChild(s)}}},l.prototype.addSystems=function(t){if(t){if(!Array.isArray(t))return void console.log("[ERROR] MousePosition:addSystems - systems parameter should be an array");for(var e=0;e<t.length;e++)this.addSystem(t[e])}},l.prototype.removeSystem=function(t){if(!t||"string"!=typeof t)return void console.log("[ERROR] MousePosition:removeSystem - systemCode parameter should be a string");for(var e=document.getElementById("GPmousePositionProjectionSystem-"+this._uid),o=null,n=0;n<this._projectionSystems.length;n++){var i=this._projectionSystems[n];if(t===i.crs){o=i.code,this._projectionSystems.splice(n,1);break}}if(null==o)return void console.log("[WARN] MousePosition:removeSystem - system not found");for(var s=[],n=0;n<this._projectionSystems.length;n++)s[Number(this._projectionSystems[n].code)]=n,this._projectionSystems[n].code=n;for(var r=null,a=0;a<e.childNodes.length;a++)o!=e.childNodes[a].value?e.childNodes[a].value=s[Number(e.childNodes[a].value)]:r=a;null!=r&&e.removeChild(e.childNodes[r]),this._currentProjectionSystems.code==o&&(e.childNodes[0].setAttribute("selected","selected"),this._setCurrentSystem(e.childNodes[0].value))},l.prototype.setUnits=function(t){t&&Array.isArray(t)&&(this.options.units=t,this._projectionUnits=[],this._initProjectionUnits(),this._currentProjectionType&&this._setTypeUnitsPanel(this._currentProjectionType))},l.prototype.setAltitudeOptions=function(t){if(t&&"object"==typeof t&&(this.options.altitude.triggerDelay=t.triggerDelay,this.options.altitude.responseDelay=t.responseDelay,t.serviceOptions))for(var e in t.serviceOptions)t.serviceOptions.hasOwnProperty(e)&&(this.options.altitude.serviceOptions[e]=t.serviceOptions[e])},l.prototype.displayAltitude=function(t){void 0!==t&&(this.options.displayAltitude=t,this._setElevationPanel(t))},l.prototype.displayCoordinates=function(t){void 0!==t&&(this.options.displayCoordinates=t,this._setCoordinatesPanel(t),this._setSettingsPanel(t))},l.prototype.setCollapsed=function(t){return void 0===t?void console.log("[ERROR] MousePosition:setCollapsed - missing collapsed parameter"):void(t&&this.collapsed||!t&&!this.collapsed||(this._isDesktop||(document.getElementById("GPmapCenter").className=t?"":"GPmapCenterVisible"),this.onShowMousePositionClick(),this._showMousePositionContainer.checked=!t))},l.prototype._initialize=function(t){if(this.options=t||{},this.options.collapsed=void 0===t.collapsed||t.collapsed,this.collapsed=this.options.collapsed,this.options.units=t.units||[],this.options.displayAltitude=void 0===t.displayAltitude||t.displayAltitude,this.options.displayCoordinates=void 0===t.displayCoordinates||t.displayCoordinates,this.options.systems=t.systems||[],t.altitude){var e=t.altitude;this.options.altitude={triggerDelay:void 0!==e.triggerDelay?e.triggerDelay:200,responseDelay:void 0!==e.responseDelay?e.responseDelay:500,serviceOptions:e.serviceOptions||{},noDataValue:void 0!==e.noDataValue?e.noDataValue:-99999,noDataValueTolerance:void 0!==e.noDataValueTolerance?e.noDataValueTolerance:9e4}}else this.options.altitude={triggerDelay:200,responseDelay:500,serviceOptions:{}};this._uid=r.generate(),this._projectionSystems=[],this._initProjectionSystems(),this._projectionUnits={},this._initProjectionUnits(),this._isDesktop=i.detectSupport(),this.options.altitude.triggerDelay<100&&(this.options.altitude.triggerDelay=100),this._timer=this.options.altitude.triggerDelay,this._currentProjectionSystems=this._projectionSystems[0],this._currentProjectionType=this._projectionSystems[0].type,this._currentProjectionUnits=this._projectionUnits[this._currentProjectionType][0].code,this._projectionUnitsContainer=null,this._showMousePositionContainer=null,this.options.displayAltitude||this.options.displayCoordinates||(this.options.displayCoordinates=!0),this.options.displayAltitude&&this._checkRightsManagement()},l.prototype._initProjectionSystems=function(){for(var e=[{label:"Géographique",crs:t.proj.get("EPSG:4326").getCode(),type:"Geographical"},{label:"Web Mercator",crs:t.proj.get("EPSG:3857").getCode(),type:"Metric"},{label:"Lambert 93",crs:t.proj.get("EPSG:2154").getCode(),type:"Metric",geoBBox:{left:-9.86,bottom:41.15,right:10.38,top:51.56}},{label:"Lambert II étendu",crs:t.proj.get("EPSG:27572"),type:"Metric",geoBBox:{left:-4.87,bottom:42.33,right:8.23,top:51.14}}],o=this.options.systems,n=0;n<o.length;n++){var i=o[n];this.addSystem(i)}if(0===this._projectionSystems.length)for(var n=0;n<e.length;n++)this.addSystem(e[n])},l.prototype._initProjectionUnits=function(){var t={Geographical:[{code:"DEC",label:"degrés décimaux",convert:this._displayDEC},{code:"DMS",label:"degrés sexagésimaux",convert:this._displayDMS},{code:"RAD",label:"radians",convert:this._displayRAD},{code:"GON",label:"grades",convert:this._displayGON}],Metric:[{code:"M",label:"mètres",convert:this._displayMeter},{code:"KM",label:"kilomètres",convert:this._displayKMeter}]},e=this.options.units;for(var o in t)if(t.hasOwnProperty(o)){for(var n=!1,i=0;i<t[o].length;i++)for(var s=t[o][i],r=0;r<e.length;r++){var a=e[r];s.code===a&&(n=!0,this._projectionUnits[o]||(this._projectionUnits[o]=[]),this._projectionUnits[o].push(s))}n||(this._projectionUnits[o]=t[o])}"object"==typeof this._projectionUnits&&0===Object.keys(this._projectionUnits).length&&(this._projectionUnits=t)},l.prototype._checkRightsManagement=function(){var t=s.check({key:this.options.apiKey,resources:["SERVICE_CALCUL_ALTIMETRIQUE_RSC"],services:["Elevation"]});t||(this._noRightManagement=!0),this.options.apiKey||(this.options.apiKey=t.key)},l.prototype._initContainer=function(){var t=this._createMainContainerElement(),e=this._showMousePositionContainer=this._createShowMousePositionElement();t.appendChild(e);var o=this._createShowMousePositionPictoElement(this._isDesktop);t.appendChild(o);var n=this._createMousePositionPanelElement(),i=this._createMousePositionSettingsElement(),s=this._projectionSystemsContainer=this._createMousePositionSettingsSystemsElement(this._projectionSystems),r=this._projectionUnitsContainer=this._createMousePositionSettingsUnitsElement(this._projectionUnits[this._currentProjectionType]);return i.appendChild(s),i.appendChild(r),n.appendChild(i),t.appendChild(n),t},l.prototype._setElevationPanel=function(t){var e=null;t?this._noRightManagement?(e=document.getElementById("GPmousePositionAlt-"+this._uid),e.innerHTML="No rights!"):(e=document.getElementById("GPmousePositionAltitude-"+this._uid),e.style.display=""):(e=document.getElementById("GPmousePositionAltitude-"+this._uid),e.style.display="none")},l.prototype._setCoordinatesPanel=function(t){var e=document.getElementById("GPmousePositionCoordinate-"+this._uid);t?e.style.display="":e.style.display="none"},l.prototype._setSettingsPanel=function(t){var e=document.getElementById("GPshowMousePositionSettingsPicto-"+this._uid),o=document.getElementById("GPmousePositionSettings-"+this._uid);t?(e.style.display="",o.style.display=""):(e.style.display="none",o.style.display="none")},l.prototype._setTypeUnitsPanel=function(t){for(var e=this._projectionUnitsContainer;e.firstChild;)e.removeChild(e.firstChild);for(var o=this._projectionUnits[t],n=0;n<o.length;n++){var i=o[n],s=document.createElement("option");s.value=i.code?i.code:n,s.text=i.label||n,e.appendChild(s)}this._currentProjectionType=t,this._currentProjectionUnits=this._projectionUnits[t][0].code},l.prototype._displayDEC=function(t){var e={};return e.lat=t[1].toFixed(6),e.lng=t[0].toFixed(6),e},l.prototype._displayDMS=function(e){var o={},n=/(.*)([NS])\s(.*)([EW])/,i="$1$2 | $3$4",s=t.coordinate.toStringHDMS(e,2).replace(n,i),r=s.split("|");return o.lat=r[0],o.lng=r[1],o},l.prototype._displayRAD=function(t){var e={},o=.017453292519943295;return e.lng=t[0]*o,e.lng=e.lng.toFixed(8),e.lat=t[1]*o,e.lat=e.lat.toFixed(8),e},l.prototype._displayGON=function(t){var e={},o=1.1111111111111112;return e.lng=t[0]*o,e.lng=e.lng.toFixed(8),e.lat=t[1]*o,e.lat=e.lat.toFixed(8),e},l.prototype._displayMeter=function(t){var e={};return e.x=t[0].toFixed(2),e.y=t[1].toFixed(2),e.unit="m",e},l.prototype._displayKMeter=function(t){var e={};return e.x=(t[0]/1e3).toFixed(2),e.y=(t[1]/1e3).toFixed(2),e.unit="km",e},l.prototype._setCoordinate=function(e,o){var n={},i=this._currentProjectionSystems.crs;if(!i)return void console.log("ERROR : system crs not found");e=t.proj.transform(e,o,i);for(var s=this._currentProjectionSystems.type,r=null,a=this._projectionUnits[s],l=0;l<a.length;l++)if(a[l].code===this._currentProjectionUnits){r=a[l].convert;break}return r&&"function"==typeof r?(n=r(e),void(n&&0!==Object.keys(n).length&&this.GPdisplayCoords(n))):void console.log("WARNING : coordinates format function not found")},l.prototype._setElevation=function(t){var e=this.options.altitude.responseDelay,o=this.options.altitude.noDataValue,n=this.options.altitude.noDataValueTolerance;this.GPdisplayElevation(t,e,o,n)},l.prototype.onMoveStopped=function(e,o){var n=t.proj.transform(e,o,"EPSG:4326");this._setElevation(n)},l.prototype.onMouseMove=function(t){var e=this,o=t.coordinate;if(t.map&&t.map.getView()){var n=t.map.getView().getProjection();this._setCoordinate(o,n),clearTimeout(this._timer),this._timer=setTimeout(function(){e.onMoveStopped(o,n)},this.options.altitude.triggerDelay)}},l.prototype.onMapMove=function(){var t=this,e=this.getMap();if(e&&e.getView()){var o=e.getView(),n=o.getCenter(),i=o.getProjection();this._setCoordinate(n,i),clearTimeout(this._timer),this._timer=setTimeout(function(){t.onMoveStopped(n,i)},this.options.altitude.triggerDelay)}},l.prototype.onRequestAltitude=function(t,e){if(t&&0!==Object.keys(t).length&&this.options.displayAltitude){if(this._noRightManagement)return console.log("[WARNING] contract key configuration has no rights to load geoportal elevation "),void(document.getElementById("GPmousePositionAlt-"+this._uid).innerHTML="No rights!");var o=this.options.altitude.serviceOptions||{};o.zonly=!0,o.positions=[{lon:t[0],lat:t[1]}],o.scope=this,o.rawResponse?o.onSuccess=function(t){console.log("alti service raw response : ",t)}:o.onSuccess=function(t){t&&Object.keys(t)&&e.call(this,t.elevations[0].z)},o.onFailure=function(t){console.log("[getAltitude] ERROR : "+t.message)},o.apiKey=o.apiKey||this.options.apiKey,n.Services.getAltitude(o)}},l.prototype.onShowMousePositionClick=function(){var t=this.getMap();this.collapsed=this._showMousePositionContainer.checked,this.dispatchEvent("change:collapsed"),this._showMousePositionContainer.checked?this._isDesktop?t.un("pointermove",this.onMouseMove,this):t.un("moveend",this.onMapMove,this):this._isDesktop?t.on("pointermove",this.onMouseMove,this):(t.on("moveend",this.onMapMove,this),this.onMapMove()),this._setElevationPanel(this.options.displayAltitude),this._setCoordinatesPanel(this.options.displayCoordinates),this.options.displayCoordinates||this._setSettingsPanel(!1)},l.prototype.onMousePositionProjectionSystemChange=function(t){var e=t.target.selectedIndex,o=t.target.options[e].value;this._setCurrentSystem(o)},l.prototype._setCurrentSystem=function(t){for(var e=null,o=0;o<this._projectionSystems.length;++o)if(this._projectionSystems[o].code==t){e=this._projectionSystems[o].type;break}e&&(e!==this._currentProjectionType&&this._setTypeUnitsPanel(e),this._currentProjectionSystems=this._projectionSystems[Number(t)],this._isDesktop||this.onMapMove())},l.prototype.onMousePositionProjectionSystemMouseOver=function(e){var o=this.getMap();if(o&&o.getView()){var n=o.getView(),i=n.getProjection(),s=n.calculateExtent(o.getSize());s=t.proj.transformExtent(s,i,"EPSG:4326");var r=document.getElementById(this._addUID("GPmousePositionProjectionSystem"));r.innerHTML="";for(var a=0;a<this._projectionSystems.length;a++){var l=this._projectionSystems[a];if(l.geoBBox&&(s[0]>l.geoBBox.right||s[1]>l.geoBBox.top||s[2]<l.geoBBox.left||s[3]<l.geoBBox.bottom)){if(l===this._currentProjectionSystems){var c=document.createElement("option");c.value=l.code,c.text=l.label||a,c.setAttribute("selected","selected"),c.setAttribute("disabled","disabled"),r.appendChild(c)}}else{var c=document.createElement("option");c.value=l.code,c.text=l.label||a,l===this._currentProjectionSystems&&c.setAttribute("selected","selected"),r.appendChild(c)}}}},l.prototype.onMousePositionProjectionUnitsChange=function(t){var e=t.target.selectedIndex,o=t.target.options[e].value;this._currentProjectionUnits=o,this._isDesktop||this.onMapMove()},l}(ol,proj4,{},gp,Ol3Utils,CommonUtilsCheckRightManagement,CommonUtilsSelectorID,CommonControlsMousePositionDOM),CommonControlsDrawingDOM=function(){var t={_addUID:function(t){return t+"-"+this._uid},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPdrawing"),t.className="GPwidget",t},_createShowDrawingElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowDrawing"),t.className="GPshowDrawing",t.type="checkbox",t},_createShowDrawingPictoElement:function(){var t=document.createElement("label");t.id=this._addUID("GPshowDrawingPicto"),t.className="GPshowAdvancedToolPicto",t.htmlFor=this._addUID("GPshowDrawing"),t.title=this.options.labels.control;var e=document.createElement("span");return e.id=this._addUID("GPshowDrawingOpen"),e.className="GPshowAdvancedToolOpen",t.appendChild(e),t},_createDrawingPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPdrawingPanel"),t.className="GPpanel",t.appendChild(this._createDrawingPanelHeaderElement()),this.dtOptions={},this.options.tools.points&&(this.dtOptions.points={label:this.options.labels.points,active:!1,panel:"draw",id:"point"}),this.options.tools.lines&&(this.dtOptions.lines={label:this.options.labels.lines,active:!1,panel:"draw",id:"line"}),this.options.tools.polygons&&(this.dtOptions.polygons={label:this.options.labels.polygons,active:!1,panel:"draw",id:"polygon"}),this.options.tools.text&&(this.dtOptions.text={label:this.options.labels.text,active:!1,panel:"draw",id:"text"}),this.options.tools.edit&&(this.dtOptions.edit={label:this.options.labels.edit,active:!1,panel:"edit",id:"edit"}),this.options.tools.display&&(this.dtOptions.display={label:this.options.labels.display,active:!1,panel:"edit",id:"display"}),this.options.tools.tooltip&&(this.dtOptions.tooltip={label:this.options.labels.tooltip,active:!1,panel:"edit",id:"tooltip"}),this.options.tools.remove&&(this.dtOptions.remove={label:this.options.labels.remove,active:!1,panel:"edit",id:"remove"}),(this.dtOptions.points||this.dtOptions.lines||this.dtOptions.polygons||this.dtOptions.text)&&t.appendChild(this._createDrawingToolSection(this.options.labels.creatingTools,"draw")),(this.dtOptions.edit||this.dtOptions.display||this.dtOptions.tooltip||this.dtOptions.remove)&&t.appendChild(this._createDrawingToolSection(this.options.labels.editingTools,"edit")),this.options.tools.export&&t.appendChild(this._createSavingSection(this.options.labels.export,this.options.labels.exportTitle)),t},_createDrawingPanelHeaderElement:function(){var t=document.createElement("div");t.className="GPpanelHeader";var e=document.createElement("div");e.className="GPpanelTitle",e.innerHTML=this.options.controlLabel||"Annoter la carte",t.appendChild(e);var o=document.createElement("div");o.id=this._addUID("GPdrawingPanelClose"),o.className="GPpanelClose",o.title="Fermer le panneau";var n=this;return o.addEventListener?o.addEventListener("click",function(){document.getElementById(n._addUID("GPshowDrawingPicto")).click()},!1):o.attachEvent&&o.attachEvent("onclick",function(){document.getElementById(n._addUID("GPshowDrawingPicto")).click()}),t.appendChild(o),t},_createDrawingToolSection:function(t,e){function o(t){r._handleDOMToolClick(t,this.id,r),r._handleToolClick(t,this.id,r)}var n=document.createElement("div");n.className="drawing-tool-section";var i=document.createElement("p");i.className="drawing-tool-section-title",i.innerHTML=t,n.appendChild(i);var s=document.createElement("ul");s.className="drawing-tools-flex-display";var r=this;for(var a in this.dtOptions)if(this.dtOptions[a].panel==e){var l=document.createElement("li");l.className="drawing-tool",l.id=this._addUID("drawing-tool-"+this.dtOptions[a].id),l.title=this.dtOptions[a].label,l.addEventListener("click",o),s.appendChild(l)}return n.appendChild(s),n},_createSavingSection:function(t,e){var o=document.createElement("div");o.className="drawing-tool-section drawing-tools-flex-display";var n=document.createElement("button");n.title=e,n.className="tool-form-submit drawing-button",n.id=this._addUID("drawing-export"),n.type="button",n.textContent=t;var i=this;return n.onclick=function(){var t=i.exportFeatures();if(t){var e=document.createElement("a"),o="utf-8";if(e.setAttribute("href","data:application/vnd.google-earth.kml+xml;charset="+o+","+encodeURIComponent(t)),e.setAttribute("download","croquis.kml"),document.createEvent){var n=document.createEvent("MouseEvents");n.initEvent("click",!0,!0),e.dispatchEvent(n)}else e.click()}},o.appendChild(n),o},rgbaToHex:function(t){function e(t){if(t>255)throw"'"+t+"'' is greater than 255(0xff);";var e=Number(t).toString(16);return("0"+e).slice(-2)}var o=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/,n=o.exec(t);if(!n)throw"Invalid format: "+t;var i=n[1],s=n[2],r=n[3],a=n[4],l=[e(i),e(s),e(r)],c={};return c.hex="#"+l.join(""),a&&(c.opacity=parseFloat(a)),c},hexToRgba:function(t,e){var o=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(o,function(t,e,o,n){return e+e+o+o+n+n});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);n=n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null;var i=n?"rgba("+n.r+", "+n.g+", "+n.b+", "+e+")":null;return i},_createMarkersChooser:function(t){var e=document.createElement("li");e.className=t.className;for(var o=0;o<this.options.markersList.length;o++){var n=document.createElement("input");n.type="radio",n.name="marker",n.id=this._addUID("marker-"+o),n.value=this.options.markersList[o].src,n.className="marker-input-radio",t.defaultValue==n.value&&(n.checked=!0),e.appendChild(n);var i=document.createElement("label");i.className="marker-label",i.setAttribute("for",n.id);var s=document.createElement("img");s.src=n.value,i.appendChild(s),e.appendChild(i)}return e},_createStylingElement:function(t){var e=document.createElement("li");e.className=t.className;var o=document.createTextNode(t.label);e.appendChild(o);var n=document.createElement("input");try{n.type=t.type}catch(t){n.type="text"}return n.id=t.id,n.value=t.defaultValue,t.title&&(n.title=t.title),void 0!==t.min&&(n.min=t.min),void 0!==t.max&&(n.max=t.max),void 0!==t.step&&(n.step=t.step),e.appendChild(n),e},_createStylingDiv:function(t){var e=document.createElement("div");e.className="gp-styling-div";var o=document.createElement("ul"),n=null;switch(t.geomType.toLowerCase()){case"point":n=this._createMarkersChooser({className:"gp-styling-option",defaultValue:t.initValues.markerSrc}),o.appendChild(n);break;case"text":n=this._createStylingElement({type:"color",className:"gp-styling-option",label:this.options.labels.fillColor,id:this._addUID("fillColor"),defaultValue:t.initValues.fillColor}),o.appendChild(n),n=this._createStylingElement({type:"color",className:"gp-styling-option",label:this.options.labels.strokeColor,id:this._addUID("strokeColor"),defaultValue:t.initValues.strokeColor}),o.appendChild(n);break;case"line":n=this._createStylingElement({
  type:"color",className:"gp-styling-option",label:this.options.labels.strokeColor,id:this._addUID("strokeColor"),defaultValue:t.initValues.strokeColor}),o.appendChild(n),n=this._createStylingElement({type:"range",className:"gp-styling-option",label:this.options.labels.strokeWidth,title:"1 à 10 pixels",id:this._addUID("strokeWidth"),min:1,max:10,step:1,defaultValue:t.initValues.strokeWidth}),o.appendChild(n);break;case"polygon":n=this._createStylingElement({type:"color",className:"gp-styling-option",label:this.options.labels.strokeColor,id:this._addUID("strokeColor"),defaultValue:t.initValues.strokeColor}),o.appendChild(n),n=this._createStylingElement({type:"range",className:"gp-styling-option",label:this.options.labels.strokeWidth,title:"1 à 10 pixels",id:this._addUID("strokeWidth"),min:1,max:10,step:1,defaultValue:t.initValues.strokeWidth}),o.appendChild(n),n=this._createStylingElement({type:"color",className:"gp-styling-option",label:this.options.labels.fillColor,id:this._addUID("fillColor"),defaultValue:t.initValues.fillColor}),o.appendChild(n),n=this._createStylingElement({type:"range",className:"gp-styling-option",label:this.options.labels.fillOpacity,title:"0 (transparent) à 100% (opaque)",id:this._addUID("fillOpacity"),min:0,max:10,step:1,defaultValue:10*t.initValues.fillOpacity}),o.appendChild(n);break;default:console.log("Unhandled geometry type for styling.")}e.appendChild(o);var i=document.createElement("input");i.type="button",i.className="gp-styling-button",i.value=this.options.labels.applyToObject,i.onclick=function(){t.applyFunc.call(this,"apply")},e.appendChild(i);var s=document.createElement("input");s.type="button",s.value=this.options.labels.setAsDefault,s.className="gp-styling-button",s.onclick=function(){t.applyFunc.call(this,"default")},e.appendChild(s);var r=document.createElement("input");return r.type="button",r.className="gp-styling-button closer",r.onclick=function(){t.applyFunc.call(this,"cancel")},e.appendChild(r),e},_createLabelDiv:function(t){var e=document.createElement("div");e.className="gp-label-div";var o=null;if("Text"==t.geomType?(o=document.createElement("input"),o.type="text",o.className="gp-input-label-style"):(o=document.createElement("textArea"),o.rows=2,o.cols=40,o.className="gp-textarea-att-label-style"),t.text&&(o.value=t.text),o.autocomplete="off",o.placeholder=t.placeholder,o.id=t.inputId,e.appendChild(o),o.onblur=function(){t.applyFunc.call(this,o.value,!0)},o.onkeyup=function(e){"Text"==t.geomType&&13==e.keyCode&&t.applyFunc.call(this,o.value,!0),27==e.keyCode&&t.applyFunc.call(this,o.value,!1)},"Text"!=t.geomType){var n=document.createElement("input");n.type="button",n.className="gp-styling-button",n.value=this.options.labels.saveDescription,n.onclick=function(){t.applyFunc.call(this,o.value,!0)},e.appendChild(n);var i=document.createElement("input");i.type="button",i.className="gp-styling-button closer",i.onclick=function(){t.applyFunc.call(this,o.value,!1)},e.appendChild(i)}return e},_handleDOMToolClick:function(t,e,o){for(var n in o.dtOptions){var i=o._addUID("drawing-tool-"+o.dtOptions[n].id),s=document.getElementById(i);i==e?(o.dtOptions[n].active?s.className="drawing-tool":s.className="drawing-tool drawing-tool-active",o.dtOptions[n].active=!o.dtOptions[n].active):(s.className="drawing-tool",o.dtOptions[n].active=!1)}}};return t}(),Ol3ControlsDrawing=function(t,e,o,n,i,s,r){function a(t){if(t=t||{},!(this instanceof a))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this._initialize(t);var o=this._initContainer();e.control.Control.call(this,{element:o,target:t.target,render:t.render})}return e.inherits(a,e.control.Control),a.DefaultTools={points:!0,lines:!0,polygons:!0,text:!0,remove:!0,display:!0,tooltip:!0,edit:!0,export:!0},a.DefaultLabels={control:"Annoter la carte",creatingTools:"Outils de création",points:"Placer des points",lines:"Dessiner des lignes",polygons:"Dessiner des polygones",text:"Ecrire sur la carte",editingTools:"Outils d'édition",edit:"Editer les tracés",display:"Modifier l'apparence des objets",tooltip:"Modifier les textes / infos-bulles",remove:"Supprimer des objets",export:"Exporter",exportTitle:"Exporter en KML",applyToObject:"Appliquer à l'objet",saveDescription:"Enregistrer",setAsDefault:"Définir par défaut",strokeColor:"Couleur du trait : ",strokeWidth:"Epaisseur du trait : ",fillColor:"Couleur de remplissage : ",fillOpacity:"Opacité du remplissage : "},a.DefaultStyles={textFillColor:"#000000",textStrokeColor:"#FFFFFF",textIcon1x1:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiYAAAAAkAAxkR2eQAAAAASUVORK5CYII=",anchor:[0,0]},polyFillColor:"#ffffff",polyFillOpacity:.4,polyStrokeColor:"#ffcc33",polyStrokeWidth:4,strokeColor:"#ffcc33",strokeWidth:4},a.DefaultCursorStyle={radius:6,strokeColor:"#FFF",strokeWidth:1,fillColor:"rgba(0, 153, 255, 1)"},a.prototype=Object.create(e.control.Control.prototype,{}),a.prototype.assign=function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])},a.prototype.assign(i),a.prototype.constructor=a,a.prototype.setMap=function(t){if(e.control.Control.prototype.setMap.call(this,t),this.getMap()&&this.eventKey&&e.Observable.unByKey(this.eventKey),null!=t){if(!this.collapsed){var o=document.getElementById(this._addUID("GPshowDrawing"));o.checked="checked"}this.layer&&this.setLayer(this.layer),this.eventKey=this.getMap().getLayers().on("remove",function(t){s.getOL3ObjectId(t.element)==s.getOL3ObjectId(this.layer)&&(this.layer=null,this.interaction&&(this.getMap().removeInteraction(this.interaction),this.interaction=null))},this)}},a.prototype.exportFeatures=function(){var t=null;if(null==e.control.Control.prototype.getMap.call(this))return console.log("Impossible to export : control isn't attached to any map."),t;if(!this.layer)return console.log("Impossible to export : no layer is hosting features."),t;if(!this.layer.getSource()||!this.layer.getSource().getFeatures())return console.log("Impossible to export : no features found."),t;var o=this.layer.getSource().getProjection();o=o||this.getMap().getView().getProjection();var n=new r({writeStyles:!0});return t=n.writeFeatures(this.layer.getSource().getFeatures(),{dataProjection:"EPSG:4326",featureProjection:o})},a.prototype.setCollapsed=function(t){return void 0===t?void console.log("[ERROR] Drawing:setCollapsed - missing collapsed parameter"):void(t&&this.collapsed||!t&&!this.collapsed||(this.onShowDrawingClick(),this._showDrawingContainer.checked=!t))},a.prototype._getsMarkersOptionsFromSrc=function(t){for(var e=null,o=0;o<this.options.markersList.length;o++)if(this.options.markersList[o].src==t)return e=this.options.markersList[o];return e},a.prototype._getIconStyleOptions=function(t){var e={};return Object.keys(t).forEach(function(o){switch(o){case"src":case"size":case"anchor":case"anchorOrigin":case"anchorXUnits":case"anchorYUnits":e[o]=t[o]}},this),e},a.prototype._initialize=function(t){this._uid=n.generate(),this.options=t||{},this.options.tools||(this.options.tools={}),Object.keys(a.DefaultTools).forEach(function(t){this.options.tools.hasOwnProperty(t)||(this.options.tools[t]=a.DefaultTools[t])},this),this.options.cursorStyle||(this.options.cursorStyle={}),Object.keys(a.DefaultCursorStyle).forEach(function(t){this.options.cursorStyle.hasOwnProperty(t)||(this.options.cursorStyle[t]=a.DefaultCursorStyle[t])},this),this.options.collapsed=void 0===t.collapsed||t.collapsed,this.collapsed=this.options.collapsed,this.options.markersList=t.markersList||[{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAARfSURBVFiF3ZhfbBRVGMV/d2Z3212tbSkCbuNaqzaRiL6QyAMPjSFoYqgx4oOiRmMFUzQG479o2lQ0QXk1EhYFgmlD2mIRkYhRwqLEaA2GiKWV7rZLQ0sLwbZId7t/Zq4PFK1125m5s/vCedz7nXO+M9/N3jsD1xFEvgXlTkrI8hBQBywFbgEqgEvAMHAayZcYHBYbuZJP77yFkdsoR+ct4GXAb4OSQPARXj4QzzGejx7yEkZuZy2CMLBAgf4nkhfEi3S67UNzQ5YSIXfQhKAdtSAACxDsk2EapXT3cF2FYQdNSN7F/YQFsJkw77gVUcL01mp3o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BzHudmNZbaHMs2KzRNBOwz29386kE63vZS2gdawmHLd/NW1tTWIpoKYB572c0r29Czel81+GCJ+VWs9j2n+sLKy8sv+hijEDAshlrTWh77FpRDb4+Pj55KmGejKorVoIHRJS7mQy+WuFIvFRiu/SGq7hmGccl3340Pi6+FM5tLgwMByuxhai7rEWxVSLniGsVgqlZRf3sgK1YlE4mK9Xr/rdmBb1jfZsbHPD+lWRYhrEpYStn1lYWGhdpScUVbdU1LKq57n5fYeGIZxK5fNvm0Yxl/LRMMOWi+bUl5+6MSJ0tTUVOiTLdJfCJZlPby7u/ul1joBuMdGR9/pte1N4FeEKBmw9Mzq6vIrzQL8vx+pVOpVIUS1v6//g4njxx+bmJgY5x7/h/lP4A+AJ7grnrOyCgAAAABJRU5ErkJggg==",anchor:[.5,1]}],this.options.labels||(this.options.labels={}),Object.keys(a.DefaultLabels).forEach(function(t){this.options.labels.hasOwnProperty(t)||(this.options.labels[t]=a.DefaultLabels[t])},this),this.options.defaultStyles||(this.options.defaultStyles={}),Object.keys(a.DefaultStyles).forEach(function(e){if(!t.defaultStyles.hasOwnProperty(e))return void(this.options.defaultStyles[e]=a.DefaultStyles[e]);if("polyFillOpacity"==e&&(t.defaultStyles[e]<0||t.defaultStyles[e]>1))return console.log("Wrong value ("+t.defaultStyles[e]+") for defaultStyles.polyFillOpactity. Must be between 0 and 1"),void(this.options.defaultStyles[e]=a.DefaultStyles[e]);if("strokeWidth"==e||"polyStrokeWidth"==e){var o=parseInt(t.defaultStyles[e],10);if(isNaN(o)||o<0)return console.log("Wrong value ("+t.defaultStyles[e]+") for defaultStyles.strokeWidth. Must be a positive interger value."),void(this.options.defaultStyles[e]=a.DefaultStyles[e]);this.options.defaultStyles[e]=o}},this),this.interaction=null,this.stylingOvl=null,this.layer=null,this.options.layer&&this.options.layer instanceof e.layer.Vector&&(this.layer=this.options.layer),this._isDesktop=this._detectSupport()},a.prototype._createEmptyLayer=function(){var t=new e.Collection,o=new e.layer.Vector({source:new e.source.Vector({features:t})});o.gpResultLayerId="drawing",this.setLayer(o)},a.prototype.setLayer=function(t){if(!(t&&t instanceof e.layer.Vector))return void console.log("no valid layer given for hosting drawn features.");var o=this.getMap().getLayers();if(o){var n=!1;o.forEach(function(e){e==t&&(n=!0)},this),n||this.getMap().addLayer(t)}this.layer=t},a.prototype._detectSupport=function(){var t=!0,e=window.navigator.userAgent.toLowerCase();return e.indexOf("iphone")===-1&&e.indexOf("ipod")===-1&&e.indexOf("ipad")===-1&&e.indexOf("android")===-1&&e.indexOf("mobile")===-1&&e.indexOf("blackberry")===-1&&e.indexOf("tablet")===-1&&e.indexOf("phone")===-1&&e.indexOf("touch")===-1||(t=!1),e.indexOf("msie")===-1&&e.indexOf("trident")===-1||(t=!0),t},a.prototype._initContainer=function(){var t=this._createMainContainerElement(),e=this._showDrawingContainer=this._createShowDrawingElement();t.appendChild(e);var o=this._createShowDrawingPictoElement();t.appendChild(o);var n=this._createDrawingPanelElement();return t.appendChild(n),t},a.prototype._drawEndFeature=function(t,o){var n=null;switch(o){case"Point":n=new e.style.Style({image:new e.style.Icon(this._getIconStyleOptions(this.options.markersList[0]))});break;case"LineString":n=new e.style.Style({stroke:new e.style.Stroke({color:this.options.defaultStyles.strokeColor,width:this.options.defaultStyles.strokeWidth})});break;case"Polygon":n=new e.style.Style({fill:new e.style.Fill({color:this.hexToRgba(this.options.defaultStyles.polyFillColor,this.options.defaultStyles.polyFillOpacity)}),stroke:new e.style.Stroke({color:this.options.defaultStyles.polyStrokeColor,width:this.options.defaultStyles.polyStrokeWidth})})}t.setStyle(n);var i=null,s=this,r=function(e,o){if(s.getMap().removeOverlay(i),o&&e&&e.trim().length>0){var n=e.replace(/\n/g,"<br>");t.setProperties({description:n})}},a=this._createLabelDiv({applyFunc:r,inputId:this._addUID("att-input"),placeholder:"Saisir une description...",geomType:o});i=new e.Overlay({element:a,positioning:"top-center"}),this.getMap().addOverlay(i);var l=t.getGeometry().getExtent();i.setPosition([(l[0]+l[2])/2,(l[1]+l[3])/2]),document.getElementById(this._addUID("att-input")).focus()},a.prototype._createRemoveInteraction=function(){var t=new e.interaction.Select({layers:[this.layer]});return t.on("select",function(t){t&&t.selected&&0!=t.selected.length&&(this.layer.getSource().removeFeature(t.selected[0]),this.getMap().removeInteraction(this.interaction),this.interaction=this._createRemoveInteraction(),this.getMap().addInteraction(this.interaction))},this),t},a.prototype._createStylingInteraction=function(){var t=new e.interaction.Select({layers:[this.layer]});return t.on("select",function(t){if(this.stylingOvl&&this.getMap().removeOverlay(this.stylingOvl),t&&t.selected&&0!=t.selected.length){var o=null,n=null,i={};if(t.selected[0].getGeometry()instanceof e.geom.Point)t.selected[0].getStyle().getText()?(n="Text",t.selected[0].getStyle().getText().getStroke()&&t.selected[0].getStyle().getText().getStroke().getColor()&&(i.strokeColor=t.selected[0].getStyle().getText().getStroke().getColor()),t.selected[0].getStyle().getText().getFill()&&t.selected[0].getStyle().getText().getFill().getColor()&&(i.fillColor=t.selected[0].getStyle().getText().getFill().getColor()),i.strokeColor=i.hasOwnProperty("strokeColor")?i.strokeColor:this.options.defaultStyles.textStrokeColor,i.fillColor=i.hasOwnProperty("fillColor")?i.fillColor:this.options.defaultStyles.textFillColor):t.selected[0].getStyle()&&t.selected[0].getStyle().getImage()&&(n="Point",t.selected[0].getStyle().getImage().getSrc()?i.markerSrc=t.selected[0].getStyle().getImage().getSrc():i.markerSrc=this.options.markersList[0].src);else if(t.selected[0].getGeometry()instanceof e.geom.LineString)n="Line",t.selected[0].getStyle()&&t.selected[0].getStyle().getStroke()&&(t.selected[0].getStyle().getStroke().getWidth()&&(i.strokeWidth=t.selected[0].getStyle().getStroke().getWidth()),t.selected[0].getStyle().getStroke().getColor()&&(i.strokeColor=t.selected[0].getStyle().getStroke().getColor())),i.strokeWidth=i.hasOwnProperty("strokeWidth")?i.strokeWidth:this.options.defaultStyles.strokeWidth,i.strokeColor=i.hasOwnProperty("strokeColor")?i.strokeColor:this.options.defaultStyles.strokeColor;else if(t.selected[0].getGeometry()instanceof e.geom.Polygon){if(n="Polygon",t.selected[0].getStyle()&&t.selected[0].getStyle().getStroke()&&(t.selected[0].getStyle().getStroke().getWidth()&&(i.strokeWidth=t.selected[0].getStyle().getStroke().getWidth()),t.selected[0].getStyle().getStroke().getColor()&&(i.strokeColor=t.selected[0].getStyle().getStroke().getColor())),t.selected[0].getStyle()&&t.selected[0].getStyle().getFill()&&t.selected[0].getStyle().getFill().getColor()){var s=this.rgbaToHex(t.selected[0].getStyle().getFill().getColor());i.fillColor=s.hex,i.fillOpacity=s.opacity}i.strokeWidth=i.hasOwnProperty("strokeWidth")?i.strokeWidth:this.options.defaultStyles.polyStrokeWidth,i.strokeColor=i.hasOwnProperty("strokeColor")?i.strokeColor:this.options.defaultStyles.polyStrokeColor,i.fillColor=i.hasOwnProperty("fillColor")?i.fillColor:this.options.defaultStyles.polyFillColor,i.fillOpacity=i.hasOwnProperty("fillOpacity")?i.fillOpacity:this.options.defaultStyles.polyFillOpacity}if(!n)return void console.log("Unhandled geometry type for styling.");var r=this,a=function(i){if("cancel"==i)return void r.getMap().removeOverlay(o);var s="apply"!=i,a=document.getElementById(r._addUID("fillColor")),l=document.getElementById(r._addUID("fillOpacity")),c=document.getElementById(r._addUID("strokeColor")),u=document.getElementById(r._addUID("strokeWidth"));switch(n.toLowerCase()){case"text":s?(r.options.defaultStyles.textStrokeColor=c.value,r.options.defaultStyles.textFillColor=a.value):t.selected[0].setStyle(new e.style.Style({text:new e.style.Text({font:"16px sans",text:t.selected[0].getStyle().getText().getText(),fill:new e.style.Fill({color:a.value}),stroke:new e.style.Stroke({color:c.value,width:3})})}));break;case"point":var h=r._getsMarkersOptionsFromSrc(document.querySelector("input[name='marker']:checked").value);if(s){if(r.options.markersList.length>1){var d=r.options.markersList.findIndex(function(t){return t==h});d>0&&(r.options.markersList.splice(d,1),r.options.markersList.splice(0,0,h))}}else t.selected[0].setStyle(new e.style.Style({image:new e.style.Icon(r._getIconStyleOptions(h))}));break;case"line":s?(r.options.defaultStyles.strokeColor=c.value,r.options.defaultStyles.strokeWidth=parseInt(u.value,10)):t.selected[0].setStyle(new e.style.Style({stroke:new e.style.Stroke({width:parseInt(u.value,10),color:c.value})}));break;case"polygon":var p=parseInt(l.value,10)/10;s?(r.options.defaultStyles.polyStrokeColor=c.value,r.options.defaultStyles.polyFillColor=a.value,r.options.defaultStyles.polyFillOpacity=p,r.options.defaultStyles.polyStrokeWidth=parseInt(u.value,10)):t.selected[0].setStyle(new e.style.Style({stroke:new e.style.Stroke({width:parseInt(u.value,10),color:c.value}),fill:new e.style.Fill({color:r.hexToRgba(a.value,p)})}))}s||r.getMap().removeOverlay(o)},l=this._createStylingDiv({geomType:n,initValues:i,applyFunc:a});o=new e.Overlay({element:l,positioning:"top-center"}),this.getMap().addOverlay(o),o.setPosition(t.mapBrowserEvent.coordinate),this.stylingOvl=o,this.getMap().removeInteraction(this.interaction),this.interaction=this._createStylingInteraction(),this.getMap().addInteraction(this.interaction)}},this),t},a.prototype._createLabelInteraction=function(){var t=new e.interaction.Select({layers:[this.layer]});return t.on("select",function(t){if(this.labelOvl&&this.getMap().removeOverlay(this.labelOvl),t&&t.selected&&0!=t.selected.length){var o=null,n=null,i=null;if(t.selected[0].getGeometry()instanceof e.geom.Point?t.selected[0].getStyle().getText()?n="Text":t.selected[0].getStyle()&&t.selected[0].getStyle().getImage()&&(n="Point"):t.selected[0].getGeometry()instanceof e.geom.LineString?n="Line":t.selected[0].getGeometry()instanceof e.geom.Polygon&&(n="Polygon"),!n)return void console.log("Unhandled geometry type for styling.");if("Text"==n)i=t.selected[0].getStyle().getText().getText();else{var s=t.selected[0].getProperties();s&&s.hasOwnProperty("description")&&(i=s.description)}var r=this,a=function(e,i){if(r.getMap().removeOverlay(o),i){var s=t.selected[0];if("Text"==n){var a=s.getStyle();return a.getText().setText(e),void s.setStyle(a)}var l=e.replace(/\n/g,"<br>");s.setProperties({description:l})}},l=this._createLabelDiv({applyFunc:a,inputId:this._addUID("label-input"),placeholder:"Text"==n?"Saisir un label...":"Saisir une description...",text:i,geomType:n});o=new e.Overlay({element:l,positioning:"top-center"}),this.getMap().addOverlay(o),o.setPosition(t.mapBrowserEvent.coordinate),document.getElementById(this._addUID("label-input")).focus(),this.labelOvl=o,this.getMap().removeInteraction(this.interaction),this.interaction=this._createLabelInteraction(),this.getMap().addInteraction(this.interaction)}},this),t},a.prototype._handleToolClick=function(t,o,n){var i=n.getMap();if(i){switch(n.interaction&&(i.removeInteraction(n.interaction),n.interaction=null),this.layer||this._createEmptyLayer(),o){case this._addUID("drawing-tool-point"):n.dtOptions.points.active&&(n.interaction=new e.interaction.Draw({features:n.layer.getSource().getFeaturesCollection(),style:new e.style.Style({image:new e.style.Icon(this._getIconStyleOptions(this.options.markersList[0]))}),type:"Point"}),n.interaction.on("drawend",function(t){n._drawEndFeature(t.feature,"Point")},n));break;case this._addUID("drawing-tool-line"):n.dtOptions.lines.active&&(n.interaction=new e.interaction.Draw({features:n.layer.getSource().getFeaturesCollection(),style:new e.style.Style({image:new e.style.Circle({radius:this.options.cursorStyle.radius,stroke:new e.style.Stroke({color:this.options.cursorStyle.strokeColor,width:this.options.cursorStyle.strokeWidth}),fill:new e.style.Fill({color:this.options.cursorStyle.fillColor})}),stroke:new e.style.Stroke({color:this.options.defaultStyles.strokeColor,width:this.options.defaultStyles.strokeWidth})}),type:"LineString"}),n.interaction.on("drawend",function(t){n._drawEndFeature(t.feature,"LineString")},n));break;case this._addUID("drawing-tool-polygon"):n.dtOptions.polygons.active&&(n.interaction=new e.interaction.Draw({features:n.layer.getSource().getFeaturesCollection(),style:new e.style.Style({image:new e.style.Circle({radius:this.options.cursorStyle.radius,stroke:new e.style.Stroke({color:this.options.cursorStyle.strokeColor,width:this.options.cursorStyle.strokeWidth}),fill:new e.style.Fill({color:this.options.cursorStyle.fillColor})}),stroke:new e.style.Stroke({color:this.options.defaultStyles.polyStrokeColor,width:this.options.defaultStyles.polyStrokeWidth}),fill:new e.style.Fill({color:this.hexToRgba(this.options.defaultStyles.polyFillColor,this.options.defaultStyles.polyFillOpacity)})}),type:"Polygon"}),n.interaction.on("drawend",function(t){n._drawEndFeature(t.feature,"Polygon")},n));break;case this._addUID("drawing-tool-text"):n.dtOptions.text.active&&(n.interaction=new e.interaction.Draw({features:n.layer.getSource().getFeaturesCollection(),style:new e.style.Style({image:new e.style.Circle({radius:this.options.cursorStyle.radius,stroke:new e.style.Stroke({color:this.options.cursorStyle.strokeColor,width:this.options.cursorStyle.strokeWidth}),fill:new e.style.Fill({color:this.options.cursorStyle.fillColor})})}),type:"Point"}),n.interaction.on("drawend",function(t){var o=null,i=function(i,s){return n.getMap().removeOverlay(o),s?void t.feature.setStyle(new e.style.Style({image:new e.style.Icon(n._getIconStyleOptions(n.options.defaultStyles.textIcon1x1)),text:new e.style.Text({textAlign:"left",font:"16px sans",text:i,fill:new e.style.Fill({color:n.options.defaultStyles.textFillColor}),stroke:new e.style.Stroke({color:n.options.defaultStyles.textStrokeColor,width:3})})})):void n.layer.getSource().removeFeature(t.feature)},s=this._createLabelDiv({applyFunc:i,inputId:n._addUID("label-input"),geomType:"Text",placeholder:"Saisir un label..."});o=new e.Overlay({element:s,positioning:"top-center"}),n.getMap().addOverlay(o),o.setPosition(t.feature.getGeometry().getCoordinates()),document.getElementById(this._addUID("label-input")).focus()},n));break;case this._addUID("drawing-tool-edit"):n.dtOptions.edit.active&&(n.interaction=new e.interaction.Modify({features:n.layer.getSource().getFeaturesCollection(),style:new e.style.Style({image:new e.style.Circle({radius:this.options.cursorStyle.radius,stroke:new e.style.Stroke({color:this.options.cursorStyle.strokeColor,width:this.options.cursorStyle.strokeWidth}),fill:new e.style.Fill({color:this.options.cursorStyle.fillColor})})}),deleteCondition:function(){return!1}}));break;case this._addUID("drawing-tool-display"):n.dtOptions.display.active&&(n.interaction=this._createStylingInteraction());break;case this._addUID("drawing-tool-tooltip"):n.dtOptions.tooltip.active&&(n.interaction=this._createLabelInteraction());
  break;case this._addUID("drawing-tool-remove"):n.dtOptions.remove.active&&(n.interaction=n._createRemoveInteraction())}n.interaction&&i.addInteraction(n.interaction)}},a.prototype.onShowDrawingClick=function(){this.collapsed=this._showDrawingContainer.checked,this.dispatchEvent("change:collapsed")},a}({},ol,gp,CommonUtilsSelectorID,CommonControlsDrawingDOM,Ol3Utils,Ol3FormatsKML),CommonControlsLocationSelectorDOM=function(t){var e={_addUID:function(t){return t+"-"+this._uid},_createMainContainerElement:function(){var t=document.createElement("div");return t.className=this._addUID("GPlocationPoint"),t.className+=" GPwidget",t},_createLocationPointElement:function(t,e){var o=document.createElement("div");return o.id=this._addUID("GPlocationPoint_"+t),o.className=e?"GPflexInput GPlocationStageFlexInput":"GPflexInput GPlocationStageFlexInputHidden",o.style.cssText="",o},_createLocationPointLabelElement:function(e,o){var n=this,i=document.createElement("label");return i.id=this._addUID("GPlocationOriginLabel_"+e),i.htmlFor="GPlocationOrigin_"+e,i.innerHTML=o,i.addEventListener("click",function(e){for(var o=t.index(this.id),i=document.getElementsByClassName(n._addUID("GPlocationPoint")),s=0;s<i.length;s++){var r=i[s].childNodes[0].id,a=t.index(r);document.getElementById(n._addUID("GPlocationPoint_"+a)).style.cssText=""}document.getElementById(n._addUID("GPlocationOriginCoords_"+o)).value="",document.getElementById(n._addUID("GPlocationOrigin_"+o)).value="",document.getElementById(n._addUID("GPlocationPoint_"+o)).style.cssText="",document.getElementById(n._addUID("GPlocationOriginPointer_"+o)).checked=!1,document.getElementById(n._addUID("GPlocationOrigin_"+o)).className="GPlocationOriginVisible",document.getElementById(n._addUID("GPlocationOriginCoords_"+o)).className="GPlocationOriginHidden",document.getElementById(n._addUID("GPlocationStageRemove_"+o))&&(document.getElementById(n._addUID("GPlocationStageRemove_"+o)).className="GPlocationStageRemove"),document.getElementById(n._addUID("GPlocationStageAdd"))&&(document.getElementById(n._addUID("GPlocationStageAdd")).className=""),n.onLocationClearPointClick(e)}),i},_createLocationAutoCompleteteInputElement:function(e){var o=this,n=document.createElement("input");return n.id=this._addUID("GPlocationOrigin_"+e),n.className="GPlocationOriginVisible",n.type="text",n.placeholder="Saisir une adresse",n.autocomplete="off",n.addEventListener("keyup",function(e){var n=e.which||e.keyCode;if(13!==n&&10!==n&&38!==n&&40!==n){var i=t.index(this.id);document.getElementById(o._addUID("GPlocationOrigin_"+i)).value.length>2?document.getElementById(o._addUID("GPlocationAutoCompleteList_"+i)).style.display="block":document.getElementById(o._addUID("GPlocationAutoCompleteList_"+i)).style.display="none",o.onAutoCompleteSearchText(e)}}),n.addEventListener("keydown",function(n){var i=n.which||n.keyCode,s=document.getElementById(o._addUID("GPlocationAutoCompleteList_"+e));if(s){var r=s.getElementsByClassName("GPautoCompleteProposal current"),a=s.getElementsByClassName("GPautoCompleteProposal"),l=a.length;if(l){var c=null;if(!r.length)return c=a[0],c.className="GPautoCompleteProposal current",c.style.color="#000000",void(c.style["background-color"]="#CEDBEF");c=r[0];var u=parseInt(t.index(c.id),10),h=u===l-1?a[0]:a[u+1],d=0===u?a[l-1]:a[u-1];switch(c.style["background-color"]="",c.style.color="",d.style["background-color"]="",d.style.color="",h.style["background-color"]="",h.style.color="",i){case 38:console.log("arrow up"),c.className="GPautoCompleteProposal",d.className="GPautoCompleteProposal current",d.style.color="#000000",d.style["background-color"]="#CEDBEF";break;case 40:console.log("arrow down"),c.className="GPautoCompleteProposal",h.className="GPautoCompleteProposal current",h.style.color="#000000",h.style["background-color"]="#CEDBEF";break;case 13:console.log("enter"),c.click(n)}c.focus()}}}),n},_createLocationCoordinateInputElement:function(e){var o=this,n=document.createElement("input");return n.id=this._addUID("GPlocationOriginCoords_"+e),n.className="GPlocationOriginHidden",n.type="text",n.disabled=!1,n.addEventListener("click",function(){var e=t.index(this.id);document.getElementById(o._addUID("GPlocationOriginLabel_"+e)).click()}),n},_createLocationPointerShowInputElement:function(t){var e=document.createElement("input");return e.id=this._addUID("GPlocationOriginPointer_"+t),e.type="checkbox",e},_createLocationPointerInputElement:function(e){var o=this,n=document.createElement("label");return n.id=this._addUID("GPlocationOriginPointerImg_"+e),n.htmlFor="GPlocationOriginPointer_"+e,n.className="GPlocationOriginPointerImg",n.title="Pointer un lieu sur la carte",n.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation();var n,i,s,r=t.index(this.id),a=document.getElementsByClassName(o._addUID("GPlocationPoint"));for(n=0;n<a.length;n++)i=a[n].childNodes[0].id,s=t.index(i),r!=s&&(document.getElementById(o._addUID("GPlocationOriginPointer_"+s)).checked=!1,"Pointer un lieu sur la carte"==document.getElementById(o._addUID("GPlocationOriginCoords_"+s)).value&&(document.getElementById(o._addUID("GPlocationOriginCoords_"+s)).value="",document.getElementById(o._addUID("GPlocationOrigin_"+s)).className="GPlocationOriginVisible",document.getElementById(o._addUID("GPlocationOriginCoords_"+s)).className="GPlocationOriginHidden"));if(document.getElementById(o._addUID("GPlocationOriginPointer_"+r)).checked){for(document.getElementById(o._addUID("GPlocationOriginCoords_"+r)).value="",n=0;n<a.length;n++)i=a[n].childNodes[0].id,s=t.index(i),document.getElementById(o._addUID("GPlocationPoint_"+s)).style.cssText="";document.getElementById(o._addUID("GPlocationStageRemove_"+r))&&(document.getElementById(o._addUID("GPlocationStageRemove_"+r)).className="GPlocationStageRemove"),document.getElementById(o._addUID("GPlocationStageAdd"))&&(document.getElementById(o._addUID("GPlocationStageAdd")).className=""),document.getElementById(o._addUID("GPlocationOriginPointer_"+r)).checked=!1,document.getElementById(o._addUID("GPlocationOrigin_"+r)).className="GPlocationOriginVisible",document.getElementById(o._addUID("GPlocationOriginCoords_"+r)).className="GPlocationOriginHidden"}else{for(document.getElementById(o._addUID("GPlocationOriginCoords_"+r)).value="Pointer un lieu sur la carte",n=0;n<a.length;n++)i=a[n].childNodes[0].id,s=t.index(i),r==s?document.getElementById(o._addUID("GPlocationPoint_"+s)).style.cssText="":document.getElementById(o._addUID("GPlocationPoint_"+s)).style.display="none";document.getElementById(o._addUID("GPlocationStageRemove_"+r))&&(document.getElementById(o._addUID("GPlocationStageRemove_"+r)).className="GPlocationOriginHidden"),document.getElementById(o._addUID("GPlocationStageAdd"))&&(document.getElementById(o._addUID("GPlocationStageAdd")).className="GPlocationOriginHidden"),document.getElementById(o._addUID("GPlocationOriginPointer_"+r)).checked=!0,document.getElementById(o._addUID("GPlocationOrigin_"+r)).className="GPlocationOriginHidden",document.getElementById(o._addUID("GPlocationOriginCoords_"+r)).className="GPlocationOriginVisible",document.getElementById(o._addUID("GPlocationOriginCoords_"+r)).disabled=!0}o.onActivateMapPointClick(e)}),n},_createLocationRemovePointElement:function(e){var o=this,n=document.createElement("div");return n.id=this._addUID("GPlocationStageRemove_"+e),n.className="GPlocationStageRemove",n.title="Supprimer l'étape",n.addEventListener("click",function(n){var i=document.getElementsByClassName(o._addUID("GPlocationPoint")),s=i.length-1,r=i[0].childNodes[0].id,a=i[s].childNodes[0].id,l=t.index(r),c=t.index(a);if(e!=l&&e!=c){var u=t.index(this.id);document.getElementById(o._addUID("GPlocationPoint_"+u)).className="GPflexInput GPlocationStageFlexInputHidden",document.getElementById(o._addUID("GPlocationOrigin_"+u)).value="",document.getElementById(o._addUID("GPlocationOrigin_"+u)).className="GPlocationOriginVisible",document.getElementById(o._addUID("GPlocationOriginCoords_"+u)).value="",document.getElementById(o._addUID("GPlocationOriginCoords_"+u)).className="GPlocationOriginHidden",document.getElementById(o._addUID("GPlocationStageAdd")).style.display="",o.onLocationRemovePointClick(n)}}),n},_createLocationAddPointElement:function(){var e=this,o=document.createElement("div");return o.id=this._addUID("GPlocationStageAdd"),o.title="Ajouter une étape",o.addEventListener("click",function(o){for(var n=1,i=0,s=document.getElementsByClassName(e._addUID("GPlocationPoint")),r=1;r<s.length-1;r++){var a=s[r].childNodes[0].id,l=t.index(a);document.getElementById(e._addUID("GPlocationPoint_"+l))&&("GPflexInput GPlocationStageFlexInputHidden"==document.getElementById(e._addUID("GPlocationPoint_"+l)).className?1==n&&(n=l):i++)}n<s.length&&(document.getElementById(e._addUID("GPlocationPoint_"+n)).className="GPflexInput GPlocationStageFlexInput"),4==i&&(document.getElementById(e._addUID("GPlocationStageAdd")).style.display="none"),e.onLocationAddPointClick(o)}),o},_createLocationAutoCompleteResultElement:function(t){var e=this,o=document.createElement("div");return o.id=this._addUID("GPlocationAutoCompleteList_"+t),o.className="GPadvancedAutoCompleteList",o.addEventListener?o.addEventListener("click",function(o){e.onAutoCompletedResultsItemClick(o),document.getElementById(e._addUID("GPlocationAutoCompleteList_"+t)).style.display="none"},!1):o.attachEvent&&o.attachEvent("onclick",function(o){e.onAutoCompletedResultsItemClick(o),document.getElementById(e._addUID("GPlocationAutoCompleteList_"+t)).style.display="none"}),o},_createLocationAutoCompletedLocationElement:function(t,e,o){var n=document.getElementById(this._addUID("GPlocationAutoCompleteList_"+t)),i=document.createElement("div");i.id=this._addUID("AutoCompletedLocation_"+o),i.className="GPautoCompleteProposal",i.innerHTML=e.fullText,n.appendChild(i)},GPdisplayCoordinate:function(e){for(var o=document.getElementsByClassName(this._addUID("GPlocationPoint")),n=0;n<o.length;n++){var i=o[n].childNodes[0].id,s=t.index(i);if(document.getElementById(this._addUID("GPlocationOriginPointer_"+s)).checked){document.getElementById(this._addUID("GPlocationOriginCoords_"+s)).value=e,document.getElementById(this._addUID("GPlocationOriginCoords_"+s)).disabled=!1;for(var r=0;r<o.length;r++){i=o[r].childNodes[0].id;var a=t.index(i);document.getElementById(this._addUID("GPlocationPoint_"+a)).style.cssText="",document.getElementById(this._addUID("GPlocationStageRemove_"+a))&&(document.getElementById(this._addUID("GPlocationStageRemove_"+a)).className="GPlocationStageRemove")}return document.getElementById(this._addUID("GPlocationOriginPointer_"+s)).checked=!1,void(document.getElementById(this._addUID("GPlocationStageAdd"))&&(document.getElementById(this._addUID("GPlocationStageAdd")).className=""))}}}};return e}(CommonUtilsSelectorID),Ol3ControlsLocationSelector=function(t,e,o,n,i,s,r,a){function l(e){if(e=e||{},!(this instanceof l))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this.initialize(e),this._container=this._initContainer(),e.element&&e.element.appendChild&&(e.element.appendChild(this._container),this._container=e.element),t.control.Control.call(this,{element:this._container,target:e.target,render:e.render})}return t.inherits(l,t.control.Control),l.prototype=Object.create(t.control.Control.prototype,{}),e.assign(l.prototype,r),l.prototype.constructor=l,l.prototype.initialize=function(t){this.options={tag:{id:1,groupId:null,label:">",display:!0,addOption:!1,removeOption:!1},displayInfo:!0,autocompleteOptions:{}},e.mergeParams(this.options,t),this._uid=this.options.tag.groupId||s.generate(),this._map=null,this._inputsContainer=null,this._inputLabelContainer=null,this._inputAutoCompleteContainer=null,this._inputShowPointerContainer=null,this._inputShowPointer=null,this._inputCoordinateContainer=null,this._addPointElement=null,this._removePointElement=null,this._coordinate=null,this._suggestedContainer=null,this._suggestedLocations=[],this._currentLocation=null,this._initMarker(),this._resources={},this._noRightManagement=!1,this._checkRightsManagement()},l.prototype._initMarker=function(){if(this._marker=null,this._markerUrl="",this._markerOffset=[0,0],this.options.tag.markerOpts&&this.options.tag.markerOpts.url){this._markerUrl=this.options.tag.markerOpts.url;var t=this.options.tag.markerOpts.offset;t&&(Array.isArray(t)&&2===t.length?this._markerOffset=t:console.log("markerOpts.offset should be an array. e.g. : [0,0]"))}else this._markerUrl=a.lightOrange,this._markerOffset=a.defaultOffset},l.prototype.getCoordinate=function(){return this._coordinate},l.prototype.clear=function(){this._clearResults(),this._inputLabelContainer.click()},l.prototype._checkRightsManagement=function(){var t=this.options.autocompleteOptions.filterOptions,o=t?t.type:[];o&&0!==o.length||(o=["PositionOfInterest","StreetAddress"]);var n=i.check({key:this.options.apiKey,resources:o,services:["AutoCompletion"]});n||(this._noRightManagement=!0),this.options.apiKey||(this.options.apiKey=n.key),e.assign(this._resources,n)},l.prototype._initContainer=function(){var t=this.options.tag.id,e=this._createMainContainerElement(),o=this._inputsContainer=this._createLocationPointElement(t,this.options.tag.display);e.appendChild(o);var n=this._inputLabelContainer=this._createLocationPointLabelElement(t,this.options.tag.label);o.appendChild(n);var i=this._inputAutoCompleteContainer=this._createLocationAutoCompleteteInputElement(t),s=this;i.addEventListener?i.addEventListener("click",function(){s.onAutoCompleteInputClick()}):i.attachEvent&&i.attachEvent("onclick",function(){s.onAutoCompleteInputClick()}),o.appendChild(i);var r=this._inputCoordinateContainer=this._createLocationCoordinateInputElement(t);o.appendChild(r);var a=this._inputShowPointerContainer=this._createLocationPointerShowInputElement(t);o.appendChild(a);var l=this._inputShowPointer=this._createLocationPointerInputElement(t);if(o.appendChild(l),this.options.tag.addOption){var c=this._addPointElement=this._createLocationAddPointElement();o.appendChild(c)}if(this.options.tag.removeOption){var u=this._removePointElement=this._createLocationRemovePointElement(t);o.appendChild(u)}var h=this._suggestedContainer=this._createLocationAutoCompleteResultElement(t);return e.appendChild(h),e},l.prototype.onAutoCompleteInputClick=function(){this._inputAutoCompleteContainer&&this._inputAutoCompleteContainer.value.length>2&&this._displaySuggestedLocation()},l.prototype.onAutoCompleteSearchText=function(t){var e=t.target.value;if(e){if(this._noRightManagement)return void console.log("no rights for this service !?");if(this._currentLocation=e,e.length<3)return void this._clearSuggestedLocation();var o=this;this._requestAutoComplete({text:e,maximumResponses:5,onSuccess:function(t){if(t){var e=t.suggestedLocations;o._fillAutoCompletedLocationListContainer(e)}},onFailure:function(t){o._clearSuggestedLocation()}});var n=this.getMap();n.on("click",this._hideSuggestedLocation,this),n.on("pointerdrag",this._hideSuggestedLocation,this)}},l.prototype.onAutoCompletedResultsItemClick=function(e){var o=s.index(e.target.id);if(o){var n=[this._suggestedLocations[o].position.x,this._suggestedLocations[o].position.y];this._coordinate=n;var i={type:this._suggestedLocations[o].type,fields:this._suggestedLocations[o]},r=this._suggestedLocations[o].fullText;this._setLabel(r);var a=this.getMap().getView(),l=a.getProjection().getCode();"EPSG:4326"!==l&&(n=t.proj.transform(n,"EPSG:4326",l)),this._setPosition(n),this._setMarker(n,i,this.options.displayInfo)}},l.prototype.onActivateMapPointClick=function(){var t=this.getMap();this._inputShowPointerContainer.checked?(this._clearResults(),t.on("click",this.onMouseMapClick,this),this._setCursor("crosshair")):(t.un("click",this.onMouseMapClick,this),this._setCursor())},l.prototype.onLocationClearPointClick=function(){this._setCursor(),this._clearResults()},l.prototype.onLocationRemovePointClick=function(){this._setCursor(),this._clearResults()},l.prototype.onLocationAddPointClick=function(t){},l.prototype.onMouseMapClick=function(t){var e=t.coordinate;if(t.map&&t.map.getView()){var o=t.map.getView().getProjection();this._setCoordinate(e,o),this._setMarker([e[0],e[1]],null,!1),this.onActivateMapPointClick(t)}},l.prototype._setLabel=function(t){this._inputAutoCompleteContainer.value=t},l.prototype._setCursor=function(t){var e=this.getMap(),o=e.getTargetElement();t?o.style.cursor=t:o.style.cursor=null},l.prototype._setCoordinate=function(e,o){this._coordinate=t.proj.transform(e,o,"EPSG:4326");var n=this._coordinate[0].toFixed(4),i=this._coordinate[1].toFixed(4),s=n+" / "+i;this.GPdisplayCoordinate(s)},l.prototype._setPosition=function(t){var e=this.getMap().getView();e.setCenter(t)},l.prototype._setMarker=function(e,o,n){var i=this.getMap();if(null!=this._marker&&(i.removeOverlay(this._marker),this._marker=null),e){var s=document.createElement("img");s.src=this._markerUrl,this._marker=new t.Overlay({position:e,offset:this._markerOffset,element:s,stopEvent:!1}),i.addOverlay(this._marker)}},l.prototype._clearResults=function(){var t=this.getMap();this._currentLocation=null,this._coordinate=null,this._hideSuggestedLocation(),this._clearSuggestedLocation(),this._setMarker(),t.un("click",this.onMouseMapClick,this)},l.prototype._clearSuggestedLocation=function(){if(this._suggestedLocations=[],this._suggestedContainer)for(;this._suggestedContainer.firstChild;)this._suggestedContainer.removeChild(this._suggestedContainer.firstChild)},l.prototype._hideSuggestedLocation=function(){this._suggestedContainer&&(this._suggestedContainer.style.display="none")},l.prototype._displaySuggestedLocation=function(){this._suggestedContainer&&(this._suggestedContainer.style.display="block")},l.prototype._requestAutoComplete=function(t){if(t&&0!==Object.keys(t).length&&t.text){var o={};e.assign(o,this.options.autocompleteOptions),e.assign(o,t);var i=this._resources.AutoCompletion||null;i&&Array.isArray(i)&&(o.filterOptions||(o.filterOptions={}),o.filterOptions.type=i),o.apiKey=o.apiKey||this.options.apiKey,n.Services.autoComplete(o)}},l.prototype._fillAutoCompletedLocationListContainer=function(t){if(t&&0!==t.length){var e=this._suggestedContainer;if(e.childElementCount)for(;e.firstChild;)e.removeChild(e.firstChild);for(var o=0;o<t.length;o++)this._createLocationAutoCompletedLocationElement(this.options.tag.id,t[o],o);this._suggestedLocations=t}},l}(ol,Ol3Utils,{},gp,CommonUtilsCheckRightManagement,CommonUtilsSelectorID,CommonControlsLocationSelectorDOM,Ol3ControlsUtilsMarkers),CommonControlsRouteDOM=function(t){var e={_addUID:function(t){return t+"-"+this._uid},_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 o=document.createElement("span");return o.id=this._addUID("GPshowRouteOpen"),o.className="GPshowAdvancedToolOpen",e.appendChild(o),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 o=document.createElement("div");o.className="GPpanelTitle",o.innerHTML="Calcul d'itinéraire",e.appendChild(o);var n=document.createElement("div");return n.id=this._addUID("GProutePanelClose"),n.className="GPpanelClose",n.title="Masquer le panneau",n.addEventListener?n.addEventListener("click",function(){document.getElementById(t._addUID("GPshowRoutePicto")).click()},!1):n.attachEvent&&n.attachEvent("onclick",function(){document.getElementById(t._addUID("GPshowRoutePicto")).click()}),e.appendChild(n),e},_createRoutePanelFormElement:function(){var e=this,o=document.createElement("form");return o.id=this._addUID("GProuteForm"),o.setAttribute("onkeypress","return event.keyCode != 13;"),o.addEventListener("submit",function(o){console.log(o),o.preventDefault();var n=document.getElementsByClassName(e._addUID("GPlocationPoint")),i=n[0].childNodes[0].id,s=n[n.length-1].childNodes[0].id,r=t.index(i),a=t.index(s);if(""==document.getElementById(e._addUID("GPlocationOrigin_"+r)).value&&""==document.getElementById(e._addUID("GPlocationOriginCoords_"+r)).value||""==document.getElementById(e._addUID("GPlocationOrigin_"+a)).value&&""==document.getElementById(e._addUID("GPlocationOriginCoords_"+a)).value)return!1;var l;document.getElementById(e._addUID("GProuteResultsStages")).innerHTML="";for(var c=0;c<n.length;c++){var u=n[c].childNodes[0].id;if(l=t.index(u),"GPflexInput GPlocationStageFlexInput"==document.getElementById(e._addUID("GPlocationPoint_"+l)).className){var h=document.createElement("div");h.className="GProuteResultsStages";var d=document.createElement("div");d.className="GProuteResultStageLabel",d.innerHTML=document.getElementById(e._addUID("GPlocationOriginLabel_"+l)).innerHTML+" :",h.appendChild(d);var p=document.createElement("div");p.className="GProuteResultStageValue";var m=document.getElementById(e._addUID("GPlocationOriginCoords_"+l)),f=m.value,g="GPlocationOriginVisible"===m.className;null!=f&&""!=f&&g?p.innerHTML=f:p.innerHTML=document.getElementById(e._addUID("GPlocationOrigin_"+l)).value,h.appendChild(p),""!=p.innerHTML&&document.getElementById(e._addUID("GProuteResultsStages")).appendChild(h)}}var _=null;if(document.getElementById(e._addUID("GProuteComputationSelect"))){var y=document.getElementById(e._addUID("GProuteResultsComputationSelect"));y.selectedIndex=document.getElementById(e._addUID("GProuteComputationSelect")).selectedIndex,_=y.options[y.selectedIndex].value}var v=null;document.getElementById(e._addUID("GProuteTransportCar"))&&document.getElementById(e._addUID("GProuteTransportCar")).checked&&(v=document.getElementById(e._addUID("GProuteTransportCar")).value),document.getElementById(e._addUID("GProuteTransportPedestrian"))&&document.getElementById(e._addUID("GProuteTransportPedestrian")).checked&&(v=document.getElementById(e._addUID("GProuteTransportPedestrian")).value);for(var E=[],S=document.getElementsByClassName("GProuteExclusionsOption"),C=0;C<S.length;C++){l=S[C].htmlFor;var A=document.getElementById(l);A.checked||E.push(A.value)}return e.onRouteComputationSubmit({computation:_,transport:v,exclusions:E}),!1}),o},_createRoutePanelResultsElement:function(){var t=document.createElement("div");t.id=this._addUID("GProuteResultsPanel"),t.className="GProuteComponentHidden",t.appendChild(this._createRouteResultsStagesElement()),t.appendChild(this._createRouteResultsElement());var e=document.createElement("div");e.className="GPfakeBorder GPfakeBorderLeft",t.appendChild(e),t.appendChild(this._createRouteShowResultsDetailsElement());var o=document.createElement("label");o.htmlFor=this._addUID("GProuteResultsShowDetails"),o.innerHTML="Afficher le détail",t.appendChild(o);var n=document.createElement("label");n.htmlFor=this._addUID("GProuteResultsShowDetails"),n.innerHTML="Masquer le détail",t.appendChild(n);var i=document.createElement("div");return i.className="GPfakeBorder",t.appendChild(i),t.appendChild(this._createRouteResultsDetailsElement()),t},_createRouteWaitingElement:function(){var t=document.createElement("div");t.id=this._addUID("GProuteCalcWaitingContainer"),t.className="GProuteCalcWaitingContainerHidden";var e=document.createElement("p");return e.className="GProuteCalcWaiting",e.innerHTML="Calcul en cours...",t.appendChild(e),t},_createRouteResultsStagesElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProuteResultsStages"),t},_createRouteResultsElement:function(){var t=this,e=document.createElement("div");e.id=this._addUID("GProuteResults");var o=document.createElement("div");o.id=this._addUID("GProuteResultsValues"),e.appendChild(o);var n=document.createElement("div");n.id=this._addUID("GProuteResultsMode");var i=document.createElement("select");i.id=this._addUID("GProuteResultsComputationSelect"),i.className="GPinputSelect",i.addEventListener("change",function(e){t.onRouteModeComputationChangeAndRun(e)});for(var s=[{code:"fastest",label:"Plus rapide"},{code:"shortest",label:"Plus court"}],r=0;r<s.length;r++){var a=document.createElement("option");a.value=s[r].code,a.text=s[r].label,i.appendChild(a)}n.appendChild(i),e.appendChild(n);var l=document.createElement("div");return l.id=this._addUID("GProuteResultsNew"),l.title="Modifier le calcul",l.addEventListener("click",function(e){document.getElementById(t._addUID("GProuteResultsPanel")).className="GProuteComponentHidden",document.getElementById(t._addUID("GProuteForm")).className="",t.onShowRouteResultsNewClick(e)}),e.appendChild(l),e},_addRouteResultsValuesElement:function(t,e,o){var n=document.getElementById(this._addUID("GProuteResultsValues"));if(n.childElementCount)for(;n.firstChild;)n.removeChild(n.firstChild);var i=document.createElement("div");i.className="GProuteResultsValue";var s=document.createElement("label");s.className="GProuteResultsValueLabel",s.innerHTML="Distance :",i.appendChild(s);var r=0,a=parseInt(t/1e3,10);if(a){var l=Math.round(t);l/=1e3,r=l+" km"}else r=Math.round(t)+" m";var c=document.createElement("div");c.id=this._addUID("GProuteResultsValueDist"),c.innerHTML=r,i.appendChild(c),n.appendChild(i);var u=document.createElement("div");u.className="GProuteResultsValue";var h=document.createElement("label");h.className="GProuteResultsValueLabel",h.innerHTML="Durée :",u.appendChild(h);var d=document.createElement("div");return d.id=this._addUID("GProuteResultsValueDist"),d.innerHTML=o(e),u.appendChild(d),n.appendChild(u),n},_createRouteShowResultsDetailsElement:function(){var t=document.createElement("input");return t.id=this._addUID("GProuteResultsShowDetails"),t.type="checkbox",t},_createRouteResultsDetailsElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProuteResultsDetails"),t},_addRouteResultsDetailsElement:function(t,e){var o=this,n=document.getElementById(this._addUID("GProuteResultsDetails"));if(n.childElementCount)for(;n.firstChild;)n.removeChild(n.firstChild);for(var i=0,s=0,r=0;r<t.length;r++){var a=r+1,l=t[r],c=document.createElement("div");c.className="GProuteResultsDetailsNumber",c.innerHTML=a+".",n.appendChild(c),s+=parseFloat(l.duration),i+=parseFloat(l.distance);var u=0,h=parseInt(i/1e3,10);if(h){var d=Math.round(i);d/=1e3,u=d+" km"}else u=Math.round(i)+" m";var p=document.createElement("div");p.className="GProuteResultsDetailsInstruction",p.id=this._addUID("GProuteResultsDetailsInstruction_"+a),p.title="distance : "+u+" / temps : "+e(s),p.innerHTML=l.instruction,p.addEventListener("mouseover",function(t){o.onRouteResultsDetailsMouseOver(t)}),p.addEventListener("mouseout",function(t){o.onRouteResultsDetailsMouseOut(t)}),p.addEventListener("click",function(t){"function"==typeof o.onRouteResultsDetailsClick&&o.onRouteResultsDetailsClick(t)}),n.appendChild(p)}return n},_createRoutePanelFormPointElement:function(t,e,o){var n=this,i=document.createElement("div");i.id="GProutePoint"+t,i.className=o?"GPflexInput GProuteStageFlexInput":"GPflexInput GProuteStageFlexInputHidden";var s=document.createElement("label");s.id="GProuteOriginLabel"+t,s.htmlFor="GProuteOrigin"+t,s.innerHTML=e,s.addEventListener("click",function(){var t=this.id.charAt(this.id.length-1);document.getElementById("GProuteOriginCoords"+t).value="";for(var e=1;e<8;e++)document.getElementById("GProutePoint"+e).style.display="flex";document.getElementById("GProuteForm").className="",document.getElementById("GProuteOriginPointer"+t).checked=!1,document.getElementById("GProuteOrigin"+t).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+t).className="GProuteOriginHidden"}),i.appendChild(s);var r=document.createElement("input");r.id="GProuteOrigin"+t,r.className="GProuteOriginVisible",r.type="text",r.placeholder="Saisir une adresse",r.addEventListener("keyup",function(t){var e=t.which||t.keyCode;if(13!==e&&10!==e){var o=this.id.charAt(this.id.length-1);document.getElementById("GProuteOrigin"+o).value.length>2?document.getElementById("GProuteAutoCompleteList"+o).style.display="block":document.getElementById("GProuteAutoCompleteList"+o).style.display="none",n.onAutoCompleteSearchText(t)}}),r.addEventListener("blur",function(){var t=this.id.charAt(this.id.length-1);document.getElementById("GProuteAutoCompleteList"+t).style.display="none"}),i.appendChild(r);var a=document.createElement("input");a.id="GProuteOriginCoords"+t,a.className="GProuteOriginHidden",a.type="text",a.disabled=!0,i.appendChild(a);var l=document.createElement("input");l.id="GProuteOriginPointer"+t,l.type="checkbox",i.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,o=this.id.charAt(this.id.length-1);for(e=1;e<8;e++)o!=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"+o).checked){for(document.getElementById("GProuteOriginCoords"+o).value="",e=1;e<8;e++)document.getElementById("GProutePoint"+e).style.display="flex";document.getElementById("GProuteForm").className="",document.getElementById("GProuteOriginPointer"+o).checked=!1,document.getElementById("GProuteOrigin"+o).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+o).className="GProuteOriginHidden"}else{for(document.getElementById("GProuteOriginCoords"+o).value="Pointer un lieu sur la carte",e=1;e<8;e++)o==e?document.getElementById("GProutePoint"+e).style.display="flex":document.getElementById("GProutePoint"+e).style.display="none";document.getElementById("GProuteForm").className="GProuteFormMini",document.getElementById("GProuteOriginPointer"+o).checked=!0,document.getElementById("GProuteOrigin"+o).className="GProuteOriginHidden",document.getElementById("GProuteOriginCoords"+o).className="GProuteOriginVisible"}n.onRouteMapPointClick(t)}),i.appendChild(c),i},_createRoutePanelFormRemoveStageElement:function(t){var e=this,o=document.createElement("div");return o.id="GProuteStageRemove"+t,o.className="GProuteStageRemove",o.title="Supprimer l'étape",1!=t&&7!=t&&o.addEventListener("click",function(t){var o=this.id.charAt(this.id.length-1);document.getElementById("GProutePoint"+o).className="GPflexInput GProuteStageFlexInputHidden",document.getElementById("GProuteOrigin"+o).value="",document.getElementById("GProuteOrigin"+o).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+o).value="",document.getElementById("GProuteOriginCoords"+o).className="GProuteOriginHidden",document.getElementById("GProuteStageAdd").style.display="";var n=document.getElementById("GPshowRouteExclusionsPicto").style.top;document.getElementById("GPshowRouteExclusionsPicto").style.top=(parseInt(n,10)-33).toString()+"px",e.onRouteRemovePointClick(t)}),o},_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 o=1,n=0,i=2;i<7;i++)"GPflexInput GProuteStageFlexInputHidden"==document.getElementById("GProutePoint"+i).className?1==o&&(o=i):n++;
  if(o<7){document.getElementById("GProutePoint"+o).className="GPflexInput GProuteStageFlexInput";var s=document.getElementById("GPshowRouteExclusionsPicto").style.top;document.getElementById("GPshowRouteExclusionsPicto").style.top=(parseInt(s,10)+33).toString()+"px"}4==n&&(document.getElementById("GProuteStageAdd").style.display="none"),t.onRouteAddPointClick(e)}),e},_createRoutePanelFormAutoCompleteListElement:function(t){var e=this,o=document.createElement("div");return o.id="GProuteAutoCompleteList"+t,o.className="GPadvancedAutoCompleteList",o.addEventListener?o.addEventListener("click",function(o){e.onAutoCompletedResultsItemClick(o),document.getElementById("GProuteAutoCompleteList"+t).style.display="none"},!1):o.attachEvent&&o.attachEvent("onclick",function(o){e.onAutoCompletedResultsItemClick(o),document.getElementById("GProuteAutoCompleteList"+t).style.display="none"}),o},_createRouteAutoCompletedLocationElement:function(t,e,o){var n=document.getElementById("GProuteAutoCompleteList"+e),i=document.createElement("div");i.id="AutoCompletedLocation"+o,i.className="GPautoCompleteProposal",i.innerHTML=t.fullText,n.appendChild(i)},_createRoutePanelFormModeChoiceElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProuteModeChoice"),t},_createRoutePanelFormModeChoiceTransportElement:function(t){var e=this,o=document.createElement("div");o.id=this._addUID("GProuteTransportChoice");var n=document.createElement("span");n.className="GProuteModeLabel",n.innerHTML="Mode de transport",o.appendChild(n);for(var i=0;i<t.length;i++){var s=t[i];if("Voiture"===s){var r=document.createElement("input");r.id=this._addUID("GProuteTransportCar"),r.type="radio",r.name="GProuteTransport",r.value="Voiture",0===i&&(r.checked=!0),r.addEventListener?r.addEventListener("change",function(t){e.onRouteModeTransportChange(t)}):r.attachEvent&&r.attachEvent("onchange",function(t){e.onRouteModeTransportChange(t)}),o.appendChild(r);var a=document.createElement("label");a.className="GProuteTransportImg",a.htmlFor=this._addUID("GProuteTransportCar"),a.title="Voiture",o.appendChild(a)}if("Pieton"===s){var l=document.createElement("input");l.id=this._addUID("GProuteTransportPedestrian"),l.type="radio",l.name="GProuteTransport",l.value="Pieton",0===i&&(l.checked=!0),l.addEventListener?l.addEventListener("change",function(t){e.onRouteModeTransportChange(t)}):l.attachEvent&&l.attachEvent("onchange",function(t){e.onRouteModeTransportChange(t)}),o.appendChild(l);var c=document.createElement("label");c.className="GProuteTransportImg",c.htmlFor=this._addUID("GProuteTransportPedestrian"),c.title="Piéton",o.appendChild(c)}}return o},_createRoutePanelFormModeChoiceComputeElement:function(){var t=this,e=document.createElement("div");e.id=this._addUID("GProuteComputationChoice");var o=document.createElement("span");o.className="GProuteModeLabel",o.innerHTML="Mode de calcul",e.appendChild(o);var n=document.createElement("select");n.id=this._addUID("GProuteComputationSelect"),n.className="GPinputSelect",n.addEventListener("change",function(e){t.onRouteModeComputationChange(e)});for(var i=[{code:"fastest",label:"Plus rapide"},{code:"shortest",label:"Plus court"}],s=0;s<i.length;s++){var r=document.createElement("option");r.value=i[s].code,r.text=i[s].label,n.appendChild(r)}return e.appendChild(n),e},_createShowRouteExclusionsElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowRouteExclusions"),t.type="checkbox",t},_createShowRouteExclusionsPictoElement:function(){var t=this,e=document.createElement("label");return e.id=this._addUID("GPshowRouteExclusionsPicto"),e.className="GPshowMoreOptions GPshowRouteExclusionsPicto",e.htmlFor=this._addUID("GPshowRouteExclusions"),e.title="Exclusions",e.style.top="185px",e.addEventListener?e.addEventListener("click",function(e){t.onShowRouteExclusionsClick(e)}):e.attachEvent&&e.attachEvent("onclick",function(e){t.onShowRouteExclusionsClick(e)}),e},_createRoutePanelFormExclusionsElement:function(){var t=document.createElement("div");t.id=this._addUID("GProuteExclusions");var e=document.createElement("span");return e.className="GProuteExclusionsLabel",e.innerHTML="Passages autorisés",t.appendChild(e),t},_createRoutePanelFormExclusionOptionsElement:function(t){var e=this,o=document.createElement("div");o.className="GProuteExclusionsOptions";for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];switch(n){case"toll":var s=document.createElement("input");s.id=this._addUID("GProuteExclusionsToll"),s.type="checkbox",s.value="Toll",s.checked=!i,s.addEventListener?s.addEventListener("change",function(t){e.onRouteExclusionsChange(t)}):s.attachEvent&&s.attachEvent("onchange",function(t){e.onRouteExclusionsChange(t)}),o.appendChild(s);var r=document.createElement("label");r.className="GProuteExclusionsOption",r.htmlFor=this._addUID("GProuteExclusionsToll"),r.innerHTML="Péages",o.appendChild(r);break;case"tunnel":var a=document.createElement("input");a.id=this._addUID("GProuteExclusionsTunnel"),a.type="checkbox",a.value="Tunnel",a.checked=!i,a.addEventListener?a.addEventListener("change",function(t){e.onRouteExclusionsChange(t)}):a.attachEvent&&a.attachEvent("onchange",function(t){e.onRouteExclusionsChange(t)}),o.appendChild(a);var l=document.createElement("label");l.className="GProuteExclusionsOption",l.htmlFor=this._addUID("GProuteExclusionsTunnel"),l.innerHTML="Tunnels",o.appendChild(l);break;case"bridge":var c=document.createElement("input");c.id=this._addUID("GProuteExclusionsBridge"),c.type="checkbox",c.value="Bridge",c.checked=!i,c.addEventListener?c.addEventListener("change",function(t){e.onRouteExclusionsChange(t)}):c.attachEvent&&c.attachEvent("onchange",function(t){e.onRouteExclusionsChange(t)}),o.appendChild(c);var u=document.createElement("label");u.className="GProuteExclusionsOption",u.htmlFor=this._addUID("GProuteExclusionsBridge"),u.innerHTML="Ponts",o.appendChild(u)}}return o},_createRouteSubmitFormElement:function(){var t=document.createElement("input");return t.id=this._addUID("GProuteSubmit"),t.className="GPinputSubmit",t.type="submit",t.value="Calculer",t},_createRouteFormResetElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GProuteReset"),e.title="Réinitialiser les paramètres",e.addEventListener("click",function(e){t.onRouteResetClick(e)}),e}};return e}(CommonUtilsSelectorID),Ol3ControlsRoute=function(t,e,o,n,i,s,r,a,l,c){function u(e){if(e=e||{},!(this instanceof u))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this.initialize(e),this._container=this._createMainContainerElement(),this._containerElement=null,e.element&&e.element.appendChild&&(e.element.appendChild(this._container),this._containerElement=e.element),t.control.Control.call(this,{element:this._containerElement||this._container,target:e.target,render:e.render})}return t.inherits(u,t.control.Control),u.prototype=Object.create(t.control.Control.prototype,{}),o.assign(u.prototype,c),u.prototype.constructor=u,u.prototype.getCollapsed=function(){return this.collapsed},u.prototype.setCollapsed=function(t){return void 0===t?void console.log("[ERROR] Route:setCollapsed - missing collapsed parameter"):void(t&&this.collapsed||!t&&!this.collapsed||(t?document.getElementById("GProutePanelClose-"+this._uid).click():document.getElementById("GPshowRoute-"+this._uid).click(),this.collapsed=t))},u.prototype.getLayer=function(){return this._geojsonSections},u.prototype.setMap=function(e){e&&(this._container=this._initContainer(e)),t.control.Control.prototype.setMap.call(this,e)},u.prototype.initialize=function(e){this._checkInputOptions(e),this.options={collapsed:!0,graphs:["Voiture","Pieton"],exclusions:{toll:!1,tunnel:!1,bridge:!1},routeOptions:{},autocompleteOptions:{}},o.assign(this.options,e);var n={departure:{url:l.red,offset:l.defaultOffset},stages:{url:l.lightOrange,offset:l.defaultOffset},arrival:{url:l.darkOrange,offset:l.defaultOffset}};this.options.markersOpts=o.assign(n,e.markersOpts),this.collapsed=this.options.collapsed,this._uid=s.generate(),this._waitingContainer=null,this._formRouteContainer=null,this._resultsRouteContainer=null,this._showRouteExclusionsElement=null,this._currentPoints=[],this._currentTransport=null,this._initTransport(),this._currentComputation=null,this._initComputation(),this._currentExclusions=[],this._initExclusions(),this._waiting=!1,this._timer=null,this._geojsonRoute=null,this._geojsonSections=null,this._popupContent=null,this._popupDiv=this._initPopupDiv(),this._popupOverlay=null,this._resultsSelectInteraction=null,this._resultsHoverInteraction=null,this._defaultFeatureStyle=new t.style.Style({stroke:new t.style.Stroke({color:"rgba(0,183,152,0.9)",width:12})}),this._selectedFeatureStyle=new t.style.Style({stroke:new t.style.Stroke({color:"rgba(255,102,0,0.9)",width:12})}),this._currentRouteInformations=null,this._resources={},this._noRightManagement=!1,this._checkRightsManagement()},u.prototype._checkInputOptions=function(t){if(t.graphs)if(Array.isArray(t.graphs))if(0===t.graphs.length)t.graphs=null;else for(var e=0;e<t.graphs.length;e++)"string"!=typeof t.graphs[e]?(console.log("[ol.control.Route] ERROR : parameter 'graphs' elements should be of type 'string'"),t.graphs=null):("pieton"===t.graphs[e].toLowerCase()&&(t.graphs[e]="Pieton"),"voiture"===t.graphs[e].toLowerCase()&&(t.graphs[e]="Voiture"));else t.graphs=null;"true"===t.collapsed&&(t.collapsed=!0),"false"===t.collapsed&&(t.collapsed=!1)},u.prototype._checkRightsManagement=function(){var t=null,e=[],o=null;o=this.options.routeOptions.apiKey,t=this.options.routeOptions.filterOptions,e=t?t.type:[],e&&0!==e.length||(e=["Voiture","Pieton"]);var n=i.check({key:o||this.options.apiKey,resources:e,services:["Itineraire"]});o=this.options.autocompleteOptions.apiKey,t=this.options.autocompleteOptions.filterOptions,e=t?t.type:[],e&&0!==e.length||(e=["PositionOfInterest","StreetAddress"]);var s=i.check({key:o||this.options.apiKey,resources:e,services:["AutoCompletion"]});n||s||(this._noRightManagement=!0),s&&(this._resources.AutoCompletion={},this._resources.AutoCompletion.resources=s.AutoCompletion,this._resources.AutoCompletion.key=s.key),n&&(this._resources.Itineraire={},this._resources.Itineraire.resources=n.Itineraire,this._resources.Itineraire.key=n.key)},u.prototype._initContainer=function(t){var e=this._container,o=this._showRouteContainer=this._createShowRouteElement();e.appendChild(o),this.collapsed||(o.checked=!0);var n=this._createShowRoutePictoElement();e.appendChild(n);var i=this._createRoutePanelElement(),s=this._createRoutePanelHeaderElement();i.appendChild(s);for(var r=this._formRouteContainer=this._createRoutePanelFormElement(),a=this._createRoutePanelFormPointsElement(t),l=0;l<a.length;l++)r.appendChild(a[l]);var c=this._createRoutePanelFormModeChoiceElement();c.appendChild(this._createRoutePanelFormModeChoiceTransportElement(this.options.graphs)),c.appendChild(this._createRoutePanelFormModeChoiceComputeElement()),r.appendChild(c),r.appendChild(this._createShowRouteExclusionsElement()),this._showRouteExclusionsElement=this._createShowRouteExclusionsPictoElement(),r.appendChild(this._showRouteExclusionsElement);var u=this._createRoutePanelFormExclusionsElement();u.appendChild(this._createRoutePanelFormExclusionOptionsElement(this.options.exclusions)),r.appendChild(u);var h=this._createRouteFormResetElement();r.appendChild(h);var d=this._createRouteSubmitFormElement();r.appendChild(d),i.appendChild(r);var p=this._resultsRouteContainer=this._createRoutePanelResultsElement();i.appendChild(p);var m=this._waitingContainer=this._createRouteWaitingElement();i.appendChild(m),e.appendChild(i);var f=this;return e.addEventListener&&e.addEventListener("click",function(t){f._hideRouteSuggestedLocations.call(f,t)}),e},u.prototype._initTransport=function(){this._currentTransport="Voiture";var t=this.options.graphs;t&&0!==t.length||(this.options.graphs=["Voiture","Pieton"]),Array.isArray(t)&&t.length&&("Voiture"!==t[0]&&"Pieton"!==t[0]||(this._currentTransport=t[0]));var e=this.options.routeOptions;e.graph&&(this._currentTransport=e.graph)},u.prototype._initComputation=function(){this._currentComputation="fastest";var t=this.options.routeOptions;t.routePreference&&(this._currentComputation=t.routePreference)},u.prototype._initExclusions=function(){this._currentExclusions=[];var t=this.options.exclusions;if((!t||"object"==typeof t&&0===Object.keys(t).length)&&(this.options.exclusions={toll:!1,tunnel:!1,bridge:!1}),t&&"object"==typeof t&&Object.keys(t).length)for(var e in t)t.hasOwnProperty(e)&&t[e]&&this._currentExclusions.push(e);var o=this.options.routeOptions;Array.isArray(o.exclusions)&&(this._currentExclusions=o.exclusions)},u.prototype._initPopupDiv=function(){var t=this,e=document.createElement("div");e.className="gp-feature-info-div";var o=document.createElement("input");return o.type="button",o.className="gp-styling-button closer",o.onclick=function(){return null!=t._popupOverlay&&t._popupOverlay.setPosition(void 0),!1},this._popupContent=document.createElement("div"),this._popupContent.className="gp-features-content-div",e.appendChild(this._popupContent),e.appendChild(o),e},u.prototype._createRoutePanelFormPointsElement=function(t){var e=[],o=1,n=new r({apiKey:this.options.apiKey||null,tag:{id:o,groupId:this._uid,markerOpts:this.options.markersOpts.departure,label:"Départ",display:!0},autocompleteOptions:this.options.autocompleteOptions||null});for(n.setMap(t),this._addFormPointsEventListeners(n),e.push(n._container),this._currentPoints.push(n),o=2;o<7;o++){var i=new r({apiKey:this.options.apiKey||null,tag:{id:o,groupId:this._uid,label:"Etape",markerOpts:this.options.markersOpts.stages,display:!1,removeOption:!0},autocompleteOptions:this.options.autocompleteOptions||null});i.setMap(t),this._addFormPointsEventListeners(i),e.push(i._container),this._currentPoints.push(i)}var s=new r({apiKey:this.options.apiKey||null,tag:{id:o,groupId:this._uid,markerOpts:this.options.markersOpts.arrival,label:"Arrivée",display:!0,addOption:!0},autocompleteOptions:this.options.autocompleteOptions||null});return s.setMap(t),this._addFormPointsEventListeners(s),e.push(s._container),this._currentPoints.push(s),e},u.prototype._addFormPointsEventListeners=function(t){if(t){var e=this;t._inputLabelContainer.addEventListener?(t._inputLabelContainer.addEventListener("click",function(){e.onRouteOriginLabelClick.call(this,e)}),t._inputShowPointer.addEventListener("click",function(){e.onRouteOriginPointerClick.call(this,e,t)}),t._removePointElement&&t._removePointElement.addEventListener("click",function(){var t=e._showRouteExclusionsElement.style.top;e._showRouteExclusionsElement.style.top=(parseInt(t,10)-33).toString()+"px"}),t._addPointElement&&t._addPointElement.addEventListener("click",function(){var t=e._showRouteExclusionsElement.style.top;e._showRouteExclusionsElement.style.top=(parseInt(t,10)+33).toString()+"px"})):t._inputLabelContainer.attachEvent&&(t._inputLabelContainer.attachEvent("onclick",function(){e.onRouteOriginLabelClick.call(this,e)}),t._inputShowPointer.attachEvent("onclick",function(){e.onRouteOriginPointerClick.call(this,e,t)}),t._removePointElement&&t._removePointElement.attachEvent("onclick",function(){var t=e._showRouteExclusionsElement.style.top;e._showRouteExclusionsElement.style.top=(parseInt(t,10)-33).toString()+"px"}),t._addPointElement&&t._addPointElement.attachEvent("onclick",function(){var t=e._showRouteExclusionsElement.style.top;e._showRouteExclusionsElement.style.top=(parseInt(t,10)+33).toString()+"px"}))}},u.prototype.onRouteComputationSubmit=function(t){var e,o=this._currentPoints;if(o[0]&&o[0].getCoordinate){var n=o[0].getCoordinate();e={x:n[0],y:n[1]}}var i,s=o[o.length-1];if(s&&s.getCoordinate){var r=s.getCoordinate();i={x:r[0],y:r[1]}}for(var a=[],l=1;l<o.length-1;l++)if(o[l]&&o[l].getCoordinate){var c=o[l].getCoordinate();if(c){var u={x:c[0],y:c[1]};a.push(u)}}if(!this._noRightManagement){this._currentTransport=t.transport,this._currentComputation=t.computation,this._currentExclusions=t.exclusions;var h=this.options.routeOptions,d=h.protocol||"XHR",p=h.timeOut||0;"JSONP"===d&&0===p&&(p=15e3);var m=this;this._requestRouting({startPoint:e,endPoint:i,viaPoints:a,graph:h.graph||this._currentTransport,routePreference:h.routePreference||this._currentComputation,exclusions:h.exclusions||this._currentExclusions,geometryInInstructions:!0,distanceUnit:"m",timeOut:p,protocol:d,onSuccess:function(t){t&&m._fillRouteResultsDetails(t)},onFailure:function(t){m._hideWaitingContainer(),m._clearRouteResultsDetails()}})}},u.prototype.onRouteOriginLabelClick=function(t){var e=t.getMap();t._formRouteContainer.className="",e.un("click",function(){"GProuteFormMini"===t._formRouteContainer.className&&(t._formRouteContainer.className="")})},u.prototype.onRouteOriginPointerClick=function(t,e){var o=t.getMap();e._inputShowPointerContainer.checked?(t._formRouteContainer.className="GProuteFormMini",o.on("click",function(){"GProuteFormMini"===t._formRouteContainer.className&&(t._formRouteContainer.className="")})):(t._formRouteContainer.className="",o.un("click",function(){"GProuteFormMini"===t._formRouteContainer.className&&(t._formRouteContainer.className="")}))},u.prototype.onShowRoutePanelClick=function(){this._geojsonSections||this._waiting||this._clear(),this.collapsed=document.getElementById("GPshowRoute-"+this._uid).checked,this.dispatchEvent("change:collapsed")},u.prototype.onRouteModeComputationChange=function(t){var e=t.target.selectedIndex,o=t.target.options[e].value;o&&(this._currentComputation=o)},u.prototype.onRouteModeComputationChangeAndRun=function(t){this.onRouteModeComputationChange(t),this._clearRouteResultsDetails(),this._clearRouteResultsGeometry(),this._clearRouteResultsFeatureGeometry(),this.onRouteComputationSubmit({computation:this._currentComputation,transport:this._currentTransport,exclusions:this._currentExclusions})},u.prototype.onRouteModeTransportChange=function(t){var e=t.target.value;e&&(this._currentTransport=e)},u.prototype.onShowRouteExclusionsClick=function(t){},u.prototype.onRouteExclusionsChange=function(t){var e=t.target.value,o=t.target.checked;if(e&&"string"==typeof e){e=e.toLowerCase();for(var n=!1,i=null,s=0;s<this._currentExclusions.length;s++)this._currentExclusions[s]===e&&(i=s,n=!0);n||o||this._currentExclusions.push(e),n&&o&&this._currentExclusions.splice(i,1)}},u.prototype.onRouteResetClick=function(){for(var t=this._currentPoints,e=0;e<t.length;e++)t[e].clear();this._clear(),this._clearRouteInputOptions()},u.prototype.onShowRouteResultsNewClick=function(){this._clearRouteResultsDetails(),this._clearRouteResultsGeometry(),this._clearRouteResultsFeatureGeometry()},u.prototype.onRouteResultsDetailsMouseOver=function(t){var e=t.target.id,o=e.substring(e.indexOf("_")+1);if(t.target.classList&&t.target.classList.add("GProuteResultsDetailsInstructionHighlight"),this._geojsonSections){var n=this._geojsonSections.getSource().getFeatureById(parseInt(o,10));n.setStyle(this._selectedFeatureStyle)}},u.prototype.onRouteResultsDetailsMouseOut=function(t){var e=t.target.id,o=e.substring(e.indexOf("_")+1);if(t.target.classList&&t.target.classList.remove("GProuteResultsDetailsInstructionHighlight"),this._geojsonSections){var n=this._geojsonSections.getSource().getFeatureById(parseInt(o,10));n.setStyle(null)}},u.prototype._requestRouting=function(t){if(t&&("object"!=typeof t||0!==Object.keys(t).length)&&t.startPoint&&t.endPoint&&!this._noRightManagement&&this._resources.Itineraire){var o=this._resources.Itineraire.resources;if(o&&("object"!=typeof o||0!==Object.keys(o).length)){for(var n=this._resources.Itineraire.key,i=!1,s=0;s<o.length;s++)o[s]===t.graph&&(i=!0);if(!i)return void console.log("no rights for this service !?");t.apiKey=this.options.routeOptions.apiKey||this.options.apiKey||n,this._displayWaitingContainer(),e.Services.route(t)}}},u.prototype._fillRouteResultsDetails=function(e){var o=e.totalDistance,n=e.totalTime,i=this._simplifiedInstructions(e.routeInstructions);i&&this._fillRouteResultsDetailsContainer(o,n,i);var s=e.routeGeometry;s&&this._fillRouteResultsDetailsGeometry(s,this._defaultFeatureStyle),i&&i[0].geometry&&this._fillRouteResultsDetailsFeatureGeometry(i,this._defaultFeatureStyle);var r=e.bbox;if(r){var a=this.getMap(),l=[r.left,r.bottom,r.right,r.top],c=a.getView().getProjection().getCode();"EPSG:4326"!==c&&(l=t.proj.transformExtent(l,"EPSG:4326",c)),a.getView().fit(l,a.getSize())}this._currentRouteInformations=e,this._formRouteContainer.className="GProuteComponentHidden",this._hideWaitingContainer(),this._resultsRouteContainer.className=""},u.prototype._fillRouteResultsDetailsContainer=function(t,e,o){this._resultsRouteValuesContainer=this._addRouteResultsValuesElement(t,e,this._convertSecondsToTime),this._resultsRouteDetailsContainer=this._addRouteResultsDetailsElement(o,this._convertSecondsToTime)},u.prototype._fillRouteResultsDetailsGeometry=function(e,o){this._clearRouteResultsGeometry();var n=this.getMap();if(e){var i={type:"Feature",crs:{type:"name",properties:{name:"EPSG:4326"}},geometry:e},s=new t.format.GeoJSON({defaultDataProjection:"EPSG:4326"}),r=s.readFeatures(i,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});this._geojsonRoute=new t.layer.Vector({source:new t.source.Vector({features:r}),style:o}),n.addLayer(this._geojsonRoute)}},u.prototype._fillRouteResultsDetailsFeatureGeometry=function(e,o){this._clearRouteResultsFeatureGeometry();for(var n=this.getMap(),i={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[]},s=0;s<e.length;s++){for(var r=e[s],l=s+1,c=r.geometry.coordinates,u=0;u<c.length;u++)"string"==typeof c[u][0]&&(c[u][0]=parseFloat(c[u][0]),c[u][1]=parseFloat(c[u][1]));i.features.push({type:"Feature",geometry:r.geometry,properties:{popupContent:"("+l+") distance : "+this._convertDistance(r.distance)+" / temps : "+this._convertSecondsToTime(r.duration)},id:l})}var h=new t.format.GeoJSON({defaultDataProjection:"EPSG:4326"}),d=this.getMap().getView().getProjection().getCode(),p=h.readFeatures(i,{dataProjection:"EPSG:4326",featureProjection:d});this._geojsonSections=new t.layer.Vector({source:new t.source.Vector({features:p}),style:o,opacity:.9});var m;"Pieton"===this._currentTransport?(m="piéton",this._geojsonSections.gpResultLayerId="Pieton$OGC:OPENLS;Itineraire"):(m="voiture",this._geojsonSections.gpResultLayerId="Voiture$OGC:OPENLS;Itineraire"),n.addLayer(this._geojsonSections),n.getControls().forEach(function(t){if(t instanceof a){var e=this._geojsonSections.gpLayerId;t._layers[e].title===e&&t.addLayer(this._geojsonSections,{title:" Itinéraire "+m,description:" Itinéraire basé sur un graphe "+m})}},this),this._resultsHoverInteraction=new t.interaction.Select({condition:t.events.condition.pointerMove,layers:[this._geojsonSections],style:this._selectedFeatureStyle}),this._resultsHoverInteraction.on("select",this._onResultsFeatureMouseOver,this),n.addInteraction(this._resultsHoverInteraction),this._resultsSelectInteraction=new t.interaction.Select({layers:[this._geojsonSections],style:this._selectedFeatureStyle}),this._resultsSelectInteraction.on("select",this._onResultsFeatureSelect,this),n.addInteraction(this._resultsSelectInteraction)},u.prototype._onResultsFeatureMouseOver=function(t){if(0!==t.selected.length){var e=t.selected[0],o=document.getElementById("GProuteResultsDetailsInstruction_"+e.getId()+"-"+this._uid);o&&o.classList&&o.classList.add("GProuteResultsDetailsInstructionHighlight")}if(0!==t.deselected.length){var n=t.deselected[0],i=document.getElementById("GProuteResultsDetailsInstruction_"+n.getId()+"-"+this._uid);i&&i.classList&&i.classList.remove("GProuteResultsDetailsInstructionHighlight")}},u.prototype._onResultsFeatureSelect=function(e){var o=this.getMap();if(0!==e.selected.length){var n=e.selected[0];this._popupContent.innerHTML=n.getProperties().popupContent,this._popupOverlay?this._popupOverlay.setPosition(e.mapBrowserEvent.coordinate):(this._popupOverlay=new t.Overlay({element:this._popupDiv,positioning:"bottom-center",position:e.mapBrowserEvent.coordinate}),o.addOverlay(this._popupOverlay))}else null!=this._popupOverlay&&this._popupOverlay.setPosition(void 0)},u.prototype._clear=function(){this._currentTransport=null,this._currentExclusions=[],this._currentComputation=null,this._clearRouteResultsDetails(),this._clearRouteResultsGeometry(),this._clearRouteResultsFeatureGeometry();for(var t=0;t<this._currentPoints.length;t++)this._currentPoints[t].clear();this._removeRouteStepLocations()},u.prototype._clearRouteInputOptions=function(){this._initTransport(),this._initComputation(),this._initExclusions();var t;"Pieton"===this._currentTransport?(t=document.getElementById("GProuteTransportPedestrian-"+this._uid),t&&(t.checked="true")):(t=document.getElementById("GProuteTransportCar-"+this._uid),t&&(t.checked="true"));var e=document.getElementById("GProuteComputationSelect-"+this._uid);e&&(e.value=this._currentComputation);var o=document.getElementById("GProuteExclusionsToll-"+this._uid);o&&(this._currentExclusions.indexOf("toll")!==-1?o.checked=!1:o.checked=!0);var n=document.getElementById("GProuteExclusionsTunnel-"+this._uid);n&&(this._currentExclusions.indexOf("tunnel")!==-1?n.checked=!1:n.checked=!0);var i=document.getElementById("GProuteExclusionsBridge-"+this._uid);i&&(this._currentExclusions.indexOf("bridge")!==-1&&i?i.checked=!1:i.checked=!0)},u.prototype._removeRouteStepLocations=function(){var t=document.querySelectorAll('div[id^="GPlocationPoint"]'),e=0;if(0!==t.length)for(var o=1;o<t.length-1;o++){var n=t[o].classList;if(0!==n.length)for(var i=0;i<n.length;i++)"GPlocationStageFlexInput"===n[i]&&(document.getElementById(this._addUID("GPlocationStageRemove_"+(o+1))).click(),e+=1)}},u.prototype._clearRouteResultsDetails=function(){if(this._currentRouteInformations=null,this._resultsRouteDetailsContainer){var t=this._resultsRouteDetailsContainer;if(t.childElementCount)for(;t.firstChild;)t.removeChild(t.firstChild)}if(this._resultsRouteValuesContainer){var e=this._resultsRouteValuesContainer;if(e.childElementCount)for(;e.firstChild;)e.removeChild(e.firstChild)}},u.prototype._clearRouteResultsGeometry=function(){var t=this.getMap();null!=this._geojsonRoute&&(t.removeLayer(this._geojsonRoute),this._geojsonRoute=null)},u.prototype._clearRouteResultsFeatureGeometry=function(){var t=this.getMap();null!=this._geojsonSections&&(t.removeLayer(this._geojsonSections),this._geojsonSections=null),null!=this._popupOverlay&&(t.removeOverlay(this._popupOverlay),this._popupOverlay=null),null!=this._resultsSelectInteraction&&(t.removeInteraction(this._resultsSelectInteraction),this._resultsSelectInteraction=null),null!=this._resultsHoverInteraction&&(t.removeInteraction(this._resultsHoverInteraction),this._resultsHoverInteraction=null)},u.prototype._hideRouteSuggestedLocations=function(t){if(t.target&&t.target.id&&t.target.id.indexOf("GPlocationOrigin_")!==-1)for(var e=parseInt(t.target.id.split("_")[1][0],10)-1,o=0;o<this._currentPoints.length;o++)o!==parseInt(e,10)&&this._currentPoints[o]._hideSuggestedLocation();else for(var n=0;n<this._currentPoints.length;n++)this._currentPoints[n]._hideSuggestedLocation()},u.prototype._displayWaitingContainer=function(){this._waitingContainer.className="GProuteCalcWaitingContainerVisible",this._waiting=!0;var t=this.options.routeOptions;if(t&&t.timeOut){this._timer&&(clearTimeout(this._timer),this._timer=null);var e=this;this._timer=setTimeout(function(){e._waiting===!0?e._hideWaitingContainer():e._timer&&clearTimeout(e._timer)},16e3)}},u.prototype._hideWaitingContainer=function(){if(this._waiting){this._waitingContainer.className="GProuteCalcWaitingContainerHidden",this._waiting=!1;var t=this.options.routeOptions;t&&t.timeOut&&(clearTimeout(this._timer),this._timer=null)}},u.prototype._simplifiedInstructions=function(t){for(var e=[],o=t[0],n=1;n<t.length;n++){var i=t[n];if(i.instruction===o.instruction){o.distance=(parseFloat(i.distance)+parseFloat(o.distance)).toString(),o.duration=(parseFloat(i.duration)+parseFloat(o.duration)).toString();for(var s=1;s<i.geometry.coordinates.length;s++)o.geometry.coordinates.push(i.geometry.coordinates[s])}else e.push(o),o=i,n===t.length-1&&(e.push(i),o=null)}return e},u.prototype._convertSecondsToTime=function(t){var e="";t=Math.round(t);var o=Math.floor(t/3600),n=t%3600,i=Math.floor(n/60);return o&&(e=o+"h "),e+=i+" min"},u.prototype._convertDistance=function(t){var e="",o=parseInt(t/1e3,10);return e=o?o+" km":parseInt(t,10)+" m"},u}(ol,gp,Ol3Utils,{},CommonUtilsCheckRightManagement,CommonUtilsSelectorID,Ol3ControlsLocationSelector,Ol3ControlsLayerSwitcher,Ol3ControlsUtilsMarkers,CommonControlsRouteDOM),CommonControlsIsoDOM=function(){var t={_addUID:function(t){return t+"-"+this._uid},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPisochron"),t.className="GPwidget",t},_createShowIsoElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowIsochron"),t.type="checkbox",t},_createShowIsoPictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowIsochronPicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowIsochron"),e.title="Calculer une isochrone",e.addEventListener?e.addEventListener("click",function(e){t.onShowIsoPanelClick(e)}):e.attachEvent&&e.attachEvent("onclick",function(e){t.onShowIsoPanelClick(e)});var o=document.createElement("span");return o.id=this._addUID("GPshowIsochronOpen"),o.className="GPshowAdvancedToolOpen",e.appendChild(o),e},_createIsoPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPisochronPanel"),t.className="GPpanel",t},_createIsoPanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var o=document.createElement("div");o.className="GPpanelTitle",o.innerHTML="Calcul d'isochrone",e.appendChild(o);var n=document.createElement("div");return n.id=this._addUID("GPisochronPanelClose"),n.className="GPpanelClose",n.title="Fermer le panneau",n.addEventListener?n.addEventListener("click",function(){document.getElementById(t._addUID("GPshowIsochronPicto")).click()},!1):n.attachEvent&&n.attachEvent("onclick",function(){document.getElementById(t._addUID("GPshowIsochronPicto")).click()}),e.appendChild(n),e},_createIsoPanelFormElement:function(){var t=this,e=document.createElement("form");return e.id=this._addUID("GPisochronForm"),e.addEventListener("submit",function(e){return e.preventDefault(),t.onIsoComputationSubmit(e),!1}),e},_createIsoWaitingElement:function(){var t=document.createElement("div");t.id=this._addUID("GPisochronCalcWaitingContainer"),t.className="GPisochronCalcWaitingContainerHidden";var e=document.createElement("p");return e.className="GPisochronCalcWaiting",e.innerHTML="Calcul en cours...",t.appendChild(e),t},_createIsoPanelFormTypeChoiceElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPisochronChoice"),t},_createIsoPanelFormTypeChoiceChronElement:function(t){var e=this,o=document.createElement("div");o.className="GPisochronChoiceAlt";var n=document.createElement("input");n.id=this._addUID("GPisochronChoiceAltChron"),n.name="GPisochronChoiceMode",n.type="radio",n.checked=!!t,n.addEventListener?n.addEventListener("change",function(t){document.getElementById(e._addUID("GPisochronValueChron")).className="GPflexInput",document.getElementById(e._addUID("GPisochronValueDist")).className="GPisochronValueHidden",e.onIsoTypeChoiceChange(t)},!1):n.attachEvent&&n.attachEvent("onchange",function(){document.getElementById(e._addUID("GPisochronValueChron")).className="GPflexInput",document.getElementById(e._addUID("GPisochronValueDist")).className="GPisochronValueHidden",e.onIsoTypeChoiceChange()}),n.value="isochron",o.appendChild(n);var i=document.createElement("label");i.className="GPisochronChoiceAltImg",i.htmlFor=this._addUID("GPisochronChoiceAltChron"),o.appendChild(i);var s=document.createElement("span");
  return s.id=this._addUID("GPisochronChoiceAltChronTxt"),s.innerHTML="isochrone",s.addEventListener?s.addEventListener("click",function(){document.getElementById(e._addUID("GPisochronChoiceAltChron")).click()},!1):s.attachEvent&&s.attachEvent("onclick",function(){document.getElementById(e._addUID("GPisochronChoiceAltChron")).click()}),o.appendChild(s),o},_createIsoPanelFormTypeChoiceDistElement:function(t){var e=this,o=document.createElement("div");o.className="GPisochronChoiceAlt";var n=document.createElement("input");n.id=this._addUID("GPisochronChoiceAltDist"),n.name="GPisochronChoiceMode",n.type="radio",n.checked=!!t,n.addEventListener?n.addEventListener("change",function(t){document.getElementById(e._addUID("GPisochronValueDist")).className="GPflexInput",document.getElementById(e._addUID("GPisochronValueChron")).className="GPisochronValueHidden",e.onIsoTypeChoiceChange(t)},!1):n.attachEvent&&n.attachEvent("onchange",function(){document.getElementById(e._addUID("GPisochronValueDist")).className="GPflexInput",document.getElementById(e._addUID("GPisochronValueChron")).className="GPisochronValueHidden",e.onIsoTypeChoiceChange()}),n.value="isodistance",o.appendChild(n);var i=document.createElement("label");i.className="GPisochronChoiceAltImg",i.htmlFor=this._addUID("GPisochronChoiceAltDist"),o.appendChild(i);var s=document.createElement("span");return s.id=this._addUID("GPisochronChoiceAltDistTxt"),s.innerHTML="isodistance",s.addEventListener?s.addEventListener("click",function(){document.getElementById(e._addUID("GPisochronChoiceAltDist")).click()},!1):s.attachEvent&&s.attachEvent("onclick",function(){document.getElementById(e._addUID("GPisochronChoiceAltDist")).click()}),o.appendChild(s),o},_createIsoPanelFormValueIsochronElement:function(t){var e=this,o=document.createElement("div");o.id=this._addUID("GPisochronValueChron"),o.className=t?"GPflexInput":"GPisochronValueHidden";var n=document.createElement("label");n.id=this._addUID("GPisochronValueChronLabel"),n.htmlFor=this._addUID("GPisochronValueChronInput"),n.innerHTML="Temps",o.appendChild(n);var i=document.createElement("input");i.id=this._addUID("GPisochronValueChronInput1"),i.min="0",i.step="1",i.value="0",i.type="number",i.addEventListener?i.addEventListener("change",function(t){"function"==typeof e.onIsoValueChronTimeMinuteChange&&e.onIsoValueChronTimeHourChange(t)}):i.attachEvent&&i.attachEvent("onchange",function(t){"function"==typeof e.onIsoValueChronTimeMinuteChange&&e.onIsoValueChronTimeHourChange(t)}),o.appendChild(i);var s=document.createElement("label");s.innerHTML="h",o.appendChild(s);var r=document.createElement("input");r.id=this._addUID("GPisochronValueChronInput2"),r.min="0",r.max="59",r.step="1",r.value="0",r.type="number",r.addEventListener?r.addEventListener("change",function(t){"function"==typeof e.onIsoValueChronTimeMinuteChange&&e.onIsoValueChronTimeMinuteChange(t)}):r.attachEvent&&r.attachEvent("onchange",function(t){"function"==typeof e.onIsoValueChronTimeMinuteChange&&e.onIsoValueChronTimeMinuteChange(t)}),o.appendChild(r);var a=document.createElement("label");return a.innerHTML="min",o.appendChild(a),o},_createIsoPanelFormValueIsodistanceElement:function(t){var e=this,o=document.createElement("div");o.id=this._addUID("GPisochronValueDist"),o.className=t?"GPflexInput":"GPisochronValueHidden";var n=document.createElement("label");n.id=this._addUID("GPisochronValueDistLabel"),n.htmlFor=this._addUID("GPisochronValueDistInput"),n.innerHTML="Distance",o.appendChild(n);var i=document.createElement("input");i.id=this._addUID("GPisochronValueDistInput"),i.min="0",i.step="any",i.value="0",i.type="number",i.addEventListener?i.addEventListener("change",function(t){"function"==typeof e.onIsoValueDistChange&&e.onIsoValueDistChange(t)}):i.attachEvent&&i.attachEvent("onchange",function(t){"function"==typeof e.onIsoValueDistChange&&e.onIsoValueDistChange(t)}),o.appendChild(i);var s=document.createElement("label");return s.innerHTML="km",o.appendChild(s),o},_createIsoPanelFormModeChoiceElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPisochronModeChoice"),t},_createIsoPanelFormModeChoiceTransportElement:function(t){var e=this,o=document.createElement("div");o.id=this._addUID("GPisochronTransportChoice");var n=document.createElement("span");n.className="GPisochronModeLabel",n.innerHTML="Mode de transport",o.appendChild(n);for(var i=0;i<t.length;i++){var s=t[i];if("Voiture"===s){var r=document.createElement("input");r.id=this._addUID("GPisochronTransportCar"),r.type="radio",r.name="GPisochronTransport",0===i&&(r.checked=!0),r.addEventListener?r.addEventListener("change",function(t){e.onIsoModeTransportChange(t)}):r.attachEvent&&r.attachEvent("onchange",function(t){e.onIsoModeTransportChange(t)}),r.value="Voiture",o.appendChild(r);var a=document.createElement("label");a.className="GPisochronTransportImg",a.htmlFor=this._addUID("GPisochronTransportCar"),a.title="Voiture",o.appendChild(a)}if("Pieton"===s){var l=document.createElement("input");l.id=this._addUID("GPisochronTransportPedestrian"),l.type="radio",l.name="GPisochronTransport",0===i&&(l.checked=!0),l.addEventListener?l.addEventListener("change",function(t){e.onIsoModeTransportChange(t)}):l.attachEvent&&l.attachEvent("onchange",function(t){e.onIsoModeTransportChange(t)}),l.value="Pieton",o.appendChild(l);var c=document.createElement("label");c.className="GPisochronTransportImg",c.htmlFor=this._addUID("GPisochronTransportPedestrian"),c.title="Piéton",o.appendChild(c)}}return o},_createIsoPanelFormModeChoiceDirectionElement:function(t){var e=this,o=document.createElement("div");o.id=this._addUID("GPisochronDirectionChoice");var n=document.createElement("span");n.className="GPisochronModeLabel",n.innerHTML="Sens de parcours",o.appendChild(n);var i=document.createElement("select");i.id=this._addUID("GPisochronDirectionSelect"),i.className="GPinputSelect",i.addEventListener("change",function(t){e.onIsoModeDirectionChange(t)});for(var s=0;s<t.length;s++){var r=t[s];if("departure"===r.toLowerCase()){var a=document.createElement("option");0===s&&(a.selected="selected"),a.value="departure",a.text="Départ",i.appendChild(a)}if("arrival"===r.toLowerCase()){var l=document.createElement("option");0===s&&(l.selected="selected"),l.value="arrival",l.text="Arrivée",i.appendChild(l)}}return o.appendChild(i),o},_createShowIsoExclusionsElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowIsoExclusions"),t.type="checkbox",t},_createShowIsoExclusionsPictoElement:function(){var t=document.createElement("label");return t.id=this._addUID("GPshowIsoExclusionsPicto"),t.className="GPshowMoreOptions GPshowIsoExclusionsPicto",t.htmlFor=this._addUID("GPshowIsoExclusions"),t.title="Exclusions",t.style.top="240px",t},_createIsoPanelFormExclusionsElement:function(){var t=document.createElement("div");t.id=this._addUID("GPisoExclusions");var e=document.createElement("span");return e.className="GPisoExclusionsLabel",e.innerHTML="Passages autorisés",t.appendChild(e),t},_createIsoPanelFormExclusionOptionsElement:function(t){var e=this,o=document.createElement("div");o.className="GPisoExclusionsOptions";for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];switch(n){case"toll":var s=document.createElement("input");s.id=this._addUID("GPisoExclusionsToll"),s.type="checkbox",s.checked=!i,s.addEventListener?s.addEventListener("change",function(t){e.onIsoExclusionsChange(t)}):s.attachEvent&&s.attachEvent("onchange",function(t){e.onIsoExclusionsChange(t)}),s.value="Toll",o.appendChild(s);var r=document.createElement("label");r.className="GPisoExclusionsOption",r.htmlFor=this._addUID("GPisoExclusionsToll"),r.innerHTML="Péages",o.appendChild(r);break;case"tunnel":var a=document.createElement("input");a.id=this._addUID("GPisoExclusionsTunnel"),a.type="checkbox",a.checked=!i,a.addEventListener?a.addEventListener("change",function(t){e.onIsoExclusionsChange(t)}):a.attachEvent&&a.attachEvent("onchange",function(t){e.onIsoExclusionsChange(t)}),a.value="Tunnel",o.appendChild(a);var l=document.createElement("label");l.className="GPisoExclusionsOption",l.htmlFor=this._addUID("GPisoExclusionsTunnel"),l.innerHTML="Tunnels",o.appendChild(l);break;case"bridge":var c=document.createElement("input");c.id=this._addUID("GPisoExclusionsBridge"),c.type="checkbox",c.checked=!i,c.addEventListener?c.addEventListener("change",function(t){e.onIsoExclusionsChange(t)}):c.attachEvent&&c.attachEvent("onchange",function(t){e.onIsoExclusionsChange(t)}),c.value="Bridge",o.appendChild(c);var u=document.createElement("label");u.className="GPisoExclusionsOption",u.htmlFor=this._addUID("GPisoExclusionsBridge"),u.innerHTML="Ponts",o.appendChild(u)}}return o},_createIsoSubmitFormElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPisochronSubmit"),t.className="GPinputSubmit",t.type="submit",t.value="Calculer",t},_createIsoFormResetElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPisochronReset"),e.title="Réinitialiser les paramètres",e.addEventListener("click",function(e){t.onIsoResetClick(e)}),e}};return t}(),Ol3ControlsIsocurve=function(t,e,o,n,i,s,r,a,l,c){function u(e){if(e=e||{},!(this instanceof u))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this.initialize(e),this._container=this._createMainContainerElement(),this._containerElement=null,e.element&&e.element.appendChild&&(e.element.appendChild(this._container),this._containerElement=e.element),t.control.Control.call(this,{element:this._containerElement||this._container,target:e.target,render:e.render})}return t.inherits(u,t.control.Control),u.prototype=Object.create(t.control.Control.prototype,{}),o.assign(u.prototype,c),u.prototype.constructor=u,u.prototype.getCollapsed=function(){return this.collapsed},u.prototype.setCollapsed=function(t){return void 0===t?void console.log("[ERROR] Isocurve:setCollapsed - missing collapsed parameter"):void(t&&this.collapsed||!t&&!this.collapsed||(t?document.getElementById("GPisochronPanelClose-"+this._uid).click():document.getElementById("GPshowIsochronPicto-"+this._uid).click(),this.collapsed=t))},u.prototype.getLayer=function(){return this._geojsonLayer},u.prototype.setMap=function(e){e&&(this._container=this._initContainer(e)),t.control.Control.prototype.setMap.call(this,e)},u.prototype.initialize=function(e){this._checkInputOptions(e),this.options={collapsed:!0,methods:["time","distance"],graphs:["Voiture","Pieton"],exclusions:{toll:!1,tunnel:!1,bridge:!1},directions:["departure","arrival"],markerOpts:{url:l.lightOrange,offset:l.defaultOffset},isocurveOptions:{},autocompleteOptions:{}},o.assign(this.options,e),this.collapsed=this.options.collapsed,this._uid=s.generate(),this._currentTransport=null,this._initTransport(),this._currentComputation=null,this._initComputation(),this._currentExclusions=[],this._initExclusions(),this._currentDirection=null,this._initDirection(),this._originPoint=null,this._showIsoContainer=null,this._waitingContainer=null,this._formContainer=null,this._currentIsoResults=null,this._geojsonLayer,this._waiting=!1,this._timer=null,this._defaultFeatureStyle=new t.style.Style({fill:new t.style.Fill({color:"rgba(0, 183, 152, 0.7)"})}),this._resources={},this._noRightManagement=!1,this._checkRightsManagement()},u.prototype._checkInputOptions=function(t){var e;if(t.methods)if(Array.isArray(t.methods))if(0===t.methods.length)t.methods=null;else for(e=0;e<t.methods.length;e++)"string"!=typeof t.methods[e]&&console.log("[ol.control.Isocurve] ERROR : parameter 'methods' elements should be of type 'string'");else t.methods=null;if(t.graphs)if(Array.isArray(t.graphs))if(0===t.graphs.length)t.graphs=null;else for(e=0;e<t.graphs.length;e++)"string"!=typeof t.graphs[e]?console.log("[ol.control.Isocurve] ERROR : parameter 'graphs' elements should be of type 'string'"):("pieton"===t.graphs[e].toLowerCase()&&(t.graphs[e]="Pieton"),"voiture"===t.graphs[e].toLowerCase()&&(t.graphs[e]="Voiture"));else t.graphs=null;if(t.directions)if(Array.isArray(t.directions))if(0===t.directions.length)t.directions=null;else for(e=0;e<t.directions.length;e++)"string"!=typeof t.directions[e]&&console.log("[ol.control.Isocurve] ERROR : parameter 'directions' elements should be of type 'string'");else t.directions=null;"true"===t.collapsed&&(t.collapsed=!0),"false"===t.collapsed&&(t.collapsed=!1)},u.prototype._initTransport=function(){this._currentTransport="Voiture";var t=this.options.graphs;t&&0!==t.length||(this.options.graphs=["Voiture","Pieton"]),Array.isArray(t)&&t.length&&("Voiture"!==t[0]&&"Pieton"!==t[0]||(this._currentTransport=t[0]));var e=this.options.isocurveOptions;e.graph&&(this._currentTransport=e.graph)},u.prototype._initComputation=function(){this._currentComputation="time";var t=this.options.methods;t&&0!==t.length||(this.options.methods=["time","distance"]),Array.isArray(t)&&t.length&&("time"!==t[0]&&"distance"!==t[0]||(this._currentComputation=t[0]));var e=this.options.isocurveOptions;e.method&&(this._currentComputation=e.method),e.time&&(this._currentComputation="time"),e.distance&&(this._currentComputation="distance")},u.prototype._initDirection=function(){this._currentDirection="departure";var t=this.options.directions;t&&0!==t.length||(this.options.directions=["departure","arrival"]),Array.isArray(t)&&t.length&&("departure"!==t[0]&&"arrival"!==t[0]||(this._currentDirection=t[0]));var e=this.options.isocurveOptions;e.reverse||(this._currentDirection="departure"),e.reverse===!0&&(this._currentDirection="arrival",this.options.directions=["arrival","departure"])},u.prototype._initExclusions=function(){this._currentExclusions=[];var t=this.options.exclusions;if((!t||"object"==typeof t&&0===Object.keys(t).length)&&(this.options.exclusions={toll:!1,tunnel:!1,bridge:!1}),t&&"object"==typeof t&&Object.keys(t).length)for(var e in t)t.hasOwnProperty(e)&&t.k&&this._currentExclusions.push(e);var o=this.options.isocurveOptions;Array.isArray(o.exclusions)&&(this._currentExclusions=o.exclusions)},u.prototype._checkRightsManagement=function(){var t=null,e=[],o=null;o=this.options.isocurveOptions.apiKey,t=this.options.isocurveOptions.filterOptions,e=t?t.type:[],e&&0!==e.length||(e=["Voiture","Pieton"]);var n=i.check({key:o||this.options.apiKey,resources:e,services:["Isochrone"]});o=this.options.autocompleteOptions.apiKey,t=this.options.autocompleteOptions.filterOptions,e=t?t.type:[],e&&0!==e.length||(e=["PositionOfInterest","StreetAddress"]);var s=i.check({key:o||this.options.apiKey,resources:e,services:["AutoCompletion"]});n||s||(this._noRightManagement=!0),s&&(this._resources.AutoCompletion={},this._resources.AutoCompletion.resources=s.AutoCompletion,this._resources.AutoCompletion.key=s.key),n&&(this._resources.Isocurve={},this._resources.Isocurve.resources=n.Isochrone,this._resources.Isocurve.key=n.key)},u.prototype._initContainer=function(t){var e=this._container,o=this._showIsoContainer=this._createShowIsoElement();e.appendChild(o),this.collapsed||(o.checked=!0);var n=this._createShowIsoPictoElement();e.appendChild(n);var i=this._createIsoPanelElement(),s=this._createIsoPanelHeaderElement();i.appendChild(s);var r=this._formContainer=this._createIsoPanelFormElement(),a=this._createIsoPanelFormPointElement(t);r.appendChild(a);for(var l=!1,c=!1,u=this._createIsoPanelFormTypeChoiceElement(),h=0;h<this.options.methods.length;h++)"time"===this.options.methods[h]&&(l=0===h,u.appendChild(this._createIsoPanelFormTypeChoiceChronElement(l))),"distance"===this.options.methods[h]&&(c=0===h,u.appendChild(this._createIsoPanelFormTypeChoiceDistElement(c)));r.appendChild(u),r.appendChild(this._createIsoPanelFormValueIsochronElement(l)),r.appendChild(this._createIsoPanelFormValueIsodistanceElement(c));var d=this._createIsoPanelFormModeChoiceElement();if(d.appendChild(this._createIsoPanelFormModeChoiceTransportElement(this.options.graphs)),d.appendChild(this._createIsoPanelFormModeChoiceDirectionElement(this.options.directions)),r.appendChild(d),this.options.exclusions&&"object"==typeof this.options.exclusions&&0!==Object.keys(this.options.exclusions).length){r.appendChild(this._createShowIsoExclusionsElement()),r.appendChild(this._createShowIsoExclusionsPictoElement());var p=this._createIsoPanelFormExclusionsElement();p.appendChild(this._createIsoPanelFormExclusionOptionsElement(this.options.exclusions)),r.appendChild(p)}var m=this._createIsoFormResetElement();r.appendChild(m);var f=this._submitContainer=this._createIsoSubmitFormElement();r.appendChild(f),i.appendChild(r);var g=this._waitingContainer=this._createIsoWaitingElement();i.appendChild(g),e.appendChild(i);var _=this;return e.addEventListener&&e.addEventListener("click",function(t){_._hideIsoSuggestedLocations.call(_,t)}),e},u.prototype._createIsoPanelFormPointElement=function(t){this._originPoint=new r({apiKey:this.options.apiKey||null,tag:{id:1,groupId:this._uid,markerOpts:this.options.markerOpts,label:"Départ",display:!0},autocompleteOptions:this.options.autocompleteOptions||null}),this._originPoint.setMap(t);var e=this;return document.getElementById("GPlocationOriginPointerImg_1-"+this._uid).onclick=function(){e._clearGeojsonLayer();var t=e.getMap();e._originPoint._inputShowPointerContainer.checked?(e._formContainer.className="GPisochronFormMini",t.on("click",function(){e._formContainer.className=""})):(e._formContainer.className="",t.un("click",function(){e._formContainer.className=""}))},document.getElementById("GPlocationOriginLabel_1-"+this._uid).onclick=function(){e._clearGeojsonLayer(),e._formContainer.className="",t.un("click",function(){e._formContainer.className=""})},document.getElementById("GPlocationOrigin_1-"+this._uid).onclick=function(){e._clearGeojsonLayer()},this._originPoint._container},u.prototype.onIsoComputationSubmit=function(){if(!this._originPoint||!this._originPoint.getCoordinate||!this._originPoint.getCoordinate())return void console.log("[Isocurve] Missing position parameter to submit isocurve request");var t,e,o=this._originPoint.getCoordinate(),n={x:o[0],y:o[1]};if("time"===this._currentComputation.toLowerCase()){var i=document.getElementById("GPisochronValueChronInput1-"+this._uid),s=parseInt(i.value,10);isNaN&&isNaN(s)&&(s=0);var r=document.getElementById("GPisochronValueChronInput2-"+this._uid),a=parseInt(r.value,10);isNaN&&isNaN(a)&&(a=0),t=3600*s+60*a}if("distance"===this._currentComputation.toLowerCase()){var l=document.getElementById("GPisochronValueDistInput-"+this._uid);e=1e3*parseFloat(l.value)}if(!t&&!e)return void console.log("[Isocurve] Missing time or distance parameter to submit isocurve request");if(this._noRightManagement)return void console.log("[Isocurve] no rights for this service");var c=this.options.isocurveOptions||{},u=c.protocol||"XHR",h=c.timeOut||0;"JSONP"===u&&0===h&&(h=15e3);var d=this,p={position:n,graph:c.graph||this._currentTransport,exclusions:c.exclusions||this._currentExclusions,method:c.method||this._currentComputation,smoothing:c.smoothing||!0,timeOut:h,protocol:u,onSuccess:function(t){t&&d._drawIsoResults(t)},onFailure:function(t){d._hideWaitingContainer()}};("arrival"===this._currentDirection.toLowerCase()||c.reverse)&&(p.reverse=!0),t&&(p.time=t),e&&(p.distance=e),this._requestIsoCurve(p)},u.prototype.onShowIsoPanelClick=function(){this.collapsed=this._showIsoContainer.checked,this.dispatchEvent("change:collapsed")},u.prototype.onIsoTypeChoiceChange=function(t){var e=t.target.value;e&&("isodistance"===e&&(this._currentComputation="distance"),"isochron"===e&&(this._currentComputation="time"))},u.prototype.onIsoModeTransportChange=function(t){var e=t.target.value;e&&(this._currentTransport=e)},u.prototype.onIsoModeDirectionChange=function(t){var e=t.target.value;e&&("arrival"===e.toLowerCase()?this._originPoint._inputLabelContainer.innerHTML="Arrivée":this._originPoint._inputLabelContainer.innerHTML="Départ",this._currentDirection=e)},u.prototype.onIsoExclusionsChange=function(t){var e=t.target.value,o=t.target.checked;if(e){for(var n=!1,i=null,s=0;s<this._currentExclusions.length;s++)this._currentExclusions[s]===e&&(i=s,n=!0);n||o||this._currentExclusions.push(e),n&&o&&(this._currentExclusions[i]=null)}},u.prototype.onIsoResetClick=function(){this._clear()},u.prototype._requestIsoCurve=function(t){if(t&&("object"!=typeof t||0!==Object.keys(t).length)&&t.position){if(this._noRightManagement||!this._resources.Isocurve)return void console.log("no rights for this service");var o=this._resources.Isocurve.resources;if(!o||"object"==typeof o&&0===Object.keys(o).length)return void console.log("no rights for this service");for(var n=!1,i=0;i<o.length;i++)o[i]===t.graph&&(n=!0);if(!n)return void console.log("no rights for this service !?");var s=this._resources.Isocurve.key;t.apiKey=this.options.isocurveOptions.apiKey||this.options.apiKey||s,this._clearGeojsonLayer(),this._displayWaitingContainer(),e.Services.isoCurve(t)}},u.prototype._drawIsoResults=function(e){if(this._currentIsoResults=e,this._hideWaitingContainer(),e.geometry){var o=this.getMap(),n={type:"Feature",crs:{type:"name",properties:{name:"EPSG:4326"}},geometry:e.geometry},i=new t.format.GeoJSON({defaultDataProjection:"EPSG:4326"}),s=o.getView().getProjection().getCode(),r=i.readFeatures(n,{dataProjection:"EPSG:4326",featureProjection:s});this._geojsonLayer=new t.layer.Vector({source:new t.source.Vector({features:r}),style:this._defaultFeatureStyle,opacity:.9});var l;if("Pieton"===this._currentTransport?(l="piéton",this._geojsonLayer.gpResultLayerId="Pieton$GEOPORTAIL:GPP:Isocurve"):(l="voiture",this._geojsonLayer.gpResultLayerId="Voiture$GEOPORTAIL:GPP:Isocurve"),o.addLayer(this._geojsonLayer),r[0]&&r[0].getGeometry()&&r[0].getGeometry().getExtent()){var c=r[0].getGeometry().getExtent();o.getView().fit(c,o.getSize())}var u="time"===this._currentComputation?"Isochrone":"Isodistance";o.getControls().forEach(function(t){if(t instanceof a){var e=this._geojsonLayer.gpLayerId;t._layers[e].title===e&&t.addLayer(this._geojsonLayer,{title:u+" "+l,description:u+" basé sur un graphe "+l})}},this)}},u.prototype._clear=function(){this._clearIsoInputs(),this._originPoint.clear(),this._clearGeojsonLayer(),this._currentIsoResults=null},u.prototype._clearIsoInputs=function(){var t=document.getElementById("GPisochronValueChronInput1-"+this._uid);t&&(t.value="0");var e=document.getElementById("GPisochronValueChronInput2-"+this._uid);e&&(e.value="0");var o=document.getElementById("GPisochronValueDistInput-"+this._uid);o&&(o.value="0"),this._initTransport(),this._initComputation(),this._initDirection(),this._initExclusions();var n;"Pieton"===this._currentTransport?(n=document.getElementById("GPisochronTransportPedestrian-"+this._uid),n&&(n.checked="true")):(n=document.getElementById("GPisochronTransportCar-"+this._uid),n&&(n.checked="true"));var i;"distance"===this._currentComputation.toLowerCase()?(i=document.getElementById("GPisochronChoiceAltDist-"+this._uid),i&&(i.checked="true"),document.getElementById("GPisochronValueDist-"+this._uid)&&(document.getElementById("GPisochronValueDist-"+this._uid).className="GPflexInput"),document.getElementById("GPisochronValueChron-"+this._uid)&&(document.getElementById("GPisochronValueChron-"+this._uid).className="GPisochronValueHidden")):(i=document.getElementById("GPisochronChoiceAltChron-"+this._uid),i&&(i.checked="true"),document.getElementById("GPisochronValueChron-"+this._uid)&&(document.getElementById("GPisochronValueChron-"+this._uid).className="GPflexInput"),document.getElementById("GPisochronValueDist-"+this._uid)&&(document.getElementById("GPisochronValueDist-"+this._uid).className="GPisochronValueHidden"));var s=document.getElementById("GPisochronDirectionSelect-"+this._uid);s&&(s.value=this._currentDirection),"arrival"===this._currentDirection?this._originPoint._inputLabelContainer.innerHTML="Arrivée":this._originPoint._inputLabelContainer.innerHTML="Départ";var r=document.getElementById("GPisoExclusionsToll-"+this._uid);r&&(this._currentExclusions.indexOf("toll")!==-1?r.checked=!1:r.checked=!0);var a=document.getElementById("GPisoExclusionsTunnel-"+this._uid);a&&(this._currentExclusions.indexOf("tunnel")!==-1?a.checked=!1:a.checked=!0);var l=document.getElementById("GPisoExclusionsBridge-"+this._uid);l&&(this._currentExclusions.indexOf("bridge")!==-1&&l?l.checked=!1:l.checked=!0)},u.prototype._clearGeojsonLayer=function(){var t=this.getMap();this._geojsonLayer&&(t.removeLayer(this._geojsonLayer),this._geojsonLayer=null)},u.prototype._hideIsoSuggestedLocations=function(t){t.target&&t.target.id&&t.target.id.indexOf("GPlocationOrigin_")!==-1||this._originPoint._hideSuggestedLocation()},u.prototype._displayWaitingContainer=function(){this._waitingContainer.className="GPisochronCalcWaitingContainerVisible",this._waiting=!0;var t=this.options.isocurveOptions;if(t&&t.timeOut){this._timer&&(clearTimeout(this._timer),this._timer=null);var e=this;this._timer=setTimeout(function(){e._waiting===!0?e._hideWaitingContainer():e._timer&&clearTimeout(e._timer)},16e3)}},u.prototype._hideWaitingContainer=function(){if(this._waiting){this._waitingContainer.className="GPisochronCalcWaitingContainerHidden",this._waiting=!1;var t=this.options.isocurveOptions;t&&t.timeOut&&(clearTimeout(this._timer),this._timer=null)}},u}(ol,gp,Ol3Utils,{},CommonUtilsCheckRightManagement,CommonUtilsSelectorID,Ol3ControlsLocationSelector,Ol3ControlsLayerSwitcher,Ol3ControlsUtilsMarkers,CommonControlsIsoDOM),CommonControlsReverseGeocodingDOM=function(){var t={_addUID:function(t){return t+"-"+this._uid},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPreverseGeocoding"),t.className="GPwidget",t},_createShowReverseGeocodingElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowReverseGeocoding"),t.type="checkbox",t},_createShowReverseGeocodingPictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowReverseGeocodingPicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowReverseGeocoding"),e.title="Ouvrir la recherche inverse",e.addEventListener?e.addEventListener("click",function(){t.onShowReverseGeocodingClick()}):e.attachEvent&&e.attachEvent("onclick",function(){t.onShowReverseGeocodingClick()});var o=document.createElement("span");return o.id=this._addUID("GPshowReverseGeocodingOpen"),o.className="GPshowAdvancedToolOpen",e.appendChild(o),e},_createReverseGeocodingWaitingElement:function(){var t=document.createElement("div");t.id=this._addUID("GPreverseGeocodingCalcWaitingContainer"),t.className="GPreverseGeocodingCalcWaitingContainerHidden";var e=document.createElement("p");return e.className="GPreverseGeocodingCalcWaiting",e.innerHTML="Recherche en cours...",t.appendChild(e),t},_createReverseGeocodingResultsPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPreverseGeocodingResultsPanel"),t.className="GPpanel GPreverseGeocodingComponentHidden",t},_createReverseGeocodingResultsListElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPreverseGeocodingResultsList"),t},_createReverseGeocodingResultElement:function(t,e){var o=this,n=document.getElementById(this._addUID("GPreverseGeocodingResultsList")),i=document.createElement("div");i.id=this._addUID("ReverseGeocodedLocation_"+e),i.className="GPautoCompleteProposal",i.innerHTML=t,i.title=t,i.addEventListener?(i.addEventListener("mouseover",function(t){o.onReverseGeocodingResultMouseOver(t)}),i.addEventListener("mouseout",function(t){o.onReverseGeocodingResultMouseOut(t)}),i.addEventListener("click",function(t){"function"==typeof o.onReverseGeocodingResultClick&&o.onReverseGeocodingResultClick(t)})):i.attachEvent&&(i.attachEvent("onmouseover",function(t){o.onReverseGeocodingResultMouseOver(t)}),i.attachEvent("onmouseout",function(t){o.onReverseGeocodingResultMouseOut(t)}),i.attachEvent("onclick",function(t){"function"==typeof o.onReverseGeocodingResultClick&&o.onReverseGeocodingResultClick(t)})),n.appendChild(i)},_createReverseGeocodingPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPreverseGeocodingPanel"),t.className="GPpanel",t},_createReverseGeocodingPanelHeaderElement:function(){var t=document.createElement("div");return t.className="GPpanelHeader",t},_createReverseGeocodingPanelReturnPictoElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPreverseGeocodingReturnPicto"),e.title="Nouvelle recherche",e.className="GPreverseGeocodingReturnPictoHidden",e.addEventListener?e.addEventListener("click",function(e){document.getElementById(t._addUID("GPreverseGeocodingResultsPanel")).className="GProuteComponentHidden",document.getElementById(t._addUID("GPreverseGeocodingForm")).className="",document.getElementById(t._addUID("GPreverseGeocodingHeaderTitle")).innerHTML="Recherche inverse",document.getElementById(t._addUID("GPreverseGeocodingReturnPicto")).className="GPreverseGeocodingReturnPictoHidden",t.onGPreverseGeocodingReturnPictoClick(e)}):e.attachEvent&&e.attachEvent("onclick",function(e){document.getElementById(t._addUID("GPreverseGeocodingResultsPanel")).className="GProuteComponentHidden",document.getElementById(t._addUID("GPreverseGeocodingForm")).className="",document.getElementById(t._addUID("GPreverseGeocodingHeaderTitle")).innerHTML="Recherche inverse",document.getElementById(t._addUID("GPreverseGeocodingReturnPicto")).className="GPreverseGeocodingReturnPictoHidden",t.onGPreverseGeocodingReturnPictoClick(e)}),e},_createReverseGeocodingPanelTitleElement:function(){var t=document.createElement("div");return t.className="GPpanelTitle",t.id=this._addUID("GPreverseGeocodingHeaderTitle"),t.innerHTML="Recherche inverse",t},_createReverseGeocodingPanelCloseElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPreverseGeocodingPanelClose"),e.className="GPpanelClose",e.title="Fermer le panneau",e.addEventListener?e.addEventListener("click",function(){document.getElementById(t._addUID("GPshowReverseGeocodingPicto")).click()},!1):e.attachEvent&&e.attachEvent("onclick",function(){document.getElementById(t._addUID("GPshowReverseGeocodingPicto")).click()}),e},_createReverseGeocodingPanelFormElement:function(){var t=this,e=document.createElement("form");return e.id=this._addUID("GPreverseGeocodingForm"),e.addEventListener?e.addEventListener("submit",function(e){e.preventDefault(),t.onReverseGeocodingSubmit()}):e.attachEvent&&e.attachEvent("onsubmit",function(e){e.preventDefault(),t.onReverseGeocodingSubmit()}),e},_createReverseGeocodingFormModeChoiceGeocodingTypeElement:function(t){var e=this,o=document.createElement("div");o.className="GPflexInput";var n=document.createElement("label");n.className="GPreverseGeocodingCodeLabel",n.innerHTML="Recherche par",n.title="Recherche par",o.appendChild(n);var i=document.createElement("select");i.className="GPreverseGeocodingCode",i.addEventListener?i.addEventListener("change",function(t){e.onReverseGeocodingTypeChange(t)}):i.attachEvent&&i.attachEvent("onchange",function(t){e.onReverseGeocodingTypeChange(t)}),t&&Array.isArray(t)||(t=["StreetAddress","PositionOfInterest","CadastralParcel"]);for(var s=0;s<t.length;s++)switch(t[s]){case"PositionOfInterest":var r=document.createElement("option");r.value="PositionOfInterest",r.text="Lieux/toponymes",i.appendChild(r);break;case"StreetAddress":var a=document.createElement("option");a.value="StreetAddress",a.text="Adresses",i.appendChild(a);break;case"CadastralParcel":var l=document.createElement("option");l.value="CadastralParcel",l.text="Parcelles cadastrales",i.appendChild(l);break;case"Administratif":var c=document.createElement("option");c.value="Administratif",c.text="Unités administratives",i.appendChild(c)}return o.appendChild(i),o},_createReverseGeocodingFormModeChoiceGeocodingDelimitationElement:function(t){var e=this,o=document.createElement("div");o.className="GPflexInput";var n=document.createElement("label");n.className="GPreverseGeocodingCodeLabel",
  n.innerHTML="Délimitation",n.title="Délimitation",o.appendChild(n);var i=document.createElement("select");i.className="GPreverseGeocodingCode",i.addEventListener?i.addEventListener("change",function(t){e.onReverseGeocodingDelimitationChange(t)}):i.attachEvent&&i.attachEvent("onchange",function(t){e.onReverseGeocodingDelimitationChange(t)}),t&&Array.isArray(t)||(t=["Point","Circle","Extent"]);for(var s=0;s<t.length;s++)switch(t[s].toLowerCase()){case"point":var r=document.createElement("option");r.value="point",r.text="Pointer un lieu",i.appendChild(r);break;case"circle":var a=document.createElement("option");a.value="circle",a.text="Dessiner un cercle",i.appendChild(a);break;case"extent":var l=document.createElement("option");l.value="extent",l.text="Dessiner une emprise",i.appendChild(l)}return o.appendChild(i),o},_createReverseGeocodingSubmitFormElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPreverseGeocodingSubmit"),t.className="GPinputSubmit",t.type="submit",t.value="Rechercher",t}};return t}(),Ol3ControlsReverseGeocode=function(t,e,o,n,i,s,r,a,l){function c(t){if(t=t||{},!(this instanceof c))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this.initialize(t),this._container=this._initContainer(),this._containerElement=null,t.element&&t.element.appendChild&&(t.element.appendChild(this._container),this._containerElement=t.element),e.control.Control.call(this,{element:this._containerElement||this._container,target:t.target,render:t.render})}return e.inherits(c,e.control.Control),c.prototype=Object.create(e.control.Control.prototype,{}),n.assign(c.prototype,l),c.prototype.constructor=c,c.prototype.getCollapsed=function(){return this.collapsed},c.prototype.setCollapsed=function(t){return void 0===t?void console.log("[ERROR] ReverseGeocode:setCollapsed - missing collapsed parameter"):void(t&&this.collapsed||!t&&!this.collapsed||(t?document.getElementById("GPreverseGeocodingPanelClose-"+this._uid).click():document.getElementById("GPshowReverseGeocoding-"+this._uid).click(),this.collapsed=t))},c.prototype.setMap=function(t){t&&this._activateMapInteraction(t),e.control.Control.prototype.setMap.call(this,t)},c.prototype.initialize=function(t){this._checkInputOptions(t),this.options={collapsed:!0,resources:["StreetAddress","PositionOfInterest","CadastralParcel"],delimitations:["Point","Circle","Extent"],reverseGeocodeOptions:{}},n.assign(this.options,t),this.collapsed=this.options.collapsed,this._uid=a.generate(),this._servicesRightManagement={},this._noRightManagement=!1,this._checkRightsManagement(),this._currentGeocodingType=null,this._initGeocodingType(),this._currentGeocodingDelimitation=null,this._initGeocodingDelimitation(),this._showReverseGeocodingInput=null,this._panelHeaderContainer=null,this._panelTitleContainer=null,this._returnPictoContainer=null,this._formContainer=null,this._resultsContainer=null,this._resultsListContainer=null,this._waitingContainer=null,this._inputFeatures=null,this._inputFeaturesSource=null,this._inputFeaturesLayer=null,this._mapInteraction=null,this._requestOptions=null,this._requestPosition=null,this._requestCircleFilter=null,this._requestBboxFilter=null,this._waiting=!1,this._timer=null,this._reverseGeocodingLocations=[],this._reverseGeocodingLocationsMarkers=[],this._resultsDefaultStyle=new e.style.Style({image:new e.style.Icon({src:i.lightOrange,anchor:[.5,1]})}),this._resultsSelectedStyle=new e.style.Style({image:new e.style.Icon({src:i.red,anchor:[.5,1]})}),this._resultsHoverInteraction=null,this._resultsSelectInteraction=null,this._popupContent=null,this._popupDiv=this._initPopupDiv(),this._popupOverlay=null},c.prototype._checkInputOptions=function(t){var e,o;if(t.resources){var n=t.resources;Array.isArray(n)||(console.log("[ReverseGeocode] 'options.resources' parameter should be an array"),n=null);var i=["StreetAddress","PositionOfInterest","CadastralParcel","Administratif"],s=[];for(e=0;e<n.length;e++)i.indexOf(n[e])===-1&&(s.push(e),console.log("[ReverseGeocode] options.resources : "+n[e]+" is not a resource for reverse geocode"));if(0!==s.length)for(o=0;o<s.length;o++)n.splice(s[o],1)}if(t.delimitations){var r=t.delimitations;Array.isArray(r)||(console.log("[ReverseGeocode] 'options.delimitations' parameter should be an array"),r=null);var a=["Circle","Point","Extent"],l=[];for(e=0;e<r.length;e++)a.indexOf(r[e])===-1&&(l.push(e),console.log("[ReverseGeocode] options.delimitations : "+r[e]+" is not a delimitation for reverse geocode"));if(0!==l.length)for(o=0;o<l.length;o++)r.splice(l[o],1)}},c.prototype._initGeocodingType=function(){this._currentGeocodingType="StreetAddress";var t=this.options.resources;if(t&&0!==t.length||(this.options.resources=["StreetAddress","PositionOfInterest","CadastralParcel"]),Array.isArray(t)&&t.length){for(var e=[],o=0;o<t.length;o++)this._servicesRightManagement.Geocode.indexOf(t[o])<0&&(e.push(o),console.log("[ReverseGeocode] no rights for options.resources : "+t[o]));if(0!==e.length)for(var n=0;n<e.length;n++)t.splice(e[n],1);"StreetAddress"!==t[0]&&"PositionOfInterest"!==t[0]&&"CadastralParcel"!==t[0]&&"Administratif"!==t[0]||(this._currentGeocodingType=t[0])}var i=this.options.reverseGeocodeOptions;i.filterOptions&&Array.isArray(i.filterOptions.type)&&0!==i.filterOptions.type.length&&(this._currentGeocodingType=i.filterOptions.type[0])},c.prototype._initGeocodingDelimitation=function(){this._currentGeocodingDelimitation="Point";var t=this.options.delimitations;if(t&&0!==t.length||(this.options.delimitations=["Point","Circle","Extent"]),Array.isArray(t)&&t.length){var e=t[0].toLowerCase();"point"!==e&&"circle"!==e&&"extent"!==e||(this._currentGeocodingDelimitation=t[0])}},c.prototype._initPopupDiv=function(){var t=this,e=document.createElement("div");e.className="gp-feature-info-div";var o=document.createElement("input");return o.type="button",o.className="gp-styling-button closer",o.onclick=function(){return null!=t._popupOverlay&&t._popupOverlay.setPosition(void 0),!1},this._popupContent=document.createElement("div"),this._popupContent.className="gp-features-content-div",e.appendChild(this._popupContent),e.appendChild(o),e},c.prototype._checkRightsManagement=function(){var t,e=[],o=null;t=this.options.reverseGeocodeOptions.apiKey,o=this.options.reverseGeocodeOptions.filterOptions,e=o?o.type:[],e&&0!==e.length||(e=this.options.resources),e&&0!==e.length||(e=["StreetAddress","PositionOfInterest"]);var n=r.check({key:t||this.options.apiKey,resources:e,services:["Geocode"]});return n?(this.options.apiKey||(this.options.apiKey=n.key),void(n&&(this._servicesRightManagement.Geocode=n.Geocode))):void(this._noRightManagement=!0)},c.prototype._initContainer=function(){var t=this._createMainContainerElement(),e=this._showReverseGeocodingInput=this._createShowReverseGeocodingElement();t.appendChild(e),this.collapsed||(e.checked=!0);var o=this._createShowReverseGeocodingPictoElement();t.appendChild(o);var n=this._createReverseGeocodingPanelElement(),i=this._panelHeaderContainer=this._createReverseGeocodingPanelHeaderElement(),s=this._returnPictoContainer=this._createReverseGeocodingPanelReturnPictoElement();i.appendChild(s);var r=this._panelTitleContainer=this._createReverseGeocodingPanelTitleElement();i.appendChild(r);var a=this._createReverseGeocodingPanelCloseElement();i.appendChild(a),n.appendChild(i);var l=this._formContainer=this._createReverseGeocodingPanelFormElement();l.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingTypeElement(this.options.resources)),l.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingDelimitationElement(this.options.delimitations));var c=this._createReverseGeocodingSubmitFormElement();l.appendChild(c),n.appendChild(l);var u=this._waitingContainer=this._createReverseGeocodingWaitingElement();n.appendChild(u);var h=this._resultsContainer=this._createReverseGeocodingResultsPanelElement(),d=this._resultsListContainer=this._createReverseGeocodingResultsListElement();return h.appendChild(d),n.appendChild(h),t.appendChild(n),t},c.prototype._activateMapInteraction=function(t){if(!this.collapsed){null==this._inputFeaturesLayer&&(this._inputFeatures=new e.Collection,this._inputFeaturesSource=new e.source.Vector({features:this._inputFeatures}),this._inputFeaturesLayer=new e.layer.Vector({source:this._inputFeaturesSource,style:new e.style.Style({fill:new e.style.Fill({color:"rgba(0, 183, 152, 0.3)"}),stroke:new e.style.Stroke({color:"rgba(0, 183, 152, 0.8)",width:3}),image:new e.style.Icon({src:i.turquoiseBlue,anchor:[.5,1]})})}),this._inputFeaturesLayer.gpResultLayerId="reverseGeocoding",t.addLayer(this._inputFeaturesLayer));var o=this._currentGeocodingDelimitation.toLowerCase();switch(o){case"point":this._activatePointInteraction(t);break;case"circle":this._activateCircleInteraction(t);break;case"extent":this._activateBoxInteraction(t)}t.getControls().forEach(function(t){if(t instanceof s){var e=this._inputFeaturesLayer.gpLayerId;t._layers[e].title===e&&(t.addLayer(this._inputFeaturesLayer,{title:"Saisie (recherche inverse)",description:"Couche de saisie d'une zone de recherche pour la recherche inverse"}),t.setRemovable(this._inputFeaturesLayer,!1))}},this)}},c.prototype._activatePointInteraction=function(t){this._mapInteraction=new e.interaction.Draw({style:new e.style.Style({image:new e.style.Circle({radius:0,fill:new e.style.Fill({color:"rgba(0, 183, 152, 0.8)"})})}),type:"Point",source:this._inputFeaturesSource}),this._mapInteraction.on("drawstart",function(t){this._inputFeatures.clear(),this._onDrawStart(t,"point")},this),t.addInteraction(this._mapInteraction),this._setCursor("crosshair",t)},c.prototype._activateCircleInteraction=function(t){this._mapInteraction=new e.interaction.Draw({style:new e.style.Style({fill:new e.style.Fill({color:"rgba(0, 183, 152, 0.3)"}),stroke:new e.style.Stroke({color:"rgba(0, 183, 152, 0.8)",width:3}),image:new e.style.Circle({radius:4,fill:new e.style.Fill({color:"rgba(0, 183, 152, 0.8)"})})}),type:"Circle",source:this._inputFeaturesSource}),this._mapInteraction.on("drawstart",function(t){this._inputFeatures.clear(),this._onDrawStart(t,"circle")},this),this._mapInteraction.on("drawend",function(t){if(t.feature&&t.feature.getGeometry){var e=t.feature.getGeometry().getRadius();this._requestCircleFilter={},this._requestCircleFilter.radius=e,this._requestPosition&&(this._requestCircleFilter.x=this._requestPosition.x,this._requestCircleFilter.y=this._requestPosition.y)}},this),t.addInteraction(this._mapInteraction)},c.prototype._activateBoxInteraction=function(t){var o=function(t,o){o||(o=new e.geom.Polygon(null));var n=t[0],i=t[1];return o.setCoordinates([[n,[n[0],i[1]],i,[i[0],n[1]],n]]),o};this._mapInteraction=new e.interaction.Draw({style:new e.style.Style({fill:new e.style.Fill({color:"rgba(0, 183, 152, 0.3)"}),stroke:new e.style.Stroke({color:"rgba(0, 183, 152, 0.8)",width:3}),image:new e.style.Circle({radius:4,fill:new e.style.Fill({color:"rgba(0, 183, 152, 0.8)"})})}),type:"LineString",source:this._inputFeaturesSource,maxPoints:2,geometryFunction:o}),this._mapInteraction.on("drawstart",function(t){this._inputFeatures.clear()},this),this._mapInteraction.on("drawend",function(t){this._onBoxDrawEnd(t)},this),t.addInteraction(this._mapInteraction)},c.prototype._removeMapInteraction=function(t){null!=this._mapInteraction&&(t.removeInteraction(this._mapInteraction),this._mapInteraction=null),this._setCursor()},c.prototype._onDrawStart=function(t,o){var n;if(t.feature&&t.feature.getGeometry){var i=t.feature.getGeometry();"point"===o&&(n=i.getCoordinates()),"circle"===o&&(n=i.getCenter())}if(n){var s;if(this.options.reverseGeocodeOptions&&this.options.reverseGeocodeOptions.srs)s=this.options.reverseGeocodeOptions.srs;else{var r=this.getMap();if(!r||!r.getView())return;s=r.getView().getProjection()}var a=e.proj.transform(n,s,"EPSG:4326");this._requestPosition={x:a[0],y:a[1]}}},c.prototype._onBoxDrawEnd=function(t){if(t.feature&&t.feature.getGeometry){var o,n=t.feature.getGeometry().getCoordinates()[0],i=n[0],s=n[2];if(this.options.reverseGeocodeOptions&&this.options.reverseGeocodeOptions.srs)o=this.options.reverseGeocodeOptions.srs;else{var r=this.getMap();if(!r||!r.getView())return;o=r.getView().getProjection()}var a=e.proj.transform(i,o,"EPSG:4326"),l=e.proj.transform(s,o,"EPSG:4326");this._requestPosition={},this._requestBboxFilter={},a[0]<l[0]?(this._requestBboxFilter.left=a[0],this._requestBboxFilter.right=l[0]):(this._requestBboxFilter.left=l[0],this._requestBboxFilter.right=a[0]),a[1]<l[1]?(this._requestBboxFilter.bottom=a[1],this._requestBboxFilter.top=l[1]):(this._requestBboxFilter.bottom=l[1],this._requestBboxFilter.top=a[1]),this._requestPosition.x=(a[0]+l[0])/2,this._requestPosition.y=(a[1]+l[1])/2}},c.prototype._setCursor=function(t,e){if(e=e||this.getMap()){var o=e.getTargetElement();t?o.style.cursor=t:o.style.cursor=null}},c.prototype._reverseGeocodingRequest=function(){var t=this.getMap();this._requestOptions=this._getReverseGeocodingRequestOptions(),this._removeMapInteraction(t),this._displayWaitingContainer(),o.Services.reverseGeocode(this._requestOptions)},c.prototype._getReverseGeocodingRequestOptions=function(){var t=this.getMap(),e=this.options.reverseGeocodeOptions,o=this,n={apiKey:e.apiKey||this.options.apiKey,position:this._requestPosition,filterOptions:{type:[this._currentGeocodingType]},srs:"CRS:84",returnFreeForm:!1,maximumResponses:e.maximumResponses||25,timeOut:e.timeOut||3e4,protocol:e.protocol||"XHR",onSuccess:function(t){t.locations&&o._displayGeocodedLocations(t.locations)},onFailure:function(e){o._hideWaitingContainer(),o._clearResults(),o._clearInputFeatures(),o._activateMapInteraction(t)}};return"circle"===this._currentGeocodingDelimitation.toLowerCase()&&this._requestCircleFilter&&(this._requestCircleFilter.radius>1e3&&(console.log("INFO : initial circle radius ("+this._requestCircleFilter.radius+") limited to 1000m."),this._requestCircleFilter.radius=1e3),n.filterOptions.circle=this._requestCircleFilter),"extent"===this._currentGeocodingDelimitation.toLowerCase()&&this._requestBboxFilter&&(n.filterOptions.bbox=this._requestBboxFilter),n},c.prototype._displayGeocodedLocations=function(t){this._clearResults(),this._reverseGeocodingLocations=t,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)},c.prototype._fillGeocodedLocationListContainer=function(t){for(var e=0;e<t.length;e++){var o=t[e],n=this._fillGeocodedLocationDescription(o);0!==n.length&&this._createReverseGeocodingResultElement(n,e)}},c.prototype._fillGeocodedLocationDescription=function(t){if(t&&t.placeAttributes){var e=t.placeAttributes,o="";switch(t.type){case"StreetAddress":e.street&&(o+=e.number?e.number+" ":"",o+=e.street+", "),o+=e.postalCode+" "+e.commune;break;case"PositionOfInterest":"City"===t.matchType&&e.commune?(o+=e.commune,o+=e.postalCode?", "+e.postalCode:""):"Département"===t.matchType&&e.municipality?(o+=e.municipality,o+=e.postalCode?", "+e.postalCode:""):"Toponym"===t.matchType&&e.municipality?(o+=e.municipality,o+=e.postalCode?", "+e.postalCode:"",o+=e.commune?" "+e.commune:""):o+=e.municipality?e.municipality:"",o+=e.nature?" ("+e.nature+") ":"";break;case"CadastralParcel":o+=e.cadastralParcel?e.cadastralParcel:"",o+=e.municipality?" ("+e.municipality+")":"";break;case"Administratif":o+=e.municipality?e.municipality:"",e.inseeDepartment?o+="(Département)":e.inseeRegion&&(o+="(Région)");break;default:o+=e.municipality?e.municipality:""}return o}},c.prototype._displayGeocodedLocationsOnMap=function(t){if(0!==this._reverseGeocodingLocations.length){var o=this.getMap();this._createResultsLayer();for(var n=0;n<t.length;n++)this._addResultFeature(t[n],n);if(this._resultsFeatures.getLength()>1){if(this._resultsFeaturesSource&&this._resultsFeaturesSource.getExtent){var i=this._resultsFeaturesSource.getExtent();o.getView().fit(i,o.getSize())}}else{var r=this._resultsFeatures.item(0),a=r.getGeometry().getCoordinates();o.getView().setCenter(a),o.getView().setZoom(17)}this._resultsHoverInteraction=new e.interaction.Select({condition:e.events.condition.pointerMove,layers:[this._resultsFeaturesLayer]}),this._resultsHoverInteraction.on("select",this._onResultsFeatureMouseOver,this),o.addInteraction(this._resultsHoverInteraction),this._resultsSelectInteraction=new e.interaction.Select({layers:[this._resultsFeaturesLayer]}),this._resultsSelectInteraction.on("select",this._onResultsFeatureSelect,this),o.addInteraction(this._resultsSelectInteraction);var l="";switch(this._currentGeocodingType){case"StreetAddress":l="adresses";break;case"PositionOfInterest":l="toponymes";break;case"CadastralParcel":l="parcelles cadastrales";break;case"Administratif":l="unités administratives"}o.getControls().forEach(function(t){if(t instanceof s){var e=this._resultsFeaturesLayer.gpLayerId;t._layers[e].title===e&&(t.addLayer(this._resultsFeaturesLayer,{title:"Résultats de la recherche inverse",description:"Résultats de la recherche inverse sur les "+l}),t.setRemovable(this._resultsFeaturesLayer,!1))}},this)}},c.prototype._createResultsLayer=function(){var t=this.getMap();this._resultsFeatures=new e.Collection,this._resultsFeaturesSource=new e.source.Vector({features:this._resultsFeatures}),this._resultsFeaturesLayer=new e.layer.Vector({source:this._resultsFeaturesSource}),this._resultsFeaturesLayer.gpResultLayerId="reverseGeocodingResults",t.addLayer(this._resultsFeaturesLayer)},c.prototype._addResultFeature=function(t,o){var n=this.getMap(),i=[t.position.x,t.position.y];if(i){var s=n.getView(),r=s.getProjection().getCode();"EPSG:4326"!==r&&(i=e.proj.transform(i,"EPSG:4326",r));var a=new e.Feature({geometry:new e.geom.Point(i)});a.setStyle(this._resultsDefaultStyle),a.setId(o),a.setProperties({popupContent:this._fillPopupContent(t)}),this._resultsFeatures.push(a)}},c.prototype._fillPopupContent=function(t){var e="<ul>",o=t.placeAttributes;for(var n in o)o.hasOwnProperty(n)&&"bbox"!==n&&(e+="<li>",e+='<span class="gp-attname-others-span">'+n.toUpperCase()+" : </span>",e+=o[n],e+=" </li>");return e+=" </ul>"},c.prototype._onResultsFeatureMouseOver=function(t){var e;if(0!==t.selected.length){if(e=t.selected[0],e.setStyle(this._resultsSelectedStyle),null!=e.getId()){var o=document.getElementById("ReverseGeocodedLocation_"+e.getId()+"-"+this._uid);o&&o.classList&&o.classList.add("GPreverseGeocodedLocationHighlight")}document.getElementById("ReverseGeocodedLocation_"+e.getId()+"-"+this._uid)}if(0!==t.deselected.length){e=t.deselected[0],e.setStyle(this._resultsDefaultStyle);var n=document.getElementById("ReverseGeocodedLocation_"+e.getId()+"-"+this._uid);n&&n.classList&&n.classList.remove("GPreverseGeocodedLocationHighlight")}},c.prototype._onResultsFeatureSelect=function(t){var o=this.getMap();if(0!==t.selected.length){var n=t.selected[0];this._popupContent.innerHTML=n.getProperties().popupContent,this._popupOverlay?this._popupOverlay.setPosition(t.mapBrowserEvent.coordinate):(this._popupOverlay=new e.Overlay({element:this._popupDiv,positioning:"bottom-center",position:t.mapBrowserEvent.coordinate}),o.addOverlay(this._popupOverlay))}else null!=this._popupOverlay&&this._popupOverlay.setPosition(void 0)},c.prototype.onShowReverseGeocodingClick=function(){this.collapsed=this._showReverseGeocodingInput.checked,this.dispatchEvent("change:collapsed");var t=this.getMap();this._waiting||this._reverseGeocodingLocations.length||(this.collapsed?(this._clearResults(),this._clearInputFeatures(),this._removeMapInteraction(t),null!=this._inputFeaturesLayer&&(t.removeLayer(this._inputFeaturesLayer),this._inputFeaturesLayer=null,this._inputFeaturesSources=null,this._inputFeatures=null)):this._activateMapInteraction(t))},c.prototype.onReverseGeocodingTypeChange=function(t){var e=t.target.selectedIndex,o=t.target.options[e].value;o&&(this._currentGeocodingType=o)},c.prototype.onReverseGeocodingDelimitationChange=function(t){var e=t.target.selectedIndex,o=t.target.options[e].value;if(o){this._currentGeocodingDelimitation=o;var n=this.getMap();this._clearInputFeatures(),this._removeMapInteraction(n),this._activateMapInteraction(n)}},c.prototype.onGPreverseGeocodingReturnPictoClick=function(){this._clearResults(),this._clearInputFeatures(),this._activateMapInteraction(this.getMap())},c.prototype.onReverseGeocodingSubmit=function(){this._requestPosition&&(this._noRightManagement||this._reverseGeocodingRequest())},c.prototype.onReverseGeocodingResultClick=function(t){},c.prototype.onReverseGeocodingResultMouseOver=function(t){var e=t.target.id,o=e.substring(e.indexOf("_")+1);if(t.target.classList&&t.target.classList.add("GPreverseGeocodedLocationHighlight"),this._resultsFeaturesSource){var n=this._resultsFeaturesSource.getFeatureById(parseInt(o,10));n.setStyle(this._resultsSelectedStyle)}},c.prototype.onReverseGeocodingResultMouseOut=function(t){var e=t.target.id,o=e.substring(e.indexOf("_")+1);if(t.target.classList&&t.target.classList.remove("GPreverseGeocodedLocationHighlight"),this._resultsFeaturesSource){var n=this._resultsFeaturesSource.getFeatureById(parseInt(o,10));n.setStyle(this._resultsDefaultStyle)}},c.prototype._clearResults=function(){var t=this.getMap();if(this._reverseGeocodingLocations=[],this._resultsListContainer)for(;this._resultsListContainer.firstChild;)this._resultsListContainer.removeChild(this._resultsListContainer.firstChild);this._resultsFeaturesLayer&&(t.removeLayer(this._resultsFeaturesLayer),this._resultsFeaturesLayer=null),null!=this._popupOverlay&&(t.removeOverlay(this._popupOverlay),this._popupOverlay=null),null!=this._resultsSelectInteraction&&(t.removeInteraction(this._resultsSelectInteraction),this._resultsSelectInteraction=null),null!=this._resultsHoverInteraction&&(t.removeInteraction(this._resultsHoverInteraction),this._resultsHoverInteraction=null)},c.prototype._clearInputFeatures=function(){this._inputFeatures.clear(),this._requestPosition=null,this._requestCircleFilter=null,this._requestBboxFilter=null},c.prototype._displayWaitingContainer=function(){this._waitingContainer.className="GProuteCalcWaitingContainerVisible",this._waiting=!0,this._timer&&(clearTimeout(this._timer),this._timer=null);var t=this;this._timer=setTimeout(function(){t._waiting===!0?t._hideWaitingContainer():t._timer&&clearTimeout(t._timer)},16e3)},c.prototype._hideWaitingContainer=function(){this._waiting&&(this._waitingContainer.className="GProuteCalcWaitingContainerHidden",this._waiting=!1,clearTimeout(this._timer),this._timer=null)},c}({},ol,gp,Ol3Utils,Ol3ControlsUtilsMarkers,Ol3ControlsLayerSwitcher,CommonUtilsCheckRightManagement,CommonUtilsSelectorID,CommonControlsReverseGeocodingDOM),CommonControlsLayerImportDOM=function(){var t={_addUID:function(t){return t+"-"+this._uid},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPimport"),t.className="GPwidget",t},_createShowImportElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowImport"),t.type="checkbox",t},_createShowImportPictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowImportPicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowImport"),e.title="Ouvrir l'import de couches",e.addEventListener?e.addEventListener("click",function(){t._onShowImportClick()}):e.attachEvent&&e.attachEvent("onclick",function(){t._onShowImportClick()});var o=document.createElement("span");return o.id=this._addUID("GPshowImportOpen"),o.className="GPshowAdvancedToolOpen",e.appendChild(o),e},_createImportPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPimportPanel"),t.className="GPpanel",t},_createImportPanelHeaderElement:function(){var t=document.createElement("div");t.className="GPpanelHeader";var e=this._createImportPanelTitleElement();t.appendChild(e);var o=this._createImportPanelCloseElement();return t.appendChild(o),t},_createImportPanelTitleElement:function(){var t=document.createElement("div");return t.className="GPpanelTitle",t.innerHTML="Import de données",t},_createImportPanelCloseElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPimportPanelClose"),e.className="GPpanelClose",e.title="Fermer le panneau",e.addEventListener?e.addEventListener("click",function(){document.getElementById(t._addUID("GPshowImportPicto")).click()},!1):e.attachEvent&&e.attachEvent("onclick",function(){document.getElementById(t._addUID("GPshowImportPicto")).click()}),e},_createImportPanelFormElement:function(){var t=this,e=document.createElement("form");return e.id=this._addUID("GPimportForm"),e.className="map-tool-box",e.addEventListener?e.addEventListener("submit",function(e){e.preventDefault(),t._onImportSubmit()}):e.attachEvent&&e.attachEvent("onsubmit",function(e){e.preventDefault(),t._onImportSubmit()}),e},_createImportTypeLineElement:function(t){var e=this,o=document.createElement("div");o.id=this._addUID("GPimportTypeLine"),o.className="GPimportInputLine";var n=document.createElement("label");n.htmlFor=this._addUID("GPimportType"),n.className="GPimportLabel",n.innerHTML="Type de donnée",n.title="Type de donnée",o.appendChild(n);var i=document.createElement("select");i.className="GPimportSelect",i.addEventListener?i.addEventListener("change",function(t){"KML"===this.value||"GPX"===this.value?(document.getElementById(e._addUID("GPimportStaticParams")).className="GPimportVisibleParams",document.getElementById(e._addUID("GPimportServiceParams")).className="GPimportHiddenParams"):"WMS"!==this.value&&"WMTS"!==this.value&&"WFS"!==this.value||(document.getElementById(e._addUID("GPimportServiceParams")).className="GPimportVisibleParams",document.getElementById(e._addUID("GPimportStaticParams")).className="GPimportHiddenParams"),e._onImportTypeChange(t)}):i.attachEvent&&i.attachEvent("onchange",function(){"KML"===this.value||"GPX"===this.value?(document.getElementById(e._addUID("GPimportStaticParams")).className="GPimportVisibleParams",document.getElementById(e._addUID("GPimportServiceParams")).className="GPimportHiddenParams"):"WMS"!==this.value&&"WMTS"!==this.value&&"WFS"!==this.value||(document.getElementById(e._addUID("GPimportServiceParams")).className="GPimportVisibleParams",document.getElementById(e._addUID("GPimportStaticParams")).className="GPimportHiddenParams"),e._onImportTypeChange()}),i.id=this._addUID("GPimportType"),t&&Array.isArray(t)||(t=["KML","GPX","WMS","WMTS","WFS"]);for(var s,r=0;r<t.length;r++)s=document.createElement("option"),s.value=t[r],s.text=t[r],i.appendChild(s);return o.appendChild(i),o},_createImportWaitingElement:function(){var t=document.createElement("div");t.id=this._addUID("GPimportWaitingContainer"),t.className="GPimportWaitingContainerHidden";var e=document.createElement("p");return e.className="GPimportWaiting",e.innerHTML="Recherche en cours...",t.appendChild(e),t},_createImportStaticParamsContainer:function(t){var e=document.createElement("div");return e.id=this._addUID("GPimportStaticParams"),"KML"===t||"GPX"===t?e.className="GPimportVisibleParams":e.className="GPimportHiddenParams",e},_createStaticNameLabel:function(){var t=document.createElement("div");t.className="GPimportInputLine";var e=document.createElement("label");e.className="GPimportLabel",e.htmlFor=this._addUID("GPimportName"),e.innerHTML="Nom",e.title="Nom",t.appendChild(e);var o=document.createElement("input");return o.type="text",o.id=this._addUID("GPimportName"),o.className="GPimportInput",t.appendChild(o),t},_createStaticModeChoiceDiv:function(){var t=document.createElement("div");return t.id=this._addUID("GPimportChoice"),t},_createStaticLocalChoiceDiv:function(){var t=this,e=document.createElement("div");e.className="GPimportChoiceAlt";var o=document.createElement("input");o.type="radio",o.addEventListener?o.addEventListener("change",function(e){document.getElementById(t._addUID("GPimportValueLocal")).className="GPimportInputLine",document.getElementById(t._addUID("GPimportValueUrl")).className="GPimportValueHidden",t._onStaticImportTypeChange(e)}):o.appendChild&&o.appendChild("onchange",function(){document.getElementById(t._addUID("GPimportValueLocal")).className="GPimportInputLine",document.getElementById(t._addUID("GPimportValueUrl")).className="GPimportValueHidden",t._onStaticImportTypeChange()}),o.name="GPimportChoiceMode",o.value="local",o.checked=!0,o.id=this._addUID("GPimportChoiceAltLocal"),e.appendChild(o);var n=document.createElement("label");return n.className="GPimportChoiceAltTxt",n.htmlFor=this._addUID("GPimportChoiceAltLocal"),n.innerHTML="par fichier local",n.title="par fichier local",e.appendChild(n),e},_createStaticUrlChoiceDiv:function(){var t=this,e=document.createElement("div");e.className="GPimportChoiceAlt";var o=document.createElement("input");o.type="radio",o.addEventListener?o.addEventListener("change",function(e){document.getElementById(t._addUID("GPimportValueUrl")).className="GPimportInputLine",document.getElementById(t._addUID("GPimportValueLocal")).className="GPimportValueHidden",t._onStaticImportTypeChange(e)}):o.appendChild&&o.appendChild("onchange",function(){document.getElementById(t._addUID("GPimportValueUrl")).className="GPimportInputLine",document.getElementById(t._addUID("GPimportValueLocal")).className="GPimportValueHidden",t._onStaticImportTypeChange()}),o.id=this._addUID("GPimportChoiceAltUrl"),o.name="GPimportChoiceMode",o.value="url",o.checked=!1,e.appendChild(o);var n=document.createElement("label");return n.className="GPimportChoiceAltTxt",n.htmlFor=this._addUID("GPimportChoiceAltUrl"),n.innerHTML="par URL",n.title="par URL",e.appendChild(n),e},_createStaticLocalInputDiv:function(){var t=document.createElement("div");return t.id=this._addUID("GPimportValueLocal"),t.className="GPimportInputLine",t},_createStaticLocalInputLabel:function(){var t=document.createElement("label");return t.className="GPimportLabel",t.htmlFor=this._addUID("GPimportFile"),t.innerHTML="Fichier local",t.title="Fichier local",t},_createStaticLocalInput:function(){var t=document.createElement("input");return t.type="file",t.id=this._addUID("GPimportFile"),t.className="GPimportInputFile",t},_createStaticUrlInputDiv:function(){var t=document.createElement("div");return t.id=this._addUID("GPimportValueUrl"),t.className="GPimportValueHidden",t},_createStaticUrlInputLabel:function(){var t=document.createElement("label");return t.className="GPimportLabel",t.htmlFor=this._addUID("GPimportUrl"),t.innerHTML="URL",t.title="URL",t},_createStaticUrlInput:function(){var t=document.createElement("input");return t.type="text",t.id=this._addUID("GPimportUrl"),t.className="GPimportInput",t},_createServiceParamsContainer:function(t){var e=document.createElement("div");return e.id=this._addUID("GPimportServiceParams"),"WMS"===t||"WMTS"===t||"WFS"===t?e.className="GPimportVisibleParams":e.className="GPimportHiddenParams",e},_createServiceUrlDiv:function(){var t=document.createElement("div");return t.className="GPimportInputLine",t},_createServiceUrlInputLabel:function(){var t=document.createElement("label");return t.className="GPimportLabel",t.htmlFor=this._addUID("GPimportServiceUrl"),t.innerHTML="URL du service",t.title="URL du service",t},_createServiceUrlInput:function(){var t=document.createElement("input");return t.type="text",t.id=this._addUID("GPimportServiceUrl"),t.className="GPimportInput",t},_createImportSubmitFormElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPimportSubmit"),t.className="GPinputSubmit tool-form-submit",t.type="submit",t.value="Importer",t},_createImportGetCapPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPimportGetCapPanel"),t.className="GPpanel",t},_createImportGetCapPanelHeaderElement:function(){var t=this,e=document.createElement("div");
  e.className="GPpanelHeader";var o=document.createElement("div");o.className="GPpanelTitle",o.innerHTML="Couches accessibles",o.title="Couches accessibles",e.appendChild(o);var n=document.createElement("div");return n.addEventListener?n.addEventListener("click",function(){document.getElementById(t._addUID("GPimportGetCapPanel")).style.display="none",document.getElementById(t._addUID("GPimportPanel")).style.display="",t._onGetCapPanelClose()}):n.attachEvent&&n.attachEvent("click",function(){document.getElementById(t._addUID("GPimportGetCapPanel")).style.display="none",document.getElementById(t._addUID("GPimportPanel")).style.display="",t._onGetCapPanelClose()}),n.className="GPpanelClose",n.title="Fermer le panneau",n.id=this._addUID("GPimportGetCapPanelClose"),e.appendChild(n),e},_createImportGetCapResultsListElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPimportGetCapResults"),t},_createImportGetCapResultElement:function(t,e){var o=document.createElement("div");o.className="GPimportGetCapProposal",o.innerHTML=t,o.title=t;var n=this;return o.addEventListener?o.addEventListener("click",function(t){n._onGetCapResponseLayerClick(t)}):o.attachEvent&&o.attachEvent("onclick",function(){n._onGetCapResponseLayerClick()}),o.id="GPimportGetCapProposal_"+e,o}};return t}(),Ol3ControlsLayerImport=function(t,e,o,n,i,s,r,a){function l(e){if(e=e||{},!(this instanceof l))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this._initialize(e);var o=this._initContainer(e);t.control.Control.call(this,{element:o,target:e.target,render:e.render})}return t.inherits(l,t.control.Control),l.DefaultStyles={image:new t.style.Icon({src:i.lightOrange,anchor:[25.5,38],anchorOrigin:"top-left",anchorXUnits:"pixels",anchorYUnits:"pixels"}),stroke:new t.style.Stroke({color:"rgba(0,42,80,0.8)",width:4}),fill:new t.style.Fill({color:"rgba(0, 183, 152, 0.5)"})},l.prototype=Object.create(t.control.Control.prototype,{}),n.assign(l.prototype,s),l.prototype.constructor=l,l.prototype.getCollapsed=function(){return this.collapsed},l.prototype.setCollapsed=function(t){return void 0===t?void console.log("[ERROR] LayerImport:setCollapsed - missing collapsed parameter"):void(t&&this.collapsed||!t&&!this.collapsed||(t?document.getElementById("GPimportPanelClose-"+this._uid).click():document.getElementById("GPshowImport-"+this._uid).click(),this.collapsed=t))},l.prototype.getStaticImportContent=function(){return this.contentStatic},l.prototype.getServiceImportContent=function(){return this.contentService},l.prototype._initialize=function(e){this._checkInputOptions(e),this.options={collapsed:!0,layerTypes:["KML","GPX","WMS","WMTS"],webServicesOptions:{},vectorStyleOptions:{KML:{extractStyles:!0,showPointNames:!0,defaultStyle:l.DefaultStyles},GPX:{defaultStyle:l.DefaultStyles}}};var o;if(e.vectorStyleOptions)for(var i in e.vectorStyleOptions)e.vectorStyleOptions[i]&&e.vectorStyleOptions[i].defaultStyle&&(o=this.options.vectorStyleOptions[i].defaultStyle,n.mergeParams(o,e.vectorStyleOptions[i].defaultStyle),e.vectorStyleOptions[i].defaultStyle=o);n.mergeParams(this.options,e),this.collapsed=this.options.collapsed,this._uid=r.generate(),this._waiting=!1,this._timer=null,this._currentImportType="KML",this._isCurrentImportTypeStatic=!0,this._currentStaticImportType="local";var s=this.options.vectorStyleOptions.KML.defaultStyle;this._defaultKMLStyle=new t.style.Style({image:s.image,stroke:s.stroke,fill:s.fill});var a=this.options.vectorStyleOptions.GPX.defaultStyle;this._defaultGPXStyle=new t.style.Style({image:a.image,stroke:a.stroke,fill:a.fill}),this._showImportInput=null,this._importPanel=null,this._formContainer=null,this._staticLocalImportInput=null,this._staticUrlImportInput=null,this._serviceUrlImportInput=null,this._getCapPanel=null,this._getCapResultsListContainer=null,this._waitingContainer=null,this._getCapRequestUrl=null,this._getCapResponseWMS=null,this._getCapResponseWMSLayers=[],this._getCapResponseWMTS=null,this._getCapResponseWMTSLayers=[]},l.prototype._checkInputOptions=function(t){if(t.layerTypes){var e=t.layerTypes;Array.isArray(e)||(console.log("[ol.control.LayerImport] 'options.layerTypes' parameter should be an array"),e=null);for(var o=["KML","GPX","WMS","WMTS","WFS"],n=[],i=0;i<e.length;i++)"string"!=typeof e[i]?(n.push(i),console.log("[ol.control.LayerImport] 'options.layerTypes' elements should be of type string ("+e[i]+")")):(e[i]=e[i].toUpperCase(),o.indexOf(e[i])===-1&&(n.push(i),console.log("[ol.control.LayerImport] options.layerTypes : "+e[i]+" is not a supported type")));if(0!==n.length)for(var s=n.length-1;s>=0;s--)e.splice(n[s],1)}},l.prototype._initContainer=function(){var t=this._createMainContainerElement(),e=this._showImportInput=this._createShowImportElement();t.appendChild(e),this.collapsed||(e.checked=!0);var o=this._createShowImportPictoElement();t.appendChild(o);var n=this._importPanel=this._createImportPanelElement(),i=this._createImportPanelHeaderElement();n.appendChild(i);var s=this._formContainer=this._initInputFormElement();n.appendChild(s),t.appendChild(n);var r=this._getCapPanel=this._createImportGetCapPanelElement();r.appendChild(this._createImportGetCapPanelHeaderElement());var a=this._getCapResultsListContainer=this._createImportGetCapResultsListElement();r.appendChild(a),t.appendChild(r);var l=this._waitingContainer=this._createImportWaitingElement();return t.appendChild(l),t},l.prototype._initInputFormElement=function(){var t=this._createImportPanelFormElement(),e=this._createImportTypeLineElement(this.options.layerTypes);t.appendChild(e);var o=this._createImportStaticParamsContainer(this.options.layerTypes[0]),n=this._createStaticNameLabel();o.appendChild(n);var i=this._createStaticModeChoiceDiv(),s=this._createStaticLocalChoiceDiv();i.appendChild(s);var r=this._createStaticUrlChoiceDiv();i.appendChild(r),o.appendChild(i);var a=this._createStaticLocalInputDiv();a.appendChild(this._createStaticLocalInputLabel()),this._staticLocalImportInput=this._createStaticLocalInput(),a.appendChild(this._staticLocalImportInput),o.appendChild(a);var l=this._createStaticUrlInputDiv();l.appendChild(this._createStaticUrlInputLabel()),this._staticUrlImportInput=this._createStaticUrlInput(),l.appendChild(this._staticUrlImportInput),o.appendChild(l),t.appendChild(o);var c=this._createServiceParamsContainer(this.options.layerTypes[0]),u=this._createServiceUrlDiv();u.appendChild(this._createServiceUrlInputLabel()),this._serviceUrlImportInput=this._createServiceUrlInput(),u.appendChild(this._serviceUrlImportInput),c.appendChild(u),t.appendChild(c);var h=this._createImportSubmitFormElement();return t.appendChild(h),t},l.prototype._onShowImportClick=function(){this.collapsed=this._showImportInput.checked,this.dispatchEvent("change:collapsed")},l.prototype._onImportTypeChange=function(t){this._currentImportType=t.target.value,"KML"===this._currentImportType||"GPX"===this._currentImportType?this._isCurrentImportTypeStatic=!0:"WMS"!==this._currentImportType&&"WMTS"!==this._currentImportType&&"WFS"!==this._currentImportType||(this._isCurrentImportTypeStatic=!1)},l.prototype._onStaticImportTypeChange=function(t){this._currentStaticImportType=t.target.value},l.prototype._onGetCapPanelClose=function(){this._clearGetCapParams(),this._emptyGetCapResultsList()},l.prototype._onImportSubmit=function(){this.contentStatic=null,this.contentService=null,this._isCurrentImportTypeStatic?this._importStaticLayer():this._importServiceLayers()},l.prototype._importStaticLayer=function(){var t,e=document.getElementById(this._addUID("GPimportName"));e&&(t=e.value),"local"===this._currentStaticImportType?this._importStaticLayerFromLocalFile(t):"url"===this._currentStaticImportType&&this._importStaticLayerFromUrl(t)},l.prototype._importStaticLayerFromUrl=function(t){t=t||"";var o=this._staticUrlImportInput.value;if(0===o.length)return void console.log("[ol.control.LayerImport] url parameter is mandatory");if(o.trim&&(o=o.trim()),!this.options.webServicesOptions||!this.options.webServicesOptions.proxyUrl&&!this.options.webServicesOptions.noProxyDomains)return void console.log("[ol.control.LayerImport] options.webServicesOptions.proxyUrl parameter is mandatory to request resources on another domain (cross-domain)");var n=this.options.webServicesOptions.proxyUrl,i=this.options.webServicesOptions.noProxyDomains,s=!1;if(i&&Array.isArray(i)&&i.length>0)for(var r in i)o.indexOf(i[r])!==-1&&(s=!0);s===!1&&(o=n+encodeURIComponent(o));var a=this;e.Protocols.XHR.call({url:o,method:"GET",timeOut:15e3,onResponse:function(e){a._hideWaitingContainer(),a._addFeaturesFromImportStaticLayer(e,t)},onFailure:function(t){a._hideWaitingContainer(),console.log("[ol.control.LayerImport] Kml/Gpx request failed : ",t)}})},l.prototype._importStaticLayerFromLocalFile=function(t){var e=this._staticLocalImportInput.files[0];if(!e)return void console.log("[ol.control.LayerImport] missing file");var o=new FileReader,n=this;o.onerror=function(t){n._hideWaitingContainer()},o.onprogress=function(){},o.onloadstart=function(){n._displayWaitingContainer()},o.onabort=function(){n._hideWaitingContainer()},o.onloadend=function(t){},o.onload=function(e){n._hideWaitingContainer(),n._addFeaturesFromImportStaticLayer(e.target.result,t)},o.readAsText(e)},l.prototype._addFeaturesFromImportStaticLayer=function(e,o){var n=this.getMap();if(n&&e){this.contentStatic=e;var i;"KML"===this._currentImportType?i=new a({showPointNames:!1,extractStyles:this.options.vectorStyleOptions.KML.extractStyles,defaultStyle:[this._defaultKMLStyle]}):"GPX"===this._currentImportType&&(i=new t.format.GPX);var s=i.readProjection(e),r=this._getMapProjectionCode(),l=null;if(l=i.readFeatures(e,{dataProjection:s,featureProjection:r}),"GPX"===this._currentImportType)for(var c=0;c<l.length;c++)null==l[c].getStyle()&&l[c].setStyle(this._defaultGPXStyle);var u=new t.source.Vector({features:l});o?u._title=u._description=o:i.readName&&i.readName(e)?u._title=u._description=i.readName(e):u._title=u._description="Import "+this._currentImportType;var h=new t.layer.Vector({source:u});if(h.gpResultLayerId="layerimport:"+this._currentImportType,n.addLayer(h),n.getView()&&n.getSize()&&u.getExtent){var d=u.getExtent();d&&d[0]!==1/0&&n.getView().fit(u.getExtent(),n.getSize())}}},l.prototype._addFeaturesFromImportStaticLayerUrl=function(e,o){var n=this.getMap();if(n&&e){var i;"KML"===this._currentImportType?i=new a({showPointNames:!1,defaultStyle:[this._defaultKMLStyle]}):"GPX"===this._currentImportType&&(i=new t.format.GPX);var s=new t.source.Vector({url:e,format:i});"GPX"===this._currentImportType&&s.forEachFeature(function(t){null==t.getStyle()&&t.setStyle(this._defaultGPXStyle)}),o?s._title=s._description=o:s._title=s._description="Import "+this._currentImportType;var r=new t.layer.Vector({source:s});if(r.gpResultLayerId="layerimport:"+this._currentImportType,n.addLayer(r),n.getView()&&n.getSize()&&s.getExtent){var l=s.getExtent();l&&l[0]!==1/0&&n.getView().fit(s.getExtent(),n.getSize())}}},l.prototype._importServiceLayers=function(){if("WFS"===this._currentImportType)return void console.log("[ol.control.LayerImport] WFS layer import is not implemented yet");this._emptyGetCapResultsList();var t=this._getCapRequestUrl=this._serviceUrlImportInput.value;if(!t)return void console.log("[ol.control.LayerImport] url parameter is mandatory");t.trim&&(t=t.trim());var o=t.indexOf("?");if(o<0?t+="?SERVICE="+this._currentImportType+"&REQUEST=GetCapabilities":o===t.length-1&&(t+="SERVICE="+this._currentImportType+"&REQUEST=GetCapabilities"),!this.options.webServicesOptions||!this.options.webServicesOptions.proxyUrl&&!this.options.webServicesOptions.noProxyDomains)return void console.log("[ol.control.LayerImport] options.webServicesOptions.proxyUrl parameter is mandatory to request web service layers (getcapabilities request)");var n=this.options.webServicesOptions.proxyUrl,i=this.options.webServicesOptions.noProxyDomains,s=!1;if(i&&Array.isArray(i)&&i.length>0)for(var r in i)t.indexOf(i[r])!==-1&&(s=!0);s===!1&&(t=n+encodeURIComponent(t)),this._displayWaitingContainer();var a=this;e.Protocols.XHR.call({url:t,method:"GET",timeOut:15e3,onResponse:function(t){a._hideWaitingContainer(),a._displayGetCapResponseLayers.call(a,t)},onFailure:function(t){a._hideWaitingContainer(),console.log("[ol.control.LayerImport] getCapabilities request failed : ",t)}})},l.prototype._displayGetCapResponseLayers=function(e){var o,n,i,s;if(this._getCapResponseWMSLayers=[],this.contentService=e,this._importPanel.style.display="none",this._getCapPanel.style.display="block","WMS"===this._currentImportType){if(o=new t.format.WMSCapabilities,!o)return;var r=this._getCapResponseWMS=o.read(e);if(r&&r.Capability&&r.Capability.Layer){var a=r.Capability.Layer;if(Array.isArray(a))for(var l=0;l<a.length;l++)this._displayGetCapResponseWMSLayer(a[l]);else this._displayGetCapResponseWMSLayer(a)}}else if("WMTS"===this._currentImportType){if(o=new t.format.WMTSCapabilities,!o)return;var c=this._getCapResponseWMTS=o.read(e);if(c&&c.Contents&&c.Contents.Layer&&(n=c.Contents.Layer,Array.isArray(n))){this._getCapResponseWMTSLayers=n;for(var u=0;u<n.length;u++)if(s=this._getWMTSLayerProjection(n[u],c),s&&"string"==typeof s){if(!t.proj.get(s)&&!t.proj.get(s.toUpperCase())){console.log("[ol.control.LayerImport] wmts layer cannot be added to map : unknown projection",n[u]);continue}i=n[u].Title,this._getCapResultsListContainer&&this._getCapResultsListContainer.appendChild(this._createImportGetCapResultElement(i,u))}}}},l.prototype._displayGetCapResponseWMSLayer=function(t,e){t||console.log("[ol.control.LayerImport] _displayGetCapResponseWMSLayer : getCapabilities layer object not found");var o,n,i=this._getMapProjectionCode();if(e){var s,r,a=["CRS","Style"];for(r=0;r<a.length;r++)if(s=a[r],Array.isArray(e[s])&&0!==e[s].length)if(Array.isArray(t[s])&&0!==t[s].length)for(var l=0;l<e[s];l++)t[s].indexOf(e[s][l])===-1&&t[s].push(e[s][l]);else t[s]=e[s];var c=["BoundingBox","EX_GeographicBoundingBox","MaxScaleDenominator","MinScaleDenominator","Attribution","Dimension","queryable","cascaded","opaque","noSubsets","fixedWidth","fixedHeight"];for(r=0;r<c.length;r++)s=c[r],e[s]&&!t[s]&&(t[s]=e[s]);!e._isRootLayer&&e.Title&&(t.Title=e.Title+" > "+t.Title)}else t._isRootLayer=!0;if(t.Layer){if(Array.isArray(t.Layer))for(var u=0;u<t.Layer.length;u++)this._displayGetCapResponseWMSLayer(t.Layer[u],t)}else{var h=this._getCapResponseWMSLayers.length;o=this._getWMSLayerProjection(t,i),o?(t._projection=o,n=t.Title,this._getCapResultsListContainer&&this._getCapResultsListContainer.appendChild(this._createImportGetCapResultElement(n,h)),this._getCapResponseWMSLayers[h]=t):console.log("[ol.control.LayerImport] wms layer cannot be added to map : unknown projection",t)}},l.prototype._onGetCapResponseLayerClick=function(t){if(t.target&&t.target.id){var e=parseInt(t.target.id.substr(23),10);if(null==e)return;var o;"WMS"===this._currentImportType?(o=this._getCapResponseWMSLayers[e],this._addGetCapWMSLayer(o)):"WMTS"===this._currentImportType&&(o=this._getCapResponseWMTSLayers[e],this._addGetCapWMTSLayer(o))}},l.prototype._addGetCapWMSLayer=function(e){var o=this.getMap();if(!o)return void console.log("[ol.control.LayerImport] _addGetCapWMSLayer error : map is not defined");if(!e)return void console.log("[ol.control.LayerImport] _addGetCapWMSLayer error : layerInfo is not defined");var n=this._getMapProjectionCode(),i={},s=this._getWMSLayerGetMapUrl();if(s)i.url=s;else{var r=this._getCapRequestUrl.indexOf("?");r!==-1?i.url=this._getCapRequestUrl.substring(0,r):i.url=this._getCapRequestUrl}if(i.params={},!e.Name)return void console.log("[ol.control.LayerImport] unable to add wms layer : mandatory layer 'name' parameter cannot be found",e);i.params.LAYERS=e.Name,i.params.SERVICE="WMS",this._getCapResponseWMS.version&&(i.params.VERSION=this._getCapResponseWMS.version);var a=e._projection;if(!a)return void console.log("[ol.control.LayerImport] wms layer cannot be added to map : unknown projection");a!==n&&(i.projection=a);var l;if(e.Style&&Array.isArray(e.Style)){var c=e.Style[0];i.params.STYLES=c.Name,c.LegendURL&&Array.isArray(c.LegendURL)&&0!==c.LegendURL.length&&(l=c.LegendURL[0].OnlineResource)}var u=new t.source.TileWMS(i);this._getWMSLayerInfoForLayerSwitcher(e,l,u);var h={};h.source=u,this._getWMSLayerMinMaxResolution(e,n,h),this._getWMSLayerExtent(e,n,h);var d=new t.layer.Tile(h);d.gpResultLayerId="layerimport:WMS",e.queryable&&(d.gpGFIparams={queryable:!0},this._getCapResponseWMS&&this._getCapResponseWMS.Capability&&this._getCapResponseWMS.Capability.Request&&this._getCapResponseWMS.Capability.Request.GetFeatureInfo&&this._getCapResponseWMS.Capability.Request.GetFeatureInfo.Format&&Array.isArray(this._getCapResponseWMS.Capability.Request.GetFeatureInfo.Format)&&(d.gpGFIparams.formats=this._getCapResponseWMS.Capability.Request.GetFeatureInfo.Format)),o.addLayer(d)},l.prototype._getWMSLayerGetMapUrl=function(){var t;if(this._getCapResponseWMS&&this._getCapResponseWMS.Capability&&this._getCapResponseWMS.Capability.Request&&this._getCapResponseWMS.Capability.Request.GetMap){var e=this._getCapResponseWMS.Capability.Request.GetMap;if(e.DCPType&&Array.isArray(e.DCPType)&&0!==e.DCPType.length){var o=e.DCPType[0];o&&o.HTTP&&o.HTTP.Get&&(t=o.HTTP.Get.OnlineResource)}}return t},l.prototype._getWMSLayerProjection=function(e,o){var n;if(e&&"object"==typeof e){var i=e.CRS;if(Array.isArray(i))for(var s=0;s<i.length;s++){var r=i[s];if(r===o){n=r;break}if(r&&"string"==typeof r&&(t.proj.get(r)||t.proj.get(r.toUpperCase()))){n=r;break}}return n}},l.prototype._getWMSLayerMinMaxResolution=function(e,o,n){var i=t.proj.get(o).getUnits();if("m"===i)e.MinScaleDenominator&&(n.minResolution=28e-5*e.MinScaleDenominator),e.MaxScaleDenominator&&(n.maxResolution=28e-5*e.MaxScaleDenominator);else if("degrees"===i){var s=28e-5*180/(6378137*Math.PI);e.MinScaleDenominator&&(n.minResolution=e.MinScaleDenominator*s),e.MaxScaleDenominator&&(n.maxResolution=e.MaxScaleDenominator*s)}},l.prototype._getWMSLayerExtent=function(e,o,n){if(!e)return void console.log("[ol.control.LayerImport] _getWMSLayerExtent error : layerInfo is not defined");var i=e.EX_GeographicBoundingBox,s=e.BoundingBox;if(i&&Array.isArray(i))"EPSG:4326"===o?n.extent=i:n.extent=t.proj.transformExtent(i,"EPSG:4326",o);else if(s&&Array.isArray(s))for(var r,a,l=0;l<s.length;l++)if(r=s[l].crs,a=s[l].extent,r){if(r===o){n.extent=a;break}if(r&&"string"==typeof r){var c=t.proj.get(r)?t.proj.get(r):t.proj.get(r.toUpperCase());if(c){if("degrees"===c.getUnits()&&0===r.toUpperCase().indexOf("EPSG")){var u=[a[1],a[0],a[3],a[2]];n.extent=t.proj.transformExtent(u,c,o)}else n.extent=t.proj.transformExtent(a,c,o);break}}}},l.prototype._getWMSLayerInfoForLayerSwitcher=function(t,e,o){if(t.Title?(o._title=t.Title,o._description=t.Abstract?t.Abstract:t.Title):(o._title=t.Name,o._description=t.Abstract?t.Abstract:t.Name),e&&(o._legends=[{url:e}]),t.MetadataURL&&Array.isArray(t.MetadataURL)){o._metadata=[];for(var n=0;n<t.MetadataURL.length;n++){var i=t.MetadataURL[n].OnlineResource;i&&o._metadata.push({url:i})}}if(t.Attribution){var s=t.Attribution;o._originators={},s.OnlineResource&&(o._originators.url=s.OnlineResource),s.Title&&(o._originators.name=o._originators.attribution=s.Title),s.LogoURL&&s.LogoURL.OnlineResource&&(o._originators.logo=s.LogoURL.OnlineResource)}},l.prototype._addGetCapWMTSLayer=function(e){if(!e||!e.Identifier)return void console.log("[ol.control.LayerImport] layer information not found in getCapabilities response for layer ");var o=this.getMap();if(o){var n={};n.layer=e.Identifier,this._getCapResponseWMTS.version&&(n.version=this._getCapResponseWMTS.version);var i=this._getWMTSLayerGetTileUrl();if(i)n.url=i;else{var s=this._getCapRequestUrl.indexOf("?");s!==-1?n.url=this._getCapRequestUrl.substring(0,s):n.url=this._getCapRequestUrl}var r=this._getTMSParams(e);n.matrixSet=r.tms,n.projection=r.projCode,n.tileGrid=new t.tilegrid.WMTS({resolutions:r.resolutions,matrixIds:r.matrixIds,origin:r.origin});var a,l;if(e.Style&&Array.isArray(e.Style))for(var c,u=0;u<e.Style.length&&(c=e.Style[u],a=c.Identifier,!c.isDefault);u++)c.LegendURL&&Array.isArray(c.LegendURL)&&0!==c.LegendURL.length&&(l=c.LegendURL[0].href);null==a&&console.log("[ol.control.LayerImport] style information not found in getCapabilities response for layer "+e.Identifier),n.style=a;var h;e.Format&&Array.isArray(e.Format)&&(h=e.Format[0]),null==h&&console.log("[ol.control.LayerImport] format information not found in getCapabilities response for layer "+e.Identifier),n.format=h;var d=new t.source.WMTS(n);e.Title?(d._title=e.Title,d._description=e.Abstract?e.Abstract:e.Title):(d._title=e.Identifier,d._description=e.Abstract?e.Abstract:e.Identifier),l&&(d._legends=[{url:l}]);var p={};p.source=d,p.extent=this._getWMTSLayerExtent(e);var m;try{m=new t.layer.Tile(p)}catch(t){return void console.log("[ol.control.LayerImport] an error occured while trying to create ol.layer.Tile from getCapabilities information. error : ",t)}m.gpResultLayerId="layerimport:WMTS",o.addLayer(m)}},l.prototype._getWMTSLayerGetTileUrl=function(){var t;if(this._getCapResponseWMTS&&this._getCapResponseWMTS.OperationsMetadata&&this._getCapResponseWMTS.OperationsMetadata.GetTile){var e=this._getCapResponseWMTS.OperationsMetadata.GetTile;e.DCP&&e.DCP.HTTP&&e.DCP.HTTP.Get&&Array.isArray(e.DCP.HTTP.Get)&&0!==e.DCP.HTTP.Get.length&&(t=e.DCP.HTTP.Get[0].href)}return t},l.prototype._getWMTSLayerProjection=function(e,o){var n;if(e&&"object"==typeof e&&o&&"object"==typeof o){if(e.TileMatrixSetLink&&Array.isArray(e.TileMatrixSetLink)){var i,s=e.TileMatrixSetLink[0].TileMatrixSet;if(o.Contents&&Array.isArray(o.Contents.TileMatrixSet))for(var r=o.Contents.TileMatrixSet,a=0;a<r.length;a++)if(r[a].Identifier===s&&r[a].TileMatrix){var l=r[a];i=l.SupportedCRS,i&&"string"==typeof i&&(t.proj.get(i)||t.proj.get(i.toUpperCase()))&&(n=i);break}}return n}},l.prototype._getTMSParams=function(e){var o,n,i,s={},r=[],a=[],l=[],c=this.getMap();if(c&&e.TileMatrixSetLink&&Array.isArray(e.TileMatrixSetLink)){if(o=e.TileMatrixSetLink[0].TileMatrixSet,this._getCapResponseWMTS.Contents&&Array.isArray(this._getCapResponseWMTS.Contents.TileMatrixSet)){for(var u=this._getCapResponseWMTS.Contents.TileMatrixSet,h=0;h<u.length;h++)if(u[h].Identifier===o&&u[h].TileMatrix){var d,p,m,f,g,_=u[h];if(_.SupportedCRS&&(n=_.SupportedCRS,i=t.proj.get(n)),i&&i.getUnits&&(g=i.getUnits()),Array.isArray(_.TileMatrix))for(var y=0;y<_.TileMatrix.length;y++)d=_.TileMatrix[y],null!=d.Identifier&&(p=parseInt(d.Identifier,10),r.push(p)),m=d.ScaleDenominator,f="degrees"===g?28e-5*m*180/(6378137*Math.PI):28e-5*m,a.push(f),l=d.TopLeftCorner;Array.isArray(a)&&void 0!==a.sort&&a.sort(function(t,e){return e-t}),Array.isArray(r)&&void 0!==r.sort&&r.sort(function(t,e){return t-e})}}else console.log("[ol.control.LayerImport] TileMatrixSet data not found in getCapabilities response for layer "+e.Identifier);return s.tms=o,s.projCode=n,s.matrixIds=r,s.resolutions=a,s.origin=l,s}},l.prototype._getWMTSLayerExtent=function(e){var o,n=this._getMapProjectionCode();return e.WGS84BoundingBox&&Array.isArray(e.WGS84BoundingBox)&&(o=t.proj.transformExtent(e.WGS84BoundingBox,"EPSG:4326",n)),o},l.prototype._getMapProjectionCode=function(){var t=this.getMap();if(t&&t.getView&&t.getView().getProjection){var e=t.getView().getProjection().getCode();return e}},l.prototype._displayWaitingContainer=function(){this._waitingContainer.className="GPimportWaitingContainerVisible",this._waiting=!0,this._timer&&(clearTimeout(this._timer),this._timer=null);var t=this;this._timer=setTimeout(function(){t._waiting===!0?t._hideWaitingContainer():t._timer&&clearTimeout(t._timer)},16e3)},l.prototype._hideWaitingContainer=function(){this._waiting&&(this._waitingContainer.className="GPimportWaitingContainerHidden",this._waiting=!1,clearTimeout(this._timer),this._timer=null)},l.prototype._clearGetCapParams=function(){this._getCapRequestUrl=null,this._getCapResponseWMS=null,this._getCapResponseWMTS=null,this._getCapResponseWMSLayers=null,this._getCapResponseWMTSLayers=null},l.prototype._emptyGetCapResultsList=function(){if(this._getCapResultsListContainer)for(;this._getCapResultsListContainer.firstChild;)this._getCapResultsListContainer.removeChild(this._getCapResultsListContainer.firstChild)},l}(ol,gp,{},Ol3Utils,Ol3ControlsUtilsMarkers,CommonControlsLayerImportDOM,CommonUtilsSelectorID,Ol3FormatsKML),Ol3ControlsGeoportalAttribution=function(t,e){function o(e){if(!(this instanceof o))throw new TypeError("ERROR CLASS_CONSTRUCTOR");t.control.Attribution.call(this,e)}return t.inherits(o,t.control.Attribution),o.prototype=Object.create(t.control.Attribution.prototype,{}),o.prototype.constructor=o,o.prototype.setMap=function(e){if(null!=e){var o=e.getControls();o.forEach(function(e){e instanceof t.control.Attribution&&!(e instanceof t.control.GeoportalAttribution)&&this.remove(e)},o),this._updateAttributions(e);var n=this;e.on("moveend",function(){n._updateAttributions(e)},this),e.getLayers().on("add",function(){n._updateAttributions(e)},this),e.getLayers().on("remove",function(){n._updateAttributions(e)},this)}t.control.Attribution.prototype.setMap.call(this,e)},o.prototype._updateAttributions=function(o){for(var n,i,s={},r=o.getView(),a=r.calculateExtent(o.getSize()),l=r.getProjection().getCode(),c=t.proj.transformExtent(a,l,"EPSG:4326"),u=[c[3],c[0],c[1],c[2]],h=r.getZoom(),d=o.getLayers().getArray(),p=0;p<d.length;p++){var m=d[p].getSource(),f="";if(n=d[p].getVisible(),i=m._originators,i&&n){for(var g=e.getAttributions({extent:u,crs:l,zoom:h,visibility:n,originators:i}),_=0;_<g.length;_++){var y=g[_];s&&s[y]||(f+=y,s[y]=!0)}if(0!==f.length){var v=new t.Attribution({html:f});m.setAttributions([v])}}}},o}(ol,CommonUtilsLayerUtils),Ol3ControlsMeasuresMeasures=function(t,e){var o={DEFAULT_POINTER_STYLE:new t.style.Circle({radius:5,stroke:new t.style.Stroke({color:"#002A50",width:2}),fill:new t.style.Fill({color:"rgba(255, 155, 0, 0.7)"})}),DEFAULT_DRAW_START_STYLE:new t.style.Style({fill:new t.style.Fill({color:"rgba(0, 183, 152, 0.2)"}),stroke:new t.style.Stroke({color:"#002A50",lineDash:[10,10],width:2})}),DEFAULT_DRAW_FINISH_STYLE:new t.style.Style({fill:new t.style.Fill({color:"rgba(0, 183, 152, 0.3)"}),stroke:new t.style.Stroke({color:"#002A50",width:3})}),tools:{MeasureLength:{active:!1,instance:null},MeasureArea:{active:!1,instance:null},MeasureAzimuth:{active:!1,instance:null}},measureDraw:null,measureSource:null,measureVector:null,sketch:null,measureTooltipElement:null,measureTooltip:null,helpTooltipElement:null,helpTooltip:null,clean:function(){this.CLASSNAME;this.clearMeasure(),this.clearMeasureToolTip(),this.removeMeasureEvents(),this._showContainer.checked=!1},onPointerMoveHandler:function(t){if(!t.dragging){var e=t.coordinate;if(this.sketch){var o,n=this.sketch.getGeometry();if(o=this.format(n),"LineString"===n.getType())e=n.getLastCoordinate();else{if("Polygon"!==n.getType())return;e=n.getInteriorPoint().getCoordinates()}this.measureTooltipElement.innerHTML=o,this.measureTooltip.setPosition(e)}}},onShowMeasureClick:function(e,o){var n=this.CLASSNAME;for(var i in this.tools)this.tools.hasOwnProperty(i)&&this.tools[i].active&&i!==n&&(this.tools[i].active=!1,this.tools[i].instance.clean());for(var s=this.getMap(),r=s.getInteractions().getArray(),a=0;a<r.length;a++)r[a].getActive()&&r[a]instanceof t.interaction.Draw&&r[a].setActive(!1);this._showContainer.checked?(this.clearMeasure(),this.clearMeasureToolTip(),this.removeMeasureEvents(),this.tools[n].active=!1):(this.addMeasureEvents(),this.initMeasureInteraction(),this.addMeasureInteraction(o),this.tools[n].active=!0)},clearMeasureToolTip:function(){for(var t=document.querySelectorAll(".ol-overlaycontainer-stopevent"),e=0;e<t.length;e++){for(var o=t[e],n=o.children.length,i=[],s=0;s<n;s++){var r=o.children[s],a=r.children[0];"tooltip tooltip-static"!==a.className&&"tooltip tooltip-measure"!==a.className||i.push(r)}for(var l=0;l<i.length;l++)o.removeChild(i[l])}},clearMeasure:function(){var t=this.getMap();this.measureVector&&(t.removeLayer(this.measureVector),this.measureVector=null),this.measureDraw&&(t.removeInteraction(this.measureDraw),this.measureDraw=null)},createMeasureTooltip:function(e){this.measureTooltipElement&&this.measureTooltipElement.parentNode.removeChild(this.measureTooltipElement),this.measureTooltipElement=document.createElement("div"),this.measureTooltipElement.className="tooltip tooltip-measure",this.measureTooltip=new t.Overlay({element:this.measureTooltipElement,offset:[0,-15],positioning:"bottom-center"}),e.addOverlay(this.measureTooltip)},createHelpTooltip:function(e){this.helpTooltipElement&&this.helpTooltipElement.parentNode.removeChild(this.helpTooltipElement),this.helpTooltipElement=document.createElement("div"),this.helpTooltipElement.className="tooltip hidden",this.helpTooltip=new t.Overlay({element:this.helpTooltipElement,offset:[15,0],positioning:"center-left"}),e.addOverlay(this.helpTooltip)},createStylingMeasureInteraction:function(e){this.options.styles=e||{};var n={image:o.DEFAULT_POINTER_STYLE,fill:o.DEFAULT_DRAW_START_STYLE.getFill(),stroke:o.DEFAULT_DRAW_START_STYLE.getStroke()};this.options.styles.hasOwnProperty("pointer")&&this.options.styles.pointer instanceof t.style.Image&&(n.image=this.options.styles.pointer),this.options.styles.hasOwnProperty("start")&&this.options.styles.start instanceof t.style.Style&&(null!=this.options.styles.start.getFill()&&(n.fill=this.options.styles.start.getFill()),null!=this.options.styles.start.getStroke()&&(n.stroke=this.options.styles.start.getStroke())),this.options.styles.start=new t.style.Style(n);var i={fill:o.DEFAULT_DRAW_FINISH_STYLE.getFill(),stroke:o.DEFAULT_DRAW_FINISH_STYLE.getStroke()};this.options.styles.hasOwnProperty("finish")&&this.options.styles.finish instanceof t.style.Style&&(null!=this.options.styles.finish.getFill()&&(i.fill=this.options.styles.finish.getFill()),null!=this.options.styles.finish.getStroke()&&(i.stroke=this.options.styles.finish.getStroke())),this.options.styles.finish=new t.style.Style(i)},addMeasureInteraction:function(e){var n=this.getMap();this.measureDraw=new t.interaction.Draw({source:this.measureSource,type:e,style:this.options.styles.start||o.DEFAULT_DRAW_START_STYLE}),this.measureDraw.setProperties({source:"Measure"}),n.addInteraction(this.measureDraw),this.createMeasureTooltip(n);var i=this;this.measureDraw.on("drawstart",function(t){i.sketch=t.feature},this),this.measureDraw.on("drawend",function(){if(i.sketch){var t,e,o=i.sketch.getGeometry();if(t=i.format(o),"LineString"===o.getType())e=o.getLastCoordinate();else{if("Polygon"!==o.getType())return;e=o.getInteriorPoint().getCoordinates()}i.measureTooltipElement.innerHTML=t,i.measureTooltip.setPosition(e)}i.measureTooltipElement.className="tooltip tooltip-static",i.measureTooltip.setOffset([0,-7]),i.sketch=null,i.measureTooltipElement=null,i.createMeasureTooltip(n)},this)},initMeasureInteraction:function(){var e=this.getMap();this.measureSource=new t.source.Vector,this.measureVector=new t.layer.Vector({source:this.measureSource,style:this.options.styles.finish||o.DEFAULT_DRAW_FINISH_STYLE}),e.addLayer(this.measureVector)}};return o}(ol,{}),CommonControlsMeasureToolBoxDOM=function(){var t={_toolboxId:"GPtoolbox-measure-main",_buttonId:"GPtoolbox-measure-button",_widgetId:"GPtoolbox-measure-widget",getToolBoxID:function(){return this._toolboxId},getButtonID:function(){return this._buttonId},getWidgetID:function(){return this._widgetId},_createToolBoxContainerElement:function(){var t=document.createElement("div");t.id=this._toolboxId,t.className="GPshowAdvancedToolPicto";var e=document.createElement("button");e.id=this._buttonId;var o=this;e.addEventListener("click",function(){this.blur();var t=document.getElementById(o._widgetId);"block"===t.style.display?t.style.display="none":t.style.display="block"}),t.appendChild(e);var n=document.createElement("div");return n.id=this._widgetId,n.addEventListener("click",function(){},!1),
  t.appendChild(n),t}};return t}(),Ol3ControlsMeasureToolBox=function(t,e,o,n){var i={add:function(t,e){if(t){var o=t.getTargetElement(),n=o.ownerDocument;if(!n.getElementById(this.getToolBoxID())){var i=this._createToolBoxContainerElement(),s=n.getElementsByClassName("ol-overlaycontainer-stopevent");s[0].appendChild(i)}var r=n.getElementById(this.getWidgetID());e.setTarget(r)}}};return o.assign(i,n),i}(ol,{},Ol3Utils,CommonControlsMeasureToolBoxDOM),CommonControlsElevationPathDOM=function(){var t={_addUID:function(t){return t+"-"+this._uid},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPelevationPath"),t.className="GPwidget",t},_createShowElevationPathElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowElevationPath"),t.type="checkbox",t},_createShowElevationPathPictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowElevationPathPicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowElevationPath"),e.title="Calculer un profil",e.addEventListener?e.addEventListener("click",function(e){t.onShowElevationPathClick(e)}):e.attachEvent&&e.attachEvent("onclick",function(e){t.onShowElevationPathClick(e)});var o=document.createElement("span");return o.id=this._addUID("GPshowElevationPathOpen"),o.className="GPshowAdvancedToolOpen",e.appendChild(o),e},_createElevationPathPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPelevationPathPanel"),t.className="GPpanel",t},_createElevationPathPanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var o=document.createElement("div");o.className="GPpanelTitle",o.innerHTML="Profil Altimétrique",e.appendChild(o);var n=document.createElement("div");n.id=this._addUID("GPelevationPathPanelReduce"),n.className="GPpanelReduce",n.title="Masquer le panneau",n.addEventListener?n.addEventListener("click",function(){"function"==typeof t.onReduceElevationPathPanelClick&&(document.getElementById(t._addUID("GPshowElevationPath")).checked=!1,t.onReduceElevationPathPanelClick())},!1):n.attachEvent&&n.attachEvent("onclick",function(){"function"==typeof t.onReduceElevationPathPanelClick&&(document.getElementById(t._addUID("GPshowElevationPath")).checked=!1,t.onReduceElevationPathPanelClick())}),e.appendChild(n);var i=document.createElement("div");return i.id=this._addUID("GPelevationPathPanelClose"),i.className="GPpanelClose",i.title="Fermer le panneau",i.addEventListener?i.addEventListener("click",function(){document.getElementById(t._addUID("GPshowElevationPathPicto")).click()},!1):i.attachEvent&&i.attachEvent("onclick",function(){document.getElementById(t._addUID("GPshowElevationPathPicto")).click()}),e.appendChild(i),e},_createElevationPathPanelProfilElement:function(){var t=document.createElement("div");return t.id="GPelevationPathProfil",t},_createElevationPathWaitingElement:function(){var t=document.createElement("div");t.id=this._addUID("GPelevationPathCalcWaitingContainer"),t.className="GPelevationPathCalcWaitingContainerHidden";var e=document.createElement("p");return e.className="GPelevationPathCalcWaiting",e.innerHTML="Calcul en cours...",t.appendChild(e),t}};return t}(),Ol3ControlsElevationPath=function(t,e,o,n,i,s,r,a,l){function c(e){if(e=e||{},!(this instanceof c))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this.CLASSNAME="ElevationPath",this._uid=l.generate(),this._showContainer=null,this._pictoContainer=null,this._panelContainer=null,this._profileContainer=null,this._waitingContainer=null,this._drawStyleStart=null,this._drawStyleFinish=null,this._markerStyle=null,this._profile=null,this._measureSource=null,this._measureVector=null,this._measureDraw=null,this._lastSketch=null,this._currentSketch=null,this._marker=null,this._noRightManagement=!1,this._initialize(e),this._checkRightsManagement();var o=e.element?e.element:this._initializeContainer();t.control.Control.call(this,{element:o,target:e.target,render:e.render})}return t.inherits(c,t.control.Control),c.prototype=Object.create(t.control.Control.prototype,{}),n.assign(c.prototype,a),c.__removeProfilMarker=function(t){var e=t;e._marker&&(e._measureSource.removeFeature(e._marker),e._marker=null)},c.__updateProfilMarker=function(e,o){var n=o,i=n.getMap(),s=i.getView().getProjection();c.__removeProfilMarker(n);var r=t.proj.transform([e.lon,e.lat],"EPSG:4326",s),a=new t.geom.Point(r);n._marker=new t.Feature({geometry:a}),n._marker.setStyle(n._markerStyle),n._measureSource.addFeature(n._marker)},c.DISPLAY_PROFILE_LIB_AMCHARTS=function(t,e,o){if("undefined"==typeof AmCharts)return void console.log("Lib. AmCharts is not loaded !");AmCharts.addInitHandler(function(){});var i=o,s={};n.mergeParams(s,i.options.styles.profile),n.mergeParams(s,{dataProvider:t}),i._profile=AmCharts.makeChart(e,s),i._profile.addListener("changed",function(t){var e=t.chart.dataProvider[t.index];c.__removeProfilMarker(i),c.__updateProfilMarker(e,i)})},c.DISPLAY_PROFILE_LIB_D3=function(t,e,o){if("undefined"==typeof d3)return void console.log("Lib. D3 is not loaded !");if(e)for(;e.firstChild;)e.removeChild(e.firstChild);var n={top:20,right:20,bottom:30,left:40},i=getComputedStyle(e,null).getPropertyValue("height").replace("px",""),s=getComputedStyle(e,null).getPropertyValue("width").replace("px",""),r=s-n.left-n.right,a=i-n.top-n.bottom,l=d3.scale.linear().range([0,r]),u=d3.scale.linear().range([a,0]),h=d3.svg.axis().scale(l).orient("bottom").ticks(5),d=d3.svg.axis().scale(u).orient("left").ticks(5),p=d3.svg.line().interpolate("basis").x(function(t){return l(t.dist)}).y(function(t){return u(t.z)}),m=d3.svg.area().interpolate("basis").x(function(t){return l(t.dist)}).y0(a).y1(function(t){return u(t.z)}),f=d3.select(e).append("svg").attr("width",r+n.left+n.right).attr("height",a+n.top+n.bottom).append("g").attr("transform","translate("+n.left+","+n.top+")"),g=d3.extent(t,function(t){return t.dist});l.domain(g);var _=[0,d3.max(t,function(t){return t.z})];u.domain(_),f.append("path").datum(t).attr("class","area-d3").attr("d",m),f.append("g").attr("class","x axis-d3").attr("transform","translate(0,"+a+")").call(h).append("text").attr("y",-15).attr("dy",".71em").attr("x",r).text("Distance (km)"),f.append("g").attr("class","y axis-d3").call(d).append("text").attr("transform","rotate(-90)").attr("y",6).attr("dy",".71em").text("Altitude (m)"),f.append("g").attr("class","grid-d3 vertical").attr("transform","translate(0,"+a+")").call(h.orient("bottom").tickSize(-a,0,0).tickFormat("")),f.append("g").attr("class","grid-d3 horizontal").call(d.orient("left").tickSize(-r,0,0).tickFormat("")),f.append("path").datum(t).attr("class","line-d3").attr("d",p),f.selectAll("circle").data(t).enter().append("circle").attr("cx",function(t){return l(t.dist)}).attr("cy",function(t){return u(t.z)}).attr("r",0).attr("class","circle-d3");var y=f.append("g").style("display","none");y.append("line").attr("id","focusLineX").attr("class","focusLine-d3"),y.append("line").attr("id","focusLineY").attr("class","focusLine-d3"),y.append("circle").attr("id","focusCircle").attr("r",4).attr("class","circle-d3 focusCircle-d3");var v=d3.select(e).append("div").attr("class","tooltip-d3").style("opacity",0),E=d3.bisector(function(t){return t.dist}).left,S=o;f.append("rect").attr("class","overlay-d3").attr("width",r).attr("height",a).on("mouseover",function(){y.style("display",null),c.__updateProfilMarker(t[0],S)}).on("mouseout",function(){y.style("display","none"),c.__removeProfilMarker(S),v.transition().duration(500).style("opacity",0)}).on("mousemove",function(){var e=d3.mouse(this),o=l.invert(e[0]),n=E(t,o),i=0===n?t[0]:t[n-1],s=t[n],r=o-i[0]>s[0]-o?s:i,a=l(r.dist),h=u(r.z);y.select("#focusCircle").attr("cx",a).attr("cy",h),y.select("#focusLineX").attr("x1",a).attr("y1",u(_[0])).attr("x2",a).attr("y2",u(_[1])),y.select("#focusLineY").attr("x1",l(g[0])).attr("y1",h).attr("x2",l(g[1])).attr("y2",h),c.__updateProfilMarker(r,S),v.transition().duration(200).style("opacity",.9),v.html("Alt : "+r.z+" m <br/>Lon : "+r.lon+" <br/>Lat : "+r.lat).style("left",d3.event.pageX+"px").style("top",d3.event.pageY-28+"px")}),S._profile=d3.selectAll("rect.overlay")[0][0]},c.DISPLAY_PROFILE_RAW=function(e,o,n){if(o)for(;o.firstChild;)o.removeChild(o.firstChild);var i=n,s=document.createElement("textarea");if(s.id="profileElevationRaw",s.rows=10,s.cols=50,s.style.width="100%",s.wrap="off",s.innerHTML=JSON.stringify(e,void 0,4),o.appendChild(s),i._profile=o,i.options.debug)for(var r=i.getMap().getView().getProjection(),a=0;a<e.length;a++){var l=e[a],u=t.proj.transform([l.lon,l.lat],"EPSG:4326",r),h=new t.geom.Point(u);i._marker=new t.Feature({geometry:h});var d=c.DEFAULT_STYLES.RESULTS,p=new t.style.Circle({radius:d.imageRadius,stroke:new t.style.Stroke({color:d.imageStrokeColor,width:d.imageStrokeWidth}),fill:new t.style.Fill({color:d.imageFillColor})});i._marker.setStyle(new t.style.Style({image:p})),i._measureSource.addFeature(i._marker)}},c.DISPLAY_PROFILE_BY_DEFAULT=function(t,e,o){if(e)for(;e.firstChild;)e.removeChild(e.firstChild);if(t){var n=JSON.parse(JSON.stringify(t));n.sort(function(t,e){return t.z-e.z});var i=n[0].z,s=n[n.length-1].z,r=s-i,a=t[t.length-1].dist,l=100/t.length,u=o,h=document.createElement("div");h.id="profileElevationByDefault",h.addEventListener("mouseover",function(t){var e=parseFloat(t.target.dataset.lon),o=parseFloat(t.target.dataset.lat);e&&o&&c.__updateProfilMarker({lon:e,lat:o},u)}),h.addEventListener("mousemove",function(){}),h.addEventListener("mouseout",function(){c.__removeProfilMarker(u)}),e.appendChild(h);var d=document.createElement("div");d.className="z-title-vertical",d.innerHTML=i+" / "+s+" m",h.appendChild(d);var p=document.createElement("ul");p.id="data-default",p.className="z-axis x-axis",h.appendChild(p);for(var m=0;m<t.length;m++){var f=t[m],g=document.createElement("li");g.setAttribute("data-z",f.z),g.setAttribute("data-lon",f.lon),g.setAttribute("data-lat",f.lat),g.setAttribute("data-dist",f.dist);var _=Math.floor(100*(f.z-i)/r);g.setAttribute("class","percent v"+_),g.title="altitude : "+f.z+"m",g.setAttribute("style","width: "+l+"%"),p.appendChild(g)}var y=document.createElement("div");y.className="x-title-horizontal",y.innerHTML=a+" km",h.appendChild(y),u._profile=e}},c.DEFAULT_STYLES={MARKER:new t.style.Icon({src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAsCAYAAAAATWqyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZS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Y9qgvkYOvXhbuH0g505Oga7HT9rPF9+t5+pDL0ulwzt46FV5ROax+JUSRRtP0LoHMK64+xNg7iqVEVOKSKRVxRGpsKhRnaRD4SPjR0J0axKCGmP7ilQxm4X8d8xXmfvHJZlPkCR3WfODl9FLMlxCIhevSJ5Nwzo1XdKxYpe3hpmB6BKdmoS43VqPxIgsni+aWOg8biZ3f+nLmSMiuvKWek/P01az7QdLyNVT7lC/l59WAKcb0iMxhzpW1nvmvpDtSiKD1l9OkpnDgv8UyMWFU9wvTP8vdY6NhJwnD1JVtso2OiiLSeL0iJUbNfg6zikVVwRTyOn2HWOfjfLtHgnBhtFIJCViyNDZUatdmnGlaFPqJIoe1WM1aqlz71ivJbLNobgAA9zgu7nZ/vstHAk5WVdzaPRqmGC5lER6kjpV4OWJdq+1kkshSk4VH9izcy/bV66qSPQZV+0J9G7rTY6+XNmqHmYwyJVV24kse1X31dhKHdasygkzy+a64oC4nWr47F4e858nSbLv4V/KAe9JKpVDrx/SImLIXMOiRUKdujESl+49O8xVZxpXzVc/C/I/RxL/hgq8YYkYhev9q6kVO4d9B+sr3vdICNaHJTHWW8Ya/87wqy2uWwstUk/gTYw3aCRGOarMDfS67kfFWqSuIe9imAjQEC272nJHixYNaSvGRIIGN49ywbsZEw1zI11N6TZSHeaGORn+F2AAJtRIMx4t+hUAAAAASUVORK5CYII=",anchor:[.5,1],snapToPixel:!0}),RESULTS:{imageRadius:5,imageFillColor:"rgba(128, 128, 128, 0.2)",imageStrokeColor:"rgba(0, 0, 0, 0.7)",imageStrokeWidth:2},PROFILE:{type:"serial",pathToImages:"http://cdn.amcharts.com/lib/3/images/",categoryField:"dist",autoMarginOffset:0,marginRight:10,marginTop:10,startDuration:0,color:"#5E5E5E",fontSize:10,theme:"light",thousandsSeparator:"",categoryAxis:{color:"#5E5E5E",gridPosition:"start",minHorizontalGap:40,tickPosition:"start",title:"Distance (km)",titleColor:"#5E5E5E",startOnAxis:!0},chartCursor:{animationDuration:0,bulletsEnabled:!0,bulletSize:10,categoryBalloonEnabled:!1,cursorColor:"#F90",graphBulletAlpha:1,graphBulletSize:1,zoomable:!1},trendLines:[],graphs:[{balloonColor:"#CCCCCC",balloonText:"<span class='altiPathValue'>[[title]] : [[value]]m</span><br/><span class='altiPathCoords'>(lat: [[lat]] / lon:[[lon]])</span>",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)"}],allLabels:[],balloon:{borderColor:"#CCCCCC",borderThickness:1,fillColor:"#FFFFFF",showBullet:!0},titles:[]}},c.prototype.constructor=c,c.prototype.setMap=function(e){e&&(this.options.active&&(null===this._profile&&(this._panelContainer.style.display="none"),this._initMeasureInteraction(e),this._addMeasureInteraction(e)),this.options.target||r.add(e,this)),t.control.Control.prototype.setMap.call(this,e)},c.prototype.getActive=function(){return this.options.active},c.prototype.setActive=function(t){this.options.active=t},c.prototype.clear=function(){var t=this.getMap();if(this._profile=null,this._profileContainer)for(;this._profileContainer.firstChild;)this._profileContainer.removeChild(this._profileContainer.firstChild);if(this._lastSketch=null,this._currentSketch=null,this._measureSource){this._marker&&(this._measureSource.removeFeature(this._marker),this._marker=null);for(var e=this._measureSource.getFeatures(),o=0;o<e.length;o++)this._measureSource.removeFeature(e[o])}this._removeMeasureInteraction(t)},c.prototype._initialize=function(t){this.options={},this.options.target="undefined"!=typeof t.target?t.target:null,this.options.render="undefined"!=typeof t.render?t.render:null,this.options.apiKey=t.apiKey;var e=t.debug;this.options.debug="undefined"!=typeof e&&e;var o=t.active;this.options.active="undefined"!=typeof o&&o;var n=t.elevationOptions;this.options.service="undefined"==typeof n||0===Object.keys(n).length?{}:n;var i=t.displayProfileOptions||{};"undefined"==typeof i||0===Object.keys(i).length?this.options.profile={apply:c.DISPLAY_PROFILE_BY_DEFAULT,target:null}:this.options.profile={};var s=i.apply||this.options.profile.apply;this.options.profile.apply="function"==typeof s?s:c.DISPLAY_PROFILE_BY_DEFAULT;var r=i.target||this.options.profile.target;this.options.profile.target="undefined"==typeof r?null:r;var a=t.stylesOptions||{};"undefined"==typeof a||0===Object.keys(a).length?this.options.styles={profile:c.DEFAULT_STYLES.PROFILE}:this.options.styles={},this.options.styles.draw=a.draw||{},this._createStylingDraw(),this.options.styles.marker=a.marker||{},this._createStylingMarker();var l=a.profile||this.options.styles.profile;this.options.styles.profile="undefined"==typeof l||0===Object.keys(l).length?c.DEFAULT_STYLES.PROFILE:l,this._createStylingProfile()},c.prototype._initializeContainer=function(){var t=this._createMainContainerElement(),e=this._showContainer=this._createShowElevationPathElement();t.appendChild(e);var o=this._pictoContainer=this._createShowElevationPathPictoElement();t.appendChild(o),this.options.active&&(this._showContainer.checked=!0);var n=this._panelContainer=this._createElevationPathPanelElement(),i=this._createElevationPathPanelHeaderElement();n.appendChild(i);var s=this._profileContainer=this._createElevationPathPanelProfilElement();n.appendChild(s);var r=this._waitingContainer=this._createElevationPathWaitingElement();return n.appendChild(r),null===this.options.profile.target&&t.appendChild(n),t},c.prototype._checkRightsManagement=function(){var t=i.check({key:this.options.apiKey,resources:["SERVICE_CALCUL_ALTIMETRIQUE_RSC"],services:["Elevation"]});t||(this._noRightManagement=!0),this.options.apiKey||(this.options.apiKey=t.key)},c.prototype._createStylingMarker=function(){var e=c.DEFAULT_STYLES.MARKER;this.options.styles.marker instanceof t.style.Image&&(e=this.options.styles.marker),this._markerStyle=new t.style.Style({image:e})},c.prototype._createStylingDraw=function(){var e=this.options.styles.draw,o={image:s.DEFAULT_POINTER_STYLE,stroke:s.DEFAULT_DRAW_START_STYLE.getStroke()};e.hasOwnProperty("pointer")&&e.pointer instanceof t.style.Image&&(o.image=e.pointer),e.hasOwnProperty("start")&&e.start instanceof t.style.Stroke&&(o.stroke=e.start),this._drawStyleStart=new t.style.Style(o);var n={stroke:s.DEFAULT_DRAW_FINISH_STYLE.getStroke()};e.hasOwnProperty("finish")&&e.finish instanceof t.style.Stroke&&(n.stroke=e.finish),this._drawStyleFinish=new t.style.Style(n)},c.prototype._createStylingProfile=function(){var t=this.options.styles.profile,e=c.DEFAULT_STYLES.PROFILE;Object.keys(e).forEach(function(o){if(!t.hasOwnProperty(o))return void(t[o]=e[o]);var i=e[o];return"object"==typeof i?(n.mergeParams(i,t[o]),void(t[o]=i)):void 0},this)},c.prototype._initMeasureInteraction=function(e){e&&(this._measureSource=new t.source.Vector,this._measureVector=new t.layer.Vector({source:this._measureSource,style:this._drawStyleFinish}),e.addLayer(this._measureVector))},c.prototype._addMeasureInteraction=function(e){if(e){this._measureDraw=new t.interaction.Draw({source:this._measureSource,type:"LineString",style:this._drawStyleStart}),this._measureDraw.setProperties({source:"ElevationPath"}),e.addInteraction(this._measureDraw);var o=this;this._measureDraw.on("drawstart",function(t){null!==o._marker&&(o._measureSource.removeFeature(o._marker),o._marker=null),null!==o._lastSketch&&(o._measureSource.removeFeature(o._lastSketch),o._lastSketch=null),o._currentSketch=t.feature;for(var e=o._measureSource.getFeatures(),n=0;n<e.length;n++)o._measureSource.removeFeature(e[n])},this),this._measureDraw.on("drawend",function(t){o._lastSketch=o._currentSketch,"undefined"==typeof o.options.service.onSuccess&&null===o.options.profile.target&&(o._panelContainer.style.display="block"),o._requestService()},this)}},c.prototype._removeMeasureInteraction=function(t){t&&(this._measureVector&&(t.removeLayer(this._measureVector),this._measureVector=null),this._measureDraw&&(t.removeInteraction(this._measureDraw),this._measureDraw=null))},c.prototype._getGeometry=function(){if(null!==this._currentSketch){for(var e=[],o=this.getMap(),n=o.getView().getProjection(),i="EPSG:4326",s=this._currentSketch.getGeometry().getCoordinates(),r=0;r<s.length;r++){var a=s[r],l=a;n!==i&&(l=t.proj.transform(a,n,i)),e.push({lon:l[0],lat:l[1]})}return e}},c.prototype._getLength=function(){if(null!==this._currentSketch){for(var e=0,o=new t.Sphere(6378137),n=this.getMap(),i=n.getView().getProjection(),s="EPSG:4326",r=this._currentSketch.getGeometry().getCoordinates(),a=0,l=r.length-1;a<l;++a){var c=t.proj.transform(r[a],i,s),u=t.proj.transform(r[a+1],i,s);e+=o.haversineDistance(c,u)}return e}},c.prototype._requestService=function(){var t=this._getGeometry();if(t&&!this._noRightManagement){var e={};n.mergeParams(e,this.options.service),n.mergeParams(e,{apiKey:this.options.apiKey});var i=this,s=function(t){t&&(i._panelContainer.style.display="block",i._displayProfile(t.elevations),i._waitingContainer.className="GPelevationPathCalcWaitingContainerHidden",i._waiting=!1)},r=function(t){i._panelContainer.style.display="none",i._waitingContainer.className="GPelevationPathCalcWaitingContainerHidden",i._waiting=!1};n.mergeParams(e,{onSuccess:this.options.service.onSuccess||s,onFailure:this.options.service.onFailure||r});var a=e.sampling;if(!a){var l=50,c=this._getLength(),u=Math.floor(c)/5;l=u>=200?200:Math.floor(u),n.mergeParams(e,{sampling:l||50})}n.mergeParams(e,{positions:t}),this._waitingContainer.className="GPelevationPathCalcWaitingContainerVisible",o.Services.getAltitude(e)}},c.prototype._computeElevationMeasure=function(e){var o=new t.Sphere(6378137);e[0].dist=0;for(var n=0,i=1;i<e.length;i++)n+=o.haversineDistance([e[i].lon,e[i].lat],[e[i-1].lon,e[i-1].lat])/1e3,e[i].dist=n,e[i].lat=Math.round(1e4*e[i].lat)/1e4,e[i].lon=Math.round(1e4*e[i].lon)/1e4;var s=100;n>100?s=1:n>10&&(s=10);for(var r=0;r<e.length;r++){var a=e[r];a.z<0&&(a.z=0),a.dist=Math.round(a.dist*s)/s}return e},c.prototype._displayProfile=function(t){var e=this._computeElevationMeasure(t),o=this.options.profile.target;o&&o.appendChild(this._panelContainer),o=this._profileContainer;var n=this,i=this.options.profile.apply;i.call(this,e,o,n)},c.prototype.onShowElevationPathClick=function(){for(var e=this.getMap(),o=e.getInteractions().getArray(),n=0;n<o.length;n++)if(o[n].getActive()&&o[n]instanceof t.interaction.Draw){var i=o[n].getProperties(),s=i.source;"undefined"!=typeof s&&"Measure"===s&&o[n].setActive(!1)}this._showContainer.checked?(this._panelContainer.style.display="none",this._removeMeasureInteraction(e),this.clear()):(null===this._profile&&(this._panelContainer.style.display="none"),this._initMeasureInteraction(e),this._addMeasureInteraction(e))},c}(ol,{},gp,Ol3Utils,CommonUtilsCheckRightManagement,Ol3ControlsMeasuresMeasures,Ol3ControlsMeasureToolBox,CommonControlsElevationPathDOM,CommonUtilsSelectorID),CommonControlsMeasureLengthDOM=function(){var t={_addUID:function(t){return t+"-"+this._uid},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPmeasureLength"),t.className="GPwidget",t},_createShowMeasureLengthElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowMeasureLength"),t.type="checkbox",t},_createShowMeasureLengthPictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowMeasureLengthPicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowMeasureLength"),e.title="Mesurer une distance",e.addEventListener?e.addEventListener("click",function(e){t.onShowMeasureLengthClick(e)}):e.attachEvent&&e.attachEvent("onclick",function(e){t.onShowMeasureLengthClick(e)});var o=document.createElement("span");return o.id=this._addUID("GPshowMeasureLengthOpen"),o.className="GPshowAdvancedToolOpen",e.appendChild(o),e}};return t}(),Ol3ControlsMeasuresMeasureLength=function(t,e,o,n,i,s,r){function a(e){if(e=e||{},!(this instanceof a))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this.CLASSNAME="MeasureLength",this._uid=r.generate(),this._showContainer=null,this._pictoContainer=null,this._initialize(e);var o=e.element?e.element:this._initializeContainer();t.control.Control.call(this,{element:o,target:e.target,render:e.render})}return t.inherits(a,t.control.Control),a.prototype=Object.create(t.control.Control.prototype,{}),o.assign(a.prototype,i),o.assign(a.prototype,s),a.prototype.constructor=a,a.prototype.setMap=function(e){var o=this.CLASSNAME;this.tools[o].instance=this,e&&(this.options.target||n.add(e,this)),t.control.Control.prototype.setMap.call(this,e)},a.prototype._initialize=function(t){this.options={},this.options.geodesic="undefined"==typeof t.geodesic||t.geodesic,this.options.target="undefined"!=typeof t.target?t.target:null,this.options.render="undefined"!=typeof t.render?t.render:null,this.createStylingMeasureInteraction(t.styles)},a.prototype._initializeContainer=function(){var t=this._createMainContainerElement(),e=this._showContainer=this._createShowMeasureLengthElement();t.appendChild(e),this._showContainer.checked=!1;var o=this._pictoContainer=this._createShowMeasureLengthPictoElement();return t.appendChild(o),t},a.prototype.addMeasureEvents=function(){var t=this.getMap();t.on("singleclick",this.onPointerMoveHandler,this),t.on("pointermove",this.onPointerMoveHandler,this)},a.prototype.removeMeasureEvents=function(){var t=this.getMap();t.un("singleclick",this.onPointerMoveHandler,this),t.un("pointermove",this.onPointerMoveHandler,this)},a.prototype.format=function(e){var o,n=this.getMap();if(this.options.geodesic){var i=new t.Sphere(6378137),s=e.getCoordinates();o=0;for(var r=n.getView().getProjection(),a=0,l=s.length-1;a<l;++a){var c=t.proj.transform(s[a],r,"EPSG:4326"),u=t.proj.transform(s[a+1],r,"EPSG:4326");o+=i.haversineDistance(c,u)}}else o=Math.round(100*e.getLength())/100;var h;return h=o>1e3?Math.round(o/1e3*100)/100+" km":Math.round(100*o)/100+" m"},a.prototype.onShowMeasureLengthClick=function(t){this.onShowMeasureClick(t,"LineString")},a}(ol,{},Ol3Utils,Ol3ControlsMeasureToolBox,Ol3ControlsMeasuresMeasures,CommonControlsMeasureLengthDOM,CommonUtilsSelectorID),CommonControlsMeasureAreaDOM=function(){var t={_addUID:function(t){return t+"-"+this._uid},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPmeasureArea"),t.className="GPwidget",t},_createShowMeasureAreaElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowMeasureArea"),t.type="checkbox",t},_createShowMeasureAreaPictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowMeasureAreaPicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowMeasureArea"),e.title="Mesurer une surface",e.addEventListener?e.addEventListener("click",function(e){t.onShowMeasureAreaClick(e)}):e.attachEvent&&e.attachEvent("onclick",function(e){t.onShowMeasureAreaClick(e)});var o=document.createElement("span");return o.id=this._addUID("GPshowMeasureAreaOpen"),o.className="GPshowAdvancedToolOpen",e.appendChild(o),e}};return t}(),Ol3ControlsMeasuresMeasureArea=function(t,e,o,n,i,s,r){function a(e){if(e=e||{},!(this instanceof a))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this.CLASSNAME="MeasureArea",this._uid=r.generate(),this._showContainer=null,this._pictoContainer=null,this._initialize(e);var o=e.element?e.element:this._initializeContainer();t.control.Control.call(this,{element:o,target:e.target,render:e.render})}return t.inherits(a,t.control.Control),a.prototype=Object.create(t.control.Control.prototype,{}),o.assign(a.prototype,i),o.assign(a.prototype,s),a.prototype.constructor=a,a.prototype.setMap=function(e){var o=this.CLASSNAME;this.tools[o].instance=this,e&&(this.options.target||n.add(e,this)),t.control.Control.prototype.setMap.call(this,e)},a.prototype._initialize=function(t){this.options={},this.options.geodesic="undefined"==typeof t.geodesic||t.geodesic,this.options.target="undefined"!=typeof t.target?t.target:null,this.options.render="undefined"!=typeof t.render?t.render:null,this.createStylingMeasureInteraction(t.styles)},a.prototype._initializeContainer=function(){var t=this._createMainContainerElement(),e=this._showContainer=this._createShowMeasureAreaElement();t.appendChild(e),this._showContainer.checked=!1;var o=this._pictoContainer=this._createShowMeasureAreaPictoElement();return t.appendChild(o),t},a.prototype.addMeasureEvents=function(){var t=this.getMap();t.on("singleclick",this.onPointerMoveHandler,this),t.on("pointermove",this.onPointerMoveHandler,this)},a.prototype.removeMeasureEvents=function(){var t=this.getMap();t.un("singleclick",this.onPointerMoveHandler,this),t.un("pointermove",this.onPointerMoveHandler,this)},a.prototype.format=function(e){var o,n=this.getMap();if(this.options.geodesic){var i=new t.Sphere(6378137),s=n.getView().getProjection(),r=e.clone().transform(s,"EPSG:4326"),a=r.getLinearRing(0).getCoordinates();o=Math.abs(i.geodesicArea(a))}else o=e.getArea();var l;return l=o>1e6?Math.round(o/1e6*100)/100+" km<sup>2</sup>":o>1e5?Math.round(o/1e6*1e3)/1e3+" km<sup>2</sup>":o>1e3?10*Math.round(o/10)+" m<sup>2</sup>":Math.round(100*o)/100+" m<sup>2</sup>"},a.prototype.onShowMeasureAreaClick=function(t){this.onShowMeasureClick(t,"Polygon")},a}(ol,{},Ol3Utils,Ol3ControlsMeasureToolBox,Ol3ControlsMeasuresMeasures,CommonControlsMeasureAreaDOM,CommonUtilsSelectorID),CommonControlsMeasureAzimuthDOM=function(){var t={_addUID:function(t){return t+"-"+this._uid},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPmeasureAzimuth"),t.className="GPwidget",t},_createShowMeasureAzimuthElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowMeasureAzimuth"),t.type="checkbox",t},_createShowMeasureAzimuthPictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowMeasureAzimuthPicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowMeasureAzimuth"),e.title="Mesurer un azimut",e.addEventListener?e.addEventListener("click",function(e){t.onShowMeasureAzimuthClick(e)}):e.attachEvent&&e.attachEvent("onclick",function(e){t.onShowMeasureAzimuthClick(e)});var o=document.createElement("span");return o.id=this._addUID("GPshowMeasureAzimuthOpen"),o.className="GPshowAdvancedToolOpen",e.appendChild(o),e}};return t}(),Ol3ControlsMeasuresMeasureAzimuth=function(t,e,o,n,i,s,r){function a(e){if(e=e||{},!(this instanceof a))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this.CLASSNAME="MeasureAzimuth",this._uid=r.generate(),this._showContainer=null,this._pictoContainer=null,this._initialize(e);var o=e.element?e.element:this._initializeContainer();t.control.Control.call(this,{element:o,target:e.target,render:e.render})}return t.inherits(a,t.control.Control),a.prototype=Object.create(t.control.Control.prototype,{}),o.assign(a.prototype,i),o.assign(a.prototype,s),a.prototype.constructor=a,a.prototype.setMap=function(e){var o=this.CLASSNAME;this.tools[o].instance=this,e&&(this.options.target||n.add(e,this)),t.control.Control.prototype.setMap.call(this,e)},a.prototype._initialize=function(t){this.options={},this.options.target="undefined"!=typeof t.target?t.target:null,this.options.render="undefined"!=typeof t.render?t.render:null,this.createStylingMeasureInteraction(t.styles)},a.prototype._initializeContainer=function(){var t=this._createMainContainerElement(),e=this._showContainer=this._createShowMeasureAzimuthElement();t.appendChild(e),this._showContainer.checked=!1;var o=this._pictoContainer=this._createShowMeasureAzimuthPictoElement();return t.appendChild(o),t},a.prototype.addMeasureEvents=function(){var t=this.getMap();t.on("singleclick",this.onPointerMoveAzimutHandler,this),t.on("pointermove",this.onPointerMoveAzimutHandler,this)},a.prototype.removeMeasureEvents=function(){var t=this.getMap();t.un("singleclick",this.onPointerMoveAzimutHandler,this),t.un("pointermove",this.onPointerMoveAzimutHandler,this)},a.prototype.format=function(e){var o=this.getMap(),n=o.getView().getProjection(),i=t.proj.transform(e.getFirstCoordinate(),n,"EPSG:4326"),s=t.proj.transform(e.getCoordinateAt(.001),n,"EPSG:4326"),r=Math.PI/180,a=180/Math.PI,l=r*i[0],c=r*s[0],u=r*i[1],h=r*s[1],d=Math.sin(c-l)*Math.cos(h),p=Math.cos(u)*Math.sin(h)-Math.sin(u)*Math.cos(h)*Math.cos(c-l),m=Math.atan2(d,p),f=a*m;f<0&&(f+=360);var g=Math.round(100*f)/100+" °";return g},a.prototype.onShowMeasureAzimuthClick=function(t){this.onShowMeasureClick(t,"LineString")},a.prototype.onPointerMoveAzimutHandler=function(t){if(this.onPointerMoveHandler(t),this.sketch){var e=this.sketch.getGeometry();e.getCoordinates().length>2&&this.measureDraw.finishDrawing()}},a}(ol,{},Ol3Utils,Ol3ControlsMeasureToolBox,Ol3ControlsMeasuresMeasures,CommonControlsMeasureAzimuthDOM,CommonUtilsSelectorID),Ol3GpPluginOl3=function(t,e,o,n,i,s,r,a,l,c,u,h,d,p,m,f,g,_,y,v,E,S,C,A){return e.ol3extVersion="0.11.0",
  e.ol3extDate="2016-12-04",e.LayerUtils=o,t.format.KMLExtended=i,s.overload(),t.source.GeoportalWMTS=r,t.source.GeoportalWMS=a,t.layer.GeoportalWMTS=l,t.layer.GeoportalWMS=c,t.control.GeoportalAttribution=y,t.control.LayerSwitcher=u,t.control.SearchEngine=h,t.control.Route=m,t.control.Isocurve=f,t.control.GeoportalMousePosition=d,t.control.Drawing=p,t.control.ReverseGeocode=g,t.control.LayerImport=_,t.control.MeasureLength=S,t.control.MeasureArea=C,t.control.MeasureAzimuth=A,t.control.DefaultMarkers=v,t.control.ElevationPath=E,e}(ol,gp,CommonUtilsLayerUtils,CommonUtilsRegister,Ol3FormatsKML,Ol3CRSCRS,Ol3LayersSourceWMTS,Ol3LayersSourceWMS,Ol3LayersLayerWMTS,Ol3LayersLayerWMS,Ol3ControlsLayerSwitcher,Ol3ControlsSearchEngine,Ol3ControlsMousePosition,Ol3ControlsDrawing,Ol3ControlsRoute,Ol3ControlsIsocurve,Ol3ControlsReverseGeocode,Ol3ControlsLayerImport,Ol3ControlsGeoportalAttribution,Ol3ControlsUtilsMarkers,Ol3ControlsElevationPath,Ol3ControlsMeasuresMeasureLength,Ol3ControlsMeasuresMeasureArea,Ol3ControlsMeasuresMeasureAzimuth),window.proj4=proj4;
  return Gp;
  }));
  