-
Notifications
You must be signed in to change notification settings - Fork 0
/
bundle.js
7 lines (7 loc) · 203 KB
/
bundle.js
1
2
3
4
5
6
7
!function t(e,i,o){function n(a,r){if(!i[a]){if(!e[a]){var l="function"==typeof require&&require;if(!r&&l)return l(a,!0);if(s)return s(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var u=i[a]={exports:{}};e[a][0].call(u.exports,function(t){var i=e[a][1][t];return n(i?i:t)},u,u.exports,t,e,i,o)}return i[a].exports}for(var s="function"==typeof require&&require,a=0;a<o.length;a++)n(o[a]);return n}({1:[function(t,e,i){e.exports={name:"Deutsch",Link:"Link","Open in editor":"Im Editor öffnen","Open in JOSM":"In JSOM öffnen","Download as GPX":"Als GPX herunterladen",Short:"Verkürzt","Select language and units":"Sprache und Einheiten auswählen",Print:"Drucken"}},{}],2:[function(t,e,i){e.exports={name:"English",Link:"Link","Open in editor":"Open in editor","Open in JOSM":"Open in JSOM","Download as GPX":"Download as GPX",Short:"Short","Select language and units":"Select language and units",Print:"Print"}},{}],3:[function(t,e,i){"use strict";function o(t){var e=v.getWaypoints().filter(function(t){return t.latLng});e=e.length,e?(1===e&&(e+=1),v.spliceWaypoints(e-1,1,t.latlng),n()):v.spliceWaypoints(0,1,t.latlng)}function n(){var t=v.getWaypoints().filter(function(t){return t.latLng}).length;if(!(2>t)){var e=f._getLinkOptions();e.waypoints=g._waypoints;var i=r.format(window.location.href,e).split("?");window.location.hash=i[1]}}var s=t("leaflet-control-geocoder");t("leaflet-routing-machine");var a=t("./src/lrm_options"),r=t("./src/links.js"),l=t("./src/leaflet_options"),h=t("./src/tools"),u=l.layer,c=r.parse(window.location.hash),p=L.extend(l.defaultView,c);u=u.reduce(function(t,e){return t[e.label]=L.tileLayer(e.tileLayer,{id:e.label}),t});var d=L.map("map",{zoomControl:!1}).setView(p.center,p.zoom);L.tileLayer("https://{s}.tiles.mapbox.com/v4/"+l.defaultView.layer+"/{z}/{x}/{y}@2x.png?access_token="+window.localStorage.getItem("mapbox_access_token"),{attribution:'Maps by <a href="https://www.mapbox.com/about/maps/">MapBox</a>. Routes from <a href="http://project-osrm.org/">OSRM</a>, data uses <a href="http://opendatacommons.org/licenses/odbl/">ODbL</a> license'}).addTo(d);var m=L.Routing.control(L.extend({language:p.language,units:p.units,serviceUrl:l.services[0].path},L.extend(a.lrm))).addTo(d),f=h.control(m,L.extend({position:"bottomleft",language:l.language},a.tools)).addTo(d);L.control.layers(u,{},{position:"bottomleft"}).addTo(d),L.control.scale().addTo(d);var _=L.Routing.Plan.extend({createGeocoders:function(){var t=L.Routing.Plan.prototype.createGeocoders.call(this);return t}}),g=new _([],{geocoder:s.nominatim(),routeWhileDragging:!0,position:"topright",useZoomParameter:!0,reverseWaypoints:!0,dragStyles:a.lrm.dragStyles,geocodersClassName:a.lrm.geocodersClassName}),v=L.Routing.control({routeWhileDragging:!0,plan:g,lineOptions:a.lrm.lineOptions,summaryTemplate:a.lrm.summaryTemplate,containerClassName:a.lrm.containerClassName,alternativeClassName:a.lrm.alternativeClassName,stepClassName:a.lrm.stepClassName}).addTo(d);p.waypoints.length>1&&v.setWaypoints(p.waypoints),d.on("click",o),g.on("waypointschanged",n)},{"./src/leaflet_options":28,"./src/links.js":29,"./src/lrm_options":31,"./src/tools":32,"leaflet-control-geocoder":13,"leaflet-routing-machine":19}],4:[function(t,e,i){(function(t){!function(o){function n(t){throw RangeError(U[t])}function s(t,e){for(var i=t.length,o=[];i--;)o[i]=e(t[i]);return o}function a(t,e){var i=t.split("@"),o="";i.length>1&&(o=i[0]+"@",t=i[1]),t=t.replace(R,".");var n=t.split("."),a=s(n,e).join(".");return o+a}function r(t){for(var e,i,o=[],n=0,s=t.length;s>n;)e=t.charCodeAt(n++),e>=55296&&56319>=e&&s>n?(i=t.charCodeAt(n++),56320==(64512&i)?o.push(((1023&e)<<10)+(1023&i)+65536):(o.push(e),n--)):o.push(e);return o}function l(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=I(t>>>10&1023|55296),t=56320|1023&t),e+=I(t)}).join("")}function h(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:b}function u(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function c(t,e,i){var o=0;for(t=i?A(t/D):t>>1,t+=A(t/e);t>O*P>>1;o+=b)t=A(t/O);return A(o+(O+1)*t/(t+C))}function p(t){var e,i,o,s,a,r,u,p,d,m,f=[],_=t.length,g=0,v=T,y=E;for(i=t.lastIndexOf(S),0>i&&(i=0),o=0;i>o;++o)t.charCodeAt(o)>=128&&n("not-basic"),f.push(t.charCodeAt(o));for(s=i>0?i+1:0;_>s;){for(a=g,r=1,u=b;s>=_&&n("invalid-input"),p=h(t.charCodeAt(s++)),(p>=b||p>A((w-g)/r))&&n("overflow"),g+=p*r,d=y>=u?x:u>=y+P?P:u-y,!(d>p);u+=b)m=b-d,r>A(w/m)&&n("overflow"),r*=m;e=f.length+1,y=c(g-a,e,0==a),A(g/e)>w-v&&n("overflow"),v+=A(g/e),g%=e,f.splice(g++,0,v)}return l(f)}function d(t){var e,i,o,s,a,l,h,p,d,m,f,_,g,v,y,L=[];for(t=r(t),_=t.length,e=T,i=0,a=E,l=0;_>l;++l)f=t[l],128>f&&L.push(I(f));for(o=s=L.length,s&&L.push(S);_>o;){for(h=w,l=0;_>l;++l)f=t[l],f>=e&&h>f&&(h=f);for(g=o+1,h-e>A((w-i)/g)&&n("overflow"),i+=(h-e)*g,e=h,l=0;_>l;++l)if(f=t[l],e>f&&++i>w&&n("overflow"),f==e){for(p=i,d=b;m=a>=d?x:d>=a+P?P:d-a,!(m>p);d+=b)y=p-m,v=b-m,L.push(I(u(m+y%v,0))),p=A(y/v);L.push(I(u(p,0))),a=c(i,g,o==s),i=0,++o}++i,++e}return L.join("")}function m(t){return a(t,function(t){return k.test(t)?p(t.slice(4).toLowerCase()):t})}function f(t){return a(t,function(t){return M.test(t)?"xn--"+d(t):t})}var _="object"==typeof i&&i&&!i.nodeType&&i,g="object"==typeof e&&e&&!e.nodeType&&e,v="object"==typeof t&&t;(v.global===v||v.window===v||v.self===v)&&(o=v);var y,L,w=2147483647,b=36,x=1,P=26,C=38,D=700,E=72,T=128,S="-",k=/^xn--/,M=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,U={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=b-x,A=Math.floor,I=String.fromCharCode;if(y={version:"1.3.2",ucs2:{decode:r,encode:l},decode:p,encode:d,toASCII:f,toUnicode:m},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return y});else if(_&&g)if(e.exports==_)g.exports=y;else for(L in y)y.hasOwnProperty(L)&&(_[L]=y[L]);else o.punycode=y}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(t,e,i){"use strict";function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,i,s){e=e||"&",i=i||"=";var a={};if("string"!=typeof t||0===t.length)return a;var r=/\+/g;t=t.split(e);var l=1e3;s&&"number"==typeof s.maxKeys&&(l=s.maxKeys);var h=t.length;l>0&&h>l&&(h=l);for(var u=0;h>u;++u){var c,p,d,m,f=t[u].replace(r,"%20"),_=f.indexOf(i);_>=0?(c=f.substr(0,_),p=f.substr(_+1)):(c=f,p=""),d=decodeURIComponent(c),m=decodeURIComponent(p),o(a,d)?n(a[d])?a[d].push(m):a[d]=[a[d],m]:a[d]=m}return a};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],6:[function(t,e,i){"use strict";function o(t,e){if(t.map)return t.map(e);for(var i=[],o=0;o<t.length;o++)i.push(e(t[o],o));return i}var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,i,r){return e=e||"&",i=i||"=",null===t&&(t=void 0),"object"==typeof t?o(a(t),function(a){var r=encodeURIComponent(n(a))+i;return s(t[a])?o(t[a],function(t){return r+encodeURIComponent(n(t))}).join(e):r+encodeURIComponent(n(t[a]))}).join(e):r?encodeURIComponent(n(r))+i+encodeURIComponent(n(t)):""};var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=Object.keys||function(t){var e=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.push(i);return e}},{}],7:[function(t,e,i){"use strict";i.decode=i.parse=t("./decode"),i.encode=i.stringify=t("./encode")},{"./decode":5,"./encode":6}],8:[function(t,e,i){function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function n(t,e,i){if(t&&h(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,i),n}function s(t){return l(t)&&(t=n(t)),t instanceof o?t.format():o.prototype.format.call(t)}function a(t,e){return n(t,!1,!0).resolve(e)}function r(t,e){return t?n(t,!1,!0).resolveObject(e):e}function l(t){return"string"==typeof t}function h(t){return"object"==typeof t&&null!==t}function u(t){return null===t}function c(t){return null==t}var p=t("punycode");i.parse=n,i.resolve=a,i.resolveObject=r,i.format=s,i.Url=o;var d=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,f=["<",">",'"',"`"," ","\r","\n"," "],_=["{","}","|","\\","^","`"].concat(f),g=["'"].concat(_),v=["%","/","?",";","#"].concat(g),y=["/","?","#"],L=255,w=/^[a-z0-9A-Z_-]{0,63}$/,b=/^([a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},C={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},D=t("querystring");o.prototype.parse=function(t,e,i){if(!l(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t;o=o.trim();var n=d.exec(o);if(n){n=n[0];var s=n.toLowerCase();this.protocol=s,o=o.substr(n.length)}if(i||n||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var a="//"===o.substr(0,2);!a||n&&P[n]||(o=o.substr(2),this.slashes=!0)}if(!P[n]&&(a||n&&!C[n])){for(var r=-1,h=0;h<y.length;h++){var u=o.indexOf(y[h]);-1!==u&&(-1===r||r>u)&&(r=u)}var c,m;m=-1===r?o.lastIndexOf("@"):o.lastIndexOf("@",r),-1!==m&&(c=o.slice(0,m),o=o.slice(m+1),this.auth=decodeURIComponent(c)),r=-1;for(var h=0;h<v.length;h++){var u=o.indexOf(v[h]);-1!==u&&(-1===r||r>u)&&(r=u)}-1===r&&(r=o.length),this.host=o.slice(0,r),o=o.slice(r),this.parseHost(),this.hostname=this.hostname||"";var f="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!f)for(var _=this.hostname.split(/\./),h=0,E=_.length;E>h;h++){var T=_[h];if(T&&!T.match(w)){for(var S="",k=0,M=T.length;M>k;k++)S+=T.charCodeAt(k)>127?"x":T[k];if(!S.match(w)){var R=_.slice(0,h),U=_.slice(h+1),O=T.match(b);O&&(R.push(O[1]),U.unshift(O[2])),U.length&&(o="/"+U.join(".")+o),this.hostname=R.join(".");break}}}if(this.hostname.length>L?this.hostname="":this.hostname=this.hostname.toLowerCase(),!f){for(var A=this.hostname.split("."),I=[],h=0;h<A.length;++h){var B=A[h];I.push(B.match(/[^A-Za-z0-9_-]/)?"xn--"+p.encode(B):B)}this.hostname=I.join(".")}var z=this.port?":"+this.port:"",N=this.hostname||"";this.host=N+z,this.href+=this.host,f&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!x[s])for(var h=0,E=g.length;E>h;h++){var W=g[h],Z=encodeURIComponent(W);Z===W&&(Z=escape(W)),o=o.split(W).join(Z)}var j=o.indexOf("#");-1!==j&&(this.hash=o.substr(j),o=o.slice(0,j));var G=o.indexOf("?");if(-1!==G?(this.search=o.substr(G),this.query=o.substr(G+1),e&&(this.query=D.parse(this.query)),o=o.slice(0,G)):e&&(this.search="",this.query={}),o&&(this.pathname=o),C[s]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var z=this.pathname||"",B=this.search||"";this.path=z+B}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",i=this.pathname||"",o=this.hash||"",n=!1,s="";this.host?n=t+this.host:this.hostname&&(n=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&h(this.query)&&Object.keys(this.query).length&&(s=D.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||C[e])&&n!==!1?(n="//"+(n||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):n||(n=""),o&&"#"!==o.charAt(0)&&(o="#"+o),a&&"?"!==a.charAt(0)&&(a="?"+a),i=i.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),e+n+i+a+o},o.prototype.resolve=function(t){return this.resolveObject(n(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(l(t)){var e=new o;e.parse(t,!1,!0),t=e}var i=new o;if(Object.keys(this).forEach(function(t){i[t]=this[t]},this),i.hash=t.hash,""===t.href)return i.href=i.format(),i;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(i[e]=t[e])}),C[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i;if(t.protocol&&t.protocol!==i.protocol){if(!C[t.protocol])return Object.keys(t).forEach(function(e){i[e]=t[e]}),i.href=i.format(),i;if(i.protocol=t.protocol,t.host||P[t.protocol])i.pathname=t.pathname;else{for(var n=(t.pathname||"").split("/");n.length&&!(t.host=n.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==n[0]&&n.unshift(""),n.length<2&&n.unshift(""),i.pathname=n.join("/")}if(i.search=t.search,i.query=t.query,i.host=t.host||"",i.auth=t.auth,i.hostname=t.hostname||t.host,i.port=t.port,i.pathname||i.search){var s=i.pathname||"",a=i.search||"";i.path=s+a}return i.slashes=i.slashes||t.slashes,i.href=i.format(),i}var r=i.pathname&&"/"===i.pathname.charAt(0),h=t.host||t.pathname&&"/"===t.pathname.charAt(0),p=h||r||i.host&&t.pathname,d=p,m=i.pathname&&i.pathname.split("/")||[],n=t.pathname&&t.pathname.split("/")||[],f=i.protocol&&!C[i.protocol];if(f&&(i.hostname="",i.port=null,i.host&&(""===m[0]?m[0]=i.host:m.unshift(i.host)),i.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===n[0]?n[0]=t.host:n.unshift(t.host)),t.host=null),p=p&&(""===n[0]||""===m[0])),h)i.host=t.host||""===t.host?t.host:i.host,i.hostname=t.hostname||""===t.hostname?t.hostname:i.hostname,i.search=t.search,i.query=t.query,m=n;else if(n.length)m||(m=[]),m.pop(),m=m.concat(n),i.search=t.search,i.query=t.query;else if(!c(t.search)){if(f){i.hostname=i.host=m.shift();var _=i.host&&i.host.indexOf("@")>0?i.host.split("@"):!1;_&&(i.auth=_.shift(),i.host=i.hostname=_.shift())}return i.search=t.search,i.query=t.query,u(i.pathname)&&u(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!m.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var g=m.slice(-1)[0],v=(i.host||t.host)&&("."===g||".."===g)||""===g,y=0,L=m.length;L>=0;L--)g=m[L],"."==g?m.splice(L,1):".."===g?(m.splice(L,1),y++):y&&(m.splice(L,1),y--);if(!p&&!d)for(;y--;y)m.unshift("..");!p||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),v&&"/"!==m.join("/").substr(-1)&&m.push("");var w=""===m[0]||m[0]&&"/"===m[0].charAt(0);if(f){i.hostname=i.host=w?"":m.length?m.shift():"";var _=i.host&&i.host.indexOf("@")>0?i.host.split("@"):!1;_&&(i.auth=_.shift(),i.host=i.hostname=_.shift())}return p=p||i.host&&m.length,p&&!w&&m.unshift(""),m.length?i.pathname=m.join("/"):(i.pathname=null,i.path=null),u(i.pathname)&&u(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=t.auth||i.auth,i.slashes=i.slashes||t.slashes,i.href=i.format(),i},o.prototype.parseHost=function(){var t=this.host,e=m.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{punycode:4,querystring:7}],9:[function(t,e,i){function o(){}function n(t,e,i){function n(){l.parentNode&&l.parentNode.removeChild(l),window[c]=o,h&&clearTimeout(h)}function r(){window[c]&&n()}"function"==typeof e&&(i=e,e={}),e||(e={});var l,h,u=e.prefix||"__jp",c=e.name||u+a++,p=e.param||"callback",d=null!=e.timeout?e.timeout:6e4,m=encodeURIComponent,f=document.getElementsByTagName("script")[0]||document.head;return d&&(h=setTimeout(function(){n(),i&&i(new Error("Timeout"))},d)),window[c]=function(t){s("jsonp got",t),n(),i&&i(null,t)},t+=(~t.indexOf("?")?"&":"?")+p+"="+m(c),t=t.replace("?&","?"),s('jsonp req "%s"',t),l=document.createElement("script"),l.src=t,f.parentNode.insertBefore(l,f),r}var s=t("debug")("jsonp");e.exports=n;var a=0},{debug:10}],10:[function(t,e,i){function o(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function n(){var t=arguments,e=this.useColors;if(t[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+t[0]+(e?"%c ":" ")+"+"+i.humanize(this.diff),!e)return t;var o="color: "+this.color;t=[t[0],o,"color: inherit"].concat(Array.prototype.slice.call(t,1));var n=0,s=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(n++,"%c"===t&&(s=n))}),t.splice(s,0,o),t}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?h.removeItem("debug"):h.debug=t}catch(e){}}function r(){var t;try{t=h.debug}catch(e){}return t}function l(){try{return window.localStorage}catch(t){}}i=e.exports=t("./debug"),i.log=s,i.formatArgs=n,i.save=a,i.load=r,i.useColors=o;var h;h="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:l(),i.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],i.formatters.j=function(t){return JSON.stringify(t)},i.enable(r())},{"./debug":11}],11:[function(t,e,i){function o(){return i.colors[u++%i.colors.length]}function n(t){function e(){}function n(){var t=n,e=+new Date,s=e-(h||e);t.diff=s,t.prev=h,t.curr=e,h=e,null==t.useColors&&(t.useColors=i.useColors()),null==t.color&&t.useColors&&(t.color=o());var a=Array.prototype.slice.call(arguments);a[0]=i.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var r=0;a[0]=a[0].replace(/%([a-z%])/g,function(e,o){if("%%"===e)return e;r++;var n=i.formatters[o];if("function"==typeof n){var s=a[r];e=n.call(t,s),a.splice(r,1),r--}return e}),"function"==typeof i.formatArgs&&(a=i.formatArgs.apply(t,a));var l=n.log||i.log||console.log.bind(console);l.apply(t,a)}e.enabled=!1,n.enabled=!0;var s=i.enabled(t)?n:e;return s.namespace=t,s}function s(t){i.save(t);for(var e=(t||"").split(/[\s,]+/),o=e.length,n=0;o>n;n++)e[n]&&(t=e[n].replace(/\*/g,".*?"),"-"===t[0]?i.skips.push(new RegExp("^"+t.substr(1)+"$")):i.names.push(new RegExp("^"+t+"$")))}function a(){i.enable("")}function r(t){var e,o;for(e=0,o=i.skips.length;o>e;e++)if(i.skips[e].test(t))return!1;for(e=0,o=i.names.length;o>e;e++)if(i.names[e].test(t))return!0;return!1}function l(t){return t instanceof Error?t.stack||t.message:t}i=e.exports=n,i.coerce=l,i.disable=a,i.enable=s,i.enabled=r,i.humanize=t("ms"),i.names=[],i.skips=[],i.formatters={};var h,u=0},{ms:12}],12:[function(t,e,i){function o(t){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var i=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return i*c;case"days":case"day":case"d":return i*u;case"hours":case"hour":case"hrs":case"hr":case"h":return i*h;case"minutes":case"minute":case"mins":case"min":case"m":return i*l;case"seconds":case"second":case"secs":case"sec":case"s":return i*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i}}}function n(t){return t>=u?Math.round(t/u)+"d":t>=h?Math.round(t/h)+"h":t>=l?Math.round(t/l)+"m":t>=r?Math.round(t/r)+"s":t+"ms"}function s(t){return a(t,u,"day")||a(t,h,"hour")||a(t,l,"minute")||a(t,r,"second")||t+" ms"}function a(t,e,i){return e>t?void 0:1.5*e>t?Math.floor(t/e)+" "+i:Math.ceil(t/e)+" "+i+"s"}var r=1e3,l=60*r,h=60*l,u=24*h,c=365.25*u;e.exports=function(t,e){return e=e||{},"string"==typeof t?o(t):e["long"]?s(t):n(t)}},{}],13:[function(t,e,i){!function(i){var o;if("function"==typeof define&&define.amd)define(["leaflet"],i);else if("undefined"!=typeof e)o=t("leaflet"),e.exports=i(o);else{if("undefined"==typeof window.L)throw"Leaflet must be loaded first";i(window.L)}}(function(t){"use strict";return t.Control.Geocoder=t.Control.extend({options:{showResultIcons:!1,collapsed:!0,expand:"click",position:"topright",placeholder:"Search...",errorMessage:"Nothing found."},_callbackId:0,initialize:function(e){t.Util.setOptions(this,e),this.options.geocoder||(this.options.geocoder=new t.Control.Geocoder.Nominatim)},onAdd:function(e){var i,o="leaflet-control-geocoder",n=t.DomUtil.create("div",o+" leaflet-bar"),s=t.DomUtil.create("a","leaflet-control-geocoder-icon",n),a=this._form=t.DomUtil.create("form",o+"-form",n);return s.innerHTML=" ",s.href="#",this._map=e,this._container=n,i=this._input=t.DomUtil.create("input"),i.type="text",i.placeholder=this.options.placeholder,t.DomEvent.addListener(i,"keydown",this._keydown,this),this._errorElement=document.createElement("div"),this._errorElement.className=o+"-form-no-error",this._errorElement.innerHTML=this.options.errorMessage,this._alts=t.DomUtil.create("ul",o+"-alternatives leaflet-control-geocoder-alternatives-minimized"),a.appendChild(i),this._container.appendChild(this._errorElement),n.appendChild(this._alts),t.DomEvent.addListener(a,"submit",this._geocode,this),this.options.collapsed?"click"===this.options.expand?t.DomEvent.addListener(s,"click",function(t){0===t.button&&2!==t.detail&&this._toggle()},this):(t.DomEvent.addListener(s,"mouseover",this._expand,this),t.DomEvent.addListener(s,"mouseout",this._collapse,this),this._map.on("movestart",this._collapse,this)):this._expand(),t.DomEvent.disableClickPropagation(n),n},_geocodeResult:function(e){if(t.DomUtil.removeClass(this._container,"leaflet-control-geocoder-throbber"),1===e.length)this._geocodeResultSelected(e[0]);else if(e.length>0){this._alts.innerHTML="",this._results=e,t.DomUtil.removeClass(this._alts,"leaflet-control-geocoder-alternatives-minimized");for(var i=0;i<e.length;i++)this._alts.appendChild(this._createAlt(e[i],i))}else t.DomUtil.addClass(this._errorElement,"leaflet-control-geocoder-error")},markGeocode:function(e){return this._map.fitBounds(e.bbox),this._geocodeMarker&&this._map.removeLayer(this._geocodeMarker),this._geocodeMarker=new t.Marker(e.center).bindPopup(e.html||e.name).addTo(this._map).openPopup(),this},_geocode:function(e){return t.DomEvent.preventDefault(e),t.DomUtil.addClass(this._container,"leaflet-control-geocoder-throbber"),this._clearResults(),this.options.geocoder.geocode(this._input.value,this._geocodeResult,this),!1},_geocodeResultSelected:function(t){this.options.collapsed?this._collapse():this._clearResults(),this.markGeocode(t)},_toggle:function(){this._container.className.indexOf("leaflet-control-geocoder-expanded")>=0?this._collapse():this._expand()},_expand:function(){t.DomUtil.addClass(this._container,"leaflet-control-geocoder-expanded"),this._input.select()},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-geocoder-expanded",""),t.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),t.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error")},_clearResults:function(){t.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),this._selection=null,t.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error")},_createAlt:function(e,i){var o=t.DomUtil.create("li"),n=t.DomUtil.create("a","",o),s=this.options.showResultIcons&&e.icon?t.DomUtil.create("img","",n):null,a=e.html?void 0:document.createTextNode(e.name),r=function(i){t.DomEvent.preventDefault(i),this._geocodeResultSelected(e)};return s&&(s.src=e.icon),o.setAttribute("data-result-index",i),e.html?n.innerHTML=e.html:n.appendChild(a),t.DomEvent.addListener(n,"click",r,this),t.DomEvent.addListener(o,"click",r,this),o},_keydown:function(e){var i=this,o=function(e){i._selection&&(t.DomUtil.removeClass(i._selection,"leaflet-control-geocoder-selected"),i._selection=i._selection[e>0?"nextSibling":"previousSibling"]),i._selection||(i._selection=i._alts[e>0?"firstChild":"lastChild"]),i._selection&&t.DomUtil.addClass(i._selection,"leaflet-control-geocoder-selected")};switch(e.keyCode){case 27:this.options.collapsed&&this._collapse();break;case 38:o(-1),t.DomEvent.preventDefault(e);break;case 40:o(1),t.DomEvent.preventDefault(e);break;case 13:if(this._selection){var n=parseInt(this._selection.getAttribute("data-result-index"),10);this._geocodeResultSelected(this._results[n]),this._clearResults(),t.DomEvent.preventDefault(e)}}return!0}}),t.Control.geocoder=function(e){return new t.Control.Geocoder(e)},t.Control.Geocoder.callbackId=0,t.Control.Geocoder.jsonp=function(e,i,o,n,s){var a="_l_geocoder_"+t.Control.Geocoder.callbackId++;i[s||"callback"]=a,window[a]=t.Util.bind(o,n);var r=document.createElement("script");r.type="text/javascript",r.src=e+t.Util.getParamString(i),r.id=a,document.getElementsByTagName("head")[0].appendChild(r)},t.Control.Geocoder.getJSON=function(e,i,o){var n=new XMLHttpRequest;n.onreadystatechange=function(){return 4==n.readyState?200!=n.status&&304!=n.status?void o(""):void o(JSON.parse(n.response)):void 0},n.open("GET",e+t.Util.getParamString(i),!0),n.setRequestHeader("Accept","application/json"),n.send(null)},t.Control.Geocoder.template=function(e,i,o){return e.replace(/\{ *([\w_]+) *\}/g,function(e,o){var n=i[o];return void 0===n?n="":"function"==typeof n&&(n=n(i)),t.Control.Geocoder.htmlEscape(n)})},t.Control.Geocoder.htmlEscape=function(){function t(t){return o[t]}var e=/[&<>"'`]/g,i=/[&<>"'`]/,o={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};return function(o){return null==o?"":o?(o=""+o,i.test(o)?o.replace(e,t):o):o+""}}(),t.Control.Geocoder.Nominatim=t.Class.extend({options:{serviceUrl:"//nominatim.openstreetmap.org/",geocodingQueryParams:{},reverseQueryParams:{},htmlTemplate:function(e){var i=e.address,o=[];return(i.road||i.building)&&o.push("{building} {road} {house_number}"),(i.city||i.town||i.village)&&o.push('<span class="'+(o.length>0?"leaflet-control-geocoder-address-detail":"")+'">{postcode} {city} {town} {village}</span>'),(i.state||i.country)&&o.push('<span class="'+(o.length>0?"leaflet-control-geocoder-address-context":"")+'">{state} {country}</span>'),t.Control.Geocoder.template(o.join("<br/>"),i,!0)}},initialize:function(e){t.Util.setOptions(this,e)},geocode:function(e,i,o){t.Control.Geocoder.jsonp(this.options.serviceUrl+"search/",t.extend({q:e,limit:5,format:"json",addressdetails:1},this.options.geocodingQueryParams),function(e){for(var n=[],s=e.length-1;s>=0;s--){for(var a=e[s].boundingbox,r=0;4>r;r++)a[r]=parseFloat(a[r]);n[s]={icon:e[s].icon,name:e[s].display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(e[s]):void 0,bbox:t.latLngBounds([a[0],a[2]],[a[1],a[3]]),center:t.latLng(e[s].lat,e[s].lon),properties:e[s]}}i.call(o,n)},this,"json_callback")},reverse:function(e,i,o,n){t.Control.Geocoder.jsonp(this.options.serviceUrl+"reverse/",t.extend({lat:e.lat,lon:e.lng,zoom:Math.round(Math.log(i/256)/Math.log(2)),addressdetails:1,format:"json"},this.options.reverseQueryParams),function(e){var i,s=[];e&&e.lat&&e.lon&&(i=t.latLng(e.lat,e.lon),s.push({name:e.display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(e):void 0,center:i,bounds:t.latLngBounds(i,i),properties:e})),o.call(n,s)},this,"json_callback")}}),t.Control.Geocoder.nominatim=function(e){return new t.Control.Geocoder.Nominatim(e)},t.Control.Geocoder.Bing=t.Class.extend({initialize:function(t){this.key=t},geocode:function(e,i,o){t.Control.Geocoder.jsonp("//dev.virtualearth.net/REST/v1/Locations",{query:e,key:this.key},function(e){var n=[];if(e.resourceSets.length>0)for(var s=e.resourceSets[0].resources.length-1;s>=0;s--){var a=e.resourceSets[0].resources[s],r=a.bbox;n[s]={name:a.name,bbox:t.latLngBounds([r[0],r[1]],[r[2],r[3]]),center:t.latLng(a.point.coordinates)}}i.call(o,n)},this,"jsonp")},reverse:function(e,i,o,n){t.Control.Geocoder.jsonp("//dev.virtualearth.net/REST/v1/Locations/"+e.lat+","+e.lng,{key:this.key},function(e){for(var i=[],s=e.resourceSets[0].resources.length-1;s>=0;s--){var a=e.resourceSets[0].resources[s],r=a.bbox;i[s]={name:a.name,bbox:t.latLngBounds([r[0],r[1]],[r[2],r[3]]),center:t.latLng(a.point.coordinates)}}o.call(n,i)},this,"jsonp")}}),t.Control.Geocoder.bing=function(e){return new t.Control.Geocoder.Bing(e)},t.Control.Geocoder.RaveGeo=t.Class.extend({options:{querySuffix:"",deepSearch:!0,wordBased:!1},jsonp:function(e,i,o){var n="_l_geocoder_"+t.Control.Geocoder.callbackId++,s=[];e.prepend=n+"(",e.append=")";for(var a in e)s.push(a+"="+escape(e[a]));window[n]=t.Util.bind(i,o);var r=document.createElement("script");r.type="text/javascript",r.src=this._serviceUrl+"?"+s.join("&"),r.id=n,document.getElementsByTagName("head")[0].appendChild(r)},initialize:function(e,i,o){t.Util.setOptions(this,o),this._serviceUrl=e,this._scheme=i},geocode:function(e,i,o){t.Control.Geocoder.jsonp(this._serviceUrl,{address:e+this.options.querySuffix,scheme:this._scheme,outputFormat:"jsonp",deepSearch:this.options.deepSearch,wordBased:this.options.wordBased},function(e){for(var n=[],s=e.length-1;s>=0;s--){var a=e[s],r=t.latLng(a.y,a.x);n[s]={name:a.address,bbox:t.latLngBounds([r]),center:r}}i.call(o,n)},this)}}),t.Control.Geocoder.raveGeo=function(e,i,o){return new t.Control.Geocoder.RaveGeo(e,i,o)},t.Control.Geocoder.MapQuest=t.Class.extend({options:{serviceUrl:"//www.mapquestapi.com/geocoding/v1"},initialize:function(e,i){this._key=decodeURIComponent(e),t.Util.setOptions(this,i)},_formatName:function(){var t,e=[];for(t=0;t<arguments.length;t++)arguments[t]&&e.push(arguments[t]);return e.join(", ")},geocode:function(e,i,o){t.Control.Geocoder.jsonp(this.options.serviceUrl+"/address",{key:this._key,location:e,limit:5,outFormat:"json"},function(e){var n,s,a=[];if(e.results&&e.results[0].locations)for(var r=e.results[0].locations.length-1;r>=0;r--)n=e.results[0].locations[r],s=t.latLng(n.latLng),a[r]={name:this._formatName(n.street,n.adminArea4,n.adminArea3,n.adminArea1),bbox:t.latLngBounds(s,s),center:s};i.call(o,a)},this)},reverse:function(e,i,o,n){t.Control.Geocoder.jsonp(this.options.serviceUrl+"/reverse",{key:this._key,location:e.lat+","+e.lng,outputFormat:"json"},function(e){var i,s,a=[];if(e.results&&e.results[0].locations)for(var r=e.results[0].locations.length-1;r>=0;r--)i=e.results[0].locations[r],s=t.latLng(i.latLng),a[r]={name:this._formatName(i.street,i.adminArea4,i.adminArea3,i.adminArea1),bbox:t.latLngBounds(s,s),center:s};o.call(n,a)},this)}}),t.Control.Geocoder.mapQuest=function(e,i){return new t.Control.Geocoder.MapQuest(e,i)},t.Control.Geocoder.Mapbox=t.Class.extend({options:{service_url:"https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/"},initialize:function(t){this._access_token=t},geocode:function(e,i,o){t.Control.Geocoder.getJSON(this.options.service_url+encodeURIComponent(e)+".json",{access_token:this._access_token},function(e){var n,s,a,r=[];if(e.features&&e.features.length)for(var l=0;l<=e.features.length-1;l++)n=e.features[l],s=t.latLng(n.center.reverse()),a=n.hasOwnProperty("bbox")?t.latLngBounds(t.latLng(n.bbox.slice(0,2).reverse()),t.latLng(n.bbox.slice(2,4).reverse())):t.latLngBounds(s,s),r[l]={name:n.place_name,bbox:a,center:s};i.call(o,r)})},suggest:function(t,e,i){return this.geocode(t,e,i)},reverse:function(e,i,o,n){t.Control.Geocoder.getJSON(this.options.service_url+encodeURIComponent(e.lng)+","+encodeURIComponent(e.lat)+".json",{access_token:this._access_token},function(e){var i,s,a,r=[];if(e.features&&e.features.length)for(var l=0;l<=e.features.length-1;l++)i=e.features[l],s=t.latLng(i.center.reverse()),a=i.hasOwnProperty("bbox")?t.latLngBounds(t.latLng(i.bbox.slice(0,2).reverse()),t.latLng(i.bbox.slice(2,4).reverse())):t.latLngBounds(s,s),r[l]={name:i.place_name,bbox:a,center:s};o.call(n,r)})}}),t.Control.Geocoder.mapbox=function(e){return new t.Control.Geocoder.Mapbox(e)},t.Control.Geocoder.What3Words=t.Class.extend({options:{serviceUrl:"http://api.what3words.com/"},initialize:function(t){this._accessToken=t},geocode:function(e,i,o){t.Control.Geocoder.getJSON(this.options.serviceUrl+"w3w",{key:this._accessToken,string:e.split(/\s+/).join(".")},function(e){var n,s,a,r=[];e.position&&e.position.length&&(n=e.words,s=t.latLng(e.position[0],e.position[1]),a=t.latLngBounds(s,s),r[0]={name:n.join("."),bbox:a,center:s}),i.call(o,r)})},suggest:function(t,e,i){return this.geocode(t,e,i)},reverse:function(e,i,o,n){t.Control.Geocoder.getJSON(this.options.serviceUrl+"position",{key:this._accessToken,position:[e.lat,e.lng].join(",")
},function(e){var i,s,a,r=[];e.position&&e.position.length&&(i=e.words,s=t.latLng(e.position[0],e.position[1]),a=t.latLngBounds(s,s),r[0]={name:i.join("."),bbox:a,center:s}),o.call(n,r)})}}),t.Control.Geocoder.what3words=function(e){return new t.Control.Geocoder.What3Words(e)},t.Control.Geocoder.Google=t.Class.extend({options:{service_url:"https://maps.googleapis.com/maps/api/geocode/json"},initialize:function(t){this._key=t},geocode:function(e,i,o){var n={address:e};this._key&&this._key.length&&(n.key=this._key),t.Control.Geocoder.getJSON(this.options.service_url,n,function(e){var n,s,a,r=[];if(e.results&&e.results.length)for(var l=0;l<=e.results.length-1;l++)n=e.results[l],s=t.latLng(n.geometry.location),a=t.latLngBounds(t.latLng(n.geometry.viewport.northeast),t.latLng(n.geometry.viewport.southwest)),r[l]={name:n.formatted_address,bbox:a,center:s};i.call(o,r)})},reverse:function(e,i,o,n){var s={latlng:encodeURIComponent(e.lat)+","+encodeURIComponent(e.lng)};this._key&&this._key.length&&(s.key=this._key),t.Control.Geocoder.getJSON(this.options.service_url,s,function(e){var i,s,a,r=[];if(e.results&&e.results.length)for(var l=0;l<=e.results.length-1;l++)i=e.results[l],s=t.latLng(i.geometry.location),a=t.latLngBounds(t.latLng(i.geometry.viewport.northeast),t.latLng(i.geometry.viewport.southwest)),r[l]={name:i.formatted_address,bbox:a,center:s};o.call(n,r)})}}),t.Control.Geocoder.google=function(e){return new t.Control.Geocoder.Google(e)},t.Control.Geocoder.Photon=t.Class.extend({options:{serviceUrl:"//photon.komoot.de/api/"},initialize:function(e){t.setOptions(this,e)},geocode:function(e,i,o){var n=t.extend({q:e},this.options.geocodingQueryParams);t.Control.Geocoder.getJSON(this.options.serviceUrl,n,function(e){var n,s,a,r,l,h,u=[];if(e&&e.features)for(n=0;n<e.features.length;n++)s=e.features[n],a=s.geometry.coordinates,r=t.latLng(a[1],a[0]),l=s.properties.extent,h=l?t.latLngBounds([l[1],l[0]],[l[3],l[2]]):t.latLngBounds(r,r),u.push({name:s.properties.name,center:r,bbox:h});i.call(o,u)})},suggest:function(t,e,i){return this.geocode(t,e,i)},reverse:function(t,e,i){e.call(i,[])}}),t.Control.Geocoder.photon=function(e){return new t.Control.Geocoder.Photon(e)},t.Control.Geocoder})},{leaflet:14}],14:[function(t,e,i){!function(t,i,o){var n=t.L,s={};s.version="0.7.2","object"==typeof e&&"object"==typeof e.exports?e.exports=s:"function"==typeof define&&define.amd&&define(s),s.noConflict=function(){return t.L=n,this},t.L=s,s.Util={extend:function(t){var e,i,o,n,s=Array.prototype.slice.call(arguments,1);for(i=0,o=s.length;o>i;i++){n=s[i]||{};for(e in n)n.hasOwnProperty(e)&&(t[e]=n[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var o,n;if("object"==typeof t){n=Array.prototype.slice.call(arguments,3);for(o in t)e.apply(i,[o,t[o]].concat(n));return!0}return!1},limitExecByInterval:function(t,e,i){var o,n;return function s(){var a=arguments;return o?void(n=!0):(o=!0,setTimeout(function(){o=!1,n&&(s.apply(i,a),n=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return s.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=s.extend({},t.options,e),t.options},getParamString:function(t,e,i){var o=[];for(var n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,i){var n=e[i];if(n===o)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,o,n=["webkit","moz","o","ms"];for(i=0;i<n.length&&!o;i++)o=t[n[i]+e];return o}function i(e){var i=+new Date,n=Math.max(0,16-(i-o));return o=i+n,t.setTimeout(e,n)}var o=0,n=t.requestAnimationFrame||e("RequestAnimationFrame")||i,a=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};s.Util.requestAnimFrame=function(e,o,a,r){return e=s.bind(e,o),a&&n===i?void e():n.call(t,e,r)},s.Util.cancelAnimFrame=function(e){e&&a.call(t,e)}}(),s.extend=s.Util.extend,s.bind=s.Util.bind,s.stamp=s.Util.stamp,s.setOptions=s.Util.setOptions,s.Class=function(){},s.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var o=new i;o.constructor=e,e.prototype=o;for(var n in this)this.hasOwnProperty(n)&&"prototype"!==n&&(e[n]=this[n]);t.statics&&(s.extend(e,t.statics),delete t.statics),t.includes&&(s.Util.extend.apply(null,[o].concat(t.includes)),delete t.includes),t.options&&o.options&&(t.options=s.extend({},o.options,t.options)),s.extend(o,t),o._initHooks=[];var a=this;return e.__super__=a.prototype,o.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;e>t;t++)o._initHooks[t].call(this)}},e},s.Class.include=function(t){s.extend(this.prototype,t)},s.Class.mergeOptions=function(t){s.extend(this.prototype.options,t)},s.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var a="_leaflet_events";s.Mixin={},s.Mixin.Events={addEventListener:function(t,e,i){if(s.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var o,n,r,l,h,u,c,p=this[a]=this[a]||{},d=i&&i!==this&&s.stamp(i);for(t=s.Util.splitWords(t),o=0,n=t.length;n>o;o++)r={action:e,context:i||this},l=t[o],d?(h=l+"_idx",u=h+"_len",c=p[h]=p[h]||{},c[d]||(c[d]=[],p[u]=(p[u]||0)+1),c[d].push(r)):(p[l]=p[l]||[],p[l].push(r));return this},hasEventListeners:function(t){var e=this[a];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[a])return this;if(!t)return this.clearAllEventListeners();if(s.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var o,n,r,l,h,u,c,p,d,m=this[a],f=i&&i!==this&&s.stamp(i);for(t=s.Util.splitWords(t),o=0,n=t.length;n>o;o++)if(r=t[o],u=r+"_idx",c=u+"_len",p=m[u],e){if(l=f&&p?p[f]:m[r]){for(h=l.length-1;h>=0;h--)l[h].action!==e||i&&l[h].context!==i||(d=l.splice(h,1),d[0].action=s.Util.falseFn);i&&p&&0===l.length&&(delete p[f],m[c]--)}}else delete m[r],delete m[u],delete m[c];return this},clearAllEventListeners:function(){return delete this[a],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,o,n,r,l,h=s.Util.extend({},e,{type:t,target:this}),u=this[a];if(u[t])for(i=u[t].slice(),o=0,n=i.length;n>o;o++)i[o].action.call(i[o].context,h);r=u[t+"_idx"];for(l in r)if(i=r[l].slice())for(o=0,n=i.length;n>o;o++)i[o].action.call(i[o].context,h);return this},addOneTimeEventListener:function(t,e,i){if(s.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var o=s.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,o,i)},this);return this.addEventListener(t,e,i).addEventListener(t,o,i)}},s.Mixin.Events.on=s.Mixin.Events.addEventListener,s.Mixin.Events.off=s.Mixin.Events.removeEventListener,s.Mixin.Events.once=s.Mixin.Events.addOneTimeEventListener,s.Mixin.Events.fire=s.Mixin.Events.fireEvent,function(){var e="ActiveXObject"in t,n=e&&!i.addEventListener,a=navigator.userAgent.toLowerCase(),r=-1!==a.indexOf("webkit"),l=-1!==a.indexOf("chrome"),h=-1!==a.indexOf("phantom"),u=-1!==a.indexOf("android"),c=-1!==a.search("android [23]"),p=-1!==a.indexOf("gecko"),d=typeof orientation!=o+"",m=t.navigator&&t.navigator.msPointerEnabled&&t.navigator.msMaxTouchPoints&&!t.PointerEvent,f=t.PointerEvent&&t.navigator.pointerEnabled&&t.navigator.maxTouchPoints||m,_="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,g=i.documentElement,v=e&&"transition"in g.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!c,L="MozPerspective"in g.style,w="OTransition"in g.style,b=!t.L_DISABLE_3D&&(v||y||L||w)&&!h,x=!t.L_NO_TOUCH&&!h&&function(){var t="ontouchstart";if(f||t in g)return!0;var e=i.createElement("div"),o=!1;return e.setAttribute?(e.setAttribute(t,"return;"),"function"==typeof e[t]&&(o=!0),e.removeAttribute(t),e=null,o):!1}();s.Browser={ie:e,ielt9:n,webkit:r,gecko:p&&!r&&!t.opera&&!e,android:u,android23:c,chrome:l,ie3d:v,webkit3d:y,gecko3d:L,opera3d:w,any3d:b,mobile:d,mobileWebkit:d&&r,mobileWebkit3d:d&&y,mobileOpera:d&&t.opera,touch:x,msPointer:m,pointer:f,retina:_}}(),s.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},s.Point.prototype={clone:function(){return new s.Point(this.x,this.y)},add:function(t){return this.clone()._add(s.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(s.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=s.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=s.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=s.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+s.Util.formatNum(this.x)+", "+s.Util.formatNum(this.y)+")"}},s.point=function(t,e,i){return t instanceof s.Point?t:s.Util.isArray(t)?new s.Point(t[0],t[1]):t===o||null===t?t:new s.Point(t,e,i)},s.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;n>o;o++)this.extend(i[o])},s.Bounds.prototype={extend:function(t){return t=s.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new s.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new s.Point(this.min.x,this.max.y)},getTopRight:function(){return new s.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof s.Point?s.point(t):s.bounds(t),t instanceof s.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=s.bounds(t);var e=this.min,i=this.max,o=t.min,n=t.max,a=n.x>=e.x&&o.x<=i.x,r=n.y>=e.y&&o.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},s.bounds=function(t,e){return!t||t instanceof s.Bounds?t:new s.Bounds(t,e)},s.Transformation=function(t,e,i,o){this._a=t,this._b=e,this._c=i,this._d=o},s.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new s.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},s.DomUtil={get:function(t){return"string"==typeof t?i.getElementById(t):t},getStyle:function(t,e){var o=t.style[e];if(!o&&t.currentStyle&&(o=t.currentStyle[e]),(!o||"auto"===o)&&i.defaultView){var n=i.defaultView.getComputedStyle(t,null);o=n?n[e]:null}return"auto"===o?null:o},getViewportOffset:function(t){var e,o=0,n=0,a=t,r=i.body,l=i.documentElement;do{if(o+=a.offsetTop||0,n+=a.offsetLeft||0,o+=parseInt(s.DomUtil.getStyle(a,"borderTopWidth"),10)||0,n+=parseInt(s.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,e=s.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===e)break;if("fixed"===e){o+=r.scrollTop||l.scrollTop||0,n+=r.scrollLeft||l.scrollLeft||0;break}if("relative"===e&&!a.offsetLeft){var h=s.DomUtil.getStyle(a,"width"),u=s.DomUtil.getStyle(a,"max-width"),c=a.getBoundingClientRect();("none"!==h||"none"!==u)&&(n+=c.left+a.clientLeft),o+=c.top+(r.scrollTop||l.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;o-=a.scrollTop||0,n-=a.scrollLeft||0,a=a.parentNode}while(a);return new s.Point(n,o)},documentIsLtr:function(){return s.DomUtil._docIsLtrCached||(s.DomUtil._docIsLtrCached=!0,s.DomUtil._docIsLtr="ltr"===s.DomUtil.getStyle(i.body,"direction")),s.DomUtil._docIsLtr},create:function(t,e,o){var n=i.createElement(t);return n.className=e,o&&o.appendChild(n),n},hasClass:function(t,e){if(t.classList!==o)return t.classList.contains(e);var i=s.DomUtil._getClass(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)},addClass:function(t,e){if(t.classList!==o)for(var i=s.Util.splitWords(e),n=0,a=i.length;a>n;n++)t.classList.add(i[n]);else if(!s.DomUtil.hasClass(t,e)){var r=s.DomUtil._getClass(t);s.DomUtil._setClass(t,(r?r+" ":"")+e)}},removeClass:function(t,e){t.classList!==o?t.classList.remove(e):s.DomUtil._setClass(t,s.Util.trim((" "+s.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){t.className.baseVal===o?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===o?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,o="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(o)}catch(n){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+o+"(opacity="+e+")"}},testProp:function(t){for(var e=i.documentElement.style,o=0;o<t.length;o++)if(t[o]in e)return t[o];return!1},getTranslateString:function(t){var e=s.Browser.webkit3d,i="translate"+(e?"3d":"")+"(",o=(e?",0":"")+")";return i+t.x+"px,"+t.y+"px"+o},getScaleString:function(t,e){var i=s.DomUtil.getTranslateString(e.add(e.multiplyBy(-1*t))),o=" scale("+t+") ";return i+o},setPosition:function(t,e,i){t._leaflet_pos=e,!i&&s.Browser.any3d?t.style[s.DomUtil.TRANSFORM]=s.DomUtil.getTranslateString(e):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos}},s.DomUtil.TRANSFORM=s.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),s.DomUtil.TRANSITION=s.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),s.DomUtil.TRANSITION_END="webkitTransition"===s.DomUtil.TRANSITION||"OTransition"===s.DomUtil.TRANSITION?s.DomUtil.TRANSITION+"End":"transitionend",function(){if("onselectstart"in i)s.extend(s.DomUtil,{disableTextSelection:function(){s.DomEvent.on(t,"selectstart",s.DomEvent.preventDefault)},enableTextSelection:function(){s.DomEvent.off(t,"selectstart",s.DomEvent.preventDefault)}});else{var e=s.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);s.extend(s.DomUtil,{disableTextSelection:function(){if(e){var t=i.documentElement.style;this._userSelect=t[e],t[e]="none"}},enableTextSelection:function(){e&&(i.documentElement.style[e]=this._userSelect,delete this._userSelect)}})}s.extend(s.DomUtil,{disableImageDrag:function(){s.DomEvent.on(t,"dragstart",s.DomEvent.preventDefault)},enableImageDrag:function(){s.DomEvent.off(t,"dragstart",s.DomEvent.preventDefault)}})}(),s.LatLng=function(t,e,i){if(t=parseFloat(t),e=parseFloat(e),isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=t,this.lng=e,i!==o&&(this.alt=parseFloat(i))},s.extend(s.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),s.LatLng.prototype={equals:function(t){if(!t)return!1;t=s.latLng(t);var e=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return e<=s.LatLng.MAX_MARGIN},toString:function(t){return"LatLng("+s.Util.formatNum(this.lat,t)+", "+s.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){t=s.latLng(t);var e=6378137,i=s.LatLng.DEG_TO_RAD,o=(t.lat-this.lat)*i,n=(t.lng-this.lng)*i,a=this.lat*i,r=t.lat*i,l=Math.sin(o/2),h=Math.sin(n/2),u=l*l+h*h*Math.cos(a)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))},wrap:function(t,e){var i=this.lng;return t=t||-180,e=e||180,i=(i+e)%(e-t)+(t>i||i===e?e:t),new s.LatLng(this.lat,i)}},s.latLng=function(t,e){return t instanceof s.LatLng?t:s.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new s.LatLng(t[0],t[1],t[2]):null:t===o||null===t?t:"object"==typeof t&&"lat"in t?new s.LatLng(t.lat,"lng"in t?t.lng:t.lon):e===o?null:new s.LatLng(t,e)},s.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;n>o;o++)this.extend(i[o])},s.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=s.latLng(t);return t=null!==e?e:s.latLngBounds(t),t instanceof s.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new s.LatLng(t.lat,t.lng),this._northEast=new s.LatLng(t.lat,t.lng)):t instanceof s.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,o=Math.abs(e.lat-i.lat)*t,n=Math.abs(e.lng-i.lng)*t;return new s.LatLngBounds(new s.LatLng(e.lat-o,e.lng-n),new s.LatLng(i.lat+o,i.lng+n))},getCenter:function(){return new s.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new s.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new s.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof s.LatLng?s.latLng(t):s.latLngBounds(t);var e,i,o=this._southWest,n=this._northEast;return t instanceof s.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=o.lat&&i.lat<=n.lat&&e.lng>=o.lng&&i.lng<=n.lng},intersects:function(t){t=s.latLngBounds(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),n=t.getNorthEast(),a=n.lat>=e.lat&&o.lat<=i.lat,r=n.lng>=e.lng&&o.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=s.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},s.latLngBounds=function(t,e){return!t||t instanceof s.LatLngBounds?t:new s.LatLngBounds(t,e)},s.Projection={},s.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=s.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),n=t.lng*e,a=o*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new s.Point(n,a)},unproject:function(t){var e=s.LatLng.RAD_TO_DEG,i=t.x*e,o=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new s.LatLng(o,i)}},s.Projection.LonLat={project:function(t){return new s.Point(t.lng,t.lat)},unproject:function(t){return new s.LatLng(t.y,t.x)}},s.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),o=this.scale(e);return this.transformation._transform(i,o)},pointToLatLng:function(t,e){var i=this.scale(e),o=this.transformation.untransform(t,i);return this.projection.unproject(o)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return s.point(e,e)}},s.CRS.Simple=s.extend({},s.CRS,{projection:s.Projection.LonLat,transformation:new s.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),s.CRS.EPSG3857=s.extend({},s.CRS,{code:"EPSG:3857",projection:s.Projection.SphericalMercator,transformation:new s.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),s.CRS.EPSG900913=s.extend({},s.CRS.EPSG3857,{code:"EPSG:900913"}),s.CRS.EPSG4326=s.extend({},s.CRS,{code:"EPSG:4326",projection:s.Projection.LonLat,transformation:new s.Transformation(1/360,.5,-1/360,.5)}),s.Map=s.Class.extend({includes:s.Mixin.Events,options:{crs:s.CRS.EPSG3857,fadeAnimation:s.DomUtil.TRANSITION&&!s.Browser.android23,trackResize:!0,markerZoomAnimation:s.DomUtil.TRANSITION&&s.Browser.any3d},initialize:function(t,e){e=s.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=s.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==o&&this.setView(s.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===o?this.getZoom():e,this._resetView(s.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var o=this.getZoomScale(e),n=this.getSize().divideBy(2),a=t instanceof s.Point?t:this.latLngToContainerPoint(t),r=a.subtract(n).multiplyBy(1-1/o),l=this.containerPointToLatLng(n.add(r));return this.setView(l,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():s.latLngBounds(t);var i=s.point(e.paddingTopLeft||e.padding||[0,0]),o=s.point(e.paddingBottomRight||e.padding||[0,0]),n=this.getBoundsZoom(t,!1,i.add(o)),a=o.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),n),l=this.project(t.getNorthEast(),n),h=this.unproject(r.add(l).divideBy(2).add(a),n);return n=e&&e.maxZoom?Math.min(e.maxZoom,n):n,this.setView(h,n,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(s.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=s.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),o=this._limitCenter(i,this._zoom,t);return i.equals(o)?this:this.panTo(o,e)},addLayer:function(t){var e=s.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&s.TileLayer&&t instanceof s.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=s.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&s.TileLayer&&t instanceof s.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return t?s.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=s.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),o=e.divideBy(2).round(),n=i.divideBy(2).round(),a=o.subtract(n);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=o}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new s.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===o?this._layersMinZoom===o?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===o?this._layersMaxZoom===o?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=s.latLngBounds(t);var o,n=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),l=t.getNorthWest(),h=t.getSouthEast(),u=!0;i=s.point(i||[0,0]);do n++,o=this.project(h,n).subtract(this.project(l,n)).add(i),u=e?o.x<r.x||o.y<r.y:r.contains(o);while(u&&a>=n);return u&&e?null:e?n:n-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new s.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new s.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===o?this._zoom:e,this.options.crs.latLngToPoint(s.latLng(t),e)},unproject:function(t,e){return e=e===o?this._zoom:e,this.options.crs.pointToLatLng(s.point(t),e)},layerPointToLatLng:function(t){var e=s.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(s.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return s.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return s.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(s.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(s.latLng(t)))},mouseEventToContainerPoint:function(t){return s.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=s.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;s.DomUtil.addClass(t,"leaflet-container"+(s.Browser.touch?" leaflet-touch":"")+(s.Browser.retina?" leaflet-retina":"")+(s.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=s.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(s.DomUtil.addClass(t.markerPane,e),s.DomUtil.addClass(t.shadowPane,e),s.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return s.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?s.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,o){var n=this._zoom!==e;o||(this.fire("movestart"),n&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):s.DomUtil.setPosition(this._mapPane,new s.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!i}),a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(n||o)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){s.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,i=-(1/0),n=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(i=Math.max(i,s.options.maxZoom))}t===o?this._layersMaxZoom=this._layersMinZoom=o:(this._layersMaxZoom=i,this._layersMinZoom=e),n!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(s.DomEvent){e=e||"on",s.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,o,n=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,o=n.length;o>i;i++)s.DomEvent[e](this._container,n[i],this._fireMouseEvent,this);this.options.trackResize&&s.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){s.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=s.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||s.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!s.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&s.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),o=this.containerPointToLayerPoint(i),n=this.layerPointToLatLng(o);this.fire(e,{latlng:n,layerPoint:o,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable();
},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return s.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var o=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(o)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var o=this.project(t,e),n=this.getSize().divideBy(2),a=new s.Bounds(o.subtract(n),o.add(n)),r=this._getBoundsOffset(a,i,e);return this.unproject(o.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),o=new s.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(o,e))},_getBoundsOffset:function(t,e,i){var o=this.project(e.getNorthWest(),i).subtract(t.min),n=this.project(e.getSouthEast(),i).subtract(t.max),a=this._rebound(o.x,-n.x),r=this._rebound(o.y,-n.y);return new s.Point(a,r)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),s.map=function(t,e){return new s.Map(t,e)},s.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=s.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),n=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*n,l=o*e,h=a/n,u=Math.sqrt(1-h*h),c=u*Math.sin(l);c=Math.pow((1-c)/(1+c),.5*u);var p=Math.tan(.5*(.5*Math.PI-l))/c;return l=-n*Math.log(p),new s.Point(r,l)},unproject:function(t){for(var e,i=s.LatLng.RAD_TO_DEG,o=this.R_MAJOR,n=this.R_MINOR,a=t.x*i/o,r=n/o,l=Math.sqrt(1-r*r),h=Math.exp(-t.y/o),u=Math.PI/2-2*Math.atan(h),c=15,p=1e-7,d=c,m=.1;Math.abs(m)>p&&--d>0;)e=l*Math.sin(u),m=Math.PI/2-2*Math.atan(h*Math.pow((1-e)/(1+e),.5*l))-u,u+=m;return new s.LatLng(u*i,a)}},s.CRS.EPSG3395=s.extend({},s.CRS,{code:"EPSG:3395",projection:s.Projection.Mercator,transformation:function(){var t=s.Projection.Mercator,e=t.R_MAJOR,i=.5/(Math.PI*e);return new s.Transformation(i,.5,-i,.5)}()}),s.TileLayer=s.Class.extend({includes:s.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:s.Browser.mobile,updateWhenIdle:s.Browser.mobile},initialize:function(t,e){e=s.setOptions(this,e),e.detectRetina&&s.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=s.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=s.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==o&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,o,n,s=t.children,a=-e(1/0,-(1/0));for(o=0,n=s.length;n>o;o++)s[o]!==this._container&&(i=parseInt(s[o].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(s.Browser.ielt9)for(t in e)s.DomUtil.setOpacity(e[t],this.options.opacity);else s.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=s.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=s.DomUtil.create("div",e,this._container),this._tileContainer=s.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,o=this.options.tileSize;return i&&e>i&&(o=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*o)),o},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),o=this._getTileSize();if(!(i>this.options.maxZoom||i<this.options.minZoom)){var n=s.bounds(e.min.divideBy(o)._floor(),e.max.divideBy(o)._floor());this._addTilesFromCenterOut(n),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(n)}}},_addTilesFromCenterOut:function(t){var e,o,n,a=[],r=t.getCenter();for(e=t.min.y;e<=t.max.y;e++)for(o=t.min.x;o<=t.max.x;o++)n=new s.Point(o,e),this._tileShouldBeLoaded(n)&&a.push(n);var l=a.length;if(0!==l){a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)});var h=i.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=l,o=0;l>o;o++)this._addTile(a[o],h);this._tileContainer.appendChild(h)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var o=e.tileSize,n=t.multiplyBy(o),s=n.add([o,o]),a=this._map.unproject(n),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,o,n;for(n in this._tiles)e=n.split(":"),i=parseInt(e[0],10),o=parseInt(e[1],10),(i<t.min.x||i>t.max.x||o<t.min.y||o>t.max.y)&&this._removeTile(n)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(s.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),s.Browser.android||(e.onload=null,e.src=s.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),o=this._getTile();s.DomUtil.setPosition(o,i,s.Browser.chrome),this._tiles[t.x+":"+t.y]=o,this._loadTile(o,t),o.parentNode!==this._tileContainer&&e.appendChild(o)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return s.Util.template(this._url,s.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){var t=this._map.options.crs,e=t.getSize(this._map.getZoom());return e.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=s.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=s.Util.falseFn,s.Browser.ielt9&&this.options.opacity!==o&&s.DomUtil.setOpacity(t,this.options.opacity),s.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&s.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(s.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==s.Util.emptyImageUrl&&(s.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),s.tileLayer=function(t,e){return new s.TileLayer(t,e)},s.TileLayer.WMS=s.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=s.extend({},this.defaultWmsParams),o=e.tileSize||this.options.tileSize;e.detectRetina&&s.Browser.retina?i.width=i.height=2*o:i.width=i.height=o;for(var n in e)this.options.hasOwnProperty(n)||"crs"===n||(i[n]=e[n]);this.wmsParams=i,s.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,s.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,o=t.multiplyBy(i),n=o.add([i,i]),a=this._crs.project(e.unproject(o,t.z)),r=this._crs.project(e.unproject(n,t.z)),l=this._wmsVersion>=1.3&&this._crs===s.CRS.EPSG4326?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),h=s.Util.template(this._url,{s:this._getSubdomain(t)});return h+s.Util.getParamString(this.wmsParams,h,!0)+"&BBOX="+l},setParams:function(t,e){return s.extend(this.wmsParams,t),e||this.redraw(),this}}),s.tileLayer.wms=function(t,e){return new s.TileLayer.WMS(t,e)},s.TileLayer.Canvas=s.TileLayer.extend({options:{async:!1},initialize:function(t){s.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=s.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=s.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),s.tileLayer.canvas=function(t){return new s.TileLayer.Canvas(t)},s.ImageOverlay=s.Class.extend({includes:s.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=s.latLngBounds(e),s.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&s.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=s.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&s.Browser.any3d?s.DomUtil.addClass(this._image,"leaflet-zoom-animated"):s.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),s.extend(this._image,{galleryimg:"no",onselectstart:s.Util.falseFn,onmousemove:s.Util.falseFn,onload:s.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,o=e.getZoomScale(t.zoom),n=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(n,t.zoom,t.center),l=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),h=r._add(l._multiplyBy(.5*(1-1/o)));i.style[s.DomUtil.TRANSFORM]=s.DomUtil.getTranslateString(h)+" scale("+o+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);s.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){s.DomUtil.setOpacity(this._image,this.options.opacity)}}),s.imageOverlay=function(t,e,i){return new s.ImageOverlay(t,e,i)},s.Icon=s.Class.extend({options:{className:""},initialize:function(t){s.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var o;return o=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(o,t),o},_setIconStyles:function(t,e){var i,o=this.options,n=s.point(o[e+"Size"]);i="shadow"===e?s.point(o.shadowAnchor||o.iconAnchor):s.point(o.iconAnchor),!i&&n&&(i=n.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+o.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")},_createImg:function(t,e){return e=e||i.createElement("img"),e.src=t,e},_getIconUrl:function(t){return s.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),s.icon=function(t){return new s.Icon(t)},s.Icon.Default=s.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];s.Browser.retina&&"icon"===t&&(t+="-2x");var i=s.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),s.Icon.Default.imagePath=function(){var t,e,o,n,s,a=i.getElementsByTagName("script"),r=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,e=a.length;e>t;t++)if(o=a[t].src,n=o.match(r))return s=o.split(r)[0],(s?s+"/":"")+"images"}(),s.Marker=s.Class.extend({includes:s.Mixin.Events,options:{icon:new s.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){s.setOptions(this,e),this._latlng=s.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=s.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,o=i?"leaflet-zoom-animated":"leaflet-zoom-hide",n=t.icon.createIcon(this._icon),a=!1;n!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(n.title=t.title),t.alt&&(n.alt=t.alt)),s.DomUtil.addClass(n,o),t.keyboard&&(n.tabIndex="0"),this._icon=n,this._initInteraction(),t.riseOnHover&&s.DomEvent.on(n,"mouseover",this._bringToFront,this).on(n,"mouseout",this._resetZIndex,this);var r=t.icon.createShadow(this._shadow),l=!1;r!==this._shadow&&(this._removeShadow(),l=!0),r&&s.DomUtil.addClass(r,o),this._shadow=r,t.opacity<1&&this._updateOpacity();var h=this._map._panes;a&&h.markerPane.appendChild(this._icon),r&&l&&h.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&s.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){s.DomUtil.setPosition(this._icon,t),this._shadow&&s.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];s.DomUtil.addClass(t,"leaflet-clickable"),s.DomEvent.on(t,"click",this._onMouseClick,this),s.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)s.DomEvent.on(t,e[i],this._fireMouseEvent,this);s.Handler.MarkerDrag&&(this.dragging=new s.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(t){var e=this.dragging&&this.dragging.moved();(this.hasEventListeners(t.type)||e)&&s.DomEvent.stopPropagation(t),e||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(t.type,{originalEvent:t,latlng:this._latlng})},_onKeyPress:function(t){13===t.keyCode&&this.fire("click",{originalEvent:t,latlng:this._latlng})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t,latlng:this._latlng}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&s.DomEvent.preventDefault(t),"mousedown"!==t.type?s.DomEvent.stopPropagation(t):s.DomEvent.preventDefault(t)},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){s.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&s.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),s.marker=function(t,e){return new s.Marker(t,e)},s.DivIcon=s.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:i.createElement("div"),o=this.options;return o.html!==!1?e.innerHTML=o.html:e.innerHTML="",o.bgPos&&(e.style.backgroundPosition=-o.bgPos.x+"px "+-o.bgPos.y+"px"),this._setIconStyles(e,"icon"),e},createShadow:function(){return null}}),s.divIcon=function(t){return new s.DivIcon(t)},s.Map.mergeOptions({closePopupOnClick:!0}),s.Popup=s.Class.extend({includes:s.Mixin.Events,options:{minWidth:50,maxWidth:300,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(t,e){s.setOptions(this,t),this._source=e,this._animated=s.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._container||this._initLayout();var e=t.options.fadeAnimation;e&&s.DomUtil.setOpacity(this._container,0),t._panes.popupPane.appendChild(this._container),t.on(this._getEvents(),this),this.update(),e&&s.DomUtil.setOpacity(this._container,1),this.fire("open"),t.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(t){return t.addLayer(this),this},openOn:function(t){return t.openPopup(this),this},onRemove:function(t){t._panes.popupPane.removeChild(this._container),s.Util.falseFn(this._container.offsetWidth),t.off(this._getEvents(),this),t.options.fadeAnimation&&s.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),t.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=s.latLng(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_getEvents:function(){var t={viewreset:this._updatePosition};return this._animated&&(t.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,e="leaflet-popup",i=e+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),o=this._container=s.DomUtil.create("div",i);this.options.closeButton&&(t=this._closeButton=s.DomUtil.create("a",e+"-close-button",o),t.href="#close",t.innerHTML="×",s.DomEvent.disableClickPropagation(t),s.DomEvent.on(t,"click",this._onCloseButtonClick,this));var n=this._wrapper=s.DomUtil.create("div",e+"-content-wrapper",o);s.DomEvent.disableClickPropagation(n),this._contentNode=s.DomUtil.create("div",e+"-content",n),s.DomEvent.disableScrollPropagation(this._contentNode),s.DomEvent.on(n,"contextmenu",s.DomEvent.stopPropagation),this._tipContainer=s.DomUtil.create("div",e+"-tip-container",o),this._tip=s.DomUtil.create("div",e+"-tip",this._tipContainer)},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var o=t.offsetHeight,n=this.options.maxHeight,a="leaflet-popup-scrolled";n&&o>n?(e.height=n+"px",s.DomUtil.addClass(t,a)):s.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=s.point(this.options.offset);e&&s.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);s.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,o=new s.Point(this._containerLeft,-e-this._containerBottom);this._animated&&o._add(s.DomUtil.getPosition(this._container));var n=t.layerPointToContainerPoint(o),a=s.point(this.options.autoPanPadding),r=s.point(this.options.autoPanPaddingTopLeft||a),l=s.point(this.options.autoPanPaddingBottomRight||a),h=t.getSize(),u=0,c=0;n.x+i+l.x>h.x&&(u=n.x+i-h.x+l.x),n.x-u-r.x<0&&(u=n.x-r.x),n.y+e+l.y>h.y&&(c=n.y+e-h.y+l.y),n.y-c-r.y<0&&(c=n.y-r.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),s.DomEvent.stop(t)}}),s.popup=function(t,e){return new s.Popup(t,e)},s.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof s.Popup)){var o=t;t=new s.Popup(i).setLatLng(e).setContent(o)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),s.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=s.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(s.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=s.extend({offset:i},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof s.Popup?(s.setOptions(t,e),this._popup=t):this._popup=new s.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),s.LayerGroup=s.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,o=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,o);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return s.stamp(t)}}),s.layerGroup=function(t){return new s.LayerGroup(t)},s.FeatureGroup=s.LayerGroup.extend({includes:s.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(s.FeatureGroup.EVENTS,this._propagateEvent,this),s.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.off(s.FeatureGroup.EVENTS,this._propagateEvent,this),s.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new s.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof s.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=s.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),s.featureGroup=function(t){return new s.FeatureGroup(t)},s.Path=s.Class.extend({includes:[s.Mixin.Events],statics:{CLIP_PADDING:function(){var e=s.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){s.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,s.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return s.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),s.Map.include({_updatePathViewport:function(){var t=s.Path.CLIP_PADDING,e=this.getSize(),i=s.DomUtil.getPosition(this._mapPane),o=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),n=o.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new s.Bounds(o,n)}}),s.Path.SVG_NS="http://www.w3.org/2000/svg",s.Browser.svg=!(!i.createElementNS||!i.createElementNS(s.Path.SVG_NS,"svg").createSVGRect),s.Path=s.Path.extend({statics:{SVG:s.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return i.createElementNS(s.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&s.DomUtil.addClass(this._path,this.options.className),
this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(s.Browser.svg||!s.Browser.vml)&&s.DomUtil.addClass(this._path,"leaflet-clickable"),s.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e<t.length;e++)s.DomEvent.on(this._container,t[e],this._fireMouseEvent,this)}},_onMouseClick:function(t){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(t)},_fireMouseEvent:function(t){if(this.hasEventListeners(t.type)){var e=this._map,i=e.mouseEventToContainerPoint(t),o=e.containerPointToLayerPoint(i),n=e.layerPointToLatLng(o);this.fire(t.type,{latlng:n,layerPoint:o,containerPoint:i,originalEvent:t}),"contextmenu"===t.type&&s.DomEvent.preventDefault(t),"mousemove"!==t.type&&s.DomEvent.stopPropagation(t)}}}),s.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=s.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&s.Browser.any3d?(s.DomUtil.addClass(this._pathRoot,"leaflet-zoom-animated"),this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):s.DomUtil.addClass(this._pathRoot,"leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[s.DomUtil.TRANSFORM]=s.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,o=i.x-e.x,n=i.y-e.y,a=this._pathRoot,r=this._panes.overlayPane;s.Browser.mobileWebkit&&r.removeChild(a),s.DomUtil.setPosition(a,e),a.setAttribute("width",o),a.setAttribute("height",n),a.setAttribute("viewBox",[e.x,e.y,o,n].join(" ")),s.Browser.mobileWebkit&&r.appendChild(a)}}}),s.Path.include({bindPopup:function(t,e){return t instanceof s.Popup?this._popup=t:((!this._popup||e)&&(this._popup=new s.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(t){return this._popup&&(t=t||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:t})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(t){this._popup.setLatLng(t.latlng),this._map.openPopup(this._popup)}}),s.Browser.vml=!s.Browser.svg&&function(){try{var t=i.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(o){return!1}}(),s.Path=s.Browser.svg||!s.Browser.vml?s.Path:s.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return i.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return i.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return i.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");s.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&s.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,o=this._container;o.stroked=i.stroke,o.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",o.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=s.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(o.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),o.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(o.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),s.Map.include(s.Browser.svg||!s.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=i.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),s.Browser.canvas=function(){return!!i.createElement("canvas").getContext}(),s.Path=s.Path.SVG&&!t.L_PREFER_CANVAS||!s.Browser.canvas?s.Path:s.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return s.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!s.Path._updateRequest&&(s.Path._updateRequest=s.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){s.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color)},_drawPath:function(){var t,e,i,o,n,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,o=this._parts[t].length;o>e;e++)n=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](n.x,n.y);this instanceof s.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill()),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onClick,this))},_onClick:function(t){this._containsPoint(t.layerPoint)&&this.fire("click",t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),s.Map.include(s.Path.SVG&&!t.L_PREFER_CANVAS||!s.Browser.canvas?{}:{_initPathRoot:function(){var t,e=this._pathRoot;e||(e=this._pathRoot=i.createElement("canvas"),e.style.position="absolute",t=this._canvasCtx=e.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(e),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),o=this._pathRoot;s.DomUtil.setPosition(o,e),o.width=i.x,o.height=i.y,o.getContext("2d").translate(-e.x,-e.y)}}}),s.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var i=t.length,n=typeof Uint8Array!=o+""?Uint8Array:Array,s=new n(i);s[0]=s[i-1]=1,this._simplifyDPStep(t,s,e,0,i-1);var a,r=[];for(a=0;i>a;a++)s[a]&&r.push(t[a]);return r},_simplifyDPStep:function(t,e,i,o,n){var s,a,r,l=0;for(a=o+1;n-1>=a;a++)r=this._sqClosestPointOnSegment(t[a],t[o],t[n],!0),r>l&&(s=a,l=r);l>i&&(e[s]=1,this._simplifyDPStep(t,e,i,o,s),this._simplifyDPStep(t,e,i,s,n))},_reducePoints:function(t,e){for(var i=[t[0]],o=1,n=0,s=t.length;s>o;o++)this._sqDist(t[o],t[n])>e&&(i.push(t[o]),n=o);return s-1>n&&i.push(t[s-1]),i},clipSegment:function(t,e,i,o){var n,s,a,r=o?this._lastCode:this._getBitCode(t,i),l=this._getBitCode(e,i);for(this._lastCode=l;;){if(!(r|l))return[t,e];if(r&l)return!1;n=r||l,s=this._getEdgeIntersection(t,e,n,i),a=this._getBitCode(s,i),n===r?(t=s,r=a):(e=s,l=a)}},_getEdgeIntersection:function(t,e,i,o){var n=e.x-t.x,a=e.y-t.y,r=o.min,l=o.max;return 8&i?new s.Point(t.x+n*(l.y-t.y)/a,l.y):4&i?new s.Point(t.x+n*(r.y-t.y)/a,r.y):2&i?new s.Point(l.x,t.y+a*(l.x-t.x)/n):1&i?new s.Point(r.x,t.y+a*(r.x-t.x)/n):void 0},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,o=e.y-t.y;return i*i+o*o},_sqClosestPointOnSegment:function(t,e,i,o){var n,a=e.x,r=e.y,l=i.x-a,h=i.y-r,u=l*l+h*h;return u>0&&(n=((t.x-a)*l+(t.y-r)*h)/u,n>1?(a=i.x,r=i.y):n>0&&(a+=l*n,r+=h*n)),l=t.x-a,h=t.y-r,o?l*l+h*h:new s.Point(a,r)}},s.Polyline=s.Path.extend({initialize:function(t,e){s.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(s.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,o=1/0,n=this._parts,a=null,r=0,l=n.length;l>r;r++)for(var h=n[r],u=1,c=h.length;c>u;u++){e=h[u-1],i=h[u];var p=s.LineUtil._sqClosestPointOnSegment(t,e,i,!0);o>p&&(o=p,a=s.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(o)),a},getBounds:function(){return new s.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,o,n=e?t:[];for(i=0,o=t.length;o>i;i++){if(s.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;n[i]=s.latLng(t[i])}return n},_initEvents:function(){s.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=s.Path.VML,o=0,n=t.length,a="";n>o;o++)e=t[o],i&&e._round(),a+=(o?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,i,o=this._originalPoints,n=o.length;if(this.options.noClip)return void(this._parts=[o]);this._parts=[];var a=this._parts,r=this._map._pathViewport,l=s.LineUtil;for(t=0,e=0;n-1>t;t++)i=l.clipSegment(o[t],o[t+1],r,t),i&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==o[t+1]||t===n-2)&&(a[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=s.LineUtil,i=0,o=t.length;o>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),s.Path.prototype._updatePath.call(this))}}),s.polyline=function(t,e){return new s.Polyline(t,e)},s.PolyUtil={},s.PolyUtil.clipPolygon=function(t,e){var i,o,n,a,r,l,h,u,c,p=[1,4,2,8],d=s.LineUtil;for(o=0,h=t.length;h>o;o++)t[o]._code=d._getBitCode(t[o],e);for(a=0;4>a;a++){for(u=p[a],i=[],o=0,h=t.length,n=h-1;h>o;n=o++)r=t[o],l=t[n],r._code&u?l._code&u||(c=d._getEdgeIntersection(l,r,u,e),c._code=d._getBitCode(c,e),i.push(c)):(l._code&u&&(c=d._getEdgeIntersection(l,r,u,e),c._code=d._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},s.Polygon=s.Polyline.extend({options:{fill:!0},initialize:function(t,e){s.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,o;if(t&&s.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)o=this._holes[e]=this._convertLatLngs(this._holes[e]),o[0].equals(o[o.length-1])&&o.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(s.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,o;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,o=this._holes[t].length;o>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&s.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):s.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,o=this._parts.length;o>i;i++){var n=s.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);n.length&&e.push(n)}this._parts=e}},_getPathPartStr:function(t){var e=s.Polyline.prototype._getPathPartStr.call(this,t);return e+(s.Browser.svg?"z":"x")}}),s.polygon=function(t,e){return new s.Polygon(t,e)},function(){function t(t){return s.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,o=e.length;for(this.eachLayer(function(t){o>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);o>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}s.MultiPolyline=t(s.Polyline),s.MultiPolygon=t(s.Polygon),s.multiPolyline=function(t,e){return new s.MultiPolyline(t,e)},s.multiPolygon=function(t,e){return new s.MultiPolygon(t,e)}}(),s.Rectangle=s.Polygon.extend({initialize:function(t,e){s.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=s.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),s.rectangle=function(t,e){return new s.Rectangle(t,e)},s.Circle=s.Path.extend({initialize:function(t,e,i){s.Path.prototype.initialize.call(this,i),this._latlng=s.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=s.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new s.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":s.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(s.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+e<t.min.x||i.y+e<t.min.y}}),s.circle=function(t,e,i){return new s.Circle(t,e,i)},s.CircleMarker=s.Circle.extend({options:{radius:10,weight:2},initialize:function(t,e){s.Circle.prototype.initialize.call(this,t,null,e),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){s.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setLatLng:function(t){return s.Circle.prototype.setLatLng.call(this,t),this._popup&&this._popup._isOpen&&this._popup.setLatLng(t),this},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius}}),s.circleMarker=function(t,e){return new s.CircleMarker(t,e)},s.Polyline.include(s.Path.CANVAS?{_containsPoint:function(t,e){var i,o,n,a,r,l,h,u=this.options.weight/2;for(s.Browser.touch&&(u+=10),i=0,a=this._parts.length;a>i;i++)for(h=this._parts[i],o=0,r=h.length,n=r-1;r>o;n=o++)if((e||0!==o)&&(l=s.LineUtil.pointToSegmentDistance(t,h[n],h[o]),u>=l))return!0;return!1}}:{}),s.Polygon.include(s.Path.CANVAS?{_containsPoint:function(t){var e,i,o,n,a,r,l,h,u=!1;if(s.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(n=0,l=this._parts.length;l>n;n++)for(e=this._parts[n],a=0,h=e.length,r=h-1;h>a;r=a++)i=e[a],o=e[r],i.y>t.y!=o.y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(u=!u);return u}}:{}),s.Circle.include(s.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),s.CircleMarker.include(s.Path.CANVAS?{_updateStyle:function(){s.Path.prototype._updateStyle.call(this)}}:{}),s.GeoJSON=s.FeatureGroup.extend({initialize:function(t,e){s.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,o,n=s.Util.isArray(t)?t:t.features;if(n){for(e=0,i=n.length;i>e;e++)o=n[e],(o.geometries||o.geometry||o.features||o.coordinates)&&this.addData(n[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=s.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng,a);return r.feature=s.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(s.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),s.extend(s.GeoJSON,{geometryToLayer:function(t,e,i,o){var n,a,r,l,h="Feature"===t.type?t.geometry:t,u=h.coordinates,c=[];switch(i=i||this.coordsToLatLng,h.type){case"Point":return n=i(u),e?e(t,n):new s.Marker(n);case"MultiPoint":for(r=0,l=u.length;l>r;r++)n=i(u[r]),c.push(e?e(t,n):new s.Marker(n));return new s.FeatureGroup(c);case"LineString":return a=this.coordsToLatLngs(u,0,i),new s.Polyline(a,o);case"Polygon":if(2===u.length&&!u[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(u,1,i),new s.Polygon(a,o);case"MultiLineString":return a=this.coordsToLatLngs(u,1,i),new s.MultiPolyline(a,o);case"MultiPolygon":return a=this.coordsToLatLngs(u,2,i),new s.MultiPolygon(a,o);case"GeometryCollection":for(r=0,l=h.geometries.length;l>r;r++)c.push(this.geometryToLayer({geometry:h.geometries[r],type:"Feature",properties:t.properties},e,i,o));return new s.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new s.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){var o,n,s,a=[];for(n=0,s=t.length;s>n;n++)o=e?this.coordsToLatLngs(t[n],e-1,i):(i||this.coordsToLatLng)(t[n]),a.push(o);return a},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==o&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],i=0,o=t.length;o>i;i++)e.push(s.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?s.extend({},t.feature,{geometry:e}):s.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var r={toGeoJSON:function(){return s.GeoJSON.getFeature(this,{type:"Point",coordinates:s.GeoJSON.latLngToCoords(this.getLatLng())})}};s.Marker.include(r),s.Circle.include(r),s.CircleMarker.include(r),s.Polyline.include({toGeoJSON:function(){return s.GeoJSON.getFeature(this,{type:"LineString",coordinates:s.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),s.Polygon.include({toGeoJSON:function(){var t,e,i,o=[s.GeoJSON.latLngsToCoords(this.getLatLngs())];if(o[0].push(o[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=s.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),o.push(i);return s.GeoJSON.getFeature(this,{type:"Polygon",coordinates:o})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),s.GeoJSON.getFeature(this,{type:t,coordinates:e})}}s.MultiPolyline.include({toGeoJSON:t("MultiLineString")}),s.MultiPolygon.include({toGeoJSON:t("MultiPolygon")}),s.LayerGroup.include({toGeoJSON:function(){var e,i=this.feature&&this.feature.geometry,o=[];if(i&&"MultiPoint"===i.type)return t("MultiPoint").call(this);var n=i&&"GeometryCollection"===i.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),o.push(n?e.geometry:s.GeoJSON.asFeature(e)))}),n?s.GeoJSON.getFeature(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}})}(),s.geoJson=function(t,e){return new s.GeoJSON(t,e)},s.DomEvent={addListener:function(t,e,i,o){var n,a,r,l=s.stamp(i),h="_leaflet_"+e+l;return t[h]?this:(n=function(e){return i.call(o||t,e||s.DomEvent._getEvent())},s.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,n,l):(s.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,n,l),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",n,!1),t.addEventListener(e,n,!1)):"mouseenter"===e||"mouseleave"===e?(a=n,r="mouseenter"===e?"mouseover":"mouseout",n=function(e){return s.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,n,!1)):"click"===e&&s.Browser.android?(a=n,n=function(t){return s.DomEvent._filterClick(t,a)},t.addEventListener(e,n,!1)):t.addEventListener(e,n,!1):"attachEvent"in t&&t.attachEvent("on"+e,n),t[h]=n,this))},removeListener:function(t,e,i){var o=s.stamp(i),n="_leaflet_"+e+o,a=t[n];return a?(s.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,o):s.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,o):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[n]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,s.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=s.DomEvent.stopPropagation;return s.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=s.DomEvent.stopPropagation,i=s.Draggable.START.length-1;i>=0;i--)s.DomEvent.on(t,s.Draggable.START[i],e);return s.DomEvent.on(t,"click",s.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return s.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new s.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new s.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){s.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(o){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,o=s.DomEvent._lastClick&&i-s.DomEvent._lastClick;return o&&o>100&&500>o||t.target._simulatedClick&&!t._simulated?void s.DomEvent.stop(t):(s.DomEvent._lastClick=i,e(t))}},s.DomEvent.on=s.DomEvent.addListener,s.DomEvent.off=s.DomEvent.removeListener,s.Draggable=s.Class.extend({includes:s.Mixin.Events,statics:{START:s.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=s.Draggable.START.length-1;t>=0;t--)s.DomEvent.on(this._dragStartTarget,s.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=s.Draggable.START.length-1;t>=0;t--)s.DomEvent.off(this._dragStartTarget,s.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!(t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(s.DomEvent.stopPropagation(t),s.Draggable._disabled||(s.DomUtil.disableImageDrag(),s.DomUtil.disableTextSelection(),this._moving)))){var e=t.touches?t.touches[0]:t;this._startPoint=new s.Point(e.clientX,e.clientY),this._startPos=this._newPos=s.DomUtil.getPosition(this._element),s.DomEvent.on(i,s.Draggable.MOVE[t.type],this._onMove,this).on(i,s.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var e=t.touches&&1===t.touches.length?t.touches[0]:t,o=new s.Point(e.clientX,e.clientY),n=o.subtract(this._startPoint);(n.x||n.y)&&(s.Browser.touch&&Math.abs(n.x)+Math.abs(n.y)<3||(s.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=s.DomUtil.getPosition(this._element).subtract(n),s.DomUtil.addClass(i.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,s.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,s.Util.cancelAnimFrame(this._animRequest),this._animRequest=s.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag"),s.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){s.DomUtil.removeClass(i.body,"leaflet-dragging"),this._lastTarget&&(s.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in s.Draggable.MOVE)s.DomEvent.off(i,s.Draggable.MOVE[t],this._onMove).off(i,s.Draggable.END[t],this._onUp);s.DomUtil.enableImageDrag(),s.DomUtil.enableTextSelection(),this._moved&&this._moving&&(s.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),s.Handler=s.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),s.Map.mergeOptions({dragging:!0,inertia:!s.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:s.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),s.Map.Drag=s.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new s.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,o=this._draggable._newPos.x,n=(o-e+i)%t+e-i,s=(o+e+i)%t-e-i,a=Math.abs(n+i)<Math.abs(s+i)?n:s;this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,o=+new Date-this._lastTime,n=!i.inertia||o>i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),n)e.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),r=(this._lastTime+o-this._times[0])/1e3,l=i.easeLinearity,h=a.multiplyBy(l/r),u=h.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,u),p=h.multiplyBy(c/u),d=c/(i.inertiaDeceleration*l),m=p.multiplyBy(-d/2).round();m.x&&m.y?(m=e._limitOffset(m,e.options.maxBounds),s.Util.requestAnimFrame(function(){e.panBy(m,{duration:d,easeLinearity:l,noMoveStart:!0})})):e.fire("moveend")}}}),s.Map.addInitHook("addHandler","dragging",s.Map.Drag),s.Map.mergeOptions({doubleClickZoom:!0}),s.Map.DoubleClickZoom=s.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),s.Map.addInitHook("addHandler","doubleClickZoom",s.Map.DoubleClickZoom),s.Map.mergeOptions({scrollWheelZoom:!0}),s.Map.ScrollWheelZoom=s.Handler.extend({addHooks:function(){s.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),s.DomEvent.on(this._map._container,"MozMousePixelScroll",s.DomEvent.preventDefault),this._delta=0},removeHooks:function(){s.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),s.DomEvent.off(this._map._container,"MozMousePixelScroll",s.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=s.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),
this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s.bind(this._performZoom,this),i),s.DomEvent.preventDefault(t),s.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),s.Map.addInitHook("addHandler","scrollWheelZoom",s.Map.ScrollWheelZoom),s.extend(s.DomEvent,{_touchstart:s.Browser.msPointer?"MSPointerDown":s.Browser.pointer?"pointerdown":"touchstart",_touchend:s.Browser.msPointer?"MSPointerUp":s.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,e,o){function n(t){var e;if(s.Browser.pointer?(m.push(t.pointerId),e=m.length):e=t.touches.length,!(e>1)){var i=Date.now(),o=i-(r||i);l=t.touches?t.touches[0]:t,h=o>0&&u>=o,r=i}}function a(t){if(s.Browser.pointer){var i=m.indexOf(t.pointerId);if(-1===i)return;m.splice(i,1)}if(h){if(s.Browser.pointer){var o,n={};for(var a in l)o=l[a],"function"==typeof o?n[a]=o.bind(l):n[a]=o;l=n}l.type="dblclick",e(l),r=null}}var r,l,h=!1,u=250,c="_leaflet_",p=this._touchstart,d=this._touchend,m=[];t[c+p+o]=n,t[c+d+o]=a;var f=s.Browser.pointer?i.documentElement:t;return t.addEventListener(p,n,!1),f.addEventListener(d,a,!1),s.Browser.pointer&&f.addEventListener(s.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(t,e){var o="_leaflet_";return t.removeEventListener(this._touchstart,t[o+this._touchstart+e],!1),(s.Browser.pointer?i.documentElement:t).removeEventListener(this._touchend,t[o+this._touchend+e],!1),s.Browser.pointer&&i.documentElement.removeEventListener(s.DomEvent.POINTER_CANCEL,t[o+this._touchend+e],!1),this}}),s.extend(s.DomEvent,{POINTER_DOWN:s.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:s.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:s.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:s.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,o){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,o);case"touchend":return this.addPointerListenerEnd(t,e,i,o);case"touchmove":return this.addPointerListenerMove(t,e,i,o);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,e,o,n){var a="_leaflet_",r=this._pointers,l=function(t){s.DomEvent.preventDefault(t);for(var e=!1,i=0;i<r.length;i++)if(r[i].pointerId===t.pointerId){e=!0;break}e||r.push(t),t.touches=r.slice(),t.changedTouches=[t],o(t)};if(t[a+"touchstart"+n]=l,t.addEventListener(this.POINTER_DOWN,l,!1),!this._pointerDocumentListener){var h=function(t){for(var e=0;e<r.length;e++)if(r[e].pointerId===t.pointerId){r.splice(e,1);break}};i.documentElement.addEventListener(this.POINTER_UP,h,!1),i.documentElement.addEventListener(this.POINTER_CANCEL,h,!1),this._pointerDocumentListener=!0}return this},addPointerListenerMove:function(t,e,i,o){function n(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons){for(var e=0;e<a.length;e++)if(a[e].pointerId===t.pointerId){a[e]=t;break}t.touches=a.slice(),t.changedTouches=[t],i(t)}}var s="_leaflet_",a=this._pointers;return t[s+"touchmove"+o]=n,t.addEventListener(this.POINTER_MOVE,n,!1),this},addPointerListenerEnd:function(t,e,i,o){var n="_leaflet_",s=this._pointers,a=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}t.touches=s.slice(),t.changedTouches=[t],i(t)};return t[n+"touchend"+o]=a,t.addEventListener(this.POINTER_UP,a,!1),t.addEventListener(this.POINTER_CANCEL,a,!1),this},removePointerListener:function(t,e,i){var o="_leaflet_",n=t[o+e+i];switch(e){case"touchstart":t.removeEventListener(this.POINTER_DOWN,n,!1);break;case"touchmove":t.removeEventListener(this.POINTER_MOVE,n,!1);break;case"touchend":t.removeEventListener(this.POINTER_UP,n,!1),t.removeEventListener(this.POINTER_CANCEL,n,!1)}return this}}),s.Map.mergeOptions({touchZoom:s.Browser.touch&&!s.Browser.android23,bounceAtZoomLimits:!0}),s.Map.TouchZoom=s.Handler.extend({addHooks:function(){s.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){s.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var o=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]),a=e._getCenterLayerPoint();this._startCenter=o.add(n)._divideBy(2),this._startDist=o.distanceTo(n),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),e._panAnim&&e._panAnim.stop(),s.DomEvent.on(i,"touchmove",this._onTouchMove,this).on(i,"touchend",this._onTouchEnd,this),s.DomEvent.preventDefault(t)}},_onTouchMove:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),o=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(o)/this._startDist,this._delta=i._add(o)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(e.options.bounceAtZoomLimits||!(e.getZoom()===e.getMinZoom()&&this._scale<1||e.getZoom()===e.getMaxZoom()&&this._scale>1))&&(this._moved||(s.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),s.Util.cancelAnimFrame(this._animRequest),this._animRequest=s.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),s.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),o=t.getScaleZoom(this._scale);t._animateZoom(i,o,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,s.DomUtil.removeClass(t._mapPane,"leaflet-touching"),s.Util.cancelAnimFrame(this._animRequest),s.DomEvent.off(i,"touchmove",this._onTouchMove).off(i,"touchend",this._onTouchEnd);var e=this._getScaleOrigin(),o=t.layerPointToLatLng(e),n=t.getZoom(),a=t.getScaleZoom(this._scale)-n,r=a>0?Math.ceil(a):Math.floor(a),l=t._limitZoom(n+r),h=t.getZoomScale(l)/this._scale;t._animateZoom(o,l,e,h)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),s.Map.addInitHook("addHandler","touchZoom",s.Map.TouchZoom),s.Map.mergeOptions({tap:!0,tapTolerance:15}),s.Map.Tap=s.Handler.extend({addHooks:function(){s.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){s.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(s.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],o=e.target;this._startPos=this._newPos=new s.Point(e.clientX,e.clientY),o.tagName&&"a"===o.tagName.toLowerCase()&&s.DomUtil.addClass(o,"leaflet-active"),this._holdTimeout=setTimeout(s.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),s.DomEvent.on(i,"touchmove",this._onMove,this).on(i,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),s.DomEvent.off(i,"touchmove",this._onMove,this).off(i,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],o=e.target;o&&o.tagName&&"a"===o.tagName.toLowerCase()&&s.DomUtil.removeClass(o,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new s.Point(e.clientX,e.clientY)},_simulateEvent:function(e,o){var n=i.createEvent("MouseEvents");n._simulated=!0,o.target._simulatedClick=!0,n.initMouseEvent(e,!0,!0,t,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(n)}}),s.Browser.touch&&!s.Browser.pointer&&s.Map.addInitHook("addHandler","tap",s.Map.Tap),s.Map.mergeOptions({boxZoom:!0}),s.Map.BoxZoom=s.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){s.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){s.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!t.shiftKey||1!==t.which&&1!==t.button?!1:(s.DomUtil.disableTextSelection(),s.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void s.DomEvent.on(i,"mousemove",this._onMouseMove,this).on(i,"mouseup",this._onMouseUp,this).on(i,"keydown",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=s.DomUtil.create("div","leaflet-zoom-box",this._pane),s.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,i=this._box,o=this._map.mouseEventToLayerPoint(t),n=o.subtract(e),a=new s.Point(Math.min(o.x,e.x),Math.min(o.y,e.y));s.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(n.x)-4)+"px",i.style.height=Math.max(0,Math.abs(n.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),s.DomUtil.enableTextSelection(),s.DomUtil.enableImageDrag(),s.DomEvent.off(i,"mousemove",this._onMouseMove).off(i,"mouseup",this._onMouseUp).off(i,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var o=new s.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(o),e.fire("boxzoomend",{boxZoomBounds:o})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),s.Map.addInitHook("addHandler","boxZoom",s.Map.BoxZoom),s.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),s.Map.Keyboard=s.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),s.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;s.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var e=i.body,o=i.documentElement,n=e.scrollTop||o.scrollTop,s=e.scrollLeft||o.scrollLeft;this._map._container.focus(),t.scrollTo(s,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,o=this._panKeys={},n=this.keyCodes;for(e=0,i=n.left.length;i>e;e++)o[n.left[e]]=[-1*t,0];for(e=0,i=n.right.length;i>e;e++)o[n.right[e]]=[t,0];for(e=0,i=n.down.length;i>e;e++)o[n.down[e]]=[0,t];for(e=0,i=n.up.length;i>e;e++)o[n.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,o=this._zoomKeys={},n=this.keyCodes;for(e=0,i=n.zoomIn.length;i>e;e++)o[n.zoomIn[e]]=t;for(e=0,i=n.zoomOut.length;i>e;e++)o[n.zoomOut[e]]=-t},_addHooks:function(){s.DomEvent.on(i,"keydown",this._onKeyDown,this)},_removeHooks:function(){s.DomEvent.off(i,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}s.DomEvent.stop(t)}}),s.Map.addInitHook("addHandler","keyboard",s.Map.Keyboard),s.Handler.MarkerDrag=s.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new s.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),s.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),s.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=s.DomUtil.getPosition(t._icon),o=t._map.layerPointToLatLng(i);e&&s.DomUtil.setPosition(e,i),t._latlng=o,t.fire("move",{latlng:o}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),s.Control=s.Class.extend({options:{position:"topright"},initialize:function(t){s.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),o=t._controlCorners[i];return s.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?o.insertBefore(e,o.firstChild):o.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),s.control=function(t){return new s.Control(t)},s.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,n){var a=i+t+" "+i+n;e[t+n]=s.DomUtil.create("div",a,o)}var e=this._controlCorners={},i="leaflet-",o=this._controlContainer=s.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),s.Control.Zoom=s.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=s.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,o,n,a){var r=s.DomUtil.create("a",i,o);r.innerHTML=t,r.href="#",r.title=e;var l=s.DomEvent.stopPropagation;return s.DomEvent.on(r,"click",l).on(r,"mousedown",l).on(r,"dblclick",l).on(r,"click",s.DomEvent.preventDefault).on(r,"click",n,a).on(r,"click",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";s.DomUtil.removeClass(this._zoomInButton,e),s.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&s.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&s.DomUtil.addClass(this._zoomInButton,e)}}),s.Map.mergeOptions({zoomControl:!0}),s.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new s.Control.Zoom,this.addControl(this.zoomControl))}),s.control.zoom=function(t){return new s.Control.Zoom(t)},s.Control.Attribution=s.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){s.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=s.DomUtil.create("div","leaflet-control-attribution"),s.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),s.Map.mergeOptions({attributionControl:!0}),s.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new s.Control.Attribution).addTo(this))}),s.control.attribution=function(t){return new s.Control.Attribution(t)},s.Control.Scale=s.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=s.DomUtil.create("div",e),o=this.options;return this._addScales(o,e,i),t.on(o.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=s.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=s.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),o=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,n=this._map.getSize(),s=this.options,a=0;n.x>0&&(a=o*(s.maxWidth/n.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,o,n=3.2808399*t,s=this._iScale;n>5280?(e=n/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(o=this._getRoundNum(n),s.style.width=this._getScaleWidth(o/n)+"px",s.innerHTML=o+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),s.control.scale=function(t){return new s.Control.Scale(t)},s.Control.Layers=s.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){s.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var o in t)this._addLayer(t[o],o);for(o in e)this._addLayer(e[o],o,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=s.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=s.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),s.Browser.touch?s.DomEvent.on(e,"click",s.DomEvent.stopPropagation):s.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=s.DomUtil.create("form",t+"-list");if(this.options.collapsed){s.Browser.android||s.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var o=this._layersLink=s.DomUtil.create("a",t+"-toggle",e);o.href="#",o.title="Layers",s.Browser.touch?s.DomEvent.on(o,"click",s.DomEvent.stop).on(o,"click",this._expand,this):s.DomEvent.on(o,"focus",this._expand,this),s.DomEvent.on(i,"click",function(){setTimeout(s.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=s.DomUtil.create("div",t+"-base",i),this._separator=s.DomUtil.create("div",t+"-separator",i),this._overlaysList=s.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var o=s.stamp(t);this._layers[o]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,o=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),o=o||e.overlay,i=i||!e.overlay;this._separator.style.display=o&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[s.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,e){var o='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"';e&&(o+=' checked="checked"'),o+="/>";var n=i.createElement("div");return n.innerHTML=o,n.firstChild},_addItem:function(t){var e,o=i.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?(e=i.createElement("input"),e.type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers",n),e.layerId=s.stamp(t.layer),s.DomEvent.on(e,"click",this._onInputClick,this);var a=i.createElement("span");a.innerHTML=" "+t.name,o.appendChild(e),o.appendChild(a);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(o),o},_onInputClick:function(){var t,e,i,o=this._form.getElementsByTagName("input"),n=o.length;for(this._handlingClick=!0,t=0;n>t;t++)e=o[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){s.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),s.control.layers=function(t,e,i){return new s.Control.Layers(t,e,i)},s.PosAnimation=s.Class.extend({includes:s.Mixin.Events,run:function(t,e,i,o){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[s.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(o||.5)+",1)",s.DomEvent.on(t,s.DomUtil.TRANSITION_END,this._onTransitionEnd,this),s.DomUtil.setPosition(t,e),s.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(s.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(s.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),s.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,o,n=this._el,a=t.getComputedStyle(n);if(s.Browser.any3d){if(o=a[s.DomUtil.TRANSFORM].match(this._transformRe),!o)return;e=parseFloat(o[1]),i=parseFloat(o[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new s.Point(e,i,!0)},_onTransitionEnd:function(){s.DomEvent.off(this._el,s.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[s.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),s.Map.include({setView:function(t,e,i){if(e=e===o?this._zoom:this._limitZoom(e),t=this._limitCenter(s.latLng(t),e,this.options.maxBounds),i=i||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!i.reset&&i!==!0){i.animate!==o&&(i.zoom=s.extend({animate:i.animate},i.zoom),i.pan=s.extend({animate:i.animate},i.pan));var n=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan);if(n)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=s.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new s.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){s.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){s.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),s.PosAnimation=s.DomUtil.TRANSITION?s.PosAnimation:s.PosAnimation.extend({run:function(t,e,i,o){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(o||.5,.2),this._startPos=s.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=s.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));s.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){s.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),s.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),s.DomUtil.TRANSITION&&s.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&s.DomUtil.TRANSITION&&s.Browser.any3d&&!s.Browser.android23&&!s.Browser.mobileOpera,this._zoomAnimated&&s.DomEvent.on(this._mapPane,s.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),s.Map.include(s.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var o=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/o),s=this._getCenterLayerPoint()._add(n);return i.animate===!0||this.getSize().contains(n)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,o,null,!0),!0):!1},_animateZoom:function(t,e,i,o,n,a,r){r||(this._animatingZoom=!0),s.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,s.Draggable&&(s.Draggable._disabled=!0),s.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:o,delta:n,backwards:a})},this)},_onZoomTransitionEnd:function(){this._animatingZoom=!1,s.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),s.Draggable&&(s.Draggable._disabled=!1)}}:{}),s.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=s.DomUtil.TRANSFORM,o=t.delta?s.DomUtil.getTranslateString(t.delta):e.style[i],n=s.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?n+" "+o:o+" "+n},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),s.Util.falseFn(e.offsetWidth),this._animating=!1},_clearBgBuffer:function(){var t=this._map;!t||t._animatingZoom||t.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[s.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,e=this._bgBuffer,i=this._getLoadedTilesPercentage(e),o=this._getLoadedTilesPercentage(t);return e&&i>.5&&.5>o?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[s.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,o=t.getElementsByTagName("img"),n=0;for(e=0,i=o.length;i>e;e++)o[e].complete&&n++;return n/i},_stopLoadingImages:function(t){var e,i,o,n=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=n.length;i>e;e++)o=n[e],o.complete||(o.onload=s.Util.falseFn,o.onerror=s.Util.falseFn,o.src=s.Util.emptyImageUrl,o.parentNode.removeChild(o))}}),s.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=s.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=s.bind(this._handleGeolocationResponse,this),i=s.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,o=new s.LatLng(e,i),n=180*t.coords.accuracy/40075017,a=n/Math.cos(s.LatLng.DEG_TO_RAD*e),r=s.latLngBounds([e-n,i-a],[e+n,i+a]),l=this._locateOptions;if(l.setView){var h=Math.min(this.getBoundsZoom(r),l.maxZoom);this.setView(o,h)}var u={latlng:o,bounds:r,timestamp:t.timestamp};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document)},{}],15:[function(t,e,i){function o(t,e,i){function o(t){return t>=200&&300>t||304===t}function n(){void 0===r.status||o(r.status)?e.call(r,null,r):e.call(r,r,null)}var s=!1;if("undefined"==typeof window.XMLHttpRequest)return e(Error("Browser not supported"));if("undefined"==typeof i){var a=t.match(/^\s*https?:\/\/[^\/]*/);i=a&&a[0]!==location.protocol+"//"+location.domain+(location.port?":"+location.port:"")}var r=new window.XMLHttpRequest;if(i&&!("withCredentials"in r)){r=new window.XDomainRequest;var l=e;e=function(){if(s)l.apply(this,arguments);else{
var t=this,e=arguments;setTimeout(function(){l.apply(t,e)},0)}}}return"onload"in r?r.onload=n:r.onreadystatechange=function(){4===r.readyState&&n()},r.onerror=function(t){e.call(this,t||!0,null),e=function(){}},r.onprogress=function(){},r.ontimeout=function(t){e.call(this,t,null),e=function(){}},r.onabort=function(t){e.call(this,t,null),e=function(){}},r.open("GET",t,!0),r.send(null),s=!0,r}"undefined"!=typeof e&&(e.exports=o)},{}],16:[function(t,e,i){arguments[4][14][0].apply(i,arguments)},{dup:14}],17:[function(t,e,i){function o(t,e){t=Math.round(t*e),t<<=1,0>t&&(t=~t);for(var i="";t>=32;)i+=String.fromCharCode((32|31&t)+63),t>>=5;return i+=String.fromCharCode(t+63)}var n={};n.decode=function(t,e){for(var i,o,n=0,s=0,a=0,r=[],l=0,h=0,u=null,c=Math.pow(10,e||5);n<t.length;){u=null,l=0,h=0;do u=t.charCodeAt(n++)-63,h|=(31&u)<<l,l+=5;while(u>=32);i=1&h?~(h>>1):h>>1,l=h=0;do u=t.charCodeAt(n++)-63,h|=(31&u)<<l,l+=5;while(u>=32);o=1&h?~(h>>1):h>>1,s+=i,a+=o,r.push([s/c,a/c])}return r},n.encode=function(t,e){if(!t.length)return"";for(var i=Math.pow(10,e||5),n=o(t[0][0],i)+o(t[0][1],i),s=1;s<t.length;s++){var a=t[s],r=t[s-1];n+=o(a[0]-r[0],i),n+=o(a[1]-r[1],i)}return n},void 0!==typeof e&&(e.exports=n)},{}],18:[function(t,e,i){!function(){"use strict";L.Routing=L.Routing||{},L.Routing.Autocomplete=L.Class.extend({options:{timeout:500,blurTimeout:100,noResultsMessage:"No results found."},initialize:function(t,e,i,o){L.setOptions(this,o),this._elem=t,this._resultFn=o.resultFn?L.Util.bind(o.resultFn,o.resultContext):null,this._autocomplete=o.autocompleteFn?L.Util.bind(o.autocompleteFn,o.autocompleteContext):null,this._selectFn=L.Util.bind(e,i),this._container=L.DomUtil.create("div","leaflet-routing-geocoder-result"),this._resultTable=L.DomUtil.create("table","",this._container),L.DomEvent.addListener(this._elem,"input",this._keyPressed,this),L.DomEvent.addListener(this._elem,"keypress",this._keyPressed,this),L.DomEvent.addListener(this._elem,"keydown",this._keyDown,this),L.DomEvent.addListener(this._elem,"blur",function(){this._isOpen&&this.close()},this)},close:function(){L.DomUtil.removeClass(this._container,"leaflet-routing-geocoder-result-open"),this._isOpen=!1},_open:function(){var t=this._elem.getBoundingClientRect();this._container.parentElement||(this._container.style.left=t.left+window.scrollX+"px",this._container.style.top=t.bottom+window.scrollY+"px",this._container.style.width=t.right-t.left+"px",document.body.appendChild(this._container)),L.DomUtil.addClass(this._container,"leaflet-routing-geocoder-result-open"),this._isOpen=!0},_setResults:function(t){var e,i,o,n;for(delete this._selection,this._results=t;this._resultTable.firstChild;)this._resultTable.removeChild(this._resultTable.firstChild);for(e=0;e<t.length;e++)i=L.DomUtil.create("tr","",this._resultTable),i.setAttribute("data-result-index",e),o=L.DomUtil.create("td","",i),n=document.createTextNode(t[e].name),o.appendChild(n),L.DomEvent.addListener(o,"mousedown",L.DomEvent.preventDefault),L.DomEvent.addListener(o,"click",this._createClickListener(t[e]));e||(i=L.DomUtil.create("tr","",this._resultTable),o=L.DomUtil.create("td","leaflet-routing-geocoder-no-results",i),o.innerHTML=this.options.noResultsMessage),this._open(),t.length>0&&this._select(1)},_createClickListener:function(t){var e=this._resultSelected(t);return L.bind(function(){this._elem.blur(),e()},this)},_resultSelected:function(t){return L.bind(function(){this.close(),this._elem.value=t.name,this._lastCompletedText=t.name,this._selectFn(t)},this)},_keyPressed:function(t){var e;return this._isOpen&&13===t.keyCode&&this._selection?(e=parseInt(this._selection.getAttribute("data-result-index"),10),this._resultSelected(this._results[e])(),void L.DomEvent.preventDefault(t)):13===t.keyCode?void this._complete(this._resultFn,!0):this._autocomplete&&document.activeElement===this._elem?(this._timer&&clearTimeout(this._timer),void(this._timer=setTimeout(L.Util.bind(function(){this._complete(this._autocomplete)},this),this.options.timeout))):void this._unselect()},_select:function(t){var e=this._selection;e&&(L.DomUtil.removeClass(e.firstChild,"leaflet-routing-geocoder-selected"),e=e[t>0?"nextSibling":"previousSibling"]),e||(e=this._resultTable[t>0?"firstChild":"lastChild"]),e&&(L.DomUtil.addClass(e.firstChild,"leaflet-routing-geocoder-selected"),this._selection=e)},_unselect:function(){this._selection&&L.DomUtil.removeClass(this._selection.firstChild,"leaflet-routing-geocoder-selected"),delete this._selection},_keyDown:function(t){if(this._isOpen)switch(t.keyCode){case 27:return this.close(),void L.DomEvent.preventDefault(t);case 38:return this._select(-1),void L.DomEvent.preventDefault(t);case 40:return this._select(1),void L.DomEvent.preventDefault(t)}},_complete:function(t,e){function i(t){this._lastCompletedText=o,e&&1===t.length?this._resultSelected(t[0])():this._setResults(t)}var o=this._elem.value;o&&(o!==this._lastCompletedText?t(o,i,this):e&&i.call(this,this._results))}})}()},{}],19:[function(t,e,i){!function(){"use strict";var i=t("leaflet");i.Routing=i.Routing||{},i.extend(i.Routing,t("./L.Routing.Itinerary")),i.extend(i.Routing,t("./L.Routing.Line")),i.extend(i.Routing,t("./L.Routing.Plan")),i.extend(i.Routing,t("./L.Routing.OSRM")),i.Routing.Control=i.Routing.Itinerary.extend({options:{fitSelectedRoutes:"smart",routeLine:function(t,e){return i.Routing.line(t,e)},autoRoute:!0,routeWhileDragging:!1,routeDragInterval:500,waypointMode:"connect",useZoomParameter:!1},initialize:function(t){i.Util.setOptions(this,t),this._router=this.options.router||new i.Routing.OSRM(t),this._plan=this.options.plan||i.Routing.plan(this.options.waypoints,t),this._requestCount=0,i.Routing.Itinerary.prototype.initialize.call(this,t),this.on("routeselected",this._routeSelected,this),this._plan.on("waypointschanged",this._onWaypointsChanged,this),t.routeWhileDragging&&this._setupRouteDragging(),this.options.autoRoute&&this.route()},onAdd:function(t){var e=i.Routing.Itinerary.prototype.onAdd.call(this,t);return this._map=t,this._map.addLayer(this._plan),this.options.useZoomParameter&&this._map.on("zoomend",function(){this.route({callback:i.bind(this._updateLineCallback,this)})},this),this._plan.options.geocoder&&e.insertBefore(this._plan.createGeocoders(),e.firstChild),e},onRemove:function(t){return this._line&&t.removeLayer(this._line),t.removeLayer(this._plan),i.Routing.Itinerary.prototype.onRemove.call(this,t)},getWaypoints:function(){return this._plan.getWaypoints()},setWaypoints:function(t){return this._plan.setWaypoints(t),this},spliceWaypoints:function(){var t=this._plan.spliceWaypoints.apply(this._plan,arguments);return t},getPlan:function(){return this._plan},getRouter:function(){return this._router},_routeSelected:function(t){var e=t.route,i=this.options.fitSelectedRoutes,o="smart"===i&&!this._waypointsVisible()||"smart"!==i&&i;this._updateLine(e),o&&this._map.fitBounds(this._line.getBounds()),"snap"===this.options.waypointMode&&(this._plan.off("waypointschanged",this._onWaypointsChanged,this),this.setWaypoints(e.waypoints),this._plan.on("waypointschanged",this._onWaypointsChanged,this))},_waypointsVisible:function(){var t,e,o,n,s,a=this.getWaypoints();try{for(t=this._map.getSize(),n=0;n<a.length;n++)s=this._map.latLngToLayerPoint(a[n].latLng),e?e.extend(s):e=i.bounds([s]);return o=e.getSize(),(o.x>t.x/5||o.y>t.y/5)&&this._waypointsInViewport()}catch(r){return!1}},_waypointsInViewport:function(){var t,e,i=this.getWaypoints();try{t=this._map.getBounds()}catch(o){return!1}for(e=0;e<i.length;e++)if(t.contains(i[e].latLng))return!0;return!1},_updateLine:function(t){var e=void 0!==this.options.addWaypoints?this.options.addWaypoints:!0;this._clearLine(),this._line=this.options.routeLine(t,i.extend({addWaypoints:e,extendToWaypoints:"connect"===this.options.waypointMode},this.options.lineOptions)),this._line.addTo(this._map),this._hookEvents(this._line)},_hookEvents:function(t){t.on("linetouched",function(t){this._plan.dragNewWaypoint(t)},this)},_onWaypointsChanged:function(t){this.options.autoRoute&&this.route({}),this._plan.isReady()||(this._clearLine(),this._clearAlts()),this.fire("waypointschanged",{waypoints:t.waypoints})},_setupRouteDragging:function(){var t,e=0;this._plan.on("waypointdrag",i.bind(function(o){t=o.waypoints,e||(e=setTimeout(i.bind(function(){this.route({waypoints:t,geometryOnly:!0,callback:i.bind(this._updateLineCallback,this)}),e=void 0},this),this.options.routeDragInterval))},this)),this._plan.on("waypointdragend",function(){e&&(clearTimeout(e),e=void 0),this.route()},this)},_updateLineCallback:function(t,e){t||this._updateLine(e[0])},route:function(t){var e,i=++this._requestCount;t=t||{},this._plan.isReady()&&(this.options.useZoomParameter&&(t.z=this._map&&this._map.getZoom()),e=t&&t.waypoints||this._plan.getWaypoints(),this.fire("routingstart",{waypoints:e}),this._router.route(e,t.callback||function(o,n){if(i===this._requestCount){if(this._clearLine(),this._clearAlts(),o)return void this.fire("routingerror",{error:o});t.geometryOnly?this._routeSelected({route:n[0]}):(this.fire("routesfound",{waypoints:e,routes:n}),this.setAlternatives(n))}},this,t))},_clearLine:function(){this._line&&(this._map.removeLayer(this._line),delete this._line)}}),i.Routing.control=function(t){return new i.Routing.Control(t)},e.exports=i.Routing}()},{"./L.Routing.Itinerary":21,"./L.Routing.Line":23,"./L.Routing.OSRM":25,"./L.Routing.Plan":26,leaflet:16}],20:[function(t,e,i){!function(){"use strict";var i=t("leaflet");i.Routing=i.Routing||{},i.extend(i.Routing,t("./L.Routing.Localization")),i.Routing.Formatter=i.Class.extend({options:{units:"metric",unitNames:{meters:"m",kilometers:"km",yards:"yd",miles:"mi",hours:"h",minutes:"mín",seconds:"s"},language:"en",roundingSensitivity:1,distanceTemplate:"{value} {unit}"},initialize:function(t){i.setOptions(this,t)},formatDistance:function(t){var e,o,n=this.options.unitNames;return"imperial"===this.options.units?(t/=1.609344,o=t>=1e3?{value:this._round(t)/1e3,unit:n.miles}:{value:this._round(t/1.76),unit:n.yards}):(e=this._round(t),o={value:e>=1e3?e/1e3:e,unit:e>=1e3?n.kilometers:n.meters}),i.Util.template(this.options.distanceTemplate,o)},_round:function(t){var e=Math.pow(10,(Math.floor(t/this.options.roundingSensitivity)+"").length-1),i=Math.floor(t/e),o=i>5?e:e/2;return Math.round(t/o)*o},formatTime:function(t){return t>86400?Math.round(t/3600)+" h":t>3600?Math.floor(t/3600)+" h "+Math.round(t%3600/60)+" min":t>300?Math.round(t/60)+" min":t>60?Math.floor(t/60)+" min"+(t%60!==0?" "+t%60+" s":""):t+" s"},formatInstruction:function(t,e){return void 0===t.text?i.Util.template(this._getInstructionTemplate(t,e),i.extend({exitStr:t.exit?i.Routing.Localization[this.options.language].formatOrder(t.exit):"",dir:i.Routing.Localization[this.options.language].directions[t.direction]},t)):t.text},getIconName:function(t,e){switch(t.type){case"Straight":return 0===e?"depart":"continue";case"SlightRight":return"bear-right";case"Right":return"turn-right";case"SharpRight":return"sharp-right";case"TurnAround":return"u-turn";case"SharpLeft":return"sharp-left";case"Left":return"turn-left";case"SlightLeft":return"bear-left";case"WaypointReached":return"via";case"Roundabout":return"enter-roundabout";case"DestinationReached":return"arrive"}},_getInstructionTemplate:function(t,e){var o="Straight"===t.type?0===e?"Head":"Continue":t.type,n=i.Routing.Localization[this.options.language].instructions[o];return n[0]+(n.length>1&&t.road?n[1]:"")}}),e.exports=i.Routing}()},{"./L.Routing.Localization":24,leaflet:16}],21:[function(t,e,i){!function(){"use strict";var i=t("leaflet");i.Routing=i.Routing||{},i.extend(i.Routing,t("./L.Routing.Formatter")),i.extend(i.Routing,t("./L.Routing.ItineraryBuilder")),i.Routing.Itinerary=i.Control.extend({includes:i.Mixin.Events,options:{pointMarkerStyle:{radius:5,color:"#03f",fillColor:"white",opacity:1,fillOpacity:.7},summaryTemplate:"<h2>{name}</h2><h3>{distance}, {time}</h3>",timeTemplate:"{time}",containerClassName:"",alternativeClassName:"",minimizedClassName:"",itineraryClassName:"",show:!0,collapsible:void 0},initialize:function(t){i.setOptions(this,t),this._formatter=this.options.formatter||new i.Routing.Formatter(this.options),this._itineraryBuilder=this.options.itineraryBuilder||new i.Routing.ItineraryBuilder({containerClassName:this.options.itineraryClassName})},onAdd:function(t){var e,o=this.options.collapsible;return o=o||void 0===o&&t.getSize().x<=640,this._container=i.DomUtil.create("div","leaflet-routing-container leaflet-bar "+(this.options.show?"":"leaflet-routing-container-hide ")+(o?"leaflet-routing-collapsible ":"")+this.options.containerClassName),this._altContainer=this.createAlternativesContainer(),this._container.appendChild(this._altContainer),i.DomEvent.disableClickPropagation(this._container),i.DomEvent.addListener(this._container,"mousewheel",function(t){i.DomEvent.stopPropagation(t)}),o&&(e=i.DomUtil.create("span","leaflet-routing-collapse-btn"),i.DomEvent.on(e,"click",this._toggle,this),this._container.insertBefore(e,this._container.firstChild)),this._container},onRemove:function(){},createAlternativesContainer:function(){return i.DomUtil.create("div","leaflet-routing-alternatives-container")},setAlternatives:function(t){var e,i,o;for(this._clearAlts(),this._routes=t,e=0;e<this._routes.length;e++)i=this._routes[e],o=this._createAlternative(i,e),this._altContainer.appendChild(o),this._altElements.push(o);return this.fire("routeselected",{route:this._routes[0]}),this},show:function(){i.DomUtil.removeClass(this._container,"leaflet-routing-container-hide")},hide:function(){i.DomUtil.addClass(this._container,"leaflet-routing-container-hide")},_toggle:function(){var t=i.DomUtil.hasClass(this._container,"leaflet-routing-container-hide");this[t?"show":"hide"]()},_createAlternative:function(t,e){var o=i.DomUtil.create("div","leaflet-routing-alt "+this.options.alternativeClassName+(e>0?" leaflet-routing-alt-minimized "+this.options.minimizedClassName:"")),n=this.options.summaryTemplate,s=i.extend({name:t.name,distance:this._formatter.formatDistance(t.summary.totalDistance),time:this._formatter.formatTime(t.summary.totalTime)},t);return o.innerHTML="function"==typeof n?n(s):i.Util.template(n,s),i.DomEvent.addListener(o,"click",this._onAltClicked,this),o.appendChild(this._createItineraryContainer(t)),o},_clearAlts:function(){for(var t=this._altContainer;t&&t.firstChild;)t.removeChild(t.firstChild);this._altElements=[]},_createItineraryContainer:function(t){var e,i,o,n,s,a,r=this._itineraryBuilder.createContainer(),l=this._itineraryBuilder.createStepsContainer();for(r.appendChild(l),e=0;e<t.instructions.length;e++)i=t.instructions[e],s=this._formatter.formatInstruction(i,e),n=this._formatter.formatDistance(i.distance),a=this._formatter.getIconName(i,e),o=this._itineraryBuilder.createStep(s,n,a,l),this._addRowListeners(o,t.coordinates[i.index]);return r},_addRowListeners:function(t,e){var o,n=this;i.DomEvent.addListener(t,"mouseover",function(){o=i.circleMarker(e,n.options.pointMarkerStyle).addTo(n._map)}),i.DomEvent.addListener(t,"mouseout",function(){o&&(n._map.removeLayer(o),o=null)}),i.DomEvent.addListener(t,"click",function(t){n._map.panTo(e),i.DomEvent.stopPropagation(t)})},_onAltClicked:function(t){var e,o,n,s,a;for(e=t.target||window.event.srcElement;!i.DomUtil.hasClass(e,"leaflet-routing-alt");)e=e.parentElement;if(i.DomUtil.hasClass(e,"leaflet-routing-alt-minimized"))for(o=0;o<this._altElements.length;o++)n=this._altElements[o],s=e===n,a=s?"removeClass":"addClass",i.DomUtil[a](n,"leaflet-routing-alt-minimized"),this.options.minimizedClassName&&i.DomUtil[a](n,this.options.minimizedClassName),s?this.fire("routeselected",{route:this._routes[o]}):n.scrollTop=0;i.DomEvent.stop(t)}}),i.Routing.itinerary=function(t){return new i.Routing.Itinerary(t)},e.exports=i.Routing}()},{"./L.Routing.Formatter":20,"./L.Routing.ItineraryBuilder":22,leaflet:16}],22:[function(t,e,i){!function(){"use strict";var i=t("leaflet");i.Routing=i.Routing||{},i.Routing.ItineraryBuilder=i.Class.extend({options:{containerClassName:""},initialize:function(t){i.setOptions(this,t)},createContainer:function(t){var e=i.DomUtil.create("table",t||""),o=i.DomUtil.create("colgroup","",e);return i.DomUtil.create("col","leaflet-routing-instruction-icon",o),i.DomUtil.create("col","leaflet-routing-instruction-text",o),i.DomUtil.create("col","leaflet-routing-instruction-distance",o),e},createStepsContainer:function(){return i.DomUtil.create("tbody","")},createStep:function(t,e,o,n){var s,a,r=i.DomUtil.create("tr","",n);return a=i.DomUtil.create("td","",r),s=i.DomUtil.create("span","leaflet-routing-icon leaflet-routing-icon-"+o,a),a.appendChild(s),a=i.DomUtil.create("td","",r),a.appendChild(document.createTextNode(t)),a=i.DomUtil.create("td","",r),a.appendChild(document.createTextNode(e)),r}}),e.exports=i.Routing}()},{leaflet:16}],23:[function(t,e,i){!function(){"use strict";var i=t("leaflet");i.Routing=i.Routing||{},i.Routing.Line=i.LayerGroup.extend({includes:i.Mixin.Events,options:{styles:[{color:"black",opacity:.15,weight:9},{color:"white",opacity:.8,weight:6},{color:"red",opacity:1,weight:2}],missingRouteStyles:[{color:"black",opacity:.15,weight:7},{color:"white",opacity:.6,weight:4},{color:"gray",opacity:.8,weight:2,dashArray:"7,12"}],addWaypoints:!0,extendToWaypoints:!0,missingRouteTolerance:10},initialize:function(t,e){i.setOptions(this,e),i.LayerGroup.prototype.initialize.call(this,e),this._route=t,this.options.extendToWaypoints&&this._extendToWaypoints(),this._addSegment(t.coordinates,this.options.styles,this.options.addWaypoints)},addTo:function(t){return t.addLayer(this),this},getBounds:function(){return i.latLngBounds(this._route.coordinates)},_findWaypointIndices:function(){var t,e=this._route.inputWaypoints,i=[];for(t=0;t<e.length;t++)i.push(this._findClosestRoutePoint(e[t].latLng));return i},_findClosestRoutePoint:function(t){var e,i,o,n=Number.MAX_VALUE;for(i=this._route.coordinates.length-1;i>=0;i--)o=t.distanceTo(this._route.coordinates[i]),n>o&&(e=i,n=o);return e},_extendToWaypoints:function(){var t,e,o,n=this._route.inputWaypoints,s=this._getWaypointIndices();for(t=0;t<n.length;t++)e=n[t].latLng,o=i.latLng(this._route.coordinates[s[t]]),e.distanceTo(o)>this.options.missingRouteTolerance&&this._addSegment([e,o],this.options.missingRouteStyles)},_addSegment:function(t,e,o){var n,s;for(n=0;n<e.length;n++)s=i.polyline(t,e[n]),this.addLayer(s),o&&s.on("mousedown",this._onLineTouched,this)},_findNearestWpBefore:function(t){for(var e=this._getWaypointIndices(),i=e.length-1;i>=0&&e[i]>t;)i--;return i},_onLineTouched:function(t){var e=this._findNearestWpBefore(this._findClosestRoutePoint(t.latlng));this.fire("linetouched",{afterIndex:e,latlng:t.latlng})},_getWaypointIndices:function(){return this._wpIndices||(this._wpIndices=this._route.waypointIndices||this._findWaypointIndices()),this._wpIndices}}),i.Routing.line=function(t,e){return new i.Routing.Line(t,e)},e.exports=i.Routing}()},{leaflet:16}],24:[function(t,e,i){!function(){"use strict";L.Routing=L.Routing||{},L.Routing.Localization={en:{directions:{N:"north",NE:"northeast",E:"east",SE:"southeast",S:"south",SW:"southwest",W:"west",NW:"northwest"},instructions:{Head:["Head {dir}"," on {road}"],Continue:["Continue {dir}"," on {road}"],SlightRight:["Slight right"," onto {road}"],Right:["Right"," onto {road}"],SharpRight:["Sharp right"," onto {road}"],TurnAround:["Turn around"],SharpLeft:["Sharp left"," onto {road}"],Left:["Left"," onto {road}"],SlightLeft:["Slight left"," onto {road}"],WaypointReached:["Waypoint reached"],Roundabout:["Take the {exitStr} exit in the roundabout"," onto {road}"],DestinationReached:["Destination reached"]},formatOrder:function(t){var e=t%10-1,i=["st","nd","rd"];return i[e]?t+i[e]:t+"th"}},de:{directions:{N:"Norden",NE:"Nordosten",E:"Osten",SE:"Südosten",S:"Süden",SW:"Südwesten",W:"Westen",NW:"Nordwesten"},instructions:{Head:["Richtung {dir}"," auf {road}"],Continue:["Geradeaus Richtung {dir}"," auf {road}"],SlightRight:["Leicht rechts abbiegen"," auf {road}"],Right:["Rechts abbiegen"," auf {road}"],SharpRight:["Scharf rechts abbiegen"," auf {road}"],TurnAround:["Wenden"],SharpLeft:["Scharf links abbiegen"," auf {road}"],Left:["Links abbiegen"," auf {road}"],SlightLeft:["Leicht links abbiegen"," auf {road}"],WaypointReached:["Zwischenhalt erreicht"],Roundabout:["Nehmen Sie die {exitStr} Ausfahrt im Kreisverkehr"," auf {road}"],DestinationReached:["Sie haben ihr Ziel erreicht"]},formatOrder:function(t){return t+"."}},sv:{directions:{N:"norr",NE:"nordost",E:"öst",SE:"sydost",S:"syd",SW:"sydväst",W:"väst",NW:"nordväst"},instructions:{Head:["Åk åt {dir}"," på {road}"],Continue:["Fortsätt {dir}"," på {road}"],SlightRight:["Svagt höger"," på {road}"],Right:["Sväng höger"," på {road}"],SharpRight:["Skarpt höger"," på {road}"],TurnAround:["Vänd"],SharpLeft:["Skarpt vänster"," på {road}"],Left:["Sväng vänster"," på {road}"],SlightLeft:["Svagt vänster"," på {road}"],WaypointReached:["Viapunkt nådd"],Roundabout:["Tag {exitStr} avfarten i rondellen"," till {road}"],DestinationReached:["Framme vid resans mål"]},formatOrder:function(t){return["första","andra","tredje","fjärde","femte","sjätte","sjunde","åttonde","nionde","tionde"][t-1]}},sp:{directions:{N:"norte",NE:"noreste",E:"este",SE:"sureste",S:"sur",SW:"suroeste",W:"oeste",NW:"noroeste"},instructions:{Head:["Derecho {dir}"," sobre {road}"],Continue:["Continuar {dir}"," en {road}"],SlightRight:["Leve giro a la derecha"," sobre {road}"],Right:["Derecha"," sobre {road}"],SharpRight:["Giro pronunciado a la derecha"," sobre {road}"],TurnAround:["Dar vuelta"],SharpLeft:["Giro pronunciado a la izquierda"," sobre {road}"],Left:["Izquierda"," en {road}"],SlightLeft:["Leve giro a la izquierda"," en {road}"],WaypointReached:["Llegó a un punto del camino"],Roundabout:["Tomar {exitStr} salida en la rotonda"," en {road}"],DestinationReached:["Llegada a destino"]},formatOrder:function(t){return t+"º"}},nl:{directions:{N:"noordelijke",NE:"noordoostelijke",E:"oostelijke",SE:"zuidoostelijke",S:"zuidelijke",SW:"zuidewestelijke",W:"westelijke",NW:"noordwestelijke"},instructions:{Head:["Vertrek in {dir} richting"," de {road} op"],Continue:["Ga in {dir} richting"," de {road} op"],SlightRight:["Volg de weg naar rechts"," de {road} op"],Right:["Ga rechtsaf"," de {road} op"],SharpRight:["Ga scherpe bocht naar rechts"," de {road} op"],TurnAround:["Keer om"],SharpLeft:["Ga scherpe bocht naar links"," de {road} op"],Left:["Ga linksaf"," de {road} op"],SlightLeft:["Volg de weg naar links"," de {road} op"],WaypointReached:["Aangekomen bij tussenpunt"],Roundabout:["Neem de {exitStr} afslag op de rotonde"," de {road} op"],DestinationReached:["Aangekomen op eindpunt"]},formatOrder:function(t){return 1==t||t>=20?t+"ste":t+"de"}},fr:{directions:{N:"nord",NE:"nord-est",E:"est",SE:"sud-est",S:"sud",SW:"sud-ouest",W:"ouest",NW:"nord-ouest"},instructions:{Head:["Tout droit au {dir}"," sur {road}"],Continue:["Continuer au {dir}"," sur {road}"],SlightRight:["Légèrement à droite"," sur {road}"],Right:["A droite"," sur {road}"],SharpRight:["Complètement à droite"," sur {road}"],TurnAround:["Faire demi-tour"],SharpLeft:["Complètement à gauche"," sur {road}"],Left:["A gauche"," sur {road}"],SlightLeft:["Légèrement à gauche"," sur {road}"],WaypointReached:["Point d'étape atteint"],Roundabout:["Au rond-point, prenez la {exitStr} sortie"," sur {road}"],DestinationReached:["Destination atteinte"]},formatOrder:function(t){return t+"º"}}},e.exports=L.Routing}()},{}],25:[function(t,e,i){!function(){"use strict";var i=t("leaflet"),o=t("corslite"),n=t("polyline");i.Routing=i.Routing||{},i.extend(i.Routing,t("./L.Routing.Waypoint")),i.Routing.OSRM=i.Class.extend({options:{serviceUrl:"//router.project-osrm.org/viaroute",timeout:3e4},initialize:function(t){i.Util.setOptions(this,t),this._hints={locations:{}}},route:function(t,e,n,s){var a,r,l,h,u=!1,c=[];for(s=s||{},a=this.buildRouteUrl(t,s),r=setTimeout(function(){u=!0,e.call(n||e,{status:-1,message:"OSRM request timed out."})},this.options.timeout),h=0;h<t.length;h++)l=t[h],c.push(new i.Routing.Waypoint(l.latLng,l.name,l.options));return o(a,i.bind(function(t,i){var o;clearTimeout(r),u||(t?e.call(n||e,{status:-1,message:"HTTP request failed: "+t}):(o=JSON.parse(i.responseText),this._routeDone(o,c,e,n)))},this)),this},_routeDone:function(t,e,i,o){var s,a,r,l;if(o=o||i,0!==t.status)return void i.call(o,{status:t.status,message:t.status_message});if(s=n.decode(t.route_geometry,6),r=this._toWaypoints(e,t.via_points),a=[{name:t.route_name.join(", "),coordinates:s,instructions:t.route_instructions?this._convertInstructions(t.route_instructions):[],summary:t.route_summary?this._convertSummary(t.route_summary):[],inputWaypoints:e,waypoints:r,waypointIndices:this._clampIndices(t.via_indices,s)}],t.alternative_geometries)for(l=0;l<t.alternative_geometries.length;l++)s=n.decode(t.alternative_geometries[l],6),a.push({name:t.alternative_names[l].join(", "),coordinates:s,instructions:t.alternative_instructions[l]?this._convertInstructions(t.alternative_instructions[l]):[],summary:t.alternative_summaries[l]?this._convertSummary(t.alternative_summaries[l]):[],inputWaypoints:e,waypoints:r,waypointIndices:this._clampIndices(1===t.alternative_geometries.length?t.alternative_indices:t.alternative_indices[l],s)});t.hint_data&&this._saveHintData(t.hint_data,e),i.call(o,null,a)},_toWaypoints:function(t,e){var o,n=[];for(o=0;o<e.length;o++)n.push(i.Routing.waypoint(i.latLng(e[o]),t[o].name,t[o].options));return n},buildRouteUrl:function(t,e){for(var i,o,n,s,a,r=[],l=0;l<t.length;l++)i=t[l],s=this._locationKey(i.latLng),r.push("loc="+s),a=this._hints.locations[s],a&&r.push("hint="+a),i.options&&i.options.allowUTurn&&r.push("u=true");return n=o=!(e&&e.geometryOnly),this.options.serviceUrl+"?instructions="+o+"&alt="+n+"&"+(e.z?"z="+e.z+"&":"")+r.join("&")+(void 0!==this._hints.checksum?"&checksum="+this._hints.checksum:"")+(e.fileformat?"&output="+e.fileformat:"")+(e.allowUTurns?"&uturns="+e.allowUTurns:"")},_locationKey:function(t){return t.lat+","+t.lng},_saveHintData:function(t,e){var i;this._hints={checksum:t.checksum,locations:{}};for(var o=t.locations.length-1;o>=0;o--)i=e[o].latLng,this._hints.locations[this._locationKey(i)]=t.locations[o]},_decode:function(t,e){var i=t.length,o=0,n=0,s=0,a=[];for(e=Math.pow(10,-e);i>o;){var r,l=0,h=0;do r=t.charCodeAt(o++)-63,h|=(31&r)<<l,l+=5;while(r>=32);var u=1&h?~(h>>1):h>>1;n+=u,l=0,h=0;do r=t.charCodeAt(o++)-63,h|=(31&r)<<l,l+=5;while(r>=32);var c=1&h?~(h>>1):h>>1;s+=c,a.push([n*e,s*e])}return a},_convertSummary:function(t){return{totalDistance:t.total_distance,totalTime:t.total_time}},_convertInstructions:function(t){var e,i,o,n,s=[];for(e=0;e<t.length;e++)i=t[e],o=this._drivingDirectionType(i[0]),n=i[0].split("-"),o&&s.push({type:o,distance:i[2],time:i[4],road:i[1],direction:i[6],exit:n.length>1?n[1]:void 0,index:i[3]});return s},_drivingDirectionType:function(t){switch(parseInt(t,10)){case 1:return"Straight";case 2:return"SlightRight";case 3:return"Right";case 4:return"SharpRight";case 5:return"TurnAround";case 6:return"SharpLeft";case 7:return"Left";case 8:return"SlightLeft";case 9:return"WaypointReached";case 10:return"Straight";case 11:case 12:return"Roundabout";case 15:return"DestinationReached";default:return null}},_clampIndices:function(t,e){var i,o=e.length-1;for(i=0;i<t.length;i++)t[i]=Math.min(o,Math.max(t[i],0))}}),i.Routing.osrm=function(t){return new i.Routing.OSRM(t)},e.exports=i.Routing}()},{"./L.Routing.Waypoint":27,corslite:15,leaflet:16,polyline:17}],26:[function(t,e,i){!function(){"use strict";function i(t){t.setSelectionRange?t.setSelectionRange(0,9999):t.select()}var o=t("leaflet");o.Routing=o.Routing||{},o.extend(o.Routing,t("./L.Routing.Autocomplete")),o.extend(o.Routing,t("./L.Routing.Waypoint")),o.Routing.Plan=o.Class.extend({includes:o.Mixin.Events,options:{dragStyles:[{color:"black",opacity:.15,weight:9},{color:"white",opacity:.8,weight:6},{color:"red",opacity:1,weight:2,dashArray:"7,12"}],draggableWaypoints:!0,routeWhileDragging:!1,addWaypoints:!0,reverseWaypoints:!1,addButtonClassName:"",maxGeocoderTolerance:200,autocompleteOptions:{},geocodersClassName:"",geocoderPlaceholder:function(t,e){return 0===t?"Start":e-1>t?"Via "+t:"End"},geocoderClass:function(){return""},createGeocoder:function(){var t=o.DomUtil.create("div","leaflet-routing-geocoder"),e=o.DomUtil.create("input","",t),i=o.DomUtil.create("span","leaflet-routing-remove-waypoint",t);return{container:t,input:e,closeButton:i}},createMarker:function(t,e){var i={draggable:this.draggableWaypoints},n=o.marker(e.latLng,i);return n},waypointNameFallback:function(t){var e=t.lat<0?"S":"N",i=t.lng<0?"W":"E",o=(Math.round(1e4*Math.abs(t.lat))/1e4).toString(),n=(Math.round(1e4*Math.abs(t.lng))/1e4).toString();return e+o+", "+i+n}},initialize:function(t,e){o.Util.setOptions(this,e),this._waypoints=[],this.setWaypoints(t)},isReady:function(){var t;for(t=0;t<this._waypoints.length;t++)if(!this._waypoints[t].latLng)return!1;return!0},getWaypoints:function(){var t,e=[];for(t=0;t<this._waypoints.length;t++)e.push(this._waypoints[t]);return e},setWaypoints:function(t){var e=[0,this._waypoints.length].concat(t);return this.spliceWaypoints.apply(this,e),this},spliceWaypoints:function(){var t,e=[arguments[0],arguments[1]];for(t=2;t<arguments.length;t++)e.push(arguments[t]&&arguments[t].hasOwnProperty("latLng")?arguments[t]:o.Routing.waypoint(arguments[t]));for([].splice.apply(this._waypoints,e),this._updateMarkers(),this._fireChanged.apply(this,e);this._waypoints.length<2;)this.spliceWaypoints(this._waypoints.length,0,null)},onAdd:function(t){this._map=t,this._updateMarkers()},onRemove:function(){var t;if(this._removeMarkers(),this._newWp)for(t=0;t<this._newWp.lines.length;t++)this._map.removeLayer(this._newWp.lines[t]);delete this._map},createGeocoders:function(){var t,e,i=o.DomUtil.create("div","leaflet-routing-geocoders "+this.options.geocodersClassName),n=this._waypoints;return this._geocoderContainer=i,this._geocoderElems=[],this.options.addWaypoints&&(t=o.DomUtil.create("button","leaflet-routing-add-waypoint "+this.options.addButtonClassName,i),t.setAttribute("type","button"),o.DomEvent.addListener(t,"click",function(){this.spliceWaypoints(n.length,0,null)},this)),this.options.reverseWaypoints&&(e=o.DomUtil.create("button","leaflet-routing-reverse-waypoints",i),e.setAttribute("type","button"),o.DomEvent.addListener(e,"click",function(){this._waypoints.reverse(),this.setWaypoints(this._waypoints)},this)),this._updateGeocoders(),this.on("waypointsspliced",this._updateGeocoders),i},_createGeocoder:function(t){var e=this._waypoints.length,n=this.options.createGeocoder(t,e),s=n.closeButton,a=n.input,r=this._waypoints[t];return a.setAttribute("placeholder",this.options.geocoderPlaceholder(t,e)),a.className=this.options.geocoderClass(t,e),this._updateWaypointName(t,a),a.value=r.name,o.DomEvent.addListener(a,"click",function(){i(this)},a),s&&o.DomEvent.addListener(s,"click",function(){t>0||this._waypoints.length>2?this.spliceWaypoints(t,1):this.spliceWaypoints(t,1,new o.Routing.Waypoint)},this),new o.Routing.Autocomplete(a,function(e){a.value=e.name,r.name=e.name,r.latLng=e.center,this._updateMarkers(),this._fireChanged(),this._focusGeocoder(t+1)},this,o.extend({resultFn:this.options.geocoder.geocode,resultContext:this.options.geocoder,autocompleteFn:this.options.geocoder.suggest,autocompleteContext:this.options.geocoder},this.options.autocompleteOptions)),n},_updateGeocoders:function(){var t,e,i=[];for(t=0;t<this._geocoderElems.length;t++)this._geocoderContainer.removeChild(this._geocoderElems[t].container);for(t=this._waypoints.length-1;t>=0;t--)e=this._createGeocoder(t),this._geocoderContainer.insertBefore(e.container,this._geocoderContainer.firstChild),i.push(e);this._geocoderElems=i.reverse()},_updateGeocoder:function(t,e){var i=this._waypoints[t],o=i&&i.name?i.name:"";e&&(e.value=o)},_updateWaypointName:function(t,e,i){var o,n=this._waypoints[t];
n.name=n.name||"",!n.latLng||!i&&n.name||(o=this.options.waypointNameFallback(n.latLng),this.options.geocoder&&this.options.geocoder.reverse?this.options.geocoder.reverse(n.latLng,67108864,function(i){i.length>0&&i[0].center.distanceTo(n.latLng)<this.options.maxGeocoderTolerance?n.name=i[0].name:n.name=o,this._updateGeocoder(t,e)},this):n.name=o,this._updateGeocoder(t,e))},_removeMarkers:function(){var t;if(this._markers)for(t=0;t<this._markers.length;t++)this._markers[t]&&this._map.removeLayer(this._markers[t]);this._markers=[]},_updateMarkers:function(){var t,e;if(this._map)for(this._removeMarkers(),t=0;t<this._waypoints.length;t++)this._waypoints[t].latLng?(e=this.options.createMarker(t,this._waypoints[t],this._waypoints.length),e&&(e.addTo(this._map),this.options.draggableWaypoints&&this._hookWaypointEvents(e,t))):e=null,this._markers.push(e)},_fireChanged:function(){this.fire("waypointschanged",{waypoints:this.getWaypoints()}),arguments.length>=2&&this.fire("waypointsspliced",{index:Array.prototype.shift.call(arguments),nRemoved:Array.prototype.shift.call(arguments),added:arguments})},_hookWaypointEvents:function(t,e,i){var n,s,a=function(t){return i?t.latlng:t.target.getLatLng()},r=o.bind(function(t){this.fire("waypointdragstart",{index:e,latlng:a(t)})},this),l=o.bind(function(t){this._waypoints[e].latLng=a(t),this.fire("waypointdrag",{index:e,latlng:a(t)})},this),h=o.bind(function(t){this._waypoints[e].latLng=a(t),this._waypoints[e].name="",this._updateWaypointName(e,this._geocoderElems&&this._geocoderElems[e].input,!0),this.fire("waypointdragend",{index:e,latlng:a(t)}),this._fireChanged()},this);i?(n=o.bind(function(t){this._markers[e].setLatLng(t.latlng),l(t)},this),s=o.bind(function(t){this._map.dragging.enable(),this._map.off("mouseup",s),this._map.off("mousemove",n),h(t)},this),this._map.dragging.disable(),this._map.on("mousemove",n),this._map.on("mouseup",s),r({latlng:this._waypoints[e].latLng})):(t.on("dragstart",r),t.on("drag",l),t.on("dragend",h))},dragNewWaypoint:function(t){var e=t.afterIndex+1;this.options.routeWhileDragging?(this.spliceWaypoints(e,0,t.latlng),this._hookWaypointEvents(this._markers[e],e,!0)):this._dragNewWaypoint(e,t.latlng)},_dragNewWaypoint:function(t,e){var i,n=new o.Routing.Waypoint(e),s=this._waypoints[t-1],a=this._waypoints[t],r=this.options.createMarker(t,n,this._waypoints.length+1),l=[],h=o.bind(function(t){var e;for(r&&r.setLatLng(t.latlng),e=0;e<l.length;e++)l[e].spliceLatLngs(1,1,t.latlng)},this),u=o.bind(function(e){var i;for(r&&this._map.removeLayer(r),i=0;i<l.length;i++)this._map.removeLayer(l[i]);this._map.off("mousemove",h),this._map.off("mouseup",u),this.spliceWaypoints(t,0,e.latlng)},this);for(r&&r.addTo(this._map),i=0;i<this.options.dragStyles.length;i++)l.push(o.polyline([s.latLng,e,a.latLng],this.options.dragStyles[i]).addTo(this._map));this._map.on("mousemove",h),this._map.on("mouseup",u)},_focusGeocoder:function(t){var e;this._geocoderElems[t]?(e=this._geocoderElems[t].input,e.focus(),i(e)):document.activeElement.blur()}}),o.Routing.plan=function(t,e){return new o.Routing.Plan(t,e)},e.exports=o.Routing}()},{"./L.Routing.Autocomplete":18,"./L.Routing.Waypoint":27,leaflet:16}],27:[function(t,e,i){!function(){"use strict";var i=t("leaflet");i.Routing=i.Routing||{},i.Routing.Waypoint=i.Class.extend({options:{allowUTurn:!1},initialize:function(t,e,o){i.Util.setOptions(this,o),this.latLng=t,this.name=e}}),i.Routing.waypoint=function(t,e,o){return new i.Routing.Waypoint(t,e,o)},e.exports=i.Routing}()},{leaflet:16}],28:[function(t,e,i){"use strict";e.exports={defaultView:{centerLat:38.8995,centerLng:-77.0269,center:L.latLng(38.8995,-77.0269),zoom:13,waypoints:[],language:"en",layer:"mapbox.emerald"},services:[{label:"Car (fastest)",path:"//router.project-osrm.org/viaroute"}],layer:[{label:"Mapbox Emerald",tileLayer:"http://api.tiles.mapbox.com/v4/mapbox.emerald/{z}/{x}/{y}@2x.png?access_token="+window.localStorage.getItem("mapbox_access_token"),attribution:'<a href="https://www.mapbox.com/about/maps">© Mapbox</a> <a href="http://openstreetmap.org/copyright">© OpenStreetMap</a> | <a href="http://mapbox.com/map-feedback/">Improve this map</a>',maxZoom:18},{label:"Mapbox Emerald",tileLayer:"http://api.tiles.mapbox.com/v4/mapbox.emerald/{z}/{x}/{y}@2x.png?access_token="+window.localStorage.getItem("mapbox_access_token"),attribution:'<a href="https://www.mapbox.com/about/maps">© Mapbox</a> <a href="http://openstreetmap.org/copyright">© OpenStreetMap</a> | <a href="http://mapbox.com/map-feedback/">Improve this map</a>',maxZoom:18},{label:"Mapbox Streets",tileLayer:"http://api.tiles.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}@2x.png?access_token="+window.localStorage.getItem("mapbox_access_token"),attribution:'<a href="https://www.mapbox.com/about/maps">© Mapbox</a> <a href="http://openstreetmap.org/copyright">© OpenStreetMap</a> | <a href="http://mapbox.com/map-feedback/">Improve this map</a>',maxZoom:18},{label:"Mapbox Light",tileLayer:"http://api.tiles.mapbox.com/v4/mapbox.light/{z}/{x}/{y}@2x.png?access_token="+window.localStorage.getItem("mapbox_access_token"),attribution:'<a href="https://www.mapbox.com/about/maps">© Mapbox</a> <a href="http://openstreetmap.org/copyright">© OpenStreetMap</a> | <a href="http://mapbox.com/map-feedback/">Improve this map</a>',maxZoom:18},{label:"Mapbox Dark",tileLayer:"http://api.tiles.mapbox.com/v4/mapbox.dark/{z}/{x}/{y}@2x.png?access_token="+window.localStorage.getItem("mapbox_access_token"),attribution:'<a href="https://www.mapbox.com/about/maps">© Mapbox</a> <a href="http://openstreetmap.org/copyright">© OpenStreetMap</a> | <a href="http://mapbox.com/map-feedback/">Improve this map</a>',maxZoom:18},{label:"Mapbox Outdoors",tileLayer:"http://api.tiles.mapbox.com/v4/mapbox.outdoors/{z}/{x}/{y}@2x.png?access_token="+window.localStorage.getItem("mapbox_access_token"),attribution:'<a href="https://www.mapbox.com/about/maps">© Mapbox</a> <a href="http://openstreetmap.org/copyright">© OpenStreetMap</a> | <a href="http://mapbox.com/map-feedback/">Improve this map</a>',maxZoom:18},{label:"Mapbox Satellite",tileLayer:"http://api.tiles.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}@2x.png?access_token="+window.localStorage.getItem("mapbox_access_token"),attribution:'<a href="https://www.mapbox.com/about/maps">© Mapbox</a> <a href="http://openstreetmap.org/copyright">© OpenStreetMap</a> | <a href="http://mapbox.com/map-feedback/">Improve this map</a>',maxZoom:18},{label:"Mapbox Streets Satellite",tileLayer:"http://api.tiles.mapbox.com/v4/mapbox.streets-satellite/{z}/{x}/{y}@2x.png?access_token="+window.localStorage.getItem("mapbox_access_token"),attribution:'<a href="https://www.mapbox.com/about/maps">© Mapbox</a> <a href="http://openstreetmap.org/copyright">© OpenStreetMap</a> | <a href="http://mapbox.com/map-feedback/">Improve this map</a>',maxZoom:18},{label:"osm.org",tileLayer:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'© <a href="http://www.openstreetmap.org/copyright/en">OpenStreetMap</a> contributors',maxZoom:18},{label:"osm.de",tileLayer:"http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png",attribution:'© <a href="http://www.openstreetmap.org/copyright/en">OpenStreetMap</a> contributors',maxZoom:18}]}},{}],29:[function(t,e,i){"use strict";function o(t){var e=6;if(t)return t.lat.toFixed(e)+","+t.lng.toFixed(e)}function n(t){var e=t.split(","),i=parseFloat(e[0]),o=parseFloat(e[1]);if(isNaN(i)||isNaN(o))throw{name:"InvalidCoords",message:'"'+t+'" is not a valid coordinate.'};return L.latLng(i,o)}function s(t){var e=parseInt(t);if(isNaN(e))throw{name:"InvalidInt",message:'"'+t+'" is not a valid integer.'};return e}function a(t,e){var i=l.parse(t),n=l.format({protocol:i.protocol,host:i.host,pathname:i.pathname,query:{z:e.zoom,center:e.center?o(e.center):void 0,loc:e.waypoints?e.waypoints.filter(function(t){return void 0!==t.latLng}).map(function(t){return t.latLng}).map(o):void 0,hl:e.language,ly:e.layer,alt:e.alternative,df:e.units,srv:e.service}});return n}function r(t){t="?"+t.slice(1);var e,i=l.parse(t,!0),o=i.query,a={},r={};try{a.zoom=o.zoom&&s(o.zoom),a.center=o.center&&n(o.center),a.waypoints=o.loc&&o.loc.map(n).map(function(t){return L.Routing.waypoint(t)}),a.language=o.hl,a.alternative=o.alt,a.units=o.df,a.layer=o.ly,a.service=o.srv}catch(h){console.log("Exception "+h.name+": "+h.message)}for(e in a)void 0!==a[e]&&""!==a[e]&&(r[e]=a[e]);return r}var l=t("url"),h=t("jsonp"),u=L.Class.extend({options:{baseURL:"http://short.project-osrm.org/"},initialize:function(t){L.Util.setOptions(this,t)},shorten:function(t,e,i){var o=this.options.baseURL+t;h(o,{param:"jsonp"},function(t,o){return t?(console.log("Error: "+t),void e.call(i,"")):void 0===o.ShortURL?(console.log("Error: "+o.Error),void e.call(i,"")):void e.call(i,o.ShortURL)})}});e.exports={parse:r,format:a,shortener:function(t){return new u(t||{})}}},{jsonp:9,url:8}],30:[function(t,e,i){"use strict";e.exports={en:t("../i18n/en.js"),de:t("../i18n/de.js")}},{"../i18n/de.js":1,"../i18n/en.js":2}],31:[function(t,e,i){"use strict";var o=t("./leaflet_options");e.exports={lrm:{lineOptions:{styles:[{color:"black",opacity:.35,weight:8},{color:"white",opacity:.3,weight:6}]},dragStyles:[{color:"black",opacity:.35,weight:9},{color:"white",opacity:.8,weight:7}],summaryTemplate:'<div class="osrm-directions-summary"><h2>{name}</h2><h3>{distance}, {time}</h3></div>',containerClassName:"dark pad2",alternativeClassName:"osrm-directions-instructions",stepClassName:"osrm-directions-step",geocodersClassName:"osrm-directions-inputs",itineraryBuilder:"osrm-directions-steps"},popup:{removeButtonClass:"osrm-directions-icon osrm-close-light-icon",uturnButtonClass:"osrm-directions-icon osrm-u-turn-icon",markerOptions:{}},tools:{popupWindowClass:"fill-dark dark",popupCloseButtonClass:"osrm-directions-icon osrm-close-icon",linkButtonClass:"osrm-directions-icon osrm-link-icon",editorButtonClass:"osrm-directions-icon osrm-editor-icon",josmButtonClass:"osrm-directions-icon osrm-josm-icon",localizationButtonClass:"osrm-directions-icon osrm-flag-icon",printButtonClass:"osrm-directions-icon osrm-printer-icon",toolsContainerClass:"fill-dark dark",language:o.defaultView.language}}},{"./leaflet_options":28}],32:[function(t,e,i){"use strict";var o=t("./links.js"),n=t("./localization.js"),s=L.Control.extend({include:L.Mixin.Events,options:{linkButtonClass:"",popupWindowClass:"",popupCloseButtonClass:"",toolContainerClass:"",editorButtonClass:"",josmButtonClass:"",localizationButtonClass:"",printButtonClass:"",gpxLinkClass:"",language:"en",units:"metric"},initialize:function(t,e){L.setOptions(this,e),this._lrm=t,t.on("routesfound",this._updateDownloadLink,this),t.on("routeselected",function(t){this._selectedAlternative=t.route},this)},onAdd:function(t){var e,i,o,s,a,r,l,h,u,c,p,d;return this._container=L.DomUtil.create("div","leaflet-osrm-tools-container leaflet-bar "+this.options.toolsContainerClass),L.DomEvent.disableClickPropagation(this._container),e=L.DomUtil.create("div","leaflet-osrm-tools-link",this._container),i=L.DomUtil.create("span",this.options.linkButtonClass,e),i.title=n[this.options.language].Link,L.DomEvent.on(i,"click",this._showLink,this),o=L.DomUtil.create("div","leaflet-osrm-tools-editor",this._container),s=L.DomUtil.create("span",this.options.editorButtonClass,o),s.title=n[this.options.language]["Open in editor"],L.DomEvent.on(s,"click",this._openEditor,this),a=L.DomUtil.create("div","leaflet-osrm-tools-josm",this._container),r=L.DomUtil.create("span",this.options.josmButtonClass,a),r.title=n[this.options.language]["Open in JOSM"],L.DomEvent.on(r,"click",this._openJOSM,this),h=L.DomUtil.create("div","leaflet-osrm-tools-localization",this._container),u=L.DomUtil.create("span",this.options.localizationButtonClass,h),u.title=n[this.options.language]["Select language and units"],L.DomEvent.on(u,"click",this._selectLocalization,this),c=L.DomUtil.create("div","leaflet-osrm-tools-print",this._container),p=L.DomUtil.create("span",this.options.printButtonClass,c),p.title=n[this.options.language].Print,L.DomEvent.on(p,"click",this._printPage,this),d=L.DomUtil.create("div","leaflet-osrm-tools-gpx",this._container),this._gpxLink=L.DomUtil.create("a",this.options.gpxLinkClass,d),this._gpxLink.innerHTML="GPX",this._gpxLink.alt=n[this.options.language]["Download as GPX"],this._popupWindow=L.DomUtil.create("div","leaflet-osrm-tools-popup leaflet-osrm-tools-popup-hide "+this.options.popupWindowClass,this._container),this._popupContainer=L.DomUtil.create("div","",this._popupWindow),l=L.DomUtil.create("span","leaflet-osrm-tools-popup-close "+this.options.popupCloseButtonClass,this._popupWindow),L.DomEvent.on(l,"click",this._closePopup,this),this._container},onRemove:function(){},_openEditor:function(){var t=this._map.getCenter(),e=this._map.getZoom(),i=6;window.open("http://www.openstreetmap.org/edit?lat="+t.lat.toFixed(i)+"&lon="+t.lng.toFixed(i)+"&zoom="+e)},_openJOSM:function(){var t=this._map.getBounds(),e="http://127.0.0.1:8111/load_and_zoom?left="+t.getWest()+"&right="+t.getEast()+"&bottom="+t.getSouth()+"&top="+t.getNorth();window.open(e)},_getLinkOptions:function(){return{zoom:this._map.getZoom(),center:this._map.getCenter(),waypoints:this._lrm.getWaypoints(),language:this.options.language,units:this.options.units,alternative:this._selectedAlternative}},_showLink:function(){var t,e,i,s,a,r;e=o.format(window.location.href,this._getLinkOptions()),this._map.fire("link",{link:e}),t=o.shortener(),i=L.DomUtil.create("div","dark checkbox-pill"),s=L.DomUtil.create("input","",i),s.value=e,a=L.DomUtil.create("input","dark stretch",i),a.type="checkbox",a.id="short",r=L.DomUtil.create("label","",i),r.setAttribute("for","short"),r.innerHTML=n[this.options.language].Short,L.DomEvent.on(a,"click",function(){t.shorten(e,function(t){""===t?a.checked=!1:s.value=t})},this),this._openPopup(i)},_printPage:function(){var t=this._getLinkOptions(),e=t.waypoints.filter(function(t){return void 0!==t.latLng}),i=window.location.href.replace("/index.html?","/printing.html?").replace("/?","/printing.html?");"/"===i.slice(-1)&&(i+="printing.html"),e.length<2||(console.log(o.format(i,t)),window.location.href=o.format(i,t))},_selectLocalization:function(){var t,e,i,s,a,r=L.DomUtil.create("div","leaflet-osrm-tools-localization-popup"),l=L.DomUtil.create("ul","leaflet-osrm-tools-language-list",r),h=L.DomUtil.create("ul","leaflet-osrm-tools-units-list",r),u=this._getLinkOptions();for(t in n)s=L.DomUtil.create("il","",l),a=L.DomUtil.create("a","",s),u.language=t,a.href=o.format(window.location.href,u),a.alt=n[t].name,a.innerHTML=n[t].name;for(u.language=this.options.language,e=["Metric","Imperial"],i=0;i<e.length;i++)s=L.DomUtil.create("il","",h),a=L.DomUtil.create("a","",s),u.units=e[i].toLowerCase(),a.href=o.format(window.location.href,u),a.alt=e[i],a.innerHTML=e[i];this._openPopup(r)},_updateDownloadLink:function(){var t,e=this._lrm.getPlan(),i=this._lrm.getRouter();e.isReady()&&(t=i.buildRouteUrl(e.getWaypoints(),{fileformat:"gpx"}),this._gpxLink.href=t)},_updatePopupPosition:function(){var t=this._container.getBoundingClientRect();this._popupWindow.style.position="absolute",this._popupWindow.style.left="0px",this._popupWindow.style.bottom=t.height+"px"},_openPopup:function(t){var e,i=this._popupContainer.children;for(this._updatePopupPosition(),e=0;e<i.length;e++)this._popupContainer.removeChild(i[e]);this._popupContainer.appendChild(t),L.DomUtil.removeClass(this._popupWindow,"leaflet-osrm-tools-popup-hide")},_closePopup:function(){L.DomUtil.addClass(this._popupWindow,"leaflet-osrm-tools-popup-hide")}});e.exports={control:function(t,e){return new s(t,e)}}},{"./links.js":29,"./localization.js":30}]},{},[3]);