Your IP : 172.70.80.239


Current Path : /var/www/element/data/www/revenuestory.ru/bitrix/js/location/osm/dist/
Upload File :
Current File : /var/www/element/data/www/revenuestory.ru/bitrix/js/location/osm/dist/osm.bundle.min.js

this.BX=this.BX||{};this.BX.Location=this.BX.Location||{};(function(t,e,i){"use strict";function n(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var s=new WeakMap;var o=new WeakMap;var r=new WeakMap;var a=new WeakMap;var l=new WeakSet;var h=function(t){babelHelpers.inherits(e,t);function e(t){var i;babelHelpers.classCallCheck(this,e);i=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).call(this,t));l.add(babelHelpers.assertThisInitialized(i));s.set(babelHelpers.assertThisInitialized(i),{writable:true,value:void 0});o.set(babelHelpers.assertThisInitialized(i),{writable:true,value:void 0});r.set(babelHelpers.assertThisInitialized(i),{writable:true,value:void 0});a.set(babelHelpers.assertThisInitialized(i),{writable:true,value:void 0});babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),s,t.sourceLanguageId);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),o,t.responseConverter);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),r,t.autocompleteReplacements);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),a,t.autocompletePromptsCount);return i}babelHelpers.createClass(e,[{key:"autocomplete",value:function t(e,i){var r=this;if(e===""){return new Promise((function(t){t([])}))}var h={q:n(this,l,u).call(this,e),limit:babelHelpers.classPrivateFieldGet(this,a),lang:babelHelpers.classPrivateFieldGet(this,s)};if(i.biasPoint){var c=i.biasPoint.latitude;var d=i.biasPoint.longitude;if(c&&d){h.lat=c;h.lon=d}}return BX.ajax.runAction("location.api.location.autocomplete",{data:{params:h}}).then((function(t){return t?babelHelpers.classPrivateFieldGet(r,o).convertResponse(t.data,{text:e,autocompleteServiceParams:i}):[]})).catch((function(t){console.error(t)}))}}]);return e}(i.AutocompleteServiceBase);var u=function t(e){var i=e;for(var n in babelHelpers.classPrivateFieldGet(this,r)){if(babelHelpers.classPrivateFieldGet(this,r).hasOwnProperty(n)){i=i.replace(n,babelHelpers.classPrivateFieldGet(this,r)[n])}}return i};
/* @preserve
	 * Leaflet 1.6.0+Detached: 0c81bdf904d864fd12a286e3d1979f47aba17991.0c81bdf, a JS library for interactive maps. http://leafletjs.com
	 * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
	 */var c=Object.freeze;Object.freeze=function(t){return t};function d(t){var e,i,n,s;for(i=1,n=arguments.length;i<n;i++){s=arguments[i];for(e in s){t[e]=s[e]}}return t}var f=Object.create||function(){function t(){}return function(e){t.prototype=e;return new t}}();function p(t,e){var i=Array.prototype.slice;if(t.bind){return t.bind.apply(t,i.call(arguments,1))}var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var _=0;function m(t){t._leaflet_id=t._leaflet_id||++_;return t._leaflet_id}function v(t,e,i){var n,s,o,r;r=function t(){n=false;if(s){o.apply(i,s);s=false}};o=function o(){if(n){s=arguments}else{t.apply(i,arguments);setTimeout(r,e);n=true}};return o}function g(t,e,i){var n=e[1],s=e[0],o=n-s;return t===n&&i?t:((t-s)%o+o)%o+s}function y(){return false}function b(t,e){var i=Math.pow(10,e===undefined?6:e);return Math.round(t*i)/i}function w(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function P(t){return w(t).split(/\s+/)}function T(t,e){if(!t.hasOwnProperty("options")){t.options=t.options?f(t.options):{}}for(var i in e){t.options[i]=e[i]}return t.options}function x(t,e,i){var n=[];for(var s in t){n.push(encodeURIComponent(i?s.toUpperCase():s)+"="+encodeURIComponent(t[s]))}return(!e||e.indexOf("?")===-1?"?":"&")+n.join("&")}var M=/\{ *([\w_-]+) *\}/g;function z(t,e){return t.replace(M,(function(t,i){var n=e[i];if(n===undefined){throw new Error("No value provided for variable "+t)}else if(typeof n==="function"){n=n(e)}return n}))}var S=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function C(t,e){for(var i=0;i<t.length;i++){if(t[i]===e){return i}}return-1}var I="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function k(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var E=0;function H(t){var e=+new Date,i=Math.max(0,16-(e-E));E=e+i;return window.setTimeout(t,i)}var A=window.requestAnimationFrame||k("RequestAnimationFrame")||H;var O=window.cancelAnimationFrame||k("CancelAnimationFrame")||k("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function Z(t,e,i){if(i&&A===H){t.call(e)}else{return A.call(window,p(t,e))}}function B(t){if(t){O.call(window,t)}}var F=(Object.freeze||Object)({freeze:c,extend:d,create:f,bind:p,lastId:_,stamp:m,throttle:v,wrapNum:g,falseFn:y,formatNum:b,trim:w,splitWords:P,setOptions:T,getParamString:x,template:z,isArray:S,indexOf:C,emptyImageUrl:I,requestFn:A,cancelFn:O,requestAnimFrame:Z,cancelAnimFrame:B});function R(){}R.extend=function(t){var e=function t(){if(this.initialize){this.initialize.apply(this,arguments)}this.callInitHooks()};var i=e.__super__=this.prototype;var n=f(i);n.constructor=e;e.prototype=n;for(var s in this){if(this.hasOwnProperty(s)&&s!=="prototype"&&s!=="__super__"){e[s]=this[s]}}if(t.statics){d(e,t.statics);delete t.statics}if(t.includes){N(t.includes);d.apply(null,[n].concat(t.includes));delete t.includes}if(n.options){t.options=d(f(n.options),t.options)}d(n,t);n._initHooks=[];n.callInitHooks=function(){if(this._initHooksCalled){return}if(i.callInitHooks){i.callInitHooks.call(this)}this._initHooksCalled=true;for(var t=0,e=n._initHooks.length;t<e;t++){n._initHooks[t].call(this)}};return e};R.include=function(t){d(this.prototype,t);return this};R.mergeOptions=function(t){d(this.prototype.options,t);return this};R.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1);var i=typeof t==="function"?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[];this.prototype._initHooks.push(i);return this};function N(t){if(typeof L==="undefined"||!L||!L.Mixin){return}t=S(t)?t:[t];for(var e=0;e<t.length;e++){if(t[e]===L.Mixin.Events){console.warn("Deprecated include of L.Mixin.Events: "+"this property will be removed in future releases, "+"please inherit from L.Evented instead.",(new Error).stack)}}}var D={on:function t(e,i,n){if(babelHelpers.typeof(e)==="object"){for(var s in e){this._on(s,e[s],i)}}else{e=P(e);for(var o=0,r=e.length;o<r;o++){this._on(e[o],i,n)}}return this},off:function t(e,i,n){if(!e){delete this._events}else if(babelHelpers.typeof(e)==="object"){for(var s in e){this._off(s,e[s],i)}}else{e=P(e);for(var o=0,r=e.length;o<r;o++){this._off(e[o],i,n)}}return this},_on:function t(e,i,n){this._events=this._events||{};var s=this._events[e];if(!s){s=[];this._events[e]=s}if(n===this){n=undefined}var o={fn:i,ctx:n},r=s;for(var a=0,l=r.length;a<l;a++){if(r[a].fn===i&&r[a].ctx===n){return}}r.push(o)},_off:function t(e,i,n){var s,o,r;if(!this._events){return}s=this._events[e];if(!s){return}if(!i){for(o=0,r=s.length;o<r;o++){s[o].fn=y}delete this._events[e];return}if(n===this){n=undefined}if(s){for(o=0,r=s.length;o<r;o++){var a=s[o];if(a.ctx!==n){continue}if(a.fn===i){a.fn=y;if(this._firingCount){this._events[e]=s=s.slice()}s.splice(o,1);return}}}},fire:function t(e,i,n){if(!this.listens(e,n)){return this}var s=d({},i,{type:e,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var o=this._events[e];if(o){this._firingCount=this._firingCount+1||1;for(var r=0,a=o.length;r<a;r++){var l=o[r];l.fn.call(l.ctx||this,s)}this._firingCount--}}if(n){this._propagateEvent(s)}return this},listens:function t(e,i){var n=this._events&&this._events[e];if(n&&n.length){return true}if(i){for(var s in this._eventParents){if(this._eventParents[s].listens(e,i)){return true}}}return false},once:function t(e,i,n){if(babelHelpers.typeof(e)==="object"){for(var s in e){this.once(s,e[s],i)}return this}var o=p((function(){this.off(e,i,n).off(e,o,n)}),this);return this.on(e,i,n).on(e,o,n)},addEventParent:function t(e){this._eventParents=this._eventParents||{};this._eventParents[m(e)]=e;return this},removeEventParent:function t(e){if(this._eventParents){delete this._eventParents[m(e)]}return this},_propagateEvent:function t(e){for(var i in this._eventParents){this._eventParents[i].fire(e.type,d({layer:e.target,propagatedFrom:e.target},e),true)}}};D.addEventListener=D.on;D.removeEventListener=D.clearAllEventListeners=D.off;D.addOneTimeEventListener=D.once;D.fireEvent=D.fire;D.hasEventListeners=D.listens;var W=R.extend(D);function j(t,e,i){this.x=i?Math.round(t):t;this.y=i?Math.round(e):e}var G=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};j.prototype={clone:function t(){return new j(this.x,this.y)},add:function t(e){return this.clone()._add(U(e))},_add:function t(e){this.x+=e.x;this.y+=e.y;return this},subtract:function t(e){return this.clone()._subtract(U(e))},_subtract:function t(e){this.x-=e.x;this.y-=e.y;return this},divideBy:function t(e){return this.clone()._divideBy(e)},_divideBy:function t(e){this.x/=e;this.y/=e;return this},multiplyBy:function t(e){return this.clone()._multiplyBy(e)},_multiplyBy:function t(e){this.x*=e;this.y*=e;return this},scaleBy:function t(e){return new j(this.x*e.x,this.y*e.y)},unscaleBy:function t(e){return new j(this.x/e.x,this.y/e.y)},round:function t(){return this.clone()._round()},_round:function t(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},floor:function t(){return this.clone()._floor()},_floor:function t(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function t(){return this.clone()._ceil()},_ceil:function t(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},trunc:function t(){return this.clone()._trunc()},_trunc:function t(){this.x=G(this.x);this.y=G(this.y);return this},distanceTo:function t(e){e=U(e);var i=e.x-this.x,n=e.y-this.y;return Math.sqrt(i*i+n*n)},equals:function t(e){e=U(e);return e.x===this.x&&e.y===this.y},contains:function t(e){e=U(e);return Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function t(){return"Point("+b(this.x)+", "+b(this.y)+")"}};function U(t,e,i){if(t instanceof j){return t}if(S(t)){return new j(t[0],t[1])}if(t===undefined||t===null){return t}if(babelHelpers.typeof(t)==="object"&&"x"in t&&"y"in t){return new j(t.x,t.y)}return new j(t,e,i)}function V(t,e){if(!t){return}var i=e?[t,e]:t;for(var n=0,s=i.length;n<s;n++){this.extend(i[n])}}V.prototype={extend:function t(e){e=U(e);if(!this.min&&!this.max){this.min=e.clone();this.max=e.clone()}else{this.min.x=Math.min(e.x,this.min.x);this.max.x=Math.max(e.x,this.max.x);this.min.y=Math.min(e.y,this.min.y);this.max.y=Math.max(e.y,this.max.y)}return this},getCenter:function t(e){return new j((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function t(){return new j(this.min.x,this.max.y)},getTopRight:function t(){return new j(this.max.x,this.min.y)},getTopLeft:function t(){return this.min},getBottomRight:function t(){return this.max},getSize:function t(){return this.max.subtract(this.min)},contains:function t(e){var i,n;if(typeof e[0]==="number"||e instanceof j){e=U(e)}else{e=q(e)}if(e instanceof V){i=e.min;n=e.max}else{i=n=e}return i.x>=this.min.x&&n.x<=this.max.x&&i.y>=this.min.y&&n.y<=this.max.y},intersects:function t(e){e=q(e);var i=this.min,n=this.max,s=e.min,o=e.max,r=o.x>=i.x&&s.x<=n.x,a=o.y>=i.y&&s.y<=n.y;return r&&a},overlaps:function t(e){e=q(e);var i=this.min,n=this.max,s=e.min,o=e.max,r=o.x>i.x&&s.x<n.x,a=o.y>i.y&&s.y<n.y;return r&&a},isValid:function t(){return!!(this.min&&this.max)}};function q(t,e){if(!t||t instanceof V){return t}return new V(t,e)}function Y(t,e){if(!t){return}var i=e?[t,e]:t;for(var n=0,s=i.length;n<s;n++){this.extend(i[n])}}Y.prototype={extend:function t(e){var i=this._southWest,n=this._northEast,s,o;if(e instanceof X){s=e;o=e}else if(e instanceof Y){s=e._southWest;o=e._northEast;if(!s||!o){return this}}else{return e?this.extend(J(e)||K(e)):this}if(!i&&!n){this._southWest=new X(s.lat,s.lng);this._northEast=new X(o.lat,o.lng)}else{i.lat=Math.min(s.lat,i.lat);i.lng=Math.min(s.lng,i.lng);n.lat=Math.max(o.lat,n.lat);n.lng=Math.max(o.lng,n.lng)}return this},pad:function t(e){var i=this._southWest,n=this._northEast,s=Math.abs(i.lat-n.lat)*e,o=Math.abs(i.lng-n.lng)*e;return new Y(new X(i.lat-s,i.lng-o),new X(n.lat+s,n.lng+o))},getCenter:function t(){return new X((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function t(){return this._southWest},getNorthEast:function t(){return this._northEast},getNorthWest:function t(){return new X(this.getNorth(),this.getWest())},getSouthEast:function t(){return new X(this.getSouth(),this.getEast())},getWest:function t(){return this._southWest.lng},getSouth:function t(){return this._southWest.lat},getEast:function t(){return this._northEast.lng},getNorth:function t(){return this._northEast.lat},contains:function t(e){if(typeof e[0]==="number"||e instanceof X||"lat"in e){e=J(e)}else{e=K(e)}var i=this._southWest,n=this._northEast,s,o;if(e instanceof Y){s=e.getSouthWest();o=e.getNorthEast()}else{s=o=e}return s.lat>=i.lat&&o.lat<=n.lat&&s.lng>=i.lng&&o.lng<=n.lng},intersects:function t(e){e=K(e);var i=this._southWest,n=this._northEast,s=e.getSouthWest(),o=e.getNorthEast(),r=o.lat>=i.lat&&s.lat<=n.lat,a=o.lng>=i.lng&&s.lng<=n.lng;return r&&a},overlaps:function t(e){e=K(e);var i=this._southWest,n=this._northEast,s=e.getSouthWest(),o=e.getNorthEast(),r=o.lat>i.lat&&s.lat<n.lat,a=o.lng>i.lng&&s.lng<n.lng;return r&&a},toBBoxString:function t(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function t(e,i){if(!e){return false}e=K(e);return this._southWest.equals(e.getSouthWest(),i)&&this._northEast.equals(e.getNorthEast(),i)},isValid:function t(){return!!(this._southWest&&this._northEast)}};function K(t,e){if(t instanceof Y){return t}return new Y(t,e)}function X(t,e,i){if(isNaN(t)||isNaN(e)){throw new Error("Invalid LatLng object: ("+t+", "+e+")")}this.lat=+t;this.lng=+e;if(i!==undefined){this.alt=+i}}X.prototype={equals:function t(e,i){if(!e){return false}e=J(e);var n=Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng));return n<=(i===undefined?1e-9:i)},toString:function t(e){return"LatLng("+b(this.lat,e)+", "+b(this.lng,e)+")"},distanceTo:function t(e){return Q.distance(this,J(e))},wrap:function t(){return Q.wrapLatLng(this)},toBounds:function t(e){var i=180*e/40075017,n=i/Math.cos(Math.PI/180*this.lat);return K([this.lat-i,this.lng-n],[this.lat+i,this.lng+n])},clone:function t(){return new X(this.lat,this.lng,this.alt)}};function J(t,e,i){if(t instanceof X){return t}if(S(t)&&babelHelpers.typeof(t[0])!=="object"){if(t.length===3){return new X(t[0],t[1],t[2])}if(t.length===2){return new X(t[0],t[1])}return null}if(t===undefined||t===null){return t}if(babelHelpers.typeof(t)==="object"&&"lat"in t){return new X(t.lat,"lng"in t?t.lng:t.lon,t.alt)}if(e===undefined){return null}return new X(t,e,i)}var $={latLngToPoint:function t(e,i){var n=this.projection.project(e),s=this.scale(i);return this.transformation._transform(n,s)},pointToLatLng:function t(e,i){var n=this.scale(i),s=this.transformation.untransform(e,n);return this.projection.unproject(s)},project:function t(e){return this.projection.project(e)},unproject:function t(e){return this.projection.unproject(e)},scale:function t(e){return 256*Math.pow(2,e)},zoom:function t(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function t(e){if(this.infinite){return null}var i=this.projection.bounds,n=this.scale(e),s=this.transformation.transform(i.min,n),o=this.transformation.transform(i.max,n);return new V(s,o)},infinite:false,wrapLatLng:function t(e){var i=this.wrapLng?g(e.lng,this.wrapLng,true):e.lng,n=this.wrapLat?g(e.lat,this.wrapLat,true):e.lat,s=e.alt;return new X(n,i,s)},wrapLatLngBounds:function t(e){var i=e.getCenter(),n=this.wrapLatLng(i),s=i.lat-n.lat,o=i.lng-n.lng;if(s===0&&o===0){return e}var r=e.getSouthWest(),a=e.getNorthEast(),l=new X(r.lat-s,r.lng-o),h=new X(a.lat-s,a.lng-o);return new Y(l,h)}};var Q=d({},$,{wrapLng:[-180,180],R:6371e3,distance:function t(e,i){var n=Math.PI/180,s=e.lat*n,o=i.lat*n,r=Math.sin((i.lat-e.lat)*n/2),a=Math.sin((i.lng-e.lng)*n/2),l=r*r+Math.cos(s)*Math.cos(o)*a*a,h=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l));return this.R*h}});var tt=6378137;var et={R:tt,MAX_LATITUDE:85.0511287798,project:function t(e){var i=Math.PI/180,n=this.MAX_LATITUDE,s=Math.max(Math.min(n,e.lat),-n),o=Math.sin(s*i);return new j(this.R*e.lng*i,this.R*Math.log((1+o)/(1-o))/2)},unproject:function t(e){var i=180/Math.PI;return new X((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*i,e.x*i/this.R)},bounds:function(){var t=tt*Math.PI;return new V([-t,-t],[t,t])}()};function it(t,e,i,n){if(S(t)){this._a=t[0];this._b=t[1];this._c=t[2];this._d=t[3];return}this._a=t;this._b=e;this._c=i;this._d=n}it.prototype={transform:function t(e,i){return this._transform(e.clone(),i)},_transform:function t(e,i){i=i||1;e.x=i*(this._a*e.x+this._b);e.y=i*(this._c*e.y+this._d);return e},untransform:function t(e,i){i=i||1;return new j((e.x/i-this._b)/this._a,(e.y/i-this._d)/this._c)}};function nt(t,e,i,n){return new it(t,e,i,n)}var st=d({},Q,{code:"EPSG:3857",projection:et,transformation:function(){var t=.5/(Math.PI*et.R);return nt(t,.5,-t,.5)}()});var ot=d({},st,{code:"EPSG:900913"});function rt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function at(t,e){var i="",n,s,o,r,a,l;for(n=0,o=t.length;n<o;n++){a=t[n];for(s=0,r=a.length;s<r;s++){l=a[s];i+=(s?"L":"M")+l.x+" "+l.y}i+=e?Rt?"z":"x":""}return i||"M0 0"}var lt=document.documentElement.style;var ht="ActiveXObject"in window;var ut=ht&&!document.addEventListener;var ct="msLaunchUri"in navigator&&!("documentMode"in document);var dt=Dt("webkit");var ft=Dt("android");var pt=Dt("android 2")||Dt("android 3");var _t=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10);var mt=ft&&Dt("Google")&&_t<537&&!("AudioNode"in window);var vt=!!window.opera;var gt=Dt("chrome");var yt=Dt("gecko")&&!dt&&!vt&&!ht;var bt=!gt&&Dt("safari");var wt=Dt("phantom");var Pt="OTransition"in lt;var Lt=navigator.platform.indexOf("Win")===0;var Tt=ht&&"transition"in lt;var xt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!pt;var Mt="MozPerspective"in lt;var zt=!window.L_DISABLE_3D&&(Tt||xt||Mt)&&!Pt&&!wt;var St=typeof orientation!=="undefined"||Dt("mobile");var Ct=St&&dt;var It=St&&xt;var kt=!window.PointerEvent&&window.MSPointerEvent;var Et=!dt&&!!(window.PointerEvent||kt);var Ht=!window.L_NO_TOUCH&&(Et||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);var At=St&&vt;var Ot=St&&yt;var Zt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1;var Bt=function t(){var e=false;try{var i=Object.defineProperty({},"passive",{get:function t(){e=true}});window.addEventListener("testPassiveEventSupport",y,i);window.removeEventListener("testPassiveEventSupport",y,i)}catch(t){}return e};var Ft=function(){return!!document.createElement("canvas").getContext}();var Rt=!!(document.createElementNS&&rt("svg").createSVGRect);var Nt=!Rt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;e.style.behavior="url(#default#VML)";return e&&babelHelpers.typeof(e.adj)==="object"}catch(t){return false}}();function Dt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Wt=(Object.freeze||Object)({ie:ht,ielt9:ut,edge:ct,webkit:dt,android:ft,android23:pt,androidStock:mt,opera:vt,chrome:gt,gecko:yt,safari:bt,phantom:wt,opera12:Pt,win:Lt,ie3d:Tt,webkit3d:xt,gecko3d:Mt,any3d:zt,mobile:St,mobileWebkit:Ct,mobileWebkit3d:It,msPointer:kt,pointer:Et,touch:Ht,mobileOpera:At,mobileGecko:Ot,retina:Zt,passiveEvents:Bt,canvas:Ft,svg:Rt,vml:Nt});var jt=kt?"MSPointerDown":"pointerdown";var Gt=kt?"MSPointerMove":"pointermove";var Ut=kt?"MSPointerUp":"pointerup";var Vt=kt?"MSPointerCancel":"pointercancel";var qt=["INPUT","SELECT","OPTION"];var Yt={};var Kt=false;var Xt=0;function Jt(t,e,i,n){if(e==="touchstart"){Qt(t,i,n)}else if(e==="touchmove"){se(t,i,n)}else if(e==="touchend"){oe(t,i,n)}return this}function $t(t,e,i){var n=t["_leaflet_"+e+i];if(e==="touchstart"){t.removeEventListener(jt,n,false)}else if(e==="touchmove"){t.removeEventListener(Gt,n,false)}else if(e==="touchend"){t.removeEventListener(Ut,n,false);t.removeEventListener(Vt,n,false)}return this}function Qt(t,e,i){var n=p((function(t){if(t.pointerType!=="mouse"&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(qt.indexOf(t.target.tagName)<0){Qe(t)}else{return}}ne(t,e)}));t["_leaflet_touchstart"+i]=n;t.addEventListener(jt,n,false);if(!Kt){document.documentElement.addEventListener(jt,te,true);document.documentElement.addEventListener(Gt,ee,true);document.documentElement.addEventListener(Ut,ie,true);document.documentElement.addEventListener(Vt,ie,true);Kt=true}}function te(t){Yt[t.pointerId]=t;Xt++}function ee(t){if(Yt[t.pointerId]){Yt[t.pointerId]=t}}function ie(t){delete Yt[t.pointerId];Xt--}function ne(t,e){t.touches=[];for(var i in Yt){t.touches.push(Yt[i])}t.changedTouches=[t];e(t)}function se(t,e,i){var n=function t(i){if((i.pointerType===i.MSPOINTER_TYPE_MOUSE||i.pointerType==="mouse")&&i.buttons===0){return}ne(i,e)};t["_leaflet_touchmove"+i]=n;t.addEventListener(Gt,n,false)}function oe(t,e,i){var n=function t(i){ne(i,e)};t["_leaflet_touchend"+i]=n;t.addEventListener(Ut,n,false);t.addEventListener(Vt,n,false)}var re=kt?"MSPointerDown":Et?"pointerdown":"touchstart";var ae=kt?"MSPointerUp":Et?"pointerup":"touchend";var le="_leaflet_";function he(t,e,i){var n,s,o=false,r=250;function a(t){var e;if(Et){if(!ct||t.pointerType==="mouse"){return}e=Xt}else{e=t.touches.length}if(e>1){return}var i=Date.now(),a=i-(n||i);s=t.touches?t.touches[0]:t;o=a>0&&a<=r;n=i}function l(t){if(o&&!s.cancelBubble){if(Et){if(!ct||t.pointerType==="mouse"){return}var i={},r,a;for(a in s){r=s[a];i[a]=r&&r.bind?r.bind(s):r}s=i}s.type="dblclick";s.button=0;e(s);n=null}}t[le+re+i]=a;t[le+ae+i]=l;t[le+"dblclick"+i]=e;t.addEventListener(re,a,Bt?{passive:false}:false);t.addEventListener(ae,l,Bt?{passive:false}:false);t.addEventListener("dblclick",e,false);return this}function ue(t,e){var i=t[le+re+e],n=t[le+ae+e],s=t[le+"dblclick"+e];t.removeEventListener(re,i,Bt?{passive:false}:false);t.removeEventListener(ae,n,Bt?{passive:false}:false);if(!ct){t.removeEventListener("dblclick",s,false)}return this}var ce=Se(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);var de=Se(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);var fe=de==="webkitTransition"||de==="OTransition"?de+"End":"transitionend";function pe(t){return typeof t==="string"?document.getElementById(t):t}function _e(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function me(t,e,i){var n=document.createElement(t);n.className=e||"";if(i){i.appendChild(n)}return n}function ve(t){var e=t.parentNode;if(e){e.removeChild(t)}}function ge(t){while(t.firstChild){t.removeChild(t.firstChild)}}function ye(t){var e=t.parentNode;if(e&&e.lastChild!==t){e.appendChild(t)}}function be(t){var e=t.parentNode;if(e&&e.firstChild!==t){e.insertBefore(t,e.firstChild)}}function we(t,e){if(t.classList!==undefined){return t.classList.contains(e)}var i=xe(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function Pe(t,e){if(t.classList!==undefined){var i=P(e);for(var n=0,s=i.length;n<s;n++){t.classList.add(i[n])}}else if(!we(t,e)){var o=xe(t);Te(t,(o?o+" ":"")+e)}}function Le(t,e){if(t.classList!==undefined){t.classList.remove(e)}else{Te(t,w((" "+xe(t)+" ").replace(" "+e+" "," ")))}}function Te(t,e){if(t.className.baseVal===undefined){t.className=e}else{t.className.baseVal=e}}function xe(t){if(t.correspondingElement){t=t.correspondingElement}return t.className.baseVal===undefined?t.className:t.className.baseVal}function Me(t,e){if("opacity"in t.style){t.style.opacity=e}else if("filter"in t.style){ze(t,e)}}function ze(t,e){var i=false,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(e===1){return}}e=Math.round(e*100);if(i){i.Enabled=e!==100;i.Opacity=e}else{t.style.filter+=" progid:"+n+"(opacity="+e+")"}}function Se(t){var e=document.documentElement.style;for(var i=0;i<t.length;i++){if(t[i]in e){return t[i]}}return false}function Ce(t,e,i){var n=e||new j(0,0);t.style[ce]=(Tt?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function Ie(t,e){t._leaflet_pos=e;if(zt){Ce(t,e)}else{t.style.left=e.x+"px";t.style.top=e.y+"px"}}function ke(t){return t._leaflet_pos||new j(0,0)}var Ee;var He;var Ae;if("onselectstart"in document){Ee=function t(){Ue(window,"selectstart",Qe)};He=function t(){qe(window,"selectstart",Qe)}}else{var Oe=Se(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Ee=function t(){if(Oe){var e=document.documentElement.style;Ae=e[Oe];e[Oe]="none"}};He=function t(){if(Oe){document.documentElement.style[Oe]=Ae;Ae=undefined}}}function Ze(){Ue(window,"dragstart",Qe)}function Be(){qe(window,"dragstart",Qe)}var Fe;var Re;function Ne(t){while(t.tabIndex===-1){t=t.parentNode}if(!t.style){return}De();Fe=t;Re=t.style.outline;t.style.outline="none";Ue(window,"keydown",De)}function De(){if(!Fe){return}Fe.style.outline=Re;Fe=undefined;Re=undefined;qe(window,"keydown",De)}function We(t){do{t=t.parentNode}while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function je(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ge=(Object.freeze||Object)({TRANSFORM:ce,TRANSITION:de,TRANSITION_END:fe,get:pe,getStyle:_e,create:me,remove:ve,empty:ge,toFront:ye,toBack:be,hasClass:we,addClass:Pe,removeClass:Le,setClass:Te,getClass:xe,setOpacity:Me,testProp:Se,setTransform:Ce,setPosition:Ie,getPosition:ke,disableTextSelection:Ee,enableTextSelection:He,disableImageDrag:Ze,enableImageDrag:Be,preventOutline:Ne,restoreOutline:De,getSizedParentNode:We,getScale:je});function Ue(t,e,i,n){if(babelHelpers.typeof(e)==="object"){for(var s in e){Ye(t,s,e[s],i)}}else{e=P(e);for(var o=0,r=e.length;o<r;o++){Ye(t,e[o],i,n)}}return this}var Ve="_leaflet_events";function qe(t,e,i,n){if(babelHelpers.typeof(e)==="object"){for(var s in e){Ke(t,s,e[s],i)}}else if(e){e=P(e);for(var o=0,r=e.length;o<r;o++){Ke(t,e[o],i,n)}}else{for(var a in t[Ve]){Ke(t,a,t[Ve][a])}delete t[Ve]}return this}function Ye(t,e,i,n){var s=e+m(i)+(n?"_"+m(n):"");if(t[Ve]&&t[Ve][s]){return this}var o=function e(s){return i.call(n||t,s||window.event)};var r=o;if(Et&&e.indexOf("touch")===0){Jt(t,e,o,s)}else if(Ht&&e==="dblclick"&&he&&!(Et&&gt)){he(t,o,s)}else if("addEventListener"in t){if(e==="mousewheel"){t.addEventListener("onwheel"in t?"wheel":"mousewheel",o,Bt?{passive:false}:false)}else if(e==="mouseenter"||e==="mouseleave"){o=function e(i){i=i||window.event;if(ai(t,i)){r(i)}};t.addEventListener(e==="mouseenter"?"mouseover":"mouseout",o,false)}else{if(e==="click"&&ft){o=function t(e){hi(e,r)}}t.addEventListener(e,o,false)}}else if("attachEvent"in t){t.attachEvent("on"+e,o)}t[Ve]=t[Ve]||{};t[Ve][s]=o}function Ke(t,e,i,n){var s=e+m(i)+(n?"_"+m(n):""),o=t[Ve]&&t[Ve][s];if(!o){return this}if(Et&&e.indexOf("touch")===0){$t(t,e,s)}else if(Ht&&e==="dblclick"&&ue&&!(Et&&gt)){ue(t,s)}else if("removeEventListener"in t){if(e==="mousewheel"){t.removeEventListener("onwheel"in t?"wheel":"mousewheel",o,Bt?{passive:false}:false)}else{t.removeEventListener(e==="mouseenter"?"mouseover":e==="mouseleave"?"mouseout":e,o,false)}}else if("detachEvent"in t){t.detachEvent("on"+e,o)}t[Ve][s]=null}function Xe(t){if(t.stopPropagation){t.stopPropagation()}else if(t.originalEvent){t.originalEvent._stopped=true}else{t.cancelBubble=true}ri(t);return this}function Je(t){Ye(t,"mousewheel",Xe);return this}function $e(t){Ue(t,"mousedown touchstart dblclick",Xe);Ye(t,"click",oi);return this}function Qe(t){if(t.preventDefault){t.preventDefault()}else{t.returnValue=false}return this}function ti(t){Qe(t);Xe(t);return this}function ei(t,e){if(!e){return new j(t.clientX,t.clientY)}var i=je(e),n=i.boundingClientRect;return new j((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var ii=Lt&&gt?2*window.devicePixelRatio:yt?window.devicePixelRatio:1;function ni(t){return ct?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/ii:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}var si={};function oi(t){si[t.type]=true}function ri(t){var e=si[t.type];si[t.type]=false;return e}function ai(t,e){var i=e.relatedTarget;if(!i){return true}try{while(i&&i!==t){i=i.parentNode}}catch(t){return false}return i!==t}var li;function hi(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=li&&i-li;if(n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated){ti(t);return}li=i;e(t)}var ui=(Object.freeze||Object)({on:Ue,off:qe,stopPropagation:Xe,disableScrollPropagation:Je,disableClickPropagation:$e,preventDefault:Qe,stop:ti,getMousePosition:ei,getWheelDelta:ni,fakeStop:oi,skipped:ri,isExternalTarget:ai,addListener:Ue,removeListener:qe});var ci=W.extend({run:function t(e,i,n,s){this.stop();this._el=e;this._inProgress=true;this._duration=n||.25;this._easeOutPower=1/Math.max(s||.5,.2);this._startPos=ke(e);this._offset=i.subtract(this._startPos);this._startTime=+new Date;this.fire("start");this._animate()},stop:function t(){if(!this._inProgress){return}this._step(true);this._complete()},_animate:function t(){this._animId=Z(this._animate,this);this._step()},_step:function t(e){var i=+new Date-this._startTime,n=this._duration*1e3;if(i<n){this._runFrame(this._easeOut(i/n),e)}else{this._runFrame(1);this._complete()}},_runFrame:function t(e,i){var n=this._startPos.add(this._offset.multiplyBy(e));if(i){n._round()}Ie(this._el,n);this.fire("step")},_complete:function t(){B(this._animId);this._inProgress=false;this.fire("end")},_easeOut:function t(e){return 1-Math.pow(1-e,this._easeOutPower)}});var di=W.extend({options:{crs:st,center:undefined,zoom:undefined,minZoom:undefined,maxZoom:undefined,layers:[],maxBounds:undefined,renderer:undefined,zoomAnimation:true,zoomAnimationThreshold:4,fadeAnimation:true,markerZoomAnimation:true,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:true},initialize:function t(e,i){i=T(this,i);this._handlers=[];this._layers={};this._zoomBoundLayers={};this._sizeChanged=true;this._initContainer(e);this._initLayout();this._onResize=p(this._onResize,this);this._initEvents();if(i.maxBounds){this.setMaxBounds(i.maxBounds)}if(i.zoom!==undefined){this._zoom=this._limitZoom(i.zoom)}if(i.center&&i.zoom!==undefined){this.setView(J(i.center),i.zoom,{reset:true})}this.callInitHooks();this._zoomAnimated=de&&zt&&!At&&this.options.zoomAnimation;if(this._zoomAnimated){this._createAnimProxy();Ue(this._proxy,fe,this._catchTransitionEnd,this)}this._addLayers(this.options.layers)},setView:function t(e,i,n){i=i===undefined?this._zoom:this._limitZoom(i);e=this._limitCenter(J(e),i,this.options.maxBounds);n=n||{};this._stop();if(this._loaded&&!n.reset&&n!==true){if(n.animate!==undefined){n.zoom=d({animate:n.animate},n.zoom);n.pan=d({animate:n.animate,duration:n.duration},n.pan)}var s=this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,i,n.zoom):this._tryAnimatedPan(e,n.pan);if(s){clearTimeout(this._sizeTimer);return this}}this._resetView(e,i);return this},setZoom:function t(e,i){if(!this._loaded){this._zoom=e;return this}return this.setView(this.getCenter(),e,{zoom:i})},zoomIn:function t(e,i){e=e||(zt?this.options.zoomDelta:1);return this.setZoom(this._zoom+e,i)},zoomOut:function t(e,i){e=e||(zt?this.options.zoomDelta:1);return this.setZoom(this._zoom-e,i)},setZoomAround:function t(e,i,n){var s=this.getZoomScale(i),o=this.getSize().divideBy(2),r=e instanceof j?e:this.latLngToContainerPoint(e),a=r.subtract(o).multiplyBy(1-1/s),l=this.containerPointToLatLng(o.add(a));return this.setView(l,i,{zoom:n})},_getBoundsCenterZoom:function t(e,i){i=i||{};e=e.getBounds?e.getBounds():K(e);var n=U(i.paddingTopLeft||i.padding||[0,0]),s=U(i.paddingBottomRight||i.padding||[0,0]),o=this.getBoundsZoom(e,false,n.add(s));o=typeof i.maxZoom==="number"?Math.min(i.maxZoom,o):o;if(o===Infinity){return{center:e.getCenter(),zoom:o}}var r=s.subtract(n).divideBy(2),a=this.project(e.getSouthWest(),o),l=this.project(e.getNorthEast(),o),h=this.unproject(a.add(l).divideBy(2).add(r),o);return{center:h,zoom:o}},fitBounds:function t(e,i){e=K(e);if(!e.isValid()){throw new Error("Bounds are not valid.")}var n=this._getBoundsCenterZoom(e,i);return this.setView(n.center,n.zoom,i)},fitWorld:function t(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function t(e,i){return this.setView(e,this._zoom,{pan:i})},panBy:function t(e,i){e=U(e).round();i=i||{};if(!e.x&&!e.y){return this.fire("moveend")}if(i.animate!==true&&!this.getSize().contains(e)){this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom());return this}if(!this._panAnim){this._panAnim=new ci;this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)}if(!i.noMoveStart){this.fire("movestart")}if(i.animate!==false){Pe(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,i.duration||.25,i.easeLinearity)}else{this._rawPanBy(e);this.fire("move").fire("moveend")}return this},flyTo:function t(e,i,n){n=n||{};if(n.animate===false||!zt){return this.setView(e,i,n)}this._stop();var s=this.project(this.getCenter()),o=this.project(e),r=this.getSize(),a=this._zoom;e=J(e);i=i===undefined?a:i;var l=Math.max(r.x,r.y),h=l*this.getZoomScale(a,i),u=o.distanceTo(s)||1,c=1.42,d=c*c;function f(t){var e=t?-1:1,i=t?h:l,n=h*h-l*l+e*d*d*u*u,s=2*i*d*u,o=n/s,r=Math.sqrt(o*o+1)-o;var a=r<1e-9?-18:Math.log(r);return a}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function _(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return p(t)/_(t)}var v=f(0);function g(t){return l*(_(v)/_(v+c*t))}function y(t){return l*(_(v)*m(v+c*t)-p(v))/d}function b(t){return 1-Math.pow(1-t,1.5)}var w=Date.now(),P=(f(1)-v)/c,L=n.duration?1e3*n.duration:1e3*P*.8;function T(){var t=(Date.now()-w)/L,n=b(t)*P;if(t<=1){this._flyToFrame=Z(T,this);this._move(this.unproject(s.add(o.subtract(s).multiplyBy(y(n)/u)),a),this.getScaleZoom(l/g(n),a),{flyTo:true})}else{this._move(e,i)._moveEnd(true)}}this._moveStart(true,n.noMoveStart);T.call(this);return this},flyToBounds:function t(e,i){var n=this._getBoundsCenterZoom(e,i);return this.flyTo(n.center,n.zoom,i)},setMaxBounds:function t(e){e=K(e);if(!e.isValid()){this.options.maxBounds=null;return this.off("moveend",this._panInsideMaxBounds)}else if(this.options.maxBounds){this.off("moveend",this._panInsideMaxBounds)}this.options.maxBounds=e;if(this._loaded){this._panInsideMaxBounds()}return this.on("moveend",this._panInsideMaxBounds)},setMinZoom:function t(e){var i=this.options.minZoom;this.options.minZoom=e;if(this._loaded&&i!==e){this.fire("zoomlevelschange");if(this.getZoom()<this.options.minZoom){return this.setZoom(e)}}return this},setMaxZoom:function t(e){var i=this.options.maxZoom;this.options.maxZoom=e;if(this._loaded&&i!==e){this.fire("zoomlevelschange");if(this.getZoom()>this.options.maxZoom){return this.setZoom(e)}}return this},panInsideBounds:function t(e,i){this._enforcingBounds=true;var n=this.getCenter(),s=this._limitCenter(n,this._zoom,K(e));if(!n.equals(s)){this.panTo(s,i)}this._enforcingBounds=false;return this},panInside:function t(e,i){i=i||{};var n=U(i.paddingTopLeft||i.padding||[0,0]),s=U(i.paddingBottomRight||i.padding||[0,0]),o=this.getCenter(),r=this.project(o),a=this.project(e),l=this.getPixelBounds(),h=l.getSize().divideBy(2),u=q([l.min.add(n),l.max.subtract(s)]);if(!u.contains(a)){this._enforcingBounds=true;var c=r.subtract(a),d=U(a.x+c.x,a.y+c.y);if(a.x<u.min.x||a.x>u.max.x){d.x=r.x-c.x;if(c.x>0){d.x+=h.x-n.x}else{d.x-=h.x-s.x}}if(a.y<u.min.y||a.y>u.max.y){d.y=r.y-c.y;if(c.y>0){d.y+=h.y-n.y}else{d.y-=h.y-s.y}}this.panTo(this.unproject(d),i);this._enforcingBounds=false}return this},invalidateSize:function t(e){if(!this._loaded){return this}e=d({animate:false,pan:true},e===true?{animate:true}:e);var i=this.getSize();this._sizeChanged=true;this._lastCenter=null;var n=this.getSize(),s=i.divideBy(2).round(),o=n.divideBy(2).round(),r=s.subtract(o);if(!r.x&&!r.y){return this}if(e.animate&&e.pan){this.panBy(r)}else{if(e.pan){this._rawPanBy(r)}this.fire("move");if(e.debounceMoveend){clearTimeout(this._sizeTimer);this._sizeTimer=setTimeout(p(this.fire,this,"moveend"),200)}else{this.fire("moveend")}}return this.fire("resize",{oldSize:i,newSize:n})},stop:function t(){this.setZoom(this._limitZoom(this._zoom));if(!this.options.zoomSnap){this.fire("viewreset")}return this._stop()},locate:function t(e){e=this._locateOptions=d({timeout:1e4,watch:false},e);if(!("geolocation"in navigator)){this._handleGeolocationError({code:0,message:"Geolocation not supported."});return this}var i=p(this._handleGeolocationResponse,this),n=p(this._handleGeolocationError,this);if(e.watch){this._locationWatchId=navigator.geolocation.watchPosition(i,n,e)}else{navigator.geolocation.getCurrentPosition(i,n,e)}return this},stopLocate:function t(){if(navigator.geolocation&&navigator.geolocation.clearWatch){navigator.geolocation.clearWatch(this._locationWatchId)}if(this._locateOptions){this._locateOptions.setView=false}return this},_handleGeolocationError:function t(e){var i=e.code,n=e.message||(i===1?"permission denied":i===2?"position unavailable":"timeout");if(this._locateOptions.setView&&!this._loaded){this.fitWorld()}this.fire("locationerror",{code:i,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function t(e){var i=e.coords.latitude,n=e.coords.longitude,s=new X(i,n),o=s.toBounds(e.coords.accuracy*2),r=this._locateOptions;if(r.setView){var a=this.getBoundsZoom(o);this.setView(s,r.maxZoom?Math.min(a,r.maxZoom):a)}var l={latlng:s,bounds:o,timestamp:e.timestamp};for(var h in e.coords){if(typeof e.coords[h]==="number"){l[h]=e.coords[h]}}this.fire("locationfound",l)},addHandler:function t(e,i){if(!i){return this}var n=this[e]=new i(this);this._handlers.push(n);if(this.options[e]){n.enable()}return this},remove:function t(){this._initEvents(true);if(this._containerId!==this._container._leaflet_id){throw new Error("Map container is being reused by another instance")}try{delete this._container._leaflet_id;delete this._containerId}catch(t){this._container._leaflet_id=undefined;this._containerId=undefined}if(this._locationWatchId!==undefined){this.stopLocate()}this._stop();ve(this._mapPane);if(this._clearControlPos){this._clearControlPos()}if(this._resizeRequest){B(this._resizeRequest);this._resizeRequest=null}this._clearHandlers();if(this._loaded){this.fire("unload")}var e;for(e in this._layers){this._layers[e].remove()}for(e in this._panes){ve(this._panes[e])}this._layers=[];this._panes=[];delete this._mapPane;delete this._renderer;return this},createPane:function t(e,i){var n="leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),s=me("div",n,i||this._mapPane);if(e){this._panes[e]=s}return s},getCenter:function t(){this._checkIfLoaded();if(this._lastCenter&&!this._moved()){return this._lastCenter}return this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function t(){return this._zoom},getBounds:function t(){var e=this.getPixelBounds(),i=this.unproject(e.getBottomLeft()),n=this.unproject(e.getTopRight());return new Y(i,n)},getMinZoom:function t(){return this.options.minZoom===undefined?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function t(){return this.options.maxZoom===undefined?this._layersMaxZoom===undefined?Infinity:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function t(e,i,n){e=K(e);n=U(n||[0,0]);var s=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),a=e.getNorthWest(),l=e.getSouthEast(),h=this.getSize().subtract(n),u=q(this.project(l,s),this.project(a,s)).getSize(),c=zt?this.options.zoomSnap:1,d=h.x/u.x,f=h.y/u.y,p=i?Math.max(d,f):Math.min(d,f);s=this.getScaleZoom(p,s);if(c){s=Math.round(s/(c/100))*(c/100);s=i?Math.ceil(s/c)*c:Math.floor(s/c)*c}return Math.max(o,Math.min(r,s))},getSize:function t(){if(!this._size||this._sizeChanged){this._size=new j(this._container.clientWidth||0,this._container.clientHeight||0);this._sizeChanged=false}return this._size.clone()},getPixelBounds:function t(e,i){var n=this._getTopLeftPoint(e,i);return new V(n,n.add(this.getSize()))},getPixelOrigin:function t(){this._checkIfLoaded();return this._pixelOrigin},getPixelWorldBounds:function t(e){return this.options.crs.getProjectedBounds(e===undefined?this.getZoom():e)},getPane:function t(e){return typeof e==="string"?this._panes[e]:e},getPanes:function t(){return this._panes},getContainer:function t(){return this._container},getZoomScale:function t(e,i){var n=this.options.crs;i=i===undefined?this._zoom:i;return n.scale(e)/n.scale(i)},getScaleZoom:function t(e,i){var n=this.options.crs;i=i===undefined?this._zoom:i;var s=n.zoom(e*n.scale(i));return isNaN(s)?Infinity:s},project:function t(e,i){i=i===undefined?this._zoom:i;return this.options.crs.latLngToPoint(J(e),i)},unproject:function t(e,i){i=i===undefined?this._zoom:i;return this.options.crs.pointToLatLng(U(e),i)},layerPointToLatLng:function t(e){var i=U(e).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function t(e){var i=this.project(J(e))._round();return i._subtract(this.getPixelOrigin())},wrapLatLng:function t(e){return this.options.crs.wrapLatLng(J(e))},wrapLatLngBounds:function t(e){return this.options.crs.wrapLatLngBounds(K(e))},distance:function t(e,i){return this.options.crs.distance(J(e),J(i))},containerPointToLayerPoint:function t(e){return U(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function t(e){return U(e).add(this._getMapPanePos())},containerPointToLatLng:function t(e){var i=this.containerPointToLayerPoint(U(e));return this.layerPointToLatLng(i)},latLngToContainerPoint:function t(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(J(e)))},mouseEventToContainerPoint:function t(e){return ei(e,this._container)},mouseEventToLayerPoint:function t(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function t(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function t(e){var i=this._container=pe(e);if(!i){throw new Error("Map container not found.")}else if(i._leaflet_id){throw new Error("Map container is already initialized.")}Ue(i,"scroll",this._onScroll,this);this._containerId=m(i)},_initLayout:function t(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&zt;Pe(e,"leaflet-container"+(Ht?" leaflet-touch":"")+(Zt?" leaflet-retina":"")+(ut?" leaflet-oldie":"")+(bt?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=_e(e,"position");if(i!=="absolute"&&i!=="relative"&&i!=="fixed"){e.style.position="relative"}this._initPanes();if(this._initControlPos){this._initControlPos()}},_initPanes:function t(){var e=this._panes={};this._paneRenderers={};this._mapPane=this.createPane("mapPane",this._container);Ie(this._mapPane,new j(0,0));this.createPane("tilePane");this.createPane("shadowPane");this.createPane("overlayPane");this.createPane("markerPane");this.createPane("tooltipPane");this.createPane("popupPane");if(!this.options.markerZoomAnimation){Pe(e.markerPane,"leaflet-zoom-hide");Pe(e.shadowPane,"leaflet-zoom-hide")}},_resetView:function t(e,i){Ie(this._mapPane,new j(0,0));var n=!this._loaded;this._loaded=true;i=this._limitZoom(i);this.fire("viewprereset");var s=this._zoom!==i;this._moveStart(s,false)._move(e,i)._moveEnd(s);this.fire("viewreset");if(n){this.fire("load")}},_moveStart:function t(e,i){if(e){this.fire("zoomstart")}if(!i){this.fire("movestart")}return this},_move:function t(e,i,n){if(i===undefined){i=this._zoom}var s=this._zoom!==i;this._zoom=i;this._lastCenter=e;this._pixelOrigin=this._getNewPixelOrigin(e);if(s||n&&n.pinch){this.fire("zoom",n)}return this.fire("move",n)},_moveEnd:function t(e){if(e){this.fire("zoomend")}return this.fire("moveend")},_stop:function t(){B(this._flyToFrame);if(this._panAnim){this._panAnim.stop()}return this},_rawPanBy:function t(e){Ie(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function t(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function t(){if(!this._enforcingBounds){this.panInsideBounds(this.options.maxBounds)}},_checkIfLoaded:function t(){if(!this._loaded){throw new Error("Set map center and zoom first.")}},_initEvents:function t(e){this._targets={};this._targets[m(this._container)]=this;var i=e?qe:Ue;i(this._container,"click dblclick mousedown mouseup "+"mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this);if(this.options.trackResize){i(window,"resize",this._onResize,this)}if(zt&&this.options.transform3DLimit){(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)}},_onResize:function t(){B(this._resizeRequest);this._resizeRequest=Z((function(){this.invalidateSize({debounceMoveend:true})}),this)},_onScroll:function t(){this._container.scrollTop=0;this._container.scrollLeft=0},_onMoveEnd:function t(){var e=this._getMapPanePos();if(Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit){this._resetView(this.getCenter(),this.getZoom())}},_findEventTargets:function t(e,i){var n=[],s,o=i==="mouseout"||i==="mouseover",r=e.target||e.srcElement,a=false;while(r){s=this._targets[m(r)];if(s&&(i==="click"||i==="preclick")&&!e._simulated&&this._draggableMoved(s)){a=true;break}if(s&&s.listens(i,true)){if(o&&!ai(r,e)){break}n.push(s);if(o){break}}if(r===this._container){break}r=r.parentNode}if(!n.length&&!a&&!o&&ai(r,e)){n=[this]}return n},_handleDOMEvent:function t(e){if(!this._loaded||ri(e)){return}var i=e.type;if(i==="mousedown"||i==="keypress"||i==="keyup"||i==="keydown"){Ne(e.target||e.srcElement)}this._fireDOMEvent(e,i)},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function t(e,i,n){if(e.type==="click"){var s=d({},e);s.type="preclick";this._fireDOMEvent(s,s.type,n)}if(e._stopped){return}n=(n||[]).concat(this._findEventTargets(e,i));if(!n.length){return}var o=n[0];if(i==="contextmenu"&&o.listens(i,true)){Qe(e)}var r={originalEvent:e};if(e.type!=="keypress"&&e.type!=="keydown"&&e.type!=="keyup"){var a=o.getLatLng&&(!o._radius||o._radius<=10);r.containerPoint=a?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(e);r.layerPoint=this.containerPointToLayerPoint(r.containerPoint);r.latlng=a?o.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var l=0;l<n.length;l++){n[l].fire(i,r,true);if(r.originalEvent._stopped||n[l].options.bubblingMouseEvents===false&&C(this._mouseEvents,i)!==-1){return}}},_draggableMoved:function t(e){e=e.dragging&&e.dragging.enabled()?e:this;return e.dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function t(){for(var e=0,i=this._handlers.length;e<i;e++){this._handlers[e].disable()}},whenReady:function t(e,i){if(this._loaded){e.call(i||this,{target:this})}else{this.on("load",e,i)}return this},_getMapPanePos:function t(){return ke(this._mapPane)||new j(0,0)},_moved:function t(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function t(e,i){var n=e&&i!==undefined?this._getNewPixelOrigin(e,i):this.getPixelOrigin();return n.subtract(this._getMapPanePos())},_getNewPixelOrigin:function t(e,i){var n=this.getSize()._divideBy(2);return this.project(e,i)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function t(e,i,n){var s=this._getNewPixelOrigin(n,i);return this.project(e,i)._subtract(s)},_latLngBoundsToNewLayerBounds:function t(e,i,n){var s=this._getNewPixelOrigin(n,i);return q([this.project(e.getSouthWest(),i)._subtract(s),this.project(e.getNorthWest(),i)._subtract(s),this.project(e.getSouthEast(),i)._subtract(s),this.project(e.getNorthEast(),i)._subtract(s)])},_getCenterLayerPoint:function t(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function t(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function t(e,i,n){if(!n){return e}var s=this.project(e,i),o=this.getSize().divideBy(2),r=new V(s.subtract(o),s.add(o)),a=this._getBoundsOffset(r,n,i);if(a.round().equals([0,0])){return e}return this.unproject(s.add(a),i)},_limitOffset:function t(e,i){if(!i){return e}var n=this.getPixelBounds(),s=new V(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(s,i))},_getBoundsOffset:function t(e,i,n){var s=q(this.project(i.getNorthEast(),n),this.project(i.getSouthWest(),n)),o=s.min.subtract(e.min),r=s.max.subtract(e.max),a=this._rebound(o.x,-r.x),l=this._rebound(o.y,-r.y);return new j(a,l)},_rebound:function t(e,i){return e+i>0?Math.round(e-i)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(i))},_limitZoom:function t(e){var i=this.getMinZoom(),n=this.getMaxZoom(),s=zt?this.options.zoomSnap:1;if(s){e=Math.round(e/s)*s}return Math.max(i,Math.min(n,e))},_onPanTransitionStep:function t(){this.fire("move")},_onPanTransitionEnd:function t(){Le(this._mapPane,"leaflet-pan-anim");this.fire("moveend")},_tryAnimatedPan:function t(e,i){var n=this._getCenterOffset(e)._trunc();if((i&&i.animate)!==true&&!this.getSize().contains(n)){return false}this.panBy(n,i);return true},_createAnimProxy:function t(){var e=this._proxy=me("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e);this.on("zoomanim",(function(t){var e=ce,i=this._proxy.style[e];Ce(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1));if(i===this._proxy.style[e]&&this._animatingZoom){this._onZoomTransitionEnd()}}),this);this.on("load moveend",this._animMoveEnd,this);this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function t(){ve(this._proxy);this.off("load moveend",this._animMoveEnd,this);delete this._proxy},_animMoveEnd:function t(){var e=this.getCenter(),i=this.getZoom();Ce(this._proxy,this.project(e,i),this.getZoomScale(i,1))},_catchTransitionEnd:function t(e){if(this._animatingZoom&&e.propertyName.indexOf("transform")>=0){this._onZoomTransitionEnd()}},_nothingToAnimate:function t(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function t(e,i,n){if(this._animatingZoom){return true}n=n||{};if(!this._zoomAnimated||n.animate===false||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold){return false}var s=this.getZoomScale(i),o=this._getCenterOffset(e)._divideBy(1-1/s);if(n.animate!==true&&!this.getSize().contains(o)){return false}Z((function(){this._moveStart(true,false)._animateZoom(e,i,true)}),this);return true},_animateZoom:function t(e,i,n,s){if(!this._mapPane){return}if(n){this._animatingZoom=true;this._animateToCenter=e;this._animateToZoom=i;Pe(this._mapPane,"leaflet-zoom-anim")}this.fire("zoomanim",{center:e,zoom:i,noUpdate:s});setTimeout(p(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function t(){if(!this._animatingZoom){return}if(this._mapPane){Le(this._mapPane,"leaflet-zoom-anim")}this._animatingZoom=false;this._move(this._animateToCenter,this._animateToZoom);Z((function(){this._moveEnd(true)}),this)}});function fi(t,e){return new di(t,e)}var pi=R.extend({options:{position:"topright"},initialize:function t(e){T(this,e)},getPosition:function t(){return this.options.position},setPosition:function t(e){var i=this._map;if(i){i.removeControl(this)}this.options.position=e;if(i){i.addControl(this)}return this},getContainer:function t(){return this._container},addTo:function t(e){this.remove();this._map=e;var i=this._container=this.onAdd(e),n=this.getPosition(),s=e._controlCorners[n];Pe(i,"leaflet-control");if(n.indexOf("bottom")!==-1){s.insertBefore(i,s.firstChild)}else{s.appendChild(i)}this._map.on("unload",this.remove,this);return this},remove:function t(){if(!this._map){return this}ve(this._container);if(this.onRemove){this.onRemove(this._map)}this._map.off("unload",this.remove,this);this._map=null;return this},_refocusOnMap:function t(e){if(this._map&&e&&e.screenX>0&&e.screenY>0){this._map.getContainer().focus()}}});di.include({addControl:function t(e){e.addTo(this);return this},removeControl:function t(e){e.remove();return this},_initControlPos:function t(){var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=me("div",i+"control-container",this._container);function s(t,s){var o=i+t+" "+i+s;e[t+s]=me("div",o,n)}s("top","left");s("top","right");s("bottom","left");s("bottom","right")},_clearControlPos:function t(){for(var e in this._controlCorners){ve(this._controlCorners[e])}ve(this._controlContainer);delete this._controlCorners;delete this._controlContainer}});var _i=pi.extend({options:{collapsed:true,position:"topright",autoZIndex:true,hideSingleBase:false,sortLayers:false,sortFunction:function t(e,i,n,s){return n<s?-1:s<n?1:0}},initialize:function t(e,i,n){T(this,n);this._layerControlInputs=[];this._layers=[];this._lastZIndex=0;this._handlingClick=false;for(var s in e){this._addLayer(e[s],s)}for(s in i){this._addLayer(i[s],s,true)}},onAdd:function t(e){this._initLayout();this._update();this._map=e;e.on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++){this._layers[i].layer.on("add remove",this._onLayerChange,this)}return this._container},addTo:function t(e){pi.prototype.addTo.call(this,e);return this._expandIfNotCollapsed()},onRemove:function t(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++){this._layers[e].layer.off("add remove",this._onLayerChange,this)}},addBaseLayer:function t(e,i){this._addLayer(e,i);return this._map?this._update():this},addOverlay:function t(e,i){this._addLayer(e,i,true);return this._map?this._update():this},removeLayer:function t(e){e.off("add remove",this._onLayerChange,this);var i=this._getLayer(m(e));if(i){this._layers.splice(this._layers.indexOf(i),1)}return this._map?this._update():this},expand:function t(){Pe(this._container,"leaflet-control-layers-expanded");this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);if(e<this._section.clientHeight){Pe(this._section,"leaflet-control-layers-scrollbar");this._section.style.height=e+"px"}else{Le(this._section,"leaflet-control-layers-scrollbar")}this._checkDisabledLayers();return this},collapse:function t(){Le(this._container,"leaflet-control-layers-expanded");return this},_initLayout:function t(){var e="leaflet-control-layers",i=this._container=me("div",e),n=this.options.collapsed;i.setAttribute("aria-haspopup",true);$e(i);Je(i);var s=this._section=me("section",e+"-list");if(n){this._map.on("click",this.collapse,this);if(!ft){Ue(i,{mouseenter:this.expand,mouseleave:this.collapse},this)}}var o=this._layersLink=me("a",e+"-toggle",i);o.href="#";o.title="Layers";if(Ht){Ue(o,"click",ti);Ue(o,"click",this.expand,this)}else{Ue(o,"focus",this.expand,this)}if(!n){this.expand()}this._baseLayersList=me("div",e+"-base",s);this._separator=me("div",e+"-separator",s);this._overlaysList=me("div",e+"-overlays",s);i.appendChild(s)},_getLayer:function t(e){for(var i=0;i<this._layers.length;i++){if(this._layers[i]&&m(this._layers[i].layer)===e){return this._layers[i]}}},_addLayer:function t(e,i,n){if(this._map){e.on("add remove",this._onLayerChange,this)}this._layers.push({layer:e,name:i,overlay:n});if(this.options.sortLayers){this._layers.sort(p((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this))}if(this.options.autoZIndex&&e.setZIndex){this._lastZIndex++;e.setZIndex(this._lastZIndex)}this._expandIfNotCollapsed()},_update:function t(){if(!this._container){return this}ge(this._baseLayersList);ge(this._overlaysList);this._layerControlInputs=[];var e,i,n,s,o=0;for(n=0;n<this._layers.length;n++){s=this._layers[n];this._addItem(s);i=i||s.overlay;e=e||!s.overlay;o+=!s.overlay?1:0}if(this.options.hideSingleBase){e=e&&o>1;this._baseLayersList.style.display=e?"":"none"}this._separator.style.display=i&&e?"":"none";return this},_onLayerChange:function t(e){if(!this._handlingClick){this._update()}var i=this._getLayer(m(e.target));var n=i.overlay?e.type==="add"?"overlayadd":"overlayremove":e.type==="add"?"baselayerchange":null;if(n){this._map.fire(n,i)}},_createRadioElement:function t(e,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(i?' checked="checked"':"")+"/>";var s=document.createElement("div");s.innerHTML=n;return s.firstChild},_addItem:function t(e){var i=document.createElement("label"),n=this._map.hasLayer(e.layer),s;if(e.overlay){s=document.createElement("input");s.type="checkbox";s.className="leaflet-control-layers-selector";s.defaultChecked=n}else{s=this._createRadioElement("leaflet-base-layers_"+m(this),n)}this._layerControlInputs.push(s);s.layerId=m(e.layer);Ue(s,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+e.name;var r=document.createElement("div");i.appendChild(r);r.appendChild(s);r.appendChild(o);var a=e.overlay?this._overlaysList:this._baseLayersList;a.appendChild(i);this._checkDisabledLayers();return i},_onInputClick:function t(){var e=this._layerControlInputs,i,n;var s=[],o=[];this._handlingClick=true;for(var r=e.length-1;r>=0;r--){i=e[r];n=this._getLayer(i.layerId).layer;if(i.checked){s.push(n)}else if(!i.checked){o.push(n)}}for(r=0;r<o.length;r++){if(this._map.hasLayer(o[r])){this._map.removeLayer(o[r])}}for(r=0;r<s.length;r++){if(!this._map.hasLayer(s[r])){this._map.addLayer(s[r])}}this._handlingClick=false;this._refocusOnMap()},_checkDisabledLayers:function t(){var e=this._layerControlInputs,i,n,s=this._map.getZoom();for(var o=e.length-1;o>=0;o--){i=e[o];n=this._getLayer(i.layerId).layer;i.disabled=n.options.minZoom!==undefined&&s<n.options.minZoom||n.options.maxZoom!==undefined&&s>n.options.maxZoom}},_expandIfNotCollapsed:function t(){if(this._map&&!this.options.collapsed){this.expand()}return this},_expand:function t(){return this.expand()},_collapse:function t(){return this.collapse()}});var mi=pi.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function t(e){var i="leaflet-control-zoom",n=me("div",i+" leaflet-bar"),s=this.options;this._zoomInButton=this._createButton(s.zoomInText,s.zoomInTitle,i+"-in",n,this._zoomIn);this._zoomOutButton=this._createButton(s.zoomOutText,s.zoomOutTitle,i+"-out",n,this._zoomOut);this._updateDisabled();e.on("zoomend zoomlevelschange",this._updateDisabled,this);return n},onRemove:function t(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function t(){this._disabled=true;this._updateDisabled();return this},enable:function t(){this._disabled=false;this._updateDisabled();return this},_zoomIn:function t(e){if(!this._disabled&&this._map._zoom<this._map.getMaxZoom()){this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))}},_zoomOut:function t(e){if(!this._disabled&&this._map._zoom>this._map.getMinZoom()){this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))}},_createButton:function t(e,i,n,s,o){var r=me("a",n,s);r.innerHTML=e;r.href="#";r.title=i;r.setAttribute("role","button");r.setAttribute("aria-label",i);$e(r);Ue(r,"click",ti);Ue(r,"click",o,this);Ue(r,"click",this._refocusOnMap,this);return r},_updateDisabled:function t(){var e=this._map,i="leaflet-disabled";Le(this._zoomInButton,i);Le(this._zoomOutButton,i);if(this._disabled||e._zoom===e.getMinZoom()){Pe(this._zoomOutButton,i)}if(this._disabled||e._zoom===e.getMaxZoom()){Pe(this._zoomInButton,i)}}});di.mergeOptions({zoomControl:true});di.addInitHook((function(){if(this.options.zoomControl){this.zoomControl=new mi;this.addControl(this.zoomControl)}}));var vi=pi.extend({options:{position:"bottomleft",maxWidth:100,metric:true,imperial:true},onAdd:function t(e){var i="leaflet-control-scale",n=me("div",i),s=this.options;this._addScales(s,i+"-line",n);e.on(s.updateWhenIdle?"moveend":"move",this._update,this);e.whenReady(this._update,this);return n},onRemove:function t(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function t(e,i,n){if(e.metric){this._mScale=me("div",i,n)}if(e.imperial){this._iScale=me("div",i,n)}},_update:function t(){var e=this._map,i=e.getSize().y/2;var n=e.distance(e.containerPointToLatLng([0,i]),e.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(n)},_updateScales:function t(e){if(this.options.metric&&e){this._updateMetric(e)}if(this.options.imperial&&e){this._updateImperial(e)}},_updateMetric:function t(e){var i=this._getRoundNum(e),n=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,n,i/e)},_updateImperial:function t(e){var i=e*3.2808399,n,s,o;if(i>5280){n=i/5280;s=this._getRoundNum(n);this._updateScale(this._iScale,s+" mi",s/n)}else{o=this._getRoundNum(i);this._updateScale(this._iScale,o+" ft",o/i)}},_updateScale:function t(e,i,n){e.style.width=Math.round(this.options.maxWidth*n)+"px";e.innerHTML=i},_getRoundNum:function t(e){var i=Math.pow(10,(Math.floor(e)+"").length-1),n=e/i;n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1;return i*n}});var gi=pi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function t(e){T(this,e);this._attributions={}},onAdd:function t(e){e.attributionControl=this;this._container=me("div","leaflet-control-attribution");$e(this._container);for(var i in e._layers){if(e._layers[i].getAttribution){this.addAttribution(e._layers[i].getAttribution())}}this._update();return this._container},setPrefix:function t(e){this.options.prefix=e;this._update();return this},addAttribution:function t(e){if(!e){return this}if(!this._attributions[e]){this._attributions[e]=0}this._attributions[e]++;this._update();return this},removeAttribution:function t(e){if(!e){return this}if(this._attributions[e]){this._attributions[e]--;this._update()}return this},_update:function t(){if(!this._map){return}var e=[];for(var i in this._attributions){if(this._attributions[i]){e.push(i)}}var n=[];if(this.options.prefix){n.push(this.options.prefix)}if(e.length){n.push(e.join(", "))}this._container.innerHTML=n.join(" | ")}});di.mergeOptions({attributionControl:true});di.addInitHook((function(){if(this.options.attributionControl){(new gi).addTo(this)}}));pi.Layers=_i;pi.Zoom=mi;pi.Scale=vi;pi.Attribution=gi;var yi=R.extend({initialize:function t(e){this._map=e},enable:function t(){if(this._enabled){return this}this._enabled=true;this.addHooks();return this},disable:function t(){if(!this._enabled){return this}this._enabled=false;this.removeHooks();return this},enabled:function t(){return!!this._enabled}});yi.addTo=function(t,e){t.addHandler(e,this);return this};var bi=Ht?"touchstart mousedown":"mousedown";var wi={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"};var Pi={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"};var Li=W.extend({options:{clickTolerance:3},initialize:function t(e,i,n,s){T(this,s);this._element=e;this._dragStartTarget=i||e;this._preventOutline=n},enable:function t(){if(this._enabled){return}Ue(this._dragStartTarget,bi,this._onDown,this);this._enabled=true},disable:function t(){if(!this._enabled){return}if(Li._dragging===this){this.finishDrag()}qe(this._dragStartTarget,bi,this._onDown,this);this._enabled=false;this._moved=false},_onDown:function t(e){if(e._simulated||!this._enabled){return}this._moved=false;if(we(this._element,"leaflet-zoom-anim")){return}if(Li._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches){return}Li._dragging=this;if(this._preventOutline){Ne(this._element)}Ze();Ee();if(this._moving){return}this.fire("down");var i=e.touches?e.touches[0]:e,n=We(this._element);this._startPoint=new j(i.clientX,i.clientY);this._parentScale=je(n);Ue(document,Pi[e.type],this._onMove,this);Ue(document,wi[e.type],this._onUp,this)},_onMove:function t(e){if(e._simulated||!this._enabled){return}if(e.touches&&e.touches.length>1){this._moved=true;return}var i=e.touches&&e.touches.length===1?e.touches[0]:e,n=new j(i.clientX,i.clientY)._subtract(this._startPoint);if(!n.x&&!n.y){return}if(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance){return}n.x/=this._parentScale.x;n.y/=this._parentScale.y;Qe(e);if(!this._moved){this.fire("dragstart");this._moved=true;this._startPos=ke(this._element).subtract(n);Pe(document.body,"leaflet-dragging");this._lastTarget=e.target||e.srcElement;if(window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance){this._lastTarget=this._lastTarget.correspondingUseElement}Pe(this._lastTarget,"leaflet-drag-target")}this._newPos=this._startPos.add(n);this._moving=true;B(this._animRequest);this._lastEvent=e;this._animRequest=Z(this._updatePosition,this,true)},_updatePosition:function t(){var e={originalEvent:this._lastEvent};this.fire("predrag",e);Ie(this._element,this._newPos);this.fire("drag",e)},_onUp:function t(e){if(e._simulated||!this._enabled){return}this.finishDrag()},finishDrag:function t(){Le(document.body,"leaflet-dragging");if(this._lastTarget){Le(this._lastTarget,"leaflet-drag-target");this._lastTarget=null}for(var e in Pi){qe(document,Pi[e],this._onMove,this);qe(document,wi[e],this._onUp,this)}Be();He();if(this._moved&&this._moving){B(this._animRequest);this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})}this._moving=false;Li._dragging=false}});function Ti(t,e){if(!e||!t.length){return t.slice()}var i=e*e;t=Ci(t,i);t=zi(t,i);return t}function xi(t,e,i){return Math.sqrt(Oi(t,e,i,true))}function Mi(t,e,i){return Oi(t,e,i)}function zi(t,e){var i=t.length,n=(typeof Uint8Array==="undefined"?"undefined":babelHelpers.typeof(Uint8Array))!==undefined+""?Uint8Array:Array,s=new n(i);s[0]=s[i-1]=1;Si(t,s,e,0,i-1);var o,r=[];for(o=0;o<i;o++){if(s[o]){r.push(t[o])}}return r}function Si(t,e,i,n,s){var o=0,r,a,l;for(a=n+1;a<=s-1;a++){l=Oi(t[a],t[n],t[s],true);if(l>o){r=a;o=l}}if(o>i){e[r]=1;Si(t,e,i,n,r);Si(t,e,i,r,s)}}function Ci(t,e){var i=[t[0]];for(var n=1,s=0,o=t.length;n<o;n++){if(Ai(t[n],t[s])>e){i.push(t[n]);s=n}}if(s<o-1){i.push(t[o-1])}return i}var Ii;function ki(t,e,i,n,s){var o=n?Ii:Hi(t,i),r=Hi(e,i),a,l,h;Ii=r;while(true){if(!(o|r)){return[t,e]}if(o&r){return false}a=o||r;l=Ei(t,e,a,i,s);h=Hi(l,i);if(a===o){t=l;o=h}else{e=l;r=h}}}function Ei(t,e,i,n,s){var o=e.x-t.x,r=e.y-t.y,a=n.min,l=n.max,h,u;if(i&8){h=t.x+o*(l.y-t.y)/r;u=l.y}else if(i&4){h=t.x+o*(a.y-t.y)/r;u=a.y}else if(i&2){h=l.x;u=t.y+r*(l.x-t.x)/o}else if(i&1){h=a.x;u=t.y+r*(a.x-t.x)/o}return new j(h,u,s)}function Hi(t,e){var i=0;if(t.x<e.min.x){i|=1}else if(t.x>e.max.x){i|=2}if(t.y<e.min.y){i|=4}else if(t.y>e.max.y){i|=8}return i}function Ai(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Oi(t,e,i,n){var s=e.x,o=e.y,r=i.x-s,a=i.y-o,l=r*r+a*a,h;if(l>0){h=((t.x-s)*r+(t.y-o)*a)/l;if(h>1){s=i.x;o=i.y}else if(h>0){s+=r*h;o+=a*h}}r=t.x-s;a=t.y-o;return n?r*r+a*a:new j(s,o)}function Zi(t){return!S(t[0])||babelHelpers.typeof(t[0][0])!=="object"&&typeof t[0][0]!=="undefined"}function Bi(t){console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead.");return Zi(t)}var Fi=(Object.freeze||Object)({simplify:Ti,pointToSegmentDistance:xi,closestPointOnSegment:Mi,clipSegment:ki,_getEdgeIntersection:Ei,_getBitCode:Hi,_sqClosestPointOnSegment:Oi,isFlat:Zi,_flat:Bi});function Ri(t,e,i){var n,s=[1,4,2,8],o,r,a,l,h,u,c,d;for(o=0,u=t.length;o<u;o++){t[o]._code=Hi(t[o],e)}for(a=0;a<4;a++){c=s[a];n=[];for(o=0,u=t.length,r=u-1;o<u;r=o++){l=t[o];h=t[r];if(!(l._code&c)){if(h._code&c){d=Ei(h,l,c,e,i);d._code=Hi(d,e);n.push(d)}n.push(l)}else if(!(h._code&c)){d=Ei(h,l,c,e,i);d._code=Hi(d,e);n.push(d)}}t=n}return t}var Ni=(Object.freeze||Object)({clipPolygon:Ri});var Di={project:function t(e){return new j(e.lng,e.lat)},unproject:function t(e){return new X(e.y,e.x)},bounds:new V([-180,-90],[180,90])};var Wi={R:6378137,R_MINOR:6356752.314245179,bounds:new V([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function t(e){var i=Math.PI/180,n=this.R,s=e.lat*i,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),a=r*Math.sin(s);var l=Math.tan(Math.PI/4-s/2)/Math.pow((1-a)/(1+a),r/2);s=-n*Math.log(Math.max(l,1e-10));return new j(e.lng*i*n,s)},unproject:function t(e){var i=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),r=Math.exp(-e.y/n),a=Math.PI/2-2*Math.atan(r);for(var l=0,h=.1,u;l<15&&Math.abs(h)>1e-7;l++){u=o*Math.sin(a);u=Math.pow((1-u)/(1+u),o/2);h=Math.PI/2-2*Math.atan(r*u)-a;a+=h}return new X(a*i,e.x*i/n)}};var ji=(Object.freeze||Object)({LonLat:Di,Mercator:Wi,SphericalMercator:et});var Gi=d({},Q,{code:"EPSG:3395",projection:Wi,transformation:function(){var t=.5/(Math.PI*Wi.R);return nt(t,.5,-t,.5)}()});var Ui=d({},Q,{code:"EPSG:4326",projection:Di,transformation:nt(1/180,1,-1/180,.5)});var Vi=d({},$,{projection:Di,transformation:nt(1,0,-1,0),scale:function t(e){return Math.pow(2,e)},zoom:function t(e){return Math.log(e)/Math.LN2},distance:function t(e,i){var n=i.lng-e.lng,s=i.lat-e.lat;return Math.sqrt(n*n+s*s)},infinite:true});$.Earth=Q;$.EPSG3395=Gi;$.EPSG3857=st;$.EPSG900913=ot;$.EPSG4326=Ui;$.Simple=Vi;var qi=W.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:true},addTo:function t(e){e.addLayer(this);return this},remove:function t(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function t(e){if(e){e.removeLayer(this)}return this},getPane:function t(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function t(e){this._map._targets[m(e)]=this;return this},removeInteractiveTarget:function t(e){delete this._map._targets[m(e)];return this},getAttribution:function t(){return this.options.attribution},_layerAdd:function t(e){var i=e.target;if(!i.hasLayer(this)){return}this._map=i;this._zoomAnimated=i._zoomAnimated;if(this.getEvents){var n=this.getEvents();i.on(n,this);this.once("remove",(function(){i.off(n,this)}),this)}this.onAdd(i);if(this.getAttribution&&i.attributionControl){i.attributionControl.addAttribution(this.getAttribution())}this.fire("add");i.fire("layeradd",{layer:this})}});di.include({addLayer:function t(e){if(!e._layerAdd){throw new Error("The provided object is not a Layer.")}var i=m(e);if(this._layers[i]){return this}this._layers[i]=e;e._mapToAdd=this;if(e.beforeAdd){e.beforeAdd(this)}this.whenReady(e._layerAdd,e);return this},removeLayer:function t(e){var i=m(e);if(!this._layers[i]){return this}if(this._loaded){e.onRemove(this)}if(e.getAttribution&&this.attributionControl){this.attributionControl.removeAttribution(e.getAttribution())}delete this._layers[i];if(this._loaded){this.fire("layerremove",{layer:e});e.fire("remove")}e._map=e._mapToAdd=null;return this},hasLayer:function t(e){return!!e&&m(e)in this._layers},eachLayer:function t(e,i){for(var n in this._layers){e.call(i,this._layers[n])}return this},_addLayers:function t(e){e=e?S(e)?e:[e]:[];for(var i=0,n=e.length;i<n;i++){this.addLayer(e[i])}},_addZoomLimit:function t(e){if(isNaN(e.options.maxZoom)||!isNaN(e.options.minZoom)){this._zoomBoundLayers[m(e)]=e;this._updateZoomLevels()}},_removeZoomLimit:function t(e){var i=m(e);if(this._zoomBoundLayers[i]){delete this._zoomBoundLayers[i];this._updateZoomLevels()}},_updateZoomLevels:function t(){var e=Infinity,i=-Infinity,n=this._getZoomSpan();for(var s in this._zoomBoundLayers){var o=this._zoomBoundLayers[s].options;e=o.minZoom===undefined?e:Math.min(e,o.minZoom);i=o.maxZoom===undefined?i:Math.max(i,o.maxZoom)}this._layersMaxZoom=i===-Infinity?undefined:i;this._layersMinZoom=e===Infinity?undefined:e;if(n!==this._getZoomSpan()){this.fire("zoomlevelschange")}if(this.options.maxZoom===undefined&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom){this.setZoom(this._layersMaxZoom)}if(this.options.minZoom===undefined&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom){this.setZoom(this._layersMinZoom)}}});var Yi=qi.extend({initialize:function t(e,i){T(this,i);this._layers={};var n,s;if(e){for(n=0,s=e.length;n<s;n++){this.addLayer(e[n])}}},addLayer:function t(e){var i=this.getLayerId(e);this._layers[i]=e;if(this._map){this._map.addLayer(e)}return this},removeLayer:function t(e){var i=e in this._layers?e:this.getLayerId(e);if(this._map&&this._layers[i]){this._map.removeLayer(this._layers[i])}delete this._layers[i];return this},hasLayer:function t(e){return!!e&&(e in this._layers||this.getLayerId(e)in this._layers)},clearLayers:function t(){return this.eachLayer(this.removeLayer,this)},invoke:function t(e){var i=Array.prototype.slice.call(arguments,1),n,s;for(n in this._layers){s=this._layers[n];if(s[e]){s[e].apply(s,i)}}return this},onAdd:function t(e){this.eachLayer(e.addLayer,e)},onRemove:function t(e){this.eachLayer(e.removeLayer,e)},eachLayer:function t(e,i){for(var n in this._layers){e.call(i,this._layers[n])}return this},getLayer:function t(e){return this._layers[e]},getLayers:function t(){var e=[];this.eachLayer(e.push,e);return e},setZIndex:function t(e){return this.invoke("setZIndex",e)},getLayerId:function t(e){return m(e)}});var Ki=Yi.extend({addLayer:function t(e){if(this.hasLayer(e)){return this}e.addEventParent(this);Yi.prototype.addLayer.call(this,e);return this.fire("layeradd",{layer:e})},removeLayer:function t(e){if(!this.hasLayer(e)){return this}if(e in this._layers){e=this._layers[e]}e.removeEventParent(this);Yi.prototype.removeLayer.call(this,e);return this.fire("layerremove",{layer:e})},setStyle:function t(e){return this.invoke("setStyle",e)},bringToFront:function t(){return this.invoke("bringToFront")},bringToBack:function t(){return this.invoke("bringToBack")},getBounds:function t(){var e=new Y;for(var i in this._layers){var n=this._layers[i];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}});var Xi=R.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function t(e){T(this,e)},createIcon:function t(e){return this._createIcon("icon",e)},createShadow:function t(e){return this._createIcon("shadow",e)},_createIcon:function t(e,i){var n=this._getIconUrl(e);if(!n){if(e==="icon"){throw new Error("iconUrl not set in Icon options (see the docs).")}return null}var s=this._createImg(n,i&&i.tagName==="IMG"?i:null);this._setIconStyles(s,e);return s},_setIconStyles:function t(e,i){var n=this.options;var s=n[i+"Size"];if(typeof s==="number"){s=[s,s]}var o=U(s),r=U(i==="shadow"&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,true));e.className="leaflet-marker-"+i+" "+(n.className||"");if(r){e.style.marginLeft=-r.x+"px";e.style.marginTop=-r.y+"px"}if(o){e.style.width=o.x+"px";e.style.height=o.y+"px"}},_createImg:function t(e,i){i=i||document.createElement("img");i.src=e;return i},_getIconUrl:function t(e){return Zt&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});var Ji=Xi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function t(e){if(!Ji.imagePath){Ji.imagePath=this._detectIconPath()}return(this.options.imagePath||Ji.imagePath)+Xi.prototype._getIconUrl.call(this,e)},_detectIconPath:function t(){var e=me("div","leaflet-default-icon-path",document.body);var i=_e(e,"background-image")||_e(e,"backgroundImage");document.body.removeChild(e);if(i===null||i.indexOf("url")!==0){i=""}else{i=i.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}return i}});var $i=yi.extend({initialize:function t(e){this._marker=e},addHooks:function t(){var e=this._marker._icon;if(!this._draggable){this._draggable=new Li(e,e,true)}this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable();Pe(e,"leaflet-marker-draggable")},removeHooks:function t(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable();if(this._marker._icon){Le(this._marker._icon,"leaflet-marker-draggable")}},moved:function t(){return this._draggable&&this._draggable._moved},_adjustPan:function t(e){var i=this._marker,n=i._map,s=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=ke(i._icon),a=n.getPixelBounds(),l=n.getPixelOrigin();var h=q(a.min._subtract(l).add(o),a.max._subtract(l).subtract(o));if(!h.contains(r)){var u=U((Math.max(h.max.x,r.x)-h.max.x)/(a.max.x-h.max.x)-(Math.min(h.min.x,r.x)-h.min.x)/(a.min.x-h.min.x),(Math.max(h.max.y,r.y)-h.max.y)/(a.max.y-h.max.y)-(Math.min(h.min.y,r.y)-h.min.y)/(a.min.y-h.min.y)).multiplyBy(s);n.panBy(u,{animate:false});this._draggable._newPos._add(u);this._draggable._startPos._add(u);Ie(i._icon,this._draggable._newPos);this._onDrag(e);this._panRequest=Z(this._adjustPan.bind(this,e))}},_onDragStart:function t(){this._oldLatLng=this._marker.getLatLng();this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function t(e){if(this._marker.options.autoPan){B(this._panRequest);this._panRequest=Z(this._adjustPan.bind(this,e))}},_onDrag:function t(e){var i=this._marker,n=i._shadow,s=ke(i._icon),o=i._map.layerPointToLatLng(s);if(n){Ie(n,s)}i._latlng=o;e.latlng=o;e.oldLatLng=this._oldLatLng;i.fire("move",e).fire("drag",e)},_onDragEnd:function t(e){B(this._panRequest);delete this._oldLatLng;this._marker.fire("moveend").fire("dragend",e)}});var Qi=qi.extend({options:{icon:new Ji,interactive:true,keyboard:true,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:false,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:false,draggable:false,autoPan:false,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function t(e,i){T(this,i);this._latlng=J(e)},onAdd:function t(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation;if(this._zoomAnimated){e.on("zoomanim",this._animateZoom,this)}this._initIcon();this.update()},onRemove:function t(e){if(this.dragging&&this.dragging.enabled()){this.options.draggable=true;this.dragging.removeHooks()}delete this.dragging;if(this._zoomAnimated){e.off("zoomanim",this._animateZoom,this)}this._removeIcon();this._removeShadow()},getEvents:function t(){return{zoom:this.update,viewreset:this.update}},getLatLng:function t(){return this._latlng},setLatLng:function t(e){var i=this._latlng;this._latlng=J(e);this.update();return this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function t(e){this.options.zIndexOffset=e;return this.update()},getIcon:function t(){return this.options.icon},setIcon:function t(e){this.options.icon=e;if(this._map){this._initIcon();this.update()}if(this._popup){this.bindPopup(this._popup,this._popup.options)}return this},getElement:function t(){return this._icon},update:function t(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function t(){var e=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");var n=e.icon.createIcon(this._icon),s=false;if(n!==this._icon){if(this._icon){this._removeIcon()}s=true;if(e.title){n.title=e.title}if(n.tagName==="IMG"){n.alt=e.alt||""}}Pe(n,i);if(e.keyboard){n.tabIndex="0"}this._icon=n;if(e.riseOnHover){this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex})}var o=e.icon.createShadow(this._shadow),r=false;if(o!==this._shadow){this._removeShadow();r=true}if(o){Pe(o,i);o.alt=""}this._shadow=o;if(e.opacity<1){this._updateOpacity()}if(s){this.getPane().appendChild(this._icon)}this._initInteraction();if(o&&r){this.getPane(e.shadowPane).appendChild(this._shadow)}},_removeIcon:function t(){if(this.options.riseOnHover){this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex})}ve(this._icon);this.removeInteractiveTarget(this._icon);this._icon=null},_removeShadow:function t(){if(this._shadow){ve(this._shadow)}this._shadow=null},_setPos:function t(e){if(this._icon){Ie(this._icon,e)}if(this._shadow){Ie(this._shadow,e)}this._zIndex=e.y+this.options.zIndexOffset;this._resetZIndex()},_updateZIndex:function t(e){if(this._icon){this._icon.style.zIndex=this._zIndex+e}},_animateZoom:function t(e){var i=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(i)},_initInteraction:function t(){if(!this.options.interactive){return}Pe(this._icon,"leaflet-interactive");this.addInteractiveTarget(this._icon);if($i){var e=this.options.draggable;if(this.dragging){e=this.dragging.enabled();this.dragging.disable()}this.dragging=new $i(this);if(e){this.dragging.enable()}}},setOpacity:function t(e){this.options.opacity=e;if(this._map){this._updateOpacity()}return this},_updateOpacity:function t(){var e=this.options.opacity;if(this._icon){Me(this._icon,e)}if(this._shadow){Me(this._shadow,e)}},_bringToFront:function t(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function t(){this._updateZIndex(0)},_getPopupAnchor:function t(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function t(){return this.options.icon.options.tooltipAnchor}});function tn(t,e){return new Qi(t,e)}var en=qi.extend({options:{stroke:true,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:false,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:true,bubblingMouseEvents:true},beforeAdd:function t(e){this._renderer=e.getRenderer(this)},onAdd:function t(){this._renderer._initPath(this);this._reset();this._renderer._addPath(this)},onRemove:function t(){this._renderer._removePath(this)},redraw:function t(){if(this._map){this._renderer._updatePath(this)}return this},setStyle:function t(e){T(this,e);if(this._renderer){this._renderer._updateStyle(this);if(this.options.stroke&&e&&e.hasOwnProperty("weight")){this._updateBounds()}}return this},bringToFront:function t(){if(this._renderer){this._renderer._bringToFront(this)}return this},bringToBack:function t(){if(this._renderer){this._renderer._bringToBack(this)}return this},getElement:function t(){return this._path},_reset:function t(){this._project();this._update()},_clickTolerance:function t(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}});var nn=en.extend({options:{fill:true,radius:10},initialize:function t(e,i){T(this,i);this._latlng=J(e);this._radius=this.options.radius},setLatLng:function t(e){var i=this._latlng;this._latlng=J(e);this.redraw();return this.fire("move",{oldLatLng:i,latlng:this._latlng})},getLatLng:function t(){return this._latlng},setRadius:function t(e){this.options.radius=this._radius=e;return this.redraw()},getRadius:function t(){return this._radius},setStyle:function t(e){var i=e&&e.radius||this._radius;en.prototype.setStyle.call(this,e);this.setRadius(i);return this},_project:function t(){this._point=this._map.latLngToLayerPoint(this._latlng);this._updateBounds()},_updateBounds:function t(){var e=this._radius,i=this._radiusY||e,n=this._clickTolerance(),s=[e+n,i+n];this._pxBounds=new V(this._point.subtract(s),this._point.add(s))},_update:function t(){if(this._map){this._updatePath()}},_updatePath:function t(){this._renderer._updateCircle(this)},_empty:function t(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function t(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});var sn=nn.extend({initialize:function t(e,i,n){if(typeof i==="number"){i=d({},n,{radius:i})}T(this,i);this._latlng=J(e);if(isNaN(this.options.radius)){throw new Error("Circle radius cannot be NaN")}this._mRadius=this.options.radius},setRadius:function t(e){this._mRadius=e;return this.redraw()},getRadius:function t(){return this._mRadius},getBounds:function t(){var e=[this._radius,this._radiusY||this._radius];return new Y(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:en.prototype.setStyle,_project:function t(){var e=this._latlng.lng,i=this._latlng.lat,n=this._map,s=n.options.crs;if(s.distance===Q.distance){var o=Math.PI/180,r=this._mRadius/Q.R/o,a=n.project([i+r,e]),l=n.project([i-r,e]),h=a.add(l).divideBy(2),u=n.unproject(h).lat,c=Math.acos((Math.cos(r*o)-Math.sin(i*o)*Math.sin(u*o))/(Math.cos(i*o)*Math.cos(u*o)))/o;if(isNaN(c)||c===0){c=r/Math.cos(Math.PI/180*i)}this._point=h.subtract(n.getPixelOrigin());this._radius=isNaN(c)?0:h.x-n.project([u,e-c]).x;this._radiusY=h.y-a.y}else{var d=s.unproject(s.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng);this._radius=this._point.x-n.latLngToLayerPoint(d).x}this._updateBounds()}});var on=en.extend({options:{smoothFactor:1,noClip:false},initialize:function t(e,i){T(this,i);this._setLatLngs(e)},getLatLngs:function t(){return this._latlngs},setLatLngs:function t(e){this._setLatLngs(e);return this.redraw()},isEmpty:function t(){return!this._latlngs.length},closestLayerPoint:function t(e){var i=Infinity,n=null,s=Oi,o,r;for(var a=0,l=this._parts.length;a<l;a++){var h=this._parts[a];for(var u=1,c=h.length;u<c;u++){o=h[u-1];r=h[u];var d=s(e,o,r,true);if(d<i){i=d;n=s(e,o,r)}}}if(n){n.distance=Math.sqrt(i)}return n},getCenter:function t(){if(!this._map){throw new Error("Must add layer to map before using getCenter()")}var e,i,n,s,o,r,a,l=this._rings[0],h=l.length;if(!h){return null}for(e=0,i=0;e<h-1;e++){i+=l[e].distanceTo(l[e+1])/2}if(i===0){return this._map.layerPointToLatLng(l[0])}for(e=0,s=0;e<h-1;e++){o=l[e];r=l[e+1];n=o.distanceTo(r);s+=n;if(s>i){a=(s-i)/n;return this._map.layerPointToLatLng([r.x-a*(r.x-o.x),r.y-a*(r.y-o.y)])}}},getBounds:function t(){return this._bounds},addLatLng:function t(e,i){i=i||this._defaultShape();e=J(e);i.push(e);this._bounds.extend(e);return this.redraw()},_setLatLngs:function t(e){this._bounds=new Y;this._latlngs=this._convertLatLngs(e)},_defaultShape:function t(){return Zi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function t(e){var i=[],n=Zi(e);for(var s=0,o=e.length;s<o;s++){if(n){i[s]=J(e[s]);this._bounds.extend(i[s])}else{i[s]=this._convertLatLngs(e[s])}}return i},_project:function t(){var e=new V;this._rings=[];this._projectLatlngs(this._latlngs,this._rings,e);if(this._bounds.isValid()&&e.isValid()){this._rawPxBounds=e;this._updateBounds()}},_updateBounds:function t(){var e=this._clickTolerance(),i=new j(e,e);this._pxBounds=new V([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)])},_projectLatlngs:function t(e,i,n){var s=e[0]instanceof X,o=e.length,r,a;if(s){a=[];for(r=0;r<o;r++){a[r]=this._map.latLngToLayerPoint(e[r]);n.extend(a[r])}i.push(a)}else{for(r=0;r<o;r++){this._projectLatlngs(e[r],i,n)}}},_clipPoints:function t(){var e=this._renderer._bounds;this._parts=[];if(!this._pxBounds||!this._pxBounds.intersects(e)){return}if(this.options.noClip){this._parts=this._rings;return}var i=this._parts,n,s,o,r,a,l,h;for(n=0,o=0,r=this._rings.length;n<r;n++){h=this._rings[n];for(s=0,a=h.length;s<a-1;s++){l=ki(h[s],h[s+1],e,s,true);if(!l){continue}i[o]=i[o]||[];i[o].push(l[0]);if(l[1]!==h[s+1]||s===a-2){i[o].push(l[1]);o++}}}},_simplifyPoints:function t(){var e=this._parts,i=this.options.smoothFactor;for(var n=0,s=e.length;n<s;n++){e[n]=Ti(e[n],i)}},_update:function t(){if(!this._map){return}this._clipPoints();this._simplifyPoints();this._updatePath()},_updatePath:function t(){this._renderer._updatePoly(this)},_containsPoint:function t(e,i){var n,s,o,r,a,l,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e)){return false}for(n=0,r=this._parts.length;n<r;n++){l=this._parts[n];for(s=0,a=l.length,o=a-1;s<a;o=s++){if(!i&&s===0){continue}if(xi(e,l[o],l[s])<=h){return true}}}return false}});on._flat=Bi;var rn=on.extend({options:{fill:true},isEmpty:function t(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function t(){if(!this._map){throw new Error("Must add layer to map before using getCenter()")}var e,i,n,s,o,r,a,l,h,u=this._rings[0],c=u.length;if(!c){return null}r=a=l=0;for(e=0,i=c-1;e<c;i=e++){n=u[e];s=u[i];o=n.y*s.x-s.y*n.x;a+=(n.x+s.x)*o;l+=(n.y+s.y)*o;r+=o*3}if(r===0){h=u[0]}else{h=[a/r,l/r]}return this._map.layerPointToLatLng(h)},_convertLatLngs:function t(e){var i=on.prototype._convertLatLngs.call(this,e),n=i.length;if(n>=2&&i[0]instanceof X&&i[0].equals(i[n-1])){i.pop()}return i},_setLatLngs:function t(e){on.prototype._setLatLngs.call(this,e);if(Zi(this._latlngs)){this._latlngs=[this._latlngs]}},_defaultShape:function t(){return Zi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function t(){var e=this._renderer._bounds,i=this.options.weight,n=new j(i,i);e=new V(e.min.subtract(n),e.max.add(n));this._parts=[];if(!this._pxBounds||!this._pxBounds.intersects(e)){return}if(this.options.noClip){this._parts=this._rings;return}for(var s=0,o=this._rings.length,r;s<o;s++){r=Ri(this._rings[s],e,true);if(r.length){this._parts.push(r)}}},_updatePath:function t(){this._renderer._updatePoly(this,true)},_containsPoint:function t(e){var i=false,n,s,o,r,a,l,h,u;if(!this._pxBounds||!this._pxBounds.contains(e)){return false}for(r=0,h=this._parts.length;r<h;r++){n=this._parts[r];for(a=0,u=n.length,l=u-1;a<u;l=a++){s=n[a];o=n[l];if(s.y>e.y!==o.y>e.y&&e.x<(o.x-s.x)*(e.y-s.y)/(o.y-s.y)+s.x){i=!i}}}return i||on.prototype._containsPoint.call(this,e,true)}});var an=Ki.extend({initialize:function t(e,i){T(this,i);this._layers={};if(e){this.addData(e)}},addData:function t(e){var i=S(e)?e:e.features,n,s,o;if(i){for(n=0,s=i.length;n<s;n++){o=i[n];if(o.geometries||o.geometry||o.features||o.coordinates){this.addData(o)}}return this}var r=this.options;if(r.filter&&!r.filter(e)){return this}var a=ln(e,r);if(!a){return this}a.feature=_n(e);a.defaultOptions=a.options;this.resetStyle(a);if(r.onEachFeature){r.onEachFeature(e,a)}return this.addLayer(a)},resetStyle:function t(e){if(e===undefined){return this.eachLayer(this.resetStyle,this)}e.options=d({},e.defaultOptions);this._setLayerStyle(e,this.options.style);return this},setStyle:function t(e){return this.eachLayer((function(t){this._setLayerStyle(t,e)}),this)},_setLayerStyle:function t(e,i){if(e.setStyle){if(typeof i==="function"){i=i(e.feature)}e.setStyle(i)}}});function ln(t,e){var i=t.type==="Feature"?t.geometry:t,n=i?i.coordinates:null,s=[],o=e&&e.pointToLayer,r=e&&e.coordsToLatLng||un,a,l,h,u;if(!n&&!i){return null}switch(i.type){case"Point":a=r(n);return hn(o,t,a,e);case"MultiPoint":for(h=0,u=n.length;h<u;h++){a=r(n[h]);s.push(hn(o,t,a,e))}return new Ki(s);case"LineString":case"MultiLineString":l=cn(n,i.type==="LineString"?0:1,r);return new on(l,e);case"Polygon":case"MultiPolygon":l=cn(n,i.type==="Polygon"?1:2,r);return new rn(l,e);case"GeometryCollection":for(h=0,u=i.geometries.length;h<u;h++){var c=ln({geometry:i.geometries[h],type:"Feature",properties:t.properties},e);if(c){s.push(c)}}return new Ki(s);default:throw new Error("Invalid GeoJSON object.")}}function hn(t,e,i,n){return t?t(e,i):new Qi(i,n&&n.markersInheritOptions&&n)}function un(t){return new X(t[1],t[0],t[2])}function cn(t,e,i){var n=[];for(var s=0,o=t.length,r;s<o;s++){r=e?cn(t[s],e-1,i):(i||un)(t[s]);n.push(r)}return n}function dn(t,e){e=typeof e==="number"?e:6;return t.alt!==undefined?[b(t.lng,e),b(t.lat,e),b(t.alt,e)]:[b(t.lng,e),b(t.lat,e)]}function fn(t,e,i,n){var s=[];for(var o=0,r=t.length;o<r;o++){s.push(e?fn(t[o],e-1,i,n):dn(t[o],n))}if(!e&&i){s.push(s[0])}return s}function pn(t,e){return t.feature?d({},t.feature,{geometry:e}):_n(e)}function _n(t){if(t.type==="Feature"||t.type==="FeatureCollection"){return t}return{type:"Feature",properties:{},geometry:t}}var mn={toGeoJSON:function t(e){return pn(this,{type:"Point",coordinates:dn(this.getLatLng(),e)})}};Qi.include(mn);sn.include(mn);nn.include(mn);on.include({toGeoJSON:function t(e){var i=!Zi(this._latlngs);var n=fn(this._latlngs,i?1:0,false,e);return pn(this,{type:(i?"Multi":"")+"LineString",coordinates:n})}});rn.include({toGeoJSON:function t(e){var i=!Zi(this._latlngs),n=i&&!Zi(this._latlngs[0]);var s=fn(this._latlngs,n?2:i?1:0,true,e);if(!i){s=[s]}return pn(this,{type:(n?"Multi":"")+"Polygon",coordinates:s})}});Yi.include({toMultiPoint:function t(e){var i=[];this.eachLayer((function(t){i.push(t.toGeoJSON(e).geometry.coordinates)}));return pn(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function t(e){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(i==="MultiPoint"){return this.toMultiPoint(e)}var n=i==="GeometryCollection",s=[];this.eachLayer((function(t){if(t.toGeoJSON){var i=t.toGeoJSON(e);if(n){s.push(i.geometry)}else{var o=_n(i);if(o.type==="FeatureCollection"){s.push.apply(s,o.features)}else{s.push(o)}}}}));if(n){return pn(this,{geometries:s,type:"GeometryCollection"})}return{type:"FeatureCollection",features:s}}});var vn=qi.extend({options:{opacity:1,alt:"",interactive:false,crossOrigin:false,errorOverlayUrl:"",zIndex:1,className:""},initialize:function t(e,i,n){this._url=e;this._bounds=K(i);T(this,n)},onAdd:function t(){if(!this._image){this._initImage();if(this.options.opacity<1){this._updateOpacity()}}if(this.options.interactive){Pe(this._image,"leaflet-interactive");this.addInteractiveTarget(this._image)}this.getPane().appendChild(this._image);this._reset()},onRemove:function t(){ve(this._image);if(this.options.interactive){this.removeInteractiveTarget(this._image)}},setOpacity:function t(e){this.options.opacity=e;if(this._image){this._updateOpacity()}return this},setStyle:function t(e){if(e.opacity){this.setOpacity(e.opacity)}return this},bringToFront:function t(){if(this._map){ye(this._image)}return this},bringToBack:function t(){if(this._map){be(this._image)}return this},setUrl:function t(e){this._url=e;if(this._image){this._image.src=e}return this},setBounds:function t(e){this._bounds=K(e);if(this._map){this._reset()}return this},getEvents:function t(){var e={zoom:this._reset,viewreset:this._reset};if(this._zoomAnimated){e.zoomanim=this._animateZoom}return e},setZIndex:function t(e){this.options.zIndex=e;this._updateZIndex();return this},getBounds:function t(){return this._bounds},getElement:function t(){return this._image},_initImage:function t(){var e=this._url.tagName==="IMG";var i=this._image=e?this._url:me("img");Pe(i,"leaflet-image-layer");if(this._zoomAnimated){Pe(i,"leaflet-zoom-animated")}if(this.options.className){Pe(i,this.options.className)}i.onselectstart=y;i.onmousemove=y;i.onload=p(this.fire,this,"load");i.onerror=p(this._overlayOnError,this,"error");if(this.options.crossOrigin||this.options.crossOrigin===""){i.crossOrigin=this.options.crossOrigin===true?"":this.options.crossOrigin}if(this.options.zIndex){this._updateZIndex()}if(e){this._url=i.src;return}i.src=this._url;i.alt=this.options.alt},_animateZoom:function t(e){var i=this._map.getZoomScale(e.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;Ce(this._image,n,i)},_reset:function t(){var e=this._image,i=new V(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=i.getSize();Ie(e,i.min);e.style.width=n.x+"px";e.style.height=n.y+"px"},_updateOpacity:function t(){Me(this._image,this.options.opacity)},_updateZIndex:function t(){if(this._image&&this.options.zIndex!==undefined&&this.options.zIndex!==null){this._image.style.zIndex=this.options.zIndex}},_overlayOnError:function t(){this.fire("error");var e=this.options.errorOverlayUrl;if(e&&this._url!==e){this._url=e;this._image.src=e}}});var gn=vn.extend({options:{autoplay:true,loop:true,keepAspectRatio:true},_initImage:function t(){var e=this._url.tagName==="VIDEO";var i=this._image=e?this._url:me("video");Pe(i,"leaflet-image-layer");if(this._zoomAnimated){Pe(i,"leaflet-zoom-animated")}if(this.options.className){Pe(i,this.options.className)}i.onselectstart=y;i.onmousemove=y;i.onloadeddata=p(this.fire,this,"load");if(e){var n=i.getElementsByTagName("source");var s=[];for(var o=0;o<n.length;o++){s.push(n[o].src)}this._url=n.length>0?s:[i.src];return}if(!S(this._url)){this._url=[this._url]}if(!this.options.keepAspectRatio&&i.style.hasOwnProperty("objectFit")){i.style["objectFit"]="fill"}i.autoplay=!!this.options.autoplay;i.loop=!!this.options.loop;for(var r=0;r<this._url.length;r++){var a=me("source");a.src=this._url[r];i.appendChild(a)}}});var yn=vn.extend({_initImage:function t(){var e=this._image=this._url;Pe(e,"leaflet-image-layer");if(this._zoomAnimated){Pe(e,"leaflet-zoom-animated")}if(this.options.className){Pe(e,this.options.className)}e.onselectstart=y;e.onmousemove=y}});var bn=qi.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function t(e,i){T(this,e);this._source=i},onAdd:function t(e){this._zoomAnimated=e._zoomAnimated;if(!this._container){this._initLayout()}if(e._fadeAnimated){Me(this._container,0)}clearTimeout(this._removeTimeout);this.getPane().appendChild(this._container);this.update();if(e._fadeAnimated){Me(this._container,1)}this.bringToFront()},onRemove:function t(e){if(e._fadeAnimated){Me(this._container,0);this._removeTimeout=setTimeout(p(ve,undefined,this._container),200)}else{ve(this._container)}},getLatLng:function t(){return this._latlng},setLatLng:function t(e){this._latlng=J(e);if(this._map){this._updatePosition();this._adjustPan()}return this},getContent:function t(){return this._content},setContent:function t(e){this._content=e;this.update();return this},getElement:function t(){return this._container},update:function t(){if(!this._map){return}this._container.style.visibility="hidden";this._updateContent();this._updateLayout();this._updatePosition();this._container.style.visibility="";this._adjustPan()},getEvents:function t(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};if(this._zoomAnimated){e.zoomanim=this._animateZoom}return e},isOpen:function t(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function t(){if(this._map){ye(this._container)}return this},bringToBack:function t(){if(this._map){be(this._container)}return this},_prepareOpen:function t(e,i,n){if(!(i instanceof qi)){n=i;i=e}if(i instanceof Ki){for(var s in e._layers){i=e._layers[s];break}}if(!n){if(i.getCenter){n=i.getCenter()}else if(i.getLatLng){n=i.getLatLng()}else{throw new Error("Unable to get source layer LatLng.")}}this._source=i;this.update();return n},_updateContent:function t(){if(!this._content){return}var e=this._contentNode;var i=typeof this._content==="function"?this._content(this._source||this):this._content;if(typeof i==="string"){e.innerHTML=i}else{while(e.hasChildNodes()){e.removeChild(e.firstChild)}e.appendChild(i)}this.fire("contentupdate")},_updatePosition:function t(){if(!this._map){return}var e=this._map.latLngToLayerPoint(this._latlng),i=U(this.options.offset),n=this._getAnchor();if(this._zoomAnimated){Ie(this._container,e.add(n))}else{i=i.add(e).add(n)}var s=this._containerBottom=-i.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=s+"px";this._container.style.left=o+"px"},_getAnchor:function t(){return[0,0]}});var wn=bn.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:true,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:false,closeButton:true,autoClose:true,closeOnEscapeKey:true,className:""},openOn:function t(e){e.openPopup(this);return this},onAdd:function t(e){bn.prototype.onAdd.call(this,e);e.fire("popupopen",{popup:this});if(this._source){this._source.fire("popupopen",{popup:this},true);if(!(this._source instanceof en)){this._source.on("preclick",Xe)}}},onRemove:function t(e){bn.prototype.onRemove.call(this,e);e.fire("popupclose",{popup:this});if(this._source){this._source.fire("popupclose",{popup:this},true);if(!(this._source instanceof en)){this._source.off("preclick",Xe)}}},getEvents:function t(){var e=bn.prototype.getEvents.call(this);if(this.options.closeOnClick!==undefined?this.options.closeOnClick:this._map.options.closePopupOnClick){e.preclick=this._close}if(this.options.keepInView){e.moveend=this._adjustPan}return e},_close:function t(){if(this._map){this._map.closePopup(this)}},_initLayout:function t(){var e="leaflet-popup",i=this._container=me("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated");var n=this._wrapper=me("div",e+"-content-wrapper",i);this._contentNode=me("div",e+"-content",n);$e(n);Je(this._contentNode);Ue(n,"contextmenu",Xe);this._tipContainer=me("div",e+"-tip-container",i);this._tip=me("div",e+"-tip",this._tipContainer);if(this.options.closeButton){var s=this._closeButton=me("a",e+"-close-button",i);s.href="#close";s.innerHTML="&#215;";Ue(s,"click",this._onCloseButtonClick,this)}},_updateLayout:function t(){var e=this._contentNode,i=e.style;i.width="";i.whiteSpace="nowrap";var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth);n=Math.max(n,this.options.minWidth);i.width=n+1+"px";i.whiteSpace="";i.height="";var s=e.offsetHeight,o=this.options.maxHeight,r="leaflet-popup-scrolled";if(o&&s>o){i.height=o+"px";Pe(e,r)}else{Le(e,r)}this._containerWidth=this._container.offsetWidth},_animateZoom:function t(e){var i=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();Ie(this._container,i.add(n))},_adjustPan:function t(){if(!this.options.autoPan){return}if(this._map._panAnim){this._map._panAnim.stop()}var e=this._map,i=parseInt(_e(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+i,s=this._containerWidth,o=new j(this._containerLeft,-n-this._containerBottom);o._add(ke(this._container));var r=e.layerPointToContainerPoint(o),a=U(this.options.autoPanPadding),l=U(this.options.autoPanPaddingTopLeft||a),h=U(this.options.autoPanPaddingBottomRight||a),u=e.getSize(),c=0,d=0;if(r.x+s+h.x>u.x){c=r.x+s-u.x+h.x}if(r.x-c-l.x<0){c=r.x-l.x}if(r.y+n+h.y>u.y){d=r.y+n-u.y+h.y}if(r.y-d-l.y<0){d=r.y-l.y}if(c||d){e.fire("autopanstart").panBy([c,d])}},_onCloseButtonClick:function t(e){this._close();ti(e)},_getAnchor:function t(){return U(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});di.mergeOptions({closePopupOnClick:true});di.include({openPopup:function t(e,i,n){if(!(e instanceof wn)){e=new wn(n).setContent(e)}if(i){e.setLatLng(i)}if(this.hasLayer(e)){return this}if(this._popup&&this._popup.options.autoClose){this.closePopup()}this._popup=e;return this.addLayer(e)},closePopup:function t(e){if(!e||e===this._popup){e=this._popup;this._popup=null}if(e){this.removeLayer(e)}return this}});qi.include({bindPopup:function t(e,i){if(e instanceof wn){T(e,i);this._popup=e;e._source=this}else{if(!this._popup||i){this._popup=new wn(i,this)}this._popup.setContent(e)}if(!this._popupHandlersAdded){this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup});this._popupHandlersAdded=true}return this},unbindPopup:function t(){if(this._popup){this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup});this._popupHandlersAdded=false;this._popup=null}return this},openPopup:function t(e,i){if(this._popup&&this._map){i=this._popup._prepareOpen(this,e,i);this._map.openPopup(this._popup,i)}return this},closePopup:function t(){if(this._popup){this._popup._close()}return this},togglePopup:function t(e){if(this._popup){if(this._popup._map){this.closePopup()}else{this.openPopup(e)}}return this},isPopupOpen:function t(){return this._popup?this._popup.isOpen():false},setPopupContent:function t(e){if(this._popup){this._popup.setContent(e)}return this},getPopup:function t(){return this._popup},_openPopup:function t(e){var i=e.layer||e.target;if(!this._popup){return}if(!this._map){return}ti(e);if(i instanceof en){this.openPopup(e.layer||e.target,e.latlng);return}if(this._map.hasLayer(this._popup)&&this._popup._source===i){this.closePopup()}else{this.openPopup(i,e.latlng)}},_movePopup:function t(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function t(e){if(e.originalEvent.keyCode===13){this._openPopup(e)}}});var Pn=bn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:false,sticky:false,interactive:false,opacity:.9},onAdd:function t(e){bn.prototype.onAdd.call(this,e);this.setOpacity(this.options.opacity);e.fire("tooltipopen",{tooltip:this});if(this._source){this._source.fire("tooltipopen",{tooltip:this},true)}},onRemove:function t(e){bn.prototype.onRemove.call(this,e);e.fire("tooltipclose",{tooltip:this});if(this._source){this._source.fire("tooltipclose",{tooltip:this},true)}},getEvents:function t(){var e=bn.prototype.getEvents.call(this);if(Ht&&!this.options.permanent){e.preclick=this._close}return e},_close:function t(){if(this._map){this._map.closeTooltip(this)}},_initLayout:function t(){var e="leaflet-tooltip",i=e+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=me("div",i)},_updateLayout:function t(){},_adjustPan:function t(){},_setPosition:function t(e){var i=this._map,n=this._container,s=i.latLngToContainerPoint(i.getCenter()),o=i.layerPointToContainerPoint(e),r=this.options.direction,a=n.offsetWidth,l=n.offsetHeight,h=U(this.options.offset),u=this._getAnchor();if(r==="top"){e=e.add(U(-a/2+h.x,-l+h.y+u.y,true))}else if(r==="bottom"){e=e.subtract(U(a/2-h.x,-h.y,true))}else if(r==="center"){e=e.subtract(U(a/2+h.x,l/2-u.y+h.y,true))}else if(r==="right"||r==="auto"&&o.x<s.x){r="right";e=e.add(U(h.x+u.x,u.y-l/2+h.y,true))}else{r="left";e=e.subtract(U(a+u.x-h.x,l/2-u.y-h.y,true))}Le(n,"leaflet-tooltip-right");Le(n,"leaflet-tooltip-left");Le(n,"leaflet-tooltip-top");Le(n,"leaflet-tooltip-bottom");Pe(n,"leaflet-tooltip-"+r);Ie(n,e)},_updatePosition:function t(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function t(e){this.options.opacity=e;if(this._container){Me(this._container,e)}},_animateZoom:function t(e){var i=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(i)},_getAnchor:function t(){return U(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});di.include({openTooltip:function t(e,i,n){if(!(e instanceof Pn)){e=new Pn(n).setContent(e)}if(i){e.setLatLng(i)}if(this.hasLayer(e)){return this}return this.addLayer(e)},closeTooltip:function t(e){if(e){this.removeLayer(e)}return this}});qi.include({bindTooltip:function t(e,i){if(e instanceof Pn){T(e,i);this._tooltip=e;e._source=this}else{if(!this._tooltip||i){this._tooltip=new Pn(i,this)}this._tooltip.setContent(e)}this._initTooltipInteractions();if(this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)){this.openTooltip()}return this},unbindTooltip:function t(){if(this._tooltip){this._initTooltipInteractions(true);this.closeTooltip();this._tooltip=null}return this},_initTooltipInteractions:function t(e){if(!e&&this._tooltipHandlersAdded){return}var i=e?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};if(!this._tooltip.options.permanent){n.mouseover=this._openTooltip;n.mouseout=this.closeTooltip;if(this._tooltip.options.sticky){n.mousemove=this._moveTooltip}if(Ht){n.click=this._openTooltip}}else{n.add=this._openTooltip}this[i](n);this._tooltipHandlersAdded=!e},openTooltip:function t(e,i){if(this._tooltip&&this._map){i=this._tooltip._prepareOpen(this,e,i);this._map.openTooltip(this._tooltip,i);if(this._tooltip.options.interactive&&this._tooltip._container){Pe(this._tooltip._container,"leaflet-clickable");this.addInteractiveTarget(this._tooltip._container)}}return this},closeTooltip:function t(){if(this._tooltip){this._tooltip._close();if(this._tooltip.options.interactive&&this._tooltip._container){Le(this._tooltip._container,"leaflet-clickable");this.removeInteractiveTarget(this._tooltip._container)}}return this},toggleTooltip:function t(e){if(this._tooltip){if(this._tooltip._map){this.closeTooltip()}else{this.openTooltip(e)}}return this},isTooltipOpen:function t(){return this._tooltip.isOpen()},setTooltipContent:function t(e){if(this._tooltip){this._tooltip.setContent(e)}return this},getTooltip:function t(){return this._tooltip},_openTooltip:function t(e){var i=e.layer||e.target;if(!this._tooltip||!this._map){return}this.openTooltip(i,this._tooltip.options.sticky?e.latlng:undefined)},_moveTooltip:function t(e){var i=e.latlng,n,s;if(this._tooltip.options.sticky&&e.originalEvent){n=this._map.mouseEventToContainerPoint(e.originalEvent);s=this._map.containerPointToLayerPoint(n);i=this._map.layerPointToLatLng(s)}this._tooltip.setLatLng(i)}});var Ln=Xi.extend({options:{iconSize:[12,12],html:false,bgPos:null,className:"leaflet-div-icon"},createIcon:function t(e){var i=e&&e.tagName==="DIV"?e:document.createElement("div"),n=this.options;if(n.html instanceof Element){ge(i);i.appendChild(n.html)}else{i.innerHTML=n.html!==false?n.html:""}if(n.bgPos){var s=U(n.bgPos);i.style.backgroundPosition=-s.x+"px "+-s.y+"px"}this._setIconStyles(i,"icon");return i},createShadow:function t(){return null}});Xi.Default=Ji;var Tn=qi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:St,updateWhenZooming:true,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:undefined,maxNativeZoom:undefined,minNativeZoom:undefined,noWrap:false,pane:"tilePane",className:"",keepBuffer:2},initialize:function t(e){T(this,e)},onAdd:function t(){this._initContainer();this._levels={};this._tiles={};this._resetView();this._update()},beforeAdd:function t(e){e._addZoomLimit(this)},onRemove:function t(e){this._removeAllTiles();ve(this._container);e._removeZoomLimit(this);this._container=null;this._tileZoom=undefined},bringToFront:function t(){if(this._map){ye(this._container);this._setAutoZIndex(Math.max)}return this},bringToBack:function t(){if(this._map){be(this._container);this._setAutoZIndex(Math.min)}return this},getContainer:function t(){return this._container},setOpacity:function t(e){this.options.opacity=e;this._updateOpacity();return this},setZIndex:function t(e){this.options.zIndex=e;this._updateZIndex();return this},isLoading:function t(){return this._loading},redraw:function t(){if(this._map){this._removeAllTiles();this._update()}return this},getEvents:function t(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};if(!this.options.updateWhenIdle){if(!this._onMove){this._onMove=v(this._onMoveEnd,this.options.updateInterval,this)}e.move=this._onMove}if(this._zoomAnimated){e.zoomanim=this._animateZoom}return e},createTile:function t(){return document.createElement("div")},getTileSize:function t(){var e=this.options.tileSize;return e instanceof j?e:new j(e,e)},_updateZIndex:function t(){if(this._container&&this.options.zIndex!==undefined&&this.options.zIndex!==null){this._container.style.zIndex=this.options.zIndex}},_setAutoZIndex:function t(e){var i=this.getPane().children,n=-e(-Infinity,Infinity);for(var s=0,o=i.length,r;s<o;s++){r=i[s].style.zIndex;if(i[s]!==this._container&&r){n=e(n,+r)}}if(isFinite(n)){this.options.zIndex=n+e(-1,1);this._updateZIndex()}},_updateOpacity:function t(){if(!this._map){return}if(ut){return}Me(this._container,this.options.opacity);var e=+new Date,i=false,n=false;for(var s in this._tiles){var o=this._tiles[s];if(!o.current||!o.loaded){continue}var r=Math.min(1,(e-o.loaded)/200);Me(o.el,r);if(r<1){i=true}else{if(o.active){n=true}else{this._onOpaqueTile(o)}o.active=true}}if(n&&!this._noPrune){this._pruneTiles()}if(i){B(this._fadeFrame);this._fadeFrame=Z(this._updateOpacity,this)}},_onOpaqueTile:y,_initContainer:function t(){if(this._container){return}this._container=me("div","leaflet-layer "+(this.options.className||""));this._updateZIndex();if(this.options.opacity<1){this._updateOpacity()}this.getPane().appendChild(this._container)},_updateLevels:function t(){var e=this._tileZoom,i=this.options.maxZoom;if(e===undefined){return undefined}for(var n in this._levels){if(this._levels[n].el.children.length||n===e){this._levels[n].el.style.zIndex=i-Math.abs(e-n);this._onUpdateLevel(n)}else{ve(this._levels[n].el);this._removeTilesAtZoom(n);this._onRemoveLevel(n);delete this._levels[n]}}var s=this._levels[e],o=this._map;if(!s){s=this._levels[e]={};s.el=me("div","leaflet-tile-container leaflet-zoom-animated",this._container);s.el.style.zIndex=i;s.origin=o.project(o.unproject(o.getPixelOrigin()),e).round();s.zoom=e;this._setZoomTransform(s,o.getCenter(),o.getZoom());y(s.el.offsetWidth);this._onCreateLevel(s)}this._level=s;return s},_onUpdateLevel:y,_onRemoveLevel:y,_onCreateLevel:y,_pruneTiles:function t(){if(!this._map){return}var e,i;var n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom){this._removeAllTiles();return}for(e in this._tiles){i=this._tiles[e];i.retain=i.current}for(e in this._tiles){i=this._tiles[e];if(i.current&&!i.active){var s=i.coords;if(!this._retainParent(s.x,s.y,s.z,s.z-5)){this._retainChildren(s.x,s.y,s.z,s.z+2)}}}for(e in this._tiles){if(!this._tiles[e].retain){this._removeTile(e)}}},_removeTilesAtZoom:function t(e){for(var i in this._tiles){if(this._tiles[i].coords.z!==e){continue}this._removeTile(i)}},_removeAllTiles:function t(){for(var e in this._tiles){this._removeTile(e)}},_invalidateAll:function t(){for(var e in this._levels){ve(this._levels[e].el);this._onRemoveLevel(e);delete this._levels[e]}this._removeAllTiles();this._tileZoom=undefined},_retainParent:function t(e,i,n,s){var o=Math.floor(e/2),r=Math.floor(i/2),a=n-1,l=new j(+o,+r);l.z=+a;var h=this._tileCoordsToKey(l),u=this._tiles[h];if(u&&u.active){u.retain=true;return true}else if(u&&u.loaded){u.retain=true}if(a>s){return this._retainParent(o,r,a,s)}return false},_retainChildren:function t(e,i,n,s){for(var o=2*e;o<2*e+2;o++){for(var r=2*i;r<2*i+2;r++){var a=new j(o,r);a.z=n+1;var l=this._tileCoordsToKey(a),h=this._tiles[l];if(h&&h.active){h.retain=true;continue}else if(h&&h.loaded){h.retain=true}if(n+1<s){this._retainChildren(o,r,n+1,s)}}}},_resetView:function t(e){var i=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function t(e){this._setView(e.center,e.zoom,true,e.noUpdate)},_clampZoom:function t(e){var i=this.options;if(undefined!==i.minNativeZoom&&e<i.minNativeZoom){return i.minNativeZoom}if(undefined!==i.maxNativeZoom&&i.maxNativeZoom<e){return i.maxNativeZoom}return e},_setView:function t(e,i,n,s){var o=this._clampZoom(Math.round(i));if(this.options.maxZoom!==undefined&&o>this.options.maxZoom||this.options.minZoom!==undefined&&o<this.options.minZoom){o=undefined}var r=this.options.updateWhenZooming&&o!==this._tileZoom;if(!s||r){this._tileZoom=o;if(this._abortLoading){this._abortLoading()}this._updateLevels();this._resetGrid();if(o!==undefined){this._update(e)}if(!n){this._pruneTiles()}this._noPrune=!!n}this._setZoomTransforms(e,i)},_setZoomTransforms:function t(e,i){for(var n in this._levels){this._setZoomTransform(this._levels[n],e,i)}},_setZoomTransform:function t(e,i,n){var s=this._map.getZoomScale(n,e.zoom),o=e.origin.multiplyBy(s).subtract(this._map._getNewPixelOrigin(i,n)).round();if(zt){Ce(e.el,o,s)}else{Ie(e.el,o)}},_resetGrid:function t(){var e=this._map,i=e.options.crs,n=this._tileSize=this.getTileSize(),s=this._tileZoom;var o=this._map.getPixelWorldBounds(this._tileZoom);if(o){this._globalTileRange=this._pxBoundsToTileRange(o)}this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,i.wrapLng[0]],s).x/n.x),Math.ceil(e.project([0,i.wrapLng[1]],s).x/n.y)];this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([i.wrapLat[0],0],s).y/n.x),Math.ceil(e.project([i.wrapLat[1],0],s).y/n.y)]},_onMoveEnd:function t(){if(!this._map||this._map._animatingZoom){return}this._update()},_getTiledPixelBounds:function t(e){var i=this._map,n=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),s=i.getZoomScale(n,this._tileZoom),o=i.project(e,this._tileZoom).floor(),r=i.getSize().divideBy(s*2);return new V(o.subtract(r),o.add(r))},_update:function t(e){var i=this._map;if(!i){return}var n=this._clampZoom(i.getZoom());if(e===undefined){e=i.getCenter()}if(this._tileZoom===undefined){return}var s=this._getTiledPixelBounds(e),o=this._pxBoundsToTileRange(s),r=o.getCenter(),a=[],l=this.options.keepBuffer,h=new V(o.getBottomLeft().subtract([l,-l]),o.getTopRight().add([l,-l]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y))){throw new Error("Attempted to load an infinite number of tiles")}for(var u in this._tiles){var c=this._tiles[u].coords;if(c.z!==this._tileZoom||!h.contains(new j(c.x,c.y))){this._tiles[u].current=false}}if(Math.abs(n-this._tileZoom)>1){this._setView(e,n);return}for(var d=o.min.y;d<=o.max.y;d++){for(var f=o.min.x;f<=o.max.x;f++){var p=new j(f,d);p.z=this._tileZoom;if(!this._isValidTile(p)){continue}var _=this._tiles[this._tileCoordsToKey(p)];if(_){_.current=true}else{a.push(p)}}}a.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)}));if(a.length!==0){if(!this._loading){this._loading=true;this.fire("loading")}var m=document.createDocumentFragment();for(f=0;f<a.length;f++){this._addTile(a[f],m)}this._level.el.appendChild(m)}},_isValidTile:function t(e){var i=this._map.options.crs;if(!i.infinite){var n=this._globalTileRange;if(!i.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!i.wrapLat&&(e.y<n.min.y||e.y>n.max.y)){return false}}if(!this.options.bounds){return true}var s=this._tileCoordsToBounds(e);return K(this.options.bounds).overlaps(s)},_keyToBounds:function t(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function t(e){var i=this._map,n=this.getTileSize(),s=e.scaleBy(n),o=s.add(n),r=i.unproject(s,e.z),a=i.unproject(o,e.z);return[r,a]},_tileCoordsToBounds:function t(e){var i=this._tileCoordsToNwSe(e),n=new Y(i[0],i[1]);if(!this.options.noWrap){n=this._map.wrapLatLngBounds(n)}return n},_tileCoordsToKey:function t(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function t(e){var i=e.split(":"),n=new j(+i[0],+i[1]);n.z=+i[2];return n},_removeTile:function t(e){var i=this._tiles[e];if(!i){return}ve(i.el);delete this._tiles[e];this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(e)})},_initTile:function t(e){Pe(e,"leaflet-tile");var i=this.getTileSize();e.style.width=i.x+"px";e.style.height=i.y+"px";e.onselectstart=y;e.onmousemove=y;if(ut&&this.options.opacity<1){Me(e,this.options.opacity)}if(ft&&!pt){e.style.WebkitBackfaceVisibility="hidden"}},_addTile:function t(e,i){var n=this._getTilePos(e),s=this._tileCoordsToKey(e);var o=this.createTile(this._wrapCoords(e),p(this._tileReady,this,e));this._initTile(o);if(this.createTile.length<2){Z(p(this._tileReady,this,e,null,o))}Ie(o,n);this._tiles[s]={el:o,coords:e,current:true};i.appendChild(o);this.fire("tileloadstart",{tile:o,coords:e})},_tileReady:function t(e,i,n){if(i){this.fire("tileerror",{error:i,tile:n,coords:e})}var s=this._tileCoordsToKey(e);n=this._tiles[s];if(!n){return}n.loaded=+new Date;if(this._map._fadeAnimated){Me(n.el,0);B(this._fadeFrame);this._fadeFrame=Z(this._updateOpacity,this)}else{n.active=true;this._pruneTiles()}if(!i){Pe(n.el,"leaflet-tile-loaded");this.fire("tileload",{tile:n.el,coords:e})}if(this._noTilesToLoad()){this._loading=false;this.fire("load");if(ut||!this._map._fadeAnimated){Z(this._pruneTiles,this)}else{setTimeout(p(this._pruneTiles,this),250)}}},_getTilePos:function t(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function t(e){var i=new j(this._wrapX?g(e.x,this._wrapX):e.x,this._wrapY?g(e.y,this._wrapY):e.y);i.z=e.z;return i},_pxBoundsToTileRange:function t(e){var i=this.getTileSize();return new V(e.min.unscaleBy(i).floor(),e.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function t(){for(var e in this._tiles){if(!this._tiles[e].loaded){return false}}return true}});var xn=Tn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:false,zoomReverse:false,detectRetina:false,crossOrigin:false},initialize:function t(e,i){this._url=e;i=T(this,i);if(i.detectRetina&&Zt&&i.maxZoom>0){i.tileSize=Math.floor(i.tileSize/2);if(!i.zoomReverse){i.zoomOffset++;i.maxZoom--}else{i.zoomOffset--;i.minZoom++}i.minZoom=Math.max(0,i.minZoom)}if(typeof i.subdomains==="string"){i.subdomains=i.subdomains.split("")}if(!ft){this.on("tileunload",this._onTileRemove)}},setUrl:function t(e,i){if(this._url===e&&i===undefined){i=true}this._url=e;if(!i){this.redraw()}return this},createTile:function t(e,i){var n=document.createElement("img");Ue(n,"load",p(this._tileOnLoad,this,i,n));Ue(n,"error",p(this._tileOnError,this,i,n));if(this.options.crossOrigin||this.options.crossOrigin===""){n.crossOrigin=this.options.crossOrigin===true?"":this.options.crossOrigin}n.alt="";n.setAttribute("role","presentation");n.src=this.getTileUrl(e);return n},getTileUrl:function t(e){var i={r:Zt?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-e.y;if(this.options.tms){i["y"]=n}i["-y"]=n}return z(this._url,d(i,this.options))},_tileOnLoad:function t(e,i){if(ut){setTimeout(p(e,this,null,i),0)}else{e(null,i)}},_tileOnError:function t(e,i,n){var s=this.options.errorTileUrl;if(s&&i.getAttribute("src")!==s){i.src=s}e(n,i)},_onTileRemove:function t(e){e.tile.onload=null},_getZoomForUrl:function t(){var e=this._tileZoom,i=this.options.maxZoom,n=this.options.zoomReverse,s=this.options.zoomOffset;if(n){e=i-e}return e+s},_getSubdomain:function t(e){var i=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function t(){var e,i;for(e in this._tiles){if(this._tiles[e].coords.z!==this._tileZoom){i=this._tiles[e].el;i.onload=y;i.onerror=y;if(!i.complete){i.src=I;ve(i);delete this._tiles[e]}}}},_removeTile:function t(e){var i=this._tiles[e];if(!i){return}if(!mt){i.el.setAttribute("src",I)}return Tn.prototype._removeTile.call(this,e)},_tileReady:function t(e,i,n){if(!this._map||n&&n.getAttribute("src")===I){return}return Tn.prototype._tileReady.call(this,e,i,n)}});var Mn=xn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:false,version:"1.1.1"},options:{crs:null,uppercase:false},initialize:function t(e,i){this._url=e;var n=d({},this.defaultWmsParams);for(var s in i){if(!(s in this.options)){n[s]=i[s]}}i=T(this,i);var o=i.detectRetina&&Zt?2:1;var r=this.getTileSize();n.width=r.x*o;n.height=r.y*o;this.wmsParams=n},onAdd:function t(e){this._crs=this.options.crs||e.options.crs;this._wmsVersion=parseFloat(this.wmsParams.version);var i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=this._crs.code;xn.prototype.onAdd.call(this,e)},getTileUrl:function t(e){var i=this._tileCoordsToNwSe(e),n=this._crs,s=q(n.project(i[0]),n.project(i[1])),o=s.min,r=s.max,a=(this._wmsVersion>=1.3&&this._crs===Ui?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),l=xn.prototype.getTileUrl.call(this,e);return l+x(this.wmsParams,l,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function t(e,i){d(this.wmsParams,e);if(!i){this.redraw()}return this}});xn.WMS=Mn;var zn=qi.extend({options:{padding:.1,tolerance:0},initialize:function t(e){T(this,e);m(this);this._layers=this._layers||{}},onAdd:function t(){if(!this._container){this._initContainer();if(this._zoomAnimated){Pe(this._container,"leaflet-zoom-animated")}}this.getPane().appendChild(this._container);this._update();this.on("update",this._updatePaths,this)},onRemove:function t(){this.off("update",this._updatePaths,this);this._destroyContainer()},getEvents:function t(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};if(this._zoomAnimated){e.zoomanim=this._onAnimZoom}return e},_onAnimZoom:function t(e){this._updateTransform(e.center,e.zoom)},_onZoom:function t(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function t(e,i){var n=this._map.getZoomScale(i,this._zoom),s=ke(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,i),a=this._map.project(e,i),l=a.subtract(r),h=o.multiplyBy(-n).add(s).add(o).subtract(l);if(zt){Ce(this._container,h,n)}else{Ie(this._container,h)}},_reset:function t(){this._update();this._updateTransform(this._center,this._zoom);for(var e in this._layers){this._layers[e]._reset()}},_onZoomEnd:function t(){for(var e in this._layers){this._layers[e]._project()}},_updatePaths:function t(){for(var e in this._layers){this._layers[e]._update()}},_update:function t(){var e=this.options.padding,i=this._map.getSize(),n=this._map.containerPointToLayerPoint(i.multiplyBy(-e)).round();this._bounds=new V(n,n.add(i.multiplyBy(1+e*2)).round());this._center=this._map.getCenter();this._zoom=this._map.getZoom()}});var Sn=zn.extend({getEvents:function t(){var e=zn.prototype.getEvents.call(this);e.viewprereset=this._onViewPreReset;return e},_onViewPreReset:function t(){this._postponeUpdatePaths=true},onAdd:function t(){zn.prototype.onAdd.call(this);this._draw()},_initContainer:function t(){var e=this._container=document.createElement("canvas");Ue(e,"mousemove",this._onMouseMove,this);Ue(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this);Ue(e,"mouseout",this._handleMouseOut,this);this._ctx=e.getContext("2d")},_destroyContainer:function t(){B(this._redrawRequest);delete this._ctx;ve(this._container);qe(this._container);delete this._container},_updatePaths:function t(){if(this._postponeUpdatePaths){return}var e;this._redrawBounds=null;for(var i in this._layers){e=this._layers[i];e._update()}this._redraw()},_update:function t(){if(this._map._animatingZoom&&this._bounds){return}zn.prototype._update.call(this);var e=this._bounds,i=this._container,n=e.getSize(),s=Zt?2:1;Ie(i,e.min);i.width=s*n.x;i.height=s*n.y;i.style.width=n.x+"px";i.style.height=n.y+"px";if(Zt){this._ctx.scale(2,2)}this._ctx.translate(-e.min.x,-e.min.y);this.fire("update")},_reset:function t(){zn.prototype._reset.call(this);if(this._postponeUpdatePaths){this._postponeUpdatePaths=false;this._updatePaths()}},_initPath:function t(e){this._updateDashArray(e);this._layers[m(e)]=e;var i=e._order={layer:e,prev:this._drawLast,next:null};if(this._drawLast){this._drawLast.next=i}this._drawLast=i;this._drawFirst=this._drawFirst||this._drawLast},_addPath:function t(e){this._requestRedraw(e)},_removePath:function t(e){var i=e._order;var n=i.next;var s=i.prev;if(n){n.prev=s}else{this._drawLast=s}if(s){s.next=n}else{this._drawFirst=n}delete e._order;delete this._layers[m(e)];this._requestRedraw(e)},_updatePath:function t(e){this._extendRedrawBounds(e);e._project();e._update();this._requestRedraw(e)},_updateStyle:function t(e){this._updateDashArray(e);this._requestRedraw(e)},_updateDashArray:function t(e){if(typeof e.options.dashArray==="string"){var i=e.options.dashArray.split(/[, ]+/),n=[],s,o;for(o=0;o<i.length;o++){s=Number(i[o]);if(isNaN(s)){return}n.push(s)}e.options._dashArray=n}else{e.options._dashArray=e.options.dashArray}},_requestRedraw:function t(e){if(!this._map){return}this._extendRedrawBounds(e);this._redrawRequest=this._redrawRequest||Z(this._redraw,this)},_extendRedrawBounds:function t(e){if(e._pxBounds){var i=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new V;this._redrawBounds.extend(e._pxBounds.min.subtract([i,i]));this._redrawBounds.extend(e._pxBounds.max.add([i,i]))}},_redraw:function t(){this._redrawRequest=null;if(this._redrawBounds){this._redrawBounds.min._floor();this._redrawBounds.max._ceil()}this._clear();this._draw();this._redrawBounds=null},_clear:function t(){var e=this._redrawBounds;if(e){var i=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,i.x,i.y)}else{this._ctx.clearRect(0,0,this._container.width,this._container.height)}},_draw:function t(){var e,i=this._redrawBounds;this._ctx.save();if(i){var n=i.getSize();this._ctx.beginPath();this._ctx.rect(i.min.x,i.min.y,n.x,n.y);this._ctx.clip()}this._drawing=true;for(var s=this._drawFirst;s;s=s.next){e=s.layer;if(!i||e._pxBounds&&e._pxBounds.intersects(i)){e._updatePath()}}this._drawing=false;this._ctx.restore()},_updatePoly:function t(e,i){if(!this._drawing){return}var n,s,o,r,a=e._parts,l=a.length,h=this._ctx;if(!l){return}h.beginPath();for(n=0;n<l;n++){for(s=0,o=a[n].length;s<o;s++){r=a[n][s];h[s?"lineTo":"moveTo"](r.x,r.y)}if(i){h.closePath()}}this._fillStroke(h,e)},_updateCircle:function t(e){if(!this._drawing||e._empty()){return}var i=e._point,n=this._ctx,s=Math.max(Math.round(e._radius),1),o=(Math.max(Math.round(e._radiusY),1)||s)/s;if(o!==1){n.save();n.scale(1,o)}n.beginPath();n.arc(i.x,i.y/o,s,0,Math.PI*2,false);if(o!==1){n.restore()}this._fillStroke(n,e)},_fillStroke:function t(e,i){var n=i.options;if(n.fill){e.globalAlpha=n.fillOpacity;e.fillStyle=n.fillColor||n.color;e.fill(n.fillRule||"evenodd")}if(n.stroke&&n.weight!==0){if(e.setLineDash){e.setLineDash(i.options&&i.options._dashArray||[])}e.globalAlpha=n.opacity;e.lineWidth=n.weight;e.strokeStyle=n.color;e.lineCap=n.lineCap;e.lineJoin=n.lineJoin;e.stroke()}},_onClick:function t(e){var i=this._map.mouseEventToLayerPoint(e),n,s;for(var o=this._drawFirst;o;o=o.next){n=o.layer;if(n.options.interactive&&n._containsPoint(i)&&!this._map._draggableMoved(n)){s=n}}if(s){oi(e);this._fireEvent([s],e)}},_onMouseMove:function t(e){if(!this._map||this._map.dragging.moving()||this._map._animatingZoom){return}var i=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,i)},_handleMouseOut:function t(e){var i=this._hoveredLayer;if(i){Le(this._container,"leaflet-interactive");this._fireEvent([i],e,"mouseout");this._hoveredLayer=null;this._mouseHoverThrottled=false}},_handleMouseHover:function t(e,i){if(this._mouseHoverThrottled){return}var n,s;for(var o=this._drawFirst;o;o=o.next){n=o.layer;if(n.options.interactive&&n._containsPoint(i)){s=n}}if(s!==this._hoveredLayer){this._handleMouseOut(e);if(s){Pe(this._container,"leaflet-interactive");this._fireEvent([s],e,"mouseover");this._hoveredLayer=s}}if(this._hoveredLayer){this._fireEvent([this._hoveredLayer],e)}this._mouseHoverThrottled=true;setTimeout(L.bind((function(){this._mouseHoverThrottled=false}),this),32)},_fireEvent:function t(e,i,n){this._map._fireDOMEvent(i,n||i.type,e)},_bringToFront:function t(e){var i=e._order;if(!i){return}var n=i.next;var s=i.prev;if(n){n.prev=s}else{return}if(s){s.next=n}else if(n){this._drawFirst=n}i.prev=this._drawLast;this._drawLast.next=i;i.next=null;this._drawLast=i;this._requestRedraw(e)},_bringToBack:function t(e){var i=e._order;if(!i){return}var n=i.next;var s=i.prev;if(s){s.next=n}else{return}if(n){n.prev=s}else if(s){this._drawLast=s}i.prev=null;i.next=this._drawFirst;this._drawFirst.prev=i;this._drawFirst=i;this._requestRedraw(e)}});function Cn(t){return Ft?new Sn(t):null}var In=function(){try{document.namespaces.add("lvml","urn:schemas-microsoft-com:vml");return function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}();var kn={_initContainer:function t(){this._container=me("div","leaflet-vml-container")},_update:function t(){if(this._map._animatingZoom){return}zn.prototype._update.call(this);this.fire("update")},_initPath:function t(e){var i=e._container=In("shape");Pe(i,"leaflet-vml-shape "+(this.options.className||""));i.coordsize="1 1";e._path=In("path");i.appendChild(e._path);this._updateStyle(e);this._layers[m(e)]=e},_addPath:function t(e){var i=e._container;this._container.appendChild(i);if(e.options.interactive){e.addInteractiveTarget(i)}},_removePath:function t(e){var i=e._container;ve(i);e.removeInteractiveTarget(i);delete this._layers[m(e)]},_updateStyle:function t(e){var i=e._stroke,n=e._fill,s=e.options,o=e._container;o.stroked=!!s.stroke;o.filled=!!s.fill;if(s.stroke){if(!i){i=e._stroke=In("stroke")}o.appendChild(i);i.weight=s.weight+"px";i.color=s.color;i.opacity=s.opacity;if(s.dashArray){i.dashStyle=S(s.dashArray)?s.dashArray.join(" "):s.dashArray.replace(/( *, *)/g," ")}else{i.dashStyle=""}i.endcap=s.lineCap.replace("butt","flat");i.joinstyle=s.lineJoin}else if(i){o.removeChild(i);e._stroke=null}if(s.fill){if(!n){n=e._fill=In("fill")}o.appendChild(n);n.color=s.fillColor||s.color;n.opacity=s.fillOpacity}else if(n){o.removeChild(n);e._fill=null}},_updateCircle:function t(e){var i=e._point.round(),n=Math.round(e._radius),s=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+i.x+","+i.y+" "+n+","+s+" 0,"+65535*360)},_setPath:function t(e,i){e._path.v=i},_bringToFront:function t(e){ye(e._container)},_bringToBack:function t(e){be(e._container)}};var En=Nt?In:rt;var Hn=zn.extend({getEvents:function t(){var e=zn.prototype.getEvents.call(this);e.zoomstart=this._onZoomStart;return e},_initContainer:function t(){this._container=En("svg");this._container.setAttribute("pointer-events","none");this._rootGroup=En("g");this._container.appendChild(this._rootGroup)},_destroyContainer:function t(){ve(this._container);qe(this._container);delete this._container;delete this._rootGroup;delete this._svgSize},_onZoomStart:function t(){this._update()},_update:function t(){if(this._map._animatingZoom&&this._bounds){return}zn.prototype._update.call(this);var e=this._bounds,i=e.getSize(),n=this._container;if(!this._svgSize||!this._svgSize.equals(i)){this._svgSize=i;n.setAttribute("width",i.x);n.setAttribute("height",i.y)}Ie(n,e.min);n.setAttribute("viewBox",[e.min.x,e.min.y,i.x,i.y].join(" "));this.fire("update")},_initPath:function t(e){var i=e._path=En("path");if(e.options.className){Pe(i,e.options.className)}if(e.options.interactive){Pe(i,"leaflet-interactive")}this._updateStyle(e);this._layers[m(e)]=e},_addPath:function t(e){if(!this._rootGroup){this._initContainer()}this._rootGroup.appendChild(e._path);e.addInteractiveTarget(e._path)},_removePath:function t(e){ve(e._path);e.removeInteractiveTarget(e._path);delete this._layers[m(e)]},_updatePath:function t(e){e._project();e._update()},_updateStyle:function t(e){var i=e._path,n=e.options;if(!i){return}if(n.stroke){i.setAttribute("stroke",n.color);i.setAttribute("stroke-opacity",n.opacity);i.setAttribute("stroke-width",n.weight);i.setAttribute("stroke-linecap",n.lineCap);i.setAttribute("stroke-linejoin",n.lineJoin);if(n.dashArray){i.setAttribute("stroke-dasharray",n.dashArray)}else{i.removeAttribute("stroke-dasharray")}if(n.dashOffset){i.setAttribute("stroke-dashoffset",n.dashOffset)}else{i.removeAttribute("stroke-dashoffset")}}else{i.setAttribute("stroke","none")}if(n.fill){i.setAttribute("fill",n.fillColor||n.color);i.setAttribute("fill-opacity",n.fillOpacity);i.setAttribute("fill-rule",n.fillRule||"evenodd")}else{i.setAttribute("fill","none")}},_updatePoly:function t(e,i){this._setPath(e,at(e._parts,i))},_updateCircle:function t(e){var i=e._point,n=Math.max(Math.round(e._radius),1),s=Math.max(Math.round(e._radiusY),1)||n,o="a"+n+","+s+" 0 1,0 ";var r=e._empty()?"M0 0":"M"+(i.x-n)+","+i.y+o+n*2+",0 "+o+-n*2+",0 ";this._setPath(e,r)},_setPath:function t(e,i){e._path.setAttribute("d",i)},_bringToFront:function t(e){ye(e._path)},_bringToBack:function t(e){be(e._path)}});if(Nt){Hn.include(kn)}function An(t){return Rt||Nt?new Hn(t):null}di.include({getRenderer:function t(e){var i=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;if(!i){i=this._renderer=this._createRenderer()}if(!this.hasLayer(i)){this.addLayer(i)}return i},_getPaneRenderer:function t(e){if(e==="overlayPane"||e===undefined){return false}var i=this._paneRenderers[e];if(i===undefined){i=this._createRenderer({pane:e});this._paneRenderers[e]=i}return i},_createRenderer:function t(e){return this.options.preferCanvas&&Cn(e)||An(e)}});var On=rn.extend({initialize:function t(e,i){rn.prototype.initialize.call(this,this._boundsToLatLngs(e),i)},setBounds:function t(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function t(e){e=K(e);return[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});Hn.create=En;Hn.pointsToPath=at;an.geometryToLayer=ln;an.coordsToLatLng=un;an.coordsToLatLngs=cn;an.latLngToCoords=dn;an.latLngsToCoords=fn;an.getFeature=pn;an.asFeature=_n;di.mergeOptions({boxZoom:true});var Zn=yi.extend({initialize:function t(e){this._map=e;this._container=e._container;this._pane=e._panes.overlayPane;this._resetStateTimeout=0;e.on("unload",this._destroy,this)},addHooks:function t(){Ue(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function t(){qe(this._container,"mousedown",this._onMouseDown,this)},moved:function t(){return this._moved},_destroy:function t(){ve(this._pane);delete this._pane},_resetState:function t(){this._resetStateTimeout=0;this._moved=false},_clearDeferredResetState:function t(){if(this._resetStateTimeout!==0){clearTimeout(this._resetStateTimeout);this._resetStateTimeout=0}},_onMouseDown:function t(e){if(!e.shiftKey||e.which!==1&&e.button!==1){return false}this._clearDeferredResetState();this._resetState();Ee();Ze();this._startPoint=this._map.mouseEventToContainerPoint(e);Ue(document,{contextmenu:ti,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function t(e){if(!this._moved){this._moved=true;this._box=me("div","leaflet-zoom-box",this._container);Pe(this._container,"leaflet-crosshair");this._map.fire("boxzoomstart")}this._point=this._map.mouseEventToContainerPoint(e);var i=new V(this._point,this._startPoint),n=i.getSize();Ie(this._box,i.min);this._box.style.width=n.x+"px";this._box.style.height=n.y+"px"},_finish:function t(){if(this._moved){ve(this._box);Le(this._container,"leaflet-crosshair")}He();Be();qe(document,{contextmenu:ti,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function t(e){if(e.which!==1&&e.button!==1){return}this._finish();if(!this._moved){return}this._clearDeferredResetState();this._resetStateTimeout=setTimeout(p(this._resetState,this),0);var i=new Y(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})},_onKeyDown:function t(e){if(e.keyCode===27){this._finish()}}});di.addInitHook("addHandler","boxZoom",Zn);di.mergeOptions({doubleClickZoom:true});var Bn=yi.extend({addHooks:function t(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function t(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function t(e){var i=this._map,n=i.getZoom(),s=i.options.zoomDelta,o=e.originalEvent.shiftKey?n-s:n+s;if(i.options.doubleClickZoom==="center"){i.setZoom(o)}else{i.setZoomAround(e.containerPoint,o)}}});di.addInitHook("addHandler","doubleClickZoom",Bn);di.mergeOptions({dragging:true,inertia:!pt,inertiaDeceleration:3400,inertiaMaxSpeed:Infinity,easeLinearity:.2,worldCopyJump:false,maxBoundsViscosity:0});var Fn=yi.extend({addHooks:function t(){if(!this._draggable){var e=this._map;this._draggable=new Li(e._mapPane,e._container);this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this);this._draggable.on("predrag",this._onPreDragLimit,this);if(e.options.worldCopyJump){this._draggable.on("predrag",this._onPreDragWrap,this);e.on("zoomend",this._onZoomEnd,this);e.whenReady(this._onZoomEnd,this)}}Pe(this._map._container,"leaflet-grab leaflet-touch-drag");this._draggable.enable();this._positions=[];this._times=[]},removeHooks:function t(){Le(this._map._container,"leaflet-grab");Le(this._map._container,"leaflet-touch-drag");this._draggable.disable()},moved:function t(){return this._draggable&&this._draggable._moved},moving:function t(){return this._draggable&&this._draggable._moving},_onDragStart:function t(){var e=this._map;e._stop();if(this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=K(this._map.options.maxBounds);this._offsetLimit=q(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize()));this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else{this._offsetLimit=null}e.fire("movestart").fire("dragstart");if(e.options.inertia){this._positions=[];this._times=[]}},_onDrag:function t(e){if(this._map.options.inertia){var i=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n);this._times.push(i);this._prunePositions(i)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function t(e){while(this._positions.length>1&&e-this._times[0]>50){this._positions.shift();this._times.shift()}},_onZoomEnd:function t(){var e=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(e).x;this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function t(e,i){return e-(e-i)*this._viscosity},_onPreDragLimit:function t(){if(!this._viscosity||!this._offsetLimit){return}var e=this._draggable._newPos.subtract(this._draggable._startPos);var i=this._offsetLimit;if(e.x<i.min.x){e.x=this._viscousLimit(e.x,i.min.x)}if(e.y<i.min.y){e.y=this._viscousLimit(e.y,i.min.y)}if(e.x>i.max.x){e.x=this._viscousLimit(e.x,i.max.x)}if(e.y>i.max.y){e.y=this._viscousLimit(e.y,i.max.y)}this._draggable._newPos=this._draggable._startPos.add(e)},_onPreDragWrap:function t(){var e=this._worldWidth,i=Math.round(e/2),n=this._initialWorldOffset,s=this._draggable._newPos.x,o=(s-i+n)%e+i-n,r=(s+i+n)%e-i-n,a=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone();this._draggable._newPos.x=a},_onDragEnd:function t(e){var i=this._map,n=i.options,s=!n.inertia||this._times.length<2;i.fire("dragend",e);if(s){i.fire("moveend")}else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=n.easeLinearity,l=o.multiplyBy(a/r),h=l.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,h),c=l.multiplyBy(u/h),d=u/(n.inertiaDeceleration*a),f=c.multiplyBy(-d/2).round();if(!f.x&&!f.y){i.fire("moveend")}else{f=i._limitOffset(f,i.options.maxBounds);Z((function(){i.panBy(f,{duration:d,easeLinearity:a,noMoveStart:true,animate:true})}))}}}});di.addInitHook("addHandler","dragging",Fn);di.mergeOptions({keyboard:true,keyboardPanDelta:80});var Rn=yi.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function t(e){this._map=e;this._setPanDelta(e.options.keyboardPanDelta);this._setZoomDelta(e.options.zoomDelta)},addHooks:function t(){var e=this._map._container;if(e.tabIndex<=0){e.tabIndex="0"}Ue(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this);this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function t(){this._removeHooks();qe(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this);this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function t(){if(this._focused){return}var e=document.body,i=document.documentElement,n=e.scrollTop||i.scrollTop,s=e.scrollLeft||i.scrollLeft;this._map._container.focus();window.scrollTo(s,n)},_onFocus:function t(){this._focused=true;this._map.fire("focus")},_onBlur:function t(){this._focused=false;this._map.fire("blur")},_setPanDelta:function t(e){var i=this._panKeys={},n=this.keyCodes,s,o;for(s=0,o=n.left.length;s<o;s++){i[n.left[s]]=[-1*e,0]}for(s=0,o=n.right.length;s<o;s++){i[n.right[s]]=[e,0]}for(s=0,o=n.down.length;s<o;s++){i[n.down[s]]=[0,e]}for(s=0,o=n.up.length;s<o;s++){i[n.up[s]]=[0,-1*e]}},_setZoomDelta:function t(e){var i=this._zoomKeys={},n=this.keyCodes,s,o;for(s=0,o=n.zoomIn.length;s<o;s++){i[n.zoomIn[s]]=e}for(s=0,o=n.zoomOut.length;s<o;s++){i[n.zoomOut[s]]=-e}},_addHooks:function t(){Ue(document,"keydown",this._onKeyDown,this)},_removeHooks:function t(){qe(document,"keydown",this._onKeyDown,this)},_onKeyDown:function t(e){if(e.altKey||e.ctrlKey||e.metaKey){return}var i=e.keyCode,n=this._map,s;if(i in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress){s=this._panKeys[i];if(e.shiftKey){s=U(s).multiplyBy(3)}n.panBy(s);if(n.options.maxBounds){n.panInsideBounds(n.options.maxBounds)}}}else if(i in this._zoomKeys){n.setZoom(n.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[i])}else if(i===27&&n._popup&&n._popup.options.closeOnEscapeKey){n.closePopup()}else{return}ti(e)}});di.addInitHook("addHandler","keyboard",Rn);di.mergeOptions({scrollWheelZoom:true,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Nn=yi.extend({addHooks:function t(){Ue(this._map._container,"mousewheel",this._onWheelScroll,this);this._delta=0},removeHooks:function t(){qe(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function t(e){var i=ni(e);var n=this._map.options.wheelDebounceTime;this._delta+=i;this._lastMousePos=this._map.mouseEventToContainerPoint(e);if(!this._startTime){this._startTime=+new Date}var s=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer);this._timer=setTimeout(p(this._performZoom,this),s);ti(e)},_performZoom:function t(){var e=this._map,i=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var s=this._delta/(this._map.options.wheelPxPerZoomLevel*4),o=4*Math.log(2/(1+Math.exp(-Math.abs(s))))/Math.LN2,r=n?Math.ceil(o/n)*n:o,a=e._limitZoom(i+(this._delta>0?r:-r))-i;this._delta=0;this._startTime=null;if(!a){return}if(e.options.scrollWheelZoom==="center"){e.setZoom(i+a)}else{e.setZoomAround(this._lastMousePos,i+a)}}});di.addInitHook("addHandler","scrollWheelZoom",Nn);di.mergeOptions({tap:true,tapTolerance:15});var Dn=yi.extend({addHooks:function t(){Ue(this._map._container,"touchstart",this._onDown,this)},removeHooks:function t(){qe(this._map._container,"touchstart",this._onDown,this)},_onDown:function t(e){if(!e.touches){return}Qe(e);this._fireClick=true;if(e.touches.length>1){this._fireClick=false;clearTimeout(this._holdTimeout);return}var i=e.touches[0],n=i.target;this._startPos=this._newPos=new j(i.clientX,i.clientY);if(n.tagName&&n.tagName.toLowerCase()==="a"){Pe(n,"leaflet-active")}this._holdTimeout=setTimeout(p((function(){if(this._isTapValid()){this._fireClick=false;this._onUp();this._simulateEvent("contextmenu",i)}}),this),1e3);this._simulateEvent("mousedown",i);Ue(document,{touchmove:this._onMove,touchend:this._onUp},this)},_onUp:function t(e){clearTimeout(this._holdTimeout);qe(document,{touchmove:this._onMove,touchend:this._onUp},this);if(this._fireClick&&e&&e.changedTouches){var i=e.changedTouches[0],n=i.target;if(n&&n.tagName&&n.tagName.toLowerCase()==="a"){Le(n,"leaflet-active")}this._simulateEvent("mouseup",i);if(this._isTapValid()){this._simulateEvent("click",i)}}},_isTapValid:function t(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function t(e){var i=e.touches[0];this._newPos=new j(i.clientX,i.clientY);this._simulateEvent("mousemove",i)},_simulateEvent:function t(e,i){var n=document.createEvent("MouseEvents");n._simulated=true;i.target._simulatedClick=true;n.initMouseEvent(e,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);i.target.dispatchEvent(n)}});if(Ht&&!Et){di.addInitHook("addHandler","tap",Dn)}di.mergeOptions({touchZoom:Ht&&!pt,bounceAtZoomLimits:true});var Wn=yi.extend({addHooks:function t(){Pe(this._map._container,"leaflet-touch-zoom");Ue(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function t(){Le(this._map._container,"leaflet-touch-zoom");qe(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function t(e){var i=this._map;if(!e.touches||e.touches.length!==2||i._animatingZoom||this._zooming){return}var n=i.mouseEventToContainerPoint(e.touches[0]),s=i.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=i.getSize()._divideBy(2);this._startLatLng=i.containerPointToLatLng(this._centerPoint);if(i.options.touchZoom!=="center"){this._pinchStartLatLng=i.containerPointToLatLng(n.add(s)._divideBy(2))}this._startDist=n.distanceTo(s);this._startZoom=i.getZoom();this._moved=false;this._zooming=true;i._stop();Ue(document,"touchmove",this._onTouchMove,this);Ue(document,"touchend",this._onTouchEnd,this);Qe(e)},_onTouchMove:function t(e){if(!e.touches||e.touches.length!==2||!this._zooming){return}var i=this._map,n=i.mouseEventToContainerPoint(e.touches[0]),s=i.mouseEventToContainerPoint(e.touches[1]),o=n.distanceTo(s)/this._startDist;this._zoom=i.getScaleZoom(o,this._startZoom);if(!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&o<1||this._zoom>i.getMaxZoom()&&o>1)){this._zoom=i._limitZoom(this._zoom)}if(i.options.touchZoom==="center"){this._center=this._startLatLng;if(o===1){return}}else{var r=n._add(s)._divideBy(2)._subtract(this._centerPoint);if(o===1&&r.x===0&&r.y===0){return}this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}if(!this._moved){i._moveStart(true,false);this._moved=true}B(this._animRequest);var a=p(i._move,i,this._center,this._zoom,{pinch:true,round:false});this._animRequest=Z(a,this,true);Qe(e)},_onTouchEnd:function t(){if(!this._moved||!this._zooming){this._zooming=false;return}this._zooming=false;B(this._animRequest);qe(document,"touchmove",this._onTouchMove);qe(document,"touchend",this._onTouchEnd);if(this._map.options.zoomAnimation){this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),true,this._map.options.zoomSnap)}else{this._map._resetView(this._center,this._map._limitZoom(this._zoom))}}});di.addInitHook("addHandler","touchZoom",Wn);di.BoxZoom=Zn;di.DoubleClickZoom=Bn;di.Drag=Fn;di.Keyboard=Rn;di.ScrollWheelZoom=Nn;di.Tap=Dn;di.TouchZoom=Wn;Object.freeze=c;var jn=new WeakMap;var Gn=new WeakMap;var Un=new WeakMap;var Vn=new WeakMap;var qn=function(){function t(e){babelHelpers.classCallCheck(this,t);jn.set(this,{writable:true,value:void 0});Gn.set(this,{writable:true,value:void 0});Un.set(this,{writable:true,value:false});Vn.set(this,{writable:true,value:null});babelHelpers.classPrivateFieldSet(this,jn,e.token);babelHelpers.classPrivateFieldSet(this,Gn,e.sourceRepository)}babelHelpers.createClass(t,[{key:"refreshToken",value:function t(){var e=this;if(babelHelpers.classPrivateFieldGet(this,Un)){return babelHelpers.classPrivateFieldGet(this,Vn)}babelHelpers.classPrivateFieldSet(this,Vn,babelHelpers.classPrivateFieldGet(this,Gn).getProps().then((function(t){e.token=t.sourceParams.token;babelHelpers.classPrivateFieldSet(e,Un,false);return t.sourceParams.token})).catch((function(t){babelHelpers.classPrivateFieldSet(e,Un,false);console.error(t)})));babelHelpers.classPrivateFieldSet(this,Un,true);return babelHelpers.classPrivateFieldGet(this,Vn)}},{key:"token",get:function t(){return babelHelpers.classPrivateFieldGet(this,jn)},set:function t(e){babelHelpers.classPrivateFieldSet(this,jn,e)}}]);return t}();function Yn(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var Kn=new WeakMap;var Xn=new WeakMap;var Jn=new WeakMap;var $n=new WeakMap;var Qn=new WeakSet;var ts=function(t){babelHelpers.inherits(e,t);function e(){var t;var i;babelHelpers.classCallCheck(this,e);for(var n=arguments.length,s=new Array(n),o=0;o<n;o++){s[o]=arguments[o]}i=babelHelpers.possibleConstructorReturn(this,(t=babelHelpers.getPrototypeOf(e)).call.apply(t,[this].concat(s)));Qn.add(babelHelpers.assertThisInitialized(i));Kn.set(babelHelpers.assertThisInitialized(i),{writable:true,value:void 0});Xn.set(babelHelpers.assertThisInitialized(i),{writable:true,value:void 0});Jn.set(babelHelpers.assertThisInitialized(i),{writable:true,value:[]});$n.set(babelHelpers.assertThisInitialized(i),{writable:true,value:false});return i}babelHelpers.createClass(e,[{key:"setTokenContainer",value:function t(e){babelHelpers.classPrivateFieldSet(this,Kn,e)}},{key:"setHostName",value:function t(e){babelHelpers.classPrivateFieldSet(this,Xn,e)}},{key:"requestTile",value:function t(e,i,n,s){var o=this;fetch(e,{method:"GET",cache:"force-cache",headers:new Headers({Authorization:"Bearer ".concat(babelHelpers.classPrivateFieldGet(this,Kn).token),"Bx-Location-Osm-Host":babelHelpers.classPrivateFieldGet(this,Xn)})}).then((function(t){if(t.status===200){return t.blob()}if(t.status===401&&!s){Yn(o,Qn,es).call(o,e,i,n);return null}console.error("Response status: ".concat(t.status))})).then((function(t){if(t){var e=new FileReader;e.onload=function(){i.src=e.result};e.readAsDataURL(t);n(null,i)}})).catch((function(t){console.error(t)}))}},{key:"createTile",value:function t(e,i){var n=this.getTileUrl(e);var s=document.createElement("img");if(babelHelpers.classPrivateFieldGet(this,$n)){babelHelpers.classPrivateFieldGet(this,Jn).push([n,s,i])}else{this.requestTile(n,s,i,false)}return s}}]);return e}(xn);var es=function t(e,i,n){var s=this;babelHelpers.classPrivateFieldSet(this,$n,true);babelHelpers.classPrivateFieldGet(this,Jn).push([e,i,n]);babelHelpers.classPrivateFieldGet(this,Kn).refreshToken().then((function(t){var e=function t(){var e=babelHelpers.classPrivateFieldGet(s,Jn).pop();setTimeout((function(){s.requestTile(e[0],e[1],e[2],true)}),1)};while(babelHelpers.classPrivateFieldGet(s,Jn).length>0){e()}babelHelpers.classPrivateFieldSet(s,$n,false)}))};Xi.Default.imagePath="/bitrix/js/location/osm/leaflet/images/";function is(){var t=babelHelpers.taggedTemplateLiteral(['<div class="location-osm-map-container"></div>']);is=function e(){return t};return t}function ns(t,e,i){if(t!==e){throw new TypeError("Private static access of wrong provenance")}if(i.get){return i.get.call(t)}return i.value}function ss(t,e,i){if(t!==e){throw new TypeError("Private static access of wrong provenance")}return i}function os(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var rs=new WeakMap;var as=new WeakMap;var ls=new WeakMap;var hs=new WeakMap;var us=new WeakMap;var cs=new WeakMap;var ds=new WeakMap;var fs=new WeakMap;var ps=new WeakMap;var _s=new WeakMap;var ms=new WeakMap;var vs=new WeakMap;var gs=new WeakMap;var ys=new WeakMap;var bs=new WeakMap;var ws=new WeakMap;var Ps=new WeakMap;var Ls=new WeakMap;var Ts=new WeakSet;var xs=new WeakSet;var Ms=new WeakSet;var zs=new WeakSet;var Ss=new WeakSet;var Cs=new WeakSet;var Is=new WeakSet;var ks=function(t){babelHelpers.inherits(n,t);function n(t){var e;babelHelpers.classCallCheck(this,n);e=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(n).call(this,t));Is.add(babelHelpers.assertThisInitialized(e));Cs.add(babelHelpers.assertThisInitialized(e));Ss.add(babelHelpers.assertThisInitialized(e));zs.add(babelHelpers.assertThisInitialized(e));Ms.add(babelHelpers.assertThisInitialized(e));xs.add(babelHelpers.assertThisInitialized(e));Ts.add(babelHelpers.assertThisInitialized(e));rs.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});as.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});ls.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});hs.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});us.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});cs.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});ds.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});fs.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});ps.set(babelHelpers.assertThisInitialized(e),{writable:true,value:false});_s.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});ms.set(babelHelpers.assertThisInitialized(e),{writable:true,value:700});vs.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});gs.set(babelHelpers.assertThisInitialized(e),{writable:true,value:'<a href="https://leafletjs.com" title="A JS library for interactive maps" target="_blank">Leaflet</a> | Map data &copy; <a href="https://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> contributors'});ys.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});bs.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});ws.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});Ps.set(babelHelpers.assertThisInitialized(e),{writable:true,value:void 0});Ls.set(babelHelpers.assertThisInitialized(e),{writable:true,value:false});babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(e),hs,t.languageId);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(e),us,t.sourceLanguageId);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(e),fs,t.geocodingService);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(e),ys,t.mapFactoryMethod);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(e),bs,t.markerFactoryMethod);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(e),ws,t.tileLayerFactoryMethod);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(e),vs,"".concat(t.mapServiceUrl,"/hot/en/{z}/{x}/{y}.png"));babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(e),Ps,t.locationRepository);return e}babelHelpers.createClass(n,[{key:"onLocationChangedEventSubscribe",value:function t(e){this.subscribe(ns(n,n,Hs),e)}},{key:"render",value:function t(s){var o=this;babelHelpers.classPrivateFieldSet(this,as,s.mode);babelHelpers.classPrivateFieldSet(this,ls,s.location||null);var r=e.Tag.render(is());s.mapContainer.appendChild(r);return new Promise((function(t){babelHelpers.classPrivateFieldSet(o,cs,babelHelpers.classPrivateFieldGet(o,ys).call(o,r,{attributionControl:false}));babelHelpers.classPrivateFieldGet(o,cs).on("load",(function(){t()}));babelHelpers.classPrivateFieldGet(o,cs).on("click",(function(t){os(o,xs,Os).call(o,t.latlng.lat,t.latlng.lng)}));window.addEventListener("resize",(function(t){babelHelpers.classPrivateFieldSet(o,Ls,true);os(o,Is,Ns).call(o)}));babelHelpers.classPrivateFieldSet(o,ds,babelHelpers.classPrivateFieldGet(o,bs).call(o,[babelHelpers.classPrivateFieldGet(o,ls).latitude,babelHelpers.classPrivateFieldGet(o,ls).longitude],{draggable:babelHelpers.classPrivateFieldGet(o,as)===i.ControlMode.edit,autoPan:true}));babelHelpers.classPrivateFieldGet(o,ds).addTo(babelHelpers.classPrivateFieldGet(o,cs));babelHelpers.classPrivateFieldGet(o,ds).on("move",(function(t){os(o,Cs,Rs).call(o,t.latlng.lat,t.latlng.lng)}));babelHelpers.classPrivateFieldGet(o,cs).setView([babelHelpers.classPrivateFieldGet(o,ls).latitude,babelHelpers.classPrivateFieldGet(o,ls).longitude],ss(n,n,Es).call(n,babelHelpers.classPrivateFieldGet(o,ls)));var e=babelHelpers.classPrivateFieldGet(o,ws).call();e.initialize(babelHelpers.classPrivateFieldGet(o,vs),{maxZoom:18});e.addTo(babelHelpers.classPrivateFieldGet(o,cs));babelHelpers.classPrivateFieldGet(o,cs).on("zoomend",(function(){babelHelpers.classPrivateFieldSet(o,rs,babelHelpers.classPrivateFieldGet(o,cs).getZoom())}));var s=new pi.Attribution;s.setPrefix("");s.addAttribution(babelHelpers.classPrivateFieldGet(o,gs));babelHelpers.classPrivateFieldGet(o,cs).addControl(s)}))}},{key:"onMapShow",value:function t(){if(babelHelpers.classPrivateFieldGet(this,Ls)){babelHelpers.classPrivateFieldSet(this,Ls,false);os(this,Is,Ns).call(this)}}},{key:"destroy",value:function t(){e.Event.unbindAll(this);babelHelpers.classPrivateFieldGet(this,cs).remove();babelHelpers.classPrivateFieldGet(this,ds).remove();babelHelpers.get(babelHelpers.getPrototypeOf(n.prototype),"destroy",this).call(this)}},{key:"mode",set:function t(e){babelHelpers.classPrivateFieldSet(this,as,e);if(babelHelpers.classPrivateFieldGet(this,ds)){babelHelpers.classPrivateFieldGet(this,ds).draggable=e===i.ControlMode.edit}},get:function t(){return babelHelpers.classPrivateFieldGet(this,as)}},{key:"map",get:function t(){return babelHelpers.classPrivateFieldGet(this,cs)},set:function t(e){babelHelpers.classPrivateFieldSet(this,cs,e)}},{key:"marker",get:function t(){return babelHelpers.classPrivateFieldGet(this,ds)},set:function t(e){babelHelpers.classPrivateFieldSet(this,ds,e)}},{key:"zoom",get:function t(){return babelHelpers.classPrivateFieldGet(this,rs)},set:function t(e){babelHelpers.classPrivateFieldSet(this,rs,e);if(babelHelpers.classPrivateFieldGet(this,cs)){babelHelpers.classPrivateFieldGet(this,cs).setZoom(e)}}},{key:"location",set:function t(e){babelHelpers.classPrivateFieldSet(this,ls,e);if(e){if(babelHelpers.classPrivateFieldGet(this,ds)){babelHelpers.classPrivateFieldSet(this,ps,true);babelHelpers.classPrivateFieldGet(this,ds).setLatLng([e.latitude,e.longitude]);babelHelpers.classPrivateFieldSet(this,ps,false)}if(babelHelpers.classPrivateFieldGet(this,cs)){if(!babelHelpers.classPrivateFieldGet(this,cs).hasLayer(babelHelpers.classPrivateFieldGet(this,ds))){babelHelpers.classPrivateFieldGet(this,ds).addTo(babelHelpers.classPrivateFieldGet(this,cs))}babelHelpers.classPrivateFieldGet(this,cs).panTo([e.latitude,e.longitude])}}else if(babelHelpers.classPrivateFieldGet(this,ds)){babelHelpers.classPrivateFieldGet(this,ds).remove()}os(this,Ts,As).call(this)},get:function t(){return babelHelpers.classPrivateFieldGet(this,ls)}}]);return n}(i.MapBase);var Es=function t(e){var n=18;if(e){var s=e.type;if(s>i.LocationType.UNKNOWN){if(s<i.LocationType.COUNTRY)n=1;else if(s===i.LocationType.COUNTRY)n=4;else if(s<=i.LocationType.ADM_LEVEL_1)n=6;else if(s<=i.LocationType.LOCALITY)n=11;else if(s<=i.LocationType.STREET)n=16;else if(s>i.LocationType.STREET)n=18}}return n};var Hs={writable:true,value:"onChanged"};var As=function t(){if(!babelHelpers.classPrivateFieldGet(this,ls)){return}var e=ss(ks,ks,Es).call(ks,babelHelpers.classPrivateFieldGet(this,ls));if(e!==null&&e!==babelHelpers.classPrivateFieldGet(this,rs)){this.zoom=e}};var Os=function t(e,n){if(babelHelpers.classPrivateFieldGet(this,as)===i.ControlMode.edit){if(!babelHelpers.classPrivateFieldGet(this,cs).hasLayer(babelHelpers.classPrivateFieldGet(this,ds))){babelHelpers.classPrivateFieldGet(this,ds).addTo(babelHelpers.classPrivateFieldGet(this,cs))}babelHelpers.classPrivateFieldGet(this,ds).setLatLng([e,n]);os(this,Ms,Zs).call(this,e,n)}};var Zs=function t(e,n){var s=this;if(babelHelpers.classPrivateFieldGet(this,_s)!==null){clearTimeout(babelHelpers.classPrivateFieldGet(this,_s))}babelHelpers.classPrivateFieldSet(this,_s,setTimeout((function(){babelHelpers.classPrivateFieldSet(s,_s,null);babelHelpers.classPrivateFieldGet(s,cs).panTo([e,n]);var t=new i.Point(e,n);babelHelpers.classPrivateFieldGet(s,fs).reverse(t,os(s,zs,Bs).call(s)).then((function(e){var i;if(e){i=babelHelpers.classPrivateFieldGet(s,Ps).findByExternalId(e.externalId,Ks.code,babelHelpers.classPrivateFieldGet(s,hs)).then((function(e){if(e){e.longitude=t.longitude;if(e.address){e.address.longitude=t.longitude}e.latitude=t.latitude;if(e.address){e.address.latitude=t.latitude}}return e}))}else{i=new Promise((function(t){t(null)}))}return i})).then(os(s,Ss,Fs).bind(s)).catch((function(t){i.ErrorPublisher.getInstance().notify(t.errors)}))}),babelHelpers.classPrivateFieldGet(this,ms)))};var Bs=function t(){return babelHelpers.classPrivateFieldGet(this,rs)>=15?18:babelHelpers.classPrivateFieldGet(this,rs)};var Fs=function t(e){if(babelHelpers.classPrivateFieldGet(this,as)===i.ControlMode.edit){this.emit(ns(ks,ks,Hs),{location:e})}};var Rs=function t(e,n){if(!babelHelpers.classPrivateFieldGet(this,ps)&&babelHelpers.classPrivateFieldGet(this,as)===i.ControlMode.edit){os(this,Ms,Zs).call(this,e,n)}};var Ns=function t(){var e=this;setTimeout((function(){babelHelpers.classPrivateFieldGet(e,cs).invalidateSize()}),10)};var Ds=new WeakMap;var Ws=new WeakMap;var js=function(t){babelHelpers.inherits(e,t);function e(t){var i;babelHelpers.classCallCheck(this,e);i=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).call(this));Ds.set(babelHelpers.assertThisInitialized(i),{writable:true,value:void 0});Ws.set(babelHelpers.assertThisInitialized(i),{writable:true,value:void 0});babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),Ds,t.searchRequester);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),Ws,t.reverseRequester);return i}babelHelpers.createClass(e,[{key:"geocodeConcrete",value:function t(e){return babelHelpers.classPrivateFieldGet(this,Ds).request({query:e})}},{key:"reverse",value:function t(e,i){return babelHelpers.classPrivateFieldGet(this,Ws).request({point:e,zoom:i})}}]);return e}(i.GeocodingServiceBase);var Gs=new WeakMap;var Us=new WeakMap;var Vs=new WeakMap;var qs=new WeakMap;var Ys=new WeakMap;var Ks=function(t){babelHelpers.inherits(n,t);function n(t){var s;babelHelpers.classCallCheck(this,n);s=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(n).call(this,t));Gs.set(babelHelpers.assertThisInitialized(s),{writable:true,value:""});Us.set(babelHelpers.assertThisInitialized(s),{writable:true,value:""});Vs.set(babelHelpers.assertThisInitialized(s),{writable:true,value:void 0});qs.set(babelHelpers.assertThisInitialized(s),{writable:true,value:void 0});Ys.set(babelHelpers.assertThisInitialized(s),{writable:true,value:void 0});if(!e.Type.isString(t.languageId)||t.languageId.trim()===""){throw new i.SourceCreationError("props.languageId must be a string")}babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(s),Gs,t.languageId);if(!e.Type.isString(t.sourceLanguageId)||t.sourceLanguageId.trim()===""){throw new i.SourceCreationError("props.sourceLanguageId must be a string")}babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(s),Us,t.sourceLanguageId);if(!(t.mapService instanceof ks)){throw new i.SourceCreationError("props.mapService must be instanceof MapService")}babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(s),Vs,t.mapService);if(!(t.autocompleteService instanceof h)){throw new i.SourceCreationError("props.autocompleteService must be instanceof AutocompleteService")}babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(s),Ys,t.autocompleteService);if(!(t.geocodingService instanceof js)){throw new i.SourceCreationError("props.geocodingService must be instanceof GeocodingService")}babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(s),qs,t.geocodingService);return s}babelHelpers.createClass(n,[{key:"sourceCode",get:function t(){return n.code}},{key:"map",get:function t(){return this.mapService}},{key:"mapService",get:function t(){return babelHelpers.classPrivateFieldGet(this,Vs)}},{key:"autocompleteService",get:function t(){return babelHelpers.classPrivateFieldGet(this,Ys)}},{key:"geocodingService",get:function t(){return babelHelpers.classPrivateFieldGet(this,qs)}},{key:"languageId",get:function t(){return babelHelpers.classPrivateFieldGet(this,Gs)}}]);return n}(i.BaseSource);babelHelpers.defineProperty(Ks,"code","OSM");function Xs(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var Js=new WeakMap;var $s=new WeakMap;var Qs=new WeakMap;var to=new WeakSet;var eo=new WeakSet;var io=function(){function t(e){babelHelpers.classCallCheck(this,t);eo.add(this);to.add(this);Js.set(this,{writable:true,value:void 0});$s.set(this,{writable:true,value:void 0});Qs.set(this,{writable:true,value:void 0});this.serviceUrl=e.serviceUrl;this.languageId=e.languageId;this.sourceLanguageId=e.sourceLanguageId;babelHelpers.classPrivateFieldSet(this,Js,e.responseConverter);babelHelpers.classPrivateFieldSet(this,$s,e.hostName);babelHelpers.classPrivateFieldSet(this,Qs,e.tokenContainer)}babelHelpers.createClass(t,[{key:"createUrl",value:function t(e){throw new Error("Not implemented")}},{key:"request",value:function t(e){var i=this;return Xs(this,to,no).call(this,e).then((function(t){return t?babelHelpers.classPrivateFieldGet(i,Js).convertResponse(t,e):[]})).catch((function(t){console.error(t)}))}}]);return t}();var no=function t(i){var n=this;var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return fetch(this.createUrl(i),{method:"GET",headers:new Headers({Authorization:"Bearer ".concat(babelHelpers.classPrivateFieldGet(this,Qs).token),"Bx-Location-Osm-Host":babelHelpers.classPrivateFieldGet(this,$s)}),referrerPolicy:"no-referrer"}).then((function(t){if(t.status===200){return t.json()}if(t.status===401&&!s){return Xs(n,eo,so).call(n,i)}console.error("Response status: ".concat(t.status));t.text().then((function(t){e.Runtime.debug(t)}));return null}))};var so=function t(e){var i=this;return babelHelpers.classPrivateFieldGet(this,Qs).refreshToken().then((function(){return Xs(i,to,no).call(i,e,true)}))};var oo=function(t){babelHelpers.inherits(e,t);function e(){babelHelpers.classCallCheck(this,e);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).apply(this,arguments))}babelHelpers.createClass(e,[{key:"createUrl",value:function t(e){var i;var n=(i=e.limit)!==null&&i!==void 0?i:5;var s="".concat(this.serviceUrl,"/?\n\t\t\taction=osmgateway.location.search\n\t\t\t&params[q]=").concat(encodeURIComponent(e.query),"\n\t\t\t&params[format]=json\n\t\t\t&params[limit]=").concat(n,"\n\t\t\t&params[accept-language]=").concat(this.sourceLanguageId);if(e.viewbox){s+="&params[viewbox]=".concat(e.viewbox)}return s}}]);return e}(io);var ro=function(t){babelHelpers.inherits(e,t);function e(){babelHelpers.classCallCheck(this,e);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).apply(this,arguments))}babelHelpers.createClass(e,[{key:"createUrl",value:function t(e){var i=e.zoom||18;return"".concat(this.serviceUrl,"/?\n\t\t\taction=osmgateway.location.reverse\n\t\t\t&params[lat]=").concat(e.point.latitude,"\n\t\t\t&params[lon]=").concat(e.point.longitude,"\n\t\t\t&params[format]=json\n\t\t\t&params[zoom]=").concat(i,"\n\t\t\t&params[addressdetails]=0\t\t\t\n\t\t\t&params[accept-language]=").concat(this.sourceLanguageId)}}]);return e}(io);var ao=function(){function t(e){var i;babelHelpers.classCallCheck(this,t);this.languageId=e.languageId;this.sourceCode=(i=e.sourceCode)!==null&&i!==void 0?i:Ks.code}babelHelpers.createClass(t,[{key:"convertResponse",value:function t(e,i){throw new Error('Method "convertResponse()" not implemented')}}]);return t}();function lo(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var ho=new WeakSet;var uo=new WeakSet;var co=new WeakSet;var fo=function(t){babelHelpers.inherits(e,t);function e(){var t;var i;babelHelpers.classCallCheck(this,e);for(var n=arguments.length,s=new Array(n),o=0;o<n;o++){s[o]=arguments[o]}i=babelHelpers.possibleConstructorReturn(this,(t=babelHelpers.getPrototypeOf(e)).call.apply(t,[this].concat(s)));co.add(babelHelpers.assertThisInitialized(i));uo.add(babelHelpers.assertThisInitialized(i));ho.add(babelHelpers.assertThisInitialized(i));return i}babelHelpers.createClass(e,[{key:"convertResponse",value:function t(e,i){var n=this;var s=null;if(Array.isArray(e)){s=[];if(e.length>0){e.forEach((function(t){var e=lo(n,ho,po).call(n,t);if(e){s.push(e)}}))}}else if(babelHelpers.typeof(e)==="object"){s=lo(this,ho,po).call(this,e)}return s}}]);return e}(ao);var po=function t(e){var n=lo(this,co,mo).call(this,e.osm_type,e.osm_id);if(!n){return null}return new i.Location({externalId:n,latitude:e.lat,longitude:e.lon,type:lo(this,uo,_o).call(this,e.type),name:e.display_name,languageId:this.languageId,sourceCode:this.sourceCode})};var _o=function t(e){var n={country:i.LocationType.COUNTRY,municipality:i.LocationType.LOCALITY,city:i.LocationType.LOCALITY,town:i.LocationType.LOCALITY,village:i.LocationType.LOCALITY,postal_town:i.LocationType.LOCALITY,road:i.LocationType.STREET,street_address:i.LocationType.ADDRESS_LINE_1,county:i.LocationType.ADM_LEVEL_4,state_district:i.LocationType.ADM_LEVEL_3,state:i.LocationType.ADM_LEVEL_2,region:i.LocationType.ADM_LEVEL_1,floor:i.LocationType.FLOOR,postal_code:i.AddressType.POSTAL_CODE,room:i.LocationType.ROOM,sublocality:i.LocationType.SUB_LOCALITY,city_district:i.LocationType.SUB_LOCALITY_LEVEL_1,district:i.LocationType.SUB_LOCALITY_LEVEL_1,borough:i.LocationType.SUB_LOCALITY_LEVEL_1,suburb:i.LocationType.SUB_LOCALITY_LEVEL_1,subdivision:i.LocationType.SUB_LOCALITY_LEVEL_1,house_number:i.LocationType.BUILDING,house_name:i.LocationType.BUILDING,building:i.LocationType.BUILDING};var s=i.LocationType.UNKNOWN;if(typeof n[e]!=="undefined"){s=n[e]}return s};var mo=function t(e,i){if(!e||!i){return null}return e.substr(0,1).toLocaleUpperCase()+i};function vo(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var go=new WeakSet;var yo=new WeakSet;var bo=new WeakSet;var wo=new WeakSet;var Po=new WeakSet;var Lo=new WeakSet;var To=new WeakSet;var xo=new WeakSet;var Mo=function(t){babelHelpers.inherits(e,t);function e(){var t;var i;babelHelpers.classCallCheck(this,e);for(var n=arguments.length,s=new Array(n),o=0;o<n;o++){s[o]=arguments[o]}i=babelHelpers.possibleConstructorReturn(this,(t=babelHelpers.getPrototypeOf(e)).call.apply(t,[this].concat(s)));xo.add(babelHelpers.assertThisInitialized(i));To.add(babelHelpers.assertThisInitialized(i));Lo.add(babelHelpers.assertThisInitialized(i));Po.add(babelHelpers.assertThisInitialized(i));wo.add(babelHelpers.assertThisInitialized(i));bo.add(babelHelpers.assertThisInitialized(i));yo.add(babelHelpers.assertThisInitialized(i));go.add(babelHelpers.assertThisInitialized(i));return i}babelHelpers.createClass(e,[{key:"convertResponse",value:function t(e,n){var s=this;if(!e||!Array.isArray(e.features)||e.features.length===0){return[]}var o=[];var r=[];var a=e.address_tail?e.address_tail:"";e.features.forEach((function(t){if(babelHelpers.typeof(t.properties)!=="object"){return}var e=vo(s,Lo,Eo).call(s,t.properties);if(r.indexOf(e)!==-1){return}r.push(e);var l=vo(s,go,zo).call(s,t,n.autocompleteServiceParams);if(l){if(l.address&&a){l.address.setFieldValue(i.AddressType.ADDRESS_LINE_2,a)}o.push(l)}}));return o}}]);return e}(ao);var zo=function t(e,n){if(!e.properties){return null}var s=e.properties;var o=vo(this,xo,Ao).call(this,s.osm_type,s.osm_id);if(!o){return null}var r=vo(this,wo,Io).call(this,e);if(r===""){return null}var a=vo(this,To,Ho).call(this,s.type);var l=vo(this,Po,ko).call(this,e,a);var h=new i.Location({address:l,externalId:o,sourceCode:this.sourceCode,type:a,name:r,languageId:this.languageId});if(e.geometry&&e.geometry.coordinates&&e.geometry.coordinates[0]&&e.geometry.coordinates[1]){h.latitude=String(e.geometry.coordinates[1]);h.longitude=String(e.geometry.coordinates[0])}if(l){var u=vo(this,bo,Co).call(this,l);if(u!==""){h.setFieldValue(i.LocationType.TMP_TYPE_CLARIFICATION,u)}}if(s.osm_value&&s.osm_key){var c=vo(this,yo,So).call(this,s.osm_key,s.osm_value);if(c!==""){h.setFieldValue(i.LocationType.TMP_TYPE_HINT,c)}}return h};var So=function t(i,n){var s="";if(n==="city"||n==="town"){s=e.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_CITY")}else if(n==="village"||n==="hamlet"){s=e.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_VILLAGE")}else if(n==="locality"){s=e.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_LOCALITY")}else if(n==="hotel"){s=e.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_HOTEL")}else if(n==="suburb"){s=e.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_SUBURB")}else if(n==="island"){s=e.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_ISLAND")}else if(n==="cafe"){s=e.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_CAFE")}else if(n==="restaurant"){s=e.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_RESTAURANT")}else if(n==="river"){s=e.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_RIVER")}else if(i==="shop"){s=e.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_SHOP")}return s};var Co=function t(e){var n="";if(e.getFieldValue(i.AddressType.LOCALITY)){n+=e.getFieldValue(i.AddressType.LOCALITY)}if(e.getFieldValue(i.AddressType.ADM_LEVEL_1)){if(n!==""){n+=", "}n+=e.getFieldValue(i.AddressType.ADM_LEVEL_1)}if(e.getFieldValue(i.AddressType.COUNTRY)){if(n!==""){n+=", "}n+=e.getFieldValue(i.AddressType.COUNTRY)}return n};var Io=function t(e){var i;if(!e.properties){return""}var n=e.properties;var s=(i=n===null||n===void 0?void 0:n.name)!==null&&i!==void 0?i:"";if(n.street){if(s!==""){s+=", "}s+=n.street}if(n.housenumber){if(s!==""){s+=", "}s+=n.housenumber}return s};var ko=function t(e,n){if(!e.properties){return null}var s=e.properties;var o=new i.Address({languageId:this.languageId});if(e.geometry&&e.geometry.coordinates&&e.geometry.coordinates[0]&&e.geometry.coordinates[1]){o.latitude=String(e.geometry.coordinates[1]);o.longitude=String(e.geometry.coordinates[0])}if(s.name){o.setFieldValue(n,s.name)}if(s.housenumber){o.setFieldValue(i.AddressType.BUILDING,s.housenumber)}if(s.street){o.setFieldValue(i.AddressType.STREET,s.street)}if(s.city){o.setFieldValue(i.AddressType.LOCALITY,s.city)}if(s.state&&s.state!==s.city){o.setFieldValue(i.AddressType.ADM_LEVEL_1,s.state)}if(s.country){o.setFieldValue(i.AddressType.COUNTRY,s.country)}if(s.postcode){o.setFieldValue(i.AddressType.POSTAL_CODE,s.postcode)}return o};var Eo=function t(e){var i,n,s,o,r,a,l,h,u;var c="";c+=(i=e===null||e===void 0?void 0:e.country)!==null&&i!==void 0?i:"";c+=(n=e===null||e===void 0?void 0:e.state)!==null&&n!==void 0?n:"";c+=(s=e===null||e===void 0?void 0:e.county)!==null&&s!==void 0?s:"";c+=(o=e===null||e===void 0?void 0:e.locality)!==null&&o!==void 0?o:"";c+=(r=e===null||e===void 0?void 0:e.city)!==null&&r!==void 0?r:"";c+=(a=e===null||e===void 0?void 0:e.street)!==null&&a!==void 0?a:"";c+=(l=e===null||e===void 0?void 0:e.name)!==null&&l!==void 0?l:"";c+=(h=e===null||e===void 0?void 0:e.housenumber)!==null&&h!==void 0?h:"";c+=(u=e===null||e===void 0?void 0:e.type)!==null&&u!==void 0?u:"";return c};var Ho=function t(e){var n={postcode:i.AddressType.POSTAL_CODE,housenumber:i.LocationType.BUILDING,house:i.LocationType.BUILDING,name:i.AddressType.ADDRESS_LINE_2,country:i.LocationType.COUNTRY,city:i.LocationType.LOCALITY,district:i.LocationType.SUB_LOCALITY_LEVEL_1,locality:i.LocationType.LOCALITY,street:i.LocationType.STREET,state:i.LocationType.ADM_LEVEL_1,region:i.LocationType.ADM_LEVEL_1,county:i.LocationType.ADM_LEVEL_2};var s=i.LocationType.UNKNOWN;if(typeof n[e]!=="undefined"){s=n[e]}else{console.warn("Unknown response location type: ",e)}return s};var Ao=function t(e,i){if(!e||!i){return null}return e.substr(0,1).toLocaleUpperCase()+i};var Oo=function(){function t(){babelHelpers.classCallCheck(this,t)}babelHelpers.createClass(t,null,[{key:"createOSMSource",value:function t(e){var n=new qn({token:e.token,sourceRepository:new i.SourceRepository});var s={languageId:e.languageId,sourceLanguageId:e.sourceLanguageId};var o=new fo({languageId:e.languageId});var r=new oo({languageId:e.languageId,sourceLanguageId:e.sourceLanguageId,tokenContainer:n,serviceUrl:e.serviceUrl,hostName:e.hostName,responseConverter:o});var a=new ro({languageId:e.languageId,sourceLanguageId:e.sourceLanguageId,serviceUrl:e.serviceUrl,hostName:e.hostName,tokenContainer:n,responseConverter:o});var l=new Mo({languageId:e.languageId});s.autocompleteService=new h({languageId:e.languageId,autocompletePromptsCount:e.autocompletePromptsCount||7,sourceLanguageId:e.sourceLanguageId,responseConverter:l,autocompleteReplacements:e.autocompleteReplacements});var u=new js({searchRequester:r,reverseRequester:a});s.geocodingService=u;s.mapService=new ks({languageId:e.languageId,geocodingService:u,mapFactoryMethod:fi,markerFactoryMethod:tn,locationRepository:new i.LocationRepository,sourceLanguageId:e.sourceLanguageId,tileLayerFactoryMethod:function t(){var i=new ts;i.setTokenContainer(n);i.setHostName(e.hostName);return i},serviceUrl:e.serviceUrl,mapServiceUrl:e.mapServiceUrl});return new Ks(s)}}]);return t}();t.OSM=Ks;t.OSMFactory=Oo})(this.BX.Location.OSM=this.BX.Location.OSM||{},BX,BX.Location.Core);
//# sourceMappingURL=osm.bundle.map.js