(function(c,d){typeof exports==="object"&&typeof module!=="undefined"?d(exports):typeof define==="function"&&define.amd?define(["exports"],d):(d((c.L={})))}(this,(function(hG){var hx="1.3.4+HEAD.0e566b2";var f9=Object.freeze;Object.freeze=function(a){return a};function eu(c){var b,d,e,a;for(d=1,e=arguments.length;d0?Math.floor(a):Math.ceil(a)};gZ.prototype={clone:function(){return new gZ(this.x,this.y)},add:function(a){return this.clone()._add(fr(a))},_add:function(a){this.x+=a.x;this.y+=a.y;return this},subtract:function(a){return this.clone()._subtract(fr(a))},_subtract:function(a){this.x-=a.x;this.y-=a.y;return this},divideBy:function(a){return this.clone()._divideBy(a)},_divideBy:function(a){this.x/=a;this.y/=a;return this},multiplyBy:function(a){return this.clone()._multiplyBy(a)},_multiplyBy:function(a){this.x*=a;this.y*=a;return this},scaleBy:function(a){return new gZ(this.x*a.x,this.y*a.y)},unscaleBy:function(a){return new gZ(this.x/a.x,this.y/a.y)},round:function(){return this.clone()._round()},_round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},floor:function(){return this.clone()._floor()},_floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){return this.clone()._ceil()},_ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},trunc:function(){return this.clone()._trunc()},_trunc:function(){this.x=gA(this.x);this.y=gA(this.y);return this},distanceTo:function(b){b=fr(b);var c=b.x-this.x,a=b.y-this.y;return Math.sqrt(c*c+a*a)},equals:function(a){a=fr(a);return a.x===this.x&&a.y===this.y},contains:function(a){a=fr(a);return Math.abs(a.x)<=Math.abs(this.x)&&Math.abs(a.y)<=Math.abs(this.y)},toString:function(){return"Point("+fF(this.x)+", "+fF(this.y)+")"}};function fr(c,a,b){if(c instanceof gZ){return c}if(f6(c)){return new gZ(c[0],c[1])}if(c===undefined||c===null){return c}if(typeof c==="object"&&"x" in c&&"y" in c){return new gZ(c.x,c.y)}return new gZ(c,a,b)}function eA(c,d){if(!c){return}var a=d?[c,d]:c;for(var b=0,e=a.length;b=this.min.x)&&(c.x<=this.max.x)&&(b.y>=this.min.y)&&(c.y<=this.max.y)},intersects:function(a){a=go(a);var c=this.min,f=this.max,b=a.min,e=a.max,d=(e.x>=c.x)&&(b.x<=f.x),g=(e.y>=c.y)&&(b.y<=f.y);return d&&g},overlaps:function(g){g=go(g);var c=this.min,f=this.max,a=g.min,e=g.max,b=(e.x>c.x)&&(a.xc.y)&&(a.y=e.lat)&&(c.lat<=b.lat)&&(d.lng>=e.lng)&&(c.lng<=b.lng)},intersects:function(c){c=e9(c);var f=this._southWest,g=this._northEast,e=c.getSouthWest(),a=c.getNorthEast(),b=(a.lat>=f.lat)&&(e.lat<=g.lat),d=(a.lng>=f.lng)&&(e.lng<=g.lng);return b&&d},overlaps:function(b){b=e9(b);var f=this._southWest,g=this._northEast,e=b.getSouthWest(),a=b.getNorthEast(),c=(a.lat>f.lat)&&(e.latf.lng)&&(e.lng1;var eg=(function(){return !!document.createElement("canvas").getContext}());var gv=!!(document.createElementNS&&gI("svg").createSVGRect);var fo=!gv&&(function(){try{var a=document.createElement("div");a.innerHTML='';var c=a.firstChild;c.style.behavior="url(#default#VML)";return c&&(typeof c.adj==="object")}catch(b){return false}}());function hN(a){return navigator.userAgent.toLowerCase().indexOf(a)>=0}var hz=(Object.freeze||Object)({ie:gR,ielt9:ek,edge:hF,webkit:fX,android:dQ,android23:ft,androidStock:fL,opera:eI,chrome:h1,gecko:fI,safari:fq,phantom:gh,opera12:gr,win:gx,ie3d:dW,webkit3d:d5,gecko3d:gl,any3d:fA,mobile:hj,mobileWebkit:d3,mobileWebkit3d:ho,msPointer:he,pointer:fJ,touch:fx,mobileOpera:hH,mobileGecko:eO,retina:dI,canvas:eg,svg:gv,vml:fo});var fi=he?"MSPointerDown":"pointerdown";var ee=he?"MSPointerMove":"pointermove";var dJ=he?"MSPointerUp":"pointerup";var eo=he?"MSPointerCancel":"pointercancel";var e4=["INPUT","SELECT","OPTION"];var hP={};var e6=false;var gC=0;function d8(b,c,d,a){if(c==="touchstart"){gm(b,d,a)}else{if(c==="touchmove"){ea(b,d,a)}else{if(c==="touchend"){fG(b,d,a)}}}return this}function fO(b,c,a){var d=b["_leaflet_"+c+a];if(c==="touchstart"){b.removeEventListener(fi,d,false)}else{if(c==="touchmove"){b.removeEventListener(ee,d,false)}else{if(c==="touchend"){b.removeEventListener(dJ,d,false);b.removeEventListener(eo,d,false)}}}return this}function gm(b,d,a){var c=gL(function(e){if(e.pointerType!=="mouse"&&e.MSPOINTER_TYPE_MOUSE&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE){if(e4.indexOf(e.target.tagName)<0){dT(e)}else{return}}fk(e,d)});b["_leaflet_touchstart"+a]=c;b.addEventListener(fi,c,false);if(!e6){document.documentElement.addEventListener(fi,g5,true);document.documentElement.addEventListener(ee,hI,true);document.documentElement.addEventListener(dJ,eU,true);document.documentElement.addEventListener(eo,eU,true);e6=true}}function g5(a){hP[a.pointerId]=a;gC++}function hI(a){if(hP[a.pointerId]){hP[a.pointerId]=a}}function eU(a){delete hP[a.pointerId];gC--}function fk(a,b){a.touches=[];for(var c in hP){a.touches.push(hP[c])}a.changedTouches=[a];b(a)}function ea(c,d,a){var b=function(e){if((e.pointerType===e.MSPOINTER_TYPE_MOUSE||e.pointerType==="mouse")&&e.buttons===0){return}fk(e,d)};c["_leaflet_touchmove"+a]=b;c.addEventListener(ee,b,false)}function fG(c,d,a){var b=function(e){fk(e,d)};c["_leaflet_touchend"+a]=b;c.addEventListener(dJ,b,false);c.addEventListener(eo,b,false)}var gN=he?"MSPointerDown":fJ?"pointerdown":"touchstart";var hr=he?"MSPointerUp":fJ?"pointerup":"touchend";var eE="_leaflet_";function hL(k,b,a){var c,f,e=false,g=250;function j(m){var n;if(fJ){if((!hF)||m.pointerType==="mouse"){return}n=gC}else{n=m.touches.length}if(n>1){return}var o=Date.now(),l=o-(c||o);f=m.touches?m.touches[0]:m;e=(l>0&&l<=g);c=o}function d(m){if(e&&!f.cancelBubble){if(fJ){if((!hF)||m.pointerType==="mouse"){return}var o={},l,n;for(n in f){l=f[n];o[n]=l&&l.bind?l.bind(f):l}f=o}f.type="dblclick";b(f);c=null}}k[eE+gN+a]=j;k[eE+hr+a]=d;k[eE+"dblclick"+a]=b;k.addEventListener(gN,j,false);k.addEventListener(hr,d,false);k.addEventListener("dblclick",b,false);return this}function f4(d,a){var b=d[eE+gN+a],c=d[eE+hr+a],e=d[eE+"dblclick"+a];d.removeEventListener(gN,b,false);d.removeEventListener(hr,c,false);if(!hF){d.removeEventListener("dblclick",e,false)}return this}var dP=hm(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);var gq=hm(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);var gO=gq==="webkitTransition"||gq==="OTransition"?gq+"End":"transitionend";function ev(a){return typeof a==="string"?document.getElementById(a):a}function eh(b,c){var a=b.style[c]||(b.currentStyle&&b.currentStyle[c]);if((!a||a==="auto")&&document.defaultView){var d=document.defaultView.getComputedStyle(b,null);a=d?d[c]:null}return a==="auto"?null:a}function gU(c,a,d){var b=document.createElement(c);b.className=a||"";if(d){d.appendChild(b)}return b}function hk(a){var b=a.parentNode;if(b){b.removeChild(a)}}function dO(a){while(a.firstChild){a.removeChild(a.firstChild)}}function g0(a){var b=a.parentNode;if(b.lastChild!==a){b.appendChild(a)}}function g6(a){var b=a.parentNode;if(b.firstChild!==a){b.insertBefore(a,b.firstChild)}}function hb(a,c){if(a.classList!==undefined){return a.classList.contains(c)}var b=fU(a);return b.length>0&&new RegExp("(^|\\s)"+c+"(\\s|$)").test(b)}function hg(a,e){if(a.classList!==undefined){var c=e3(e);for(var d=0,f=c.length;d100&&d<500)||(a.target._simulatedClick&&!a._simulated)){g4(a);return}gc=c;b(a)}var fh=(Object.freeze||Object)({on:ew,off:e8,stopPropagation:g2,disableScrollPropagation:hS,disableClickPropagation:gt,preventDefault:dT,stop:g4,getMousePosition:ei,getWheelDelta:dZ,fakeStop:g1,skipped:g3,isExternalTarget:gX,addListener:ew,removeListener:e8});var fl=eS.extend({run:function(c,d,b,a){this.stop();this._el=c;this._inProgress=true;this._duration=b||0.25;this._easeOutPower=1/Math.max(a||0.5,0.2);this._startPos=gn(c);this._offset=d.subtract(this._startPos);this._startTime=+new Date();this.fire("start");this._animate()},stop:function(){if(!this._inProgress){return}this._step(true);this._complete()},_animate:function(){this._animId=dR(this._animate,this);this._step()},_step:function(b){var c=(+new Date())-this._startTime,a=this._duration*1000;if(cthis.options.maxZoom){return this.setZoom(b)}}return this},panInsideBounds:function(a,b){this._enforcingBounds=true;var d=this.getCenter(),c=this._limitCenter(d,this._zoom,e9(a));if(!d.equals(c)){this.panTo(c,b)}this._enforcingBounds=false;return this},invalidateSize:function(d){if(!this._loaded){return this}d=eu({animate:false,pan:true},d===true?{animate:true}:d);var c=this.getSize();this._sizeChanged=true;this._lastCenter=null;var e=this.getSize(),a=c.divideBy(2).round(),f=e.divideBy(2).round(),b=a.subtract(f);if(!b.x&&!b.y){return this}if(d.animate&&d.pan){this.panBy(b)}else{if(d.pan){this._rawPanBy(b)}this.fire("move");if(d.debounceMoveend){clearTimeout(this._sizeTimer);this._sizeTimer=setTimeout(gL(this.fire,this,"moveend"),200)}else{this.fire("moveend")}}return this.fire("resize",{oldSize:c,newSize:e})},stop:function(){this.setZoom(this._limitZoom(this._zoom));if(!this.options.zoomSnap){this.fire("viewreset")}return this._stop()},locate:function(c){c=this._locateOptions=eu({timeout:10000,watch:false},c);if(!("geolocation" in navigator)){this._handleGeolocationError({code:0,message:"Geolocation not supported."});return this}var a=gL(this._handleGeolocationResponse,this),b=gL(this._handleGeolocationError,this);if(c.watch){this._locationWatchId=navigator.geolocation.watchPosition(a,b,c)}else{navigator.geolocation.getCurrentPosition(a,b,c)}return this},stopLocate:function(){if(navigator.geolocation&&navigator.geolocation.clearWatch){navigator.geolocation.clearWatch(this._locationWatchId)}if(this._locateOptions){this._locateOptions.setView=false}return this},_handleGeolocationError:function(c){var a=c.code,b=c.message||(a===1?"permission denied":(a===2?"position unavailable":"timeout"));if(this._locateOptions.setView&&!this._loaded){this.fitWorld()}this.fire("locationerror",{code:a,message:"Geolocation error: "+b+"."})},_handleGeolocationResponse:function(e){var f=e.coords.latitude,d=e.coords.longitude,k=new fV(f,d),a=k.toBounds(e.coords.accuracy*2),b=this._locateOptions;if(b.setView){var c=this.getBoundsZoom(a);this.setView(k,b.maxZoom?Math.min(c,b.maxZoom):c)}var g={latlng:k,bounds:a,timestamp:e.timestamp};for(var j in e.coords){if(typeof e.coords[j]==="number"){g[j]=e.coords[j]}}this.fire("locationfound",g)},addHandler:function(c,a){if(!a){return this}var b=this[c]=new a(this);this._handlers.push(b);if(this.options[c]){b.enable()}return this},remove:function(){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(a){this._container._leaflet_id=undefined;this._containerId=undefined}if(this._locationWatchId!==undefined){this.stopLocate()}this._stop();hk(this._mapPane);if(this._clearControlPos){this._clearControlPos()}if(this._resizeRequest){fu(this._resizeRequest);this._resizeRequest=null}this._clearHandlers();if(this._loaded){this.fire("unload")}var b;for(b in this._layers){this._layers[b].remove()}for(b in this._panes){hk(this._panes[b])}this._layers=[];this._panes=[];delete this._mapPane;delete this._renderer;return this},createPane:function(c,d){var b="leaflet-pane"+(c?" leaflet-"+c.replace("Pane","")+"-pane":""),a=gU("div",b,d||this._mapPane);if(c){this._panes[c]=a}return a},getCenter:function(){this._checkIfLoaded();if(this._lastCenter&&!this._moved()){return this._lastCenter}return this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var b=this.getPixelBounds(),c=this.unproject(b.getBottomLeft()),a=this.unproject(b.getTopRight());return new ht(c,a)},getMinZoom:function(){return this.options.minZoom===undefined?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===undefined?(this._layersMaxZoom===undefined?Infinity:this._layersMaxZoom):this.options.maxZoom},getBoundsZoom:function(a,n,e){a=e9(a);e=fr(e||[0,0]);var d=this.getZoom()||0,m=this.getMinZoom(),f=this.getMaxZoom(),j=a.getNorthWest(),g=a.getSouthEast(),b=this.getSize().subtract(e),c=go(this.project(g,d),this.project(j,d)).getSize(),o=fA?this.options.zoomSnap:1,k=b.x/c.x,l=b.y/c.y,p=n?Math.max(k,l):Math.min(k,l);d=this.getScaleZoom(p,d);if(o){d=Math.round(d/(o/100))*(o/100);d=n?Math.ceil(d/o)*o:Math.floor(d/o)*o}return Math.max(m,Math.min(f,d))},getSize:function(){if(!this._size||this._sizeChanged){this._size=new gZ(this._container.clientWidth||0,this._container.clientHeight||0);this._sizeChanged=false}return this._size.clone()},getPixelBounds:function(c,a){var b=this._getTopLeftPoint(c,a);return new eA(b,b.add(this.getSize()))},getPixelOrigin:function(){this._checkIfLoaded();return this._pixelOrigin},getPixelWorldBounds:function(a){return this.options.crs.getProjectedBounds(a===undefined?this.getZoom():a)},getPane:function(a){return typeof a==="string"?this._panes[a]:a},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(b,a){var c=this.options.crs;a=a===undefined?this._zoom:a;return c.scale(b)/c.scale(a)},getScaleZoom:function(a,b){var d=this.options.crs;b=b===undefined?this._zoom:b;var c=d.zoom(a*d.scale(b));return isNaN(c)?Infinity:c},project:function(a,b){b=b===undefined?this._zoom:b;return this.options.crs.latLngToPoint(gz(a),b)},unproject:function(b,a){a=a===undefined?this._zoom:a;return this.options.crs.pointToLatLng(fr(b),a)},layerPointToLatLng:function(b){var a=fr(b).add(this.getPixelOrigin());return this.unproject(a)},latLngToLayerPoint:function(a){var b=this.project(gz(a))._round();return b._subtract(this.getPixelOrigin())},wrapLatLng:function(a){return this.options.crs.wrapLatLng(gz(a))},wrapLatLngBounds:function(a){return this.options.crs.wrapLatLngBounds(e9(a))},distance:function(b,a){return this.options.crs.distance(gz(b),gz(a))},containerPointToLayerPoint:function(a){return fr(a).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(a){return fr(a).add(this._getMapPanePos())},containerPointToLatLng:function(b){var a=this.containerPointToLayerPoint(fr(b));return this.layerPointToLatLng(a)},latLngToContainerPoint:function(a){return this.layerPointToContainerPoint(this.latLngToLayerPoint(gz(a)))},mouseEventToContainerPoint:function(a){return ei(a,this._container)},mouseEventToLayerPoint:function(a){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(a))},mouseEventToLatLng:function(a){return this.layerPointToLatLng(this.mouseEventToLayerPoint(a))},_initContainer:function(a){var b=this._container=ev(a);if(!b){throw new Error("Map container not found.")}else{if(b._leaflet_id){throw new Error("Map container is already initialized.")}}ew(b,"scroll",this._onScroll,this);this._containerId=hd(b)},_initLayout:function(){var a=this._container;this._fadeAnimated=this.options.fadeAnimation&&fA;hg(a,"leaflet-container"+(fx?" leaflet-touch":"")+(dI?" leaflet-retina":"")+(ek?" leaflet-oldie":"")+(fq?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var b=eh(a,"position");if(b!=="absolute"&&b!=="relative"&&b!=="fixed"){a.style.position="relative"}this._initPanes();if(this._initControlPos){this._initControlPos()}},_initPanes:function(){var a=this._panes={};this._paneRenderers={};this._mapPane=this.createPane("mapPane",this._container);eP(this._mapPane,new gZ(0,0));this.createPane("tilePane");this.createPane("shadowPane");this.createPane("overlayPane");this.createPane("markerPane");this.createPane("tooltipPane");this.createPane("popupPane");if(!this.options.markerZoomAnimation){hg(a.markerPane,"leaflet-zoom-hide");hg(a.shadowPane,"leaflet-zoom-hide")}},_resetView:function(c,b){eP(this._mapPane,new gZ(0,0));var a=!this._loaded;this._loaded=true;b=this._limitZoom(b);this.fire("viewprereset");var d=this._zoom!==b;this._moveStart(d,false)._move(c,b)._moveEnd(d);this.fire("viewreset");if(a){this.fire("load")}},_moveStart:function(b,a){if(b){this.fire("zoomstart")}if(!a){this.fire("movestart")}return this},_move:function(c,b,a){if(b===undefined){b=this._zoom}var d=this._zoom!==b;this._zoom=b;this._lastCenter=c;this._pixelOrigin=this._getNewPixelOrigin(c);if(d||(a&&a.pinch)){this.fire("zoom",a)}return this.fire("move",a)},_moveEnd:function(a){if(a){this.fire("zoomend")}return this.fire("moveend")},_stop:function(){fu(this._flyToFrame);if(this._panAnim){this._panAnim.stop()}return this},_rawPanBy:function(a){eP(this._mapPane,this._getMapPanePos().subtract(a))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){if(!this._enforcingBounds){this.panInsideBounds(this.options.maxBounds)}},_checkIfLoaded:function(){if(!this._loaded){throw new Error("Set map center and zoom first.")}},_initEvents:function(a){this._targets={};this._targets[hd(this._container)]=this;var b=a?e8:ew;b(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this);if(this.options.trackResize){b(window,"resize",this._onResize,this)}if(fA&&this.options.transform3DLimit){(a?this.off:this.on).call(this,"moveend",this._onMoveEnd)}},_onResize:function(){fu(this._resizeRequest);this._resizeRequest=dR(function(){this.invalidateSize({debounceMoveend:true})},this)},_onScroll:function(){this._container.scrollTop=0;this._container.scrollLeft=0},_onMoveEnd:function(){var a=this._getMapPanePos();if(Math.max(Math.abs(a.x),Math.abs(a.y))>=this.options.transform3DLimit){this._resetView(this.getCenter(),this.getZoom())}},_findEventTargets:function(a,e){var f=[],b,c=e==="mouseout"||e==="mouseover",g=a.target||a.srcElement,d=false;while(g){b=this._targets[hd(g)];if(b&&(e==="click"||e==="preclick")&&!a._simulated&&this._draggableMoved(b)){d=true;break}if(b&&b.listens(e,true)){if(c&&!gX(g,a)){break}f.push(b);if(c){break}}if(g===this._container){break}g=g.parentNode}if(!f.length&&!d&&!c&&gX(g,a)){f=[this]}return f},_handleDOMEvent:function(a){if(!this._loaded||g3(a)){return}var b=a.type;if(b==="mousedown"||b==="keypress"){hY(a.target||a.srcElement)}this._fireDOMEvent(a,b)},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(j,c,f){if(j.type==="click"){var e=eu({},j);e.type="preclick";this._fireDOMEvent(e,e.type,f)}if(j._stopped){return}f=(f||[]).concat(this._findEventTargets(j,c));if(!f.length){return}var a=f[0];if(c==="contextmenu"&&a.listens(c,true)){dT(j)}var b={originalEvent:j};if(j.type!=="keypress"){var g=a.getLatLng&&(!a._radius||a._radius<=10);b.containerPoint=g?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(j);b.layerPoint=this.containerPointToLayerPoint(b.containerPoint);b.latlng=g?a.getLatLng():this.layerPointToLatLng(b.layerPoint)}for(var d=0;d0?Math.round(a-b)/2:Math.max(0,Math.ceil(a))-Math.max(0,Math.floor(b))},_limitZoom:function(a){var b=this.getMinZoom(),c=this.getMaxZoom(),d=fA?this.options.zoomSnap:1;if(d){a=Math.round(a/d)*d}return Math.max(b,Math.min(c,a))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){eX(this._mapPane,"leaflet-pan-anim");this.fire("moveend")},_tryAnimatedPan:function(c,b){var a=this._getCenterOffset(c)._trunc();if((b&&b.animate)!==true&&!this.getSize().contains(a)){return false}this.panBy(a,b);return true},_createAnimProxy:function(){var a=this._proxy=gU("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(a);this.on("zoomanim",function(c){var b=dP,d=this._proxy.style[b];dN(this._proxy,this.project(c.center,c.zoom),this.getZoomScale(c.zoom,1));if(d===this._proxy.style[b]&&this._animatingZoom){this._onZoomTransitionEnd()}},this);this.on("load moveend",function(){var b=this.getCenter(),c=this.getZoom();dN(this._proxy,this.project(b,c),this.getZoomScale(c,1))},this);this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){hk(this._proxy);delete this._proxy},_catchTransitionEnd:function(a){if(this._animatingZoom&&a.propertyName.indexOf("transform")>=0){this._onZoomTransitionEnd()}},_nothingToAnimate:function(){return !this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,c,d){if(this._animatingZoom){return true}d=d||{};if(!this._zoomAnimated||d.animate===false||this._nothingToAnimate()||Math.abs(c-this._zoom)>this.options.zoomAnimationThreshold){return false}var a=this.getZoomScale(c),b=this._getCenterOffset(e)._divideBy(1-1/a);if(d.animate!==true&&!this.getSize().contains(b)){return false}dR(function(){this._moveStart(true,false)._animateZoom(e,c,true)},this);return true},_animateZoom:function(d,a,c,b){if(!this._mapPane){return}if(c){this._animatingZoom=true;this._animateToCenter=d;this._animateToZoom=a;hg(this._mapPane,"leaflet-zoom-anim")}this.fire("zoomanim",{center:d,zoom:a,noUpdate:b});setTimeout(gL(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){if(!this._animatingZoom){return}if(this._mapPane){eX(this._mapPane,"leaflet-zoom-anim")}this._animatingZoom=false;this._move(this._animateToCenter,this._animateToZoom);dR(function(){this._moveEnd(true)},this)}});function ez(a,b){return new hB(a,b)}var ef=fm.extend({options:{position:"topright"},initialize:function(a){hD(this,a)},getPosition:function(){return this.options.position},setPosition:function(b){var a=this._map;if(a){a.removeControl(this)}this.options.position=b;if(a){a.addControl(this)}return this},getContainer:function(){return this._container},addTo:function(b){this.remove();this._map=b;var d=this._container=this.onAdd(b),a=this.getPosition(),c=b._controlCorners[a];hg(d,"leaflet-control");if(a.indexOf("bottom")!==-1){c.insertBefore(d,c.firstChild)}else{c.appendChild(d)}return this},remove:function(){if(!this._map){return this}hk(this._container);if(this.onRemove){this.onRemove(this._map)}this._map=null;return this},_refocusOnMap:function(a){if(this._map&&a&&a.screenX>0&&a.screenY>0){this._map.getContainer().focus()}}});var fp=function(a){return new ef(a)};hB.include({addControl:function(a){a.addTo(this);return this},removeControl:function(a){a.remove();return this},_initControlPos:function(){var b=this._controlCorners={},c="leaflet-",d=this._controlContainer=gU("div",c+"control-container",this._container);function a(e,g){var f=c+e+" "+c+g;b[e+g]=gU("div",f,d)}a("top","left");a("top","right");a("bottom","left");a("bottom","right")},_clearControlPos:function(){for(var a in this._controlCorners){hk(this._controlCorners[a])}hk(this._controlContainer);delete this._controlCorners;delete this._controlContainer}});var fW=ef.extend({options:{collapsed:true,position:"topright",autoZIndex:true,hideSingleBase:false,sortLayers:false,sortFunction:function(a,c,b,d){return b1;this._baseLayersList.style.display=e?"":"none"}this._separator.style.display=b&&e?"":"none";return this},_onLayerChange:function(a){if(!this._handlingClick){this._update()}var b=this._getLayer(hd(a.target));var c=b.overlay?(a.type==="add"?"overlayadd":"overlayremove"):(a.type==="add"?"baselayerchange":null);if(c){this._map.fire(c,b)}},_createRadioElement:function(d,a){var b='";var c=document.createElement("div");c.innerHTML=b;return c.firstChild},_addItem:function(g){var c=document.createElement("label"),a=this._map.hasLayer(g.layer),e;if(g.overlay){e=document.createElement("input");e.type="checkbox";e.className="leaflet-control-layers-selector";e.defaultChecked=a}else{e=this._createRadioElement("leaflet-base-layers",a)}this._layerControlInputs.push(e);e.layerId=hd(g.layer);ew(e,"click",this._onInputClick,this);var d=document.createElement("span");d.innerHTML=" "+g.name;var b=document.createElement("div");c.appendChild(b);b.appendChild(e);b.appendChild(d);var f=g.overlay?this._overlaysList:this._baseLayersList;f.appendChild(c);this._checkDisabledLayers();return c},_onInputClick:function(){var f=this._layerControlInputs,e,a;var c=[],d=[];this._handlingClick=true;for(var b=f.length-1;b>=0;b--){e=f[b];a=this._getLayer(e.layerId).layer;if(e.checked){c.push(a)}else{if(!e.checked){d.push(a)}}}for(b=0;b=0;c--){d=e[c];b=this._getLayer(d.layerId).layer;d.disabled=(b.options.minZoom!==undefined&&ab.options.maxZoom)}},_expandIfNotCollapsed:function(){if(this._map&&!this.options.collapsed){this.expand()}return this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}});var ep=function(a,b,c){return new fW(a,b,c)};var ex=ef.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(b){var a="leaflet-control-zoom",d=gU("div",a+" leaflet-bar"),c=this.options;this._zoomInButton=this._createButton(c.zoomInText,c.zoomInTitle,a+"-in",d,this._zoomIn);this._zoomOutButton=this._createButton(c.zoomOutText,c.zoomOutTitle,a+"-out",d,this._zoomOut);this._updateDisabled();b.on("zoomend zoomlevelschange",this._updateDisabled,this);return d},onRemove:function(a){a.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){this._disabled=true;this._updateDisabled();return this},enable:function(){this._disabled=false;this._updateDisabled();return this},_zoomIn:function(a){if(!this._disabled&&this._map._zoomthis._map.getMinZoom()){this._map.zoomOut(this._map.options.zoomDelta*(a.shiftKey?3:1))}},_createButton:function(e,a,c,f,d){var b=gU("a",c,f);b.innerHTML=e;b.href="#";b.title=a;b.setAttribute("role","button");b.setAttribute("aria-label",a);gt(b);ew(b,"click",g4);ew(b,"click",d,this);ew(b,"click",this._refocusOnMap,this);return b},_updateDisabled:function(){var a=this._map,b="leaflet-disabled";eX(this._zoomInButton,b);eX(this._zoomOutButton,b);if(this._disabled||a._zoom===a.getMinZoom()){hg(this._zoomOutButton,b)}if(this._disabled||a._zoom===a.getMaxZoom()){hg(this._zoomInButton,b)}}});hB.mergeOptions({zoomControl:true});hB.addInitHook(function(){if(this.options.zoomControl){this.zoomControl=new ex();this.addControl(this.zoomControl)}});var hw=function(a){return new ex(a)};var e5=ef.extend({options:{position:"bottomleft",maxWidth:100,metric:true,imperial:true},onAdd:function(a){var b="leaflet-control-scale",d=gU("div",b),c=this.options;this._addScales(c,b+"-line",d);a.on(c.updateWhenIdle?"moveend":"move",this._update,this);a.whenReady(this._update,this);return d},onRemove:function(a){a.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(b,a,c){if(b.metric){this._mScale=gU("div",a,c)}if(b.imperial){this._iScale=gU("div",a,c)}},_update:function(){var b=this._map,a=b.getSize().y/2;var c=b.distance(b.containerPointToLatLng([0,a]),b.containerPointToLatLng([this.options.maxWidth,a]));this._updateScales(c)},_updateScales:function(a){if(this.options.metric&&a){this._updateMetric(a)}if(this.options.imperial&&a){this._updateImperial(a)}},_updateMetric:function(a){var c=this._getRoundNum(a),b=c<1000?c+" m":(c/1000)+" km";this._updateScale(this._mScale,b,c/a)},_updateImperial:function(a){var b=a*3.2808399,c,d,e;if(b>5280){c=b/5280;d=this._getRoundNum(c);this._updateScale(this._iScale,d+" mi",d/c)}else{e=this._getRoundNum(b);this._updateScale(this._iScale,e+" ft",e/b)}},_updateScale:function(a,b,c){a.style.width=Math.round(this.options.maxWidth*c)+"px";a.innerHTML=b},_getRoundNum:function(b){var c=Math.pow(10,(Math.floor(b)+"").length-1),a=b/c;a=a>=10?10:a>=5?5:a>=3?3:a>=2?2:1;return c*a}});var hK=function(a){return new e5(a)};var dX=ef.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(a){hD(this,a);this._attributions={}},onAdd:function(a){a.attributionControl=this;this._container=gU("div","leaflet-control-attribution");gt(this._container);for(var b in a._layers){if(a._layers[b].getAttribution){this.addAttribution(a._layers[b].getAttribution())}}this._update();return this._container},setPrefix:function(a){this.options.prefix=a;this._update();return this},addAttribution:function(a){if(!a){return this}if(!this._attributions[a]){this._attributions[a]=0}this._attributions[a]++;this._update();return this},removeAttribution:function(a){if(!a){return this}if(this._attributions[a]){this._attributions[a]--;this._update()}return this},_update:function(){if(!this._map){return}var a=[];for(var c in this._attributions){if(this._attributions[c]){a.push(c)}}var b=[];if(this.options.prefix){b.push(this.options.prefix)}if(a.length){b.push(a.join(", "))}this._container.innerHTML=b.join(" | ")}});hB.mergeOptions({attributionControl:true});hB.addInitHook(function(){if(this.options.attributionControl){new dX().addTo(this)}});var gk=function(a){return new dX(a)};ef.Layers=fW;ef.Zoom=ex;ef.Scale=e5;ef.Attribution=dX;fp.layers=ep;fp.zoom=hw;fp.scale=hK;fp.attribution=gk;var fg=fm.extend({initialize:function(a){this._map=a},enable:function(){if(this._enabled){return this}this._enabled=true;this.addHooks();return this},disable:function(){if(!this._enabled){return this}this._enabled=false;this.removeHooks();return this},enabled:function(){return !!this._enabled}});fg.addTo=function(a,b){a.addHandler(b,this);return this};var fN={Events:em};var gQ=fx?"touchstart mousedown":"mousedown";var hC={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"};var hV={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"};var eb=eS.extend({options:{clickTolerance:3},initialize:function(b,a,c,d){hD(this,d);this._element=b;this._dragStartTarget=a||b;this._preventOutline=c},enable:function(){if(this._enabled){return}ew(this._dragStartTarget,gQ,this._onDown,this);this._enabled=true},disable:function(){if(!this._enabled){return}if(eb._dragging===this){this.finishDrag()}e8(this._dragStartTarget,gQ,this._onDown,this);this._enabled=false;this._moved=false},_onDown:function(b){if(b._simulated||!this._enabled){return}this._moved=false;if(hb(this._element,"leaflet-zoom-anim")){return}if(eb._dragging||b.shiftKey||((b.which!==1)&&(b.button!==1)&&!b.touches)){return}eb._dragging=this;if(this._preventOutline){hY(this._element)}hJ();hc();if(this._moving){return}this.fire("down");var a=b.touches?b.touches[0]:b,c=eV(this._element);this._startPoint=new gZ(a.clientX,a.clientY);this._parentScale=hZ(c);ew(document,hV[b.type],this._onMove,this);ew(document,hC[b.type],this._onUp,this)},_onMove:function(c){if(c._simulated||!this._enabled){return}if(c.touches&&c.touches.length>1){this._moved=true;return}var a=(c.touches&&c.touches.length===1?c.touches[0]:c),b=new gZ(a.clientX,a.clientY)._subtract(this._startPoint);if(!b.x&&!b.y){return}if(Math.abs(b.x)+Math.abs(b.y)j){d=g;j=f}}if(j>a){k[d]=1;gF(b,k,a,e,d);gF(b,k,a,d,c)}}function d6(c,e){var a=[c[0]];for(var d=1,b=0,f=c.length;de){a.push(c[d]);b=d}}if(bb.max.x){c|=2}}if(a.yb.max.y){c|=8}}return c}function hW(a,b){var c=b.x-a.x,d=b.y-a.y;return c*c+d*d}function fT(l,e,f,k){var g=e.x,j=e.y,b=f.x-g,c=f.y-j,a=b*b+c*c,d;if(a>0){d=((l.x-g)*b+(l.y-j)*c)/a;if(d>1){g=f.x;j=f.y}else{if(d>0){g+=b*d;j+=c*d}}}b=l.x-g;c=l.y-j;return k?b*b+c*c:new gZ(g,j)}function hy(a){return !f6(a[0])||(typeof a[0][0]!=="object"&&typeof a[0][0]!=="undefined")}function fv(a){console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead.");return hy(a)}var dU=(Object.freeze||Object)({simplify:et,pointToSegmentDistance:ec,closestPointOnSegment:gW,clipSegment:hA,_getEdgeIntersection:ff,_getBitCode:d9,_sqClosestPointOnSegment:fT,isFlat:hy,_flat:fv});function ge(c,a,b){var f,k=[1,4,2,8],j,l,m,d,e,g,n,o;for(j=0,g=c.length;j1e-7;j++){l=f*Math.sin(e);l=Math.pow((1-l)/(1+l),f/2);g=Math.PI/2-2*Math.atan(c*l)-e;e+=g}return new fV(e*d,b.x*d/a)}};var fj=(Object.freeze||Object)({LonLat:gH,Mercator:eQ,SphericalMercator:d1});var hE=eu({},gJ,{code:"EPSG:3395",projection:eQ,transformation:(function(){var a=0.5/(Math.PI*eQ.R);return hM(a,0.5,-a,0.5)}())});var dK=eu({},gJ,{code:"EPSG:4326",projection:gH,transformation:hM(1/180,1,-1/180,0.5)});var hO=eu({},eW,{projection:gH,transformation:hM(1,0,-1,0),scale:function(a){return Math.pow(2,a)},zoom:function(a){return Math.log(a)/Math.LN2},distance:function(d,a){var b=a.lng-d.lng,c=a.lat-d.lat;return Math.sqrt(b*b+c*c)},infinite:true});eW.Earth=gJ;eW.EPSG3395=hE;eW.EPSG3857=dM;eW.EPSG900913=gi;eW.EPSG4326=dK;eW.Simple=hO;var fn=eS.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:true},addTo:function(a){a.addLayer(this);return this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(a){if(a){a.removeLayer(this)}return this},getPane:function(a){return this._map.getPane(a?(this.options[a]||a):this.options.pane)},addInteractiveTarget:function(a){this._map._targets[hd(a)]=this;return this},removeInteractiveTarget:function(a){delete this._map._targets[hd(a)];return this},getAttribution:function(){return this.options.attribution},_layerAdd:function(a){var b=a.target;if(!b.hasLayer(this)){return}this._map=b;this._zoomAnimated=b._zoomAnimated;if(this.getEvents){var c=this.getEvents();b.on(c,this);this.once("remove",function(){b.off(c,this)},this)}this.onAdd(b);if(this.getAttribution&&b.attributionControl){b.attributionControl.addAttribution(this.getAttribution())}this.fire("add");b.fire("layeradd",{layer:this})}});hB.include({addLayer:function(b){if(!b._layerAdd){throw new Error("The provided object is not a Layer.")}var a=hd(b);if(this._layers[a]){return this}this._layers[a]=b;b._mapToAdd=this;if(b.beforeAdd){b.beforeAdd(this)}this.whenReady(b._layerAdd,b);return this},removeLayer:function(b){var a=hd(b);if(!this._layers[a]){return this}if(this._loaded){b.onRemove(this)}if(b.getAttribution&&this.attributionControl){this.attributionControl.removeAttribution(b.getAttribution())}delete this._layers[a];if(this._loaded){this.fire("layerremove",{layer:b});b.fire("remove")}b._map=b._mapToAdd=null;return this},hasLayer:function(a){return !!a&&(hd(a) in this._layers)},eachLayer:function(a,b){for(var c in this._layers){a.call(b,this._layers[c])}return this},_addLayers:function(a){a=a?(f6(a)?a:[a]):[];for(var b=0,c=a.length;bthis._layersMaxZoom){this.setZoom(this._layersMaxZoom)}if(this.options.minZoom===undefined&&this._layersMinZoom&&this.getZoom()a){f=(e-a)/k;return this._map.layerPointToLatLng([d.x-f*(d.x-b.x),d.y-f*(d.y-b.y)])}}},getBounds:function(){return this._bounds},addLatLng:function(a,b){b=b||this._defaultShape();a=gz(a);b.push(a);this._bounds.extend(a);return this.redraw()},_setLatLngs:function(a){this._bounds=new ht();this._latlngs=this._convertLatLngs(a)},_defaultShape:function(){return hy(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(c){var d=[],a=hy(c);for(var b=0,e=c.length;b=2&&b[0] instanceof fV&&b[0].equals(b[c-1])){b.pop()}return b},_setLatLngs:function(a){e1.prototype._setLatLngs.call(this,a);if(hy(this._latlngs)){this._latlngs=[this._latlngs]}},_defaultShape:function(){return hy(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var b=this._renderer._bounds,d=this.options.weight,a=new gZ(d,d);b=new eA(b.min.subtract(a),b.max.add(a));this._parts=[];if(!this._pxBounds||!this._pxBounds.intersects(b)){return}if(this.options.noClip){this._parts=this._rings;return}for(var c=0,e=this._rings.length,f;ca.y)!==(c.y>a.y))&&(a.x<(c.x-b.x)*(a.y-b.y)/(c.y-b.y)+b.x)){k=!k}}}return k||e1.prototype._containsPoint.call(this,a,true)}});function fR(b,a){return new gK(b,a)}var hU=gs.extend({initialize:function(a,b){hD(this,b);this._layers={};if(a){this.addData(a)}},addData:function(d){var g=f6(d)?d:d.features,a,f,b;if(g){for(a=0,f=g.length;a0)?c:[f.src];return}if(!f6(this._url)){this._url=[this._url]}f.autoplay=!!this.options.autoplay;f.loop=!!this.options.loop;for(var b=0;bb){c.height=b+"px";hg(e,a)}else{eX(e,a)}this._containerWidth=this._container.offsetWidth},_animateZoom:function(b){var a=this._map._latLngToNewLayerPoint(this._latlng,b.zoom,b.center),c=this._getAnchor();eP(this._container,a.add(c))},_adjustPan:function(){if(!this.options.autoPan||(this._map._panAnim&&this._map._panAnim._inProgress)){return}var n=this._map,k=parseInt(eh(this._container,"marginBottom"),10)||0,b=this._container.offsetHeight+k,f=this._containerWidth,j=new gZ(this._containerLeft,-b-this._containerBottom);j._add(gn(this._container));var l=n.layerPointToContainerPoint(j),g=fr(this.options.autoPanPadding),m=fr(this.options.autoPanPaddingTopLeft||g),a=fr(this.options.autoPanPaddingBottomRight||g),c=n.getSize(),d=0,e=0;if(l.x+f+a.x>c.x){d=l.x+f-c.x+a.x}if(l.x-d-m.x<0){d=l.x-m.x}if(l.y+b+a.y>c.y){e=l.y+b-c.y+a.y}if(l.y-e-m.y<0){e=l.y-m.y}if(d||e){n.fire("autopanstart").panBy([d,e])}},_onCloseButtonClick:function(a){this._close();g4(a)},_getAnchor:function(){return fr(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});var eM=function(b,a){return new eD(b,a)};hB.mergeOptions({closePopupOnClick:true});hB.include({openPopup:function(c,a,b){if(!(c instanceof eD)){c=new eD(b).setContent(c)}if(a){c.setLatLng(a)}if(this.hasLayer(c)){return this}if(this._popup&&this._popup.options.autoClose){this.closePopup()}this._popup=c;return this.addLayer(c)},closePopup:function(a){if(!a||a===this._popup){a=this._popup;this._popup=null}if(a){this.removeLayer(a)}return this}});fn.include({bindPopup:function(a,b){if(a instanceof eD){hD(a,b);this._popup=a;a._source=this}else{if(!this._popup||b){this._popup=new eD(b,this)}this._popup.setContent(a)}if(!this._popupHandlersAdded){this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup});this._popupHandlersAdded=true}return this},unbindPopup:function(){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(c,a){if(!(c instanceof fn)){a=c;c=this}if(c instanceof gs){for(var b in this._layers){c=this._layers[b];break}}if(!a){a=c.getCenter?c.getCenter():c.getLatLng()}if(this._popup&&this._map){this._popup._source=c;this._popup.update();this._map.openPopup(this._popup,a)}return this},closePopup:function(){if(this._popup){this._popup._close()}return this},togglePopup:function(a){if(this._popup){if(this._popup._map){this.closePopup()}else{this.openPopup(a)}}return this},isPopupOpen:function(){return(this._popup?this._popup.isOpen():false)},setPopupContent:function(a){if(this._popup){this._popup.setContent(a)}return this},getPopup:function(){return this._popup},_openPopup:function(a){var b=a.layer||a.target;if(!this._popup){return}if(!this._map){return}g4(a);if(b instanceof h0){this.openPopup(a.layer||a.target,a.latlng);return}if(this._map.hasLayer(this._popup)&&this._popup._source===b){this.closePopup()}else{this.openPopup(b,a.latlng)}},_movePopup:function(a){this._popup.setLatLng(a.latlng)},_onKeyPress:function(a){if(a.originalEvent.keyCode===13){this._openPopup(a)}}});var d0=f2.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:false,sticky:false,interactive:false,opacity:0.9},onAdd:function(a){f2.prototype.onAdd.call(this,a);this.setOpacity(this.options.opacity);a.fire("tooltipopen",{tooltip:this});if(this._source){this._source.fire("tooltipopen",{tooltip:this},true)}},onRemove:function(a){f2.prototype.onRemove.call(this,a);a.fire("tooltipclose",{tooltip:this});if(this._source){this._source.fire("tooltipclose",{tooltip:this},true)}},getEvents:function(){var a=f2.prototype.getEvents.call(this);if(fx&&!this.options.permanent){a.preclick=this._close}return a},_close:function(){if(this._map){this._map.closeTooltip(this)}},_initLayout:function(){var a="leaflet-tooltip",b=a+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=gU("div",b)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(d){var a=this._map,l=this._container,e=a.latLngToContainerPoint(a.getCenter()),k=a.layerPointToContainerPoint(d),c=this.options.direction,f=l.offsetWidth,b=l.offsetHeight,j=fr(this.options.offset),g=this._getAnchor();if(c==="top"){d=d.add(fr(-f/2+j.x,-b+j.y+g.y,true))}else{if(c==="bottom"){d=d.subtract(fr(f/2-j.x,-j.y,true))}else{if(c==="center"){d=d.subtract(fr(f/2+j.x,b/2-g.y+j.y,true))}else{if(c==="right"||c==="auto"&&k.xthis.options.maxZoom||ca){return this._retainParent(l,e,k,a)}return false},_retainChildren:function(c,f,g,d){for(var k=2*c;k<2*c+2;k++){for(var a=2*f;a<2*f+2;a++){var e=new gZ(k,a);e.z=g+1;var b=this._tileCoordsToKey(e),j=this._tiles[b];if(j&&j.active){j.retain=true;continue}else{if(j&&j.loaded){j.retain=true}}if(g+1this.options.maxZoom)||(this.options.minZoom!==undefined&&a1){this._setView(a,b);return}for(var o=q.min.y;o<=q.max.y;o++){for(var n=q.min.x;n<=q.max.x;n++){var d=new gZ(n,o);d.z=this._tileZoom;if(!this._isValidTile(d)){continue}var g=this._tiles[this._tileCoordsToKey(d)];if(g){g.current=true}else{k.push(d)}}}k.sort(function(t,s){return t.distanceTo(e)-s.distanceTo(e)});if(k.length!==0){if(!this._loading){this._loading=true;this.fire("loading")}var j=document.createDocumentFragment();for(n=0;nc.max.x))||(!d.wrapLat&&(b.yc.max.y))){return false}}if(!this.options.bounds){return true}var a=this._tileCoordsToBounds(b);return e9(this.options.bounds).overlaps(a)},_keyToBounds:function(a){return this._tileCoordsToBounds(this._keyToTileCoords(a))},_tileCoordsToNwSe:function(a){var g=this._map,b=this.getTileSize(),d=a.scaleBy(b),f=d.add(b),e=g.unproject(d,a.z),c=g.unproject(f,a.z);return[e,c]},_tileCoordsToBounds:function(a){var b=this._tileCoordsToNwSe(a),c=new ht(b[0],b[1]);if(!this.options.noWrap){c=this._map.wrapLatLngBounds(c)}return c},_tileCoordsToKey:function(a){return a.x+":"+a.y+":"+a.z},_keyToTileCoords:function(b){var c=b.split(":"),a=new gZ(+c[0],+c[1]);a.z=+c[2];return a},_removeTile:function(b){var a=this._tiles[b];if(!a){return}hk(a.el);delete this._tiles[b];this.fire("tileunload",{tile:a.el,coords:this._keyToTileCoords(b)})},_initTile:function(b){hg(b,"leaflet-tile");var a=this.getTileSize();b.style.width=a.x+"px";b.style.height=a.y+"px";b.onselectstart=fY;b.onmousemove=fY;if(ek&&this.options.opacity<1){gD(b,this.options.opacity)}if(dQ&&!ft){b.style.WebkitBackfaceVisibility="hidden"}},_addTile:function(a,e){var c=this._getTilePos(a),d=this._tileCoordsToKey(a);var b=this.createTile(this._wrapCoords(a),gL(this._tileReady,this,a));this._initTile(b);if(this.createTile.length<2){dR(gL(this._tileReady,this,a,null,b))}eP(b,c);this._tiles[d]={el:b,coords:a,current:true};e.appendChild(b);this.fire("tileloadstart",{tile:b,coords:a})},_tileReady:function(a,b,c){if(b){this.fire("tileerror",{error:b,tile:c,coords:a})}var d=this._tileCoordsToKey(a);c=this._tiles[d];if(!c){return}c.loaded=+new Date();if(this._map._fadeAnimated){gD(c.el,0);fu(this._fadeFrame);this._fadeFrame=dR(this._updateOpacity,this)}else{c.active=true;this._pruneTiles()}if(!b){hg(c.el,"leaflet-tile-loaded");this.fire("tileload",{tile:c.el,coords:a})}if(this._noTilesToLoad()){this._loading=false;this.fire("load");if(ek||!this._map._fadeAnimated){dR(this._pruneTiles,this)}else{setTimeout(gL(this._pruneTiles,this),250)}}},_getTilePos:function(a){return a.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(b){var a=new gZ(this._wrapX?fE(b.x,this._wrapX):b.x,this._wrapY?fE(b.y,this._wrapY):b.y);a.z=b.z;return a},_pxBoundsToTileRange:function(b){var a=this.getTileSize();return new eA(b.min.unscaleBy(a).floor(),b.max.unscaleBy(a).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var a in this._tiles){if(!this._tiles[a].loaded){return false}}return true}});function gb(a){return new hQ(a)}var eL=hQ.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:false,zoomReverse:false,detectRetina:false,crossOrigin:false},initialize:function(a,b){this._url=a;b=hD(this,b);if(b.detectRetina&&dI&&b.maxZoom>0){b.tileSize=Math.floor(b.tileSize/2);if(!b.zoomReverse){b.zoomOffset++;b.maxZoom--}else{b.zoomOffset--;b.minZoom++}b.minZoom=Math.max(0,b.minZoom)}if(typeof b.subdomains==="string"){b.subdomains=b.subdomains.split("")}if(!dQ){this.on("tileunload",this._onTileRemove)}},setUrl:function(b,a){this._url=b;if(!a){this.redraw()}return this},createTile:function(a,c){var b=document.createElement("img");ew(b,"load",gL(this._tileOnLoad,this,c,b));ew(b,"error",gL(this._tileOnError,this,c,b));if(this.options.crossOrigin||this.options.crossOrigin===""){b.crossOrigin=this.options.crossOrigin===true?"":this.options.crossOrigin}b.alt="";b.setAttribute("role","presentation");b.src=this.getTileUrl(a);return b},getTileUrl:function(b){var c={r:dI?"@2x":"",s:this._getSubdomain(b),x:b.x,y:b.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var a=this._globalTileRange.max.y-b.y;if(this.options.tms){c.y=a}c["-y"]=a}return fM(this._url,eu(c,this.options))},_tileOnLoad:function(b,a){if(ek){setTimeout(gL(b,this,null,a),0)}else{b(null,a)}},_tileOnError:function(c,b,a){var d=this.options.errorTileUrl;if(d&&b.getAttribute("src")!==d){b.src=d}c(a,b)},_onTileRemove:function(a){a.tile.onload=null},_getZoomForUrl:function(){var b=this._tileZoom,c=this.options.maxZoom,a=this.options.zoomReverse,d=this.options.zoomOffset;if(a){b=c-b}return b+d},_getSubdomain:function(a){var b=Math.abs(a.x+a.y)%this.options.subdomains.length;return this.options.subdomains[b]},_abortLoading:function(){var b,a;for(b in this._tiles){if(this._tiles[b].coords.z!==this._tileZoom){a=this._tiles[b].el;a.onload=fY;a.onerror=fY;if(!a.complete){a.src=gg;hk(a);delete this._tiles[b]}}}},_removeTile:function(b){var a=this._tiles[b];if(!a){return}if(!fL){a.el.setAttribute("src",gg)}return hQ.prototype._removeTile.call(this,b)},_tileReady:function(a,b,c){if(!this._map||(c&&c.getAttribute("src")===gg)){return}return hQ.prototype._tileReady.call(this,a,b,c)}});function fs(a,b){return new eL(a,b)}var h2=eL.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:false,version:"1.1.1"},options:{crs:null,uppercase:false},initialize:function(d,e){this._url=d;var f=eu({},this.defaultWmsParams);for(var c in e){if(!(c in this.options)){f[c]=e[c]}}e=hD(this,e);var a=e.detectRetina&&dI?2:1;var b=this.getTileSize();f.width=b.x*a;f.height=b.y*a;this.wmsParams=f},onAdd:function(b){this._crs=this.options.crs||b.options.crs;this._wmsVersion=parseFloat(this.wmsParams.version);var a=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[a]=this._crs.code;eL.prototype.onAdd.call(this,b)},getTileUrl:function(a){var j=this._tileCoordsToNwSe(a),e=this._crs,b=go(e.project(j[0]),e.project(j[1])),c=b.min,f=b.max,g=(this._wmsVersion>=1.3&&this._crs===dK?[c.y,c.x,f.y,f.x]:[c.x,c.y,f.x,f.y]).join(","),d=eL.prototype.getTileUrl.call(this,a);return d+fS(this.wmsParams,d,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+g},setParams:function(a,b){eu(this.wmsParams,a);if(!b){this.redraw()}return this}});function ga(a,b){return new h2(a,b)}eL.WMS=h2;fs.wms=ga;var d2=fn.extend({options:{padding:0.1,tolerance:0},initialize:function(a){hD(this,a);hd(this);this._layers=this._layers||{}},onAdd:function(){if(!this._container){this._initContainer();if(this._zoomAnimated){hg(this._container,"leaflet-zoom-animated")}}this.getPane().appendChild(this._container);this._update();this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this);this._destroyContainer()},getEvents:function(){var a={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};if(this._zoomAnimated){a.zoomanim=this._onAnimZoom}return a},_onAnimZoom:function(a){this._updateTransform(a.center,a.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(a,b){var g=this._map.getZoomScale(b,this._zoom),e=gn(this._container),d=this._map.getSize().multiplyBy(0.5+this.options.padding),k=this._map.project(this._center,b),f=this._map.project(a,b),c=f.subtract(k),j=d.multiplyBy(-g).add(e).add(d).subtract(c);if(fA){dN(this._container,j,g)}else{eP(this._container,j)}},_reset:function(){this._update();this._updateTransform(this._center,this._zoom);for(var a in this._layers){this._layers[a]._reset()}},_onZoomEnd:function(){for(var a in this._layers){this._layers[a]._project()}},_updatePaths:function(){for(var a in this._layers){this._layers[a]._update()}},_update:function(){var a=this.options.padding,b=this._map.getSize(),c=this._map.containerPointToLayerPoint(b.multiplyBy(-a)).round();this._bounds=new eA(c,c.add(b.multiplyBy(1+a*2)).round());this._center=this._map.getCenter();this._zoom=this._map.getZoom()}});var hf=d2.extend({getEvents:function(){var a=d2.prototype.getEvents.call(this);a.viewprereset=this._onViewPreReset;return a},_onViewPreReset:function(){this._postponeUpdatePaths=true},onAdd:function(){d2.prototype.onAdd.call(this);this._draw()},_initContainer:function(){var a=this._container=document.createElement("canvas");ew(a,"mousemove",eC(this._onMouseMove,32,this),this);ew(a,"click dblclick mousedown mouseup contextmenu",this._onClick,this);ew(a,"mouseout",this._handleMouseOut,this);this._ctx=a.getContext("2d")},_destroyContainer:function(){fu(this._redrawRequest);delete this._ctx;hk(this._container);e8(this._container);delete this._container},_updatePaths:function(){if(this._postponeUpdatePaths){return}var b;this._redrawBounds=null;for(var a in this._layers){b=this._layers[a];b._update()}this._redraw()},_update:function(){if(this._map._animatingZoom&&this._bounds){return}this._drawnLayers={};d2.prototype._update.call(this);var c=this._bounds,b=this._container,a=c.getSize(),d=dI?2:1;eP(b,c.min);b.width=d*a.x;b.height=d*a.y;b.style.width=a.x+"px";b.style.height=a.y+"px";if(dI){this._ctx.scale(2,2)}this._ctx.translate(-c.min.x,-c.min.y);this.fire("update")},_reset:function(){d2.prototype._reset.call(this);if(this._postponeUpdatePaths){this._postponeUpdatePaths=false;this._updatePaths()}},_initPath:function(a){this._updateDashArray(a);this._layers[hd(a)]=a;var b=a._order={layer:a,prev:this._drawLast,next:null};if(this._drawLast){this._drawLast.next=b}this._drawLast=b;this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(a){this._requestRedraw(a)},_removePath:function(c){var d=c._order;var b=d.next;var a=d.prev;if(b){b.prev=a}else{this._drawLast=a}if(a){a.next=b}else{this._drawFirst=b}delete this._drawnLayers[c._leaflet_id];delete c._order;delete this._layers[hd(c)];this._requestRedraw(c)},_updatePath:function(a){this._extendRedrawBounds(a);a._project();a._update();this._requestRedraw(a)},_updateStyle:function(a){this._updateDashArray(a);this._requestRedraw(a)},_updateDashArray:function(b){if(typeof b.options.dashArray==="string"){var a=b.options.dashArray.split(/[, ]+/),d=[],c;for(c=0;c')}}catch(a){return function(b){return document.createElement("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}})();var fb={_initContainer:function(){this._container=gU("div","leaflet-vml-container")},_update:function(){if(this._map._animatingZoom){return}d2.prototype._update.call(this);this.fire("update")},_initPath:function(a){var b=a._container=fQ("shape");hg(b,"leaflet-vml-shape "+(this.options.className||""));b.coordsize="1 1";a._path=fQ("path");b.appendChild(a._path);this._updateStyle(a);this._layers[hd(a)]=a},_addPath:function(a){var b=a._container;this._container.appendChild(b);if(a.options.interactive){a.addInteractiveTarget(b)}},_removePath:function(a){var b=a._container;hk(b);a.removeInteractiveTarget(b);delete this._layers[hd(a)]},_updateStyle:function(c){var a=c._stroke,b=c._fill,d=c.options,e=c._container;e.stroked=!!d.stroke;e.filled=!!d.fill;if(d.stroke){if(!a){a=c._stroke=fQ("stroke")}e.appendChild(a);a.weight=d.weight+"px";a.color=d.color;a.opacity=d.opacity;if(d.dashArray){a.dashStyle=f6(d.dashArray)?d.dashArray.join(" "):d.dashArray.replace(/( *, *)/g," ")}else{a.dashStyle=""}a.endcap=d.lineCap.replace("butt","flat");a.joinstyle=d.lineJoin}else{if(a){e.removeChild(a);c._stroke=null}}if(d.fill){if(!b){b=c._fill=fQ("fill")}e.appendChild(b);b.color=d.fillColor||d.color;b.opacity=d.fillOpacity}else{if(b){e.removeChild(b);c._fill=null}}},_updateCircle:function(c){var a=c._point.round(),b=Math.round(c._radius),d=Math.round(c._radiusY||b);this._setPath(c,c._empty()?"M0 0":"AL "+a.x+","+a.y+" "+b+","+d+" 0,"+(65535*360))},_setPath:function(b,a){b._path.v=a},_bringToFront:function(a){g0(a._container)},_bringToBack:function(a){g6(a._container)}};var gY=fo?fQ:gI;var gP=d2.extend({getEvents:function(){var a=d2.prototype.getEvents.call(this);a.zoomstart=this._onZoomStart;return a},_initContainer:function(){this._container=gY("svg");this._container.setAttribute("pointer-events","none");this._rootGroup=gY("g");this._container.appendChild(this._rootGroup)},_destroyContainer:function(){hk(this._container);e8(this._container);delete this._container;delete this._rootGroup;delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(this._map._animatingZoom&&this._bounds){return}d2.prototype._update.call(this);var c=this._bounds,a=c.getSize(),b=this._container;if(!this._svgSize||!this._svgSize.equals(a)){this._svgSize=a;b.setAttribute("width",a.x);b.setAttribute("height",a.y)}eP(b,c.min);b.setAttribute("viewBox",[c.min.x,c.min.y,a.x,a.y].join(" "));this.fire("update")},_initPath:function(b){var a=b._path=gY("path");if(b.options.className){hg(a,b.options.className)}if(b.options.interactive){hg(a,"leaflet-interactive")}this._updateStyle(b);this._layers[hd(b)]=b},_addPath:function(a){if(!this._rootGroup){this._initContainer()}this._rootGroup.appendChild(a._path);a.addInteractiveTarget(a._path)},_removePath:function(a){hk(a._path);a.removeInteractiveTarget(a._path);delete this._layers[hd(a)]},_updatePath:function(a){a._project();a._update()},_updateStyle:function(b){var a=b._path,c=b.options;if(!a){return}if(c.stroke){a.setAttribute("stroke",c.color);a.setAttribute("stroke-opacity",c.opacity);a.setAttribute("stroke-width",c.weight);a.setAttribute("stroke-linecap",c.lineCap);a.setAttribute("stroke-linejoin",c.lineJoin);if(c.dashArray){a.setAttribute("stroke-dasharray",c.dashArray)}else{a.removeAttribute("stroke-dasharray")}if(c.dashOffset){a.setAttribute("stroke-dashoffset",c.dashOffset)}else{a.removeAttribute("stroke-dashoffset")}}else{a.setAttribute("stroke","none")}if(c.fill){a.setAttribute("fill",c.fillColor||c.color);a.setAttribute("fill-opacity",c.fillOpacity);a.setAttribute("fill-rule",c.fillRule||"evenodd")}else{a.setAttribute("fill","none")}},_updatePoly:function(a,b){this._setPath(a,gM(a._parts,b))},_updateCircle:function(d){var b=d._point,c=Math.max(Math.round(d._radius),1),f=Math.max(Math.round(d._radiusY),1)||c,e="a"+c+","+f+" 0 1,0 ";var a=d._empty()?"M0 0":"M"+(b.x-c)+","+b.y+e+(c*2)+",0 "+e+(-c*2)+",0 ";this._setPath(d,a)},_setPath:function(b,a){b._path.setAttribute("d",a)},_bringToFront:function(a){g0(a._path)},_bringToBack:function(a){g6(a._path)}});if(fo){gP.include(fb)}function e2(a){return gv||fo?new gP(a):null}hB.include({getRenderer:function(b){var a=b.options.renderer||this._getPaneRenderer(b.options.pane)||this.options.renderer||this._renderer;if(!a){a=this._renderer=this._createRenderer()}if(!this.hasLayer(a)){this.addLayer(a)}return a},_getPaneRenderer:function(b){if(b==="overlayPane"||b===undefined){return false}var a=this._paneRenderers[b];if(a===undefined){a=this._createRenderer({pane:b});this._paneRenderers[b]=a}return a},_createRenderer:function(a){return(this.options.preferCanvas&&f7(a))||e2(a)}});var fZ=gK.extend({initialize:function(a,b){gK.prototype.initialize.call(this,this._boundsToLatLngs(a),b)},setBounds:function(a){return this.setLatLngs(this._boundsToLatLngs(a))},_boundsToLatLngs:function(a){a=e9(a);return[a.getSouthWest(),a.getNorthWest(),a.getNorthEast(),a.getSouthEast()]}});function g7(a,b){return new fZ(a,b)}gP.create=gY;gP.pointsToPath=gM;hU.geometryToLayer=hl;hU.coordsToLatLng=dY;hU.coordsToLatLngs=dL;hU.latLngToCoords=gj;hU.latLngsToCoords=eK;hU.getFeature=fK;hU.asFeature=hT;hB.mergeOptions({boxZoom:true});var fa=fg.extend({initialize:function(a){this._map=a;this._container=a._container;this._pane=a._panes.overlayPane;this._resetStateTimeout=0;a.on("unload",this._destroy,this)},addHooks:function(){ew(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){e8(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){hk(this._pane);delete this._pane},_resetState:function(){this._resetStateTimeout=0;this._moved=false},_clearDeferredResetState:function(){if(this._resetStateTimeout!==0){clearTimeout(this._resetStateTimeout);this._resetStateTimeout=0}},_onMouseDown:function(a){if(!a.shiftKey||((a.which!==1)&&(a.button!==1))){return false}this._clearDeferredResetState();this._resetState();hc();hJ();this._startPoint=this._map.mouseEventToContainerPoint(a);ew(document,{contextmenu:g4,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(a){if(!this._moved){this._moved=true;this._box=gU("div","leaflet-zoom-box",this._container);hg(this._container,"leaflet-crosshair");this._map.fire("boxzoomstart")}this._point=this._map.mouseEventToContainerPoint(a);var b=new eA(this._point,this._startPoint),c=b.getSize();eP(this._box,b.min);this._box.style.width=c.x+"px";this._box.style.height=c.y+"px"},_finish:function(){if(this._moved){hk(this._box);eX(this._container,"leaflet-crosshair")}hq();gp();e8(document,{contextmenu:g4,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(a){if((a.which!==1)&&(a.button!==1)){return}this._finish();if(!this._moved){return}this._clearDeferredResetState();this._resetStateTimeout=setTimeout(gL(this._resetState,this),0);var b=new ht(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(b).fire("boxzoomend",{boxZoomBounds:b})},_onKeyDown:function(a){if(a.keyCode===27){this._finish()}}});hB.addInitHook("addHandler","boxZoom",fa);hB.mergeOptions({doubleClickZoom:true});var hp=fg.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(b){var c=this._map,d=c.getZoom(),a=c.options.zoomDelta,e=b.originalEvent.shiftKey?d-a:d+a;if(c.options.doubleClickZoom==="center"){c.setZoom(e)}else{c.setZoomAround(b.containerPoint,e)}}});hB.addInitHook("addHandler","doubleClickZoom",hp);hB.mergeOptions({dragging:true,inertia:!ft,inertiaDeceleration:3400,inertiaMaxSpeed:Infinity,easeLinearity:0.2,worldCopyJump:false,maxBoundsViscosity:0});var hh=fg.extend({addHooks:function(){if(!this._draggable){var a=this._map;this._draggable=new eb(a._mapPane,a._container);this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this);this._draggable.on("predrag",this._onPreDragLimit,this);if(a.options.worldCopyJump){this._draggable.on("predrag",this._onPreDragWrap,this);a.on("zoomend",this._onZoomEnd,this);a.whenReady(this._onZoomEnd,this)}}hg(this._map._container,"leaflet-grab leaflet-touch-drag");this._draggable.enable();this._positions=[];this._times=[]},removeHooks:function(){eX(this._map._container,"leaflet-grab");eX(this._map._container,"leaflet-touch-drag");this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var a=this._map;a._stop();if(this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var b=e9(this._map.options.maxBounds);this._offsetLimit=go(this._map.latLngToContainerPoint(b.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(b.getSouthEast()).multiplyBy(-1).add(this._map.getSize()));this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else{this._offsetLimit=null}a.fire("movestart").fire("dragstart");if(a.options.inertia){this._positions=[];this._times=[]}},_onDrag:function(b){if(this._map.options.inertia){var c=this._lastTime=+new Date(),a=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(a);this._times.push(c);this._prunePositions(c)}this._map.fire("move",b).fire("drag",b)},_prunePositions:function(a){while(this._positions.length>1&&a-this._times[0]>50){this._positions.shift();this._times.shift()}},_onZoomEnd:function(){var a=this._map.getSize().divideBy(2),b=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=b.subtract(a).x;this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(a,b){return a-(a-b)*this._viscosity},_onPreDragLimit:function(){if(!this._viscosity||!this._offsetLimit){return}var a=this._draggable._newPos.subtract(this._draggable._startPos);var b=this._offsetLimit;if(a.xb.max.x){a.x=this._viscousLimit(a.x,b.max.x)}if(a.y>b.max.y){a.y=this._viscousLimit(a.y,b.max.y)}this._draggable._newPos=this._draggable._startPos.add(a)},_onPreDragWrap:function(){var g=this._worldWidth,a=Math.round(g/2),e=this._initialWorldOffset,f=this._draggable._newPos.x,c=(f-a+e)%g+a-e,d=(f+a+e)%g-a-e,b=Math.abs(c+e)0?e:-e))-b;this._delta=0;this._startTime=null;if(!g){return}if(a.options.scrollWheelZoom==="center"){a.setZoom(b+g)}else{a.setZoomAround(this._lastMousePos,b+g)}}});hB.addInitHook("addHandler","scrollWheelZoom",d4);hB.mergeOptions({tap:true,tapTolerance:15});var el=fg.extend({addHooks:function(){ew(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){e8(this._map._container,"touchstart",this._onDown,this)},_onDown:function(b){if(!b.touches){return}dT(b);this._fireClick=true;if(b.touches.length>1){this._fireClick=false;clearTimeout(this._holdTimeout);return}var a=b.touches[0],c=a.target;this._startPos=this._newPos=new gZ(a.clientX,a.clientY);if(c.tagName&&c.tagName.toLowerCase()==="a"){hg(c,"leaflet-active")}this._holdTimeout=setTimeout(gL(function(){if(this._isTapValid()){this._fireClick=false;this._onUp();this._simulateEvent("contextmenu",a)}},this),1000);this._simulateEvent("mousedown",a);ew(document,{touchmove:this._onMove,touchend:this._onUp},this)},_onUp:function(b){clearTimeout(this._holdTimeout);e8(document,{touchmove:this._onMove,touchend:this._onUp},this);if(this._fireClick&&b&&b.changedTouches){var a=b.changedTouches[0],c=a.target;if(c&&c.tagName&&c.tagName.toLowerCase()==="a"){eX(c,"leaflet-active")}this._simulateEvent("mouseup",a);if(this._isTapValid()){this._simulateEvent("click",a)}}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(b){var a=b.touches[0];this._newPos=new gZ(a.clientX,a.clientY);this._simulateEvent("mousemove",a)},_simulateEvent:function(c,a){var b=document.createEvent("MouseEvents");b._simulated=true;a.target._simulatedClick=true;b.initMouseEvent(c,true,true,window,1,a.screenX,a.screenY,a.clientX,a.clientY,false,false,false,false,0,null);a.target.dispatchEvent(b)}});if(fx&&!fJ){hB.addInitHook("addHandler","tap",el)}hB.mergeOptions({touchZoom:fx&&!ft,bounceAtZoomLimits:true});var eN=fg.extend({addHooks:function(){hg(this._map._container,"leaflet-touch-zoom");ew(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){eX(this._map._container,"leaflet-touch-zoom");e8(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(b){var c=this._map;if(!b.touches||b.touches.length!==2||c._animatingZoom||this._zooming){return}var a=c.mouseEventToContainerPoint(b.touches[0]),d=c.mouseEventToContainerPoint(b.touches[1]);this._centerPoint=c.getSize()._divideBy(2);this._startLatLng=c.containerPointToLatLng(this._centerPoint);if(c.options.touchZoom!=="center"){this._pinchStartLatLng=c.containerPointToLatLng(a.add(d)._divideBy(2))}this._startDist=a.distanceTo(d);this._startZoom=c.getZoom();this._moved=false;this._zooming=true;c._stop();ew(document,"touchmove",this._onTouchMove,this);ew(document,"touchend",this._onTouchEnd,this);dT(b)},_onTouchMove:function(c){if(!c.touches||c.touches.length!==2||!this._zooming){return}var d=this._map,a=d.mouseEventToContainerPoint(c.touches[0]),e=d.mouseEventToContainerPoint(c.touches[1]),b=a.distanceTo(e)/this._startDist;this._zoom=d.getScaleZoom(b,this._startZoom);if(!d.options.bounceAtZoomLimits&&((this._zoomd.getMaxZoom()&&b>1))){this._zoom=d._limitZoom(this._zoom)}if(d.options.touchZoom==="center"){this._center=this._startLatLng;if(b===1){return}}else{var g=a._add(e)._divideBy(2)._subtract(this._centerPoint);if(b===1&&g.x===0&&g.y===0){return}this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract(g),this._zoom)}if(!this._moved){d._moveStart(true,false);this._moved=true}fu(this._animRequest);var f=gL(d._move,d,this._center,this._zoom,{pinch:true,round:false});this._animRequest=dR(f,this,true);dT(c)},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=false;return}this._zooming=false;fu(this._animRequest);e8(document,"touchmove",this._onTouchMove);e8(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))}}});hB.addInitHook("addHandler","touchZoom",eN);hB.BoxZoom=fa;hB.DoubleClickZoom=hp;hB.Drag=hh;hB.Keyboard=eT;hB.ScrollWheelZoom=d4;hB.Tap=el;hB.TouchZoom=eN;Object.freeze=f9;hG.version=hx;hG.Control=ef;hG.control=fp;hG.Browser=hz;hG.Evented=eS;hG.Mixin=fN;hG.Util=g8;hG.Class=fm;hG.Handler=fg;hG.extend=eu;hG.bind=gL;hG.stamp=hd;hG.setOptions=hD;hG.DomEvent=fh;hG.DomUtil=d7;hG.PosAnimation=fl;hG.Draggable=eb;hG.LineUtil=dU;hG.PolyUtil=gV;hG.Point=gZ;hG.point=fr;hG.Bounds=eA;hG.bounds=go;hG.Transformation=gf;hG.transformation=hM;hG.Projection=fj;hG.LatLng=fV;hG.latLng=gz;hG.LatLngBounds=ht;hG.latLngBounds=e9;hG.CRS=eW;hG.GeoJSON=hU;hG.geoJSON=gy;hG.geoJson=eZ;hG.Layer=fn;hG.LayerGroup=en;hG.layerGroup=gw;hG.FeatureGroup=gs;hG.featureGroup=f5;hG.ImageOverlay=eJ;hG.imageOverlay=hu;hG.VideoOverlay=fB;hG.videoOverlay=gE;hG.DivOverlay=f2;hG.Popup=eD;hG.popup=eM;hG.Tooltip=d0;hG.tooltip=gS;hG.Icon=f0;hG.icon=eB;hG.DivIcon=hs;hG.divIcon=eH;hG.Marker=g9;hG.marker=fC;hG.TileLayer=eL;hG.tileLayer=fs;hG.GridLayer=hQ;hG.gridLayer=gb;hG.SVG=gP;hG.svg=e2;hG.Renderer=d2;hG.Canvas=hf;hG.canvas=f7;hG.Path=h0;hG.CircleMarker=f8;hG.circleMarker=f3;hG.Circle=fd;hG.circle=hn;hG.Polyline=e1;hG.polyline=hv;hG.Polygon=gK;hG.polygon=fR;hG.Rectangle=fZ;hG.rectangle=g7;hG.Map=hB;hG.map=ez;var gd=window.L;hG.noConflict=function(){window.L=gd;return this};window.L=hG})));var map=null;var mapCanvas=document.getElementById("map_canvas");if(typeof mapTypeUsed=="undefined"){var mapTypeUsed="OSM"}var mapMarkers=new Array();if(typeof(mapPos)=="undefined"){var mapPos=[0,0]}if(typeof(mapZoom)=="undefined"){var mapZoom=1}if(typeof(colorScheme)=="undefined"){var colorScheme="light"}var highlightColor="#aaf";if(colorScheme=="dark"){highlightColor="#444"}if(typeof(volcanoesShown)=="undefined"){var volcanoesShown=true}if(typeof(quakesShown)=="undefined"){var quakesShown=true}if(typeof(terrainView)=="undefined"){var terrainView=false}if(typeof(quakeInfo)=="undefined"){var quakeInfo=new Array()}if(typeof(maxAge)=="undefined"){var maxAge=86400}if(typeof(minMag)=="undefined"){var minMag=3}if(typeof(volcanoInfo)=="undefined"){var volcanoInfo=new Array()}if(typeof(minStatus)=="undefined"){var minStatus=2}if(typeof(archive)=="undefined"){var archive=false}if(typeof(firstTime)=="undefined"){var firstTime=true}if(typeof(layout)=="undefined"){var layout=""}var savedMarkerIcon=null;var savedMarkerId=null;var savedRow=null;var savedColor=null;var tempMarker=null;var savedMarkerIcon=null;var shakingLabels=new Array("Not felt","MMI II (Very weak shaking)","MMI III (Weak shaking)","MMI IV (Light shaking)","MMI V (Moderate shaking)","MMI VI (Strong shaking)","MMI VII (Very strong shaking)","MMI VIII (Severe shaking)","MMI IX (Violent shaking)");if(typeof(eqReportStore)=="undefined"){var eqReportStore=new Array()}var template_mapmarker_EQReport="###LOCATION### - ###SHAKING###
###REPORT###";var template_maptitle_EQReport="###LOCATION### - ###SHAKING###";function initMap(){var e=document;if(e.getElementById("mapContainer")!=null){e.getElementById("mapContainer").style.display=""}mapCanvas.style.display="";map=L.map(mapCanvas.id).setView([mapPos[0],mapPos[1]],mapZoom);map.scrollWheelZoom.disable();L.control.scale().addTo(map);var c="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";var a='© OpenStreetMap contributors';if(mapTypeUsed=="MapBox"){var b="pk.eyJ1Ijoidm9sY2Fub2Rpc2NvdmVyeSIsImEiOiJjam1rczNrYnIwMHMyM2ttajF4ZTg0b2FnIn0.CnY9e-2KIHuf6nHFp0wDlA";c="https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token="+b;a='Map data © OpenStreetMap, CC-BY-SA, Imagery © Mapbox'}L.tileLayer(c,{attribution:a,maxZoom:18,id:"mapbox.streets",accessToken:b}).addTo(map);if(eqReportStore.length>0){for(i=eqReportStore.length-1;i>=0;i--){makeEQReportMarker(eqReportStore[i])}}if(window.location.host=="earthquakes.volcanodiscovery.com"){setTimeout("loadNewQuakes()",5000)}}function showMouseCoords(a){if(map!=null&&document.getElementById("latlon")!=null){var b=map.mouseToLatLng(a);var c=b.lng();while(c<-180){c+=360}while(c>180){c-=360}document.getElementById("latlon").innerHTML=Math.round(b.lat()*1000)/1000+" / "+Math.round(c*1000)/1000+" | "}}function addToMap(p,f,d,t,e,b,q,n,l,k,o,a){if(map==null){return false}var a=a||true;if(a!==true){a=false}var p=p||0;if(p!=0){if(typeof(mapMarkers[p])!="undefined"){return}}var o=o||1;var m=q||20;var l=l||Math.round(q/2);var r=n||20;var k=k||Math.round(n/2);var e=e||"";var t=t||"marker";var c=0.9;if(!a){c=0}var b=b||"default";var j=null;if(b!="default"){if(b.substr(0,4)!="http"){b="https://earthquakes.volcanodiscovery.com/fileadmin/voldis/png/"+b}var s=L.icon({iconUrl:b,iconSize:[q,n],iconAnchor:[l,k],popupAnchor:[0,-10]});j={icon:s,title:t,opacity:c,zIndexOffset:o}}else{j={title:t,opacity:c,zIndexOffset:o}}var g=L.marker([f,d],j).addTo(map);if(e){g.bindPopup(e)}mapMarkers[p]=g}function showMarker(d,c){if(typeof(mapMarkers[d])=="undefined"){return false}var b=c||false;var a=mapMarkers[d];a.setOpacity(0.9);if(b){openInfoWindow(a)}}function hideMarker(b){if(typeof(mapMarkers[b])=="undefined"){return false}var a=mapMarkers[b];a.setOpacity(0)}function makeEQReportMarker(d,c){var c=c||true;var b="eqreport-"+d.id;if(typeof(mapMarkers[b])!="undefined"){return false}var f=d.lat;lon=d.lon;var e=replaceEQReportMarker(template_mapmarker_EQReport,d);var j=replaceEQReportMarker(template_maptitle_EQReport,d);var m=getEQReportIcon(d);var o=m[0];var a=m[1];var n=m[2];var l=m[3];var k=m[4];var g=m[5];if(map!=null){addToMap(b,f,lon,j,e,o,a,n,l,k,g,c)}else{storedMarkers.push([b,f,lon,j,e,o,a,n,l,k,g,c])}}function replaceEQReportMarker(d,b){var e=b.location;d=d.replace("###LOCATION###",e);var a=parseInt(b.intensity)-1;if(a<0){a=0}if(a>8){a=8}var c=shakingLabels[a];d=d.replace("###SHAKING###",c);d=d.replace("###REPORT###",b.report);return d}function getEQReportIcon(b){var a=b.intensity;if(a<1){a=1}if(a>9){a=9}var d="shakegif-"+a+".png";w=16;var c=[d,w,w,Math.floor(w/2),Math.floor(w/2),100];return c}function translate(a){return a}function openInfoWindow(a){a.openPopup();return;if(!a.HTMLcontent){return}if(!a.infoWindowAttached){a.infoWindow=new khtml.maplib.overlay.InfoWindowCustom({content:a.HTMLcontent,disableAutoPan:true,maxWidth:440,pixelOffset:{x:10,y:10}});a.infoWindowAttached=true}a.infoWindow.open(map,a)}function contains(b,d){var c=b.length;while(c--){if(b[c]===d){return true}}return false}function showHideVolcanoes(){if(volcanoesShown===false){if(typeof(showList)!="undefined"){if(showList.length>1){for(i=0;ie){a.options[i].style.display="none"}else{a.options[i].style.display=""}}}function loadArchiveQuakeSet(){var e=document.getElementById("mmYYYY").options[document.getElementById("mmYYYY").selectedIndex].value;var b=e.substring(0,2);if(b.substr(0,1)==0){b=b.substr(1,1)}var f=e.substring(2);var c=parseInt(document.getElementById("dd").options[document.getElementById("dd").selectedIndex].value);var d=window.location.href;var a=d.split("/");tableFile=a[0]+"//"+a[2]+"/getQuakes.php?";quakeFileJS=a[0]+"//"+a[2]+"/widget/archive/earthquake-data";if(area){tableFile+="lat1="+lat1+"&lat2="+lat2+"&lon1="+lon1+"&lon2="+lon2+"&"}if(area){quakeFileJS+=lat1+"_"+lat2+"_"+lon1+"_"+lon2}tableFile+="year="+f+"&month="+b;if(c!=0){tableFile+="&day="+c}quakeFileJS+="-"+f+"-"+b;if(c!=0){quakeFileJS+="-"+c}quakeFileJS+=".js";if(quakeInfo.length>0){for(i=quakeInfo.length-1;i>=0;i--){hideMarker("quake-"+quakeInfo[i][0])}}archive=1;quakeInfo=new Array();tableLoaded=0;quakesLoaded=0;qDataScriptAdded=0;document.getElementById("quakesList").innerHTML=loadingMessage;loadQuakeTable();getQuakesJS();return}function showHideQuakes(){if(quakesShown===true){for(i=0;i=0;i--){var e="quake-"+quakeInfo[i][0];if((quakeInfo[i][1]>=b)&&(!a||(quakeInfo[i][2]1){for(i=b-1;i>=0;i--){if((volcanoInfo[i][1]>=a)&&contains(showList,volcanoInfo[i][0])){showMarker("volcano-"+volcanoInfo[i][0])}else{hideMarker("volcano-"+volcanoInfo[i][0])}}}}else{for(i=b-1;i>=0;i--){if(volcanoInfo[i][1]>=a){showMarker("volcano-"+volcanoInfo[i][0])}else{hideMarker("volcano-"+volcanoInfo[i][0])}}}volcanoesShown=true}function _highlightVolcano(c){if(typeof(mapMarkers["volcano-"+c])=="undefined"){return setTimeout("highlightVolcano("+c+")",1000)}var b=mapMarkers["volcano-"+c];b.setZIndex(b.getZIndex()+100);b.setVisible(true);var a=new google.maps.Marker({position:b.getPosition(),map:map,zIndex:b.getZIndex(),title:b.getTitle()})}function _highlightUpdated(){if(volcanoesLoaded==false){return setTimeout("highlightUpdated()",1200)}var j=new Date();var e=j.getTime()/1000;animated=true;var c=window.location.href;var a=c.split("/");var g=a[0]+"//"+a[2];for(i=0;ie-(14*86400)){if(volcanoInfo[i][1]>1){var b=mapMarkers["volcano-"+volcanoInfo[i][0]];var f=b.getIcon();f.url=g+"/fileadmin/voldis/png/volcano_level"+volcanoInfo[i][1]+"-an.gif";b.setIcon(f)}}}}function _stopAnimation(){animated=false;var j=new Date();var e=j.getTime()/1000;animated=true;var c=window.location.href;var a=c.split("/");var g=a[0]+"//"+a[2];for(i=0;ie-(30*86400)){if(volcanoInfo[i][1]>1){var b=mapMarkers["volcano-"+volcanoInfo[i][0]];var f=b.getIcon();f.url=g+"/fileadmin/voldis/png/volcano_level"+volcanoInfo[i][1]+".png";b.setIcon(f)}}}}function _animateMarker(b,a){}function loadNewQuakes(){if(archive||area){return}var a=document;if(a.body.offsetWidth<500){setTimeout("loadNewQuakes()",10000);return}if(!quakesLoaded){setTimeout("loadNewQuakes()",5000);return}if(newestQuakeId==0){newestQuakeId=quakeInfo[0][0]}mkRequest(newQuakesURL+"&latest="+newestQuakeId,"get","",function(d){var b=d.responseText;if(b!=""){var e=b.split("§");a.getElementById("newestHeader").style.display="";var f=e[0];a.getElementById("quakeTable").innerHTML=f+a.getElementById("quakeTable").innerHTML;a.getElementById("quake-"+e[1]).style.backgroundColor="#fcc";quakeInfo.push([e[1],e[2],e[3]]);addToMap("quake-"+e[1],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],parseInt(e[13]));newestQuakeId=e[1];setTimeout("loadNewQuakes()",10000)}else{if(area){var c=600000}else{var c=180000}setTimeout("loadNewQuakes()",c)}})}function autosetVolcanoes(){if(typeof(map)=="undefined"){setTimeout("autosetVolcanoes()",1000);return}if(map==null){setTimeout("autosetVolcanoes()",1000);return}if(typeof(addToMap)=="undefined"){setTimeout("autosetVolcanoes()",1000);return}if(volcanoInfo.length==0){setTimeout("autosetVolcanoes()",1000);return}var f=document;var e=map.zoomlevel;var b=f.getElementById("map_canvas").offsetWidth;if(e==0){e=1}var c=Math.round(b*e);var a=minStatus;if(typeof(showList)!="undefined"){if(showList.length<200){minStatus=1}}else{if(c<400){minStatus=3}else{if(c<1500){minStatus=2}}}if(a!=minStatus){showVolcanoes(minStatus)}if(typeof(showList)!="undefined"){if(showList.length==1){highlightVolcano(showList[0])}}}function showTime(){var a=new Date();var b=a.toUTCString();b=b.substring(0,b.length-7)+" UTC";if(document.getElementById("clock")!="undefined"){document.getElementById("clock").innerHTML=b}setTimeout("showTime()",1000)}function autoZoom(){if(typeof(map)=="undefined"){setTimeout("autoZoom()",1000);return}if(map==null){setTimeout("autoZoom()",1000);return}var a=map.getBounds();if(typeof(a)=="undefined"){setTimeout("autoZoom()",1000);return}if(typeof(a)==null){setTimeout("autoZoom()",1000);return}var l=document;var k=l.getElementById("map_canvas").offsetWidth;var c=l.getElementById("map_canvas").offsetHeight;var e=a.getNorthEast();var o=a.getSouthWest();var f=256;var q=180;var p=o.lng();var m=e.lng();var r=o.lat();var b=e.lat();if(angleLon<0){angleLon+=360}var j=Math.round(Math.log(k*360/angleLon/f)/Math.LN2);var g=Math.round(Math.log(c*180/angleLat/q)/Math.LN2);map.setZoom(Math.min(j,g));map.panTo([mapPos[0],mapPos[1]]);firstTime=false}function adjustWindow(){var g=document;if(g.body&&g.body.offsetWidth){var b=g.body.offsetWidth;var f=g.body.offsetHeight}var a=adwinspaceleft;if(!hidead){if(adwinvertical){if(b>5*adwinwidth){g.getElementById("g-ad").style.display=""}else{g.getElementById("g-ad").style.display="none";a=0}}else{if((b>1.2*adwinwidth)&&((f-50)>3*adwinheight)){g.getElementById("g-ad").style.display=""}else{g.getElementById("g-ad").style.display="none";a=0}}}g.getElementById("quakesList").style.left=(5+a)+"px";if(firstTime==true){if(quakesShown!==false){if(layout!="vertical"){if(b>799){g.getElementById("quakesList").style.display=""}else{g.getElementById("quakesList").style.display="none"}}else{if(b>499){g.getElementById("map_canvas").style.bottom="50%";g.getElementById("quakesList").style.display=""}else{g.getElementById("map_canvas").style.bottom="30px";g.getElementById("quakesList").style.display="none"}}}}if(b>699){if(!newstickerhide){g.getElementById("newstickerWin").style.display=""}}else{g.getElementById("newstickerWin").style.display="none"}if(b>480){g.getElementById("title").innerHTML=title;g.getElementById("clock").style.display="";g.getElementById("latlon").style.display="";if(g.getElementById("shComment")){g.getElementById("shComment").style.display=""}if(layout!="vertical"){g.getElementById("quakesList").style.bottom=(adwinspacebottom+20)+"px";g.getElementById("newsList").style.bottom=(adwinspacebottom+20)+"px"}}else{g.getElementById("title").innerHTML=titleShort;g.getElementById("clock").style.display="none";g.getElementById("latlon").style.display="none";g.getElementById("quakesList").style.bottom="30px";g.getElementById("newsList").style.bottom="30px";if(g.getElementById("shComment")){g.getElementById("shComment").style.display="none"}}if(b>360){g.getElementById("shDonate").style.display="";g.getElementById("newsListLink").style.display="";if(firstTime==true){g.getElementById("earthquakesPanel").style.display=""}if(firstTime==true){if(!area){g.getElementById("volcanoesPanel").style.display=""}}}else{g.getElementById("shDonate").style.display="none";g.getElementById("newsListLink").style.display="none";if(firstTime==true){g.getElementById("earthquakesPanel").style.display="none"}if(firstTime==true){g.getElementById("volcanoesPanel").style.display="none"}}if(b>350){g.getElementById("title").style.display="";g.getElementById("break").style.display="";g.getElementById("webcamLink").style.display=""}else{g.getElementById("title").style.display="none";g.getElementById("break").style.display="none";g.getElementById("webcamLink").style.display="none"}if(b>280){g.getElementById("addThis").style.display="";g.getElementById("top").style.fontSize="11px";if(b>450){g.getElementById("title").style.fontSize="12px"}for(i=1;i<5;i++){g.getElementById("stat-label"+i).style.display=""}}else{g.getElementById("addThis").style.display="none";g.getElementById("top").style.fontSize="9px";for(i=1;i<5;i++){g.getElementById("stat-label"+i).style.display="none"}}if(layout!="vertical"){if(g.getElementById("quakesList").style.display=="none"){g.getElementById("map_canvas").style.left=(a+8)+"px"}else{if(b>1000){g.getElementById("map_canvas").style.left=(488+a)+"px";g.getElementById("quakesList").style.width="468px"}else{var c=Math.round((b-30-a)/2);g.getElementById("quakesList").style.width=c+"px";g.getElementById("map_canvas").style.left=(20+c+a)+"px"}}}else{if(g.getElementById("quakesList").style.display=="none"){g.getElementById("map_canvas").style.bottom="30px"}else{g.getElementById("map_canvas").style.bottom="50%"}}if(volcanoesShown==false){g.getElementById("vToggle-sh").innerHTML=show}else{g.getElementById("vToggle-sh").innerHTML=hide}if(quakesShown==false){g.getElementById("eToggle-sh").innerHTML=show}else{g.getElementById("eToggle-sh").innerHTML=hide}var e=g.getElementById("top").offsetHeight;g.getElementById("map_canvas").style.top=(e+7)+"px";g.getElementById("newsList").style.top=(e+7)+"px";if(layout!="vertical"){g.getElementById("quakesList").style.top=(e+7)+"px";if(adwinvertical){g.getElementById("g-ad").style.top=(e+13)+"px"}}g.getElementById("newsList").height=(f-e-adwinspacebottom-40)+"px";if(map==null){return setTimeout("adjustWindow()",400)}map.redraw()}function setToTop(a){if(a=="newsList"){document.getElementById("quakesList").style.display="none"}if(a=="quakesList"){document.getElementById("newsList").style.display="none"}}function switchMap(p,o,n,m,e,c,r,q,g,b){var s=document;var k=s.getElementById("mapContainer");var u=s.getElementById("mapContainer_1");var a=mapCanvas;var t=s.getElementById("mapSwitch").firstChild;if(t.nodeValue==n){t.nodeValue=m}else{t.nodeValue=n}var j=k.parentNode.getAttribute("id");if(j==p){var f=o}else{var f=p}var l=s.getElementById(f);if(j==p){a.style.width=q;a.style.height=c}else{a.style.width=r;a.style.height=e}if(u!=null){l.appendChild(u)}l.appendChild(k);l.style.display="";s.getElementById(j).style.display="none";map.invalidateSize();map.panTo([g,b])}if(typeof(mapScriptAdded)=="undefined"){var mapScriptAdded=true}else{mapScriptAdded=true}initMap();if(typeof(storedMarkers)!="undefined"){if(storedMarkers.length){for(i=storedMarkers.length-1;i>=0;i--){var arr=storedMarkers[i];if(typeof(arr[6])!="undefined"){var w=arr[6]}else{var w=0}if(typeof(arr[7])!="undefined"){var h=arr[7]}else{var h=0}if(typeof(arr[8])!="undefined"){var ax=arr[8]}else{var ax=0}if(typeof(arr[9])!="undefined"){var ay=arr[9]}else{var ay=0}if(typeof(arr[10])!="undefined"){var z=arr[10]}else{var z=1}if(typeof(arr[11])!="undefined"){var v=arr[11]}else{var v=true}addToMap(arr[0],arr[1],arr[2],arr[3],arr[4],arr[5],w,h,ax,ay,z,v)}}};